file
stringlengths
18
26
data
stringlengths
3
1.04M
the_stack_data/111812.c
// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s // CHECK: {{^}}#pragma x y z{{$}} // CHECK: {{^}}#pragma a b c{{$}} _Pragma("x y z") _Pragma("a b c")
the_stack_data/28262919.c
#include <stdio.h> #include <unistd.h> #include <errno.h> #include <stdlib.h> #define MAX_LINE 80 /* 80 chars per line, per command, should be enough. */ /* The setup function below will not return any value, but it will just: read in the next command line; separate it into distinct arguments (using blanks as delimiters), and set the args array entries to point to the beginning of what will become null-terminated, C-style strings. */ void setup(char inputBuffer[], char *args[],int *background) { int length, /* # of characters in the command line */ i, /* loop index for accessing inputBuffer array */ start, /* index where beginning of next command parameter is */ ct; /* index of where to place the next parameter into args[] */ ct = 0; /* read what the user enters on the command line */ length = read(STDIN_FILENO,inputBuffer,MAX_LINE); /* 0 is the system predefined file descriptor for stdin (standard input), which is the user's screen in this case. inputBuffer by itself is the same as &inputBuffer[0], i.e. the starting address of where to store the command that is read, and length holds the number of characters read in. inputBuffer is not a null terminated C-string. */ start = -1; if (length == 0) exit(0); /* ^d was entered, end of user command stream */ /* the signal interrupted the read system call */ /* if the process is in the read() system call, read returns -1 However, if this occurs, errno is set to EINTR. We can check this value and disregard the -1 value */ if ( (length < 0) && (errno != EINTR) ) { perror("error reading the command"); exit(-1); /* terminate with error code of -1 */ } printf(">>%s<<",inputBuffer); for (i=0;i<length;i++){ /* examine every character in the inputBuffer */ switch (inputBuffer[i]){ case ' ': case '\t' : /* argument separators */ if(start != -1){ args[ct] = &inputBuffer[start]; /* set up pointer */ ct++; } inputBuffer[i] = '\0'; /* add a null char; make a C string */ start = -1; break; case '\n': /* should be the final char examined */ if (start != -1){ args[ct] = &inputBuffer[start]; ct++; } inputBuffer[i] = '\0'; args[ct] = NULL; /* no more arguments to this command */ break; default : /* some other character */ if (start == -1) start = i; if (inputBuffer[i] == '&'){ *background = 1; inputBuffer[i-1] = '\0'; } } /* end of switch */ } /* end of for */ args[ct] = NULL; /* just in case the input line was > 80 */ for (i = 0; i <= ct; i++) printf("args %d = %s\n",i,args[i]); } /* end of setup routine */ int main(void) { char inputBuffer[MAX_LINE]; /*buffer to hold command entered */ int background; /* equals 1 if a command is followed by '&' */ char *args[MAX_LINE/2 + 1]; /*command line arguments */ while (1){ background = 0; printf("myshell: "); /*setup() calls exit() when Control-D is entered */ setup(inputBuffer, args, &background); /** the steps are: (1) fork a child process using fork() (2) the child process will invoke execv() (3) if background == 0, the parent will wait, otherwise it will invoke the setup() function again. */ } }
the_stack_data/18888460.c
long __stack_chk_guard[0]; void __stack_chk_fail() { }
the_stack_data/20821.c
/* $OpenBSD: strlcpy.c,v 1.16 2019/01/25 00:19:25 millert Exp $ */ /* * Copyright (c) 1998, 2015 Todd C. Miller <[email protected]> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <sys/types.h> #include <string.h> /* * Copy string src to buffer dst of size dsize. At most dsize-1 * chars will be copied. Always NUL terminates (unless dsize == 0). * Returns strlen(src); if retval >= dsize, truncation occurred. */ size_t strlcpy(char *dst, const char *src, size_t dsize) { const char *osrc = src; size_t nleft = dsize; /* Copy as many bytes as will fit. */ if (nleft != 0) { while (--nleft != 0) { if ((*dst++ = *src++) == '\0') break; } } /* Not enough room in dst, add NUL and traverse rest of src. */ if (nleft == 0) { if (dsize != 0) *dst = '\0'; /* NUL-terminate dst */ while (*src++) ; } return(src - osrc - 1); /* count does not include NUL */ }
the_stack_data/148576947.c
#include <stdio.h> #include <unistd.h> #include <pthread.h> void print_patch(void) { printf("Hello from thread2 (PATCHED)\n"); } void print_greetings1(void) { printf("Hello from thread1 (UNPATCHED)\n"); } void print_greetings2(void) { printf("Hello from thread2 (UNPATCHED)\n"); } void *thread1_func(void *unused) { while (1) { print_greetings1(); sleep(1); } } void *thread2_func(void *unused) { while (1) { print_greetings2(); sleep(1); } } int main() { pthread_t thrs[3]; pthread_create(&thrs[0], NULL, thread1_func, NULL); pthread_create(&thrs[1], NULL, thread2_func, NULL); pthread_create(&thrs[2], NULL, thread2_func, NULL); pthread_join(thrs[0], NULL); pthread_join(thrs[1], NULL); pthread_join(thrs[2], NULL); return 0; }
the_stack_data/15761689.c
#include <stdio.h> #include <stdlib.h> struct cuvinte { char cuv[15]; struct cuvinte *urm; }; typedef struct cuvinte CUV; int main() { CUV *cap, *p, *q; int i, n; printf("Introduceti numarul de cuvinte din lista\n"); scanf("%d", &n); p=(CUV*)malloc(sizeof(CUV)); if(p==NULL) { printf("Alocarea dinamica a reusit!\n"); exit(1); } printf("Intorduceti primul cuvant din lista\n"); scanf("%s", &p->cuv); fflush(stdin); p->urm=NULL; cap=p; for(i=2; i<=n; i++) { q=(CUV*)malloc(sizeof(CUV)); if(q==NULL) { printf("Alocarea dinamica nu a reusit\n"); exit(1); } printf("Introduceti elementul %d din lista\n", i); scanf("%s", &q->cuv); fflush(stdin); q->urm=NULL; p->urm=q; p=q; } for(i=1, p=cap; p!=NULL; p=p->urm, i++) printf("Cuvantul %d din lista: %s cu adresa %p\n", i, p->cuv, p->urm); printf("FRAZA\n"); for(p=cap, i=1; p!=NULL; p=p->urm, i++) printf("%s ", p->cuv); return 0; }
the_stack_data/48263.c
// KASAN: use-after-free Read in bpf_tcp_remove // https://syzkaller.appspot.com/bug?id=bbf64fcd487c49242902681910acf285069697a4 // status:open // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include <arpa/inet.h> #include <dirent.h> #include <endian.h> #include <errno.h> #include <fcntl.h> #include <net/if.h> #include <net/if_arp.h> #include <netinet/in.h> #include <sched.h> #include <setjmp.h> #include <signal.h> #include <stdarg.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/ioctl.h> #include <sys/mount.h> #include <sys/prctl.h> #include <sys/resource.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/syscall.h> #include <sys/time.h> #include <sys/types.h> #include <sys/uio.h> #include <sys/wait.h> #include <time.h> #include <unistd.h> #include <linux/if_addr.h> #include <linux/if_ether.h> #include <linux/if_link.h> #include <linux/if_tun.h> #include <linux/in6.h> #include <linux/ip.h> #include <linux/neighbour.h> #include <linux/net.h> #include <linux/netlink.h> #include <linux/rtnetlink.h> #include <linux/tcp.h> #include <linux/veth.h> unsigned long long procid; static __thread int skip_segv; static __thread jmp_buf segv_env; static void segv_handler(int sig, siginfo_t* info, void* ctx) { uintptr_t addr = (uintptr_t)info->si_addr; const uintptr_t prog_start = 1 << 20; const uintptr_t prog_end = 100 << 20; if (__atomic_load_n(&skip_segv, __ATOMIC_RELAXED) && (addr < prog_start || addr > prog_end)) { _longjmp(segv_env, 1); } exit(sig); } static void install_segv_handler(void) { struct sigaction sa; memset(&sa, 0, sizeof(sa)); sa.sa_handler = SIG_IGN; syscall(SYS_rt_sigaction, 0x20, &sa, NULL, 8); syscall(SYS_rt_sigaction, 0x21, &sa, NULL, 8); memset(&sa, 0, sizeof(sa)); sa.sa_sigaction = segv_handler; sa.sa_flags = SA_NODEFER | SA_SIGINFO; sigaction(SIGSEGV, &sa, NULL); sigaction(SIGBUS, &sa, NULL); } #define NONFAILING(...) \ { \ __atomic_fetch_add(&skip_segv, 1, __ATOMIC_SEQ_CST); \ if (_setjmp(segv_env) == 0) { \ __VA_ARGS__; \ } \ __atomic_fetch_sub(&skip_segv, 1, __ATOMIC_SEQ_CST); \ } static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static bool write_file(const char* file, const char* what, ...) { char buf[1024]; va_list args; va_start(args, what); vsnprintf(buf, sizeof(buf), what, args); va_end(args); buf[sizeof(buf) - 1] = 0; int len = strlen(buf); int fd = open(file, O_WRONLY | O_CLOEXEC); if (fd == -1) return false; if (write(fd, buf, len) != len) { int err = errno; close(fd); errno = err; return false; } close(fd); return true; } static struct { char* pos; int nesting; struct nlattr* nested[8]; char buf[1024]; } nlmsg; static void netlink_init(int typ, int flags, const void* data, int size) { memset(&nlmsg, 0, sizeof(nlmsg)); struct nlmsghdr* hdr = (struct nlmsghdr*)nlmsg.buf; hdr->nlmsg_type = typ; hdr->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK | flags; memcpy(hdr + 1, data, size); nlmsg.pos = (char*)(hdr + 1) + NLMSG_ALIGN(size); } static void netlink_attr(int typ, const void* data, int size) { struct nlattr* attr = (struct nlattr*)nlmsg.pos; attr->nla_len = sizeof(*attr) + size; attr->nla_type = typ; memcpy(attr + 1, data, size); nlmsg.pos += NLMSG_ALIGN(attr->nla_len); } static void netlink_nest(int typ) { struct nlattr* attr = (struct nlattr*)nlmsg.pos; attr->nla_type = typ; nlmsg.pos += sizeof(*attr); nlmsg.nested[nlmsg.nesting++] = attr; } static void netlink_done(void) { struct nlattr* attr = nlmsg.nested[--nlmsg.nesting]; attr->nla_len = nlmsg.pos - (char*)attr; } static int netlink_send(int sock) { if (nlmsg.pos > nlmsg.buf + sizeof(nlmsg.buf) || nlmsg.nesting) exit(1); struct nlmsghdr* hdr = (struct nlmsghdr*)nlmsg.buf; hdr->nlmsg_len = nlmsg.pos - nlmsg.buf; struct sockaddr_nl addr; memset(&addr, 0, sizeof(addr)); addr.nl_family = AF_NETLINK; unsigned n = sendto(sock, nlmsg.buf, hdr->nlmsg_len, 0, (struct sockaddr*)&addr, sizeof(addr)); if (n != hdr->nlmsg_len) exit(1); n = recv(sock, nlmsg.buf, sizeof(nlmsg.buf), 0); if (n < sizeof(struct nlmsghdr) + sizeof(struct nlmsgerr)) exit(1); if (hdr->nlmsg_type != NLMSG_ERROR) exit(1); return -((struct nlmsgerr*)(hdr + 1))->error; } static void netlink_add_device_impl(const char* type, const char* name) { struct ifinfomsg hdr; memset(&hdr, 0, sizeof(hdr)); netlink_init(RTM_NEWLINK, NLM_F_EXCL | NLM_F_CREATE, &hdr, sizeof(hdr)); if (name) netlink_attr(IFLA_IFNAME, name, strlen(name)); netlink_nest(IFLA_LINKINFO); netlink_attr(IFLA_INFO_KIND, type, strlen(type)); } static void netlink_add_device(int sock, const char* type, const char* name) { netlink_add_device_impl(type, name); netlink_done(); int err = netlink_send(sock); (void)err; } static void netlink_add_veth(int sock, const char* name, const char* peer) { netlink_add_device_impl("veth", name); netlink_nest(IFLA_INFO_DATA); netlink_nest(VETH_INFO_PEER); nlmsg.pos += sizeof(struct ifinfomsg); netlink_attr(IFLA_IFNAME, peer, strlen(peer)); netlink_done(); netlink_done(); netlink_done(); int err = netlink_send(sock); (void)err; } static void netlink_add_hsr(int sock, const char* name, const char* slave1, const char* slave2) { netlink_add_device_impl("hsr", name); netlink_nest(IFLA_INFO_DATA); int ifindex1 = if_nametoindex(slave1); netlink_attr(IFLA_HSR_SLAVE1, &ifindex1, sizeof(ifindex1)); int ifindex2 = if_nametoindex(slave2); netlink_attr(IFLA_HSR_SLAVE2, &ifindex2, sizeof(ifindex2)); netlink_done(); netlink_done(); int err = netlink_send(sock); (void)err; } static void netlink_device_change(int sock, const char* name, bool up, const char* master, const void* mac, int macsize) { struct ifinfomsg hdr; memset(&hdr, 0, sizeof(hdr)); if (up) hdr.ifi_flags = hdr.ifi_change = IFF_UP; netlink_init(RTM_NEWLINK, 0, &hdr, sizeof(hdr)); netlink_attr(IFLA_IFNAME, name, strlen(name)); if (master) { int ifindex = if_nametoindex(master); netlink_attr(IFLA_MASTER, &ifindex, sizeof(ifindex)); } if (macsize) netlink_attr(IFLA_ADDRESS, mac, macsize); int err = netlink_send(sock); (void)err; } static int netlink_add_addr(int sock, const char* dev, const void* addr, int addrsize) { struct ifaddrmsg hdr; memset(&hdr, 0, sizeof(hdr)); hdr.ifa_family = addrsize == 4 ? AF_INET : AF_INET6; hdr.ifa_prefixlen = addrsize == 4 ? 24 : 120; hdr.ifa_scope = RT_SCOPE_UNIVERSE; hdr.ifa_index = if_nametoindex(dev); netlink_init(RTM_NEWADDR, NLM_F_CREATE | NLM_F_REPLACE, &hdr, sizeof(hdr)); netlink_attr(IFA_LOCAL, addr, addrsize); netlink_attr(IFA_ADDRESS, addr, addrsize); return netlink_send(sock); } static void netlink_add_addr4(int sock, const char* dev, const char* addr) { struct in_addr in_addr; inet_pton(AF_INET, addr, &in_addr); int err = netlink_add_addr(sock, dev, &in_addr, sizeof(in_addr)); (void)err; } static void netlink_add_addr6(int sock, const char* dev, const char* addr) { struct in6_addr in6_addr; inet_pton(AF_INET6, addr, &in6_addr); int err = netlink_add_addr(sock, dev, &in6_addr, sizeof(in6_addr)); (void)err; } static void netlink_add_neigh(int sock, const char* name, const void* addr, int addrsize, const void* mac, int macsize) { struct ndmsg hdr; memset(&hdr, 0, sizeof(hdr)); hdr.ndm_family = addrsize == 4 ? AF_INET : AF_INET6; hdr.ndm_ifindex = if_nametoindex(name); hdr.ndm_state = NUD_PERMANENT; netlink_init(RTM_NEWNEIGH, NLM_F_EXCL | NLM_F_CREATE, &hdr, sizeof(hdr)); netlink_attr(NDA_DST, addr, addrsize); netlink_attr(NDA_LLADDR, mac, macsize); int err = netlink_send(sock); (void)err; } static int tunfd = -1; static int tun_frags_enabled; #define SYZ_TUN_MAX_PACKET_SIZE 1000 #define TUN_IFACE "syz_tun" #define LOCAL_MAC 0xaaaaaaaaaaaa #define REMOTE_MAC 0xaaaaaaaaaabb #define LOCAL_IPV4 "172.20.20.170" #define REMOTE_IPV4 "172.20.20.187" #define LOCAL_IPV6 "fe80::aa" #define REMOTE_IPV6 "fe80::bb" #define IFF_NAPI 0x0010 #define IFF_NAPI_FRAGS 0x0020 static void initialize_tun(void) { tunfd = open("/dev/net/tun", O_RDWR | O_NONBLOCK); if (tunfd == -1) { printf("tun: can't open /dev/net/tun: please enable CONFIG_TUN=y\n"); printf("otherwise fuzzing or reproducing might not work as intended\n"); return; } const int kTunFd = 240; if (dup2(tunfd, kTunFd) < 0) exit(1); close(tunfd); tunfd = kTunFd; struct ifreq ifr; memset(&ifr, 0, sizeof(ifr)); strncpy(ifr.ifr_name, TUN_IFACE, IFNAMSIZ); ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_NAPI | IFF_NAPI_FRAGS; if (ioctl(tunfd, TUNSETIFF, (void*)&ifr) < 0) { ifr.ifr_flags = IFF_TAP | IFF_NO_PI; if (ioctl(tunfd, TUNSETIFF, (void*)&ifr) < 0) exit(1); } if (ioctl(tunfd, TUNGETIFF, (void*)&ifr) < 0) exit(1); tun_frags_enabled = (ifr.ifr_flags & IFF_NAPI_FRAGS) != 0; char sysctl[64]; sprintf(sysctl, "/proc/sys/net/ipv6/conf/%s/accept_dad", TUN_IFACE); write_file(sysctl, "0"); sprintf(sysctl, "/proc/sys/net/ipv6/conf/%s/router_solicitations", TUN_IFACE); write_file(sysctl, "0"); int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (sock == -1) exit(1); netlink_add_addr4(sock, TUN_IFACE, LOCAL_IPV4); netlink_add_addr6(sock, TUN_IFACE, LOCAL_IPV6); uint64_t macaddr = REMOTE_MAC; struct in_addr in_addr; inet_pton(AF_INET, REMOTE_IPV4, &in_addr); netlink_add_neigh(sock, TUN_IFACE, &in_addr, sizeof(in_addr), &macaddr, ETH_ALEN); struct in6_addr in6_addr; inet_pton(AF_INET6, REMOTE_IPV6, &in6_addr); netlink_add_neigh(sock, TUN_IFACE, &in6_addr, sizeof(in6_addr), &macaddr, ETH_ALEN); macaddr = LOCAL_MAC; netlink_device_change(sock, TUN_IFACE, true, 0, &macaddr, ETH_ALEN); close(sock); } #define DEV_IPV4 "172.20.20.%d" #define DEV_IPV6 "fe80::%02x" #define DEV_MAC 0x00aaaaaaaaaa static void initialize_netdevices(void) { char netdevsim[16]; sprintf(netdevsim, "netdevsim%d", (int)procid); struct { const char* type; const char* dev; } devtypes[] = { {"ip6gretap", "ip6gretap0"}, {"bridge", "bridge0"}, {"vcan", "vcan0"}, {"bond", "bond0"}, {"team", "team0"}, {"dummy", "dummy0"}, {"nlmon", "nlmon0"}, {"caif", "caif0"}, {"batadv", "batadv0"}, {"vxcan", "vxcan1"}, {"netdevsim", netdevsim}, {"veth", 0}, }; const char* devmasters[] = {"bridge", "bond", "team"}; struct { const char* name; int macsize; bool noipv6; } devices[] = { {"lo", ETH_ALEN}, {"sit0", 0}, {"bridge0", ETH_ALEN}, {"vcan0", 0, true}, {"tunl0", 0}, {"gre0", 0}, {"gretap0", ETH_ALEN}, {"ip_vti0", 0}, {"ip6_vti0", 0}, {"ip6tnl0", 0}, {"ip6gre0", 0}, {"ip6gretap0", ETH_ALEN}, {"erspan0", ETH_ALEN}, {"bond0", ETH_ALEN}, {"veth0", ETH_ALEN}, {"veth1", ETH_ALEN}, {"team0", ETH_ALEN}, {"veth0_to_bridge", ETH_ALEN}, {"veth1_to_bridge", ETH_ALEN}, {"veth0_to_bond", ETH_ALEN}, {"veth1_to_bond", ETH_ALEN}, {"veth0_to_team", ETH_ALEN}, {"veth1_to_team", ETH_ALEN}, {"veth0_to_hsr", ETH_ALEN}, {"veth1_to_hsr", ETH_ALEN}, {"hsr0", 0}, {"dummy0", ETH_ALEN}, {"nlmon0", 0}, {"vxcan1", 0, true}, {"caif0", ETH_ALEN}, {"batadv0", ETH_ALEN}, {netdevsim, ETH_ALEN}, }; int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (sock == -1) exit(1); unsigned i; for (i = 0; i < sizeof(devtypes) / sizeof(devtypes[0]); i++) netlink_add_device(sock, devtypes[i].type, devtypes[i].dev); for (i = 0; i < sizeof(devmasters) / (sizeof(devmasters[0])); i++) { char master[32], slave0[32], veth0[32], slave1[32], veth1[32]; sprintf(slave0, "%s_slave_0", devmasters[i]); sprintf(veth0, "veth0_to_%s", devmasters[i]); netlink_add_veth(sock, slave0, veth0); sprintf(slave1, "%s_slave_1", devmasters[i]); sprintf(veth1, "veth1_to_%s", devmasters[i]); netlink_add_veth(sock, slave1, veth1); sprintf(master, "%s0", devmasters[i]); netlink_device_change(sock, slave0, false, master, 0, 0); netlink_device_change(sock, slave1, false, master, 0, 0); } netlink_device_change(sock, "bridge_slave_0", true, 0, 0, 0); netlink_device_change(sock, "bridge_slave_1", true, 0, 0, 0); netlink_add_veth(sock, "hsr_slave_0", "veth0_to_hsr"); netlink_add_veth(sock, "hsr_slave_1", "veth1_to_hsr"); netlink_add_hsr(sock, "hsr0", "hsr_slave_0", "hsr_slave_1"); netlink_device_change(sock, "hsr_slave_0", true, 0, 0, 0); netlink_device_change(sock, "hsr_slave_1", true, 0, 0, 0); for (i = 0; i < sizeof(devices) / (sizeof(devices[0])); i++) { char addr[32]; sprintf(addr, DEV_IPV4, i + 10); netlink_add_addr4(sock, devices[i].name, addr); if (!devices[i].noipv6) { sprintf(addr, DEV_IPV6, i + 10); netlink_add_addr6(sock, devices[i].name, addr); } uint64_t macaddr = DEV_MAC + ((i + 10ull) << 40); netlink_device_change(sock, devices[i].name, true, 0, &macaddr, devices[i].macsize); } close(sock); } static void initialize_netdevices_init(void) { int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (sock == -1) exit(1); struct { const char* type; int macsize; bool noipv6; bool noup; } devtypes[] = { {"nr", 7, true}, {"rose", 5, true, true}, }; unsigned i; for (i = 0; i < sizeof(devtypes) / sizeof(devtypes[0]); i++) { char dev[32], addr[32]; sprintf(dev, "%s%d", devtypes[i].type, (int)procid); sprintf(addr, "172.30.%d.%d", i, (int)procid + 1); netlink_add_addr4(sock, dev, addr); if (!devtypes[i].noipv6) { sprintf(addr, "fe88::%02x:%02x", i, (int)procid + 1); netlink_add_addr6(sock, dev, addr); } int macsize = devtypes[i].macsize; uint64_t macaddr = 0xbbbbbb + ((unsigned long long)i << (8 * (macsize - 2))) + (procid << (8 * (macsize - 1))); netlink_device_change(sock, dev, !devtypes[i].noup, 0, &macaddr, macsize); } close(sock); } static int read_tun(char* data, int size) { if (tunfd < 0) return -1; int rv = read(tunfd, data, size); if (rv < 0) { if (errno == EAGAIN) return -1; if (errno == EBADFD) return -1; exit(1); } return rv; } static void flush_tun() { char data[SYZ_TUN_MAX_PACKET_SIZE]; while (read_tun(&data[0], sizeof(data)) != -1) { } } #define XT_TABLE_SIZE 1536 #define XT_MAX_ENTRIES 10 struct xt_counters { uint64_t pcnt, bcnt; }; struct ipt_getinfo { char name[32]; unsigned int valid_hooks; unsigned int hook_entry[5]; unsigned int underflow[5]; unsigned int num_entries; unsigned int size; }; struct ipt_get_entries { char name[32]; unsigned int size; void* entrytable[XT_TABLE_SIZE / sizeof(void*)]; }; struct ipt_replace { char name[32]; unsigned int valid_hooks; unsigned int num_entries; unsigned int size; unsigned int hook_entry[5]; unsigned int underflow[5]; unsigned int num_counters; struct xt_counters* counters; char entrytable[XT_TABLE_SIZE]; }; struct ipt_table_desc { const char* name; struct ipt_getinfo info; struct ipt_replace replace; }; static struct ipt_table_desc ipv4_tables[] = { {.name = "filter"}, {.name = "nat"}, {.name = "mangle"}, {.name = "raw"}, {.name = "security"}, }; static struct ipt_table_desc ipv6_tables[] = { {.name = "filter"}, {.name = "nat"}, {.name = "mangle"}, {.name = "raw"}, {.name = "security"}, }; #define IPT_BASE_CTL 64 #define IPT_SO_SET_REPLACE (IPT_BASE_CTL) #define IPT_SO_GET_INFO (IPT_BASE_CTL) #define IPT_SO_GET_ENTRIES (IPT_BASE_CTL + 1) struct arpt_getinfo { char name[32]; unsigned int valid_hooks; unsigned int hook_entry[3]; unsigned int underflow[3]; unsigned int num_entries; unsigned int size; }; struct arpt_get_entries { char name[32]; unsigned int size; void* entrytable[XT_TABLE_SIZE / sizeof(void*)]; }; struct arpt_replace { char name[32]; unsigned int valid_hooks; unsigned int num_entries; unsigned int size; unsigned int hook_entry[3]; unsigned int underflow[3]; unsigned int num_counters; struct xt_counters* counters; char entrytable[XT_TABLE_SIZE]; }; struct arpt_table_desc { const char* name; struct arpt_getinfo info; struct arpt_replace replace; }; static struct arpt_table_desc arpt_tables[] = { {.name = "filter"}, }; #define ARPT_BASE_CTL 96 #define ARPT_SO_SET_REPLACE (ARPT_BASE_CTL) #define ARPT_SO_GET_INFO (ARPT_BASE_CTL) #define ARPT_SO_GET_ENTRIES (ARPT_BASE_CTL + 1) static void checkpoint_iptables(struct ipt_table_desc* tables, int num_tables, int family, int level) { struct ipt_get_entries entries; socklen_t optlen; int fd, i; fd = socket(family, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { switch (errno) { case EAFNOSUPPORT: case ENOPROTOOPT: return; } exit(1); } for (i = 0; i < num_tables; i++) { struct ipt_table_desc* table = &tables[i]; strcpy(table->info.name, table->name); strcpy(table->replace.name, table->name); optlen = sizeof(table->info); if (getsockopt(fd, level, IPT_SO_GET_INFO, &table->info, &optlen)) { switch (errno) { case EPERM: case ENOENT: case ENOPROTOOPT: continue; } exit(1); } if (table->info.size > sizeof(table->replace.entrytable)) exit(1); if (table->info.num_entries > XT_MAX_ENTRIES) exit(1); memset(&entries, 0, sizeof(entries)); strcpy(entries.name, table->name); entries.size = table->info.size; optlen = sizeof(entries) - sizeof(entries.entrytable) + table->info.size; if (getsockopt(fd, level, IPT_SO_GET_ENTRIES, &entries, &optlen)) exit(1); table->replace.valid_hooks = table->info.valid_hooks; table->replace.num_entries = table->info.num_entries; table->replace.size = table->info.size; memcpy(table->replace.hook_entry, table->info.hook_entry, sizeof(table->replace.hook_entry)); memcpy(table->replace.underflow, table->info.underflow, sizeof(table->replace.underflow)); memcpy(table->replace.entrytable, entries.entrytable, table->info.size); } close(fd); } static void reset_iptables(struct ipt_table_desc* tables, int num_tables, int family, int level) { struct xt_counters counters[XT_MAX_ENTRIES]; struct ipt_get_entries entries; struct ipt_getinfo info; socklen_t optlen; int fd, i; fd = socket(family, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { switch (errno) { case EAFNOSUPPORT: case ENOPROTOOPT: return; } exit(1); } for (i = 0; i < num_tables; i++) { struct ipt_table_desc* table = &tables[i]; if (table->info.valid_hooks == 0) continue; memset(&info, 0, sizeof(info)); strcpy(info.name, table->name); optlen = sizeof(info); if (getsockopt(fd, level, IPT_SO_GET_INFO, &info, &optlen)) exit(1); if (memcmp(&table->info, &info, sizeof(table->info)) == 0) { memset(&entries, 0, sizeof(entries)); strcpy(entries.name, table->name); entries.size = table->info.size; optlen = sizeof(entries) - sizeof(entries.entrytable) + entries.size; if (getsockopt(fd, level, IPT_SO_GET_ENTRIES, &entries, &optlen)) exit(1); if (memcmp(table->replace.entrytable, entries.entrytable, table->info.size) == 0) continue; } table->replace.num_counters = info.num_entries; table->replace.counters = counters; optlen = sizeof(table->replace) - sizeof(table->replace.entrytable) + table->replace.size; if (setsockopt(fd, level, IPT_SO_SET_REPLACE, &table->replace, optlen)) exit(1); } close(fd); } static void checkpoint_arptables(void) { struct arpt_get_entries entries; socklen_t optlen; unsigned i; int fd; fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { switch (errno) { case EAFNOSUPPORT: case ENOPROTOOPT: return; } exit(1); } for (i = 0; i < sizeof(arpt_tables) / sizeof(arpt_tables[0]); i++) { struct arpt_table_desc* table = &arpt_tables[i]; strcpy(table->info.name, table->name); strcpy(table->replace.name, table->name); optlen = sizeof(table->info); if (getsockopt(fd, SOL_IP, ARPT_SO_GET_INFO, &table->info, &optlen)) { switch (errno) { case EPERM: case ENOENT: case ENOPROTOOPT: continue; } exit(1); } if (table->info.size > sizeof(table->replace.entrytable)) exit(1); if (table->info.num_entries > XT_MAX_ENTRIES) exit(1); memset(&entries, 0, sizeof(entries)); strcpy(entries.name, table->name); entries.size = table->info.size; optlen = sizeof(entries) - sizeof(entries.entrytable) + table->info.size; if (getsockopt(fd, SOL_IP, ARPT_SO_GET_ENTRIES, &entries, &optlen)) exit(1); table->replace.valid_hooks = table->info.valid_hooks; table->replace.num_entries = table->info.num_entries; table->replace.size = table->info.size; memcpy(table->replace.hook_entry, table->info.hook_entry, sizeof(table->replace.hook_entry)); memcpy(table->replace.underflow, table->info.underflow, sizeof(table->replace.underflow)); memcpy(table->replace.entrytable, entries.entrytable, table->info.size); } close(fd); } static void reset_arptables() { struct xt_counters counters[XT_MAX_ENTRIES]; struct arpt_get_entries entries; struct arpt_getinfo info; socklen_t optlen; unsigned i; int fd; fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { switch (errno) { case EAFNOSUPPORT: case ENOPROTOOPT: return; } exit(1); } for (i = 0; i < sizeof(arpt_tables) / sizeof(arpt_tables[0]); i++) { struct arpt_table_desc* table = &arpt_tables[i]; if (table->info.valid_hooks == 0) continue; memset(&info, 0, sizeof(info)); strcpy(info.name, table->name); optlen = sizeof(info); if (getsockopt(fd, SOL_IP, ARPT_SO_GET_INFO, &info, &optlen)) exit(1); if (memcmp(&table->info, &info, sizeof(table->info)) == 0) { memset(&entries, 0, sizeof(entries)); strcpy(entries.name, table->name); entries.size = table->info.size; optlen = sizeof(entries) - sizeof(entries.entrytable) + entries.size; if (getsockopt(fd, SOL_IP, ARPT_SO_GET_ENTRIES, &entries, &optlen)) exit(1); if (memcmp(table->replace.entrytable, entries.entrytable, table->info.size) == 0) continue; } else { } table->replace.num_counters = info.num_entries; table->replace.counters = counters; optlen = sizeof(table->replace) - sizeof(table->replace.entrytable) + table->replace.size; if (setsockopt(fd, SOL_IP, ARPT_SO_SET_REPLACE, &table->replace, optlen)) exit(1); } close(fd); } #define NF_BR_NUMHOOKS 6 #define EBT_TABLE_MAXNAMELEN 32 #define EBT_CHAIN_MAXNAMELEN 32 #define EBT_BASE_CTL 128 #define EBT_SO_SET_ENTRIES (EBT_BASE_CTL) #define EBT_SO_GET_INFO (EBT_BASE_CTL) #define EBT_SO_GET_ENTRIES (EBT_SO_GET_INFO + 1) #define EBT_SO_GET_INIT_INFO (EBT_SO_GET_ENTRIES + 1) #define EBT_SO_GET_INIT_ENTRIES (EBT_SO_GET_INIT_INFO + 1) struct ebt_replace { char name[EBT_TABLE_MAXNAMELEN]; unsigned int valid_hooks; unsigned int nentries; unsigned int entries_size; struct ebt_entries* hook_entry[NF_BR_NUMHOOKS]; unsigned int num_counters; struct ebt_counter* counters; char* entries; }; struct ebt_entries { unsigned int distinguisher; char name[EBT_CHAIN_MAXNAMELEN]; unsigned int counter_offset; int policy; unsigned int nentries; char data[0] __attribute__((aligned(__alignof__(struct ebt_replace)))); }; struct ebt_table_desc { const char* name; struct ebt_replace replace; char entrytable[XT_TABLE_SIZE]; }; static struct ebt_table_desc ebt_tables[] = { {.name = "filter"}, {.name = "nat"}, {.name = "broute"}, }; static void checkpoint_ebtables(void) { socklen_t optlen; unsigned i; int fd; fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { switch (errno) { case EAFNOSUPPORT: case ENOPROTOOPT: return; } exit(1); } for (i = 0; i < sizeof(ebt_tables) / sizeof(ebt_tables[0]); i++) { struct ebt_table_desc* table = &ebt_tables[i]; strcpy(table->replace.name, table->name); optlen = sizeof(table->replace); if (getsockopt(fd, SOL_IP, EBT_SO_GET_INIT_INFO, &table->replace, &optlen)) { switch (errno) { case EPERM: case ENOENT: case ENOPROTOOPT: continue; } exit(1); } if (table->replace.entries_size > sizeof(table->entrytable)) exit(1); table->replace.num_counters = 0; table->replace.entries = table->entrytable; optlen = sizeof(table->replace) + table->replace.entries_size; if (getsockopt(fd, SOL_IP, EBT_SO_GET_INIT_ENTRIES, &table->replace, &optlen)) exit(1); } close(fd); } static void reset_ebtables() { struct ebt_replace replace; char entrytable[XT_TABLE_SIZE]; socklen_t optlen; unsigned i, j, h; int fd; fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { switch (errno) { case EAFNOSUPPORT: case ENOPROTOOPT: return; } exit(1); } for (i = 0; i < sizeof(ebt_tables) / sizeof(ebt_tables[0]); i++) { struct ebt_table_desc* table = &ebt_tables[i]; if (table->replace.valid_hooks == 0) continue; memset(&replace, 0, sizeof(replace)); strcpy(replace.name, table->name); optlen = sizeof(replace); if (getsockopt(fd, SOL_IP, EBT_SO_GET_INFO, &replace, &optlen)) exit(1); replace.num_counters = 0; table->replace.entries = 0; for (h = 0; h < NF_BR_NUMHOOKS; h++) table->replace.hook_entry[h] = 0; if (memcmp(&table->replace, &replace, sizeof(table->replace)) == 0) { memset(&entrytable, 0, sizeof(entrytable)); replace.entries = entrytable; optlen = sizeof(replace) + replace.entries_size; if (getsockopt(fd, SOL_IP, EBT_SO_GET_ENTRIES, &replace, &optlen)) exit(1); if (memcmp(table->entrytable, entrytable, replace.entries_size) == 0) continue; } for (j = 0, h = 0; h < NF_BR_NUMHOOKS; h++) { if (table->replace.valid_hooks & (1 << h)) { table->replace.hook_entry[h] = (struct ebt_entries*)table->entrytable + j; j++; } } table->replace.entries = table->entrytable; optlen = sizeof(table->replace) + table->replace.entries_size; if (setsockopt(fd, SOL_IP, EBT_SO_SET_ENTRIES, &table->replace, optlen)) exit(1); } close(fd); } static void checkpoint_net_namespace(void) { checkpoint_ebtables(); checkpoint_arptables(); checkpoint_iptables(ipv4_tables, sizeof(ipv4_tables) / sizeof(ipv4_tables[0]), AF_INET, SOL_IP); checkpoint_iptables(ipv6_tables, sizeof(ipv6_tables) / sizeof(ipv6_tables[0]), AF_INET6, SOL_IPV6); } static void reset_net_namespace(void) { reset_ebtables(); reset_arptables(); reset_iptables(ipv4_tables, sizeof(ipv4_tables) / sizeof(ipv4_tables[0]), AF_INET, SOL_IP); reset_iptables(ipv6_tables, sizeof(ipv6_tables) / sizeof(ipv6_tables[0]), AF_INET6, SOL_IPV6); } static void setup_cgroups() { if (mkdir("/syzcgroup", 0777)) { } if (mkdir("/syzcgroup/unified", 0777)) { } if (mount("none", "/syzcgroup/unified", "cgroup2", 0, NULL)) { } if (chmod("/syzcgroup/unified", 0777)) { } write_file("/syzcgroup/unified/cgroup.subtree_control", "+cpu +memory +io +pids +rdma"); if (mkdir("/syzcgroup/cpu", 0777)) { } if (mount("none", "/syzcgroup/cpu", "cgroup", 0, "cpuset,cpuacct,perf_event,hugetlb")) { } write_file("/syzcgroup/cpu/cgroup.clone_children", "1"); if (chmod("/syzcgroup/cpu", 0777)) { } if (mkdir("/syzcgroup/net", 0777)) { } if (mount("none", "/syzcgroup/net", "cgroup", 0, "net_cls,net_prio,devices,freezer")) { } if (chmod("/syzcgroup/net", 0777)) { } } static void setup_cgroups_loop() { int pid = getpid(); char file[128]; char cgroupdir[64]; snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/unified/syz%llu", procid); if (mkdir(cgroupdir, 0777)) { } snprintf(file, sizeof(file), "%s/pids.max", cgroupdir); write_file(file, "32"); snprintf(file, sizeof(file), "%s/memory.low", cgroupdir); write_file(file, "%d", 298 << 20); snprintf(file, sizeof(file), "%s/memory.high", cgroupdir); write_file(file, "%d", 299 << 20); snprintf(file, sizeof(file), "%s/memory.max", cgroupdir); write_file(file, "%d", 300 << 20); snprintf(file, sizeof(file), "%s/cgroup.procs", cgroupdir); write_file(file, "%d", pid); snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/cpu/syz%llu", procid); if (mkdir(cgroupdir, 0777)) { } snprintf(file, sizeof(file), "%s/cgroup.procs", cgroupdir); write_file(file, "%d", pid); snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/net/syz%llu", procid); if (mkdir(cgroupdir, 0777)) { } snprintf(file, sizeof(file), "%s/cgroup.procs", cgroupdir); write_file(file, "%d", pid); } static void setup_cgroups_test() { char cgroupdir[64]; snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/unified/syz%llu", procid); if (symlink(cgroupdir, "./cgroup")) { } snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/cpu/syz%llu", procid); if (symlink(cgroupdir, "./cgroup.cpu")) { } snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/net/syz%llu", procid); if (symlink(cgroupdir, "./cgroup.net")) { } } static void setup_common() { if (mount(0, "/sys/fs/fuse/connections", "fusectl", 0, 0)) { } setup_cgroups(); } static void loop(); static void sandbox_common() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); setsid(); struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = (200 << 20); setrlimit(RLIMIT_AS, &rlim); rlim.rlim_cur = rlim.rlim_max = 32 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 136 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 0; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); if (unshare(CLONE_NEWNS)) { } if (unshare(CLONE_NEWIPC)) { } if (unshare(0x02000000)) { } if (unshare(CLONE_NEWUTS)) { } if (unshare(CLONE_SYSVSEM)) { } typedef struct { const char* name; const char* value; } sysctl_t; static const sysctl_t sysctls[] = { {"/proc/sys/kernel/shmmax", "16777216"}, {"/proc/sys/kernel/shmall", "536870912"}, {"/proc/sys/kernel/shmmni", "1024"}, {"/proc/sys/kernel/msgmax", "8192"}, {"/proc/sys/kernel/msgmni", "1024"}, {"/proc/sys/kernel/msgmnb", "1024"}, {"/proc/sys/kernel/sem", "1024 1048576 500 1024"}, }; unsigned i; for (i = 0; i < sizeof(sysctls) / sizeof(sysctls[0]); i++) write_file(sysctls[i].name, sysctls[i].value); } int wait_for_loop(int pid) { if (pid < 0) exit(1); int status = 0; while (waitpid(-1, &status, __WALL) != pid) { } return WEXITSTATUS(status); } static int do_sandbox_none(void) { if (unshare(CLONE_NEWPID)) { } int pid = fork(); if (pid != 0) return wait_for_loop(pid); setup_common(); sandbox_common(); initialize_netdevices_init(); if (unshare(CLONE_NEWNET)) { } initialize_tun(); initialize_netdevices(); loop(); exit(1); } #define FS_IOC_SETFLAGS _IOW('f', 2, long) static void remove_dir(const char* dir) { DIR* dp; struct dirent* ep; int iter = 0; retry: while (umount2(dir, MNT_DETACH) == 0) { } dp = opendir(dir); if (dp == NULL) { if (errno == EMFILE) { exit(1); } exit(1); } while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); while (umount2(filename, MNT_DETACH) == 0) { } struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } int i; for (i = 0;; i++) { if (unlink(filename) == 0) break; if (errno == EPERM) { int fd = open(filename, O_RDONLY); if (fd != -1) { long flags = 0; if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) close(fd); continue; } } if (errno == EROFS) { break; } if (errno != EBUSY || i > 100) exit(1); if (umount2(filename, MNT_DETACH)) exit(1); } } closedir(dp); int i; for (i = 0;; i++) { if (rmdir(dir) == 0) break; if (i < 100) { if (errno == EPERM) { int fd = open(dir, O_RDONLY); if (fd != -1) { long flags = 0; if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) close(fd); continue; } } if (errno == EROFS) { break; } if (errno == EBUSY) { if (umount2(dir, MNT_DETACH)) exit(1); continue; } if (errno == ENOTEMPTY) { if (iter < 100) { iter++; goto retry; } } } exit(1); } } static void kill_and_wait(int pid, int* status) { kill(-pid, SIGKILL); kill(pid, SIGKILL); int i; for (i = 0; i < 100; i++) { if (waitpid(-1, status, WNOHANG | __WALL) == pid) return; usleep(1000); } DIR* dir = opendir("/sys/fs/fuse/connections"); if (dir) { for (;;) { struct dirent* ent = readdir(dir); if (!ent) break; if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) continue; char abort[300]; snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort", ent->d_name); int fd = open(abort, O_WRONLY); if (fd == -1) { continue; } if (write(fd, abort, 1) < 0) { } close(fd); } closedir(dir); } else { } while (waitpid(-1, status, __WALL) != pid) { } } static void setup_loop() { setup_cgroups_loop(); checkpoint_net_namespace(); } static void reset_loop() { reset_net_namespace(); } static void setup_test() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); setup_cgroups_test(); write_file("/proc/self/oom_score_adj", "1000"); flush_tun(); } static void close_fds() { int fd; for (fd = 3; fd < 30; fd++) close(fd); } static void setup_binfmt_misc() { if (mount(0, "/proc/sys/fs/binfmt_misc", "binfmt_misc", 0, 0)) { } write_file("/proc/sys/fs/binfmt_misc/register", ":syz0:M:0:\x01::./file0:"); write_file("/proc/sys/fs/binfmt_misc/register", ":syz1:M:1:\x02::./file0:POC"); } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { setup_loop(); int iter; for (iter = 0;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); reset_loop(); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); setup_test(); execute_one(); close_fds(); exit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; sleep_ms(1); if (current_time_ms() - start < 5 * 1000) continue; kill_and_wait(pid, &status); break; } remove_dir(cwdbuf); } } #ifndef __NR_bpf #define __NR_bpf 321 #endif uint64_t r[1] = {0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; NONFAILING(*(uint32_t*)0x20000280 = 0xf); NONFAILING(*(uint32_t*)0x20000284 = 4); NONFAILING(*(uint32_t*)0x20000288 = 4); NONFAILING(*(uint32_t*)0x2000028c = 0x400); NONFAILING(*(uint32_t*)0x20000290 = 0); NONFAILING(*(uint32_t*)0x20000294 = 1); NONFAILING(*(uint32_t*)0x20000298 = 0); NONFAILING(*(uint8_t*)0x2000029c = 0); NONFAILING(*(uint8_t*)0x2000029d = 0); NONFAILING(*(uint8_t*)0x2000029e = 0); NONFAILING(*(uint8_t*)0x2000029f = 0); NONFAILING(*(uint8_t*)0x200002a0 = 0); NONFAILING(*(uint8_t*)0x200002a1 = 0); NONFAILING(*(uint8_t*)0x200002a2 = 0); NONFAILING(*(uint8_t*)0x200002a3 = 0); NONFAILING(*(uint8_t*)0x200002a4 = 0); NONFAILING(*(uint8_t*)0x200002a5 = 0); NONFAILING(*(uint8_t*)0x200002a6 = 0); NONFAILING(*(uint8_t*)0x200002a7 = 0); NONFAILING(*(uint8_t*)0x200002a8 = 0); NONFAILING(*(uint8_t*)0x200002a9 = 0); NONFAILING(*(uint8_t*)0x200002aa = 0); NONFAILING(*(uint8_t*)0x200002ab = 0); NONFAILING(*(uint32_t*)0x200002ac = 0); NONFAILING(*(uint32_t*)0x200002b0 = -1); NONFAILING(*(uint32_t*)0x200002b4 = 0); NONFAILING(*(uint32_t*)0x200002b8 = 0); syscall(__NR_bpf, 0, 0x20000280, 0x3c); syscall(__NR_socket, 0x21, 2, 0x800000000a); res = syscall(__NR_socket, 0xa, 1, 0); if (res != -1) r[0] = res; NONFAILING(*(uint32_t*)0x200000c0 = 1); syscall(__NR_setsockopt, r[0], 6, 0x13, 0x200000c0, 0x1d4); NONFAILING(*(uint16_t*)0x20000140 = 0xa); NONFAILING(*(uint16_t*)0x20000142 = htobe16(0)); NONFAILING(*(uint32_t*)0x20000144 = htobe32(0)); NONFAILING(memcpy( (void*)0x20000148, "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16)); NONFAILING(*(uint32_t*)0x20000158 = 0); syscall(__NR_connect, r[0], 0x20000140, 0x1c); NONFAILING(*(uint32_t*)0x20000000 = 5); NONFAILING(*(uint32_t*)0x20000004 = 0); NONFAILING(*(uint32_t*)0x20000008 = 0); NONFAILING(*(uint32_t*)0x2000000c = 0); NONFAILING(*(uint32_t*)0x20000010 = 0); NONFAILING(*(uint32_t*)0x20000014 = -1); NONFAILING(*(uint32_t*)0x20000018 = 0); NONFAILING(*(uint8_t*)0x2000001c = 0); NONFAILING(*(uint8_t*)0x2000001d = 0); NONFAILING(*(uint8_t*)0x2000001e = 0); NONFAILING(*(uint8_t*)0x2000001f = 0); NONFAILING(*(uint8_t*)0x20000020 = 0); NONFAILING(*(uint8_t*)0x20000021 = 0); NONFAILING(*(uint8_t*)0x20000022 = 0); NONFAILING(*(uint8_t*)0x20000023 = 0); NONFAILING(*(uint8_t*)0x20000024 = 0); NONFAILING(*(uint8_t*)0x20000025 = 0); NONFAILING(*(uint8_t*)0x20000026 = 0); NONFAILING(*(uint8_t*)0x20000027 = 0); NONFAILING(*(uint8_t*)0x20000028 = 0); NONFAILING(*(uint8_t*)0x20000029 = 0); NONFAILING(*(uint8_t*)0x2000002a = 0); NONFAILING(*(uint8_t*)0x2000002b = 0); NONFAILING(*(uint32_t*)0x2000002c = 0); NONFAILING(*(uint32_t*)0x20000030 = -1); NONFAILING(*(uint32_t*)0x20000034 = 0); NONFAILING(*(uint32_t*)0x20000038 = 0); syscall(__NR_bpf, 0, 0x20000000, 0xfffffffffffffdcb); NONFAILING(*(uint32_t*)0x20003000 = 3); NONFAILING(*(uint32_t*)0x20003004 = 0); NONFAILING(*(uint32_t*)0x20003008 = 0x77fffb); NONFAILING(*(uint32_t*)0x2000300c = 0); NONFAILING(*(uint32_t*)0x20003010 = 0x20000000); NONFAILING(*(uint32_t*)0x20003014 = 0); NONFAILING(*(uint32_t*)0x20003018 = 0); NONFAILING(*(uint8_t*)0x2000301c = 0); NONFAILING(*(uint8_t*)0x2000301d = 0); NONFAILING(*(uint8_t*)0x2000301e = 0); NONFAILING(*(uint8_t*)0x2000301f = 0); NONFAILING(*(uint8_t*)0x20003020 = 0); NONFAILING(*(uint8_t*)0x20003021 = 0); NONFAILING(*(uint8_t*)0x20003022 = 0); NONFAILING(*(uint8_t*)0x20003023 = 0); NONFAILING(*(uint8_t*)0x20003024 = 0); NONFAILING(*(uint8_t*)0x20003025 = 0); NONFAILING(*(uint8_t*)0x20003026 = 0); NONFAILING(*(uint8_t*)0x20003027 = 0); NONFAILING(*(uint8_t*)0x20003028 = 0); NONFAILING(*(uint8_t*)0x20003029 = 0); NONFAILING(*(uint8_t*)0x2000302a = 0); NONFAILING(*(uint8_t*)0x2000302b = 0); NONFAILING(*(uint32_t*)0x2000302c = 0); NONFAILING(*(uint32_t*)0x20003030 = -1); NONFAILING(*(uint32_t*)0x20003034 = 0); NONFAILING(*(uint32_t*)0x20003038 = 0); syscall(__NR_bpf, 2, 0x20003000, 0x2c); } int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); setup_binfmt_misc(); install_segv_handler(); for (procid = 0; procid < 6; procid++) { if (fork() == 0) { use_temporary_dir(); do_sandbox_none(); } } sleep(1000000); return 0; }
the_stack_data/151705866.c
#include<stdio.h> #include<string.h> void combination(char a[],int s,int e); int main() { char a[]="abc"; int n=strlen(a); combination(a,0,n); } void combination(char a[],int s,int e) { for(int i=s;i<e-1;i++) { for(int j=i+1;j<e;j++) { int temp=a[i]; a[i]=a[j]; a[j]=temp; combination(a,s+1,e); temp=a[i]; a[i]=a[j]; a[j]=temp; } } printf("\n%s,",a); }
the_stack_data/86073929.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_putstr_fd.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: smarcais <[email protected]> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/11/24 10:13:03 by smarcais #+# #+# */ /* Updated: 2019/11/24 10:13:09 by smarcais ### ########.fr */ /* */ /* ************************************************************************** */ #include <unistd.h> void ft_putstr_fd(char const *src, int fd) { char c; if (src) { while ((c = *src++) != '\0') write(fd, &c, 1); } }
the_stack_data/22013123.c
/* * * Lisa He * CS 402 - SP Lab 2 * 4/13/2022 * */ #include <stdio.h> #include <string.h> #include <ctype.h> // constants #define MAXNAME 64 #define DBMAX 1024 // employee struct typedef struct { int id; // C-style strings (array of chars) char first[MAXNAME]; char last[MAXNAME]; int salary; } employee; // declare array of employees employee company[DBMAX]; // keep track of line in file int line_number = 0; // adds employee in order to company[] void add_inorder(int *id, const char *first, const char *last, int *salary) { int i; if (line_number < DBMAX) { // iterate for (i = line_number - 1; i >= 0; i--) { // check company.id vs dereferenced id ptr if (company[i].id > *id) { company[i + 1] = company[i]; } else { company[i + 1].id = *id; // copy strings to company[i+1] strcpy(company[i + 1].first, first); strcpy(company[i + 1].last, last); company[i + 1].salary = *salary; break; } } if (i == -1) { company[0].id = *id; strcpy(company[0].first, first); strcpy(company[0].last, last); company[0].salary = *salary; } line_number++; } else { printf("Too many records"); } } // displays menu int menu() { printf("Employee DB Menu:\n"); printf("----------------------------------\n"); printf(" (1) Print the Database\n"); printf(" (2) Lookup by ID\n"); printf(" (3) Lookup by Last Name\n"); printf(" (4) Add an Employee\n"); printf(" (5) Quit\n"); printf(" (6) Remove Employee\n"); printf(" (7) Update Employee\n"); printf(" (8) Print Employees with the Highest Salary\n"); printf(" (9) Find Employees with the Same Last Name\n"); printf("----------------------------------\n"); int option; while (1) { printf("Enter your choice: "); // &option: get the address of option scanf("%d", &option); if (option < 1 || option > 9) { // print the value option printf("Hey, %d is not between 1 and 9, try again...\n", option); } else { // break from loop if valid break; } } printf("\n"); return option; } // Option 1 method: print database void print_db() { int i; printf("FIRST NAME LAST NAME SALARY ID\n"); printf("---------------------------------------------------------------\n"); for (i = 0; i < line_number; i++) { printf("%-14s", company[i].first); printf("%-20s", company[i].last); printf("%7d", company[i].salary); printf("%17d\n", company[i].id); } printf("---------------------------------------------------------------\n"); printf("Number of Employees (%d)\n", line_number); } // Option 2 method: lookup by ID, returns index of employee int lookup_id(int id) { int i; int size = line_number; int found = 0; for (i = 0; i < size; i++) { if (company[i].id == id) { printf("FIRST NAME LAST NAME SALARY ID\n"); printf("---------------------------------------------------------------\n"); printf("%-14s", company[i].first); printf("%-20s", company[i].last); printf("%7d", company[i].salary); printf("%17d\n", company[i].id); printf("---------------------------------------------------------------\n"); found = 1; return i; } } if (found == 0) { printf("Employee with ID %d not found in DB\n", id); return -1; } } // Option 3 method: lookup by last name void lookup_last(const char *last) { int i; int size = line_number; int found = 0; // printf("working:%s",last); for (i = 0; i < size; i++) { // strcmp = compareTo, strcasecmp = compareToIgnoreCase if (strcasecmp(last, company[i].last) == 0) { printf("FIRST NAME LAST NAME SALARY ID\n"); printf("---------------------------------------------------------------\n"); printf("%-14s", company[i].first); printf("%-20s", company[i].last); printf("%7d", company[i].salary); printf("%17d\n", company[i].id); printf("---------------------------------------------------------------\n"); found = 1; break; } } if (found == 0) { printf("Employee with last name %s not found in DB\n", last); } } // Option 4 method: add new employee void add_emp(const char *first, const char *last, int *salary) { int i; int tempID = 0; // copy the largest ID to tempID for (i = 0; i < line_number; i++) { if (company[i].id > tempID) { tempID = company[i].id; } } tempID++; // add to company[] if (line_number < DBMAX) { company[line_number].id = tempID; strcpy(company[line_number].first, first); strcpy(company[line_number].last, last); company[line_number].salary = *salary; line_number++; } printf("New employee added.\n"); } // Option 6: remove an employee void remove_emp(int emp){ if (emp >= 0){ int i; for (i = emp; i < line_number; i++){ company[i] = company[i+1]; } line_number--; } else{ printf("Employee not found\n"); } } // Option 7 in main // Option 8: print highest salaries void top_salaries(int m){ // test for valid M if (m <= 0 || m > line_number){ printf("Can only display between 1 and %d employees.\n", line_number); return; } employee temp_company[DBMAX]; int i, j; employee temp; // copy company info to a temp array for (i = 0; i < line_number; i++){ temp_company[i] = company[i]; } // sort temp_company by salary - descending for (i = 0; i < line_number-1; i++){ for (j = 0; j < line_number - i - 1; j++){ if (temp_company[j].salary < temp_company[j+1].salary){ temp = temp_company[j]; temp_company[j] = temp_company[j+1]; temp_company[j+1] = temp; } } } // display printf("FIRST NAME LAST NAME SALARY ID\n"); printf("---------------------------------------------------------------\n"); for (i = 0; m > 0; i++){ printf("%-14s", temp_company[i].first); printf("%-20s", temp_company[i].last); printf("%7d", temp_company[i].salary); printf("%17d\n", temp_company[i].id); m--; } printf("---------------------------------------------------------------\n"); // print sorted temp_company // printf("FIRST NAME LAST NAME SALARY ID\n"); // printf("---------------------------------------------------------------\n"); // for (i = 0; i < line_number; i++) { // printf("%-14s", temp_company[i].first); // printf("%-20s", temp_company[i].last); // printf("%7d", temp_company[i].salary); // printf("%17d\n", temp_company[i].id); // } // printf("---------------------------------------------------------------\n"); // printf("Number of Employees (%d)\n", line_number); } // Option 9: look up employees with matching last names void lookup_matches(const char *last){ int i; int count; printf("FIRST NAME LAST NAME SALARY ID\n"); printf("---------------------------------------------------------------\n"); for (i = 0; i < line_number; i++){ // strcmp = compareTo, strcasecmp = compareToIgnoreCase if (strcasecmp(last, company[i].last) == 0) { printf("%-14s", company[i].first); printf("%-20s", company[i].last); printf("%7d", company[i].salary); printf("%17d\n", company[i].id); count++; } } printf("---------------------------------------------------------------\n"); if (count == 0) { printf("No employees with the last name %s found in DB\n", last); } } // main int main(int argc, char *argv[]) { FILE *filename = NULL; char *file; // if arguments from command line != 2 // the command can't be correct // argv[0] should be the executable // argv[1] should be the file name if (argc < 2) { printf("Missing file name\n"); return (1); } else if (argc != 2) { printf("Too many arguments\n"); return (1); } else { file = argv[1]; printf("File name: %s\n", file); } // Open file in read-only mode filename = fopen(file, "r"); int id, salary; char first[MAXNAME], last[MAXNAME]; // If file opened successfully, then print the contents int ret; if (filename) { printf("File contents:\n"); while (1) { fscanf(filename, "%d", &id); fscanf(filename, "%s", &first); fscanf(filename, "%s", &last); ret = fscanf(filename, "%d", &salary); if (ret == EOF) { break; } add_inorder(&id, first, last, &salary); printf("%d, %s, %s, %d \n", id, first, last, salary); } } else { printf("Failed to open file\n"); } if (filename != NULL) { fclose(filename); } // print_db(); int option = menu(); int confirm; while (option != 5) { switch (option) { case 1: print_db(); option = menu(); break; case 2: printf("Enter a 6 digit employee ID: "); scanf("%d", &id); printf("\n"); lookup_id(id); printf("\n"); option = menu(); // reset option break; case 3: printf("Enter Employee's last name: "); scanf("%s", last); printf("\n"); lookup_last(last); printf("\n"); option = menu(); break; case 4: printf("All characters are valid just in case you are Elon Musk.\n"); printf("Enter the employee's first name: \n"); scanf("%s", first); printf("Enter the employee's last name: \n"); scanf("%s", last); int valid = 0; while (!valid) { printf("Enter the employee's salary (between 30000 - 150000): \n"); scanf("%d", &salary); if (salary < 30000 || salary > 150000) { printf("Entered salary: %d\n", salary); printf(" Salary should be between 30000 and 150000...\n"); } else { break; } } printf("Do you want to add the following employee to the DB?\n"); printf(" >%s %s Salary: %d\n", first, last, salary); printf("(1) Yes (0) No\n"); scanf("%d", &confirm); if (confirm == 1) { add_emp(first, last, &salary); option = menu(); } else option = menu(); break; case 6: printf("Enter the 6 digit ID of the employee to remove: "); scanf("%d", &id); int emp = lookup_id(id); printf("Remove this employee from the DB?\n"); printf("(1) Yes (0) No\n"); scanf("%d", &confirm); // remove and update DB if yes, otherwise do nothing if (confirm == 1) { remove_emp(emp); } printf("\n"); option = menu(); break; case 7: printf("Enter the 6 digit ID of the employee to update: "); scanf("%d", &id); int empIndex = lookup_id(id); if (empIndex >= 0){ printf("Change this employee's first name?\n(1) Yes (0) No\n"); scanf("%d", &confirm); if (confirm == 1) { printf("Enter the new first name: \n"); scanf("%s", first); } else{ strcpy(first, company[empIndex].first); } printf("Change this employee's last name?\n(1) Yes (0) No\n"); scanf("%d", &confirm); if (confirm == 1) { printf("Enter the new last name: \n"); scanf("%s", last); } else{ strcpy(last, company[empIndex].last); } printf("Change this employee's salary?\n(1) Yes (0) No\n"); scanf("%d", &confirm); if (confirm == 1) { int valid = 0; while (!valid) { printf("Enter the employee's new salary (between 30000 - 150000): \n"); scanf("%d", &salary); if (salary < 30000 || salary > 150000) { printf("Entered salary: %d\n", salary); printf(" Salary should be between 30000 and 150000...\n"); } else { break; } } // printf("%d\n",company[empIndex].salary); // old // printf("%d\n",salary); // new } else{ salary = company[empIndex].salary; // printf("%d\n",company[empIndex].salary); // old // printf("%d\n",salary); // new } printf("Change this employee's ID?\n(1) Yes (0) No\n"); scanf("%d", &confirm); if (confirm == 1) { int valid = 0; while (!valid) { printf("Enter the employee's new ID (between 100000 - 999999): \n"); scanf("%d", &id); if (id < 100000 || id > 999999) { printf("Entered ID: %d\n", id); printf(" ID should be between 100000 and 999999...\n"); } else { break; } } } else{ id = company[empIndex].id; } remove_emp(empIndex); add_inorder(&id, first, last, &salary); printf("%d, %s, %s, %d \n", id, first, last, salary); } option = menu(); break; case 8: int m; printf("Enter the number of employees with the highest salary to display: "); scanf("%d", &m); top_salaries(m); option = menu(); break; case 9: printf("Enter the last name to find: "); scanf("%s", last); lookup_matches(last); option = menu(); break; } } printf("goodbye!"); return 0; }
the_stack_data/101948.c
/*In an operating system that uses paging for memory management, a page replacement algorithm is needed to decide which page needs to be replaced when new page comes in. Page Fault – A page fault happens when a running program accesses a memory page that is mapped into the virtual address space, but not loaded in physical memory. Since actual physical memory is much smaller than virtual memory, page faults happen. In case of page fault, Operating System might have to replace one of the existing pages with the newly needed page. In this algorithm, pages are replaced which would not be used for the longest duration of time in the future. */ #include<stdio.h> #include<string.h> #include<stdlib.h> int main(int argc, char *argv[]) { FILE *f1,*f2,*f3,*f4,*f5; int len,i,pos=1; char arg[20],mne[20],opnd[20],la[20],name[20],mne1[20],opnd1[20],pos1[10],pos2[10]; f1=fopen(argv[1],"r"); f2=fopen(argv[2],"w+"); f3=fopen(argv[3],"w+"); f4=fopen(argv[4],"w+"); f5=fopen(argv[5],"w+"); fscanf(f1,"%s%s%s",la,mne,opnd); while(strcmp(mne,"END")!=0) { if(strcmp(mne,"MACRO")==0) { fprintf(f2,"%s\n",la); fseek(f2,SEEK_SET,0); fprintf(f3,"%s\t%s\n",la,opnd); fscanf(f1,"%s%s%s",la,mne,opnd); while(strcmp(mne,"MEND")!=0) { if(opnd[0]=='&') { snprintf(pos1,20,"%d",pos); strcpy(pos2,"?"); strcpy(opnd,strcat(pos2,pos1)); pos=pos+1; } fprintf(f3,"%s\t%s\n",mne,opnd); fscanf(f1,"%s%s%s",la,mne,opnd); } fprintf(f3,"%s",mne); } else { fscanf(f2,"%s",name); if(strcmp(mne,name)==0) { len=strlen(opnd); for(i=0;i<len;i++) { if(opnd[i]!=',') fprintf(f4,"%c",opnd[i]); else fprintf(f4,"\n"); } fseek(f3,SEEK_SET,0); fseek(f4,SEEK_SET,0); fscanf(f3,"%s%s",mne1,opnd1); fprintf(f5,".\t%s\t%s\n",mne1,opnd); fscanf(f3,"%s%s",mne1,opnd1); while(strcmp(mne1,"MEND")!=0) { if((opnd[0]=='?')) { fscanf(f4,"%s",arg); fprintf(f5,"-\t%s\t%s\n",mne1,arg); } else fprintf(f5,"-\t%s\t%s\n",mne1,opnd1); fscanf(f3,"%s%s",mne1,opnd1); } } else fprintf(f5,"%s\t%s\t%s\n",la,mne,opnd); } fscanf(f1,"%s%s%s",la,mne,opnd); } fprintf(f5,"%s\t%s\t%s",la,mne,opnd); fclose(f1); fclose(f2); fclose(f3); fclose(f4); fclose(f5); printf("files to be viewed \n"); printf("1. namtab.txt\n"); printf("2. deftab.txt\n"); printf("3. argtab.txt\n"); printf("4. op.txt\n"); }
the_stack_data/629905.c
// Code to drive the 32x32 LED arrays available from SKPANG // http://skpang.co.uk/catalog/rgb-led-panel-32x32-p-1329.html // Based on code from https://github.com/hzeller/rpi-rgb-led-matrix // Which contains the following copyright notice: // Code is (c) Henner Zeller [email protected], and I grant you the // permission to do whatever you want with it :) // This code is (c) Peter Onion ([email protected]), and I too grant you the // permission to do whatever you want with it, as long as this header block // is retained in any code you may distribute that uses or is based on this code. // Life Simulator game is (c) of Ferran Fabregas ([email protected]) // gcc -o PanelLifeProject PanelLifeProject.c -lm -lpthread #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> #include <pthread.h> #include <time.h> #include <stdbool.h> #include <stdint.h> #include <sys/mman.h> #include <termios.h> #include <unistd.h> #include <signal.h> #include <math.h> #include <time.h> // Names for the GPIO pin numbers enum bitNames {OE=2,CLK=3,STB=4,ROWA=7,ROWB=8,ROWC=9,ROWD=10, R1=17,G1=18,B1=22, R2=23,G2=24,B2=25}; // Array of GPIO bit numbers to be set for output. int outputBits[] = {OE,CLK,STB,ROWA,ROWB,ROWC,ROWD, R1,G1,B1, R2,G2,B2,-1}; // GPIO hardware memory addresses #define BCM2708_PERI_BASE 0x20000000 #define GPIO_BASE (BCM2708_PERI_BASE + 0x200000) /* GPIO controller */ #define BLOCK_SIZE (4*1024) // GPIO setup macros. Always use INP_GPIO(x) before using OUT_GPIO(x) or SET_GPIO_ALT(x,y) #define INP_GPIO(g) *(gpio_port+((g)/10)) &= ~(7<<(((g)%10)*3)) #define OUT_GPIO(g) *(gpio_port+((g)/10)) |= (1<<(((g)%10)*3)) volatile uint32_t *gpio_port; uint32_t portMask; // Bit set for each used GPIO bits uint32_t pixelMask = (1<<R1|1<<R2|1<<G1|1<<G2|1<<B1|1<<B2); uint32_t pixelClkMask = (1<<R1|1<<R2|1<<G1|1<<G2|1<<B1|1<<B2|1<<CLK); int greyCode[16] = {0,1,3,2,6,7,5,4,12,13,15,14,10,11,9,8}; int greyCodeChange[16]; bool greyCodeSet[16]; // Global thread control variables bool displayRunning; bool gameRunning; bool gameStop; #define PLANTS_LIFE_EXPECTANCY 255 #define PLANTS_RANDOM_BORN_CHANCES 1000 // high is less chances #define PLANTS_RANDOM_NEARBORN_CHANCES 100 #define PLANTS_RANDOM_DIE_CHANCES 2 #define PLANTS_ENERGY_BASE_PER_CYCLE 10 #define SPECIE1_LIFE_EXPECTANCY 200 #define SPECIE1_RANDOM_BORN_CHANCES 10000 #define SPECIE1_RANDOM_NEARBORN_CHANCES 100 #define SPECIE1_RANDOM_DIE_CHANCES 2 #define SPECIE1_ENERGY_BASE 10 #define SPECIE1_ENERGY_NEEDED_PER_CYCLE 2 #define SPECIE1_MAX_ENERGY_RECOLECTED_PER_CYCLE 10 #define SPECIE1_ENERGY_TO_REPLICATE 15 #define SPECIE2_LIFE_EXPECTANCY 180 #define SPECIE2_RANDOM_BORN_CHANCES 10000 #define SPECIE2_RANDOM_NEARBORN_CHANCES 100 #define SPECIE2_RANDOM_DIE_CHANCES 2 #define SPECIE2_ENERGY_BASE 10 #define SPECIE2_ENERGY_NEEDED_PER_CYCLE 2 #define SPECIE2_MAX_ENERGY_RECOLECTED_PER_CYCLE 20 #define SPECIE2_ENERGY_TO_REPLICATE 11 // In an attempt to reduce ghosting between lines I use a grey code // order for the scanning. void buildGreyCode(void) { int row,prevRow,diff; for(row=0;row < 16; row++) { prevRow = (row - 1) & 15; diff = greyCode[row] ^ greyCode[prevRow]; greyCodeChange[row] = diff; greyCodeSet[row] = (diff & greyCode[row]) ? true : false; } // for(row = 0;row < 16; row++) // printf("%d %x %d\n",row,greyCodeChange[row],greyCodeSet[row]); } // Set the bits that are '1' in the output. Leave the rest untouched. inline void SetBits(uint32_t value) { gpio_port[0x1C / sizeof(uint32_t)] = value & portMask; } // Clear the bits that are '1' in the output. Leave the rest untouched. inline void ClearBits(uint32_t value) { gpio_port[0x28 / sizeof(uint32_t)] = value & portMask; } // Set up the mempry mapped access to the GPIO registers bool initGPIO(void) { int mem_fd,n,bitNumber; if ((mem_fd = open("/dev/mem", O_RDWR|O_SYNC) ) < 0) { perror("can't open /dev/mem: "); return false; } char *gpio_map = (char*) mmap(NULL, //Any adddress in our space will do BLOCK_SIZE, //Map length PROT_READ|PROT_WRITE,// Enable reading & writting to mapped memory MAP_SHARED, //Shared with other processes mem_fd, //File to map GPIO_BASE); //Offset to GPIO peripheral close(mem_fd); //No need to keep mem_fd open after mmap if (gpio_map == MAP_FAILED) { fprintf(stderr, "mmap error %ld\n", (long)gpio_map); return false; } // set global pointer to the GPIO registers gpio_port = (volatile uint32_t *)gpio_map; // Build the bit mask for the used pins portMask = 0; n = 0; while((bitNumber = outputBits[n++]) != -1) { INP_GPIO(bitNumber); OUT_GPIO(bitNumber); portMask |= 1 << bitNumber; } ClearBits(portMask); return true; } // Short delays for bit banging signals. void settleTime(time) { int i; for (i = time; i != 0; --i) { asm(""); // force GCC not to optimize this away. } } uint32_t Pixels1[32*16]; uint32_t Pixels2[32*16]; // Pointers to Front and Back buffer uint32_t *PixelsF,*PixelsB; // This thread continuously cycles through the Pixels array sending the // pixel data to the display row by row. void *startDisplayThread(void *args) { int n,col,row; struct timespec sleepTime = { 0, 5000000 }; struct timespec onTime = { 0, 200000 }; uint32_t *pixelData; initGPIO(); buildGreyCode(); // Set up buffer pointers. PixelsF = Pixels1; PixelsB = Pixels2; // Set row bits to zero to start with. ClearBits( 15 << ROWA); row = 0; while(displayRunning) { // Cycle through the rows in a grey code order to minimise changes on address lines. // Changing the address lines seems to a part of the cause of the ghosting problems. if(greyCodeSet[row]) { SetBits(greyCodeChange[row] << ROWA); // Set a bit for the current row } else { ClearBits(greyCodeChange[row] << ROWA); // Clear a bit for the current row } settleTime(5); // Clock one rows worth of pixels into the display pixelData = &PixelsF[32*greyCode[row]]; for(col=0;col<32;col++) { ClearBits(pixelClkMask); // Clk low settleTime(5); SetBits(*pixelData++ & pixelMask); settleTime(5); SetBits(1<<CLK); // Clk high settleTime(5); } SetBits(1<<STB); // Strobe //settleTime(5); ClearBits(1<<STB); settleTime(50); ClearBits(1<<OE); // turn display on nanosleep(&onTime, NULL); // Fixed on time SetBits(1<<OE); // turn off the display settleTime(5); row += 1; row &= 15; #if 1 // Pause at the end of the frame if(row == 0) { SetBits(1<<OE); nanosleep(&sleepTime, NULL); } #endif } // Make sure display is off when we exit the thread SetBits(1<<OE); } void setPixelColour(int x,int y, int r,int g,int b) { int address; uint32_t bits,bitmask; // Sanities parameters x &= 31; y &= 31; r &= 1; g &= 1; b &= 1; address = x; // Set bits & mask depending on which half of the display the pixel is in. if(y < 16) { bits = (r<<R1|g<<G1|b<<B1); bitmask = (1<<R1|1<<G1|1<<B1); } else { bits = (r<<R2|g<<G2|b<<B2); bitmask = (1<<R2|1<<G2|1<<B2); } address += (y & 15) * 32; // Clear and set the appropriate bits in the Pixel data PixelsB[address] &= ~bitmask; PixelsB[address] |= bits; } // This is not syncronised to the display thread starting the next redraw, // but for the current demos this doesn't matter. void swapBuffers(void) { uint32_t *PixelsT; // Swap front and back buffers. PixelsT = PixelsF; PixelsF = PixelsB; PixelsB = PixelsT; } void *startLifeSimulatorThread(void *args) { typedef struct plants { int age; int energy; } PLANT; typedef struct species { int age; int energy; } SPECIE; PLANT plantes[32][32]; SPECIE specie1[32][32]; SPECIE specie2[32][32]; int x,y,xp,xm,yp,ym; int plants_neighbours,specie1_neighbours,specie2_neighbours; int i; int available[8]; memset(available,0,sizeof(available)); int pos; int random_number; int rand_pos; int loopcount=0; int total_energy; // Clear the board memset(plantes,0,sizeof(plantes)); memset(specie1,0,sizeof(specie1)); memset(specie2,0,sizeof(specie2)); srandom(time(NULL)); while (1) { // bucle principal for(x=0;x<32;x++) { // Calculate adjacent coordinates with correct wrap at edges xp = (x + 1) & 31; xm = (x - 1) & 31; for(y=0;y<32;y++) { yp = (y + 1) & 31; ym = (y - 1) & 31; //printf("%i\n",loopcount); loopcount++; // Count the number of currently live neighbouring cells plants_neighbours=0; specie1_neighbours=0; specie2_neighbours=0; // [Plants] if (plantes[x][y].age==0 && plantes[xm][y].age>0) { plants_neighbours++; } if (plantes[x][y].age==0 && plantes[xp][y].age>0) { plants_neighbours++; } if (plantes[x][y].age==0 && plantes[xm][ym].age>0) { plants_neighbours++; } if (plantes[x][y].age==0 && plantes[x][ym].age>0) { plants_neighbours++; } if (plantes[x][y].age==0 && plantes[xp][ym].age>0) { plants_neighbours++; } if (plantes[x][y].age==0 && plantes[xm][yp].age>0) { plants_neighbours++; } if (plantes[x][y].age==0 && plantes[x][yp].age>0) { plants_neighbours++; } if (plantes[x][y].age==0 && plantes[xp][yp].age>0) { plants_neighbours++; } // [Specie1] if (specie1[x][y].age==0 && specie1[xm][y].age>0) { specie1_neighbours++; } if (specie1[x][y].age==0 && specie1[xp][y].age>0) { specie1_neighbours++; } if (specie1[x][y].age==0 && specie1[xm][ym].age>0) { specie1_neighbours++; } if (specie1[x][y].age==0 && specie1[x][ym].age>0) { specie1_neighbours++; } if (specie1[x][y].age==0 && specie1[xp][ym].age>0) { specie1_neighbours++; } if (specie1[x][y].age==0 && specie1[xm][yp].age>0) { specie1_neighbours++; } if (specie1[x][y].age==0 && specie1[x][yp].age>0) { specie1_neighbours++; } if (specie1[x][y].age==0 && specie1[xp][yp].age>0) { specie1_neighbours++; } // [Specie2] if (specie2[x][y].age==0 && specie2[xm][y].age>0) { specie2_neighbours++; } if (specie2[x][y].age==0 && specie2[xp][y].age>0) { specie2_neighbours++; } if (specie2[x][y].age==0 && specie2[xm][ym].age>0) { specie2_neighbours++; } if (specie2[x][y].age==0 && specie2[x][ym].age>0) { specie2_neighbours++; } if (specie2[x][y].age==0 && specie2[xp][ym].age>0) { specie2_neighbours++; } if (specie2[x][y].age==0 && specie2[xm][yp].age>0) { specie2_neighbours++; } if (specie2[x][y].age==0 && specie2[x][yp].age>0) { specie2_neighbours++; } if (specie2[x][y].age==0 && specie2[xp][yp].age>0) { specie2_neighbours++; } // Plants logic if (plantes[x][y].age>=PLANTS_LIFE_EXPECTANCY) { plantes[x][y].age=0; plantes[x][y].energy=0; } // plant dies if (plantes[x][y].age>0 && plantes[x][y].age<PLANTS_LIFE_EXPECTANCY && plantes[x][y].energy<=0) { plantes[x][y].age=0; plantes[x][y].energy=0; } // plant dies if (plantes[x][y].age>0 && plantes[x][y].age<PLANTS_LIFE_EXPECTANCY ) { plantes[x][y].age++; plantes[x][y].energy=plantes[x][y].energy+PLANTS_ENERGY_BASE_PER_CYCLE; } // plant grows if (plantes[x][y].age==0 && plants_neighbours==0) { // no neighbours plant born //srand(time(NULL)); random_number = random() % PLANTS_RANDOM_BORN_CHANCES; //printf("%i\n",random_number); if (random_number==1) { plantes[x][y].age=1; plantes[x][y].energy=1;} } if (plantes[x][y].age==0 && plants_neighbours>0) { // neighbours plant born //srand(time(NULL)); random_number = random() % PLANTS_RANDOM_NEARBORN_CHANCES; if (random_number==1) { plantes[x][y].age=1; plantes[x][y].energy=1; } } // Specie1 logic if (specie1[x][y].age>0) { // if there are an individual alive // try to eat if (plantes[x][y].energy>0) { total_energy=0; if (plantes[x][y].energy>SPECIE1_MAX_ENERGY_RECOLECTED_PER_CYCLE) { total_energy=SPECIE1_MAX_ENERGY_RECOLECTED_PER_CYCLE; plantes[x][y].energy=plantes[x][y].energy-SPECIE1_MAX_ENERGY_RECOLECTED_PER_CYCLE; } else { total_energy=plantes[x][y].energy; plantes[x][y].energy=0;} specie1[x][y].energy=specie1[x][y].energy+total_energy; } // grow and decrease energy specie1[x][y].age++; specie1[x][y].energy=specie1[x][y].energy-SPECIE1_ENERGY_NEEDED_PER_CYCLE; if (specie1[x][y].energy<0) { specie1[x][y].energy=0; specie1[x][y].age=0;} // die // try to replicate if (specie1[x][y].energy>SPECIE1_ENERGY_TO_REPLICATE) { for (i=0;i<8;i++) { available[i]=0; } pos=0; //srand(time(NULL)); random_number = random() % SPECIE1_RANDOM_NEARBORN_CHANCES; if (specie1[xm][y].age==0) { available[pos]=1; pos++; } if (specie1[xp][y].age==0) { available[pos]=2; pos++; } if (specie1[xm][ym].age==0) { available[pos]=3; pos++; } if (specie1[x][ym].age==0) { available[pos]=4; pos++; } if (specie1[xp][ym].age==0) { available[pos]=5; pos++; } if (specie1[xm][yp].age==0) { available[pos]=6; pos++; } if (specie1[x][yp].age==0) { available[pos]=7; pos++; } if (specie1[xp][yp].age==0) { available[pos]=8; pos++; } //srand(time(NULL)); if (pos>0) { rand_pos=random() % pos; switch (available[rand_pos]) { // one individual born radomly case 1: if (random_number==1) { specie1[xm][y].age=1; specie1[xm][y].energy=SPECIE1_ENERGY_BASE; } break; case 2: if (random_number==1) { specie1[xp][y].age=1; specie1[xp][y].energy=SPECIE1_ENERGY_BASE; } break; case 3: if (random_number==1) { specie1[xm][ym].age=1; specie1[xm][ym].energy=SPECIE1_ENERGY_BASE; } break; case 4: if (random_number==1) { specie1[x][ym].age=1; specie1[x][ym].energy=SPECIE1_ENERGY_BASE; } break; case 5: if (random_number==1) { specie1[xp][ym].age=1; specie1[xp][ym].energy=SPECIE1_ENERGY_BASE; } break; case 6: if (random_number==1) { specie1[xm][yp].age=1; specie1[xm][yp].energy=SPECIE1_ENERGY_BASE; } break; case 7: if (random_number==1) { specie1[x][yp].age=1; specie1[x][yp].energy=SPECIE1_ENERGY_BASE; } break; case 8: if (random_number==1) { specie1[xp][yp].age=1; specie1[xp][yp].energy=SPECIE1_ENERGY_BASE; } break; default: printf("ERROR\n"); break; // all full } } } // die if too old if (specie1[x][y].age>SPECIE1_LIFE_EXPECTANCY) { specie1[x][y].energy=0; specie1[x][y].age=0;} } if (specie1[x][y].age==0) { // if theres no individual, new individual will born? (to avoid extintion) if (specie1_neighbours==0) { //srand(time(NULL)); random_number = random() % SPECIE1_RANDOM_BORN_CHANCES; if (random_number==1) { specie1[x][y].age=1; specie1[x][y].energy=SPECIE1_ENERGY_BASE; } } } // Specie2 logic if (specie2[x][y].age>0) { // if there are an individual alive // try to eat if (plantes[x][y].energy>0) { total_energy=0; if (plantes[x][y].energy>SPECIE2_MAX_ENERGY_RECOLECTED_PER_CYCLE) { total_energy=SPECIE2_MAX_ENERGY_RECOLECTED_PER_CYCLE; plantes[x][y].energy=plantes[x][y].energy-SPECIE2_MAX_ENERGY_RECOLECTED_PER_CYCLE; } else { total_energy=plantes[x][y].energy; plantes[x][y].energy=0;} specie2[x][y].energy=specie2[x][y].energy+total_energy; } // grow and decrease energy specie2[x][y].age++; specie2[x][y].energy=specie2[x][y].energy-SPECIE2_ENERGY_NEEDED_PER_CYCLE; if (specie2[x][y].energy<0) { specie2[x][y].energy=0; specie2[x][y].age=0;} // die // try to replicate if (specie2[x][y].energy>SPECIE2_ENERGY_TO_REPLICATE) { for (i=0;i<8;i++) { available[i]=0; } pos=0; //srand(time(NULL)); random_number = random() % SPECIE2_RANDOM_NEARBORN_CHANCES; if (specie2[xm][y].age==0) { available[pos]=1; pos++; } if (specie2[xp][y].age==0) { available[pos]=2; pos++; } if (specie2[xm][ym].age==0) { available[pos]=3; pos++; } if (specie2[x][ym].age==0) { available[pos]=4; pos++; } if (specie2[xp][ym].age==0) { available[pos]=5; pos++; } if (specie2[xm][yp].age==0) { available[pos]=6; pos++; } if (specie2[x][yp].age==0) { available[pos]=7; pos++; } if (specie2[xp][yp].age==0) { available[pos]=8; pos++; } //srand(time(NULL)); if (pos>0) { rand_pos=random() % pos; switch (available[rand_pos]) { // one individual born radomly case 1: if (random_number==1) { specie2[xm][y].age=1; specie2[xm][y].energy=SPECIE2_ENERGY_BASE; } break; case 2: if (random_number==1) { specie2[xp][y].age=1; specie2[xp][y].energy=SPECIE2_ENERGY_BASE; } break; case 3: if (random_number==1) { specie2[xm][ym].age=1; specie2[xm][ym].energy=SPECIE2_ENERGY_BASE; }break; case 4: if (random_number==1) { specie2[x][ym].age=1; specie2[x][ym].energy=SPECIE2_ENERGY_BASE; } break; case 5: if (random_number==1) { specie2[xp][ym].age=1; specie2[xp][ym].energy=SPECIE2_ENERGY_BASE; } break; case 6: if (random_number==1) { specie2[xm][yp].age=1; specie2[xm][yp].energy=SPECIE2_ENERGY_BASE; } break; case 7: if (random_number==1) { specie2[x][yp].age=1; specie2[x][yp].energy=SPECIE2_ENERGY_BASE; } break; case 8: if (random_number==1) { specie2[xp][yp].age=1; specie2[xp][yp].energy=SPECIE2_ENERGY_BASE; } break; // default: break; // all full } } } // die if too old if (specie2[x][y].age>SPECIE2_LIFE_EXPECTANCY) { specie2[x][y].energy=0; specie2[x][y].age=0;} } if (specie2[x][y].age==0) { // if theres no individual, new individual will born? (to avoid extintion) if (specie2_neighbours==0) { //srand(time(NULL)); random_number = random() % SPECIE2_RANDOM_BORN_CHANCES; if (random_number==1) { specie2[x][y].age=1; specie2[x][y].energy=SPECIE2_ENERGY_BASE; } } } // draw if (specie1[x][y].age>0 && specie2[x][y].age>0) { setPixelColour(x,y,1,1,0); } // yellow if species comp if (specie1[x][y].age>0 && specie2[x][y].age==0) { setPixelColour(x,y,1,0,0); } // red only specie1 if (specie1[x][y].age==0 && specie2[x][y].age>0) { setPixelColour(x,y,0,0,1); } // blue only specie2 if (specie1[x][y].age==0 && specie2[x][y].age==0 && plantes[x][y].age>0) { setPixelColour(x,y,0,1,0); } // green only plants if (specie1[x][y].age==0 && specie2[x][y].age==0 && plantes[x][y].age==0) { setPixelColour(x,y,0,0,0); } // black nothing } } swapBuffers(); //memset(PixelsB,0,sizeof(Pixels1)); // Sleep to set game rate usleep(1000 *50); } printf("Surt del bucle\n"); } // Thread states pthread_t displayThread; pthread_t gameThread; // Ctrl-C handler void stop(int sig) { displayRunning = false; gameStop = true; } int main(int argc, char **argv) { struct sched_param p; static struct termios oldt, newt; int ch; int x,y,z,n; struct sigaction new_sa; struct sigaction old_sa; sigfillset(&new_sa.sa_mask); new_sa.sa_handler = SIG_IGN; new_sa.sa_flags = 0; // Set up handler for ctrl-c to shut down properly if (sigaction(SIGINT, &new_sa, &old_sa) == 0 && old_sa.sa_handler != SIG_IGN) { new_sa.sa_handler = stop; sigaction(SIGINT, &new_sa, 0); } displayRunning = true; gameRunning = false; // Start the display pthread_create(&displayThread, NULL, &startDisplayThread,NULL); // Up the priority of the display thread p.sched_priority = 10; pthread_setschedparam(displayThread, SCHED_FIFO, &p); // Start life gameRunning = true; gameStop = false; pthread_create(&gameThread, NULL, &startLifeSimulatorThread,NULL); // Tidy up threads pthread_join(displayThread, NULL); if(gameRunning) pthread_join(gameThread, NULL); printf("\nThanks for watching!\n"); // Restore keyboard mode. tcsetattr(STDIN_FILENO,TCSANOW,&oldt); }
the_stack_data/187642752.c
#include <stdio.h> /*计算整数长度的递归算法*/ int len(int n) { return n < 10 ? 1 : len(n / 10) + 1; } int main() { printf("%d\n", 4 == len(-1234)); printf("%d\n", 4 == len(1234)); printf("%d\n", 6 == len(123456)); printf("%d\n", 1 == len(1)); printf("%d\n", 1 == len(0)); printf("%d\n", 9 == len(123456789)); return 0; }
the_stack_data/126702690.c
void __throw() { }
the_stack_data/47275.c
#include <stdio.h> #include <stdlib.h> int main(void) { int *t = NULL; // TODO: print the addresses returned // by malloc each time t = (int *)(malloc(sizeof(int))); t = (int *)(malloc(sizeof(int))); t = (int *)(malloc(sizeof(int))); t = (int *)(malloc(sizeof(int))); t = (int *)(malloc(sizeof(int))); return 0; }
the_stack_data/60533.c
/* $OpenBSD: strtoumax.c,v 1.1 2006/01/13 17:58:09 millert Exp $ */ /*- * Copyright (c) 1992 The Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include <ctype.h> #include <errno.h> #include <inttypes.h> /* Disable warnings */ /* * Convert a string to a uintmax_t. * * Ignores `locale' stuff. Assumes that the upper and lower case * alphabets and digits are each contiguous. */ uintmax_t strtoumax(const char *nptr, char **endptr, int base) { const char *s; uintmax_t acc, cutoff; int c; int neg, any, cutlim; /* * See strtoq for comments as to the logic used. */ s = nptr; do { c = (unsigned char) *s++; } while (isspace(c)); if (c == '-') { neg = 1; c = *s++; } else { neg = 0; if (c == '+') c = *s++; } if ((base == 0 || base == 16) && c == '0' && (*s == 'x' || *s == 'X')) { c = s[1]; s += 2; base = 16; } if (base == 0) base = c == '0' ? 8 : 10; cutoff = UINTMAX_MAX / (uintmax_t)base; cutlim = UINTMAX_MAX % (uintmax_t)base; for (acc = 0, any = 0;; c = (unsigned char) *s++) { if (isdigit(c)) c -= '0'; else if (isalpha(c)) c -= isupper(c) ? 'A' - 10 : 'a' - 10; else break; if (c >= base) break; if (any < 0) continue; if (acc > cutoff || (acc == cutoff && c > cutlim)) { any = -1; acc = UINTMAX_MAX; errno = ERANGE; } else { any = 1; acc *= (uintmax_t)base; acc += c; } } if (neg && any > 0) acc = -acc; if (endptr != 0) *endptr = (char *) (any ? s - 1 : nptr); return (acc); }
the_stack_data/641347.c
#include <stdio.h> #include <stdlib.h> int main(void) { }
the_stack_data/340892.c
// RUN: %clang -target mipsel-unknown-linux -S -o - -emit-llvm %s \ // RUN: | FileCheck %s // This checks that the frontend will accept inline asm memory constraints. int foo() { // 'R': An address that can be used in a non-macro load or stor' // This test will result in the higher and lower nibbles being // switched due to the lwl/lwr instruction pairs. // CHECK: %{{[0-9]+}} = call i32 asm sideeffect "lwl $0, 1 + $1\0A\09lwr $0, 2 + $1\0A\09", "=r,*R"(i32* %{{[0-9,a-f]+}}) #1, int c = 0xffbbccdd; int *p = &c; int out = 0; __asm volatile ( "lwl %0, 1 + %1\n\t" "lwr %0, 2 + %1\n\t" : "=r"(out) : "R"(*p) ); return 0; }
the_stack_data/126703518.c
/* This code was auto-generated by ./generate_SSE_intrinsics.py. The * command line arguments used were: * * ./generate_SSE_intrinsics.py -N 4 */ #include <stdlib.h> #include <xmmintrin.h> #define A_OFFSET_11 (0*4+0)*64 // 0 #define A_OFFSET_12 (0*4+1)*64 // 64 #define A_OFFSET_13 (0*4+2)*64 // 128 #define A_OFFSET_14 (0*4+3)*64 // 192 #define A_OFFSET_21 (1*4+0)*64 // 256 #define A_OFFSET_22 (1*4+1)*64 // 320 #define A_OFFSET_23 (1*4+2)*64 // 384 #define A_OFFSET_24 (1*4+3)*64 // 448 #define A_OFFSET_31 (2*4+0)*64 // 512 #define A_OFFSET_32 (2*4+1)*64 // 576 #define A_OFFSET_33 (2*4+2)*64 // 640 #define A_OFFSET_34 (2*4+3)*64 // 704 #define A_OFFSET_41 (3*4+0)*64 // 768 #define A_OFFSET_42 (3*4+1)*64 // 832 #define A_OFFSET_43 (3*4+2)*64 // 896 #define A_OFFSET_44 (3*4+3)*64 // 960 #define B_OFFSET_11 (0*4+0)*16 // 0 #define B_OFFSET_12 (0*4+1)*16 // 16 #define B_OFFSET_13 (0*4+2)*16 // 32 #define B_OFFSET_14 (0*4+3)*16 // 48 #define B_OFFSET_21 (1*4+0)*16 // 64 #define B_OFFSET_22 (1*4+1)*16 // 80 #define B_OFFSET_23 (1*4+2)*16 // 96 #define B_OFFSET_24 (1*4+3)*16 // 112 #define B_OFFSET_31 (2*4+0)*16 // 128 #define B_OFFSET_32 (2*4+1)*16 // 144 #define B_OFFSET_33 (2*4+2)*16 // 160 #define B_OFFSET_34 (2*4+3)*16 // 176 #define B_OFFSET_41 (3*4+0)*16 // 192 #define B_OFFSET_42 (3*4+1)*16 // 208 #define B_OFFSET_43 (3*4+2)*16 // 224 #define B_OFFSET_44 (3*4+3)*16 // 240 #define C_OFFSET_11 (0*4+0)*16 // 0 #define C_OFFSET_12 (0*4+1)*16 // 16 #define C_OFFSET_13 (0*4+2)*16 // 32 #define C_OFFSET_14 (0*4+3)*16 // 48 #define C_OFFSET_21 (1*4+0)*16 // 64 #define C_OFFSET_22 (1*4+1)*16 // 80 #define C_OFFSET_23 (1*4+2)*16 // 96 #define C_OFFSET_24 (1*4+3)*16 // 112 #define C_OFFSET_31 (2*4+0)*16 // 128 #define C_OFFSET_32 (2*4+1)*16 // 144 #define C_OFFSET_33 (2*4+2)*16 // 160 #define C_OFFSET_34 (2*4+3)*16 // 176 #define C_OFFSET_41 (3*4+0)*16 // 192 #define C_OFFSET_42 (3*4+1)*16 // 208 #define C_OFFSET_43 (3*4+2)*16 // 224 #define C_OFFSET_44 (3*4+3)*16 // 240 struct multiply_stream_t { float *A_block; float *B_block; float *C_block; float norm[32]; }; void stream_kernel (const unsigned int number_stream_elements, float alpha, float tolerance, struct multiply_stream_t *multiply_stream) { short int i; unsigned int stream_index; unsigned int max_stream_index; float *restrict A; float *restrict B; float *restrict C; float *restrict norm; __m128 alpha_row; __m128 A_element; __m128 B_row; __m128 C_row[4]; /* Divide number of stream elements by 64 to simulate stride of 64. */ max_stream_index = number_stream_elements/64; alpha_row = _mm_set1_ps(alpha); for (stream_index = 0; stream_index < max_stream_index; stream_index++) { /* Load pointers to matrix data blocks. */ A = multiply_stream[stream_index].A_block; B = multiply_stream[stream_index].B_block; C = multiply_stream[stream_index].C_block; norm = multiply_stream[stream_index].norm; /* Reset C(1,1) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[0]*norm[16] >= tolerance && norm[1]*norm[20] >= tolerance && norm[2]*norm[24] >= tolerance && norm[3]*norm[28] >= tolerance) { /* A(1,1)*B(1,1) = C(1,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(1,2)*B(2,1) = C(1,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(1,3)*B(3,1) = C(1,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(1,4)*B(4,1) = C(1,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(1,1) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_11]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_11], C_row[i]); } } /* Reset C(1,2) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[0]*norm[17] >= tolerance && norm[1]*norm[21] >= tolerance && norm[2]*norm[25] >= tolerance && norm[3]*norm[29] >= tolerance) { /* A(1,1)*B(1,2) = C(1,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(1,2)*B(2,2) = C(1,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(1,3)*B(3,2) = C(1,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(1,4)*B(4,2) = C(1,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(1,2) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_12]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_12], C_row[i]); } } /* Reset C(1,3) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[0]*norm[18] >= tolerance && norm[1]*norm[22] >= tolerance && norm[2]*norm[26] >= tolerance && norm[3]*norm[30] >= tolerance) { /* A(1,1)*B(1,3) = C(1,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(1,2)*B(2,3) = C(1,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(1,3)*B(3,3) = C(1,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(1,4)*B(4,3) = C(1,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(1,3) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_13]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_13], C_row[i]); } } /* Reset C(1,4) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[0]*norm[19] >= tolerance && norm[1]*norm[23] >= tolerance && norm[2]*norm[27] >= tolerance && norm[3]*norm[31] >= tolerance) { /* A(1,1)*B(1,4) = C(1,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_11]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(1,2)*B(2,4) = C(1,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_12]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(1,3)*B(3,4) = C(1,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_13]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(1,4)*B(4,4) = C(1,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_14]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(1,4) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_14]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_14], C_row[i]); } } /* Reset C(2,1) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[4]*norm[16] >= tolerance && norm[5]*norm[20] >= tolerance && norm[6]*norm[24] >= tolerance && norm[7]*norm[28] >= tolerance) { /* A(2,1)*B(1,1) = C(2,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(2,2)*B(2,1) = C(2,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(2,3)*B(3,1) = C(2,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(2,4)*B(4,1) = C(2,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(2,1) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_21]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_21], C_row[i]); } } /* Reset C(2,2) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[4]*norm[17] >= tolerance && norm[5]*norm[21] >= tolerance && norm[6]*norm[25] >= tolerance && norm[7]*norm[29] >= tolerance) { /* A(2,1)*B(1,2) = C(2,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(2,2)*B(2,2) = C(2,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(2,3)*B(3,2) = C(2,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(2,4)*B(4,2) = C(2,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(2,2) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_22]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_22], C_row[i]); } } /* Reset C(2,3) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[4]*norm[18] >= tolerance && norm[5]*norm[22] >= tolerance && norm[6]*norm[26] >= tolerance && norm[7]*norm[30] >= tolerance) { /* A(2,1)*B(1,3) = C(2,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(2,2)*B(2,3) = C(2,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(2,3)*B(3,3) = C(2,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(2,4)*B(4,3) = C(2,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(2,3) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_23]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_23], C_row[i]); } } /* Reset C(2,4) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[4]*norm[19] >= tolerance && norm[5]*norm[23] >= tolerance && norm[6]*norm[27] >= tolerance && norm[7]*norm[31] >= tolerance) { /* A(2,1)*B(1,4) = C(2,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_21]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(2,2)*B(2,4) = C(2,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_22]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(2,3)*B(3,4) = C(2,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_23]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(2,4)*B(4,4) = C(2,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_24]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(2,4) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_24]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_24], C_row[i]); } } /* Reset C(3,1) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[8]*norm[16] >= tolerance && norm[9]*norm[20] >= tolerance && norm[10]*norm[24] >= tolerance && norm[11]*norm[28] >= tolerance) { /* A(3,1)*B(1,1) = C(3,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(3,2)*B(2,1) = C(3,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(3,3)*B(3,1) = C(3,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(3,4)*B(4,1) = C(3,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(3,1) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_31]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_31], C_row[i]); } } /* Reset C(3,2) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[8]*norm[17] >= tolerance && norm[9]*norm[21] >= tolerance && norm[10]*norm[25] >= tolerance && norm[11]*norm[29] >= tolerance) { /* A(3,1)*B(1,2) = C(3,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(3,2)*B(2,2) = C(3,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(3,3)*B(3,2) = C(3,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(3,4)*B(4,2) = C(3,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(3,2) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_32]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_32], C_row[i]); } } /* Reset C(3,3) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[8]*norm[18] >= tolerance && norm[9]*norm[22] >= tolerance && norm[10]*norm[26] >= tolerance && norm[11]*norm[30] >= tolerance) { /* A(3,1)*B(1,3) = C(3,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(3,2)*B(2,3) = C(3,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(3,3)*B(3,3) = C(3,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(3,4)*B(4,3) = C(3,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(3,3) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_33]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_33], C_row[i]); } } /* Reset C(3,4) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[8]*norm[19] >= tolerance && norm[9]*norm[23] >= tolerance && norm[10]*norm[27] >= tolerance && norm[11]*norm[31] >= tolerance) { /* A(3,1)*B(1,4) = C(3,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_31]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(3,2)*B(2,4) = C(3,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_32]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(3,3)*B(3,4) = C(3,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_33]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(3,4)*B(4,4) = C(3,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_34]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(3,4) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_34]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_34], C_row[i]); } } /* Reset C(4,1) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[12]*norm[16] >= tolerance && norm[13]*norm[20] >= tolerance && norm[14]*norm[24] >= tolerance && norm[15]*norm[28] >= tolerance) { /* A(4,1)*B(1,1) = C(4,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_11]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(4,2)*B(2,1) = C(4,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_21]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(4,3)*B(3,1) = C(4,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_31]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(4,4)*B(4,1) = C(4,1). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_41]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(4,1) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_41]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_41], C_row[i]); } } /* Reset C(4,2) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[12]*norm[17] >= tolerance && norm[13]*norm[21] >= tolerance && norm[14]*norm[25] >= tolerance && norm[15]*norm[29] >= tolerance) { /* A(4,1)*B(1,2) = C(4,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_12]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(4,2)*B(2,2) = C(4,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_22]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(4,3)*B(3,2) = C(4,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_32]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(4,4)*B(4,2) = C(4,2). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_42]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(4,2) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_42]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_42], C_row[i]); } } /* Reset C(4,3) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[12]*norm[18] >= tolerance && norm[13]*norm[22] >= tolerance && norm[14]*norm[26] >= tolerance && norm[15]*norm[30] >= tolerance) { /* A(4,1)*B(1,3) = C(4,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_13]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(4,2)*B(2,3) = C(4,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_23]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(4,3)*B(3,3) = C(4,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_33]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(4,4)*B(4,3) = C(4,3). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_43]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(4,3) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_43]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_43], C_row[i]); } } /* Reset C(4,4) matrix accumulators */ C_row[0] = _mm_setzero_ps(); C_row[1] = _mm_setzero_ps(); C_row[2] = _mm_setzero_ps(); C_row[3] = _mm_setzero_ps(); if (norm[12]*norm[19] >= tolerance && norm[13]*norm[23] >= tolerance && norm[14]*norm[27] >= tolerance && norm[15]*norm[31] >= tolerance) { /* A(4,1)*B(1,4) = C(4,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_41]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_14]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(4,2)*B(2,4) = C(4,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_42]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_24]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(4,3)*B(3,4) = C(4,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_43]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_34]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* A(4,4)*B(4,4) = C(4,4). */ for (i = 0; i < 4; i++) { A_element = _mm_load_ps(&A[(i*4+0)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[0*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+1)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[1*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+2)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[2*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); A_element = _mm_load_ps(&A[(i*4+3)*4+A_OFFSET_44]); B_row = _mm_load_ps(&B[3*4+B_OFFSET_44]); C_row[i] = _mm_add_ps(_mm_mul_ps(A_element, B_row), C_row[i]); } /* Store C(4,4) block. */ for (i = 0; i < 4; i++) { C_row[i] = _mm_mul_ps(alpha_row, C_row[i]); C_row[i] = _mm_add_ps(_mm_load_ps(&C[i*4+C_OFFSET_44]), C_row[i]); _mm_store_ps(&C[i*4+C_OFFSET_44], C_row[i]); } } } }
the_stack_data/1116353.c
#include <stdio.h> #include <stdlib.h> #include <getopt.h> #include <errno.h> #include <sys/shm.h> #define CREATE 1 #define REMOVE 2 static void __attribute__ ((__noreturn__)) usage(FILE * out) { fprintf(out, "Helper tool to create/remove shared memory segments.\n"); fprintf(out, "Options:\n"); fprintf(out, " -m, --shmem <size> create shared memory segment of size <size>\n"); fprintf(out, " -r, --remove <shmid> remove shared memory segment with id <shmid>\n"); fprintf(out, " -p, --perm <permission> permissions for memory segment to create. Default: 0644\n"); fprintf(out, " -h, --help display this help and exit\n"); exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); } int main(int argc, char *argv[]) { int type, size, id, opt, ret; int permission = 0644; static const struct option longopts[] = { {"shmem", required_argument, NULL, 'm'}, {"remove", required_argument, NULL, 'r'}, {"perm", required_argument, NULL, 'p'}, {"help", no_argument, NULL, 'h'}, {NULL, 0, NULL, 0} }; while((opt = getopt_long(argc, argv, "hm:r:p:", longopts, NULL)) != -1) { switch(opt) { case 'm': type=CREATE; size=atoi(optarg); break; case 'r': type=REMOVE; id=atoi(optarg); break; case 'p': permission = atoi(optarg); printf("Permission is: %d\n", permission); break; case 'h': usage(stdout); break; default: usage(stdout); return 1; } } if(type == CREATE) { key_t key; FILE *fp = fopen("/dev/urandom", "r"); fread(&key, 1, sizeof(key), fp); fclose(fp); id = shmget(key, size, permission | IPC_CREAT); if(id != -1) printf("Shared memory id: %d\n", id); else { printf("Could not create memory with size %d\n", size); return EXIT_FAILURE; } } else if(type == REMOVE) { ret = shmctl(id, IPC_RMID, NULL); if(ret < 0) { switch(errno) { case EACCES: case EPERM: printf("Permission denied for id %d\n", id); break; case EINVAL: printf("Invalid id %d\n", id); break; case EIDRM: printf("Id %d was already removed\n", id); break; default: printf("Removing id %d failed\n", id); } return EXIT_FAILURE; } } else usage(stdout); return EXIT_SUCCESS; }
the_stack_data/80075.c
#include <stdio.h> struct Node { int info; struct Node *next; }; /*********GET NODE**********************************************************/ struct Node *GetNode() { struct Node *p; p = (struct Node*)malloc(sizeof(struct Node)); return p; } /*************FREE NODE****************************************************/ void FreeNode(struct Node *p) { free(p); } /*****************INSERTION AT END***************************************/ void InsEnd(struct Node **cSTART, int x) { struct Node *p, *q; p = GetNode(); p->info = x; if((*cSTART) != NULL) { q = (*cSTART)->next; p->next = q; } else { *cSTART = p; } (*cSTART)->next = p; *cSTART = p; } int josephusProblem(struct Node **CSTART,int k) { struct Node *P,*Q; int count,x; P = (*CSTART)->next; printf("\nDeleted Nodes :\n"); while (P->next!=P) { count = 1; while(count!=k-1) { count++; P = P->next; } Q = P; P = P->next; P = P->next; x = DelAft(Q); printf("%d\t",x); } return P->info; } int DelAft(struct Node *p) { struct Node *q; int x; q = p->next; p->next=q->next; x=q->info; FreeNode(q); return x; } /****************TRAVERSAL***********************************************/ void Traversal(struct Node *cSTART) { struct Node *temp = cSTART->next; while(temp!=cSTART) { printf("%d\t", temp->info); temp = temp->next; } printf("%d\t", temp->info); } int main() { struct Node *CSTART = NULL; int i,ans; for (i=1; i<101; i++) { InsEnd(&CSTART,i); } printf("Linked list :"); Traversal(CSTART); ans = josephusProblem(&CSTART,12); printf("\nJosephus Problem = %d",ans); return 0; }
the_stack_data/211081723.c
/*BEGIN_LEGAL Intel Open Source License Copyright (c) 2002-2017 Intel Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. END_LEGAL */ /* * this application calls malloc and prints the result. */ #include <stdio.h> #include <stdlib.h> #include <string.h> static void * my_malloc( size_t size ) { void * ptr = malloc(size); printf("Inside my_malloc(), size = %d, ptr = %p\n", size, ptr); return ptr; } static void my_free( void * ptr ) { printf("Inside my_free(), ptr = %p\n", ptr); free( ptr ); } int main( int argc, char * argv[] ) { char * buffer1; char * buffer2; char * buffer3; char * buffer4; int success=0; buffer1 = (char *)my_malloc( 64 ); printf("little_malloc: 0x%lx\n", buffer1 ); buffer2 = (char *)my_malloc( 128 ); printf("little_malloc: 0x%lx\n", buffer2 ); buffer3 = (char *)my_malloc( 256 ); printf("little_malloc: 0x%lx\n", buffer3 ); buffer4 = (char *)my_malloc( 512 ); printf("little_malloc: 0x%lx\n", buffer4 ); if ( buffer1 >= 0 && buffer2 >= 0 && buffer3 >= 0 && buffer4 >= 0 ) success = 1; my_free( buffer1 ); my_free( buffer2 ); my_free( buffer3 ); my_free( buffer4 ); if ( success ) printf(" Test passed.\n" ); else printf(" Test failed.\n"); return 0; }
the_stack_data/125141169.c
/* Test for memory handling in regex. Copyright (C) 2002-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <[email protected]>, 2001. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #include <sys/types.h> #include <mcheck.h> #include <regex.h> #include <stdio.h> #include <stdlib.h> static const char text[] = "#! /bin/sh"; int main (void) { regex_t re; regmatch_t rm[2]; int n; mtrace (); n = regcomp (&re, "^#! */.*/(k|ba||pdk|z)sh", REG_EXTENDED); if (n != 0) { char buf[500]; regerror (n, &re, buf, sizeof (buf)); printf ("regcomp failed: %s\n", buf); exit (1); } for (n = 0; n < 20; ++n) { if (regexec (&re, text, 2, rm, 0)) { puts ("regexec failed"); exit (2); } if (rm[0].rm_so != 0 || rm[0].rm_eo != 10 || rm[1].rm_so != 8 || rm[1].rm_eo != 8) { printf ("regexec match failure: %d %d %d %d\n", rm[0].rm_so, rm[0].rm_eo, rm[1].rm_so, rm[1].rm_eo); exit (3); } } regfree (&re); return 0; }
the_stack_data/215769646.c
#include <stdio.h> #include <fcntl.h> #include <unistd.h> #define P_FIFO "/tmp/p_fifo" int main(int argc, char **argv){ int fd; if(argc < 2){ printf("please input the write data \n"); } fd = open(P_FIFO, O_WRONLY | O_NONBLOCK); write(fd, argv[1], 100); close(fd); return 0; }
the_stack_data/58339.c
#include <stdio.h> const char* filename = "test.bin"; int main() { char c; int r = 0; int i=0; FILE *fp = fopen(filename, "rb"); if(fp == NULL) fprintf(stderr, "Can not open %s", filename); while((fread(&c, 1, 1, fp))){ r |= c; r = r<<(8*(1-i)); i++; } printf("%x\n", r); printf("%d\n", r); fclose(fp); return 0; }
the_stack_data/150688.c
#include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <signal.h> #include <sched.h> #include <fcntl.h> #include <math.h> #include <sys/mman.h> #include <sys/types.h> #include <sys/ioctl.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #define TCP_PORT 1001 #define CMA_ALLOC _IOWR('Z', 0, uint32_t) int interrupted = 0; void signal_handler(int sig) { interrupted = 1; } int main () { int fd, sock_server, sock_client; int position, limit, offset; volatile uint32_t *rx_addr, *rx_freq, *rx_cntr; volatile uint16_t *rx_rate; volatile uint8_t *rx_rst; volatile void *cfg, *sts, *ram; cpu_set_t mask; struct sched_param param; struct sockaddr_in addr; uint32_t command, size; int32_t value; int yes = 1; memset(&param, 0, sizeof(param)); param.sched_priority = sched_get_priority_max(SCHED_FIFO); sched_setscheduler(0, SCHED_FIFO, &param); CPU_ZERO(&mask); CPU_SET(1, &mask); sched_setaffinity(0, sizeof(cpu_set_t), &mask); if((fd = open("/dev/mem", O_RDWR)) < 0) { perror("open"); return EXIT_FAILURE; } sts = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x40000000); cfg = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x40001000); close(fd); if((fd = open("/dev/cma", O_RDWR)) < 0) { perror("open"); return EXIT_FAILURE; } size = 128*sysconf(_SC_PAGESIZE); if(ioctl(fd, CMA_ALLOC, &size) < 0) { perror("ioctl"); return EXIT_FAILURE; } ram = mmap(NULL, 128*sysconf(_SC_PAGESIZE), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); rx_rst = (uint8_t *)(cfg + 0); rx_rate = (uint16_t *)(cfg + 2); rx_addr = (uint32_t *)(cfg + 4); rx_freq = (uint32_t *)(cfg + 8); rx_cntr = (uint32_t *)(sts + 12); *rx_addr = size; if((sock_server = socket(AF_INET, SOCK_STREAM, 0)) < 0) { perror("socket"); return EXIT_FAILURE; } setsockopt(sock_server, SOL_SOCKET, SO_REUSEADDR, (void *)&yes, sizeof(yes)); /* setup listening address */ memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl(INADDR_ANY); addr.sin_port = htons(TCP_PORT); if(bind(sock_server, (struct sockaddr *)&addr, sizeof(addr)) < 0) { perror("bind"); return EXIT_FAILURE; } listen(sock_server, 1024); while(!interrupted) { /* enter reset mode */ *rx_rst &= ~1; usleep(100); *rx_rst &= ~2; /* set default sample rate */ *rx_rate = 8; /* set default phase increments */ rx_freq[0] = (uint32_t)floor(10000000 / 122.88e6 * (1<<30) + 0.5); rx_freq[1] = (uint32_t)floor(10000000 / 122.88e6 * (1<<30) + 0.5); if((sock_client = accept(sock_server, NULL, NULL)) < 0) { perror("accept"); return EXIT_FAILURE; } signal(SIGINT, signal_handler); /* enter normal operating mode */ *rx_rst |= 3; limit = 32*1024; while(!interrupted) { if(ioctl(sock_client, FIONREAD, &size) < 0) break; if(size >= 4) { if(recv(sock_client, (char *)&command, 4, MSG_WAITALL) < 0) break; value = command & 0xfffffff; switch(command >> 28) { case 0: /* set sample rate */ if(value < 6 || value > 64) continue; *rx_rate = value; case 1: /* set first phase increment */ if(value < 0 || value > 61440000) continue; rx_freq[0] = (uint32_t)floor(value / 122.88e6 * (1<<30) + 0.5); break; case 2: /* set second phase increment */ if(value < 0 || value > 61440000) continue; rx_freq[1] = (uint32_t)floor(value / 122.88e6 * (1<<30) + 0.5); break; } } /* read ram writer position */ position = *rx_cntr; /* send 256 kB if ready, otherwise sleep 0.1 ms */ if((limit > 0 && position > limit) || (limit == 0 && position < 32*1024)) { offset = limit > 0 ? 0 : 256*1024; limit = limit > 0 ? 0 : 32*1024; if(send(sock_client, ram + offset, 256*1024, MSG_NOSIGNAL) < 0) break; } else { usleep(100); } } signal(SIGINT, SIG_DFL); close(sock_client); } /* enter reset mode */ *rx_rst &= ~1; usleep(100); *rx_rst &= ~2; close(sock_server); return EXIT_SUCCESS; }
the_stack_data/18887476.c
/* Scrivere un sottoprogramma che riceve due numeri interi positivi e calcola l'elevamento a potenza del primo rispetto al secondo, restituendo il risultato. Scrivere un sottoprogramma che calcola la radice ennesima intera di un numero intero positivo. Il sottoprogramma prende come parametri il numero, il grado della radice, e una variabile, passata per indirizzo, in cui memorizzare la radice intera. Il sottoprogramma restituisce 1 se la radice intera è precisa, in alternativa 0. Scrivere un programma che utilizza tale sottoprogramma per calcolare la radice ennesima intera di un numero e di un grado chiesti all'utente, e ne visualizza il risultato. */ #include <stdio.h> int potenza(int, int); int radice(int, int, int*); int main(){ int n, grado, res, precisa; scanf("%d %d", &n, &grado); precisa = radice(n, grado, &res); if(precisa) printf("%d\n", res); else printf("Non precisa\n"); return 0; } int potenza(int base, int esponente){ int i, res; for(i=0, res=1; i<esponente; i++) res *= base; return res; } int radice(int n, int grado, int *res){ int i; while(!(potenza(*res+1, grado)>n)){ (*res)++; } /* *res = potenza(n, 1/grado); */ return potenza(*res, grado) == n; }
the_stack_data/151500.c
/* Copyright (C) 1994-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #include <sys/timeb.h> #include <sys/time.h> int ftime (struct timeb *timebuf) { struct timeval tv; struct timezone tz; if (__gettimeofday (&tv, &tz) < 0) return -1; timebuf->time = tv.tv_sec; timebuf->millitm = (tv.tv_usec + 500) / 1000; if (timebuf->millitm == 1000) { ++timebuf->time; timebuf->millitm = 0; } timebuf->timezone = tz.tz_minuteswest; timebuf->dstflag = tz.tz_dsttime; return 0; }
the_stack_data/399856.c
/* Copyright (C) 2021, Alliander (http://www.alliander.com) SPDX-License-Identifier: Apache-2.0 */ #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <stdarg.h> #include <stdint.h> #include <stdbool.h> #include <sys/socket.h> #include <sys/ioctl.h> #include <sys/poll.h> #include <linux/if_packet.h> #include <linux/if_ether.h> #include <linux/if_arp.h> #include <arpa/inet.h> #define BUF_SIZE 1500 #ifndef DEBUG_SOCKET #define DEBUG_SOCKET 0 #endif struct sEthernetSocket { int rawSocket; bool isBind; struct sockaddr_ll socketAddress; }; typedef struct sEthernetSocket* EthernetSocket; static int getInterfaceIndex(int sock, const char* deviceName) { struct ifreq ifr; strncpy(ifr.ifr_name, deviceName, IFNAMSIZ); if (ioctl(sock, SIOCGIFINDEX, &ifr) == -1) { if (DEBUG_SOCKET) printf("ETHERNET_LINUX: Failed to get interface index"); return -1; } int interfaceIndex = ifr.ifr_ifindex; if (ioctl (sock, SIOCGIFFLAGS, &ifr) == -1) { if (DEBUG_SOCKET) printf("ETHERNET_LINUX: Problem getting device flags"); return -1; } ifr.ifr_flags |= IFF_PROMISC; if (ioctl (sock, SIOCSIFFLAGS, &ifr) == -1) { if (DEBUG_SOCKET) printf("ETHERNET_LINUX: Setting device to promiscuous mode failed"); return -1; } return interfaceIndex; } void Ethernet_destroySocket(EthernetSocket ethSocket) { close(ethSocket->rawSocket); free(ethSocket); } EthernetSocket Ethernet_createSocket(const char* interfaceId, uint8_t* destAddress) { EthernetSocket ethernetSocket = calloc(1, sizeof(struct sEthernetSocket)); if (ethernetSocket) { ethernetSocket->rawSocket = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); if (ethernetSocket->rawSocket == -1) { if (DEBUG_SOCKET) printf("Error creating raw socket!\n"); free(ethernetSocket); return NULL; } ethernetSocket->socketAddress.sll_family = PF_PACKET; ethernetSocket->socketAddress.sll_protocol = htons(ETH_P_IP); int ifcIdx = getInterfaceIndex(ethernetSocket->rawSocket, interfaceId); if (ifcIdx == -1) { Ethernet_destroySocket(ethernetSocket); return NULL; } ethernetSocket->socketAddress.sll_ifindex = ifcIdx; ethernetSocket->socketAddress.sll_hatype = ARPHRD_ETHER; ethernetSocket->socketAddress.sll_pkttype = PACKET_OTHERHOST; ethernetSocket->socketAddress.sll_halen = ETH_ALEN; memset(ethernetSocket->socketAddress.sll_addr, 0, 8); if (destAddress != NULL) memcpy(ethernetSocket->socketAddress.sll_addr, destAddress, 6); ethernetSocket->isBind = false; //set ethertype ethernetSocket->socketAddress.sll_protocol = htons(ETH_P_ALL); } return ethernetSocket; } int main(int argc, char *argv[]) { uint8_t buffer[BUF_SIZE]; int bufferSize = BUF_SIZE; int nread = 0; if (argc != 2) { fprintf(stderr, "Usage: %s [interface]\n", argv[0]); exit(EXIT_FAILURE); } //uint8_t mac[6] = {0x01,0x0c,0xcd,0x01,0x00,0x03}; EthernetSocket sock; if((sock = Ethernet_createSocket(argv[1],NULL)) == NULL) { fprintf(stderr, "Error creating raw socket for interface [%s]\n", argv[1]); return 0; } if (sock->isBind == false) { if (bind(sock->rawSocket, (struct sockaddr*) &sock->socketAddress, sizeof(sock->socketAddress)) == 0) { sock->isBind = true; fprintf(stdout, "Raw socket bind succesfull\n"); } else { fprintf(stderr, "Error binding raw socket for interface [%s]\n", argv[1]); return 0; } } fprintf(stdout, "Read ethernet packets and echo them back to sender\n"); for (;;) { nread = recvfrom(sock->rawSocket, buffer, bufferSize, MSG_DONTWAIT, 0, 0); //ignore mac address of invalid packets if (nread == -1 || buffer[6] == 0x01 && buffer[7] == 0x02 && buffer[8] == 0x03 && buffer[9] == 0x04 && buffer[10] == 0x05 && buffer[11] == 0x06) { continue; /* Ignore failed request */ } //fprintf(stdout, "m: %d\n",buffer[6]); if (sendto(sock->rawSocket, buffer, nread, 0, (struct sockaddr*) &(sock->socketAddress), sizeof(sock->socketAddress)) != nread) { fprintf(stderr, "Error sending response\n"); } } Ethernet_destroySocket(sock); return 0; }
the_stack_data/76700605.c
/* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)initgroups.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/gen/initgroups.c,v 1.3.8.1 2001/12/19 15:49:35 tobez Exp $ * $DragonFly: src/lib/libc/gen/initgroups.c,v 1.6 2005/11/19 22:32:53 swildner Exp $ */ #include <sys/param.h> #include <unistd.h> int initgroups(const char *uname, gid_t agroup) { int ngroups; /* * Provide space for one group more than NGROUPS to allow * setgroups to fail and set errno. */ gid_t groups[NGROUPS + 1]; ngroups = NGROUPS + 1; getgrouplist(uname, agroup, groups, &ngroups); return (setgroups(ngroups, groups)); }
the_stack_data/1240038.c
// RUN: %clang_cc1 -E -dM -x assembler-with-cpp < /dev/null | FileCheck -match-full-lines -check-prefix ASM %s // // ASM:#define __ASSEMBLER__ 1 // // // RUN: %clang_cc1 -fblocks -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix BLOCKS %s // // BLOCKS:#define __BLOCKS__ 1 // BLOCKS:#define __block __attribute__((__blocks__(byref))) // // // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++2b -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX2B %s // // CXX2B:#define __GNUG__ 4 // CXX2B:#define __GXX_EXPERIMENTAL_CXX0X__ 1 // CXX2B:#define __GXX_RTTI 1 // CXX2B:#define __GXX_WEAK__ 1 // CXX2B:#define __cplusplus 202101L // CXX2B:#define __private_extern__ extern // // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++20 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX2A %s // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++2a -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX2A %s // // CXX2A:#define __GNUG__ 4 // CXX2A:#define __GXX_EXPERIMENTAL_CXX0X__ 1 // CXX2A:#define __GXX_RTTI 1 // CXX2A:#define __GXX_WEAK__ 1 // CXX2A:#define __cplusplus 202002L // CXX2A:#define __private_extern__ extern // // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++17 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX1Z %s // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++1z -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX1Z %s // // CXX1Z:#define __GNUG__ 4 // CXX1Z:#define __GXX_EXPERIMENTAL_CXX0X__ 1 // CXX1Z:#define __GXX_RTTI 1 // CXX1Z:#define __GXX_WEAK__ 1 // CXX1Z:#define __cplusplus 201703L // CXX1Z:#define __private_extern__ extern // // // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++14 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX1Y %s // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++1y -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX1Y %s // // CXX1Y:#define __GNUG__ 4 // CXX1Y:#define __GXX_EXPERIMENTAL_CXX0X__ 1 // CXX1Y:#define __GXX_RTTI 1 // CXX1Y:#define __GXX_WEAK__ 1 // CXX1Y:#define __cplusplus 201402L // CXX1Y:#define __private_extern__ extern // // // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++11 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX11 %s // // CXX11:#define __GNUG__ 4 // CXX11:#define __GXX_EXPERIMENTAL_CXX0X__ 1 // CXX11:#define __GXX_RTTI 1 // CXX11:#define __GXX_WEAK__ 1 // CXX11:#define __cplusplus 201103L // CXX11:#define __private_extern__ extern // // // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++98 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX98 %s // // CXX98:#define __GNUG__ 4 // CXX98:#define __GXX_RTTI 1 // CXX98:#define __GXX_WEAK__ 1 // CXX98:#define __cplusplus 199711L // CXX98:#define __private_extern__ extern // // // RUN: %clang_cc1 -fdeprecated-macro -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix DEPRECATED %s // // DEPRECATED:#define __DEPRECATED 1 // // // RUN: %clang_cc1 -std=c99 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C99 %s // // C99:#define __STDC_VERSION__ 199901L // C99:#define __STRICT_ANSI__ 1 // C99-NOT: __GXX_EXPERIMENTAL_CXX0X__ // C99-NOT: __GXX_RTTI // C99-NOT: __GXX_WEAK__ // C99-NOT: __cplusplus // // // RUN: %clang_cc1 -std=c11 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C11 %s // RUN: %clang_cc1 -std=c1x -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C11 %s // RUN: %clang_cc1 -std=iso9899:2011 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C11 %s // RUN: %clang_cc1 -std=iso9899:201x -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C11 %s // // C11:#define __STDC_UTF_16__ 1 // C11:#define __STDC_UTF_32__ 1 // C11:#define __STDC_VERSION__ 201112L // C11:#define __STRICT_ANSI__ 1 // C11-NOT: __GXX_EXPERIMENTAL_CXX0X__ // C11-NOT: __GXX_RTTI // C11-NOT: __GXX_WEAK__ // C11-NOT: __cplusplus // // // RUN: %clang_cc1 -fgnuc-version=4.2.1 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix COMMON %s // // COMMON:#define __CONSTANT_CFSTRINGS__ 1 // COMMON:#define __FINITE_MATH_ONLY__ 0 // COMMON:#define __GNUC_MINOR__ {{.*}} // COMMON:#define __GNUC_PATCHLEVEL__ {{.*}} // COMMON:#define __GNUC_STDC_INLINE__ 1 // COMMON:#define __GNUC__ {{.*}} // COMMON:#define __GXX_ABI_VERSION {{.*}} // COMMON:#define __ORDER_BIG_ENDIAN__ 4321 // COMMON:#define __ORDER_LITTLE_ENDIAN__ 1234 // COMMON:#define __ORDER_PDP_ENDIAN__ 3412 // COMMON:#define __STDC_HOSTED__ 1 // COMMON:#define __STDC__ 1 // COMMON:#define __VERSION__ {{.*}} // COMMON:#define __clang__ 1 // COMMON:#define __clang_literal_encoding__ {{.*}} // COMMON:#define __clang_major__ {{[0-9]+}} // COMMON:#define __clang_minor__ {{[0-9]+}} // COMMON:#define __clang_patchlevel__ {{[0-9]+}} // COMMON:#define __clang_version__ {{.*}} // COMMON:#define __clang_wide_literal_encoding__ {{.*}} // COMMON:#define __llvm__ 1 // // RUN: %clang_cc1 -E -dM -triple=x86_64-pc-win32 < /dev/null | FileCheck -match-full-lines -check-prefix C-DEFAULT %s // RUN: %clang_cc1 -E -dM -triple=x86_64-pc-linux-gnu < /dev/null | FileCheck -match-full-lines -check-prefix C-DEFAULT %s // RUN: %clang_cc1 -E -dM -triple=x86_64-apple-darwin < /dev/null | FileCheck -match-full-lines -check-prefix C-DEFAULT %s // RUN: %clang_cc1 -E -dM -triple=armv7a-apple-darwin < /dev/null | FileCheck -match-full-lines -check-prefix C-DEFAULT %s // // C-DEFAULT:#define __STDC_VERSION__ 201710L // // RUN: %clang_cc1 -ffreestanding -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix FREESTANDING %s // FREESTANDING:#define __STDC_HOSTED__ 0 // // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++2b -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GXX2B %s // // GXX2B:#define __GNUG__ 4 // GXX2B:#define __GXX_WEAK__ 1 // GXX2B:#define __cplusplus 202101L // GXX2B:#define __private_extern__ extern // // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++20 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GXX2A %s // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++2a -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GXX2A %s // // GXX2A:#define __GNUG__ 4 // GXX2A:#define __GXX_WEAK__ 1 // GXX2A:#define __cplusplus 202002L // GXX2A:#define __private_extern__ extern // // // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++17 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GXX1Z %s // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++1z -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GXX1Z %s // // GXX1Z:#define __GNUG__ 4 // GXX1Z:#define __GXX_WEAK__ 1 // GXX1Z:#define __cplusplus 201703L // GXX1Z:#define __private_extern__ extern // // // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++14 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GXX1Y %s // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++1y -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GXX1Y %s // // GXX1Y:#define __GNUG__ 4 // GXX1Y:#define __GXX_WEAK__ 1 // GXX1Y:#define __cplusplus 201402L // GXX1Y:#define __private_extern__ extern // // // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++11 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GXX11 %s // // GXX11:#define __GNUG__ 4 // GXX11:#define __GXX_WEAK__ 1 // GXX11:#define __cplusplus 201103L // GXX11:#define __private_extern__ extern // // // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++98 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GXX98 %s // // GXX98:#define __GNUG__ 4 // GXX98:#define __GXX_WEAK__ 1 // GXX98:#define __cplusplus 199711L // GXX98:#define __private_extern__ extern // // // RUN: %clang_cc1 -std=iso9899:199409 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C94 %s // // C94:#define __STDC_VERSION__ 199409L // // // RUN: %clang_cc1 -fms-extensions -triple i686-pc-win32 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix MSEXT %s // // MSEXT-NOT:#define __STDC__ // MSEXT:#define _INTEGRAL_MAX_BITS 64 // MSEXT-NOT:#define _NATIVE_WCHAR_T_DEFINED 1 // MSEXT-NOT:#define _WCHAR_T_DEFINED 1 // // // RUN: %clang_cc1 -x c++ -fms-extensions -triple i686-pc-win32 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix MSEXT-CXX %s // // MSEXT-CXX:#define _NATIVE_WCHAR_T_DEFINED 1 // MSEXT-CXX:#define _WCHAR_T_DEFINED 1 // MSEXT-CXX:#define __BOOL_DEFINED 1 // // // RUN: %clang_cc1 -x c++ -fno-wchar -fms-extensions -triple i686-pc-win32 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix MSEXT-CXX-NOWCHAR %s // // MSEXT-CXX-NOWCHAR-NOT:#define _NATIVE_WCHAR_T_DEFINED 1 // MSEXT-CXX-NOWCHAR-NOT:#define _WCHAR_T_DEFINED 1 // MSEXT-CXX-NOWCHAR:#define __BOOL_DEFINED 1 // // // RUN: %clang_cc1 -x objective-c -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix OBJC %s // RUN: %clang_cc1 -x objective-c++ -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix OBJC %s // // OBJC:#define OBJC_NEW_PROPERTIES 1 // OBJC:#define __NEXT_RUNTIME__ 1 // OBJC:#define __OBJC__ 1 // // // RUN: %clang_cc1 -x objective-c -fobjc-gc -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix OBJCGC %s // // OBJCGC:#define __OBJC_GC__ 1 // // // RUN: %clang_cc1 -x objective-c -fobjc-exceptions -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix NONFRAGILE %s // // NONFRAGILE:#define OBJC_ZEROCOST_EXCEPTIONS 1 // NONFRAGILE:#define __OBJC2__ 1 // // // RUN: %clang_cc1 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix O0 %s // // O0:#define __NO_INLINE__ 1 // O0-NOT:#define __OPTIMIZE_SIZE__ // O0-NOT:#define __OPTIMIZE__ // // // RUN: %clang_cc1 -fno-inline -O3 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix NO_INLINE %s // // NO_INLINE:#define __NO_INLINE__ 1 // NO_INLINE-NOT:#define __OPTIMIZE_SIZE__ // NO_INLINE:#define __OPTIMIZE__ 1 // // // RUN: %clang_cc1 -O1 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix O1 %s // // O1-NOT:#define __OPTIMIZE_SIZE__ // O1:#define __OPTIMIZE__ 1 // // // RUN: %clang_cc1 -Og -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix Og %s // // Og-NOT:#define __OPTIMIZE_SIZE__ // Og:#define __OPTIMIZE__ 1 // // // RUN: %clang_cc1 -Os -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix Os %s // // Os:#define __OPTIMIZE_SIZE__ 1 // Os:#define __OPTIMIZE__ 1 // // // RUN: %clang_cc1 -Oz -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix Oz %s // // Oz:#define __OPTIMIZE_SIZE__ 1 // Oz:#define __OPTIMIZE__ 1 // // // RUN: %clang_cc1 -fpascal-strings -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix PASCAL %s // // PASCAL:#define __PASCAL_STRINGS__ 1 // // // RUN: %clang_cc1 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix SCHAR %s // // SCHAR:#define __STDC__ 1 // SCHAR-NOT:#define __UNSIGNED_CHAR__ // SCHAR:#define __clang__ 1 // // RUN: %clang_cc1 -E -dM -fwchar-type=short -fno-signed-wchar < /dev/null | FileCheck -match-full-lines -check-prefix SHORTWCHAR %s // wchar_t is u16 for targeting Win32. // RUN: %clang_cc1 -E -dM -fwchar-type=short -fno-signed-wchar -triple=x86_64-w64-mingw32 < /dev/null | FileCheck -match-full-lines -check-prefix SHORTWCHAR %s // RUN: %clang_cc1 -dM -fwchar-type=short -fno-signed-wchar -triple=x86_64-unknown-windows-cygnus -E /dev/null | FileCheck -match-full-lines -check-prefix SHORTWCHAR %s // // SHORTWCHAR: #define __SIZEOF_WCHAR_T__ 2 // SHORTWCHAR: #define __WCHAR_MAX__ 65535 // SHORTWCHAR: #define __WCHAR_TYPE__ unsigned short // SHORTWCHAR: #define __WCHAR_WIDTH__ 16 // // RUN: %clang_cc1 -E -dM -fwchar-type=int -triple=i686-unknown-unknown < /dev/null | FileCheck -match-full-lines -check-prefix SHORTWCHAR2 %s // RUN: %clang_cc1 -E -dM -fwchar-type=int -triple=x86_64-unknown-unknown < /dev/null | FileCheck -match-full-lines -check-prefix SHORTWCHAR2 %s // // SHORTWCHAR2: #define __SIZEOF_WCHAR_T__ 4 // SHORTWCHAR2: #define __WCHAR_WIDTH__ 32 // Other definitions vary from platform to platform // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=msp430-none-none < /dev/null | FileCheck -match-full-lines -check-prefix MSP430 %s // RUN: %clang_cc1 -x c++ -E -dM -ffreestanding -triple=msp430-none-none < /dev/null | FileCheck -match-full-lines -check-prefix MSP430 -check-prefix MSP430-CXX %s // // MSP430:#define MSP430 1 // MSP430-NOT:#define _LP64 // MSP430:#define __BIGGEST_ALIGNMENT__ 2 // MSP430:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ // MSP430:#define __CHAR16_TYPE__ unsigned short // MSP430:#define __CHAR32_TYPE__ unsigned int // MSP430:#define __CHAR_BIT__ 8 // MSP430:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 // MSP430:#define __DBL_DIG__ 15 // MSP430:#define __DBL_EPSILON__ 2.2204460492503131e-16 // MSP430:#define __DBL_HAS_DENORM__ 1 // MSP430:#define __DBL_HAS_INFINITY__ 1 // MSP430:#define __DBL_HAS_QUIET_NAN__ 1 // MSP430:#define __DBL_MANT_DIG__ 53 // MSP430:#define __DBL_MAX_10_EXP__ 308 // MSP430:#define __DBL_MAX_EXP__ 1024 // MSP430:#define __DBL_MAX__ 1.7976931348623157e+308 // MSP430:#define __DBL_MIN_10_EXP__ (-307) // MSP430:#define __DBL_MIN_EXP__ (-1021) // MSP430:#define __DBL_MIN__ 2.2250738585072014e-308 // MSP430:#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ // MSP430:#define __FLT_DENORM_MIN__ 1.40129846e-45F // MSP430:#define __FLT_DIG__ 6 // MSP430:#define __FLT_EPSILON__ 1.19209290e-7F // MSP430:#define __FLT_HAS_DENORM__ 1 // MSP430:#define __FLT_HAS_INFINITY__ 1 // MSP430:#define __FLT_HAS_QUIET_NAN__ 1 // MSP430:#define __FLT_MANT_DIG__ 24 // MSP430:#define __FLT_MAX_10_EXP__ 38 // MSP430:#define __FLT_MAX_EXP__ 128 // MSP430:#define __FLT_MAX__ 3.40282347e+38F // MSP430:#define __FLT_MIN_10_EXP__ (-37) // MSP430:#define __FLT_MIN_EXP__ (-125) // MSP430:#define __FLT_MIN__ 1.17549435e-38F // MSP430:#define __FLT_RADIX__ 2 // MSP430:#define __INT16_C_SUFFIX__ // MSP430:#define __INT16_FMTd__ "hd" // MSP430:#define __INT16_FMTi__ "hi" // MSP430:#define __INT16_MAX__ 32767 // MSP430:#define __INT16_TYPE__ short // MSP430:#define __INT32_C_SUFFIX__ L // MSP430:#define __INT32_FMTd__ "ld" // MSP430:#define __INT32_FMTi__ "li" // MSP430:#define __INT32_MAX__ 2147483647L // MSP430:#define __INT32_TYPE__ long int // MSP430:#define __INT64_C_SUFFIX__ LL // MSP430:#define __INT64_FMTd__ "lld" // MSP430:#define __INT64_FMTi__ "lli" // MSP430:#define __INT64_MAX__ 9223372036854775807LL // MSP430:#define __INT64_TYPE__ long long int // MSP430:#define __INT8_C_SUFFIX__ // MSP430:#define __INT8_FMTd__ "hhd" // MSP430:#define __INT8_FMTi__ "hhi" // MSP430:#define __INT8_MAX__ 127 // MSP430:#define __INT8_TYPE__ signed char // MSP430:#define __INTMAX_C_SUFFIX__ LL // MSP430:#define __INTMAX_FMTd__ "lld" // MSP430:#define __INTMAX_FMTi__ "lli" // MSP430:#define __INTMAX_MAX__ 9223372036854775807LL // MSP430:#define __INTMAX_TYPE__ long long int // MSP430:#define __INTMAX_WIDTH__ 64 // MSP430:#define __INTPTR_FMTd__ "d" // MSP430:#define __INTPTR_FMTi__ "i" // MSP430:#define __INTPTR_MAX__ 32767 // MSP430:#define __INTPTR_TYPE__ int // MSP430:#define __INTPTR_WIDTH__ 16 // MSP430:#define __INT_FAST16_FMTd__ "hd" // MSP430:#define __INT_FAST16_FMTi__ "hi" // MSP430:#define __INT_FAST16_MAX__ 32767 // MSP430:#define __INT_FAST16_TYPE__ short // MSP430:#define __INT_FAST32_FMTd__ "ld" // MSP430:#define __INT_FAST32_FMTi__ "li" // MSP430:#define __INT_FAST32_MAX__ 2147483647L // MSP430:#define __INT_FAST32_TYPE__ long int // MSP430:#define __INT_FAST64_FMTd__ "lld" // MSP430:#define __INT_FAST64_FMTi__ "lli" // MSP430:#define __INT_FAST64_MAX__ 9223372036854775807LL // MSP430:#define __INT_FAST64_TYPE__ long long int // MSP430:#define __INT_FAST8_FMTd__ "hhd" // MSP430:#define __INT_FAST8_FMTi__ "hhi" // MSP430:#define __INT_FAST8_MAX__ 127 // MSP430:#define __INT_FAST8_TYPE__ signed char // MSP430:#define __INT_LEAST16_FMTd__ "hd" // MSP430:#define __INT_LEAST16_FMTi__ "hi" // MSP430:#define __INT_LEAST16_MAX__ 32767 // MSP430:#define __INT_LEAST16_TYPE__ short // MSP430:#define __INT_LEAST32_FMTd__ "ld" // MSP430:#define __INT_LEAST32_FMTi__ "li" // MSP430:#define __INT_LEAST32_MAX__ 2147483647L // MSP430:#define __INT_LEAST32_TYPE__ long int // MSP430:#define __INT_LEAST64_FMTd__ "lld" // MSP430:#define __INT_LEAST64_FMTi__ "lli" // MSP430:#define __INT_LEAST64_MAX__ 9223372036854775807LL // MSP430:#define __INT_LEAST64_TYPE__ long long int // MSP430:#define __INT_LEAST8_FMTd__ "hhd" // MSP430:#define __INT_LEAST8_FMTi__ "hhi" // MSP430:#define __INT_LEAST8_MAX__ 127 // MSP430:#define __INT_LEAST8_TYPE__ signed char // MSP430:#define __INT_MAX__ 32767 // MSP430:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L // MSP430:#define __LDBL_DIG__ 15 // MSP430:#define __LDBL_EPSILON__ 2.2204460492503131e-16L // MSP430:#define __LDBL_HAS_DENORM__ 1 // MSP430:#define __LDBL_HAS_INFINITY__ 1 // MSP430:#define __LDBL_HAS_QUIET_NAN__ 1 // MSP430:#define __LDBL_MANT_DIG__ 53 // MSP430:#define __LDBL_MAX_10_EXP__ 308 // MSP430:#define __LDBL_MAX_EXP__ 1024 // MSP430:#define __LDBL_MAX__ 1.7976931348623157e+308L // MSP430:#define __LDBL_MIN_10_EXP__ (-307) // MSP430:#define __LDBL_MIN_EXP__ (-1021) // MSP430:#define __LDBL_MIN__ 2.2250738585072014e-308L // MSP430:#define __LITTLE_ENDIAN__ 1 // MSP430:#define __LONG_LONG_MAX__ 9223372036854775807LL // MSP430:#define __LONG_MAX__ 2147483647L // MSP430-NOT:#define __LP64__ // MSP430:#define __MSP430__ 1 // MSP430:#define __POINTER_WIDTH__ 16 // MSP430:#define __PTRDIFF_TYPE__ int // MSP430:#define __PTRDIFF_WIDTH__ 16 // MSP430:#define __SCHAR_MAX__ 127 // MSP430:#define __SHRT_MAX__ 32767 // MSP430:#define __SIG_ATOMIC_MAX__ 2147483647L // MSP430:#define __SIG_ATOMIC_WIDTH__ 32 // MSP430:#define __SIZEOF_DOUBLE__ 8 // MSP430:#define __SIZEOF_FLOAT__ 4 // MSP430:#define __SIZEOF_INT__ 2 // MSP430:#define __SIZEOF_LONG_DOUBLE__ 8 // MSP430:#define __SIZEOF_LONG_LONG__ 8 // MSP430:#define __SIZEOF_LONG__ 4 // MSP430:#define __SIZEOF_POINTER__ 2 // MSP430:#define __SIZEOF_PTRDIFF_T__ 2 // MSP430:#define __SIZEOF_SHORT__ 2 // MSP430:#define __SIZEOF_SIZE_T__ 2 // MSP430:#define __SIZEOF_WCHAR_T__ 2 // MSP430:#define __SIZEOF_WINT_T__ 2 // MSP430:#define __SIZE_MAX__ 65535U // MSP430:#define __SIZE_TYPE__ unsigned int // MSP430:#define __SIZE_WIDTH__ 16 // MSP430-CXX:#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 2U // MSP430:#define __UINT16_C_SUFFIX__ U // MSP430:#define __UINT16_MAX__ 65535U // MSP430:#define __UINT16_TYPE__ unsigned short // MSP430:#define __UINT32_C_SUFFIX__ UL // MSP430:#define __UINT32_MAX__ 4294967295UL // MSP430:#define __UINT32_TYPE__ long unsigned int // MSP430:#define __UINT64_C_SUFFIX__ ULL // MSP430:#define __UINT64_MAX__ 18446744073709551615ULL // MSP430:#define __UINT64_TYPE__ long long unsigned int // MSP430:#define __UINT8_C_SUFFIX__ // MSP430:#define __UINT8_MAX__ 255 // MSP430:#define __UINT8_TYPE__ unsigned char // MSP430:#define __UINTMAX_C_SUFFIX__ ULL // MSP430:#define __UINTMAX_MAX__ 18446744073709551615ULL // MSP430:#define __UINTMAX_TYPE__ long long unsigned int // MSP430:#define __UINTMAX_WIDTH__ 64 // MSP430:#define __UINTPTR_MAX__ 65535U // MSP430:#define __UINTPTR_TYPE__ unsigned int // MSP430:#define __UINTPTR_WIDTH__ 16 // MSP430:#define __UINT_FAST16_MAX__ 65535U // MSP430:#define __UINT_FAST16_TYPE__ unsigned short // MSP430:#define __UINT_FAST32_MAX__ 4294967295UL // MSP430:#define __UINT_FAST32_TYPE__ long unsigned int // MSP430:#define __UINT_FAST64_MAX__ 18446744073709551615ULL // MSP430:#define __UINT_FAST64_TYPE__ long long unsigned int // MSP430:#define __UINT_FAST8_MAX__ 255 // MSP430:#define __UINT_FAST8_TYPE__ unsigned char // MSP430:#define __UINT_LEAST16_MAX__ 65535U // MSP430:#define __UINT_LEAST16_TYPE__ unsigned short // MSP430:#define __UINT_LEAST32_MAX__ 4294967295UL // MSP430:#define __UINT_LEAST32_TYPE__ long unsigned int // MSP430:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL // MSP430:#define __UINT_LEAST64_TYPE__ long long unsigned int // MSP430:#define __UINT_LEAST8_MAX__ 255 // MSP430:#define __UINT_LEAST8_TYPE__ unsigned char // MSP430:#define __USER_LABEL_PREFIX__ // MSP430:#define __WCHAR_MAX__ 32767 // MSP430:#define __WCHAR_TYPE__ int // MSP430:#define __WCHAR_WIDTH__ 16 // MSP430:#define __WINT_TYPE__ int // MSP430:#define __WINT_WIDTH__ 16 // MSP430:#define __clang__ 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=nvptx-none-none < /dev/null | FileCheck -match-full-lines -check-prefix NVPTX32 %s // RUN: %clang_cc1 -x c++ -E -dM -ffreestanding -triple=nvptx-none-none < /dev/null | FileCheck -match-full-lines -check-prefix NVPTX32 -check-prefix NVPTX32-CXX %s // // NVPTX32-NOT:#define _LP64 // NVPTX32:#define __BIGGEST_ALIGNMENT__ 8 // NVPTX32:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ // NVPTX32:#define __CHAR16_TYPE__ unsigned short // NVPTX32:#define __CHAR32_TYPE__ unsigned int // NVPTX32:#define __CHAR_BIT__ 8 // NVPTX32:#define __CONSTANT_CFSTRINGS__ 1 // NVPTX32:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 // NVPTX32:#define __DBL_DIG__ 15 // NVPTX32:#define __DBL_EPSILON__ 2.2204460492503131e-16 // NVPTX32:#define __DBL_HAS_DENORM__ 1 // NVPTX32:#define __DBL_HAS_INFINITY__ 1 // NVPTX32:#define __DBL_HAS_QUIET_NAN__ 1 // NVPTX32:#define __DBL_MANT_DIG__ 53 // NVPTX32:#define __DBL_MAX_10_EXP__ 308 // NVPTX32:#define __DBL_MAX_EXP__ 1024 // NVPTX32:#define __DBL_MAX__ 1.7976931348623157e+308 // NVPTX32:#define __DBL_MIN_10_EXP__ (-307) // NVPTX32:#define __DBL_MIN_EXP__ (-1021) // NVPTX32:#define __DBL_MIN__ 2.2250738585072014e-308 // NVPTX32:#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ // NVPTX32:#define __FINITE_MATH_ONLY__ 0 // NVPTX32:#define __FLT_DENORM_MIN__ 1.40129846e-45F // NVPTX32:#define __FLT_DIG__ 6 // NVPTX32:#define __FLT_EPSILON__ 1.19209290e-7F // NVPTX32:#define __FLT_HAS_DENORM__ 1 // NVPTX32:#define __FLT_HAS_INFINITY__ 1 // NVPTX32:#define __FLT_HAS_QUIET_NAN__ 1 // NVPTX32:#define __FLT_MANT_DIG__ 24 // NVPTX32:#define __FLT_MAX_10_EXP__ 38 // NVPTX32:#define __FLT_MAX_EXP__ 128 // NVPTX32:#define __FLT_MAX__ 3.40282347e+38F // NVPTX32:#define __FLT_MIN_10_EXP__ (-37) // NVPTX32:#define __FLT_MIN_EXP__ (-125) // NVPTX32:#define __FLT_MIN__ 1.17549435e-38F // NVPTX32:#define __FLT_RADIX__ 2 // NVPTX32:#define __INT16_C_SUFFIX__ // NVPTX32:#define __INT16_FMTd__ "hd" // NVPTX32:#define __INT16_FMTi__ "hi" // NVPTX32:#define __INT16_MAX__ 32767 // NVPTX32:#define __INT16_TYPE__ short // NVPTX32:#define __INT32_C_SUFFIX__ // NVPTX32:#define __INT32_FMTd__ "d" // NVPTX32:#define __INT32_FMTi__ "i" // NVPTX32:#define __INT32_MAX__ 2147483647 // NVPTX32:#define __INT32_TYPE__ int // NVPTX32:#define __INT64_C_SUFFIX__ LL // NVPTX32:#define __INT64_FMTd__ "lld" // NVPTX32:#define __INT64_FMTi__ "lli" // NVPTX32:#define __INT64_MAX__ 9223372036854775807LL // NVPTX32:#define __INT64_TYPE__ long long int // NVPTX32:#define __INT8_C_SUFFIX__ // NVPTX32:#define __INT8_FMTd__ "hhd" // NVPTX32:#define __INT8_FMTi__ "hhi" // NVPTX32:#define __INT8_MAX__ 127 // NVPTX32:#define __INT8_TYPE__ signed char // NVPTX32:#define __INTMAX_C_SUFFIX__ LL // NVPTX32:#define __INTMAX_FMTd__ "lld" // NVPTX32:#define __INTMAX_FMTi__ "lli" // NVPTX32:#define __INTMAX_MAX__ 9223372036854775807LL // NVPTX32:#define __INTMAX_TYPE__ long long int // NVPTX32:#define __INTMAX_WIDTH__ 64 // NVPTX32:#define __INTPTR_FMTd__ "d" // NVPTX32:#define __INTPTR_FMTi__ "i" // NVPTX32:#define __INTPTR_MAX__ 2147483647 // NVPTX32:#define __INTPTR_TYPE__ int // NVPTX32:#define __INTPTR_WIDTH__ 32 // NVPTX32:#define __INT_FAST16_FMTd__ "hd" // NVPTX32:#define __INT_FAST16_FMTi__ "hi" // NVPTX32:#define __INT_FAST16_MAX__ 32767 // NVPTX32:#define __INT_FAST16_TYPE__ short // NVPTX32:#define __INT_FAST32_FMTd__ "d" // NVPTX32:#define __INT_FAST32_FMTi__ "i" // NVPTX32:#define __INT_FAST32_MAX__ 2147483647 // NVPTX32:#define __INT_FAST32_TYPE__ int // NVPTX32:#define __INT_FAST64_FMTd__ "lld" // NVPTX32:#define __INT_FAST64_FMTi__ "lli" // NVPTX32:#define __INT_FAST64_MAX__ 9223372036854775807LL // NVPTX32:#define __INT_FAST64_TYPE__ long long int // NVPTX32:#define __INT_FAST8_FMTd__ "hhd" // NVPTX32:#define __INT_FAST8_FMTi__ "hhi" // NVPTX32:#define __INT_FAST8_MAX__ 127 // NVPTX32:#define __INT_FAST8_TYPE__ signed char // NVPTX32:#define __INT_LEAST16_FMTd__ "hd" // NVPTX32:#define __INT_LEAST16_FMTi__ "hi" // NVPTX32:#define __INT_LEAST16_MAX__ 32767 // NVPTX32:#define __INT_LEAST16_TYPE__ short // NVPTX32:#define __INT_LEAST32_FMTd__ "d" // NVPTX32:#define __INT_LEAST32_FMTi__ "i" // NVPTX32:#define __INT_LEAST32_MAX__ 2147483647 // NVPTX32:#define __INT_LEAST32_TYPE__ int // NVPTX32:#define __INT_LEAST64_FMTd__ "lld" // NVPTX32:#define __INT_LEAST64_FMTi__ "lli" // NVPTX32:#define __INT_LEAST64_MAX__ 9223372036854775807LL // NVPTX32:#define __INT_LEAST64_TYPE__ long long int // NVPTX32:#define __INT_LEAST8_FMTd__ "hhd" // NVPTX32:#define __INT_LEAST8_FMTi__ "hhi" // NVPTX32:#define __INT_LEAST8_MAX__ 127 // NVPTX32:#define __INT_LEAST8_TYPE__ signed char // NVPTX32:#define __INT_MAX__ 2147483647 // NVPTX32:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L // NVPTX32:#define __LDBL_DIG__ 15 // NVPTX32:#define __LDBL_EPSILON__ 2.2204460492503131e-16L // NVPTX32:#define __LDBL_HAS_DENORM__ 1 // NVPTX32:#define __LDBL_HAS_INFINITY__ 1 // NVPTX32:#define __LDBL_HAS_QUIET_NAN__ 1 // NVPTX32:#define __LDBL_MANT_DIG__ 53 // NVPTX32:#define __LDBL_MAX_10_EXP__ 308 // NVPTX32:#define __LDBL_MAX_EXP__ 1024 // NVPTX32:#define __LDBL_MAX__ 1.7976931348623157e+308L // NVPTX32:#define __LDBL_MIN_10_EXP__ (-307) // NVPTX32:#define __LDBL_MIN_EXP__ (-1021) // NVPTX32:#define __LDBL_MIN__ 2.2250738585072014e-308L // NVPTX32:#define __LITTLE_ENDIAN__ 1 // NVPTX32:#define __LONG_LONG_MAX__ 9223372036854775807LL // NVPTX32:#define __LONG_MAX__ 2147483647L // NVPTX32-NOT:#define __LP64__ // NVPTX32:#define __NVPTX__ 1 // NVPTX32:#define __POINTER_WIDTH__ 32 // NVPTX32:#define __PRAGMA_REDEFINE_EXTNAME 1 // NVPTX32:#define __PTRDIFF_TYPE__ int // NVPTX32:#define __PTRDIFF_WIDTH__ 32 // NVPTX32:#define __PTX__ 1 // NVPTX32:#define __SCHAR_MAX__ 127 // NVPTX32:#define __SHRT_MAX__ 32767 // NVPTX32:#define __SIG_ATOMIC_MAX__ 2147483647 // NVPTX32:#define __SIG_ATOMIC_WIDTH__ 32 // NVPTX32:#define __SIZEOF_DOUBLE__ 8 // NVPTX32:#define __SIZEOF_FLOAT__ 4 // NVPTX32:#define __SIZEOF_INT__ 4 // NVPTX32:#define __SIZEOF_LONG_DOUBLE__ 8 // NVPTX32:#define __SIZEOF_LONG_LONG__ 8 // NVPTX32:#define __SIZEOF_LONG__ 4 // NVPTX32:#define __SIZEOF_POINTER__ 4 // NVPTX32:#define __SIZEOF_PTRDIFF_T__ 4 // NVPTX32:#define __SIZEOF_SHORT__ 2 // NVPTX32:#define __SIZEOF_SIZE_T__ 4 // NVPTX32:#define __SIZEOF_WCHAR_T__ 4 // NVPTX32:#define __SIZEOF_WINT_T__ 4 // NVPTX32:#define __SIZE_MAX__ 4294967295U // NVPTX32:#define __SIZE_TYPE__ unsigned int // NVPTX32:#define __SIZE_WIDTH__ 32 // NVPTX32-CXX:#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 8U // NVPTX32:#define __UINT16_C_SUFFIX__ // NVPTX32:#define __UINT16_MAX__ 65535 // NVPTX32:#define __UINT16_TYPE__ unsigned short // NVPTX32:#define __UINT32_C_SUFFIX__ U // NVPTX32:#define __UINT32_MAX__ 4294967295U // NVPTX32:#define __UINT32_TYPE__ unsigned int // NVPTX32:#define __UINT64_C_SUFFIX__ ULL // NVPTX32:#define __UINT64_MAX__ 18446744073709551615ULL // NVPTX32:#define __UINT64_TYPE__ long long unsigned int // NVPTX32:#define __UINT8_C_SUFFIX__ // NVPTX32:#define __UINT8_MAX__ 255 // NVPTX32:#define __UINT8_TYPE__ unsigned char // NVPTX32:#define __UINTMAX_C_SUFFIX__ ULL // NVPTX32:#define __UINTMAX_MAX__ 18446744073709551615ULL // NVPTX32:#define __UINTMAX_TYPE__ long long unsigned int // NVPTX32:#define __UINTMAX_WIDTH__ 64 // NVPTX32:#define __UINTPTR_MAX__ 4294967295U // NVPTX32:#define __UINTPTR_TYPE__ unsigned int // NVPTX32:#define __UINTPTR_WIDTH__ 32 // NVPTX32:#define __UINT_FAST16_MAX__ 65535 // NVPTX32:#define __UINT_FAST16_TYPE__ unsigned short // NVPTX32:#define __UINT_FAST32_MAX__ 4294967295U // NVPTX32:#define __UINT_FAST32_TYPE__ unsigned int // NVPTX32:#define __UINT_FAST64_MAX__ 18446744073709551615ULL // NVPTX32:#define __UINT_FAST64_TYPE__ long long unsigned int // NVPTX32:#define __UINT_FAST8_MAX__ 255 // NVPTX32:#define __UINT_FAST8_TYPE__ unsigned char // NVPTX32:#define __UINT_LEAST16_MAX__ 65535 // NVPTX32:#define __UINT_LEAST16_TYPE__ unsigned short // NVPTX32:#define __UINT_LEAST32_MAX__ 4294967295U // NVPTX32:#define __UINT_LEAST32_TYPE__ unsigned int // NVPTX32:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL // NVPTX32:#define __UINT_LEAST64_TYPE__ long long unsigned int // NVPTX32:#define __UINT_LEAST8_MAX__ 255 // NVPTX32:#define __UINT_LEAST8_TYPE__ unsigned char // NVPTX32:#define __USER_LABEL_PREFIX__ // NVPTX32:#define __WCHAR_MAX__ 2147483647 // NVPTX32:#define __WCHAR_TYPE__ int // NVPTX32:#define __WCHAR_WIDTH__ 32 // NVPTX32:#define __WINT_TYPE__ int // NVPTX32:#define __WINT_WIDTH__ 32 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=nvptx64-none-none < /dev/null | FileCheck -match-full-lines -check-prefix NVPTX64 %s // RUN: %clang_cc1 -x c++ -E -dM -ffreestanding -triple=nvptx64-none-none < /dev/null | FileCheck -match-full-lines -check-prefix NVPTX64 -check-prefix NVPTX64-CXX %s // // NVPTX64:#define _LP64 1 // NVPTX64:#define __BIGGEST_ALIGNMENT__ 8 // NVPTX64:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ // NVPTX64:#define __CHAR16_TYPE__ unsigned short // NVPTX64:#define __CHAR32_TYPE__ unsigned int // NVPTX64:#define __CHAR_BIT__ 8 // NVPTX64:#define __CONSTANT_CFSTRINGS__ 1 // NVPTX64:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 // NVPTX64:#define __DBL_DIG__ 15 // NVPTX64:#define __DBL_EPSILON__ 2.2204460492503131e-16 // NVPTX64:#define __DBL_HAS_DENORM__ 1 // NVPTX64:#define __DBL_HAS_INFINITY__ 1 // NVPTX64:#define __DBL_HAS_QUIET_NAN__ 1 // NVPTX64:#define __DBL_MANT_DIG__ 53 // NVPTX64:#define __DBL_MAX_10_EXP__ 308 // NVPTX64:#define __DBL_MAX_EXP__ 1024 // NVPTX64:#define __DBL_MAX__ 1.7976931348623157e+308 // NVPTX64:#define __DBL_MIN_10_EXP__ (-307) // NVPTX64:#define __DBL_MIN_EXP__ (-1021) // NVPTX64:#define __DBL_MIN__ 2.2250738585072014e-308 // NVPTX64:#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ // NVPTX64:#define __FINITE_MATH_ONLY__ 0 // NVPTX64:#define __FLT_DENORM_MIN__ 1.40129846e-45F // NVPTX64:#define __FLT_DIG__ 6 // NVPTX64:#define __FLT_EPSILON__ 1.19209290e-7F // NVPTX64:#define __FLT_HAS_DENORM__ 1 // NVPTX64:#define __FLT_HAS_INFINITY__ 1 // NVPTX64:#define __FLT_HAS_QUIET_NAN__ 1 // NVPTX64:#define __FLT_MANT_DIG__ 24 // NVPTX64:#define __FLT_MAX_10_EXP__ 38 // NVPTX64:#define __FLT_MAX_EXP__ 128 // NVPTX64:#define __FLT_MAX__ 3.40282347e+38F // NVPTX64:#define __FLT_MIN_10_EXP__ (-37) // NVPTX64:#define __FLT_MIN_EXP__ (-125) // NVPTX64:#define __FLT_MIN__ 1.17549435e-38F // NVPTX64:#define __FLT_RADIX__ 2 // NVPTX64:#define __INT16_C_SUFFIX__ // NVPTX64:#define __INT16_FMTd__ "hd" // NVPTX64:#define __INT16_FMTi__ "hi" // NVPTX64:#define __INT16_MAX__ 32767 // NVPTX64:#define __INT16_TYPE__ short // NVPTX64:#define __INT32_C_SUFFIX__ // NVPTX64:#define __INT32_FMTd__ "d" // NVPTX64:#define __INT32_FMTi__ "i" // NVPTX64:#define __INT32_MAX__ 2147483647 // NVPTX64:#define __INT32_TYPE__ int // NVPTX64:#define __INT64_C_SUFFIX__ LL // NVPTX64:#define __INT64_FMTd__ "lld" // NVPTX64:#define __INT64_FMTi__ "lli" // NVPTX64:#define __INT64_MAX__ 9223372036854775807LL // NVPTX64:#define __INT64_TYPE__ long long int // NVPTX64:#define __INT8_C_SUFFIX__ // NVPTX64:#define __INT8_FMTd__ "hhd" // NVPTX64:#define __INT8_FMTi__ "hhi" // NVPTX64:#define __INT8_MAX__ 127 // NVPTX64:#define __INT8_TYPE__ signed char // NVPTX64:#define __INTMAX_C_SUFFIX__ LL // NVPTX64:#define __INTMAX_FMTd__ "lld" // NVPTX64:#define __INTMAX_FMTi__ "lli" // NVPTX64:#define __INTMAX_MAX__ 9223372036854775807LL // NVPTX64:#define __INTMAX_TYPE__ long long int // NVPTX64:#define __INTMAX_WIDTH__ 64 // NVPTX64:#define __INTPTR_FMTd__ "ld" // NVPTX64:#define __INTPTR_FMTi__ "li" // NVPTX64:#define __INTPTR_MAX__ 9223372036854775807L // NVPTX64:#define __INTPTR_TYPE__ long int // NVPTX64:#define __INTPTR_WIDTH__ 64 // NVPTX64:#define __INT_FAST16_FMTd__ "hd" // NVPTX64:#define __INT_FAST16_FMTi__ "hi" // NVPTX64:#define __INT_FAST16_MAX__ 32767 // NVPTX64:#define __INT_FAST16_TYPE__ short // NVPTX64:#define __INT_FAST32_FMTd__ "d" // NVPTX64:#define __INT_FAST32_FMTi__ "i" // NVPTX64:#define __INT_FAST32_MAX__ 2147483647 // NVPTX64:#define __INT_FAST32_TYPE__ int // NVPTX64:#define __INT_FAST64_FMTd__ "ld" // NVPTX64:#define __INT_FAST64_FMTi__ "li" // NVPTX64:#define __INT_FAST64_MAX__ 9223372036854775807L // NVPTX64:#define __INT_FAST64_TYPE__ long int // NVPTX64:#define __INT_FAST8_FMTd__ "hhd" // NVPTX64:#define __INT_FAST8_FMTi__ "hhi" // NVPTX64:#define __INT_FAST8_MAX__ 127 // NVPTX64:#define __INT_FAST8_TYPE__ signed char // NVPTX64:#define __INT_LEAST16_FMTd__ "hd" // NVPTX64:#define __INT_LEAST16_FMTi__ "hi" // NVPTX64:#define __INT_LEAST16_MAX__ 32767 // NVPTX64:#define __INT_LEAST16_TYPE__ short // NVPTX64:#define __INT_LEAST32_FMTd__ "d" // NVPTX64:#define __INT_LEAST32_FMTi__ "i" // NVPTX64:#define __INT_LEAST32_MAX__ 2147483647 // NVPTX64:#define __INT_LEAST32_TYPE__ int // NVPTX64:#define __INT_LEAST64_FMTd__ "ld" // NVPTX64:#define __INT_LEAST64_FMTi__ "li" // NVPTX64:#define __INT_LEAST64_MAX__ 9223372036854775807L // NVPTX64:#define __INT_LEAST64_TYPE__ long int // NVPTX64:#define __INT_LEAST8_FMTd__ "hhd" // NVPTX64:#define __INT_LEAST8_FMTi__ "hhi" // NVPTX64:#define __INT_LEAST8_MAX__ 127 // NVPTX64:#define __INT_LEAST8_TYPE__ signed char // NVPTX64:#define __INT_MAX__ 2147483647 // NVPTX64:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L // NVPTX64:#define __LDBL_DIG__ 15 // NVPTX64:#define __LDBL_EPSILON__ 2.2204460492503131e-16L // NVPTX64:#define __LDBL_HAS_DENORM__ 1 // NVPTX64:#define __LDBL_HAS_INFINITY__ 1 // NVPTX64:#define __LDBL_HAS_QUIET_NAN__ 1 // NVPTX64:#define __LDBL_MANT_DIG__ 53 // NVPTX64:#define __LDBL_MAX_10_EXP__ 308 // NVPTX64:#define __LDBL_MAX_EXP__ 1024 // NVPTX64:#define __LDBL_MAX__ 1.7976931348623157e+308L // NVPTX64:#define __LDBL_MIN_10_EXP__ (-307) // NVPTX64:#define __LDBL_MIN_EXP__ (-1021) // NVPTX64:#define __LDBL_MIN__ 2.2250738585072014e-308L // NVPTX64:#define __LITTLE_ENDIAN__ 1 // NVPTX64:#define __LONG_LONG_MAX__ 9223372036854775807LL // NVPTX64:#define __LONG_MAX__ 9223372036854775807L // NVPTX64:#define __LP64__ 1 // NVPTX64:#define __NVPTX__ 1 // NVPTX64:#define __POINTER_WIDTH__ 64 // NVPTX64:#define __PRAGMA_REDEFINE_EXTNAME 1 // NVPTX64:#define __PTRDIFF_TYPE__ long int // NVPTX64:#define __PTRDIFF_WIDTH__ 64 // NVPTX64:#define __PTX__ 1 // NVPTX64:#define __SCHAR_MAX__ 127 // NVPTX64:#define __SHRT_MAX__ 32767 // NVPTX64:#define __SIG_ATOMIC_MAX__ 2147483647 // NVPTX64:#define __SIG_ATOMIC_WIDTH__ 32 // NVPTX64:#define __SIZEOF_DOUBLE__ 8 // NVPTX64:#define __SIZEOF_FLOAT__ 4 // NVPTX64:#define __SIZEOF_INT__ 4 // NVPTX64:#define __SIZEOF_LONG_DOUBLE__ 8 // NVPTX64:#define __SIZEOF_LONG_LONG__ 8 // NVPTX64:#define __SIZEOF_LONG__ 8 // NVPTX64:#define __SIZEOF_POINTER__ 8 // NVPTX64:#define __SIZEOF_PTRDIFF_T__ 8 // NVPTX64:#define __SIZEOF_SHORT__ 2 // NVPTX64:#define __SIZEOF_SIZE_T__ 8 // NVPTX64:#define __SIZEOF_WCHAR_T__ 4 // NVPTX64:#define __SIZEOF_WINT_T__ 4 // NVPTX64:#define __SIZE_MAX__ 18446744073709551615UL // NVPTX64:#define __SIZE_TYPE__ long unsigned int // NVPTX64:#define __SIZE_WIDTH__ 64 // NVPTX64-CXX:#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 8UL // NVPTX64:#define __UINT16_C_SUFFIX__ // NVPTX64:#define __UINT16_MAX__ 65535 // NVPTX64:#define __UINT16_TYPE__ unsigned short // NVPTX64:#define __UINT32_C_SUFFIX__ U // NVPTX64:#define __UINT32_MAX__ 4294967295U // NVPTX64:#define __UINT32_TYPE__ unsigned int // NVPTX64:#define __UINT64_C_SUFFIX__ ULL // NVPTX64:#define __UINT64_MAX__ 18446744073709551615ULL // NVPTX64:#define __UINT64_TYPE__ long long unsigned int // NVPTX64:#define __UINT8_C_SUFFIX__ // NVPTX64:#define __UINT8_MAX__ 255 // NVPTX64:#define __UINT8_TYPE__ unsigned char // NVPTX64:#define __UINTMAX_C_SUFFIX__ ULL // NVPTX64:#define __UINTMAX_MAX__ 18446744073709551615ULL // NVPTX64:#define __UINTMAX_TYPE__ long long unsigned int // NVPTX64:#define __UINTMAX_WIDTH__ 64 // NVPTX64:#define __UINTPTR_MAX__ 18446744073709551615UL // NVPTX64:#define __UINTPTR_TYPE__ long unsigned int // NVPTX64:#define __UINTPTR_WIDTH__ 64 // NVPTX64:#define __UINT_FAST16_MAX__ 65535 // NVPTX64:#define __UINT_FAST16_TYPE__ unsigned short // NVPTX64:#define __UINT_FAST32_MAX__ 4294967295U // NVPTX64:#define __UINT_FAST32_TYPE__ unsigned int // NVPTX64:#define __UINT_FAST64_MAX__ 18446744073709551615UL // NVPTX64:#define __UINT_FAST64_TYPE__ long unsigned int // NVPTX64:#define __UINT_FAST8_MAX__ 255 // NVPTX64:#define __UINT_FAST8_TYPE__ unsigned char // NVPTX64:#define __UINT_LEAST16_MAX__ 65535 // NVPTX64:#define __UINT_LEAST16_TYPE__ unsigned short // NVPTX64:#define __UINT_LEAST32_MAX__ 4294967295U // NVPTX64:#define __UINT_LEAST32_TYPE__ unsigned int // NVPTX64:#define __UINT_LEAST64_MAX__ 18446744073709551615UL // NVPTX64:#define __UINT_LEAST64_TYPE__ long unsigned int // NVPTX64:#define __UINT_LEAST8_MAX__ 255 // NVPTX64:#define __UINT_LEAST8_TYPE__ unsigned char // NVPTX64:#define __USER_LABEL_PREFIX__ // NVPTX64:#define __WCHAR_MAX__ 2147483647 // NVPTX64:#define __WCHAR_TYPE__ int // NVPTX64:#define __WCHAR_WIDTH__ 32 // NVPTX64:#define __WINT_TYPE__ int // NVPTX64:#define __WINT_WIDTH__ 32 // // RUN: %clang_cc1 -x cl -E -dM -ffreestanding -triple=amdgcn < /dev/null | FileCheck -match-full-lines -check-prefix AMDGCN --check-prefix AMDGPU %s // RUN: %clang_cc1 -x cl -E -dM -ffreestanding -triple=r600 -target-cpu caicos < /dev/null | FileCheck -match-full-lines --check-prefix AMDGPU %s // // AMDGPU:#define __ENDIAN_LITTLE__ 1 // AMDGPU:#define cl_khr_byte_addressable_store 1 // AMDGCN:#define cl_khr_fp64 1 // AMDGPU:#define cl_khr_global_int32_base_atomics 1 // AMDGPU:#define cl_khr_global_int32_extended_atomics 1 // AMDGPU:#define cl_khr_local_int32_base_atomics 1 // AMDGPU:#define cl_khr_local_int32_extended_atomics 1 // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=sparc-none-none < /dev/null | FileCheck -match-full-lines -check-prefix SPARC -check-prefix SPARC-DEFAULT %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=sparc-rtems-elf < /dev/null | FileCheck -match-full-lines -check-prefix SPARC -check-prefix SPARC-DEFAULT %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=sparc-none-netbsd < /dev/null | FileCheck -match-full-lines -check-prefix SPARC -check-prefix SPARC-NETOPENBSD %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=sparc-none-openbsd < /dev/null | FileCheck -match-full-lines -check-prefix SPARC -check-prefix SPARC-NETOPENBSD %s // RUN: %clang_cc1 -x c++ -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=sparc-none-none < /dev/null | FileCheck -match-full-lines -check-prefix SPARC -check-prefix SPARC-DEFAULT -check-prefix SPARC-DEFAULT-CXX %s // RUN: %clang_cc1 -x c++ -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=sparc-none-openbsd < /dev/null | FileCheck -match-full-lines -check-prefix SPARC -check-prefix SPARC-NETOPENBSD -check-prefix SPARC-NETOPENBSD-CXX %s // // SPARC-NOT:#define _LP64 // SPARC:#define __BIGGEST_ALIGNMENT__ 8 // SPARC:#define __BIG_ENDIAN__ 1 // SPARC:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__ // SPARC:#define __CHAR16_TYPE__ unsigned short // SPARC:#define __CHAR32_TYPE__ unsigned int // SPARC:#define __CHAR_BIT__ 8 // SPARC:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 // SPARC:#define __DBL_DIG__ 15 // SPARC:#define __DBL_EPSILON__ 2.2204460492503131e-16 // SPARC:#define __DBL_HAS_DENORM__ 1 // SPARC:#define __DBL_HAS_INFINITY__ 1 // SPARC:#define __DBL_HAS_QUIET_NAN__ 1 // SPARC:#define __DBL_MANT_DIG__ 53 // SPARC:#define __DBL_MAX_10_EXP__ 308 // SPARC:#define __DBL_MAX_EXP__ 1024 // SPARC:#define __DBL_MAX__ 1.7976931348623157e+308 // SPARC:#define __DBL_MIN_10_EXP__ (-307) // SPARC:#define __DBL_MIN_EXP__ (-1021) // SPARC:#define __DBL_MIN__ 2.2250738585072014e-308 // SPARC:#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ // SPARC:#define __FLT_DENORM_MIN__ 1.40129846e-45F // SPARC:#define __FLT_DIG__ 6 // SPARC:#define __FLT_EPSILON__ 1.19209290e-7F // SPARC:#define __FLT_HAS_DENORM__ 1 // SPARC:#define __FLT_HAS_INFINITY__ 1 // SPARC:#define __FLT_HAS_QUIET_NAN__ 1 // SPARC:#define __FLT_MANT_DIG__ 24 // SPARC:#define __FLT_MAX_10_EXP__ 38 // SPARC:#define __FLT_MAX_EXP__ 128 // SPARC:#define __FLT_MAX__ 3.40282347e+38F // SPARC:#define __FLT_MIN_10_EXP__ (-37) // SPARC:#define __FLT_MIN_EXP__ (-125) // SPARC:#define __FLT_MIN__ 1.17549435e-38F // SPARC:#define __FLT_RADIX__ 2 // SPARC:#define __GCC_ATOMIC_LLONG_LOCK_FREE 1 // SPARC:#define __INT16_C_SUFFIX__ // SPARC:#define __INT16_FMTd__ "hd" // SPARC:#define __INT16_FMTi__ "hi" // SPARC:#define __INT16_MAX__ 32767 // SPARC:#define __INT16_TYPE__ short // SPARC:#define __INT32_C_SUFFIX__ // SPARC:#define __INT32_FMTd__ "d" // SPARC:#define __INT32_FMTi__ "i" // SPARC:#define __INT32_MAX__ 2147483647 // SPARC:#define __INT32_TYPE__ int // SPARC:#define __INT64_C_SUFFIX__ LL // SPARC:#define __INT64_FMTd__ "lld" // SPARC:#define __INT64_FMTi__ "lli" // SPARC:#define __INT64_MAX__ 9223372036854775807LL // SPARC:#define __INT64_TYPE__ long long int // SPARC:#define __INT8_C_SUFFIX__ // SPARC:#define __INT8_FMTd__ "hhd" // SPARC:#define __INT8_FMTi__ "hhi" // SPARC:#define __INT8_MAX__ 127 // SPARC:#define __INT8_TYPE__ signed char // SPARC:#define __INTMAX_C_SUFFIX__ LL // SPARC:#define __INTMAX_FMTd__ "lld" // SPARC:#define __INTMAX_FMTi__ "lli" // SPARC:#define __INTMAX_MAX__ 9223372036854775807LL // SPARC:#define __INTMAX_TYPE__ long long int // SPARC:#define __INTMAX_WIDTH__ 64 // SPARC-DEFAULT:#define __INTPTR_FMTd__ "d" // SPARC-DEFAULT:#define __INTPTR_FMTi__ "i" // SPARC-DEFAULT:#define __INTPTR_MAX__ 2147483647 // SPARC-DEFAULT:#define __INTPTR_TYPE__ int // SPARC-NETOPENBSD:#define __INTPTR_FMTd__ "ld" // SPARC-NETOPENBSD:#define __INTPTR_FMTi__ "li" // SPARC-NETOPENBSD:#define __INTPTR_MAX__ 2147483647L // SPARC-NETOPENBSD:#define __INTPTR_TYPE__ long int // SPARC:#define __INTPTR_WIDTH__ 32 // SPARC:#define __INT_FAST16_FMTd__ "hd" // SPARC:#define __INT_FAST16_FMTi__ "hi" // SPARC:#define __INT_FAST16_MAX__ 32767 // SPARC:#define __INT_FAST16_TYPE__ short // SPARC:#define __INT_FAST32_FMTd__ "d" // SPARC:#define __INT_FAST32_FMTi__ "i" // SPARC:#define __INT_FAST32_MAX__ 2147483647 // SPARC:#define __INT_FAST32_TYPE__ int // SPARC:#define __INT_FAST64_FMTd__ "lld" // SPARC:#define __INT_FAST64_FMTi__ "lli" // SPARC:#define __INT_FAST64_MAX__ 9223372036854775807LL // SPARC:#define __INT_FAST64_TYPE__ long long int // SPARC:#define __INT_FAST8_FMTd__ "hhd" // SPARC:#define __INT_FAST8_FMTi__ "hhi" // SPARC:#define __INT_FAST8_MAX__ 127 // SPARC:#define __INT_FAST8_TYPE__ signed char // SPARC:#define __INT_LEAST16_FMTd__ "hd" // SPARC:#define __INT_LEAST16_FMTi__ "hi" // SPARC:#define __INT_LEAST16_MAX__ 32767 // SPARC:#define __INT_LEAST16_TYPE__ short // SPARC:#define __INT_LEAST32_FMTd__ "d" // SPARC:#define __INT_LEAST32_FMTi__ "i" // SPARC:#define __INT_LEAST32_MAX__ 2147483647 // SPARC:#define __INT_LEAST32_TYPE__ int // SPARC:#define __INT_LEAST64_FMTd__ "lld" // SPARC:#define __INT_LEAST64_FMTi__ "lli" // SPARC:#define __INT_LEAST64_MAX__ 9223372036854775807LL // SPARC:#define __INT_LEAST64_TYPE__ long long int // SPARC:#define __INT_LEAST8_FMTd__ "hhd" // SPARC:#define __INT_LEAST8_FMTi__ "hhi" // SPARC:#define __INT_LEAST8_MAX__ 127 // SPARC:#define __INT_LEAST8_TYPE__ signed char // SPARC:#define __INT_MAX__ 2147483647 // SPARC:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L // SPARC:#define __LDBL_DIG__ 15 // SPARC:#define __LDBL_EPSILON__ 2.2204460492503131e-16L // SPARC:#define __LDBL_HAS_DENORM__ 1 // SPARC:#define __LDBL_HAS_INFINITY__ 1 // SPARC:#define __LDBL_HAS_QUIET_NAN__ 1 // SPARC:#define __LDBL_MANT_DIG__ 53 // SPARC:#define __LDBL_MAX_10_EXP__ 308 // SPARC:#define __LDBL_MAX_EXP__ 1024 // SPARC:#define __LDBL_MAX__ 1.7976931348623157e+308L // SPARC:#define __LDBL_MIN_10_EXP__ (-307) // SPARC:#define __LDBL_MIN_EXP__ (-1021) // SPARC:#define __LDBL_MIN__ 2.2250738585072014e-308L // SPARC:#define __LONG_LONG_MAX__ 9223372036854775807LL // SPARC:#define __LONG_MAX__ 2147483647L // SPARC-NOT:#define __LP64__ // SPARC:#define __POINTER_WIDTH__ 32 // SPARC-DEFAULT:#define __PTRDIFF_TYPE__ int // SPARC-NETOPENBSD:#define __PTRDIFF_TYPE__ long int // SPARC:#define __PTRDIFF_WIDTH__ 32 // SPARC:#define __REGISTER_PREFIX__ // SPARC:#define __SCHAR_MAX__ 127 // SPARC:#define __SHRT_MAX__ 32767 // SPARC:#define __SIG_ATOMIC_MAX__ 2147483647 // SPARC:#define __SIG_ATOMIC_WIDTH__ 32 // SPARC:#define __SIZEOF_DOUBLE__ 8 // SPARC:#define __SIZEOF_FLOAT__ 4 // SPARC:#define __SIZEOF_INT__ 4 // SPARC:#define __SIZEOF_LONG_DOUBLE__ 8 // SPARC:#define __SIZEOF_LONG_LONG__ 8 // SPARC:#define __SIZEOF_LONG__ 4 // SPARC:#define __SIZEOF_POINTER__ 4 // SPARC:#define __SIZEOF_PTRDIFF_T__ 4 // SPARC:#define __SIZEOF_SHORT__ 2 // SPARC:#define __SIZEOF_SIZE_T__ 4 // SPARC:#define __SIZEOF_WCHAR_T__ 4 // SPARC:#define __SIZEOF_WINT_T__ 4 // SPARC-DEFAULT:#define __SIZE_MAX__ 4294967295U // SPARC-DEFAULT:#define __SIZE_TYPE__ unsigned int // SPARC-NETOPENBSD:#define __SIZE_MAX__ 4294967295UL // SPARC-NETOPENBSD:#define __SIZE_TYPE__ long unsigned int // SPARC:#define __SIZE_WIDTH__ 32 // SPARC-DEFAULT-CXX:#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 8U // SPARC-NETOPENBSD-CXX:#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 8UL // SPARC:#define __UINT16_C_SUFFIX__ // SPARC:#define __UINT16_MAX__ 65535 // SPARC:#define __UINT16_TYPE__ unsigned short // SPARC:#define __UINT32_C_SUFFIX__ U // SPARC:#define __UINT32_MAX__ 4294967295U // SPARC:#define __UINT32_TYPE__ unsigned int // SPARC:#define __UINT64_C_SUFFIX__ ULL // SPARC:#define __UINT64_MAX__ 18446744073709551615ULL // SPARC:#define __UINT64_TYPE__ long long unsigned int // SPARC:#define __UINT8_C_SUFFIX__ // SPARC:#define __UINT8_MAX__ 255 // SPARC:#define __UINT8_TYPE__ unsigned char // SPARC:#define __UINTMAX_C_SUFFIX__ ULL // SPARC:#define __UINTMAX_MAX__ 18446744073709551615ULL // SPARC:#define __UINTMAX_TYPE__ long long unsigned int // SPARC:#define __UINTMAX_WIDTH__ 64 // SPARC-DEFAULT:#define __UINTPTR_MAX__ 4294967295U // SPARC-DEFAULT:#define __UINTPTR_TYPE__ unsigned int // SPARC-NETOPENBSD:#define __UINTPTR_MAX__ 4294967295UL // SPARC-NETOPENBSD:#define __UINTPTR_TYPE__ long unsigned int // SPARC:#define __UINTPTR_WIDTH__ 32 // SPARC:#define __UINT_FAST16_MAX__ 65535 // SPARC:#define __UINT_FAST16_TYPE__ unsigned short // SPARC:#define __UINT_FAST32_MAX__ 4294967295U // SPARC:#define __UINT_FAST32_TYPE__ unsigned int // SPARC:#define __UINT_FAST64_MAX__ 18446744073709551615ULL // SPARC:#define __UINT_FAST64_TYPE__ long long unsigned int // SPARC:#define __UINT_FAST8_MAX__ 255 // SPARC:#define __UINT_FAST8_TYPE__ unsigned char // SPARC:#define __UINT_LEAST16_MAX__ 65535 // SPARC:#define __UINT_LEAST16_TYPE__ unsigned short // SPARC:#define __UINT_LEAST32_MAX__ 4294967295U // SPARC:#define __UINT_LEAST32_TYPE__ unsigned int // SPARC:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL // SPARC:#define __UINT_LEAST64_TYPE__ long long unsigned int // SPARC:#define __UINT_LEAST8_MAX__ 255 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char // SPARC:#define __USER_LABEL_PREFIX__ // SPARC:#define __VERSION__ "{{.*}}Clang{{.*}} // SPARC:#define __WCHAR_MAX__ 2147483647 // SPARC:#define __WCHAR_TYPE__ int // SPARC:#define __WCHAR_WIDTH__ 32 // SPARC:#define __WINT_TYPE__ int // SPARC:#define __WINT_WIDTH__ 32 // SPARC:#define __sparc 1 // SPARC:#define __sparc__ 1 // SPARC:#define __sparcv8 1 // SPARC:#define sparc 1 // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=tce-none-none < /dev/null | FileCheck -match-full-lines -check-prefix TCE %s // RUN: %clang_cc1 -x c++ -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=tce-none-none < /dev/null | FileCheck -match-full-lines -check-prefix TCE -check-prefix TCE-CXX %s // // TCE-NOT:#define _LP64 // TCE:#define __BIGGEST_ALIGNMENT__ 4 // TCE:#define __BIG_ENDIAN__ 1 // TCE:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__ // TCE:#define __CHAR16_TYPE__ unsigned short // TCE:#define __CHAR32_TYPE__ unsigned int // TCE:#define __CHAR_BIT__ 8 // TCE:#define __DBL_DENORM_MIN__ 1.40129846e-45 // TCE:#define __DBL_DIG__ 6 // TCE:#define __DBL_EPSILON__ 1.19209290e-7 // TCE:#define __DBL_HAS_DENORM__ 1 // TCE:#define __DBL_HAS_INFINITY__ 1 // TCE:#define __DBL_HAS_QUIET_NAN__ 1 // TCE:#define __DBL_MANT_DIG__ 24 // TCE:#define __DBL_MAX_10_EXP__ 38 // TCE:#define __DBL_MAX_EXP__ 128 // TCE:#define __DBL_MAX__ 3.40282347e+38 // TCE:#define __DBL_MIN_10_EXP__ (-37) // TCE:#define __DBL_MIN_EXP__ (-125) // TCE:#define __DBL_MIN__ 1.17549435e-38 // TCE:#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ // TCE:#define __FLT_DENORM_MIN__ 1.40129846e-45F // TCE:#define __FLT_DIG__ 6 // TCE:#define __FLT_EPSILON__ 1.19209290e-7F // TCE:#define __FLT_HAS_DENORM__ 1 // TCE:#define __FLT_HAS_INFINITY__ 1 // TCE:#define __FLT_HAS_QUIET_NAN__ 1 // TCE:#define __FLT_MANT_DIG__ 24 // TCE:#define __FLT_MAX_10_EXP__ 38 // TCE:#define __FLT_MAX_EXP__ 128 // TCE:#define __FLT_MAX__ 3.40282347e+38F // TCE:#define __FLT_MIN_10_EXP__ (-37) // TCE:#define __FLT_MIN_EXP__ (-125) // TCE:#define __FLT_MIN__ 1.17549435e-38F // TCE:#define __FLT_RADIX__ 2 // TCE:#define __INT16_C_SUFFIX__ // TCE:#define __INT16_FMTd__ "hd" // TCE:#define __INT16_FMTi__ "hi" // TCE:#define __INT16_MAX__ 32767 // TCE:#define __INT16_TYPE__ short // TCE:#define __INT32_C_SUFFIX__ // TCE:#define __INT32_FMTd__ "d" // TCE:#define __INT32_FMTi__ "i" // TCE:#define __INT32_MAX__ 2147483647 // TCE:#define __INT32_TYPE__ int // TCE:#define __INT8_C_SUFFIX__ // TCE:#define __INT8_FMTd__ "hhd" // TCE:#define __INT8_FMTi__ "hhi" // TCE:#define __INT8_MAX__ 127 // TCE:#define __INT8_TYPE__ signed char // TCE:#define __INTMAX_C_SUFFIX__ L // TCE:#define __INTMAX_FMTd__ "ld" // TCE:#define __INTMAX_FMTi__ "li" // TCE:#define __INTMAX_MAX__ 2147483647L // TCE:#define __INTMAX_TYPE__ long int // TCE:#define __INTMAX_WIDTH__ 32 // TCE:#define __INTPTR_FMTd__ "d" // TCE:#define __INTPTR_FMTi__ "i" // TCE:#define __INTPTR_MAX__ 2147483647 // TCE:#define __INTPTR_TYPE__ int // TCE:#define __INTPTR_WIDTH__ 32 // TCE:#define __INT_FAST16_FMTd__ "hd" // TCE:#define __INT_FAST16_FMTi__ "hi" // TCE:#define __INT_FAST16_MAX__ 32767 // TCE:#define __INT_FAST16_TYPE__ short // TCE:#define __INT_FAST32_FMTd__ "d" // TCE:#define __INT_FAST32_FMTi__ "i" // TCE:#define __INT_FAST32_MAX__ 2147483647 // TCE:#define __INT_FAST32_TYPE__ int // TCE:#define __INT_FAST8_FMTd__ "hhd" // TCE:#define __INT_FAST8_FMTi__ "hhi" // TCE:#define __INT_FAST8_MAX__ 127 // TCE:#define __INT_FAST8_TYPE__ signed char // TCE:#define __INT_LEAST16_FMTd__ "hd" // TCE:#define __INT_LEAST16_FMTi__ "hi" // TCE:#define __INT_LEAST16_MAX__ 32767 // TCE:#define __INT_LEAST16_TYPE__ short // TCE:#define __INT_LEAST32_FMTd__ "d" // TCE:#define __INT_LEAST32_FMTi__ "i" // TCE:#define __INT_LEAST32_MAX__ 2147483647 // TCE:#define __INT_LEAST32_TYPE__ int // TCE:#define __INT_LEAST8_FMTd__ "hhd" // TCE:#define __INT_LEAST8_FMTi__ "hhi" // TCE:#define __INT_LEAST8_MAX__ 127 // TCE:#define __INT_LEAST8_TYPE__ signed char // TCE:#define __INT_MAX__ 2147483647 // TCE:#define __LDBL_DENORM_MIN__ 1.40129846e-45L // TCE:#define __LDBL_DIG__ 6 // TCE:#define __LDBL_EPSILON__ 1.19209290e-7L // TCE:#define __LDBL_HAS_DENORM__ 1 // TCE:#define __LDBL_HAS_INFINITY__ 1 // TCE:#define __LDBL_HAS_QUIET_NAN__ 1 // TCE:#define __LDBL_MANT_DIG__ 24 // TCE:#define __LDBL_MAX_10_EXP__ 38 // TCE:#define __LDBL_MAX_EXP__ 128 // TCE:#define __LDBL_MAX__ 3.40282347e+38L // TCE:#define __LDBL_MIN_10_EXP__ (-37) // TCE:#define __LDBL_MIN_EXP__ (-125) // TCE:#define __LDBL_MIN__ 1.17549435e-38L // TCE:#define __LONG_LONG_MAX__ 2147483647LL // TCE:#define __LONG_MAX__ 2147483647L // TCE-NOT:#define __LP64__ // TCE:#define __POINTER_WIDTH__ 32 // TCE:#define __PTRDIFF_TYPE__ int // TCE:#define __PTRDIFF_WIDTH__ 32 // TCE:#define __SCHAR_MAX__ 127 // TCE:#define __SHRT_MAX__ 32767 // TCE:#define __SIG_ATOMIC_MAX__ 2147483647 // TCE:#define __SIG_ATOMIC_WIDTH__ 32 // TCE:#define __SIZEOF_DOUBLE__ 4 // TCE:#define __SIZEOF_FLOAT__ 4 // TCE:#define __SIZEOF_INT__ 4 // TCE:#define __SIZEOF_LONG_DOUBLE__ 4 // TCE:#define __SIZEOF_LONG_LONG__ 4 // TCE:#define __SIZEOF_LONG__ 4 // TCE:#define __SIZEOF_POINTER__ 4 // TCE:#define __SIZEOF_PTRDIFF_T__ 4 // TCE:#define __SIZEOF_SHORT__ 2 // TCE:#define __SIZEOF_SIZE_T__ 4 // TCE:#define __SIZEOF_WCHAR_T__ 4 // TCE:#define __SIZEOF_WINT_T__ 4 // TCE:#define __SIZE_MAX__ 4294967295U // TCE:#define __SIZE_TYPE__ unsigned int // TCE:#define __SIZE_WIDTH__ 32 // TCE-CXX:#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 4U // TCE:#define __TCE_V1__ 1 // TCE:#define __TCE__ 1 // TCE:#define __UINT16_C_SUFFIX__ // TCE:#define __UINT16_MAX__ 65535 // TCE:#define __UINT16_TYPE__ unsigned short // TCE:#define __UINT32_C_SUFFIX__ U // TCE:#define __UINT32_MAX__ 4294967295U // TCE:#define __UINT32_TYPE__ unsigned int // TCE:#define __UINT8_C_SUFFIX__ // TCE:#define __UINT8_MAX__ 255 // TCE:#define __UINT8_TYPE__ unsigned char // TCE:#define __UINTMAX_C_SUFFIX__ UL // TCE:#define __UINTMAX_MAX__ 4294967295UL // TCE:#define __UINTMAX_TYPE__ long unsigned int // TCE:#define __UINTMAX_WIDTH__ 32 // TCE:#define __UINTPTR_MAX__ 4294967295U // TCE:#define __UINTPTR_TYPE__ unsigned int // TCE:#define __UINTPTR_WIDTH__ 32 // TCE:#define __UINT_FAST16_MAX__ 65535 // TCE:#define __UINT_FAST16_TYPE__ unsigned short // TCE:#define __UINT_FAST32_MAX__ 4294967295U // TCE:#define __UINT_FAST32_TYPE__ unsigned int // TCE:#define __UINT_FAST8_MAX__ 255 // TCE:#define __UINT_FAST8_TYPE__ unsigned char // TCE:#define __UINT_LEAST16_MAX__ 65535 // TCE:#define __UINT_LEAST16_TYPE__ unsigned short // TCE:#define __UINT_LEAST32_MAX__ 4294967295U // TCE:#define __UINT_LEAST32_TYPE__ unsigned int // TCE:#define __UINT_LEAST8_MAX__ 255 // TCE:#define __UINT_LEAST8_TYPE__ unsigned char // TCE:#define __USER_LABEL_PREFIX__ // TCE:#define __WCHAR_MAX__ 2147483647 // TCE:#define __WCHAR_TYPE__ int // TCE:#define __WCHAR_WIDTH__ 32 // TCE:#define __WINT_TYPE__ int // TCE:#define __WINT_WIDTH__ 32 // TCE:#define __tce 1 // TCE:#define __tce__ 1 // TCE:#define tce 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=x86_64-scei-ps4 < /dev/null | FileCheck -match-full-lines -check-prefix PS4 %s // // PS4:#define _LP64 1 // PS4:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ // PS4:#define __CHAR16_TYPE__ unsigned short // PS4:#define __CHAR32_TYPE__ unsigned int // PS4:#define __CHAR_BIT__ 8 // PS4:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 // PS4:#define __DBL_DIG__ 15 // PS4:#define __DBL_EPSILON__ 2.2204460492503131e-16 // PS4:#define __DBL_HAS_DENORM__ 1 // PS4:#define __DBL_HAS_INFINITY__ 1 // PS4:#define __DBL_HAS_QUIET_NAN__ 1 // PS4:#define __DBL_MANT_DIG__ 53 // PS4:#define __DBL_MAX_10_EXP__ 308 // PS4:#define __DBL_MAX_EXP__ 1024 // PS4:#define __DBL_MAX__ 1.7976931348623157e+308 // PS4:#define __DBL_MIN_10_EXP__ (-307) // PS4:#define __DBL_MIN_EXP__ (-1021) // PS4:#define __DBL_MIN__ 2.2250738585072014e-308 // PS4:#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ // PS4:#define __ELF__ 1 // PS4:#define __FLT_DENORM_MIN__ 1.40129846e-45F // PS4:#define __FLT_DIG__ 6 // PS4:#define __FLT_EPSILON__ 1.19209290e-7F // PS4:#define __FLT_HAS_DENORM__ 1 // PS4:#define __FLT_HAS_INFINITY__ 1 // PS4:#define __FLT_HAS_QUIET_NAN__ 1 // PS4:#define __FLT_MANT_DIG__ 24 // PS4:#define __FLT_MAX_10_EXP__ 38 // PS4:#define __FLT_MAX_EXP__ 128 // PS4:#define __FLT_MAX__ 3.40282347e+38F // PS4:#define __FLT_MIN_10_EXP__ (-37) // PS4:#define __FLT_MIN_EXP__ (-125) // PS4:#define __FLT_MIN__ 1.17549435e-38F // PS4:#define __FLT_RADIX__ 2 // PS4:#define __FreeBSD__ 9 // PS4:#define __FreeBSD_cc_version 900001 // PS4:#define __INT16_TYPE__ short // PS4:#define __INT32_TYPE__ int // PS4:#define __INT64_C_SUFFIX__ L // PS4:#define __INT64_TYPE__ long int // PS4:#define __INT8_TYPE__ signed char // PS4:#define __INTMAX_MAX__ 9223372036854775807L // PS4:#define __INTMAX_TYPE__ long int // PS4:#define __INTMAX_WIDTH__ 64 // PS4:#define __INTPTR_TYPE__ long int // PS4:#define __INTPTR_WIDTH__ 64 // PS4:#define __INT_MAX__ 2147483647 // PS4:#define __KPRINTF_ATTRIBUTE__ 1 // PS4:#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L // PS4:#define __LDBL_DIG__ 18 // PS4:#define __LDBL_EPSILON__ 1.08420217248550443401e-19L // PS4:#define __LDBL_HAS_DENORM__ 1 // PS4:#define __LDBL_HAS_INFINITY__ 1 // PS4:#define __LDBL_HAS_QUIET_NAN__ 1 // PS4:#define __LDBL_MANT_DIG__ 64 // PS4:#define __LDBL_MAX_10_EXP__ 4932 // PS4:#define __LDBL_MAX_EXP__ 16384 // PS4:#define __LDBL_MAX__ 1.18973149535723176502e+4932L // PS4:#define __LDBL_MIN_10_EXP__ (-4931) // PS4:#define __LDBL_MIN_EXP__ (-16381) // PS4:#define __LDBL_MIN__ 3.36210314311209350626e-4932L // PS4:#define __LITTLE_ENDIAN__ 1 // PS4:#define __LONG_LONG_MAX__ 9223372036854775807LL // PS4:#define __LONG_MAX__ 9223372036854775807L // PS4:#define __LP64__ 1 // PS4:#define __MMX__ 1 // PS4:#define __NO_MATH_INLINES 1 // PS4:#define __ORBIS__ 1 // PS4:#define __POINTER_WIDTH__ 64 // PS4:#define __PTRDIFF_MAX__ 9223372036854775807L // PS4:#define __PTRDIFF_TYPE__ long int // PS4:#define __PTRDIFF_WIDTH__ 64 // PS4:#define __REGISTER_PREFIX__ // PS4:#define __SCE__ 1 // PS4:#define __SCHAR_MAX__ 127 // PS4:#define __SHRT_MAX__ 32767 // PS4:#define __SIG_ATOMIC_MAX__ 2147483647 // PS4:#define __SIG_ATOMIC_WIDTH__ 32 // PS4:#define __SIZEOF_DOUBLE__ 8 // PS4:#define __SIZEOF_FLOAT__ 4 // PS4:#define __SIZEOF_INT__ 4 // PS4:#define __SIZEOF_LONG_DOUBLE__ 16 // PS4:#define __SIZEOF_LONG_LONG__ 8 // PS4:#define __SIZEOF_LONG__ 8 // PS4:#define __SIZEOF_POINTER__ 8 // PS4:#define __SIZEOF_PTRDIFF_T__ 8 // PS4:#define __SIZEOF_SHORT__ 2 // PS4:#define __SIZEOF_SIZE_T__ 8 // PS4:#define __SIZEOF_WCHAR_T__ 2 // PS4:#define __SIZEOF_WINT_T__ 4 // PS4:#define __SIZE_TYPE__ long unsigned int // PS4:#define __SIZE_WIDTH__ 64 // PS4:#define __SSE2_MATH__ 1 // PS4:#define __SSE2__ 1 // PS4:#define __SSE_MATH__ 1 // PS4:#define __SSE__ 1 // PS4:#define __STDC_VERSION__ 199901L // PS4:#define __UINTMAX_TYPE__ long unsigned int // PS4:#define __USER_LABEL_PREFIX__ // PS4:#define __WCHAR_MAX__ 65535 // PS4:#define __WCHAR_TYPE__ unsigned short // PS4:#define __WCHAR_UNSIGNED__ 1 // PS4:#define __WCHAR_WIDTH__ 16 // PS4:#define __WINT_TYPE__ int // PS4:#define __WINT_WIDTH__ 32 // PS4:#define __amd64 1 // PS4:#define __amd64__ 1 // PS4:#define __unix 1 // PS4:#define __unix__ 1 // PS4:#define __x86_64 1 // PS4:#define __x86_64__ 1 // PS4:#define unix 1 // // RUN: %clang_cc1 -x c++ -E -dM -ffreestanding -triple=x86_64-scei-ps4 < /dev/null | FileCheck -match-full-lines -check-prefix PS4-CXX %s // PS4-CXX:#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 32UL // // RUN: %clang_cc1 -E -dM -triple=x86_64-pc-mingw32 < /dev/null | FileCheck -match-full-lines -check-prefix X86-64-DECLSPEC %s // RUN: %clang_cc1 -E -dM -fms-extensions -triple=x86_64-unknown-mingw32 < /dev/null | FileCheck -match-full-lines -check-prefix X86-64-DECLSPEC %s // X86-64-DECLSPEC: #define __declspec{{.*}} // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc64-none-none < /dev/null | FileCheck -match-full-lines -check-prefix SPARCV9 %s // SPARCV9:#define __BIGGEST_ALIGNMENT__ 16 // SPARCV9:#define __INT64_TYPE__ long int // SPARCV9:#define __INTMAX_C_SUFFIX__ L // SPARCV9:#define __INTMAX_TYPE__ long int // SPARCV9:#define __INTPTR_TYPE__ long int // SPARCV9:#define __LONG_MAX__ 9223372036854775807L // SPARCV9:#define __LP64__ 1 // SPARCV9:#define __SIZEOF_LONG__ 8 // SPARCV9:#define __SIZEOF_POINTER__ 8 // SPARCV9:#define __UINTPTR_TYPE__ long unsigned int // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc64-none-openbsd < /dev/null | FileCheck -match-full-lines -check-prefix SPARC64-OBSD %s // SPARC64-OBSD:#define __INT64_TYPE__ long long int // SPARC64-OBSD:#define __INTMAX_C_SUFFIX__ LL // SPARC64-OBSD:#define __INTMAX_TYPE__ long long int // SPARC64-OBSD:#define __UINTMAX_C_SUFFIX__ ULL // SPARC64-OBSD:#define __UINTMAX_TYPE__ long long unsigned int // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=x86_64-pc-kfreebsd-gnu < /dev/null | FileCheck -match-full-lines -check-prefix KFREEBSD-DEFINE %s // KFREEBSD-DEFINE:#define __FreeBSD_kernel__ 1 // KFREEBSD-DEFINE:#define __GLIBC__ 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=i686-pc-kfreebsd-gnu < /dev/null | FileCheck -match-full-lines -check-prefix KFREEBSDI686-DEFINE %s // KFREEBSDI686-DEFINE:#define __FreeBSD_kernel__ 1 // KFREEBSDI686-DEFINE:#define __GLIBC__ 1 // // RUN: %clang_cc1 -x c++ -triple i686-pc-linux-gnu -fobjc-runtime=gcc -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GNUSOURCE %s // RUN: %clang_cc1 -x c++ -triple sparc-rtems-elf -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GNUSOURCE %s // GNUSOURCE:#define _GNU_SOURCE 1 // // Check that the GNUstep Objective-C ABI defines exist and are clamped at the // highest supported version. // RUN: %clang_cc1 -x objective-c -triple i386-unknown-freebsd -fobjc-runtime=gnustep-1.9 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GNUSTEP1 %s // GNUSTEP1:#define __OBJC_GNUSTEP_RUNTIME_ABI__ 18 // RUN: %clang_cc1 -x objective-c -triple i386-unknown-freebsd -fobjc-runtime=gnustep-2.5 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GNUSTEP2 %s // GNUSTEP2:#define __OBJC_GNUSTEP_RUNTIME_ABI__ 20 // // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++98 -fno-rtti -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix NORTTI %s // NORTTI: #define __GXX_ABI_VERSION {{.*}} // NORTTI-NOT:#define __GXX_RTTI // NORTTI:#define __STDC__ 1 // // RUN: %clang_cc1 -triple arm-linux-androideabi -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix ANDROID %s // ANDROID-NOT:#define __ANDROID_API__ // ANDROID-NOT:#define __ANDROID_MIN_SDK_VERSION__ // ANDROID:#define __ANDROID__ 1 // ANDROID-NOT:#define __gnu_linux__ // // RUN: %clang_cc1 -x c++ -triple i686-linux-android -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix I386-ANDROID-CXX %s // I386-ANDROID-CXX:#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 8U // // RUN: %clang_cc1 -x c++ -triple x86_64-linux-android -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix X86_64-ANDROID-CXX %s // X86_64-ANDROID-CXX:#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16UL // // RUN: %clang_cc1 -triple arm-linux-androideabi20 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix ANDROID20 %s // ANDROID20:#define __ANDROID_API__ __ANDROID_MIN_SDK_VERSION__ // ANDROID20:#define __ANDROID_MIN_SDK_VERSION__ 20 // ANDROID20:#define __ANDROID__ 1 // ANDROID-NOT:#define __gnu_linux__ // // RUN: %clang_cc1 -triple lanai-unknown-unknown -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix LANAI %s // LANAI: #define __lanai__ 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=amd64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s // RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s // RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-unknown-openbsd6.1-gnueabi < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s // RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64le-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s // RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s // RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64el-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s // RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s // RUN: %clang_cc1 -E -dM -ffreestanding -triple=riscv64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s // OPENBSD:#define __ELF__ 1 // OPENBSD:#define __INT16_TYPE__ short // OPENBSD:#define __INT32_TYPE__ int // OPENBSD:#define __INT64_TYPE__ long long int // OPENBSD:#define __INT8_TYPE__ signed char // OPENBSD:#define __INTMAX_TYPE__ long long int // OPENBSD:#define __INTPTR_TYPE__ long int // OPENBSD:#define __OpenBSD__ 1 // OPENBSD:#define __PTRDIFF_TYPE__ long int // OPENBSD:#define __SIZE_TYPE__ long unsigned int // OPENBSD:#define __UINT16_TYPE__ unsigned short // OPENBSD:#define __UINT32_TYPE__ unsigned int // OPENBSD:#define __UINT64_TYPE__ long long unsigned int // OPENBSD:#define __UINT8_TYPE__ unsigned char // OPENBSD:#define __UINTMAX_TYPE__ long long unsigned int // OPENBSD:#define __UINTPTR_TYPE__ long unsigned int // OPENBSD:#define __WCHAR_TYPE__ int // OPENBSD:#define __WINT_TYPE__ int // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=xcore-none-none < /dev/null | FileCheck -match-full-lines -check-prefix XCORE %s // XCORE:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ // XCORE:#define __LITTLE_ENDIAN__ 1 // XCORE:#define __XS1B__ 1 // XCORE:#define __xcore__ 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm32-unknown-unknown \ // RUN: < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY32 %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm64-unknown-unknown \ // RUN: < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY64 %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm32-emscripten \ // RUN: < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY32,EMSCRIPTEN %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm32-emscripten -pthread -target-feature +atomics \ // RUN: < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY32,EMSCRIPTEN,EMSCRIPTEN-THREADS %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm64-emscripten \ // RUN: < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY64,EMSCRIPTEN %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm32-wasi \ // RUN: < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY32,WEBASSEMBLY-WASI %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm64-wasi \ // RUN: < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY64,WEBASSEMBLY-WASI %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm32-unknown-unknown -x c++ \ // RUN: < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY-CXX %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm32-unknown-unknown -x c++ -pthread -target-feature +atomics \ // RUN: < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY-CXX-ATOMICS %s // // WEBASSEMBLY32:#define _ILP32 1 // WEBASSEMBLY32-NOT:#define _LP64 // WEBASSEMBLY64-NOT:#define _ILP32 // WEBASSEMBLY64:#define _LP64 1 // EMSCRIPTEN-THREADS:#define _REENTRANT 1 // WEBASSEMBLY-NEXT:#define __ATOMIC_ACQUIRE 2 // WEBASSEMBLY-NEXT:#define __ATOMIC_ACQ_REL 4 // WEBASSEMBLY-NEXT:#define __ATOMIC_CONSUME 1 // WEBASSEMBLY-NEXT:#define __ATOMIC_RELAXED 0 // WEBASSEMBLY-NEXT:#define __ATOMIC_RELEASE 3 // WEBASSEMBLY-NEXT:#define __ATOMIC_SEQ_CST 5 // WEBASSEMBLY-NEXT:#define __BIGGEST_ALIGNMENT__ 16 // WEBASSEMBLY-NEXT:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ // WEBASSEMBLY-NEXT:#define __CHAR16_TYPE__ unsigned short // WEBASSEMBLY-NEXT:#define __CHAR32_TYPE__ unsigned int // WEBASSEMBLY-NEXT:#define __CHAR_BIT__ 8 // WEBASSEMBLY-NOT:#define __CHAR_UNSIGNED__ // WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_BOOL_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_CHAR16_T_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_CHAR32_T_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_CHAR_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_INT_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_LLONG_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_LONG_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_POINTER_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_SHORT_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __CONSTANT_CFSTRINGS__ 1 // WEBASSEMBLY-NEXT:#define __DBL_DECIMAL_DIG__ 17 // WEBASSEMBLY-NEXT:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 // WEBASSEMBLY-NEXT:#define __DBL_DIG__ 15 // WEBASSEMBLY-NEXT:#define __DBL_EPSILON__ 2.2204460492503131e-16 // WEBASSEMBLY-NEXT:#define __DBL_HAS_DENORM__ 1 // WEBASSEMBLY-NEXT:#define __DBL_HAS_INFINITY__ 1 // WEBASSEMBLY-NEXT:#define __DBL_HAS_QUIET_NAN__ 1 // WEBASSEMBLY-NEXT:#define __DBL_MANT_DIG__ 53 // WEBASSEMBLY-NEXT:#define __DBL_MAX_10_EXP__ 308 // WEBASSEMBLY-NEXT:#define __DBL_MAX_EXP__ 1024 // WEBASSEMBLY-NEXT:#define __DBL_MAX__ 1.7976931348623157e+308 // WEBASSEMBLY-NEXT:#define __DBL_MIN_10_EXP__ (-307) // WEBASSEMBLY-NEXT:#define __DBL_MIN_EXP__ (-1021) // WEBASSEMBLY-NEXT:#define __DBL_MIN__ 2.2250738585072014e-308 // WEBASSEMBLY-NEXT:#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ // WEBASSEMBLY-NOT:#define __ELF__ // EMSCRIPTEN-THREADS-NEXT:#define __EMSCRIPTEN_PTHREADS__ 1 // EMSCRIPTEN-NEXT:#define __EMSCRIPTEN__ 1 // WEBASSEMBLY-NEXT:#define __FINITE_MATH_ONLY__ 0 // WEBASSEMBLY-NEXT:#define __FLOAT128__ 1 // WEBASSEMBLY-NOT:#define __FLT16_DECIMAL_DIG__ // WEBASSEMBLY-NOT:#define __FLT16_DENORM_MIN__ // WEBASSEMBLY-NOT:#define __FLT16_DIG__ // WEBASSEMBLY-NOT:#define __FLT16_EPSILON__ // WEBASSEMBLY-NOT:#define __FLT16_HAS_DENORM__ // WEBASSEMBLY-NOT:#define __FLT16_HAS_INFINITY__ // WEBASSEMBLY-NOT:#define __FLT16_HAS_QUIET_NAN__ // WEBASSEMBLY-NOT:#define __FLT16_MANT_DIG__ // WEBASSEMBLY-NOT:#define __FLT16_MAX_10_EXP__ // WEBASSEMBLY-NOT:#define __FLT16_MAX_EXP__ // WEBASSEMBLY-NOT:#define __FLT16_MAX__ // WEBASSEMBLY-NOT:#define __FLT16_MIN_10_EXP__ // WEBASSEMBLY-NOT:#define __FLT16_MIN_EXP__ // WEBASSEMBLY-NOT:#define __FLT16_MIN__ // WEBASSEMBLY-NEXT:#define __FLT_DECIMAL_DIG__ 9 // WEBASSEMBLY-NEXT:#define __FLT_DENORM_MIN__ 1.40129846e-45F // WEBASSEMBLY-NEXT:#define __FLT_DIG__ 6 // WEBASSEMBLY-NEXT:#define __FLT_EPSILON__ 1.19209290e-7F // WEBASSEMBLY-NEXT:#define __FLT_HAS_DENORM__ 1 // WEBASSEMBLY-NEXT:#define __FLT_HAS_INFINITY__ 1 // WEBASSEMBLY-NEXT:#define __FLT_HAS_QUIET_NAN__ 1 // WEBASSEMBLY-NEXT:#define __FLT_MANT_DIG__ 24 // WEBASSEMBLY-NEXT:#define __FLT_MAX_10_EXP__ 38 // WEBASSEMBLY-NEXT:#define __FLT_MAX_EXP__ 128 // WEBASSEMBLY-NEXT:#define __FLT_MAX__ 3.40282347e+38F // WEBASSEMBLY-NEXT:#define __FLT_MIN_10_EXP__ (-37) // WEBASSEMBLY-NEXT:#define __FLT_MIN_EXP__ (-125) // WEBASSEMBLY-NEXT:#define __FLT_MIN__ 1.17549435e-38F // WEBASSEMBLY-NEXT:#define __FLT_RADIX__ 2 // WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_INT_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_LONG_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 // WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 // WEBASSEMBLY-NEXT:#define __GNUC_MINOR__ {{.*}} // WEBASSEMBLY-NEXT:#define __GNUC_PATCHLEVEL__ {{.*}} // WEBASSEMBLY-NEXT:#define __GNUC_STDC_INLINE__ 1 // WEBASSEMBLY-NEXT:#define __GNUC__ {{.*}} // WEBASSEMBLY-NEXT:#define __GXX_ABI_VERSION 1002 // WEBASSEMBLY32-NEXT:#define __ILP32__ 1 // WEBASSEMBLY64-NOT:#define __ILP32__ // WEBASSEMBLY-NEXT:#define __INT16_C_SUFFIX__ // WEBASSEMBLY-NEXT:#define __INT16_FMTd__ "hd" // WEBASSEMBLY-NEXT:#define __INT16_FMTi__ "hi" // WEBASSEMBLY-NEXT:#define __INT16_MAX__ 32767 // WEBASSEMBLY-NEXT:#define __INT16_TYPE__ short // WEBASSEMBLY-NEXT:#define __INT32_C_SUFFIX__ // WEBASSEMBLY-NEXT:#define __INT32_FMTd__ "d" // WEBASSEMBLY-NEXT:#define __INT32_FMTi__ "i" // WEBASSEMBLY-NEXT:#define __INT32_MAX__ 2147483647 // WEBASSEMBLY-NEXT:#define __INT32_TYPE__ int // WEBASSEMBLY-NEXT:#define __INT64_C_SUFFIX__ LL // WEBASSEMBLY-NEXT:#define __INT64_FMTd__ "lld" // WEBASSEMBLY-NEXT:#define __INT64_FMTi__ "lli" // WEBASSEMBLY-NEXT:#define __INT64_MAX__ 9223372036854775807LL // WEBASSEMBLY-NEXT:#define __INT64_TYPE__ long long int // WEBASSEMBLY-NEXT:#define __INT8_C_SUFFIX__ // WEBASSEMBLY-NEXT:#define __INT8_FMTd__ "hhd" // WEBASSEMBLY-NEXT:#define __INT8_FMTi__ "hhi" // WEBASSEMBLY-NEXT:#define __INT8_MAX__ 127 // WEBASSEMBLY-NEXT:#define __INT8_TYPE__ signed char // WEBASSEMBLY-NEXT:#define __INTMAX_C_SUFFIX__ LL // WEBASSEMBLY-NEXT:#define __INTMAX_FMTd__ "lld" // WEBASSEMBLY-NEXT:#define __INTMAX_FMTi__ "lli" // WEBASSEMBLY-NEXT:#define __INTMAX_MAX__ 9223372036854775807LL // WEBASSEMBLY-NEXT:#define __INTMAX_TYPE__ long long int // WEBASSEMBLY-NEXT:#define __INTMAX_WIDTH__ 64 // WEBASSEMBLY-NEXT:#define __INTPTR_FMTd__ "ld" // WEBASSEMBLY-NEXT:#define __INTPTR_FMTi__ "li" // WEBASSEMBLY32-NEXT:#define __INTPTR_MAX__ 2147483647L // WEBASSEMBLY64-NEXT:#define __INTPTR_MAX__ 9223372036854775807L // WEBASSEMBLY-NEXT:#define __INTPTR_TYPE__ long int // WEBASSEMBLY32-NEXT:#define __INTPTR_WIDTH__ 32 // WEBASSEMBLY64-NEXT:#define __INTPTR_WIDTH__ 64 // WEBASSEMBLY-NEXT:#define __INT_FAST16_FMTd__ "hd" // WEBASSEMBLY-NEXT:#define __INT_FAST16_FMTi__ "hi" // WEBASSEMBLY-NEXT:#define __INT_FAST16_MAX__ 32767 // WEBASSEMBLY-NEXT:#define __INT_FAST16_TYPE__ short // WEBASSEMBLY-NEXT:#define __INT_FAST32_FMTd__ "d" // WEBASSEMBLY-NEXT:#define __INT_FAST32_FMTi__ "i" // WEBASSEMBLY-NEXT:#define __INT_FAST32_MAX__ 2147483647 // WEBASSEMBLY-NEXT:#define __INT_FAST32_TYPE__ int // WEBASSEMBLY-NEXT:#define __INT_FAST64_FMTd__ "lld" // WEBASSEMBLY-NEXT:#define __INT_FAST64_FMTi__ "lli" // WEBASSEMBLY-NEXT:#define __INT_FAST64_MAX__ 9223372036854775807LL // WEBASSEMBLY-NEXT:#define __INT_FAST64_TYPE__ long long int // WEBASSEMBLY-NEXT:#define __INT_FAST8_FMTd__ "hhd" // WEBASSEMBLY-NEXT:#define __INT_FAST8_FMTi__ "hhi" // WEBASSEMBLY-NEXT:#define __INT_FAST8_MAX__ 127 // WEBASSEMBLY-NEXT:#define __INT_FAST8_TYPE__ signed char // WEBASSEMBLY-NEXT:#define __INT_LEAST16_FMTd__ "hd" // WEBASSEMBLY-NEXT:#define __INT_LEAST16_FMTi__ "hi" // WEBASSEMBLY-NEXT:#define __INT_LEAST16_MAX__ 32767 // WEBASSEMBLY-NEXT:#define __INT_LEAST16_TYPE__ short // WEBASSEMBLY-NEXT:#define __INT_LEAST32_FMTd__ "d" // WEBASSEMBLY-NEXT:#define __INT_LEAST32_FMTi__ "i" // WEBASSEMBLY-NEXT:#define __INT_LEAST32_MAX__ 2147483647 // WEBASSEMBLY-NEXT:#define __INT_LEAST32_TYPE__ int // WEBASSEMBLY-NEXT:#define __INT_LEAST64_FMTd__ "lld" // WEBASSEMBLY-NEXT:#define __INT_LEAST64_FMTi__ "lli" // WEBASSEMBLY-NEXT:#define __INT_LEAST64_MAX__ 9223372036854775807LL // WEBASSEMBLY-NEXT:#define __INT_LEAST64_TYPE__ long long int // WEBASSEMBLY-NEXT:#define __INT_LEAST8_FMTd__ "hhd" // WEBASSEMBLY-NEXT:#define __INT_LEAST8_FMTi__ "hhi" // WEBASSEMBLY-NEXT:#define __INT_LEAST8_MAX__ 127 // WEBASSEMBLY-NEXT:#define __INT_LEAST8_TYPE__ signed char // WEBASSEMBLY-NEXT:#define __INT_MAX__ 2147483647 // WEBASSEMBLY-NEXT:#define __LDBL_DECIMAL_DIG__ 36 // WEBASSEMBLY-NEXT:#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L // WEBASSEMBLY-NEXT:#define __LDBL_DIG__ 33 // WEBASSEMBLY-NEXT:#define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L // WEBASSEMBLY-NEXT:#define __LDBL_HAS_DENORM__ 1 // WEBASSEMBLY-NEXT:#define __LDBL_HAS_INFINITY__ 1 // WEBASSEMBLY-NEXT:#define __LDBL_HAS_QUIET_NAN__ 1 // WEBASSEMBLY-NEXT:#define __LDBL_MANT_DIG__ 113 // WEBASSEMBLY-NEXT:#define __LDBL_MAX_10_EXP__ 4932 // WEBASSEMBLY-NEXT:#define __LDBL_MAX_EXP__ 16384 // WEBASSEMBLY-NEXT:#define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L // WEBASSEMBLY-NEXT:#define __LDBL_MIN_10_EXP__ (-4931) // WEBASSEMBLY-NEXT:#define __LDBL_MIN_EXP__ (-16381) // WEBASSEMBLY-NEXT:#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L // WEBASSEMBLY-NEXT:#define __LITTLE_ENDIAN__ 1 // WEBASSEMBLY-NEXT:#define __LONG_LONG_MAX__ 9223372036854775807LL // WEBASSEMBLY32-NEXT:#define __LONG_MAX__ 2147483647L // WEBASSEMBLY32-NOT:#define __LP64__ // WEBASSEMBLY64-NEXT:#define __LONG_MAX__ 9223372036854775807L // WEBASSEMBLY64-NEXT:#define __LP64__ 1 // WEBASSEMBLY-NEXT:#define __NO_INLINE__ 1 // WEBASSEMBLY-NEXT:#define __OBJC_BOOL_IS_BOOL 0 // WEBASSEMBLY-NEXT:#define __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES 3 // WEBASSEMBLY-NEXT:#define __OPENCL_MEMORY_SCOPE_DEVICE 2 // WEBASSEMBLY-NEXT:#define __OPENCL_MEMORY_SCOPE_SUB_GROUP 4 // WEBASSEMBLY-NEXT:#define __OPENCL_MEMORY_SCOPE_WORK_GROUP 1 // WEBASSEMBLY-NEXT:#define __OPENCL_MEMORY_SCOPE_WORK_ITEM 0 // WEBASSEMBLY-NEXT:#define __ORDER_BIG_ENDIAN__ 4321 // WEBASSEMBLY-NEXT:#define __ORDER_LITTLE_ENDIAN__ 1234 // WEBASSEMBLY-NEXT:#define __ORDER_PDP_ENDIAN__ 3412 // WEBASSEMBLY32-NEXT:#define __POINTER_WIDTH__ 32 // WEBASSEMBLY64-NEXT:#define __POINTER_WIDTH__ 64 // WEBASSEMBLY-NEXT:#define __PRAGMA_REDEFINE_EXTNAME 1 // WEBASSEMBLY-NEXT:#define __PTRDIFF_FMTd__ "ld" // WEBASSEMBLY-NEXT:#define __PTRDIFF_FMTi__ "li" // WEBASSEMBLY32-NEXT:#define __PTRDIFF_MAX__ 2147483647L // WEBASSEMBLY64-NEXT:#define __PTRDIFF_MAX__ 9223372036854775807L // WEBASSEMBLY-NEXT:#define __PTRDIFF_TYPE__ long int // WEBASSEMBLY32-NEXT:#define __PTRDIFF_WIDTH__ 32 // WEBASSEMBLY64-NEXT:#define __PTRDIFF_WIDTH__ 64 // WEBASSEMBLY-NOT:#define __REGISTER_PREFIX__ // WEBASSEMBLY-NEXT:#define __SCHAR_MAX__ 127 // WEBASSEMBLY-NEXT:#define __SHRT_MAX__ 32767 // WEBASSEMBLY32-NEXT:#define __SIG_ATOMIC_MAX__ 2147483647L // WEBASSEMBLY32-NEXT:#define __SIG_ATOMIC_WIDTH__ 32 // WEBASSEMBLY64-NEXT:#define __SIG_ATOMIC_MAX__ 9223372036854775807L // WEBASSEMBLY64-NEXT:#define __SIG_ATOMIC_WIDTH__ 64 // WEBASSEMBLY-NEXT:#define __SIZEOF_DOUBLE__ 8 // WEBASSEMBLY-NEXT:#define __SIZEOF_FLOAT__ 4 // WEBASSEMBLY-NEXT:#define __SIZEOF_INT128__ 16 // WEBASSEMBLY-NEXT:#define __SIZEOF_INT__ 4 // WEBASSEMBLY-NEXT:#define __SIZEOF_LONG_DOUBLE__ 16 // WEBASSEMBLY-NEXT:#define __SIZEOF_LONG_LONG__ 8 // WEBASSEMBLY32-NEXT:#define __SIZEOF_LONG__ 4 // WEBASSEMBLY32-NEXT:#define __SIZEOF_POINTER__ 4 // WEBASSEMBLY32-NEXT:#define __SIZEOF_PTRDIFF_T__ 4 // WEBASSEMBLY64-NEXT:#define __SIZEOF_LONG__ 8 // WEBASSEMBLY64-NEXT:#define __SIZEOF_POINTER__ 8 // WEBASSEMBLY64-NEXT:#define __SIZEOF_PTRDIFF_T__ 8 // WEBASSEMBLY-NEXT:#define __SIZEOF_SHORT__ 2 // WEBASSEMBLY32-NEXT:#define __SIZEOF_SIZE_T__ 4 // WEBASSEMBLY64-NEXT:#define __SIZEOF_SIZE_T__ 8 // WEBASSEMBLY-NEXT:#define __SIZEOF_WCHAR_T__ 4 // WEBASSEMBLY-NEXT:#define __SIZEOF_WINT_T__ 4 // WEBASSEMBLY-NEXT:#define __SIZE_FMTX__ "lX" // WEBASSEMBLY-NEXT:#define __SIZE_FMTo__ "lo" // WEBASSEMBLY-NEXT:#define __SIZE_FMTu__ "lu" // WEBASSEMBLY-NEXT:#define __SIZE_FMTx__ "lx" // WEBASSEMBLY32-NEXT:#define __SIZE_MAX__ 4294967295UL // WEBASSEMBLY64-NEXT:#define __SIZE_MAX__ 18446744073709551615UL // WEBASSEMBLY-NEXT:#define __SIZE_TYPE__ long unsigned int // WEBASSEMBLY32-NEXT:#define __SIZE_WIDTH__ 32 // WEBASSEMBLY64-NEXT:#define __SIZE_WIDTH__ 64 // WEBASSEMBLY-NEXT:#define __STDC_HOSTED__ 0 // WEBASSEMBLY-NOT:#define __STDC_MB_MIGHT_NEQ_WC__ // WEBASSEMBLY-NOT:#define __STDC_NO_ATOMICS__ // WEBASSEMBLY-NOT:#define __STDC_NO_COMPLEX__ // WEBASSEMBLY-NOT:#define __STDC_NO_VLA__ // WEBASSEMBLY-NOT:#define __STDC_NO_THREADS__ // WEBASSEMBLY-NEXT:#define __STDC_UTF_16__ 1 // WEBASSEMBLY-NEXT:#define __STDC_UTF_32__ 1 // WEBASSEMBLY-NEXT:#define __STDC_VERSION__ 201710L // WEBASSEMBLY-NEXT:#define __STDC__ 1 // WEBASSEMBLY-NEXT:#define __UINT16_C_SUFFIX__ // WEBASSEMBLY-NEXT:#define __UINT16_FMTX__ "hX" // WEBASSEMBLY-NEXT:#define __UINT16_FMTo__ "ho" // WEBASSEMBLY-NEXT:#define __UINT16_FMTu__ "hu" // WEBASSEMBLY-NEXT:#define __UINT16_FMTx__ "hx" // WEBASSEMBLY-NEXT:#define __UINT16_MAX__ 65535 // WEBASSEMBLY-NEXT:#define __UINT16_TYPE__ unsigned short // WEBASSEMBLY-NEXT:#define __UINT32_C_SUFFIX__ U // WEBASSEMBLY-NEXT:#define __UINT32_FMTX__ "X" // WEBASSEMBLY-NEXT:#define __UINT32_FMTo__ "o" // WEBASSEMBLY-NEXT:#define __UINT32_FMTu__ "u" // WEBASSEMBLY-NEXT:#define __UINT32_FMTx__ "x" // WEBASSEMBLY-NEXT:#define __UINT32_MAX__ 4294967295U // WEBASSEMBLY-NEXT:#define __UINT32_TYPE__ unsigned int // WEBASSEMBLY-NEXT:#define __UINT64_C_SUFFIX__ ULL // WEBASSEMBLY-NEXT:#define __UINT64_FMTX__ "llX" // WEBASSEMBLY-NEXT:#define __UINT64_FMTo__ "llo" // WEBASSEMBLY-NEXT:#define __UINT64_FMTu__ "llu" // WEBASSEMBLY-NEXT:#define __UINT64_FMTx__ "llx" // WEBASSEMBLY-NEXT:#define __UINT64_MAX__ 18446744073709551615ULL // WEBASSEMBLY-NEXT:#define __UINT64_TYPE__ long long unsigned int // WEBASSEMBLY-NEXT:#define __UINT8_C_SUFFIX__ // WEBASSEMBLY-NEXT:#define __UINT8_FMTX__ "hhX" // WEBASSEMBLY-NEXT:#define __UINT8_FMTo__ "hho" // WEBASSEMBLY-NEXT:#define __UINT8_FMTu__ "hhu" // WEBASSEMBLY-NEXT:#define __UINT8_FMTx__ "hhx" // WEBASSEMBLY-NEXT:#define __UINT8_MAX__ 255 // WEBASSEMBLY-NEXT:#define __UINT8_TYPE__ unsigned char // WEBASSEMBLY-NEXT:#define __UINTMAX_C_SUFFIX__ ULL // WEBASSEMBLY-NEXT:#define __UINTMAX_FMTX__ "llX" // WEBASSEMBLY-NEXT:#define __UINTMAX_FMTo__ "llo" // WEBASSEMBLY-NEXT:#define __UINTMAX_FMTu__ "llu" // WEBASSEMBLY-NEXT:#define __UINTMAX_FMTx__ "llx" // WEBASSEMBLY-NEXT:#define __UINTMAX_MAX__ 18446744073709551615ULL // WEBASSEMBLY-NEXT:#define __UINTMAX_TYPE__ long long unsigned int // WEBASSEMBLY-NEXT:#define __UINTMAX_WIDTH__ 64 // WEBASSEMBLY-NEXT:#define __UINTPTR_FMTX__ "lX" // WEBASSEMBLY-NEXT:#define __UINTPTR_FMTo__ "lo" // WEBASSEMBLY-NEXT:#define __UINTPTR_FMTu__ "lu" // WEBASSEMBLY-NEXT:#define __UINTPTR_FMTx__ "lx" // WEBASSEMBLY32-NEXT:#define __UINTPTR_MAX__ 4294967295UL // WEBASSEMBLY64-NEXT:#define __UINTPTR_MAX__ 18446744073709551615UL // WEBASSEMBLY-NEXT:#define __UINTPTR_TYPE__ long unsigned int // WEBASSEMBLY32-NEXT:#define __UINTPTR_WIDTH__ 32 // WEBASSEMBLY64-NEXT:#define __UINTPTR_WIDTH__ 64 // WEBASSEMBLY-NEXT:#define __UINT_FAST16_FMTX__ "hX" // WEBASSEMBLY-NEXT:#define __UINT_FAST16_FMTo__ "ho" // WEBASSEMBLY-NEXT:#define __UINT_FAST16_FMTu__ "hu" // WEBASSEMBLY-NEXT:#define __UINT_FAST16_FMTx__ "hx" // WEBASSEMBLY-NEXT:#define __UINT_FAST16_MAX__ 65535 // WEBASSEMBLY-NEXT:#define __UINT_FAST16_TYPE__ unsigned short // WEBASSEMBLY-NEXT:#define __UINT_FAST32_FMTX__ "X" // WEBASSEMBLY-NEXT:#define __UINT_FAST32_FMTo__ "o" // WEBASSEMBLY-NEXT:#define __UINT_FAST32_FMTu__ "u" // WEBASSEMBLY-NEXT:#define __UINT_FAST32_FMTx__ "x" // WEBASSEMBLY-NEXT:#define __UINT_FAST32_MAX__ 4294967295U // WEBASSEMBLY-NEXT:#define __UINT_FAST32_TYPE__ unsigned int // WEBASSEMBLY-NEXT:#define __UINT_FAST64_FMTX__ "llX" // WEBASSEMBLY-NEXT:#define __UINT_FAST64_FMTo__ "llo" // WEBASSEMBLY-NEXT:#define __UINT_FAST64_FMTu__ "llu" // WEBASSEMBLY-NEXT:#define __UINT_FAST64_FMTx__ "llx" // WEBASSEMBLY-NEXT:#define __UINT_FAST64_MAX__ 18446744073709551615ULL // WEBASSEMBLY-NEXT:#define __UINT_FAST64_TYPE__ long long unsigned int // WEBASSEMBLY-NEXT:#define __UINT_FAST8_FMTX__ "hhX" // WEBASSEMBLY-NEXT:#define __UINT_FAST8_FMTo__ "hho" // WEBASSEMBLY-NEXT:#define __UINT_FAST8_FMTu__ "hhu" // WEBASSEMBLY-NEXT:#define __UINT_FAST8_FMTx__ "hhx" // WEBASSEMBLY-NEXT:#define __UINT_FAST8_MAX__ 255 // WEBASSEMBLY-NEXT:#define __UINT_FAST8_TYPE__ unsigned char // WEBASSEMBLY-NEXT:#define __UINT_LEAST16_FMTX__ "hX" // WEBASSEMBLY-NEXT:#define __UINT_LEAST16_FMTo__ "ho" // WEBASSEMBLY-NEXT:#define __UINT_LEAST16_FMTu__ "hu" // WEBASSEMBLY-NEXT:#define __UINT_LEAST16_FMTx__ "hx" // WEBASSEMBLY-NEXT:#define __UINT_LEAST16_MAX__ 65535 // WEBASSEMBLY-NEXT:#define __UINT_LEAST16_TYPE__ unsigned short // WEBASSEMBLY-NEXT:#define __UINT_LEAST32_FMTX__ "X" // WEBASSEMBLY-NEXT:#define __UINT_LEAST32_FMTo__ "o" // WEBASSEMBLY-NEXT:#define __UINT_LEAST32_FMTu__ "u" // WEBASSEMBLY-NEXT:#define __UINT_LEAST32_FMTx__ "x" // WEBASSEMBLY-NEXT:#define __UINT_LEAST32_MAX__ 4294967295U // WEBASSEMBLY-NEXT:#define __UINT_LEAST32_TYPE__ unsigned int // WEBASSEMBLY-NEXT:#define __UINT_LEAST64_FMTX__ "llX" // WEBASSEMBLY-NEXT:#define __UINT_LEAST64_FMTo__ "llo" // WEBASSEMBLY-NEXT:#define __UINT_LEAST64_FMTu__ "llu" // WEBASSEMBLY-NEXT:#define __UINT_LEAST64_FMTx__ "llx" // WEBASSEMBLY-NEXT:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL // WEBASSEMBLY-NEXT:#define __UINT_LEAST64_TYPE__ long long unsigned int // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_FMTX__ "hhX" // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_FMTo__ "hho" // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_FMTu__ "hhu" // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_FMTx__ "hhx" // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_MAX__ 255 // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_TYPE__ unsigned char // WEBASSEMBLY-NEXT:#define __USER_LABEL_PREFIX__ // WEBASSEMBLY-NEXT:#define __VERSION__ "{{.*}}" // WEBASSEMBLY-NEXT:#define __WCHAR_MAX__ 2147483647 // WEBASSEMBLY-NEXT:#define __WCHAR_TYPE__ int // WEBASSEMBLY-NOT:#define __WCHAR_UNSIGNED__ // WEBASSEMBLY-NEXT:#define __WCHAR_WIDTH__ 32 // WEBASSEMBLY-NEXT:#define __WINT_MAX__ 2147483647 // WEBASSEMBLY-NEXT:#define __WINT_TYPE__ int // WEBASSEMBLY-NOT:#define __WINT_UNSIGNED__ // WEBASSEMBLY-NEXT:#define __WINT_WIDTH__ 32 // WEBASSEMBLY-NEXT:#define __clang__ 1 // WEBASSEMBLY-NEXT:#define __clang_literal_encoding__ {{.*}} // WEBASSEMBLY-NEXT:#define __clang_major__ {{.*}} // WEBASSEMBLY-NEXT:#define __clang_minor__ {{.*}} // WEBASSEMBLY-NEXT:#define __clang_patchlevel__ {{.*}} // WEBASSEMBLY-NEXT:#define __clang_version__ "{{.*}}" // WEBASSEMBLY-NEXT:#define __clang_wide_literal_encoding__ {{.*}} // WEBASSEMBLY-NEXT:#define __llvm__ 1 // WEBASSEMBLY-NOT:#define __unix // WEBASSEMBLY-NOT:#define __unix__ // WEBASSEMBLY-WASI-NEXT:#define __wasi__ 1 // WEBASSEMBLY-NOT:#define __wasm_simd128__ // WEBASSEMBLY-NOT:#define __wasm_simd256__ // WEBASSEMBLY-NOT:#define __wasm_simd512__ // WEBASSEMBLY-NEXT:#define __wasm 1 // WEBASSEMBLY32-NEXT:#define __wasm32 1 // WEBASSEMBLY64-NOT:#define __wasm32 // WEBASSEMBLY32-NEXT:#define __wasm32__ 1 // WEBASSEMBLY64-NOT:#define __wasm32__ // WEBASSEMBLY32-NOT:#define __wasm64__ // WEBASSEMBLY32-NOT:#define __wasm64 // WEBASSEMBLY64-NEXT:#define __wasm64 1 // WEBASSEMBLY64-NEXT:#define __wasm64__ 1 // WEBASSEMBLY-NEXT:#define __wasm__ 1 // WEBASSEMBLY-CXX-NOT:_REENTRANT // WEBASSEMBLY-CXX-NOT:__STDCPP_THREADS__ // WEBASSEMBLY-CXX-ATOMICS:#define _REENTRANT 1 // WEBASSEMBLY-CXX-ATOMICS:#define __STDCPP_THREADS__ 1 // RUN: %clang_cc1 -E -dM -ffreestanding -triple i686-windows-cygnus < /dev/null | FileCheck -match-full-lines -check-prefix CYGWIN-X32 %s // CYGWIN-X32: #define __USER_LABEL_PREFIX__ _ // RUN: %clang_cc1 -E -dM -ffreestanding -triple x86_64-windows-cygnus < /dev/null | FileCheck -match-full-lines -check-prefix CYGWIN-X64 %s // CYGWIN-X64: #define __USER_LABEL_PREFIX__ // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=avr \ // RUN: < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefix=AVR %s // // AVR:#define __ATOMIC_ACQUIRE 2 // AVR:#define __ATOMIC_ACQ_REL 4 // AVR:#define __ATOMIC_CONSUME 1 // AVR:#define __ATOMIC_RELAXED 0 // AVR:#define __ATOMIC_RELEASE 3 // AVR:#define __ATOMIC_SEQ_CST 5 // AVR:#define __AVR__ 1 // AVR:#define __BIGGEST_ALIGNMENT__ 1 // AVR:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ // AVR:#define __CHAR16_TYPE__ unsigned int // AVR:#define __CHAR32_TYPE__ long unsigned int // AVR:#define __CHAR_BIT__ 8 // AVR:#define __DBL_DECIMAL_DIG__ 9 // AVR:#define __DBL_DENORM_MIN__ 1.40129846e-45 // AVR:#define __DBL_DIG__ 6 // AVR:#define __DBL_EPSILON__ 1.19209290e-7 // AVR:#define __DBL_HAS_DENORM__ 1 // AVR:#define __DBL_HAS_INFINITY__ 1 // AVR:#define __DBL_HAS_QUIET_NAN__ 1 // AVR:#define __DBL_MANT_DIG__ 24 // AVR:#define __DBL_MAX_10_EXP__ 38 // AVR:#define __DBL_MAX_EXP__ 128 // AVR:#define __DBL_MAX__ 3.40282347e+38 // AVR:#define __DBL_MIN_10_EXP__ (-37) // AVR:#define __DBL_MIN_EXP__ (-125) // AVR:#define __DBL_MIN__ 1.17549435e-38 // AVR:#define __FINITE_MATH_ONLY__ 0 // AVR:#define __FLT_DECIMAL_DIG__ 9 // AVR:#define __FLT_DENORM_MIN__ 1.40129846e-45F // AVR:#define __FLT_DIG__ 6 // AVR:#define __FLT_EPSILON__ 1.19209290e-7F // AVR:#define __FLT_HAS_DENORM__ 1 // AVR:#define __FLT_HAS_INFINITY__ 1 // AVR:#define __FLT_HAS_QUIET_NAN__ 1 // AVR:#define __FLT_MANT_DIG__ 24 // AVR:#define __FLT_MAX_10_EXP__ 38 // AVR:#define __FLT_MAX_EXP__ 128 // AVR:#define __FLT_MAX__ 3.40282347e+38F // AVR:#define __FLT_MIN_10_EXP__ (-37) // AVR:#define __FLT_MIN_EXP__ (-125) // AVR:#define __FLT_MIN__ 1.17549435e-38F // AVR:#define __FLT_RADIX__ 2 // AVR:#define __GCC_ATOMIC_BOOL_LOCK_FREE 1 // AVR:#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 1 // AVR:#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 1 // AVR:#define __GCC_ATOMIC_CHAR_LOCK_FREE 1 // AVR:#define __GCC_ATOMIC_INT_LOCK_FREE 1 // AVR:#define __GCC_ATOMIC_LLONG_LOCK_FREE 1 // AVR:#define __GCC_ATOMIC_LONG_LOCK_FREE 1 // AVR:#define __GCC_ATOMIC_POINTER_LOCK_FREE 1 // AVR:#define __GCC_ATOMIC_SHORT_LOCK_FREE 1 // AVR:#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 // AVR:#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 1 // AVR:#define __GXX_ABI_VERSION 1002 // AVR:#define __INT16_C_SUFFIX__ // AVR:#define __INT16_MAX__ 32767 // AVR:#define __INT16_TYPE__ int // AVR:#define __INT32_C_SUFFIX__ L // AVR:#define __INT32_MAX__ 2147483647L // AVR:#define __INT32_TYPE__ long int // AVR:#define __INT64_C_SUFFIX__ LL // AVR:#define __INT64_MAX__ 9223372036854775807LL // AVR:#define __INT64_TYPE__ long long int // AVR:#define __INT8_C_SUFFIX__ // AVR:#define __INT8_MAX__ 127 // AVR:#define __INT8_TYPE__ signed char // AVR:#define __INTMAX_C_SUFFIX__ LL // AVR:#define __INTMAX_MAX__ 9223372036854775807LL // AVR:#define __INTMAX_TYPE__ long long int // AVR:#define __INTPTR_MAX__ 32767 // AVR:#define __INTPTR_TYPE__ int // AVR:#define __INT_FAST16_MAX__ 32767 // AVR:#define __INT_FAST16_TYPE__ int // AVR:#define __INT_FAST32_MAX__ 2147483647L // AVR:#define __INT_FAST32_TYPE__ long int // AVR:#define __INT_FAST64_MAX__ 9223372036854775807LL // AVR:#define __INT_FAST64_TYPE__ long long int // AVR:#define __INT_FAST8_MAX__ 127 // AVR:#define __INT_FAST8_TYPE__ signed char // AVR:#define __INT_LEAST16_MAX__ 32767 // AVR:#define __INT_LEAST16_TYPE__ int // AVR:#define __INT_LEAST32_MAX__ 2147483647L // AVR:#define __INT_LEAST32_TYPE__ long int // AVR:#define __INT_LEAST64_MAX__ 9223372036854775807LL // AVR:#define __INT_LEAST64_TYPE__ long long int // AVR:#define __INT_LEAST8_MAX__ 127 // AVR:#define __INT_LEAST8_TYPE__ signed char // AVR:#define __INT_MAX__ 32767 // AVR:#define __LDBL_DECIMAL_DIG__ 9 // AVR:#define __LDBL_DENORM_MIN__ 1.40129846e-45L // AVR:#define __LDBL_DIG__ 6 // AVR:#define __LDBL_EPSILON__ 1.19209290e-7L // AVR:#define __LDBL_HAS_DENORM__ 1 // AVR:#define __LDBL_HAS_INFINITY__ 1 // AVR:#define __LDBL_HAS_QUIET_NAN__ 1 // AVR:#define __LDBL_MANT_DIG__ 24 // AVR:#define __LDBL_MAX_10_EXP__ 38 // AVR:#define __LDBL_MAX_EXP__ 128 // AVR:#define __LDBL_MAX__ 3.40282347e+38L // AVR:#define __LDBL_MIN_10_EXP__ (-37) // AVR:#define __LDBL_MIN_EXP__ (-125) // AVR:#define __LDBL_MIN__ 1.17549435e-38L // AVR:#define __LONG_LONG_MAX__ 9223372036854775807LL // AVR:#define __LONG_MAX__ 2147483647L // AVR:#define __NO_INLINE__ 1 // AVR:#define __ORDER_BIG_ENDIAN__ 4321 // AVR:#define __ORDER_LITTLE_ENDIAN__ 1234 // AVR:#define __ORDER_PDP_ENDIAN__ 3412 // AVR:#define __PRAGMA_REDEFINE_EXTNAME 1 // AVR:#define __PTRDIFF_MAX__ 32767 // AVR:#define __PTRDIFF_TYPE__ int // AVR:#define __SCHAR_MAX__ 127 // AVR:#define __SHRT_MAX__ 32767 // AVR:#define __SIG_ATOMIC_MAX__ 127 // AVR:#define __SIG_ATOMIC_WIDTH__ 8 // AVR:#define __SIZEOF_DOUBLE__ 4 // AVR:#define __SIZEOF_FLOAT__ 4 // AVR:#define __SIZEOF_INT__ 2 // AVR:#define __SIZEOF_LONG_DOUBLE__ 4 // AVR:#define __SIZEOF_LONG_LONG__ 8 // AVR:#define __SIZEOF_LONG__ 4 // AVR:#define __SIZEOF_POINTER__ 2 // AVR:#define __SIZEOF_PTRDIFF_T__ 2 // AVR:#define __SIZEOF_SHORT__ 2 // AVR:#define __SIZEOF_SIZE_T__ 2 // AVR:#define __SIZEOF_WCHAR_T__ 2 // AVR:#define __SIZEOF_WINT_T__ 2 // AVR:#define __SIZE_MAX__ 65535U // AVR:#define __SIZE_TYPE__ unsigned int // AVR:#define __STDC__ 1 // AVR:#define __UINT16_MAX__ 65535U // AVR:#define __UINT16_TYPE__ unsigned int // AVR:#define __UINT32_C_SUFFIX__ UL // AVR:#define __UINT32_MAX__ 4294967295UL // AVR:#define __UINT32_TYPE__ long unsigned int // AVR:#define __UINT64_C_SUFFIX__ ULL // AVR:#define __UINT64_MAX__ 18446744073709551615ULL // AVR:#define __UINT64_TYPE__ long long unsigned int // AVR:#define __UINT8_C_SUFFIX__ // AVR:#define __UINT8_MAX__ 255 // AVR:#define __UINT8_TYPE__ unsigned char // AVR:#define __UINTMAX_C_SUFFIX__ ULL // AVR:#define __UINTMAX_MAX__ 18446744073709551615ULL // AVR:#define __UINTMAX_TYPE__ long long unsigned int // AVR:#define __UINTPTR_MAX__ 65535U // AVR:#define __UINTPTR_TYPE__ unsigned int // AVR:#define __UINT_FAST16_MAX__ 65535U // AVR:#define __UINT_FAST16_TYPE__ unsigned int // AVR:#define __UINT_FAST32_MAX__ 4294967295UL // AVR:#define __UINT_FAST32_TYPE__ long unsigned int // AVR:#define __UINT_FAST64_MAX__ 18446744073709551615ULL // AVR:#define __UINT_FAST64_TYPE__ long long unsigned int // AVR:#define __UINT_FAST8_MAX__ 255 // AVR:#define __UINT_FAST8_TYPE__ unsigned char // AVR:#define __UINT_LEAST16_MAX__ 65535U // AVR:#define __UINT_LEAST16_TYPE__ unsigned int // AVR:#define __UINT_LEAST32_MAX__ 4294967295UL // AVR:#define __UINT_LEAST32_TYPE__ long unsigned int // AVR:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL // AVR:#define __UINT_LEAST64_TYPE__ long long unsigned int // AVR:#define __UINT_LEAST8_MAX__ 255 // AVR:#define __UINT_LEAST8_TYPE__ unsigned char // AVR:#define __USER_LABEL_PREFIX__ // AVR:#define __WCHAR_MAX__ 32767 // AVR:#define __WCHAR_TYPE__ int // AVR:#define __WINT_TYPE__ int // RUN: %clang_cc1 -E -dM -ffreestanding \ // RUN: -triple i686-windows-msvc -fms-compatibility -x c++ < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefix MSVC-X32 %s // RUN: %clang_cc1 -E -dM -ffreestanding \ // RUN: -triple x86_64-windows-msvc -fms-compatibility -x c++ < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefix MSVC-X64 %s // MSVC-X32:#define __CLANG_ATOMIC_BOOL_LOCK_FREE 2 // MSVC-X32-NEXT:#define __CLANG_ATOMIC_CHAR16_T_LOCK_FREE 2 // MSVC-X32-NEXT:#define __CLANG_ATOMIC_CHAR32_T_LOCK_FREE 2 // MSVC-X32-NEXT:#define __CLANG_ATOMIC_CHAR_LOCK_FREE 2 // MSVC-X32-NEXT:#define __CLANG_ATOMIC_INT_LOCK_FREE 2 // MSVC-X32-NEXT:#define __CLANG_ATOMIC_LLONG_LOCK_FREE 2 // MSVC-X32-NEXT:#define __CLANG_ATOMIC_LONG_LOCK_FREE 2 // MSVC-X32-NEXT:#define __CLANG_ATOMIC_POINTER_LOCK_FREE 2 // MSVC-X32-NEXT:#define __CLANG_ATOMIC_SHORT_LOCK_FREE 2 // MSVC-X32-NEXT:#define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 2 // MSVC-X32-NOT:#define __GCC_ATOMIC{{.*}} // MSVC-X32:#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 8U // MSVC-X64:#define __CLANG_ATOMIC_BOOL_LOCK_FREE 2 // MSVC-X64-NEXT:#define __CLANG_ATOMIC_CHAR16_T_LOCK_FREE 2 // MSVC-X64-NEXT:#define __CLANG_ATOMIC_CHAR32_T_LOCK_FREE 2 // MSVC-X64-NEXT:#define __CLANG_ATOMIC_CHAR_LOCK_FREE 2 // MSVC-X64-NEXT:#define __CLANG_ATOMIC_INT_LOCK_FREE 2 // MSVC-X64-NEXT:#define __CLANG_ATOMIC_LLONG_LOCK_FREE 2 // MSVC-X64-NEXT:#define __CLANG_ATOMIC_LONG_LOCK_FREE 2 // MSVC-X64-NEXT:#define __CLANG_ATOMIC_POINTER_LOCK_FREE 2 // MSVC-X64-NEXT:#define __CLANG_ATOMIC_SHORT_LOCK_FREE 2 // MSVC-X64-NEXT:#define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 2 // MSVC-X64-NOT:#define __GCC_ATOMIC{{.*}} // MSVC-X64:#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16ULL // RUN: %clang_cc1 -E -dM -ffreestanding \ // RUN: -fgnuc-version=4.2.1 -triple=aarch64-apple-ios9 < /dev/null \ // RUN: | FileCheck -check-prefix=DARWIN %s // RUN: %clang_cc1 -E -dM -ffreestanding \ // RUN: -fgnuc-version=4.2.1 -triple=aarch64-apple-macosx10.12 < /dev/null \ // RUN: | FileCheck -check-prefix=DARWIN %s // DARWIN-NOT: OBJC_NEW_PROPERTIES // DARWIN:#define __STDC_NO_THREADS__ 1 // RUN: %clang_cc1 -triple i386-apple-macosx -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix MACOS-32 %s // RUN: %clang_cc1 -triple x86_64-apple-macosx -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix MACOS-64 %s // MACOS-32: #define __INTPTR_TYPE__ long int // MACOS-32: #define __PTRDIFF_TYPE__ int // MACOS-32: #define __SIZE_TYPE__ long unsigned int // MACOS-64: #define __INTPTR_TYPE__ long int // MACOS-64: #define __PTRDIFF_TYPE__ long int // MACOS-64: #define __SIZE_TYPE__ long unsigned int // RUN: %clang_cc1 -triple i386-apple-ios-simulator -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix IOS-32 %s // RUN: %clang_cc1 -triple armv7-apple-ios -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix IOS-32 %s // RUN: %clang_cc1 -triple x86_64-apple-ios-simulator -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix IOS-64 %s // RUN: %clang_cc1 -triple arm64-apple-ios -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix IOS-64 %s // IOS-32: #define __INTPTR_TYPE__ long int // IOS-32: #define __PTRDIFF_TYPE__ int // IOS-32: #define __SIZE_TYPE__ long unsigned int // IOS-64: #define __INTPTR_TYPE__ long int // IOS-64: #define __PTRDIFF_TYPE__ long int // IOS-64: #define __SIZE_TYPE__ long unsigned int // RUN: %clang_cc1 -triple i386-apple-tvos-simulator -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix TVOS-32 %s // RUN: %clang_cc1 -triple armv7-apple-tvos -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix TVOS-32 %s // RUN: %clang_cc1 -triple x86_64-apple-tvos-simulator -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix TVOS-64 %s // RUN: %clang_cc1 -triple arm64-apple-tvos -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix TVOS-64 %s // TVOS-32: #define __INTPTR_TYPE__ long int // TVOS-32: #define __PTRDIFF_TYPE__ int // TVOS-32: #define __SIZE_TYPE__ long unsigned int // TVOS-64: #define __INTPTR_TYPE__ long int // TVOS-64: #define __PTRDIFF_TYPE__ long int // TVOS-64: #define __SIZE_TYPE__ long unsigned int // RUN: %clang_cc1 -triple i386-apple-watchos-simulator -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix WATCHOS-32 %s // RUN: %clang_cc1 -triple armv7k-apple-watchos -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix WATCHOS-64 %s // RUN: %clang_cc1 -triple x86_64-apple-watchos-simulator -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix WATCHOS-64 %s // RUN: %clang_cc1 -triple arm64-apple-watchos -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix WATCHOS-64 %s // WATCHOS-32: #define __INTPTR_TYPE__ long int // WATCHOS-32: #define __PTRDIFF_TYPE__ int // WATCHOS-32: #define __SIZE_TYPE__ long unsigned int // WATCHOS-64: #define __INTPTR_TYPE__ long int // WATCHOS-64: #define __PTRDIFF_TYPE__ long int // WATCHOS-64: #define __SIZE_TYPE__ long unsigned int // RUN: %clang_cc1 -triple armv7-apple-none-macho -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix ARM-DARWIN-BAREMETAL-32 %s // RUN: %clang_cc1 -triple arm64-apple-none-macho -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix ARM-DARWIN-BAREMETAL-64 %s // ARM-DARWIN-BAREMETAL-32: #define __INTPTR_TYPE__ long int // ARM-DARWIN-BAREMETAL-32: #define __PTRDIFF_TYPE__ int // ARM-DARWIN-BAREMETAL-32: #define __SIZE_TYPE__ long unsigned int // ARM-DARWIN-BAREMETAL-64: #define __INTPTR_TYPE__ long int // ARM-DARWIN-BAREMETAL-64: #define __PTRDIFF_TYPE__ long int // ARM-DARWIN-BAREMETAL-64: #define __SIZE_TYPE__ long unsigned int // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=riscv32 < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefix=RISCV32 %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=riscv32-unknown-linux < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefixes=RISCV32,RISCV32-LINUX %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=riscv32 \ // RUN: -fforce-enable-int128 < /dev/null | FileCheck -match-full-lines \ // RUN: -check-prefixes=RISCV32,RISCV32-INT128 %s // RISCV32: #define _ILP32 1 // RISCV32: #define __ATOMIC_ACQUIRE 2 // RISCV32: #define __ATOMIC_ACQ_REL 4 // RISCV32: #define __ATOMIC_CONSUME 1 // RISCV32: #define __ATOMIC_RELAXED 0 // RISCV32: #define __ATOMIC_RELEASE 3 // RISCV32: #define __ATOMIC_SEQ_CST 5 // RISCV32: #define __BIGGEST_ALIGNMENT__ 16 // RISCV32: #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ // RISCV32: #define __CHAR16_TYPE__ unsigned short // RISCV32: #define __CHAR32_TYPE__ unsigned int // RISCV32: #define __CHAR_BIT__ 8 // RISCV32: #define __DBL_DECIMAL_DIG__ 17 // RISCV32: #define __DBL_DENORM_MIN__ 4.9406564584124654e-324 // RISCV32: #define __DBL_DIG__ 15 // RISCV32: #define __DBL_EPSILON__ 2.2204460492503131e-16 // RISCV32: #define __DBL_HAS_DENORM__ 1 // RISCV32: #define __DBL_HAS_INFINITY__ 1 // RISCV32: #define __DBL_HAS_QUIET_NAN__ 1 // RISCV32: #define __DBL_MANT_DIG__ 53 // RISCV32: #define __DBL_MAX_10_EXP__ 308 // RISCV32: #define __DBL_MAX_EXP__ 1024 // RISCV32: #define __DBL_MAX__ 1.7976931348623157e+308 // RISCV32: #define __DBL_MIN_10_EXP__ (-307) // RISCV32: #define __DBL_MIN_EXP__ (-1021) // RISCV32: #define __DBL_MIN__ 2.2250738585072014e-308 // RISCV32: #define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ // RISCV32: #define __ELF__ 1 // RISCV32: #define __FINITE_MATH_ONLY__ 0 // RISCV32: #define __FLT_DECIMAL_DIG__ 9 // RISCV32: #define __FLT_DENORM_MIN__ 1.40129846e-45F // RISCV32: #define __FLT_DIG__ 6 // RISCV32: #define __FLT_EPSILON__ 1.19209290e-7F // RISCV32: #define __FLT_HAS_DENORM__ 1 // RISCV32: #define __FLT_HAS_INFINITY__ 1 // RISCV32: #define __FLT_HAS_QUIET_NAN__ 1 // RISCV32: #define __FLT_MANT_DIG__ 24 // RISCV32: #define __FLT_MAX_10_EXP__ 38 // RISCV32: #define __FLT_MAX_EXP__ 128 // RISCV32: #define __FLT_MAX__ 3.40282347e+38F // RISCV32: #define __FLT_MIN_10_EXP__ (-37) // RISCV32: #define __FLT_MIN_EXP__ (-125) // RISCV32: #define __FLT_MIN__ 1.17549435e-38F // RISCV32: #define __FLT_RADIX__ 2 // RISCV32: #define __GCC_ATOMIC_BOOL_LOCK_FREE 1 // RISCV32: #define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 1 // RISCV32: #define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 1 // RISCV32: #define __GCC_ATOMIC_CHAR_LOCK_FREE 1 // RISCV32: #define __GCC_ATOMIC_INT_LOCK_FREE 1 // RISCV32: #define __GCC_ATOMIC_LLONG_LOCK_FREE 1 // RISCV32: #define __GCC_ATOMIC_LONG_LOCK_FREE 1 // RISCV32: #define __GCC_ATOMIC_POINTER_LOCK_FREE 1 // RISCV32: #define __GCC_ATOMIC_SHORT_LOCK_FREE 1 // RISCV32: #define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 // RISCV32: #define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 1 // RISCV32: #define __GNUC_MINOR__ {{.*}} // RISCV32: #define __GNUC_PATCHLEVEL__ {{.*}} // RISCV32: #define __GNUC_STDC_INLINE__ 1 // RISCV32: #define __GNUC__ {{.*}} // RISCV32: #define __GXX_ABI_VERSION {{.*}} // RISCV32: #define __ILP32__ 1 // RISCV32: #define __INT16_C_SUFFIX__ // RISCV32: #define __INT16_MAX__ 32767 // RISCV32: #define __INT16_TYPE__ short // RISCV32: #define __INT32_C_SUFFIX__ // RISCV32: #define __INT32_MAX__ 2147483647 // RISCV32: #define __INT32_TYPE__ int // RISCV32: #define __INT64_C_SUFFIX__ LL // RISCV32: #define __INT64_MAX__ 9223372036854775807LL // RISCV32: #define __INT64_TYPE__ long long int // RISCV32: #define __INT8_C_SUFFIX__ // RISCV32: #define __INT8_MAX__ 127 // RISCV32: #define __INT8_TYPE__ signed char // RISCV32: #define __INTMAX_C_SUFFIX__ LL // RISCV32: #define __INTMAX_MAX__ 9223372036854775807LL // RISCV32: #define __INTMAX_TYPE__ long long int // RISCV32: #define __INTMAX_WIDTH__ 64 // RISCV32: #define __INTPTR_MAX__ 2147483647 // RISCV32: #define __INTPTR_TYPE__ int // RISCV32: #define __INTPTR_WIDTH__ 32 // TODO: RISC-V GCC defines INT_FAST16 as int // RISCV32: #define __INT_FAST16_MAX__ 32767 // RISCV32: #define __INT_FAST16_TYPE__ short // RISCV32: #define __INT_FAST32_MAX__ 2147483647 // RISCV32: #define __INT_FAST32_TYPE__ int // RISCV32: #define __INT_FAST64_MAX__ 9223372036854775807LL // RISCV32: #define __INT_FAST64_TYPE__ long long int // TODO: RISC-V GCC defines INT_FAST8 as int // RISCV32: #define __INT_FAST8_MAX__ 127 // RISCV32: #define __INT_FAST8_TYPE__ signed char // RISCV32: #define __INT_LEAST16_MAX__ 32767 // RISCV32: #define __INT_LEAST16_TYPE__ short // RISCV32: #define __INT_LEAST32_MAX__ 2147483647 // RISCV32: #define __INT_LEAST32_TYPE__ int // RISCV32: #define __INT_LEAST64_MAX__ 9223372036854775807LL // RISCV32: #define __INT_LEAST64_TYPE__ long long int // RISCV32: #define __INT_LEAST8_MAX__ 127 // RISCV32: #define __INT_LEAST8_TYPE__ signed char // RISCV32: #define __INT_MAX__ 2147483647 // RISCV32: #define __LDBL_DECIMAL_DIG__ 36 // RISCV32: #define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L // RISCV32: #define __LDBL_DIG__ 33 // RISCV32: #define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L // RISCV32: #define __LDBL_HAS_DENORM__ 1 // RISCV32: #define __LDBL_HAS_INFINITY__ 1 // RISCV32: #define __LDBL_HAS_QUIET_NAN__ 1 // RISCV32: #define __LDBL_MANT_DIG__ 113 // RISCV32: #define __LDBL_MAX_10_EXP__ 4932 // RISCV32: #define __LDBL_MAX_EXP__ 16384 // RISCV32: #define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L // RISCV32: #define __LDBL_MIN_10_EXP__ (-4931) // RISCV32: #define __LDBL_MIN_EXP__ (-16381) // RISCV32: #define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L // RISCV32: #define __LITTLE_ENDIAN__ 1 // RISCV32: #define __LONG_LONG_MAX__ 9223372036854775807LL // RISCV32: #define __LONG_MAX__ 2147483647L // RISCV32: #define __NO_INLINE__ 1 // RISCV32: #define __POINTER_WIDTH__ 32 // RISCV32: #define __PRAGMA_REDEFINE_EXTNAME 1 // RISCV32: #define __PTRDIFF_MAX__ 2147483647 // RISCV32: #define __PTRDIFF_TYPE__ int // RISCV32: #define __PTRDIFF_WIDTH__ 32 // RISCV32: #define __SCHAR_MAX__ 127 // RISCV32: #define __SHRT_MAX__ 32767 // RISCV32: #define __SIG_ATOMIC_MAX__ 2147483647 // RISCV32: #define __SIG_ATOMIC_WIDTH__ 32 // RISCV32: #define __SIZEOF_DOUBLE__ 8 // RISCV32: #define __SIZEOF_FLOAT__ 4 // RISCV32-INT128: #define __SIZEOF_INT128__ 16 // RISCV32: #define __SIZEOF_INT__ 4 // RISCV32: #define __SIZEOF_LONG_DOUBLE__ 16 // RISCV32: #define __SIZEOF_LONG_LONG__ 8 // RISCV32: #define __SIZEOF_LONG__ 4 // RISCV32: #define __SIZEOF_POINTER__ 4 // RISCV32: #define __SIZEOF_PTRDIFF_T__ 4 // RISCV32: #define __SIZEOF_SHORT__ 2 // RISCV32: #define __SIZEOF_SIZE_T__ 4 // RISCV32: #define __SIZEOF_WCHAR_T__ 4 // RISCV32: #define __SIZEOF_WINT_T__ 4 // RISCV32: #define __SIZE_MAX__ 4294967295U // RISCV32: #define __SIZE_TYPE__ unsigned int // RISCV32: #define __SIZE_WIDTH__ 32 // RISCV32: #define __STDC_HOSTED__ 0 // RISCV32: #define __STDC_UTF_16__ 1 // RISCV32: #define __STDC_UTF_32__ 1 // RISCV32: #define __STDC_VERSION__ 201710L // RISCV32: #define __STDC__ 1 // RISCV32: #define __UINT16_C_SUFFIX__ // RISCV32: #define __UINT16_MAX__ 65535 // RISCV32: #define __UINT16_TYPE__ unsigned short // RISCV32: #define __UINT32_C_SUFFIX__ U // RISCV32: #define __UINT32_MAX__ 4294967295U // RISCV32: #define __UINT32_TYPE__ unsigned int // RISCV32: #define __UINT64_C_SUFFIX__ ULL // RISCV32: #define __UINT64_MAX__ 18446744073709551615ULL // RISCV32: #define __UINT64_TYPE__ long long unsigned int // RISCV32: #define __UINT8_C_SUFFIX__ // RISCV32: #define __UINT8_MAX__ 255 // RISCV32: #define __UINT8_TYPE__ unsigned char // RISCV32: #define __UINTMAX_C_SUFFIX__ ULL // RISCV32: #define __UINTMAX_MAX__ 18446744073709551615ULL // RISCV32: #define __UINTMAX_TYPE__ long long unsigned int // RISCV32: #define __UINTMAX_WIDTH__ 64 // RISCV32: #define __UINTPTR_MAX__ 4294967295U // RISCV32: #define __UINTPTR_TYPE__ unsigned int // RISCV32: #define __UINTPTR_WIDTH__ 32 // TODO: RISC-V GCC defines UINT_FAST16 to be unsigned int // RISCV32: #define __UINT_FAST16_MAX__ 65535 // RISCV32: #define __UINT_FAST16_TYPE__ unsigned short // RISCV32: #define __UINT_FAST32_MAX__ 4294967295U // RISCV32: #define __UINT_FAST32_TYPE__ unsigned int // RISCV32: #define __UINT_FAST64_MAX__ 18446744073709551615ULL // RISCV32: #define __UINT_FAST64_TYPE__ long long unsigned int // TODO: RISC-V GCC defines UINT_FAST8 to be unsigned int // RISCV32: #define __UINT_FAST8_MAX__ 255 // RISCV32: #define __UINT_FAST8_TYPE__ unsigned char // RISCV32: #define __UINT_LEAST16_MAX__ 65535 // RISCV32: #define __UINT_LEAST16_TYPE__ unsigned short // RISCV32: #define __UINT_LEAST32_MAX__ 4294967295U // RISCV32: #define __UINT_LEAST32_TYPE__ unsigned int // RISCV32: #define __UINT_LEAST64_MAX__ 18446744073709551615ULL // RISCV32: #define __UINT_LEAST64_TYPE__ long long unsigned int // RISCV32: #define __UINT_LEAST8_MAX__ 255 // RISCV32: #define __UINT_LEAST8_TYPE__ unsigned char // RISCV32: #define __USER_LABEL_PREFIX__ // RISCV32: #define __WCHAR_MAX__ 2147483647 // RISCV32: #define __WCHAR_TYPE__ int // RISCV32: #define __WCHAR_WIDTH__ 32 // RISCV32: #define __WINT_TYPE__ unsigned int // RISCV32: #define __WINT_UNSIGNED__ 1 // RISCV32: #define __WINT_WIDTH__ 32 // RISCV32-LINUX: #define __gnu_linux__ 1 // RISCV32-LINUX: #define __linux 1 // RISCV32-LINUX: #define __linux__ 1 // RISCV32: #define __riscv 1 // RISCV32: #define __riscv_cmodel_medlow 1 // RISCV32: #define __riscv_float_abi_soft 1 // RISCV32: #define __riscv_xlen 32 // RISCV32-LINUX: #define __unix 1 // RISCV32-LINUX: #define __unix__ 1 // RISCV32-LINUX: #define linux 1 // RISCV32-LINUX: #define unix 1 // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=riscv64 < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefix=RISCV64 %s // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=riscv64-unknown-linux < /dev/null \ // RUN: | FileCheck -match-full-lines -check-prefixes=RISCV64,RISCV64-LINUX %s // RISCV64: #define _LP64 1 // RISCV64: #define __ATOMIC_ACQUIRE 2 // RISCV64: #define __ATOMIC_ACQ_REL 4 // RISCV64: #define __ATOMIC_CONSUME 1 // RISCV64: #define __ATOMIC_RELAXED 0 // RISCV64: #define __ATOMIC_RELEASE 3 // RISCV64: #define __ATOMIC_SEQ_CST 5 // RISCV64: #define __BIGGEST_ALIGNMENT__ 16 // RISCV64: #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ // RISCV64: #define __CHAR16_TYPE__ unsigned short // RISCV64: #define __CHAR32_TYPE__ unsigned int // RISCV64: #define __CHAR_BIT__ 8 // RISCV64: #define __DBL_DECIMAL_DIG__ 17 // RISCV64: #define __DBL_DENORM_MIN__ 4.9406564584124654e-324 // RISCV64: #define __DBL_DIG__ 15 // RISCV64: #define __DBL_EPSILON__ 2.2204460492503131e-16 // RISCV64: #define __DBL_HAS_DENORM__ 1 // RISCV64: #define __DBL_HAS_INFINITY__ 1 // RISCV64: #define __DBL_HAS_QUIET_NAN__ 1 // RISCV64: #define __DBL_MANT_DIG__ 53 // RISCV64: #define __DBL_MAX_10_EXP__ 308 // RISCV64: #define __DBL_MAX_EXP__ 1024 // RISCV64: #define __DBL_MAX__ 1.7976931348623157e+308 // RISCV64: #define __DBL_MIN_10_EXP__ (-307) // RISCV64: #define __DBL_MIN_EXP__ (-1021) // RISCV64: #define __DBL_MIN__ 2.2250738585072014e-308 // RISCV64: #define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ // RISCV64: #define __ELF__ 1 // RISCV64: #define __FINITE_MATH_ONLY__ 0 // RISCV64: #define __FLT_DECIMAL_DIG__ 9 // RISCV64: #define __FLT_DENORM_MIN__ 1.40129846e-45F // RISCV64: #define __FLT_DIG__ 6 // RISCV64: #define __FLT_EPSILON__ 1.19209290e-7F // RISCV64: #define __FLT_HAS_DENORM__ 1 // RISCV64: #define __FLT_HAS_INFINITY__ 1 // RISCV64: #define __FLT_HAS_QUIET_NAN__ 1 // RISCV64: #define __FLT_MANT_DIG__ 24 // RISCV64: #define __FLT_MAX_10_EXP__ 38 // RISCV64: #define __FLT_MAX_EXP__ 128 // RISCV64: #define __FLT_MAX__ 3.40282347e+38F // RISCV64: #define __FLT_MIN_10_EXP__ (-37) // RISCV64: #define __FLT_MIN_EXP__ (-125) // RISCV64: #define __FLT_MIN__ 1.17549435e-38F // RISCV64: #define __FLT_RADIX__ 2 // RISCV64: #define __GCC_ATOMIC_BOOL_LOCK_FREE 1 // RISCV64: #define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 1 // RISCV64: #define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 1 // RISCV64: #define __GCC_ATOMIC_CHAR_LOCK_FREE 1 // RISCV64: #define __GCC_ATOMIC_INT_LOCK_FREE 1 // RISCV64: #define __GCC_ATOMIC_LLONG_LOCK_FREE 1 // RISCV64: #define __GCC_ATOMIC_LONG_LOCK_FREE 1 // RISCV64: #define __GCC_ATOMIC_POINTER_LOCK_FREE 1 // RISCV64: #define __GCC_ATOMIC_SHORT_LOCK_FREE 1 // RISCV64: #define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 // RISCV64: #define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 1 // RISCV64: #define __GNUC_MINOR__ {{.*}} // RISCV64: #define __GNUC_PATCHLEVEL__ {{.*}} // RISCV64: #define __GNUC_STDC_INLINE__ 1 // RISCV64: #define __GNUC__ {{.*}} // RISCV64: #define __GXX_ABI_VERSION {{.*}} // RISCV64: #define __INT16_C_SUFFIX__ // RISCV64: #define __INT16_MAX__ 32767 // RISCV64: #define __INT16_TYPE__ short // RISCV64: #define __INT32_C_SUFFIX__ // RISCV64: #define __INT32_MAX__ 2147483647 // RISCV64: #define __INT32_TYPE__ int // RISCV64: #define __INT64_C_SUFFIX__ L // RISCV64: #define __INT64_MAX__ 9223372036854775807L // RISCV64: #define __INT64_TYPE__ long int // RISCV64: #define __INT8_C_SUFFIX__ // RISCV64: #define __INT8_MAX__ 127 // RISCV64: #define __INT8_TYPE__ signed char // RISCV64: #define __INTMAX_C_SUFFIX__ L // RISCV64: #define __INTMAX_MAX__ 9223372036854775807L // RISCV64: #define __INTMAX_TYPE__ long int // RISCV64: #define __INTMAX_WIDTH__ 64 // RISCV64: #define __INTPTR_MAX__ 9223372036854775807L // RISCV64: #define __INTPTR_TYPE__ long int // RISCV64: #define __INTPTR_WIDTH__ 64 // TODO: RISC-V GCC defines INT_FAST16 as int // RISCV64: #define __INT_FAST16_MAX__ 32767 // RISCV64: #define __INT_FAST16_TYPE__ short // RISCV64: #define __INT_FAST32_MAX__ 2147483647 // RISCV64: #define __INT_FAST32_TYPE__ int // RISCV64: #define __INT_FAST64_MAX__ 9223372036854775807L // RISCV64: #define __INT_FAST64_TYPE__ long int // TODO: RISC-V GCC defines INT_FAST8 as int // RISCV64: #define __INT_FAST8_MAX__ 127 // RISCV64: #define __INT_FAST8_TYPE__ signed char // RISCV64: #define __INT_LEAST16_MAX__ 32767 // RISCV64: #define __INT_LEAST16_TYPE__ short // RISCV64: #define __INT_LEAST32_MAX__ 2147483647 // RISCV64: #define __INT_LEAST32_TYPE__ int // RISCV64: #define __INT_LEAST64_MAX__ 9223372036854775807L // RISCV64: #define __INT_LEAST64_TYPE__ long int // RISCV64: #define __INT_LEAST8_MAX__ 127 // RISCV64: #define __INT_LEAST8_TYPE__ signed char // RISCV64: #define __INT_MAX__ 2147483647 // RISCV64: #define __LDBL_DECIMAL_DIG__ 36 // RISCV64: #define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L // RISCV64: #define __LDBL_DIG__ 33 // RISCV64: #define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L // RISCV64: #define __LDBL_HAS_DENORM__ 1 // RISCV64: #define __LDBL_HAS_INFINITY__ 1 // RISCV64: #define __LDBL_HAS_QUIET_NAN__ 1 // RISCV64: #define __LDBL_MANT_DIG__ 113 // RISCV64: #define __LDBL_MAX_10_EXP__ 4932 // RISCV64: #define __LDBL_MAX_EXP__ 16384 // RISCV64: #define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L // RISCV64: #define __LDBL_MIN_10_EXP__ (-4931) // RISCV64: #define __LDBL_MIN_EXP__ (-16381) // RISCV64: #define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L // RISCV64: #define __LITTLE_ENDIAN__ 1 // RISCV64: #define __LONG_LONG_MAX__ 9223372036854775807LL // RISCV64: #define __LONG_MAX__ 9223372036854775807L // RISCV64: #define __LP64__ 1 // RISCV64: #define __NO_INLINE__ 1 // RISCV64: #define __POINTER_WIDTH__ 64 // RISCV64: #define __PRAGMA_REDEFINE_EXTNAME 1 // RISCV64: #define __PTRDIFF_MAX__ 9223372036854775807L // RISCV64: #define __PTRDIFF_TYPE__ long int // RISCV64: #define __PTRDIFF_WIDTH__ 64 // RISCV64: #define __SCHAR_MAX__ 127 // RISCV64: #define __SHRT_MAX__ 32767 // RISCV64: #define __SIG_ATOMIC_MAX__ 2147483647 // RISCV64: #define __SIG_ATOMIC_WIDTH__ 32 // RISCV64: #define __SIZEOF_DOUBLE__ 8 // RISCV64: #define __SIZEOF_FLOAT__ 4 // RISCV64: #define __SIZEOF_INT__ 4 // RISCV64: #define __SIZEOF_LONG_DOUBLE__ 16 // RISCV64: #define __SIZEOF_LONG_LONG__ 8 // RISCV64: #define __SIZEOF_LONG__ 8 // RISCV64: #define __SIZEOF_POINTER__ 8 // RISCV64: #define __SIZEOF_PTRDIFF_T__ 8 // RISCV64: #define __SIZEOF_SHORT__ 2 // RISCV64: #define __SIZEOF_SIZE_T__ 8 // RISCV64: #define __SIZEOF_WCHAR_T__ 4 // RISCV64: #define __SIZEOF_WINT_T__ 4 // RISCV64: #define __SIZE_MAX__ 18446744073709551615UL // RISCV64: #define __SIZE_TYPE__ long unsigned int // RISCV64: #define __SIZE_WIDTH__ 64 // RISCV64: #define __STDC_HOSTED__ 0 // RISCV64: #define __STDC_UTF_16__ 1 // RISCV64: #define __STDC_UTF_32__ 1 // RISCV64: #define __STDC_VERSION__ 201710L // RISCV64: #define __STDC__ 1 // RISCV64: #define __UINT16_C_SUFFIX__ // RISCV64: #define __UINT16_MAX__ 65535 // RISCV64: #define __UINT16_TYPE__ unsigned short // RISCV64: #define __UINT32_C_SUFFIX__ U // RISCV64: #define __UINT32_MAX__ 4294967295U // RISCV64: #define __UINT32_TYPE__ unsigned int // RISCV64: #define __UINT64_C_SUFFIX__ UL // RISCV64: #define __UINT64_MAX__ 18446744073709551615UL // RISCV64: #define __UINT64_TYPE__ long unsigned int // RISCV64: #define __UINT8_C_SUFFIX__ // RISCV64: #define __UINT8_MAX__ 255 // RISCV64: #define __UINT8_TYPE__ unsigned char // RISCV64: #define __UINTMAX_C_SUFFIX__ UL // RISCV64: #define __UINTMAX_MAX__ 18446744073709551615UL // RISCV64: #define __UINTMAX_TYPE__ long unsigned int // RISCV64: #define __UINTMAX_WIDTH__ 64 // RISCV64: #define __UINTPTR_MAX__ 18446744073709551615UL // RISCV64: #define __UINTPTR_TYPE__ long unsigned int // RISCV64: #define __UINTPTR_WIDTH__ 64 // TODO: RISC-V GCC defines UINT_FAST16 to be unsigned int // RISCV64: #define __UINT_FAST16_MAX__ 65535 // RISCV64: #define __UINT_FAST16_TYPE__ unsigned short // RISCV64: #define __UINT_FAST32_MAX__ 4294967295U // RISCV64: #define __UINT_FAST32_TYPE__ unsigned int // RISCV64: #define __UINT_FAST64_MAX__ 18446744073709551615UL // RISCV64: #define __UINT_FAST64_TYPE__ long unsigned int // TODO: RISC-V GCC defines UINT_FAST8 to be unsigned int // RISCV64: #define __UINT_FAST8_MAX__ 255 // RISCV64: #define __UINT_FAST8_TYPE__ unsigned char // RISCV64: #define __UINT_LEAST16_MAX__ 65535 // RISCV64: #define __UINT_LEAST16_TYPE__ unsigned short // RISCV64: #define __UINT_LEAST32_MAX__ 4294967295U // RISCV64: #define __UINT_LEAST32_TYPE__ unsigned int // RISCV64: #define __UINT_LEAST64_MAX__ 18446744073709551615UL // RISCV64: #define __UINT_LEAST64_TYPE__ long unsigned int // RISCV64: #define __UINT_LEAST8_MAX__ 255 // RISCV64: #define __UINT_LEAST8_TYPE__ unsigned char // RISCV64: #define __USER_LABEL_PREFIX__ // RISCV64: #define __WCHAR_MAX__ 2147483647 // RISCV64: #define __WCHAR_TYPE__ int // RISCV64: #define __WCHAR_WIDTH__ 32 // RISCV64: #define __WINT_TYPE__ unsigned int // RISCV64: #define __WINT_UNSIGNED__ 1 // RISCV64: #define __WINT_WIDTH__ 32 // RISCV64-LINUX: #define __gnu_linux__ 1 // RISCV64-LINUX: #define __linux 1 // RISCV64-LINUX: #define __linux__ 1 // RISCV64: #define __riscv 1 // RISCV64: #define __riscv_cmodel_medlow 1 // RISCV64: #define __riscv_float_abi_soft 1 // RISCV64: #define __riscv_xlen 64 // RISCV64-LINUX: #define __unix 1 // RISCV64-LINUX: #define __unix__ 1 // RISCV64-LINUX: #define linux 1 // RISCV64-LINUX: #define unix 1
the_stack_data/192331331.c
/* ### * IP: GHIDRA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifdef __x86_64 #include <malloc.h> #include <string.h> #else // Library routine not linked in for cross-build void * malloc(int size) { // missing implementation return (void *)0; } void free(void *ptr) { // missing implementation } int strlen(char *s) { int len = 0; while (*s++ != 0) { ++len; } return len; } #endif const char data[] = { 0xec, 0xc3, 0xd8, 0xd9, 0xde, 0x8a, 0xcf, 0xc4, 0xde, 0xd8, 0xd3, 0x00, 0xf9, 0xcf, 0xc9, 0xc5, 0xc4, 0xce, 0x8a, 0xcf, 0xc4, 0xde, 0xd8, 0xd3, 0x00, 0xfe, 0xc2, 0xc3, 0xd8, 0xce, 0x8a, 0xcf, 0xc4, 0xde, 0xd8, 0xd3, 0x00, 0x00 }; char * deobfuscate(char *src, int len) { char *buf = (char *)malloc(len + 1); char *ptr = buf; for (int i = 0; i < len; i++) { *ptr++ = *src++ ^ 0xAA; } *ptr = 0; return buf; } void use_string(char * str, int index) { // fprintf(stderr, "String[%d]: %s\n", index, str); } int main (int argc, char **argv) { char *ptr = (char *)data; int index = 0; while (*ptr != 0) { int len = strlen(ptr); char *str = deobfuscate(ptr, len); use_string(str, index++); free(str); ptr += len + 1; } return 0; } #ifndef __x86_64 int _start() { char *argv[] = { "deobExample" }; return main(1, argv); } #endif
the_stack_data/193892866.c
#include <stdio.h> #include <stdlib.h> typedef struct node { int val; struct node * left; struct node * right; } tree_node; void print(tree_node * current) { /* Recursively print left and right nodes */ if (current->left != NULL) { print(current->left); } if (current->right != NULL) { print(current->right); } /* Actually print the value */ if (current != NULL) { printf("%d\n", current->val); } } void print_tree(tree_node * current) { if (current != NULL) { printf("\n%d", current->val); } if (current->left != NULL) { printf("L%d", current->left->val); } if (current->right != NULL) { printf("L%d", current->right->val); } if (current->left != NULL) { print_tree(current->left); } if (current->right != NULL) { print_tree(current->right); } } void insert(tree_node * tree, int val) { if (tree->val == NULL) { tree->val = val; } else if (val < tree->val) { if (tree->left != NULL) { insert(tree->left, val); } else { tree->left = malloc(sizeof(tree_node)); tree->left->val = val; } } else if (val >= tree-> val) { if (tree->right != NULL) { insert(tree->right, val); } else { tree->right = malloc(sizeof(tree_node)); tree->right->val = val; } } } void main() { tree_node * test_list = malloc(sizeof(tree_node)); insert(test_list, 5); insert(test_list, 8); insert(test_list, 4); insert(test_list, 3); print(test_list); }
the_stack_data/75137429.c
// RUN: %clang_cc1 -g -emit-llvm -o %t %s // RUN: not grep 'call void @llvm.dbg.func.start' %t void t1() __attribute__((nodebug)); void t1() { int a = 10; a++; }
the_stack_data/808603.c
#include <stdio.h> #include <errno.h> #include <fcntl.h> #include <string.h> #include <unistd.h> #include <sys/stat.h> #include <sys/types.h> #include <stdlib.h> /* ** You should set NEED_FCHDIR to 1 if the chroot() on your ** system changes the working directory of the calling ** process to the same directory as the process was chroot()ed ** to. ** ** It is known that you do not need to set this value if you ** running on Solaris 2.7 and below. ** */ #define NEED_FCHDIR 0 #define TEMP_DIR "rootfs" /* Break out of a chroot() environment in C */ int main() { int x; /* Used to move up a directory tree */ int done=0; /* Are we done yet ? */ #ifdef NEED_FCHDIR int dir_fd; /* File descriptor to directory */ #endif struct stat sbuf; /* The stat() buffer */ /* ** First we create the temporary directory if it doesn't exist */ if (stat(TEMP_DIR,&sbuf)<0) { if (errno==ENOENT) { if (mkdir(TEMP_DIR,0755)<0) { fprintf(stderr,"Failed to create %s - %s\n", TEMP_DIR, strerror(errno)); exit(1); } } else { fprintf(stderr,"Failed to stat %s - %s\n", TEMP_DIR, strerror(errno)); exit(1); } } else if (!S_ISDIR(sbuf.st_mode)) { fprintf(stderr,"Error - %s is not a directory!\n",TEMP_DIR); exit(1); } #ifdef NEED_FCHDIR /* ** Now we open the current working directory ** ** Note: Only required if chroot() changes the calling program's ** working directory to the directory given to chroot(). ** */ if ((dir_fd=open(".",O_RDONLY))<0) { fprintf(stderr,"Failed to open \".\" for reading - %s\n", strerror(errno)); exit(1); } #endif /* ** Next we chroot() to the temporary directory */ if (chroot(TEMP_DIR)<0) { fprintf(stderr,"Failed to chroot to %s - %s\n",TEMP_DIR, strerror(errno)); exit(1); } #ifdef NEED_FCHDIR /* ** Partially break out of the chroot by doing an fchdir() ** ** This only partially breaks out of the chroot() since whilst ** our current working directory is outside of the chroot() jail, ** our root directory is still within it. Thus anything which refers ** to "/" will refer to files under the chroot() point. ** ** Note: Only required if chroot() changes the calling program's ** working directory to the directory given to chroot(). ** */ if (fchdir(dir_fd)<0) { fprintf(stderr,"Failed to fchdir - %s\n", strerror(errno)); exit(1); } close(dir_fd); #endif /* ** Completely break out of the chroot by recursing up the directory ** tree and doing a chroot to the current working directory (which will ** be the real "/" at that point). We just do a chdir("..") lots of ** times (1024 times for luck :). If we hit the real root directory before ** we have finished the loop below it doesn't matter as .. in the root ** directory is the same as . in the root. ** ** We do the final break out by doing a chroot(".") which sets the root ** directory to the current working directory - at this point the real ** root directory. */ for(x=0;x<1024;x++) { chdir(".."); } chroot("."); /* ** We're finally out - so exec a shell in interactive mode */ if (execl("/bin/sh","-i",NULL)<0) { fprintf(stderr,"Failed to exec - %s\n",strerror(errno)); exit(1); } }
the_stack_data/34513053.c
/////////////////////////////////////////////////////////////////////////////////// // The MIT License (MIT) // // Copyright (c) 2017 Tarek Sherif // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of // the Software, and to permit persons to whom the Software is furnished to do so, // subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /////////////////////////////////////////////////////////////////////////////////// #include <stdio.h> #include <X11/Xlib.h> #include <GL/glx.h> typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*); static Display* display; static Window window; static GLXContext ctx; int xogl_context_create(Display* disp, Window win, int major, int minor) { display = disp; window = win; int numFBC = 0; GLint visualAtt[] = { GLX_RENDER_TYPE, GLX_RGBA_BIT, GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, GLX_DOUBLEBUFFER, True, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_DEPTH_SIZE, 1, GLX_STENCIL_SIZE, 1, None }; GLXFBConfig *fbc = glXChooseFBConfig(display, DefaultScreen(display), visualAtt, &numFBC); if (!fbc) { fprintf(stderr, "Unable to get framebuffer\n"); return -1; } glXCreateContextAttribsARBProc glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc) glXGetProcAddress((const GLubyte *) "glXCreateContextAttribsARB"); if (!glXCreateContextAttribsARB) { fprintf(stderr, "Unable to get proc glXCreateContextAttribsARB\n"); XFree(fbc); return -1; } static int contextAttribs[] = { GLX_CONTEXT_MAJOR_VERSION_ARB, 4, GLX_CONTEXT_MINOR_VERSION_ARB, 5, GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB, None }; contextAttribs[1] = major; contextAttribs[3] = minor; ctx = glXCreateContextAttribsARB(display, *fbc, NULL, True, contextAttribs); XFree(fbc); if (!ctx) { fprintf(stderr, "Unable to create OpenGL context\n"); return -1; } glXMakeCurrent(display, window, ctx); return 0; } void* xogl_context_getProc(const char* proc) { return (void *) glXGetProcAddress((const GLubyte *) proc); } void xogl_context_swapBuffers(void) { glXSwapBuffers(display, window); } void xogl_context_destroy(void) { if (glXGetCurrentContext() == ctx) { glXMakeCurrent(display, None, NULL); } glXDestroyContext(display, ctx); }
the_stack_data/89200125.c
/* Provide Declarations */ #include <stdarg.h> #include <setjmp.h> /* get a declaration for alloca */ #if defined(__CYGWIN__) || defined(__MINGW32__) #define alloca(x) __builtin_alloca((x)) #define _alloca(x) __builtin_alloca((x)) #elif defined(__APPLE__) extern void *__builtin_alloca(unsigned long); #define alloca(x) __builtin_alloca(x) #define longjmp _longjmp #define setjmp _setjmp #elif defined(__sun__) #if defined(__sparcv9) extern void *__builtin_alloca(unsigned long); #else extern void *__builtin_alloca(unsigned int); #endif #define alloca(x) __builtin_alloca(x) #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__arm__) #define alloca(x) __builtin_alloca(x) #elif defined(_MSC_VER) #define inline _inline #define alloca(x) _alloca(x) #else #include <alloca.h> #endif #ifndef __GNUC__ /* Can only support "linkonce" vars with GCC */ #define __attribute__(X) #endif #if defined(__GNUC__) && defined(__APPLE_CC__) #define __EXTERNAL_WEAK__ __attribute__((weak_import)) #elif defined(__GNUC__) #define __EXTERNAL_WEAK__ __attribute__((weak)) #else #define __EXTERNAL_WEAK__ #endif #if defined(__GNUC__) && defined(__APPLE_CC__) #define __ATTRIBUTE_WEAK__ #elif defined(__GNUC__) #define __ATTRIBUTE_WEAK__ __attribute__((weak)) #else #define __ATTRIBUTE_WEAK__ #endif #if defined(__GNUC__) #define __HIDDEN__ __attribute__((visibility("hidden"))) #endif #ifdef __GNUC__ #define LLVM_NAN(NanStr) __builtin_nan(NanStr) /* Double */ #define LLVM_NANF(NanStr) __builtin_nanf(NanStr) /* Float */ #define LLVM_NANS(NanStr) __builtin_nans(NanStr) /* Double */ #define LLVM_NANSF(NanStr) __builtin_nansf(NanStr) /* Float */ #define LLVM_INF __builtin_inf() /* Double */ #define LLVM_INFF __builtin_inff() /* Float */ #define LLVM_PREFETCH(addr,rw,locality) __builtin_prefetch(addr,rw,locality) #define __ATTRIBUTE_CTOR__ __attribute__((constructor)) #define __ATTRIBUTE_DTOR__ __attribute__((destructor)) #define LLVM_ASM __asm__ #else #define LLVM_NAN(NanStr) ((double)0.0) /* Double */ #define LLVM_NANF(NanStr) 0.0F /* Float */ #define LLVM_NANS(NanStr) ((double)0.0) /* Double */ #define LLVM_NANSF(NanStr) 0.0F /* Float */ #define LLVM_INF ((double)0.0) /* Double */ #define LLVM_INFF 0.0F /* Float */ #define LLVM_PREFETCH(addr,rw,locality) /* PREFETCH */ #define __ATTRIBUTE_CTOR__ #define __ATTRIBUTE_DTOR__ #define LLVM_ASM(X) #endif #if __GNUC__ < 4 /* Old GCC's, or compilers not GCC */ #define __builtin_stack_save() 0 /* not implemented */ #define __builtin_stack_restore(X) /* noop */ #endif #if __GNUC__ && __LP64__ /* 128-bit integer types */ typedef int __attribute__((mode(TI))) llvmInt128; typedef unsigned __attribute__((mode(TI))) llvmUInt128; #endif #define CODE_FOR_MAIN() /* Any target-specific code for main()*/ #ifndef __cplusplus typedef unsigned char bool; #endif /* Support for floating point constants */ typedef unsigned long long ConstantDoubleTy; typedef unsigned int ConstantFloatTy; typedef struct { unsigned long long f1; unsigned short f2; unsigned short pad[3]; } ConstantFP80Ty; typedef struct { unsigned long long f1; unsigned long long f2; } ConstantFP128Ty; /* Global Declarations */ /* Helper union for bitcasts */ typedef union { unsigned int Int32; unsigned long long Int64; float Float; double Double; } llvmBitCastUnion; /* Structure forward decls */ struct l_class_OC_std_KD__KD_allocator; struct l_class_OC_std_KD__KD_basic_ostream; struct l_class_OC_std_KD__KD_basic_string; struct l_struct_OC_std_KD__KD_basic_string_MD_char_MC__AC_std_KD__KD_char_traits_MD_char_OD__MC__AC_std_KD__KD_allocator_MD_char_OD__AC__OD__KD__KD__Alloc_hider; struct l_unnamed0; struct l_unnamed1; struct l_unnamed10; struct l_unnamed11; struct l_unnamed12; struct l_unnamed13; struct l_unnamed14; struct l_unnamed15; struct l_unnamed16; struct l_unnamed17; struct l_unnamed18; struct l_unnamed19; struct l_unnamed2; struct l_unnamed20; struct l_unnamed3; struct l_unnamed4; struct l_unnamed5; struct l_unnamed6; struct l_unnamed7; struct l_unnamed8; struct l_unnamed9; /* Typedefs */ typedef struct l_class_OC_std_KD__KD_allocator l_class_OC_std_KD__KD_allocator; typedef struct l_class_OC_std_KD__KD_basic_ostream l_class_OC_std_KD__KD_basic_ostream; typedef struct l_class_OC_std_KD__KD_basic_string l_class_OC_std_KD__KD_basic_string; typedef struct l_struct_OC_std_KD__KD_basic_string_MD_char_MC__AC_std_KD__KD_char_traits_MD_char_OD__MC__AC_std_KD__KD_allocator_MD_char_OD__AC__OD__KD__KD__Alloc_hider l_struct_OC_std_KD__KD_basic_string_MD_char_MC__AC_std_KD__KD_char_traits_MD_char_OD__MC__AC_std_KD__KD_allocator_MD_char_OD__AC__OD__KD__KD__Alloc_hider; typedef struct l_unnamed0 l_unnamed0; typedef struct l_unnamed1 l_unnamed1; typedef struct l_unnamed10 l_unnamed10; typedef struct l_unnamed11 l_unnamed11; typedef struct l_unnamed12 l_unnamed12; typedef struct l_unnamed13 l_unnamed13; typedef struct l_unnamed14 l_unnamed14; typedef struct l_unnamed15 l_unnamed15; typedef struct l_unnamed16 l_unnamed16; typedef struct l_unnamed17 l_unnamed17; typedef struct l_unnamed18 l_unnamed18; typedef struct l_unnamed19 l_unnamed19; typedef struct l_unnamed2 l_unnamed2; typedef struct l_unnamed20 l_unnamed20; typedef struct l_unnamed3 l_unnamed3; typedef struct l_unnamed4 l_unnamed4; typedef struct l_unnamed5 l_unnamed5; typedef struct l_unnamed6 l_unnamed6; typedef struct l_unnamed7 l_unnamed7; typedef struct l_unnamed8 l_unnamed8; typedef struct l_unnamed9 l_unnamed9; /* Structure contents */ struct l_class_OC_std_KD__KD_allocator { unsigned char field0; }; struct l_unnamed19 { unsigned char array[136]; }; struct l_class_OC_std_KD__KD_basic_ostream { unsigned int (**field0) ( int, ...); struct l_unnamed19 field1; }; struct l_struct_OC_std_KD__KD_basic_string_MD_char_MC__AC_std_KD__KD_char_traits_MD_char_OD__MC__AC_std_KD__KD_allocator_MD_char_OD__AC__OD__KD__KD__Alloc_hider { unsigned char *field0; }; struct l_class_OC_std_KD__KD_basic_string { struct l_struct_OC_std_KD__KD_basic_string_MD_char_MC__AC_std_KD__KD_char_traits_MD_char_OD__MC__AC_std_KD__KD_allocator_MD_char_OD__AC__OD__KD__KD__Alloc_hider field0; }; struct l_unnamed0 { unsigned char array[24]; }; struct l_unnamed1 { unsigned char array[26]; }; struct l_unnamed10 { unsigned char array[45]; }; struct l_unnamed12 { unsigned int field0; void (*field1) (void); }; struct l_unnamed11 { struct l_unnamed12 array[1]; }; struct l_unnamed13 { unsigned char array[33]; }; struct l_unnamed14 { unsigned char array[38]; }; struct l_unnamed15 { unsigned char array[10]; }; struct l_unnamed16 { unsigned char array[11]; }; struct l_unnamed17 { unsigned char array[8]; }; struct l_unnamed18 { unsigned char array[6]; }; struct l_unnamed2 { unsigned char array[3]; }; struct l_unnamed20 { unsigned char array[18]; }; struct l_unnamed3 { unsigned char array[2]; }; struct l_unnamed4 { unsigned char array[48]; }; struct l_unnamed5 { unsigned char array[34]; }; struct l_unnamed6 { unsigned char array[28]; }; struct l_unnamed7 { unsigned char array[23]; }; struct l_unnamed8 { unsigned char array[43]; }; struct l_unnamed9 { unsigned char array[5]; }; /* External Global Variable Declarations */ extern unsigned char *__dso_handle; extern struct l_class_OC_std_KD__KD_basic_ostream _ZSt4cout; /* Function Declarations */ double fmod(double, double); float fmodf(float, float); long double fmodl(long double, long double); static void __cxx_global_var_init(void); void _ZNSt8ios_base4InitC1Ev(struct l_class_OC_std_KD__KD_allocator *); void _ZNSt8ios_base4InitD1Ev(struct l_class_OC_std_KD__KD_allocator *); unsigned int __cxa_atexit(void (*) (unsigned char *), unsigned char *, unsigned char *); unsigned int main(void); void _ZNSsC1EPKcRKSaIcE(struct l_class_OC_std_KD__KD_basic_string *, unsigned char *, struct l_class_OC_std_KD__KD_allocator *); void _ZNSaIcEC1Ev(struct l_class_OC_std_KD__KD_allocator *); unsigned int __gxx_personality_v0(int vararg_dummy_arg,...); void _Unwind_Resume_or_Rethrow(unsigned char *); void _ZNSaIcED1Ev(struct l_class_OC_std_KD__KD_allocator *); void _ZNSsC1Ev(struct l_class_OC_std_KD__KD_basic_string *); struct l_class_OC_std_KD__KD_basic_ostream *_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(struct l_class_OC_std_KD__KD_basic_ostream *, unsigned char *); struct l_class_OC_std_KD__KD_basic_ostream *_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(struct l_class_OC_std_KD__KD_basic_ostream *, signed char ); struct l_class_OC_std_KD__KD_basic_ostream *_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E(struct l_class_OC_std_KD__KD_basic_ostream *, struct l_class_OC_std_KD__KD_basic_string *); bool _ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_(struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___lhs, struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___rhs) __ATTRIBUTE_WEAK__; bool _ZStneIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_(struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___lhs, struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___rhs) __ATTRIBUTE_WEAK__; bool _ZStgtIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_(struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___lhs, struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___rhs) __ATTRIBUTE_WEAK__; bool _ZStltIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_(struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___lhs, struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___rhs) __ATTRIBUTE_WEAK__; bool _ZStgeIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_(struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___lhs, struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___rhs) __ATTRIBUTE_WEAK__; bool _ZStleIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_(struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___lhs, struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___rhs) __ATTRIBUTE_WEAK__; bool _ZNKSs5emptyEv(struct l_class_OC_std_KD__KD_basic_string *); struct l_class_OC_std_KD__KD_basic_string *_ZNSsaSERKSs(struct l_class_OC_std_KD__KD_basic_string *, struct l_class_OC_std_KD__KD_basic_string *); struct l_class_OC_std_KD__KD_basic_string *_ZNSspLERKSs(struct l_class_OC_std_KD__KD_basic_string *, struct l_class_OC_std_KD__KD_basic_string *); struct l_class_OC_std_KD__KD_basic_string *_ZNSspLEPKc(struct l_class_OC_std_KD__KD_basic_string *, unsigned char *); struct l_class_OC_std_KD__KD_basic_string _ZNKSs6substrEjj(struct l_class_OC_std_KD__KD_basic_string *, unsigned int , unsigned int ); void _ZNSsD1Ev(struct l_class_OC_std_KD__KD_basic_string *); void _ZSt9terminatev(void); unsigned char *_Znwj(unsigned int ); void _ZNSsC1ERKSs(struct l_class_OC_std_KD__KD_basic_string *, struct l_class_OC_std_KD__KD_basic_string *); void _ZdlPv(unsigned char *); unsigned char *_ZNSsixEj(struct l_class_OC_std_KD__KD_basic_string *, unsigned int ); struct l_class_OC_std_KD__KD_basic_ostream *_ZNSolsEPFRSoS_E(struct l_class_OC_std_KD__KD_basic_ostream *, struct l_class_OC_std_KD__KD_basic_ostream * (*) (struct l_class_OC_std_KD__KD_basic_ostream *)); struct l_class_OC_std_KD__KD_basic_ostream *_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(struct l_class_OC_std_KD__KD_basic_ostream *); unsigned char *_ZNSs2atEj(struct l_class_OC_std_KD__KD_basic_string *, unsigned int ); unsigned int _ZNKSs7compareERKSs(struct l_class_OC_std_KD__KD_basic_string *, struct l_class_OC_std_KD__KD_basic_string *); unsigned int _ZNKSs4sizeEv(struct l_class_OC_std_KD__KD_basic_string *); unsigned int _ZNSt11char_traitsIcE7compareEPKcS2_j(unsigned char *llvm_cbe___s1, unsigned char *llvm_cbe___s2, unsigned int llvm_cbe___n) __ATTRIBUTE_WEAK__; unsigned char *_ZNKSs4dataEv(struct l_class_OC_std_KD__KD_basic_string *); unsigned int memcmp(unsigned char *, unsigned char *, unsigned int ); static void _GLOBAL__I_a(void) __ATTRIBUTE_CTOR__; void abort(void); /* Global Variable Declarations */ static struct l_class_OC_std_KD__KD_allocator _ZStL8__ioinit; static struct l_unnamed18 _OC_str; static struct l_unnamed15 _OC_str1; static struct l_unnamed17 _OC_str2; static struct l_unnamed16 _OC_str3; static struct l_unnamed16 _OC_str4; static struct l_unnamed14 _OC_str5; static struct l_unnamed20 _OC_str6; static struct l_unnamed9 _OC_str7; static struct l_unnamed18 _OC_str8; static struct l_unnamed20 _OC_str9; static struct l_unnamed20 _OC_str10; static struct l_unnamed20 _OC_str11; static struct l_unnamed20 _OC_str12; static struct l_unnamed20 _OC_str13; static struct l_unnamed7 _OC_str14; static struct l_unnamed5 _OC_str15; static struct l_unnamed17 _OC_str16; static struct l_unnamed3 _OC_str17; static struct l_unnamed0 _OC_str18; static struct l_unnamed1 _OC_str19; static struct l_unnamed17 _OC_str20; static struct l_unnamed18 _OC_str21; static struct l_unnamed2 _OC_str22; static struct l_unnamed4 _OC_str23; static struct l_unnamed14 _OC_str24; static struct l_unnamed13 _OC_str25; static struct l_unnamed13 _OC_str26; static struct l_unnamed16 _OC_str27; static struct l_unnamed6 _OC_str28; static struct l_unnamed15 _OC_str29; static struct l_unnamed8 _OC_str30; static struct l_unnamed10 _OC_str31; /* Global Variable Definitions and Initialization */ static struct l_class_OC_std_KD__KD_allocator _ZStL8__ioinit; static struct l_unnamed18 _OC_str = { "happy" }; static struct l_unnamed15 _OC_str1 = { " birthday" }; static struct l_unnamed17 _OC_str2 = { "s1 is \"" }; static struct l_unnamed16 _OC_str3 = { "\"; s2 is \"" }; static struct l_unnamed16 _OC_str4 = { "\"; s3 is \"" }; static struct l_unnamed14 _OC_str5 = { "\n\nThe results of comparing s2 and s1:" }; static struct l_unnamed20 _OC_str6 = { "\ns2 == s1 yields " }; static struct l_unnamed9 _OC_str7 = { "true" }; static struct l_unnamed18 _OC_str8 = { "false" }; static struct l_unnamed20 _OC_str9 = { "\ns2 != s1 yields " }; static struct l_unnamed20 _OC_str10 = { "\ns2 > s1 yields " }; static struct l_unnamed20 _OC_str11 = { "\ns2 < s1 yields " }; static struct l_unnamed20 _OC_str12 = { "\ns2 >= s1 yields " }; static struct l_unnamed20 _OC_str13 = { "\ns2 <= s1 yields " }; static struct l_unnamed7 _OC_str14 = { "\n\nTesting s3.empty():\n" }; static struct l_unnamed5 _OC_str15 = { "s3 is empty; assigning s1 to s3;\n" }; static struct l_unnamed17 _OC_str16 = { "s3 is \"" }; static struct l_unnamed3 _OC_str17 = { "\"" }; static struct l_unnamed0 _OC_str18 = { "\n\ns1 += s2 yields s1 = " }; static struct l_unnamed1 _OC_str19 = { "\n\ns1 += \" to you\" yields\n" }; static struct l_unnamed17 _OC_str20 = { " to you" }; static struct l_unnamed18 _OC_str21 = { "s1 = " }; static struct l_unnamed2 _OC_str22 = { "\n\n" }; static struct l_unnamed4 _OC_str23 = { "The substring of s1 starting at location 0 for\n" }; static struct l_unnamed14 _OC_str24 = { "14 characters, s1.substr(0, 14), is:\n" }; static struct l_unnamed13 _OC_str25 = { "The substring of s1 starting at\n" }; static struct l_unnamed13 _OC_str26 = { "location 15, s1.substr(15), is:\n" }; static struct l_unnamed16 _OC_str27 = { "\n*s4Ptr = " }; static struct l_unnamed6 _OC_str28 = { "assigning *s4Ptr to *s4Ptr\n" }; static struct l_unnamed15 _OC_str29 = { "*s4Ptr = " }; static struct l_unnamed8 _OC_str30 = { "\ns1 after s1[0] = 'H' and s1[6] = 'B' is: " }; static struct l_unnamed10 _OC_str31 = { "Attempt to assign 'd' to s1.at( 30 ) yields:" }; /* Function Bodies */ static inline int llvm_fcmp_ord(double X, double Y) { return X == X && Y == Y; } static inline int llvm_fcmp_uno(double X, double Y) { return X != X || Y != Y; } static inline int llvm_fcmp_ueq(double X, double Y) { return X == Y || llvm_fcmp_uno(X, Y); } static inline int llvm_fcmp_une(double X, double Y) { return X != Y; } static inline int llvm_fcmp_ult(double X, double Y) { return X < Y || llvm_fcmp_uno(X, Y); } static inline int llvm_fcmp_ugt(double X, double Y) { return X > Y || llvm_fcmp_uno(X, Y); } static inline int llvm_fcmp_ule(double X, double Y) { return X <= Y || llvm_fcmp_uno(X, Y); } static inline int llvm_fcmp_uge(double X, double Y) { return X >= Y || llvm_fcmp_uno(X, Y); } static inline int llvm_fcmp_oeq(double X, double Y) { return X == Y ; } static inline int llvm_fcmp_one(double X, double Y) { return X != Y && llvm_fcmp_ord(X, Y); } static inline int llvm_fcmp_olt(double X, double Y) { return X < Y ; } static inline int llvm_fcmp_ogt(double X, double Y) { return X > Y ; } static inline int llvm_fcmp_ole(double X, double Y) { return X <= Y ; } static inline int llvm_fcmp_oge(double X, double Y) { return X >= Y ; } static void __cxx_global_var_init(void) { unsigned int llvm_cbe_tmp__1; _ZNSt8ios_base4InitC1Ev((&_ZStL8__ioinit)); llvm_cbe_tmp__1 = __cxa_atexit(((void (*) (unsigned char *))_ZNSt8ios_base4InitD1Ev), ((&_ZStL8__ioinit.field0)), ((unsigned char *)(&__dso_handle))); return; } unsigned int main(void) { unsigned int llvm_cbe_tmp__2; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string llvm_cbe_s1; /* Address-exposed local */ struct l_class_OC_std_KD__KD_allocator llvm_cbe_tmp__3; /* Address-exposed local */ unsigned char *llvm_cbe_tmp__4; /* Address-exposed local */ unsigned int llvm_cbe_tmp__5; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string llvm_cbe_s2; /* Address-exposed local */ struct l_class_OC_std_KD__KD_allocator llvm_cbe_tmp__6; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string llvm_cbe_s3; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string llvm_cbe_tmp__7; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string llvm_cbe_tmp__8; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_s4Ptr; /* Address-exposed local */ unsigned int llvm_cbe_tmp__9; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__10; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__11; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__12; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__13; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__14; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__15; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__16; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__17; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__18; bool llvm_cbe_tmp__19; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__20; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__21; bool llvm_cbe_tmp__22; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__23; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__24; bool llvm_cbe_tmp__25; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__26; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__27; bool llvm_cbe_tmp__28; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__29; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__30; bool llvm_cbe_tmp__31; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__32; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__33; bool llvm_cbe_tmp__34; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__35; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__36; bool llvm_cbe_tmp__37; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__38; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__39; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__40; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__41; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__42; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__43; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__44; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__45; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__46; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__47; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__48; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__49; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__50; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__51; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__52; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__53; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__54; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__55; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__56; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__57; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__58; unsigned char *llvm_cbe_tmp__59; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__60; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__61; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__62; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__63; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__64; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__65; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__66; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__67; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__68; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__69; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__70; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__71; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__72; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__73; unsigned char *llvm_cbe_tmp__74; unsigned char *llvm_cbe_tmp__75; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__76; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__77; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__78; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__79; struct l_class_OC_std_KD__KD_basic_ostream *llvm_cbe_tmp__80; unsigned char *llvm_cbe_tmp__81; unsigned int llvm_cbe_tmp__82; CODE_FOR_MAIN(); *(&llvm_cbe_tmp__2) = 0u; _ZNSaIcEC1Ev((&llvm_cbe_tmp__3)); _ZNSsC1EPKcRKSaIcE((&llvm_cbe_s1), ((&_OC_str.array[((signed int )0u)])), (&llvm_cbe_tmp__3)); _ZNSaIcED1Ev((&llvm_cbe_tmp__3)); _ZNSaIcEC1Ev((&llvm_cbe_tmp__6)); _ZNSsC1EPKcRKSaIcE((&llvm_cbe_s2), ((&_OC_str1.array[((signed int )0u)])), (&llvm_cbe_tmp__6)); _ZNSaIcED1Ev((&llvm_cbe_tmp__6)); _ZNSsC1Ev((&llvm_cbe_s3)); llvm_cbe_tmp__10 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str2.array[((signed int )0u)]))); llvm_cbe_tmp__11 = _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E(llvm_cbe_tmp__10, (&llvm_cbe_s1)); llvm_cbe_tmp__12 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__11, ((&_OC_str3.array[((signed int )0u)]))); llvm_cbe_tmp__13 = _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E(llvm_cbe_tmp__12, (&llvm_cbe_s2)); llvm_cbe_tmp__14 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__13, ((&_OC_str4.array[((signed int )0u)]))); llvm_cbe_tmp__15 = _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E(llvm_cbe_tmp__14, (&llvm_cbe_s3)); llvm_cbe_tmp__16 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(llvm_cbe_tmp__15, ((unsigned char )34)); llvm_cbe_tmp__17 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__16, ((&_OC_str5.array[((signed int )0u)]))); llvm_cbe_tmp__18 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__17, ((&_OC_str6.array[((signed int )0u)]))); llvm_cbe_tmp__19 = ((_ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_((&llvm_cbe_s2), (&llvm_cbe_s1)))&1); llvm_cbe_tmp__20 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__18, (((llvm_cbe_tmp__19) ? (((&_OC_str7.array[((signed int )0u)]))) : (((&_OC_str8.array[((signed int )0u)])))))); llvm_cbe_tmp__21 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__20, ((&_OC_str9.array[((signed int )0u)]))); llvm_cbe_tmp__22 = ((_ZStneIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_((&llvm_cbe_s2), (&llvm_cbe_s1)))&1); llvm_cbe_tmp__23 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__21, (((llvm_cbe_tmp__22) ? (((&_OC_str7.array[((signed int )0u)]))) : (((&_OC_str8.array[((signed int )0u)])))))); llvm_cbe_tmp__24 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__23, ((&_OC_str10.array[((signed int )0u)]))); llvm_cbe_tmp__25 = ((_ZStgtIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_((&llvm_cbe_s2), (&llvm_cbe_s1)))&1); llvm_cbe_tmp__26 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__24, (((llvm_cbe_tmp__25) ? (((&_OC_str7.array[((signed int )0u)]))) : (((&_OC_str8.array[((signed int )0u)])))))); llvm_cbe_tmp__27 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__26, ((&_OC_str11.array[((signed int )0u)]))); llvm_cbe_tmp__28 = ((_ZStltIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_((&llvm_cbe_s2), (&llvm_cbe_s1)))&1); llvm_cbe_tmp__29 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__27, (((llvm_cbe_tmp__28) ? (((&_OC_str7.array[((signed int )0u)]))) : (((&_OC_str8.array[((signed int )0u)])))))); llvm_cbe_tmp__30 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__29, ((&_OC_str12.array[((signed int )0u)]))); llvm_cbe_tmp__31 = ((_ZStgeIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_((&llvm_cbe_s2), (&llvm_cbe_s1)))&1); llvm_cbe_tmp__32 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__30, (((llvm_cbe_tmp__31) ? (((&_OC_str7.array[((signed int )0u)]))) : (((&_OC_str8.array[((signed int )0u)])))))); llvm_cbe_tmp__33 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__32, ((&_OC_str13.array[((signed int )0u)]))); llvm_cbe_tmp__34 = ((_ZStleIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_((&llvm_cbe_s2), (&llvm_cbe_s1)))&1); llvm_cbe_tmp__35 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__33, (((llvm_cbe_tmp__34) ? (((&_OC_str7.array[((signed int )0u)]))) : (((&_OC_str8.array[((signed int )0u)])))))); llvm_cbe_tmp__36 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str14.array[((signed int )0u)]))); llvm_cbe_tmp__37 = ((_ZNKSs5emptyEv((&llvm_cbe_s3)))&1); if (llvm_cbe_tmp__37) { goto llvm_cbe_tmp__83; } else { goto llvm_cbe_tmp__84; } llvm_cbe_tmp__83: llvm_cbe_tmp__38 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str15.array[((signed int )0u)]))); llvm_cbe_tmp__39 = _ZNSsaSERKSs((&llvm_cbe_s3), (&llvm_cbe_s1)); llvm_cbe_tmp__40 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str16.array[((signed int )0u)]))); llvm_cbe_tmp__41 = _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E(llvm_cbe_tmp__40, (&llvm_cbe_s3)); llvm_cbe_tmp__42 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__41, ((&_OC_str17.array[((signed int )0u)]))); goto llvm_cbe_tmp__84; llvm_cbe_tmp__84: llvm_cbe_tmp__43 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str18.array[((signed int )0u)]))); llvm_cbe_tmp__44 = _ZNSspLERKSs((&llvm_cbe_s1), (&llvm_cbe_s2)); llvm_cbe_tmp__45 = _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E((&_ZSt4cout), (&llvm_cbe_s1)); llvm_cbe_tmp__46 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str19.array[((signed int )0u)]))); llvm_cbe_tmp__47 = _ZNSspLEPKc((&llvm_cbe_s1), ((&_OC_str20.array[((signed int )0u)]))); llvm_cbe_tmp__48 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str21.array[((signed int )0u)]))); llvm_cbe_tmp__49 = _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E(llvm_cbe_tmp__48, (&llvm_cbe_s1)); llvm_cbe_tmp__50 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__49, ((&_OC_str22.array[((signed int )0u)]))); llvm_cbe_tmp__51 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str23.array[((signed int )0u)]))); llvm_cbe_tmp__52 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__51, ((&_OC_str24.array[((signed int )0u)]))); llvm_cbe_tmp__7 = _ZNKSs6substrEjj((&llvm_cbe_s1), 0u, 14u); llvm_cbe_tmp__53 = _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E(llvm_cbe_tmp__52, (&llvm_cbe_tmp__7)); llvm_cbe_tmp__54 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__53, ((&_OC_str22.array[((signed int )0u)]))); _ZNSsD1Ev((&llvm_cbe_tmp__7)); llvm_cbe_tmp__55 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str25.array[((signed int )0u)]))); llvm_cbe_tmp__56 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__55, ((&_OC_str26.array[((signed int )0u)]))); llvm_cbe_tmp__8 = _ZNKSs6substrEjj((&llvm_cbe_s1), 15u, 4294967295u); llvm_cbe_tmp__57 = _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E(llvm_cbe_tmp__56, (&llvm_cbe_tmp__8)); llvm_cbe_tmp__58 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(llvm_cbe_tmp__57, ((unsigned char )10)); _ZNSsD1Ev((&llvm_cbe_tmp__8)); llvm_cbe_tmp__59 = _Znwj(4u); llvm_cbe_tmp__60 = ((struct l_class_OC_std_KD__KD_basic_string *)llvm_cbe_tmp__59); _ZNSsC1ERKSs(llvm_cbe_tmp__60, (&llvm_cbe_s1)); *(&llvm_cbe_s4Ptr) = llvm_cbe_tmp__60; llvm_cbe_tmp__61 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str27.array[((signed int )0u)]))); llvm_cbe_tmp__62 = *(&llvm_cbe_s4Ptr); llvm_cbe_tmp__63 = _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E(llvm_cbe_tmp__61, llvm_cbe_tmp__62); llvm_cbe_tmp__64 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__63, ((&_OC_str22.array[((signed int )0u)]))); llvm_cbe_tmp__65 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str28.array[((signed int )0u)]))); llvm_cbe_tmp__66 = *(&llvm_cbe_s4Ptr); llvm_cbe_tmp__67 = *(&llvm_cbe_s4Ptr); llvm_cbe_tmp__68 = _ZNSsaSERKSs(llvm_cbe_tmp__66, llvm_cbe_tmp__67); llvm_cbe_tmp__69 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str29.array[((signed int )0u)]))); llvm_cbe_tmp__70 = *(&llvm_cbe_s4Ptr); llvm_cbe_tmp__71 = _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E(llvm_cbe_tmp__69, llvm_cbe_tmp__70); llvm_cbe_tmp__72 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(llvm_cbe_tmp__71, ((unsigned char )10)); llvm_cbe_tmp__73 = *(&llvm_cbe_s4Ptr); if ((llvm_cbe_tmp__73 == ((struct l_class_OC_std_KD__KD_basic_string *)/*NULL*/0))) { goto llvm_cbe_tmp__85; } else { goto llvm_cbe_tmp__86; } llvm_cbe_tmp__86: _ZNSsD1Ev(llvm_cbe_tmp__73); _ZdlPv((((unsigned char *)llvm_cbe_tmp__73))); goto llvm_cbe_tmp__85; llvm_cbe_tmp__85: llvm_cbe_tmp__74 = _ZNSsixEj((&llvm_cbe_s1), 0u); *llvm_cbe_tmp__74 = ((unsigned char )72); llvm_cbe_tmp__75 = _ZNSsixEj((&llvm_cbe_s1), 6u); *llvm_cbe_tmp__75 = ((unsigned char )66); llvm_cbe_tmp__76 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str30.array[((signed int )0u)]))); llvm_cbe_tmp__77 = _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E(llvm_cbe_tmp__76, (&llvm_cbe_s1)); llvm_cbe_tmp__78 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(llvm_cbe_tmp__77, ((&_OC_str22.array[((signed int )0u)]))); llvm_cbe_tmp__79 = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc((&_ZSt4cout), ((&_OC_str31.array[((signed int )0u)]))); llvm_cbe_tmp__80 = _ZNSolsEPFRSoS_E(llvm_cbe_tmp__79, _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_); llvm_cbe_tmp__81 = _ZNSs2atEj((&llvm_cbe_s1), 30u); *llvm_cbe_tmp__81 = ((unsigned char )100); *(&llvm_cbe_tmp__2) = 0u; *(&llvm_cbe_tmp__9) = 1u; _ZNSsD1Ev((&llvm_cbe_s3)); _ZNSsD1Ev((&llvm_cbe_s2)); _ZNSsD1Ev((&llvm_cbe_s1)); llvm_cbe_tmp__82 = *(&llvm_cbe_tmp__2); return llvm_cbe_tmp__82; } bool _ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_(struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___lhs, struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___rhs) { struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__87; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__88; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__89; unsigned int llvm_cbe_tmp__90; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__91; unsigned int llvm_cbe_tmp__92; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__93; unsigned char *llvm_cbe_tmp__94; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__95; unsigned char *llvm_cbe_tmp__96; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__97; unsigned int llvm_cbe_tmp__98; unsigned int llvm_cbe_tmp__99; *(&llvm_cbe_tmp__87) = llvm_cbe___lhs; *(&llvm_cbe_tmp__88) = llvm_cbe___rhs; llvm_cbe_tmp__89 = *(&llvm_cbe_tmp__87); llvm_cbe_tmp__90 = _ZNKSs4sizeEv(llvm_cbe_tmp__89); llvm_cbe_tmp__91 = *(&llvm_cbe_tmp__88); llvm_cbe_tmp__92 = _ZNKSs4sizeEv(llvm_cbe_tmp__91); if ((llvm_cbe_tmp__90 == llvm_cbe_tmp__92)) { goto llvm_cbe_tmp__100; } else { goto llvm_cbe_tmp__101; } llvm_cbe_tmp__100: llvm_cbe_tmp__93 = *(&llvm_cbe_tmp__87); llvm_cbe_tmp__94 = _ZNKSs4dataEv(llvm_cbe_tmp__93); llvm_cbe_tmp__95 = *(&llvm_cbe_tmp__88); llvm_cbe_tmp__96 = _ZNKSs4dataEv(llvm_cbe_tmp__95); llvm_cbe_tmp__97 = *(&llvm_cbe_tmp__87); llvm_cbe_tmp__98 = _ZNKSs4sizeEv(llvm_cbe_tmp__97); llvm_cbe_tmp__99 = _ZNSt11char_traitsIcE7compareEPKcS2_j(llvm_cbe_tmp__94, llvm_cbe_tmp__96, llvm_cbe_tmp__98); return ((((llvm_cbe_tmp__99 != 0u) ^ 1)&1)); llvm_cbe_tmp__101: return 0; } bool _ZStneIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_(struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___lhs, struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___rhs) { struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__102; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__103; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__104; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__105; bool llvm_cbe_tmp__106; *(&llvm_cbe_tmp__102) = llvm_cbe___lhs; *(&llvm_cbe_tmp__103) = llvm_cbe___rhs; llvm_cbe_tmp__104 = *(&llvm_cbe_tmp__102); llvm_cbe_tmp__105 = *(&llvm_cbe_tmp__103); llvm_cbe_tmp__106 = ((_ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_(llvm_cbe_tmp__104, llvm_cbe_tmp__105))&1); return (((llvm_cbe_tmp__106 ^ 1)&1)); } bool _ZStgtIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_(struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___lhs, struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___rhs) { struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__107; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__108; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__109; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__110; unsigned int llvm_cbe_tmp__111; *(&llvm_cbe_tmp__107) = llvm_cbe___lhs; *(&llvm_cbe_tmp__108) = llvm_cbe___rhs; llvm_cbe_tmp__109 = *(&llvm_cbe_tmp__107); llvm_cbe_tmp__110 = *(&llvm_cbe_tmp__108); llvm_cbe_tmp__111 = _ZNKSs7compareERKSs(llvm_cbe_tmp__109, llvm_cbe_tmp__110); return (((signed int )llvm_cbe_tmp__111) > ((signed int )0u)); } bool _ZStltIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_(struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___lhs, struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___rhs) { struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__112; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__113; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__114; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__115; unsigned int llvm_cbe_tmp__116; *(&llvm_cbe_tmp__112) = llvm_cbe___lhs; *(&llvm_cbe_tmp__113) = llvm_cbe___rhs; llvm_cbe_tmp__114 = *(&llvm_cbe_tmp__112); llvm_cbe_tmp__115 = *(&llvm_cbe_tmp__113); llvm_cbe_tmp__116 = _ZNKSs7compareERKSs(llvm_cbe_tmp__114, llvm_cbe_tmp__115); return (((signed int )llvm_cbe_tmp__116) < ((signed int )0u)); } bool _ZStgeIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_(struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___lhs, struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___rhs) { struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__117; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__118; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__119; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__120; unsigned int llvm_cbe_tmp__121; *(&llvm_cbe_tmp__117) = llvm_cbe___lhs; *(&llvm_cbe_tmp__118) = llvm_cbe___rhs; llvm_cbe_tmp__119 = *(&llvm_cbe_tmp__117); llvm_cbe_tmp__120 = *(&llvm_cbe_tmp__118); llvm_cbe_tmp__121 = _ZNKSs7compareERKSs(llvm_cbe_tmp__119, llvm_cbe_tmp__120); return (((signed int )llvm_cbe_tmp__121) >= ((signed int )0u)); } bool _ZStleIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_(struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___lhs, struct l_class_OC_std_KD__KD_basic_string *llvm_cbe___rhs) { struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__122; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__123; /* Address-exposed local */ struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__124; struct l_class_OC_std_KD__KD_basic_string *llvm_cbe_tmp__125; unsigned int llvm_cbe_tmp__126; *(&llvm_cbe_tmp__122) = llvm_cbe___lhs; *(&llvm_cbe_tmp__123) = llvm_cbe___rhs; llvm_cbe_tmp__124 = *(&llvm_cbe_tmp__122); llvm_cbe_tmp__125 = *(&llvm_cbe_tmp__123); llvm_cbe_tmp__126 = _ZNKSs7compareERKSs(llvm_cbe_tmp__124, llvm_cbe_tmp__125); return (((signed int )llvm_cbe_tmp__126) <= ((signed int )0u)); } unsigned int _ZNSt11char_traitsIcE7compareEPKcS2_j(unsigned char *llvm_cbe___s1, unsigned char *llvm_cbe___s2, unsigned int llvm_cbe___n) { unsigned char *llvm_cbe_tmp__127; /* Address-exposed local */ unsigned char *llvm_cbe_tmp__128; /* Address-exposed local */ unsigned int llvm_cbe_tmp__129; /* Address-exposed local */ unsigned char *llvm_cbe_tmp__130; unsigned char *llvm_cbe_tmp__131; unsigned int llvm_cbe_tmp__132; unsigned int llvm_cbe_tmp__133; *(&llvm_cbe_tmp__127) = llvm_cbe___s1; *(&llvm_cbe_tmp__128) = llvm_cbe___s2; *(&llvm_cbe_tmp__129) = llvm_cbe___n; llvm_cbe_tmp__130 = *(&llvm_cbe_tmp__127); llvm_cbe_tmp__131 = *(&llvm_cbe_tmp__128); llvm_cbe_tmp__132 = *(&llvm_cbe_tmp__129); llvm_cbe_tmp__133 = memcmp(llvm_cbe_tmp__130, llvm_cbe_tmp__131, llvm_cbe_tmp__132); return llvm_cbe_tmp__133; } static void _GLOBAL__I_a(void) { __cxx_global_var_init(); return; }
the_stack_data/32428.c
// transparent union is GCC only #ifdef __GNUC__ struct S1 { }; struct S2 { }; typedef union my_union { const int *ip; const struct S1 *s1; const struct S2 *s2; } U; typedef U U2 __attribute__ ((__transparent_union__)); union my_union2 { int i; const struct S1 s1; } __attribute__ ((__transparent_union__)); void f1(U2 some) { } void f2(union my_union2 some) { } int main() { struct S1 s1; struct S2 s2; f1(&s1); f1(&s2); f1(0); f2(0); f2(1>2); // these are int } #else int main() { } #endif
the_stack_data/153853.c
#include <stdio.h> void swap(int *p1, int *p2) { int a = *p1; *p1 = *p2; *p2 = a; } void main() { int a; int b; printf("Please the number\n"); scanf("%d %d", &a, &b); swap(&a, &b); printf("%d %d", a, b); }
the_stack_data/62860.c
#include <stdio.h> #include <stdlib.h> #include <locale.h> void main() { setlocale(LC_ALL, ""); //OBS: No caso de não estar utilizando o setlocale no local da virgula deve-se usar o ponto // Definir variável int numero = 10; //Conectivo AND if(numero > 8 && numero < 15){ printf("O numero está entre 8 e 15 \n"); } //Conectivo OU if(numero > 5 || numero > 15){ printf("O numero é maior que 5 ou maior que 15\n"); } //Misturando conectivosd if((numero > 5 && numero < 7) || numero > 12 ){ printf("O número esta entre 5 e 7 ou é maior que 12\n"); } }
the_stack_data/90763643.c
#include <stdio.h> /* * @author Aza Tulepbergenov. */ main() { printf("%d\n", getchar() != EOF); }
the_stack_data/115765906.c
/* {"title":"operators, relational","platform":"unix","tags":["unix"]} */ #include <stdio.h> int main() { int a = 1, b = 2; if (a == a) printf(" a == a\n"); if (a != b) printf(" a != b\n"); if (a < b) printf(" a < b\n"); if (a <= a) printf(" a <= a\n"); if (b > a) printf(" b > a\n"); if (b >= b) printf(" b >= b\n"); }
the_stack_data/51700461.c
/* atomic_append.c - Demonstrate the atomocity provided by writes in files open with O_APPEND. * * When the O_APPEND flag is specified when opening a file, UNIX guarantees that * writes to that file will happen at the end of it, providing atomic cursor * positioning and actual writing. This program demonstrates this behavior by * constrasting writing to a file open with O_APPEND vs. writing to a file without * the flag, but seeking to the end before writing. * * Usage: * * $ ./atomic_append <file> <numBytes> [x] * * file - the test file that should be written to demonstrate the issue. * numBytes - the number of bytes that will be written, one at a time. * [x] (optional) - if given a third argument (anything), instead of opening * the file with O_APPEND, the program will perform an lseek to try to write * at the end of the file. * * Examples: * * $ ./atomic_append file.txt 10000 * # writes 10000 bytes using O_APPEND. * * $ ./atomic_append file.txt 10000 x * # writes 10000 using lseek and then write. * * * This program demonstrate the race conditions that arise when multiple writes * occur to the same file concurrently. Running this program as in: * * $ ./atomic_append f1 1000000 & ./atomic_append 1000000 f1 * $ ./atomic_append f1 1000000 x & ./atomic_append 1000000 f2 x * * Results in the following files (may be different in other runs of the program): * * -rw-rw-rw- 1 renato 2000000 Mar 16 21:55 f1 * -rw-rw-rw- 1 renato 1948882 Mar 16 21:52 f2 * * As can be seen, the file without the O_APPEND flag did not have atomic writes, * which caused some of the writes to be done when the file offset was not actually * at the end of the file, due to race conditions (process scheduler stopped execution * between lseek(2) and write(2) calls). * * For this reason, to be sure a write(2) call will write to the end of the file without * overriding existing content, the O_APPEND flag must be passed. * * Author: Renato Mascarenhas Costa */ #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #ifndef AA_BYTE #define AA_BYTE 'a' #endif typedef enum { FALSE, TRUE } Bool; void helpAndLeave(const char *progname, int status); void pexit(const char *fCall); int writeBytes(int fd, int numBytes, Bool useAppend); static const char byte[] = { AA_BYTE }; int main(int argc, char *argv[]) { int fd, flags, numBytes, numWritten; char *filename; mode_t mode; Bool useAppend; if (argc < 3 || argc > 4) { helpAndLeave(argv[0], EXIT_FAILURE); } if (argc == 3) { useAppend = TRUE; } else { useAppend = FALSE; } filename = argv[1]; numBytes = (int) atol(argv[2]); mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; /* rw-rw-rw- */ flags = O_WRONLY | O_CREAT; if (useAppend) { flags |= O_APPEND; } fd = open(filename, flags, mode); if (fd == -1) { pexit("open"); } numWritten = writeBytes(fd, numBytes, useAppend); if (close(fd) == -1) { pexit("close"); } printf("Done. Written %ld bytes to the file %s.\n", (long) numWritten, filename); return EXIT_SUCCESS; } int writeBytes(int fd, int numBytes, Bool useAppend) { int i, numWritten, totalWritten = 0; for (i = 0; i < numBytes; ++i) { if (!useAppend) { lseek(fd, 0, SEEK_END); } numWritten = write(fd, byte, 1); if (numWritten == -1) { pexit("write"); } totalWritten += numWritten; } return totalWritten; } void helpAndLeave(const char *progname, int status) { fprintf(stderr, "Usage: %s <file> <numBytes> [x]\n", progname); exit(status); } void pexit(const char *fCall) { perror(fCall); exit(EXIT_FAILURE); }
the_stack_data/102793.c
struct { long a } * c; struct d { int b }; e, f, g, h; i(j) { struct d *k; for (; j && c->a; --j) h = k->b; switch (j) case 9: l(g ? f : e); }
the_stack_data/664952.c
// taken from https://github.com/mit-pdos/xv6-public/blob/master/ls.c // modified to POSIX #include <stdlib.h> #include <stdio.h> #include <string.h> #include <dirent.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #define DIRSIZ 20 char* fmtname(char *path) { static char buf[DIRSIZ+1]; char *p; // Find first character after last slash. for(p=path+strlen(path); p >= path && *p != '/'; p--) ; p++; // Return blank-padded name. if(strlen(p) >= DIRSIZ) return p; memmove(buf, p, strlen(p)); memset(buf+strlen(p), ' ', DIRSIZ-strlen(p)); return buf; } void ls(char *path) { char buf[512], *p; int fd; struct dirent de; struct stat st; if((fd = open(path, 0)) < 0){ printf("ls: cannot open %s\n", path); return; } if(fstat(fd, &st) < 0){ printf("ls: cannot stat %s\n", path); close(fd); return; } switch(st.st_mode){ case S_IFREG: // T_FILE: printf("%s %d %d %d\n", fmtname(path), st.st_mode, st.st_ino, st.st_size); break; case S_IFDIR: // T_DIR: if(strlen(path) + 1 + DIRSIZ + 1 > sizeof buf){ printf( "ls: path too long\n"); break; } strcpy(buf, path); p = buf+strlen(buf); *p++ = '/'; while(read(fd, &de, sizeof(de)) == sizeof(de)){ if(de.d_ino == 0) continue; memmove(p, de.d_name, DIRSIZ); p[DIRSIZ] = 0; if(stat(buf, &st) < 0){ printf("ls: cannot stat %s\n", buf); continue; } printf("%s %d %d %d\n", fmtname(buf), st.st_mode, st.st_ino, st.st_size); } break; } close(fd); } int main(int argc, char *argv[]) { int i; if(argc < 2){ ls("."); exit(1); } for(i=1; i<argc; i++) ls(argv[i]); exit(0); }
the_stack_data/187641989.c
/* TAGS: min c */ /* LIFT_OPTS: explicit +--explicit_args +--explicit_args_count 8 */ /* LIFT_OPTS: default */ /* LD_OPTS: -lm */ /* * Copyright (c) 2018 Trail of Bits, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <complex.h> #include <stdio.h> #include <math.h> #include <float.h> int main(void) { float complex beg = 4.54 + 2.56*I; float complex z = cexpf(beg); float img = cimagf(z); float real = crealf(z); int i_img = (int) img; int i_real = (int) real; printf("%i %i\n", (int) real, (int) i_img); if ( i_img != 2 ) printf("NOK img!\n"); if ( i_real != 4 ) printf("NOK real!\n"); printf("%i\n\t%i + %i\n", 42, (int)real, (int)img); }
the_stack_data/64199520.c
int absdiff(int x, int y) { return x > y ? x - y : y - x; }
the_stack_data/211081668.c
#include <stdio.h> int main() { int N, i; scanf("%d", &N); for (i=1; i<=N; ++i) { printf("%d\n", i); } }
the_stack_data/220066.c
#include <stdio.h> int main() { // Manually specify a few bytes to encode for now unsigned char source[9] = { 0xd8, 0xff, 0xe0, 0xff, 0x10, 0x00, 0x46, 0x4a, 0x46 }; char buffer[4] = { 0, 0, 0, 0 }; // sizeof(char) == 1 byte, so the array's size in bytes is also its length int source_length = sizeof(source); for (int i = 0; i < source_length; i++) { printf("0x%02x ", source[i]); } printf("==> "); for (int i = 0; i < source_length; i += 3) { unsigned char byte1 = source[i]; unsigned char byte2 = source[i + 1]; unsigned char byte3 = source[i + 2]; // Now move the appropriate bits into our buffer buffer[0] = byte1 >> 2; buffer[1] = (byte1 & 0x03) << 4; buffer[1] |= (byte2 & 0xf0) >> 4; buffer[2] = (byte2 & 0x0f) << 2; buffer[2] |= (byte3 & 0xc0) >> 6; buffer[3] = byte3 & 0x3f; for (int b = 0; b < 4; b++) { if (buffer[b] < 26) { // value 0 - 25, so uppercase letter printf("%c", 'A' + buffer[b]); } else if (buffer[b] < 52) { // value 26 - 51, so lowercase letter printf("%c", 'a' + (buffer[b] - 26)); } else if (buffer[b] < 62) { // value 52 - 61, so a digit printf("%c", '0' + (buffer[b] - 52)); } else if (buffer[b] == 62) { // our "+" case, no need for math, just print it printf("+"); } else if (buffer[b] == 63) { // our "/" case, no need for math, just print it printf("/"); } else { // Yikes! Error. We should never get here. printf("\n\n Error! Bad 6-bit value: %c\n", buffer[b]); } } } printf("\n"); }
the_stack_data/126703453.c
#include<stdio.h> int main(int argc,char *argv[]) { int numbers[4] = {0}; //如果你值设置了一个元素,它会将剩下的用0填充 char name[4] = {'a'}; //处理字符串的语法1 printf("numbers:%d %d %d %d\n",numbers[0],numbers[1],numbers[2],numbers[3]); printf("name each:%c %c %c %c\n",name[0],name[1],name[2],name[3]); printf("name:%s\n",name); numbers[0] = 1; numbers[1] = 2; numbers[2] = 3; numbers[3] = 4; name[0] = 'Z'; name[1] = 'e'; name[2] = 'd'; name[3] = '\0'; printf("numbers:%d %d %d %d\n",numbers[0],numbers[1],numbers[2],numbers[3]); printf("name each:%c %c %c %c\n",name[0],name[1],name[2],name[3]); printf("name:%s\n",name); char *another = "Zed"; //处理字符串的语法2 printf("another: %s",another); printf("another each: %c %c %c %c\n",another[0],another[1],another[2],another[3]); return 0; }
the_stack_data/187643591.c
#include <stdio.h> #include <stdlib.h> #define MaxVertexNum 100 #define INFINITY 65535 typedef int Vertex; typedef int WeightType; typedef struct ENode *PtrToENode; struct ENode { Vertex V1, V2; WeightType Weight; }; typedef PtrToENode Edge; typedef struct GNode *PtrToGNode; struct GNode { int Nv; int Ne; WeightType G[MaxVertexNum][MaxVertexNum]; }; typedef PtrToGNode MGraph; MGraph CreateGraph(int); void InsertEdge(MGraph, Edge); MGraph BuildGraph(); void DestoryGraph(MGraph); void Floyd(MGraph, WeightType D[][MaxVertexNum]); WeightType FindMaxDist(WeightType D[][MaxVertexNum], Vertex, int); void FindAnimal(MGraph); int main() { MGraph G = BuildGraph(); FindAnimal(G); return 0; } MGraph CreateGraph(int VertexNum) { Vertex V, W; MGraph Graph; Graph = (MGraph)malloc(sizeof(struct GNode)); Graph->Nv = VertexNum; Graph->Ne = 0; for (V = 0; V < Graph->Nv; ++V) for (W = 0; W < Graph->Nv; ++W) Graph->G[V][W] = INFINITY; return Graph; } void InsertEdge(MGraph Graph, Edge E) { Graph->G[E->V1][E->V2] = E->Weight; Graph->G[E->V2][E->V1] = E->Weight; } MGraph BuildGraph() { MGraph Graph; Edge E; int Nv, i; scanf("%d", &Nv); Graph = CreateGraph(Nv); scanf("%d", &(Graph->Ne)); if (Graph->Ne != 0) { E = (Edge)malloc(sizeof(struct ENode)); for (i = 0; i < Graph->Ne; ++i) { scanf("%d %d %d", &E->V1, &E->V2, &E->Weight); --E->V1; --E->V2; InsertEdge(Graph, E); } free(E); } return Graph; } void DestoryGraph(MGraph Graph) { if (Graph) free(Graph); } void Floyd(MGraph Graph, WeightType D[][MaxVertexNum]) { Vertex i, j, k; for (i = 0; i < Graph->Nv; ++i) for (j = 0; j < Graph->Nv; ++j) D[i][j] = Graph->G[i][j]; for (k = 0; k < Graph->Nv; ++k) for (i = 0; i < Graph->Nv; ++i) for (j = 0; j < Graph->Nv; ++j) { if (D[i][k] + D[k][j] < D[i][j]) D[i][j] = D[i][k] + D[k][j]; } } WeightType FindMaxDist(WeightType D[][MaxVertexNum], Vertex i, int N) { WeightType MaxDist; Vertex j; MaxDist = 0; for (j = 0; j < N; ++j) if (i != j && D[i][j] > MaxDist) MaxDist = D[i][j]; return MaxDist; } void FindAnimal(MGraph Graph) { WeightType D[MaxVertexNum][MaxVertexNum], MaxDist, MinDist; Vertex Animal, i; Floyd(Graph, D); MinDist = INFINITY; for (i = 0; i < Graph->Nv; ++i) { MaxDist = FindMaxDist(D, i, Graph->Nv); if (MaxDist == INFINITY) { printf("0\n"); return; } if (MinDist > MaxDist) { MinDist = MaxDist; Animal = i + 1; } } printf("%d %d\n", Animal, MinDist); }
the_stack_data/115766696.c
/** * Do Your Job and I'll Do Mine 2. * * By walking through this example you’ll learn: * - How to wait detached thread using mutex. * */ #include <stdio.h> #include <stdatomic.h> #include <unistd.h> #include <pthread.h> #include <sys/wait.h> #define NUM_WORKERS 3 #define NUM_PERSONAL_TASK 3 #define NUM_TOTAL_TASK (NUM_WORKERS * NUM_PERSONAL_TASK) static _Atomic int cnt_task = NUM_TOTAL_TASK; pthread_mutex_t task_done; void do_job(char* actor); void go_home(char* actor); void* worker(void* arg); void* boss(void* arg); // // OBJECT: The main thread should not be exited until all `worker`s have finished. // // HINT: The thread `boss` locks `task_done`. // HINT: How to make `main` thread wait for all `worker`s. // HINT: Who needs to release the lock and when should the lock be released? // // There are no blank hints in this example. // Good luck. // // PS. Use mutex not `sleep` related function. // int main(int argc, char* argv[]) { pthread_t tid; int status; pthread_mutex_init(&task_done, NULL); status = pthread_create(&tid, NULL, boss, NULL); if (status != 0) { printf("WTF?"); return -1; } pthread_join(tid, NULL); pthread_mutex_lock(&task_done); printf("Remaining task(s): %d\n", cnt_task); pthread_mutex_unlock(&task_done); return 0; } void do_job(char* actor){ printf("[%s] working...\n", actor); cnt_task--; while(cnt_task) { pthread_mutex_unlock(&task_done); } } void go_home(char* actor){ printf("[%s] So long suckers!\n", actor); } void* worker(void* arg) { char act[20]; sprintf(act, "%s%d", "worker", (int)arg); for(int i = 0; i < 3; i++) { sleep(1); do_job(act); } sleep(0); pthread_exit(NULL); } void* boss(void* arg) { pthread_t tid; int status; pthread_mutex_lock(&task_done); for(int i = 0; i < NUM_WORKERS; i++) { status = pthread_create(&tid, NULL, worker, i); if (status != 0) { printf("WTF?"); return -1; } pthread_detach(tid); } go_home("like a boss"); pthread_exit(NULL); }
the_stack_data/93887470.c
/*quando invocheremo il nostro programma con elabora tutti_i_miei_comandi.txt il valore di argv[0] sarà "elabora" il valore di argv[1] sarà "tutti_i_miei_comandi.txt" */ #include <stdio.h> #include <string.h> #include <stdlib.h> int main(int argc, char *argv[]) { //commento /*char nome_file[30];*/ char riga_corrente[80]; FILE *fh; //char *pch; /*strcpy(nome_file, argv[1]);*/ if(argc<2){ printf("Passare il nome file come argomento\n"); exit(-1); } fh=fopen(argv[1], "r"); /*fh=fopen(nome_file, "r");*/ if(fh==NULL){ printf("Passare un nome file esistente\n"); exit(-2); } while (fgets(riga_corrente,sizeof(riga_corrente),fh) != NULL){ // pch=fgets(riga_co}rrente,sizeof(riga_corrente),fh); printf("%s", &(riga_corrente[9])); //& e 9 - dammi l'indirizzo del carattere con l'avanzamento //if (pch==NULL) } fclose(fh); return(0); } /* FGETS fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s. Reading stops after an EOF or a newline. If a newline is read, it is stored into the buffer. A terminating null byte ('\0') is stored after the last character in the buffer. fgets() returns s on success, and NULL on error or when end of file occurs while no char‐ acters have been read. */
the_stack_data/154830724.c
/* HAL raised several warnings, ignore them */ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #ifdef STM32WLxx #include "stm32wlxx_hal_subghz.c" #endif #pragma GCC diagnostic pop
the_stack_data/427490.c
// Copyright 2013 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <pthread.h> #include <locale.h> #include <wchar.h> #define MAX_STRING 100 #define EXP_TABLE_SIZE 1000 #define MAX_EXP 6 #define MAX_SENTENCE_LENGTH 1000 //Unicode range of Chinese characters #define MIN_CHINESE 0x4E00 #define MAX_CHINESE 0x9FA5 // number of chinese characters #define CHAR_SIZE (MAX_CHINESE - MIN_CHINESE + 1) #define COMP_SIZE 14000 // Maximum 30 * 0.7 = 21M words in the vocabulary const int vocab_hash_size = 30000000; typedef float real; struct vocab_word { long long cn; char *word; int *character, character_size; /* * cn : the count of a word * character[i] : Unicode (the i-th character in the word) - MIN_CHINESE * character_size : the length of the word (not equal to the length of string due to UTF-8 encoding) */ }; struct char_component { int *comp, comp_size; // comp[i] : the i -th component comp_size, the number of components }; struct components { char *comp_val; }; char train_file[MAX_STRING], comp_file[MAX_STRING], char2comp_file[MAX_STRING]; char output_word[MAX_STRING], output_char[MAX_STRING], output_comp[MAX_STRING]; struct vocab_word *vocab; struct char_component char2comp[CHAR_SIZE]; struct components *comp_array; int binary = 0, cbow = 0, debug_mode = 2, window = 5, min_count = 5, iter = 5, num_threads = 1, min_reduce = 1; int join_type = 1; // 1 : sum loss 2 : sum context int pos_type = 1; // 1: use the surrounding subcomponents 2: use the target subcomponents, 3 use both int average_sum = 1; // 1: use average operation to compose the context, 0, use sum to compose the context int *vocab_hash; long long vocab_max_size = 1000, vocab_size = 0, comp_max_size = COMP_SIZE, comp_size = 0, layer1_size = 200; long long train_words = 0, word_count_actual = 0, file_size = 0; real alpha = 0.025, starting_alpha, sample = 0; real *syn0, *syn1neg, *expTable, *synchar;//, *syncomp; clock_t start; int negative = 0; const int table_size = 1e8; //the unigram table for negative sampling int *table; void InitUnigramTable() { int a, i; long long train_words_pow = 0; real d1, power = 0.75; table = (int *) malloc(table_size * sizeof(int)); for(a = 0; a < vocab_size; a++) train_words_pow += pow(vocab[a].cn, power); i = 0; d1 = pow(vocab[i].cn, power) / (real) train_words_pow; for(a = 0; a < table_size; a++) { table[a] = i; if(a / (real) table_size > d1) { i++; d1 += pow(vocab[i].cn, power) / (real) train_words_pow; } if(i >= vocab_size) i = vocab_size - 1; } } // Reads a single word from a file, assuming space + tab + EOL to be word boundaries void ReadWord(char *word, FILE *fin) { int a = 0, ch; while(!feof(fin)) { ch = fgetc(fin); if(ch == 13) continue; if((ch == ' ') || (ch == '\t') || (ch == '\n')) { if(a > 0) { if(ch == '\n') ungetc(ch, fin); break; } if(ch == '\n') { strcpy(word, (char *) "</s>"); return; } else continue; } word[a] = ch; a++; if(a >= MAX_STRING - 1) a--; // Truncate too long words } word[a] = 0; } // Returns hash value of a word int GetWordHash(char *word) { unsigned long long a, hash = 0; for(a = 0; a < strlen(word); a++) hash = hash * 257 + word[a]; hash = hash % vocab_hash_size; return hash; } // Returns position of a word in the vocabulary; if the word is not found, returns -1 int SearchVocab(char *word) { unsigned int hash = GetWordHash(word); while(1) { if(vocab_hash[hash] == -1) return -1; if(!strcmp(word, vocab[vocab_hash[hash]].word)) return vocab_hash[hash]; hash = (hash + 1) % vocab_hash_size; } return -1; } // Reads a word and returns its index in the vocabulary int ReadWordIndex(FILE *fin) { char word[MAX_STRING]; ReadWord(word, fin); if(feof(fin)) return -1; return SearchVocab(word); } // Adds a word to the vocabulary int AddWordToVocab(char *word) { unsigned int hash, length = strlen(word) + 1, len, i; wchar_t wstr[MAX_STRING]; if(length > MAX_STRING) length = MAX_STRING; vocab[vocab_size].word = (char *) calloc(length, sizeof(char)); strcpy(vocab[vocab_size].word, word); vocab[vocab_size].cn = 0; vocab_size++; // Reallocate memory if needed if(vocab_size + 2 >= vocab_max_size) { vocab_max_size += 1000; vocab = (struct vocab_word *) realloc(vocab, vocab_max_size * sizeof(struct vocab_word)); } hash = GetWordHash(word); while(vocab_hash[hash] != -1) hash = (hash + 1) % vocab_hash_size; vocab_hash[hash] = vocab_size - 1; len = mbstowcs(wstr, word, MAX_STRING); for(i = 0; i < len; i++) if(wstr[i] < MIN_CHINESE || wstr[i] > MAX_CHINESE) { vocab[vocab_size - 1].character = 0; vocab[vocab_size - 1].character_size = 0; return vocab_size - 1; } vocab[vocab_size - 1].character = calloc(len, sizeof(int)); vocab[vocab_size - 1].character_size = len; for(i = 0; i < len; i++) vocab[vocab_size - 1].character[i] = wstr[i] - MIN_CHINESE; return vocab_size - 1; } // Used later for sorting by word counts int VocabCompare(const void *a, const void *b) { return ((struct vocab_word *) b)->cn - ((struct vocab_word *) a)->cn; } void DestroyVocab() { int a; for(a = 0; a < vocab_size; a++) { if(vocab[a].word != NULL) free(vocab[a].word); if(vocab[a].character != NULL) free(vocab[a].character); } for(a = 0; a < CHAR_SIZE; a++) { if(char2comp[a].comp != NULL) free(char2comp[a].comp); } for(a = 0; a < comp_size; a++) { if(comp_array[a].comp_val != NULL) free(comp_array[a].comp_val); } free(vocab[vocab_size].word); free(vocab); free(comp_array); } // Sorts the vocabulary by frequency using word counts void SortVocab() { int a, size; unsigned int hash; // Sort the vocabulary and keep </s> at the first position qsort(&vocab[1], vocab_size - 1, sizeof(struct vocab_word), VocabCompare); for(a = 0; a < vocab_hash_size; a++) vocab_hash[a] = -1; size = vocab_size; train_words = 0; for(a = 1; a < size; a++) { // Skip </s> // Words occuring less than min_count times will be discarded from the vocab if(vocab[a].cn < min_count) { vocab_size--; if(vocab[a].character != NULL) free(vocab[a].character); free(vocab[a].word); vocab[a].word = NULL; } else { // Hash will be re-computed, as after the sorting it is not actual hash = GetWordHash(vocab[a].word); while(vocab_hash[hash] != -1) hash = (hash + 1) % vocab_hash_size; vocab_hash[hash] = a; train_words += vocab[a].cn; } } vocab = (struct vocab_word *) realloc(vocab, (vocab_size + 1) * sizeof(struct vocab_word)); // Allocate memory for the binary tree construction /* for (a = 0; a < vocab_size; a++) { vocab[a].code = (char *)calloc(MAX_CODE_LENGTH, sizeof(char)); vocab[a].point = (int *)calloc(MAX_CODE_LENGTH, sizeof(int)); }*/ } // Reduces the vocabulary by removing infrequent tokens void ReduceVocab() { int a, b = 0; unsigned int hash; for(a = 0; a < vocab_size; a++) if(vocab[a].cn > min_reduce) { memcpy(vocab + b, vocab + a, sizeof(struct vocab_word)); b++; } else { if(vocab[a].character != NULL) free(vocab[a].character); free(vocab[a].word); } vocab_size = b; for(a = 0; a < vocab_hash_size; a++) vocab_hash[a] = -1; for(a = 0; a < vocab_size; a++) { // Hash will be re-computed, as it is not actual hash = GetWordHash(vocab[a].word); while(vocab_hash[hash] != -1) hash = (hash + 1) % vocab_hash_size; vocab_hash[hash] = a; } fflush(stdout); min_reduce++; } void LearnVocabFromTrainFile() { char word[MAX_STRING]; FILE *fin; long long a, i; for(a = 0; a < vocab_hash_size; a++) vocab_hash[a] = -1; //initialize vocab_hash array fin = fopen(train_file, "rb"); if(fin == NULL) { fprintf(stderr, "ERROR: training data file not found!\n"); exit(1); } vocab_size = 0; AddWordToVocab((char *) "</s>"); while(1) { ReadWord(word, fin); if(feof(fin)) break; train_words++; if((debug_mode > 1) && (train_words % 100000 == 0)) { printf("%lldK%c", train_words / 1000, 13); fflush(stdout); } i = SearchVocab(word); if(i == -1) { a = AddWordToVocab(word); vocab[a].cn = 1; } else vocab[i].cn++; if(vocab_size > vocab_hash_size * 0.7) ReduceVocab(); } SortVocab(); if(debug_mode > 0) { printf("Vocab size: %lld\n", vocab_size); printf("Words in train file: %lld\n", train_words); } file_size = ftell(fin); fclose(fin); } // find the index of a component in the component array int GetCompIndex(char *component) { for(int i = 0; i < comp_size; i++) { if(strcmp(component, comp_array[i].comp_val) == 0) return i; } return -1; } //Read char2comp and component array from file void LearnCharComponentsFromFile() { FILE *fin; fin = fopen(char2comp_file, "rb"); if(fin == NULL) { fprintf(stderr, "ERROR: char2component file not found!\n"); exit(1); } char *line = NULL; size_t len = 0; ssize_t read; while((read = getline(&line, &len, fin)) != -1) { //parse the line , get characters and its components int num = (strlen(line) - 2) / 3 - 1; char *save_ptr; char *pch = strtok_r(line, " \n", &save_ptr); wchar_t wstr[MAX_STRING]; unsigned int wlen = mbstowcs(wstr, pch, MAX_STRING); int id = wstr[0] - MIN_CHINESE; char2comp[id].comp_size = num; char2comp[id].comp = calloc(char2comp[id].comp_size, sizeof(int)); // int tmp_cnt = 0; pch = strtok_r(NULL, " \n", &save_ptr); while(pch != NULL) { char2comp[id].comp[tmp_cnt++] = pch - MIN_CHINESE; pch = strtok_r(NULL, " \n", &save_ptr); } } if(line) free(line); fclose(fin); } void InitNet() { long long a, b; a = posix_memalign((void **) &syn0, 128, (long long) vocab_size * layer1_size * sizeof(real)); if(syn0 == NULL) { printf("Memory allocation failed\n"); exit(1); } a = posix_memalign((void **) &syn1neg, 128, (long long) vocab_size * layer1_size * sizeof(real)); if(syn1neg == NULL) { printf("Memory allocation failed\n"); exit(1); } a = posix_memalign((void **) &synchar, 128, (long long) CHAR_SIZE * layer1_size * sizeof(real)); if(synchar == NULL) { printf("Memory allocation failed\n"); exit(1); } //Initialize the weights for(b = 0; b < layer1_size; b++) for(a = 0; a < vocab_size; a++) syn1neg[a * layer1_size + b] = 0; for(b = 0; b < layer1_size; b++) for(a = 0; a < vocab_size; a++) syn0[a * layer1_size + b] = (rand() / (real) RAND_MAX - 0.5) / layer1_size; for(b = 0; b < layer1_size; b++) for(a = 0; a < CHAR_SIZE; a++) synchar[a * layer1_size + b] = (rand() / (real) RAND_MAX - 0.5) / layer1_size; } void DestroyNet() { if(syn0 != NULL) { free(syn0); } if(syn1neg != NULL) { free(syn1neg); } if(synchar != NULL) { free(synchar); } } void *TrainModelThread(void *id) { long long a, b, c, d, e, char_id, comp_id, word, last_word, sentence_length = 0, sentence_position = 0; long long word_count = 0, last_word_count = 0, sen[MAX_SENTENCE_LENGTH + 1]; long long l1, l2, target, label, local_iter = iter; long long *char_id_list = calloc(MAX_SENTENCE_LENGTH, sizeof(long long)); long long *comp_id_list = calloc(MAX_SENTENCE_LENGTH, sizeof(long long)); int char_list_cnt = 0, comp_list_cnt = 0; unsigned long long next_random = (long long) id; clock_t now; real *neu1 = (real *) calloc(layer1_size, sizeof(real)); real *neu1_grad = (real *) calloc(layer1_size, sizeof(real)); real *neucomp = (real *) calloc(layer1_size, sizeof(real)); real *neucomp_grad = (real *) calloc(layer1_size, sizeof(real)); FILE *fi = fopen(train_file, "rb"); if(fi == NULL) { fprintf(stderr, "no such file or directory: %s", train_file); exit(1); } fseek(fi, file_size / (long long) num_threads * (long long) id, SEEK_SET); while(1) { //decay learning rate and print training progress if(word_count - last_word_count > 10000) { word_count_actual += word_count - last_word_count; last_word_count = word_count; if((debug_mode > 1)) { now = clock(); printf("%cAlpha: %f Progress: %.2f%% Words/thread/sec: %.2fk ", 13, alpha, word_count_actual / (real) (iter * train_words + 1) * 100, word_count_actual / ((real) (now - start + 1) / (real) CLOCKS_PER_SEC * 1000)); fflush(stdout); } alpha = starting_alpha * (1 - word_count_actual / (real) (iter * train_words + 1)); if(alpha < starting_alpha * 0.0001) alpha = starting_alpha * 0.0001; } // read a word sentence if(sentence_length == 0) { while(1) { word = ReadWordIndex(fi); if(feof(fi)) break; if(word == -1) continue; word_count++; if(word == 0) break; // the subsampling randomly discards frequent words while keeping the ranking same if(sample > 0) { real ran = (sqrt(vocab[word].cn / (sample * train_words)) + 1) * (sample * train_words) / vocab[word].cn; next_random = next_random * (unsigned long long) 25214903917 + 11; if(ran < (next_random & 0xFFFF) / (real) 65536) continue; } sen[sentence_length] = word; sentence_length++; if(sentence_length >= MAX_SENTENCE_LENGTH) break; } sentence_position = 0; } //if (feof(fi)) break; //if (word_count > train_words / num_threads) break; if(feof(fi) || (word_count > train_words / num_threads)) { word_count_actual += word_count - last_word_count; local_iter--; if(local_iter == 0) break; word_count = 0; last_word_count = 0; sentence_length = 0; fseek(fi, file_size / (long long) num_threads * (long long) id, SEEK_SET); continue; } word = sen[sentence_position]; if(word == -1) continue; // train the cbow model // before forward backward propagation, initialize the neurons and gradients to 0 for(c = 0; c < layer1_size; c++) neu1[c] = 0; for(c = 0; c < layer1_size; c++) neu1_grad[c] = 0; for(c = 0; c < layer1_size; c++) neucomp[c] = 0; for(c = 0; c < layer1_size; c++) neucomp_grad[c] = 0; next_random = next_random * (unsigned long long) 25214903917 + 11; b = next_random % window; //[0, window-1] char_list_cnt = 0; comp_list_cnt = 0; int cw = 0; // in -> hidden get contex sum vector for(a = b; a < window * 2 + 1 - b; a++) if(a != window) { c = sentence_position - window + a; if(c < 0) continue; if(c >= sentence_length) continue; last_word = sen[c]; if(last_word == -1) continue; //词向量添加 for(c = 0; c < layer1_size; c++) neu1[c] += syn0[c + last_word * layer1_size]; //添加的代码 //叠加字向量,这里直接加在之前的词向量上 for(c = 0; c < vocab[last_word].character_size; c++) { char_id = vocab[last_word].character[c]; char_id_list[char_list_cnt++] = char_id; for(d = 0; d < layer1_size; d++) neu1[d] += synchar[d + char_id * layer1_size]; //use the surrounding characters' component information if(pos_type == 1 || pos_type == 3) { for(d = 0; d < char2comp[char_id].comp_size; d++) { comp_id = char2comp[char_id].comp[d]; comp_id_list[comp_list_cnt++] = comp_id; for(e = 0; e < layer1_size; e++) neucomp[e] += synchar[e + comp_id * layer1_size]; } } } cw++; } // use the target character's component information if(pos_type == 2 || pos_type == 3) { last_word = sen[sentence_position]; for(c = 0; c < vocab[last_word].character_size; c++) { char_id = vocab[last_word].character[c]; for(d = 0; d < char2comp[char_id].comp_size; d++) { comp_id = char2comp[char_id].comp[d]; comp_id_list[comp_list_cnt++] = comp_id; for(e = 0; e < layer1_size; e++) neucomp[e] += synchar[e + comp_id * layer1_size]; } } } if(cw) { if(average_sum == 1) { // the context is represented by the average of the surrounding vectors for(c = 0; c < layer1_size; c++) { neu1[c] /= cw + char_list_cnt; if(comp_list_cnt > 0) neucomp[c] /= comp_list_cnt; } } // negative sampling for(d = 0; d < negative + 1; d++) { if(d == 0) { target = word; label = 1; } else { next_random = next_random * (unsigned long long) 25214903917 + 11; target = table[(next_random >> 16) % table_size]; if(target == 0) target = next_random % (vocab_size - 1) + 1; // if sample "</s>", randomly resample if(target == word) continue; label = 0; } l2 = target * layer1_size; // back propagate output --> hidden if(join_type == 1) { // sum loss composition model real f1 = 0, f3 = 0, g1 = 0, g3 = 0; for(c = 0; c < layer1_size; c++) { f1 += neu1[c] * syn1neg[c + l2]; f3 += neucomp[c] * syn1neg[c + l2]; } //f1 if(f1 > MAX_EXP) g1 = (label - 1) * alpha; else if(f1 < -MAX_EXP) g1 = (label - 0) * alpha; else g1 = (label - expTable[(int) ((f1 + MAX_EXP) * (EXP_TABLE_SIZE / MAX_EXP / 2))]) * alpha; //f3 if(f3 > MAX_EXP) g3 = (label - 1) * alpha; else if(f3 < -MAX_EXP) g3 = (label - 0) * alpha; else g3 = (label - expTable[(int) ((f3 + MAX_EXP) * (EXP_TABLE_SIZE / MAX_EXP / 2))]) * alpha; // compute the gradients of neurons for(c = 0; c < layer1_size; c++) { neu1_grad[c] += g1 * syn1neg[c + l2]; neucomp_grad[c] += g3 * syn1neg[c + l2]; } //update syn1neg for(c = 0; c < layer1_size; c++) syn1neg[c + l2] += g1 * neu1[c] + g3 * neucomp[c]; } else if(join_type == 2) { // average context composition model real f = 0, g = 0; for(c = 0; c < layer1_size; c++) f += (neu1[c] + neucomp[c]) * syn1neg[c + l2]; if(f > MAX_EXP) g = (label - 1) * alpha; else if(f < -MAX_EXP) g = (label - 0) * alpha; else g = (label - expTable[(int) ((f + MAX_EXP) * (EXP_TABLE_SIZE / MAX_EXP / 2))]) * alpha; for(c = 0; c < layer1_size; c++) { neu1_grad[c] += g * syn1neg[c + l2]; neucomp_grad[c] += g * syn1neg[c + l2]; } for(c = 0; c < layer1_size; c++) syn1neg[c + l2] += g * (neu1[c] + neucomp[c]); } } // back propagate hidden -> input for(a = b; a < window * 2 + 1 - b; a++) if(a != window) { c = sentence_position - window + a; if(c < 0) continue; if(c >= sentence_length) continue; last_word = sen[c]; if(last_word == -1) continue; for(c = 0; c < layer1_size; c++) { if(average_sum == 1) syn0[c + last_word * layer1_size] += neu1_grad[c] / cw + char_list_cnt; else syn0[c + last_word * layer1_size] += neu1_grad[c]; } } for(a = 0; a < char_list_cnt; a++) { char_id = char_id_list[a]; for(c = 0; c < layer1_size; c++) { if(average_sum == 1) synchar[c + char_id * layer1_size] += neu1_grad[c] / char_list_cnt + cw; else synchar[c + char_id * layer1_size] += neu1_grad[c]; } } for(a = 0; a < comp_list_cnt; a++) { comp_id = comp_id_list[a]; for(c = 0; c < layer1_size; c++) { if(average_sum == 1) synchar[c + comp_id * layer1_size] += neucomp_grad[c] / comp_list_cnt; else synchar[c + comp_id * layer1_size] += neucomp_grad[c]; } } } sentence_position++; if(sentence_position >= sentence_length) { sentence_length = 0; continue; } } fclose(fi); free(neu1); free(neu1_grad); pthread_exit(NULL); } void TrainModel() { long a, b, c, d; FILE *fo; pthread_t *pt = (pthread_t *) malloc(num_threads * sizeof(pthread_t)); if(pt == NULL) { fprintf(stderr, "cannot allocate memory for threads\n"); exit(1); } printf("Starting training using file %s \n", train_file); starting_alpha = alpha; LearnVocabFromTrainFile(); LearnCharComponentsFromFile(); if(output_word[0] == 0) return; InitNet(); if(negative > 0) InitUnigramTable(); start = clock(); for(a = 0; a < num_threads; a++) pthread_create(&pt[a], NULL, TrainModelThread, (void *) a); for(a = 0; a < num_threads; a++) pthread_join(pt[a], NULL); // save the word vectors fo = fopen(output_word, "wb"); if(fo == NULL) { fprintf(stderr, "Cannot open %s: permission denied\n", output_word); exit(1); } fprintf(fo, "%lld %lld\n", vocab_size, layer1_size); for(a = 0; a < vocab_size; a++) { if(vocab[a].word != NULL) fprintf(fo, "%s ", vocab[a].word); if(binary) for(b = 0; b < layer1_size; b++) fwrite(&syn0[a * layer1_size + b], sizeof(real), 1, fo); else for(b = 0; b < layer1_size; b++) fprintf(fo, "%lf ", syn0[a * layer1_size + b]); fprintf(fo, "\n"); } fclose(fo); wchar_t ch[10]; if(strlen(output_char)) { fo = fopen(output_char, "wb"); if(fo == NULL) { fprintf(stderr, "Cannot open %s: permission denied\n", output_char); } fprintf(fo, "%lld %lld\n", CHAR_SIZE, layer1_size); for(a = 0; a < CHAR_SIZE; a++) { ch[0] = MIN_CHINESE + a; ch[1] = 0; fprintf(fo, "%ls\t", ch); if(binary) for(b = 0; b < layer1_size; b++) fwrite(&synchar[a * layer1_size + b], sizeof(real), 1, fo); else for(b = 0; b < layer1_size; b++) fprintf(fo, "%lf ", synchar[a * layer1_size + b]); fprintf(fo, "\n"); } fclose(fo); } /*if(strlen(output_comp)) { fo = fopen(output_comp, "wb"); if(fo == NULL) { fprintf(stderr, "Cannot open %s: permission denied\n", output_comp); } fprintf(fo, "%lld %lld\n", comp_size, layer1_size); for(a = 0; a < comp_size; a++) { fprintf(fo, "%s ", comp_array[a]); if(binary) for(b = 0; b < layer1_size; b++) fwrite(&syncomp[a * layer1_size + b], sizeof(real), 1, fo); else for(b = 0; b < layer1_size; b++) fprintf(fo, "%lf ", syncomp[a * layer1_size + b]); fprintf(fo, "\n"); } fclose(fo); }*/ free(table); free(pt); DestroyVocab(); } int ArgPos(char *str, int argc, char **argv) { int a; for(a = 1; a < argc; a++) if(!strcmp(str, argv[a])) { if(a == argc - 1) { printf("Argument missing for %s\n", str); exit(1); } return a; } return -1; } int main(int argc, char **argv) { int i; setlocale(LC_ALL, "en_US.UTF-8"); if(argc == 1) { printf("WORD VECTOR estimation toolkit v 0.1b\n\n"); printf("Options:\n"); printf("Parameters for training:\n"); printf("\t-train <file>\n"); printf("\t\tUse text data from <file> to train the model\n"); printf("\t-output-word <file>\n"); printf("\t\tUse <file> to save the resulting word vectors\n"); printf("\t-output-char <file>\n"); printf("\t\tUse <file> to save the resulting character vectors\n"); printf("\t-output-comp <file>\n"); printf("\t\tUse <file> to save the resulting component vectors\n"); printf("\t-size <int>\n"); printf("\t\tSet size of word vectors; default is 200\n"); printf("\t-window <int>\n"); printf("\t\tSet max skip length between words; default is 5\n"); printf("\t-sample <float>\n"); printf("\t\tSet threshold for occurrence of words. Those that appear with higher frequency"); printf(" in the training data will be randomly down-sampled; default is 0 (off), useful value is 1e-5\n"); printf("\t-negative <int>\n"); printf("\t\tNumber of negative examples; default is 0, common values are 5 - 10 (0 = not used)\n"); printf("\t-iter <int>\n"); printf("\t\tRun more training iterations (default 5)\n"); printf("\t-threads <int>\n"); printf("\t\tUse <int> threads (default 1)\n"); printf("\t-min-count <int>\n"); printf("\t\tThis will discard words that appear less than <int> times; default is 5\n"); printf("\t-alpha <float>\n"); printf("\t\tSet the starting learning rate; default is 0.025\n"); printf("\t-debug <int>\n"); printf("\t\tSet the debug mode (default = 2 = more info during training)\n"); printf("\t-binary <int>\n"); printf("\t\tSave the resulting vectors in binary moded; default is 0 (off)\n"); printf("\t-comp <file>\n"); printf("\t\tUse component list from <file>\n"); printf("\t-char2comp <file>\n"); printf("\t\tObtain the mapping between characters and their components from <file>\n"); printf("\t-join-type <int>\n"); printf("\t\t The type of methods combining subwords (default = 1: sum loss, 2 : sum context)\n"); printf("\t-pos-type <int>\n"); printf("\t\t The type of subcomponents' positon (default = 1: use the components of surrounding words, 2: use the components of the target word, 3: use both)\n"); printf("\t-average-sum <int>\n"); printf("\t\t The type of compositional method for context (average_sumdefault = 1 use average operation, 0 use sum operation)\n"); printf("\nExamples:\n"); printf("./jwe -train wiki_process.txt -output-word word_vec -output-char char_vec -output-comp comp_vec -size 200 -window 5 -sample 1e-4 -negative 10 -iter 100 -threads 8 -min-count 5 -alpha 0.025 -binary 0 -comp ../subcharacter/comp.txt -char2comp ../subcharacter/char2comp.txt -join-type 1 -pos-type 1 -average-sum 1\n\n"); return 0; } output_word[0] = 0; if((i = ArgPos((char *) "-size", argc, argv)) > 0) layer1_size = atoi(argv[i + 1]); if((i = ArgPos((char *) "-train", argc, argv)) > 0) strcpy(train_file, argv[i + 1]); if((i = ArgPos((char *) "-debug", argc, argv)) > 0) debug_mode = atoi(argv[i + 1]); if((i = ArgPos((char *) "-binary", argc, argv)) > 0) binary = atoi(argv[i + 1]); if((i = ArgPos((char *) "-alpha", argc, argv)) > 0) alpha = atof(argv[i + 1]); if((i = ArgPos((char *) "-output-word", argc, argv)) > 0) strcpy(output_word, argv[i + 1]); if((i = ArgPos((char *) "-output-char", argc, argv)) > 0) strcpy(output_char, argv[i + 1]); if((i = ArgPos((char *) "-output-comp", argc, argv)) > 0) strcpy(output_comp, argv[i + 1]); if((i = ArgPos((char *) "-comp", argc, argv)) > 0) strcpy(comp_file, argv[i + 1]); if((i = ArgPos((char *) "-char2comp", argc, argv)) > 0) strcpy(char2comp_file, argv[i + 1]); if((i = ArgPos((char *) "-window", argc, argv)) > 0) window = atoi(argv[i + 1]); if((i = ArgPos((char *) "-sample", argc, argv)) > 0) sample = atof(argv[i + 1]); if((i = ArgPos((char *) "-negative", argc, argv)) > 0) negative = atoi(argv[i + 1]); if((i = ArgPos((char *) "-threads", argc, argv)) > 0) num_threads = atoi(argv[i + 1]); if((i = ArgPos((char *) "-iter", argc, argv)) > 0) iter = atoi(argv[i + 1]); if((i = ArgPos((char *) "-min-count", argc, argv)) > 0) min_count = atoi(argv[i + 1]); if((i = ArgPos((char *) "-join-type", argc, argv)) > 0) join_type = atoi(argv[i + 1]); if((i = ArgPos((char *) "-pos-type", argc, argv)) > 0) pos_type = atoi(argv[i + 1]); if((i = ArgPos((char *) "-average-sum", argc, argv)) > 0) average_sum = atoi(argv[i + 1]); vocab = (struct vocab_word *) calloc(vocab_max_size, sizeof(struct vocab_word)); comp_array = (struct components *) calloc(comp_max_size, sizeof(struct components)); vocab_hash = (int *) calloc(vocab_hash_size, sizeof(int)); expTable = (real *) malloc((EXP_TABLE_SIZE + 1) * sizeof(real)); if(expTable == NULL) { fprintf(stderr, "out of memory\n"); exit(1); } for(i = 0; i < EXP_TABLE_SIZE; i++) { expTable[i] = exp((i / (real) EXP_TABLE_SIZE * 2 - 1) * MAX_EXP); // Precompute the exp() table expTable[i] = expTable[i] / (expTable[i] + 1); // Precompute f(x) = x / (x + 1) } TrainModel(); DestroyNet(); free(vocab_hash); free(expTable); return 0; }
the_stack_data/189707.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_close_fds.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: jecaudal <[email protected]> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/07/04 13:41:19 by jecaudal #+# #+# */ /* Updated: 2020/07/04 13:41:29 by jecaudal ### ########.fr */ /* */ /* ************************************************************************** */ #include <unistd.h> void ft_close_fds(int *fds, int n) { n--; if (fds) { while (n >= 0) { close(fds[n]); n--; } } }
the_stack_data/190768891.c
#include <stdio.h> #include <stdlib.h> #include <time.h> int main(int argc, char const *argv[]) { int i, arby[10], count=0; time_t t; srand((unsigned) time(&t)); for(i=0; i<10; i++){ arby[i] = rand() % 20 + 1; } for (i=0; i<10; i++){ if(arby[i] == 5){ count++; } } for (i=0; i<10; i++){ printf("%d\n", arby[i]); } printf("Det er %d 5er(e)\n", count); return 0; }
the_stack_data/101803.c
#include <stdio.h> int main() { int inicio, fim; scanf("%d %d", &inicio, &fim); if (fim <= inicio) { fim += 24; } printf("O JOGO DUROU %d HORA(S)\n", (fim - inicio)); return 0; }
the_stack_data/60478.c
#include <stdio.h> int n; struct student { int usn; char name[10]; int sem; }; int main() { struct student s1[n]; FILE *fp; fp = fopen("student.txt", "w"); int i; printf("\n enter the number of student"); scanf("\n %d", &n); for (i = 0; i < n; i++) { printf("\n enter the details"); scanf("%d%s%d", &s1[i].usn, s1[i].name, &s1[i].sem); fprintf(fp, "%d%s%d", s1[i].usn, s1[i].name, s1[i].sem); } fclose(fp); fp = fopen("student.txt", "r"); for (i = 0; i < n; i++) { fscanf(fp, "%d%s%d", &s1[i].usn, s1[i].name, &s1[i].sem); printf("%d%s%d", s1[i].usn, s1[i].name, s1[i].sem); } fclose(fp); return 0; }
the_stack_data/187642619.c
/* A marketing company wants to keep record of its employees. Each record would have the following characteristics: */ #include <stdio.h> #include <stdlib.h> int main(int argc, char** argv) { char firstName[] = "Amanda"; char lastName[] = "Jonson"; unsigned char age = 27; char gender = 'f'; long long personalIDNumber = 8306112507; unsigned int uniqueEmployeeNumber = 27563571; printf("First name: %s\n", firstName); printf("Last name: %s\n", lastName); printf("Age: %d\n", age); printf("Gender: %c\n", gender); printf("Personal ID: %lld\n", personalIDNumber); printf("Unique Employee number: %u\n", uniqueEmployeeNumber); return (EXIT_SUCCESS); }
the_stack_data/844497.c
#include <sys/types.h> #include <sys/stat.h> #include <sys/utsname.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <assert.h> pid_t waitpid(pid_t pid, int *status, int options) { errno = ENOSYS; return -1; } #define UNAME_SYSNAME "zerovm" #define UNAME_RELEASE "" #define UNAME_VERSION "" #define UNAME_MACHINE "zerovm" /* Put information about the system in NAME. */ int uname (struct utsname *buf) { if (buf == NULL) { errno = (EFAULT); return -1; } strncpy (buf->sysname, UNAME_SYSNAME, sizeof (buf->sysname)); strncpy (buf->release, UNAME_RELEASE, sizeof (buf->release)); strncpy (buf->version, UNAME_VERSION, sizeof (buf->version)); strncpy (buf->machine, UNAME_MACHINE, sizeof (buf->machine)); return 0; }
the_stack_data/30830.c
/* Infix, postfix and prefix are three different but equivalent notations of writing algebraic expressions. In postfix notation, operators follow their operands. In prefix notation, operators precede their operands. In this program, the user inputs a postfix expression and the prefix notation for that given postfix notation is the output. Postfix notation is converted to prefix notation with the help of stack data structure. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #define MAX 30 struct stack { char sta[MAX]; struct stack * next; }; struct stack *st = NULL; char a[MAX], b[MAX], c[MAX]; //push function of stack void push(char s[MAX]) { struct stack *temp = (struct stack *) malloc(sizeof(struct stack)); strcpy(temp->sta, s); temp->next = NULL; if (temp == NULL) printf("Memory Overflow\n"); else { if (st == NULL) st = temp; else { temp->next = st; st = temp; } } } //pop function of stack void pop(char d[]) { struct stack *t = st; st = t->next; strcpy(d, t->sta); free(t); } //Function to count number of elements in stack int count() { int c = 0; struct stack *t = st; while (t != NULL) { c++; t = t->next; } return c; } //Function to convert postfix expression to prefix expression void PostfixToPrefix(char post[], char pre[]) { int i = 0; char op[3]; while (post[i] != '\0') { if (isalpha(post[i]) != 0 || isdigit(post[i] != 0)) { op[0] = post[i]; op[1] = '\0'; push(op); } else { if (count() < 2) { printf("Not sufficient values in the expression\n"); exit(1); } else { op[0] = post[i]; op[1] = '\0'; pop(a); pop(b); c[0] = '\0'; strcat(c, op); strcat(c, b); strcat(c, a); push(c); } } i++; } if (count() == 1) { pop(pre); printf("Prefix Expression: %s", pre); } else { printf("Invalid user input"); } } void main() { char pre[MAX], post[MAX]; printf("Enter a postfix expression: "); gets(post); PostfixToPrefix(post, pre); } /* Time Compexity: Push function - O(1) Pop function - O(1) Count funtion - O(n) PostfixToPrefix function - O(n) Space Complexity: O(n) Sample Output: Enter a postfix expression: ABCDE-+^*EF*- Prefix Expression: -*A^B+C-DE*EF */
the_stack_data/215768485.c
#include<stdio.h> #include<pthread.h> #include<string.h> #include<sys/time.h> #define MAX 10 pthread_t thread[2]; pthread_mutex_t mut; int number = 0,i; void *thread1(){ printf("thread1 :I'm thread 1\n"); for(i = 0;i < MAX;i++){ pthread_mutex_lock(&mut); printf("thread1:number = %d\n",number); number++; pthread_mutex_unlock(&mut); sleep(2); } printf("thread1:mian thread is waiting me to finish task?\n"); pthread_exit(NULL); } void * thread2(){ printf("thread2 :I'm thread 2\n"); for(i = 0;i < MAX;i++){ pthread_mutex_lock(&mut); printf("thread2:number = %d\n",number); number++; pthread_mutex_unlock(&mut); sleep(3); } printf("thread2:main thread is waiting me to finish task?\n"); pthread_exit(NULL); } void thread_create(void){ int temp; memset(&thread,0,sizeof(thread)); if((temp = pthread_create(&thread[0],NULL,thread1,NULL)) != 0){ printf("create thread1 fail!\n"); }else{ printf("thread1 has been created!\n"); } if((temp = pthread_create(&thread[1],NULL,thread2,NULL)) != 0){ printf("create thread2 fail!\n"); }else{ printf("thread2 has been created!\n"); } } void thread_wait(void){ if(thread[0] != 0){ pthread_join(thread[0],NULL); printf("thread1 has end!\n"); } if(thread[1] != 0){ pthread_join(thread[1],NULL); printf("thread2 has end!\n"); } } int main(int argc,char *argv[]){ pthread_mutex_init(&mut,NULL); printf("I'm main thread,I'm creating thread ... \n"); thread_create(); printf("I'm main thread,I'm waiting thread finish task!\n"); thread_wait(); return 0; }
the_stack_data/125141022.c
/* Copyright 2020 The cc65 Authors This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ /* Tests of enum bit-fields; see https://github.com/cc65/cc65/issues/1244 */ #include <stdio.h> static unsigned char failures = 0; /* Enum with underlying type unsigned int. */ enum e10u { E10U_200 = 200, E10U_1000 = 1000, }; static struct enum_bitfield_uint { enum e10u x : 1; enum e10u y : 8; enum e10u z : 16; } e10ubf = {0, E10U_200, E10U_1000}; static void test_enum_bitfield_uint(void) { if (sizeof (struct enum_bitfield_uint) != 4) { printf ("Got sizeof(struct enum_bitfield_uint) = %zu, expected 4.\n", sizeof(struct enum_bitfield_uint)); failures++; } if (e10ubf.x != 0) { printf ("Got e10ubf.x = %u, expected 0.\n", e10ubf.x); failures++; } if (e10ubf.y != 200) { printf ("Got e10ubf.y = %u, expected 200.\n", e10ubf.y); failures++; } if (e10ubf.z != 1000) { printf ("Got e10ubf.z = %u, expected 1000.\n", e10ubf.z); failures++; } e10ubf.x = 1; e10ubf.y = 17; e10ubf.z = 1023; if (e10ubf.x != 1) { printf ("Got e10ubf.x = %u, expected 1.\n", e10ubf.x); failures++; } /* Check signedness, should be unsigned. */ { long v = e10ubf.x - 2; if (v < 0) { printf ("Got negative v = %ld, expected large positive.\n", v); failures++; } } if (e10ubf.y != 17) { printf ("Got e10ubf.y = %u, expected 17.\n", e10ubf.y); failures++; } if (e10ubf.z != 1023) { printf ("Got e10ubf.z = %u, expected 1023.\n", e10ubf.z); failures++; } } /* Enum with underlying type signed int. */ enum e11i { E11I_M1 = -1, E11I_100 = 100, E11I_1000 = 1000, }; static struct enum_bitfield_int { enum e11i x : 2; enum e11i y : 8; enum e11i z : 16; } e11ibf = {E11I_M1, E11I_100, E11I_1000}; static void test_enum_bitfield_int(void) { if (sizeof (struct enum_bitfield_int) != 4) { printf ("Got sizeof(struct enum_bitfield_int) = %zu, expected 4.\n", sizeof(struct enum_bitfield_int)); failures++; } if (e11ibf.x != -1) { printf ("Got e11ibf.x = %d, expected -1.\n", e11ibf.x); failures++; } if (e11ibf.y != 100) { printf ("Got e11ibf.y = %d, expected 100.\n", e11ibf.y); failures++; } if (e11ibf.z != 1000) { printf ("Got e11ibf.z = %d, expected 1000.\n", e11ibf.z); failures++; } e11ibf.x = 1; e11ibf.y = 17; e11ibf.z = 1023; if (e11ibf.x != 1) { printf ("Got e11ibf.x = %d, expected 1.\n", e11ibf.x); failures++; } /* Check signedness, should be signed. */ { long v = e11ibf.x - 2; if (v > 0) { printf ("Got positive v = %ld, expected negative.\n", v); failures++; } } if (e11ibf.y != 17) { printf ("Got e11ibf.y = %d, expected 17.\n", e11ibf.y); failures++; } if (e11ibf.z != 1023) { printf ("Got e11ibf.z = %d, expected 1023.\n", e11ibf.z); failures++; } } /* Enum with underlying type unsigned char. */ enum e7uc { E7UC_100 = 100, }; static struct enum_bitfield_uchar { enum e7uc x : 1; enum e7uc y : 4; enum e7uc z : 8; } e7ucbf = {0, 10, E7UC_100}; static void test_enum_bitfield_uchar(void) { if (sizeof (struct enum_bitfield_uchar) != 2) { printf ("Got sizeof(struct enum_bitfield_uchar) = %zu, expected 2.\n", sizeof(struct enum_bitfield_uchar)); failures++; } if (e7ucbf.x != 0) { printf ("Got e7ucbf.x = %u, expected 0.\n", e7ucbf.x); failures++; } if (e7ucbf.y != 10) { printf ("Got e7ucbf.y = %u, expected 10.\n", e7ucbf.y); failures++; } if (e7ucbf.z != 100) { printf ("Got e7ucbf.z = %u, expected 100.\n", e7ucbf.z); failures++; } e7ucbf.x = -1; /* Will store 1. */ e7ucbf.y = -1; /* Will store 15. */ e7ucbf.z = 127; /* Both signed char and unsigned char are converted to int in arithmetic expressions, ** so we write this test differently to enum_bitfield_int. */ if (e7ucbf.x != 1) { printf ("Got e7ucbf.x = %u, expected 1.\n", e7ucbf.x); failures++; } if (e7ucbf.y != 15) { printf ("Got e7ucbf.y = %u, expected 15.\n", e7ucbf.y); failures++; } if (e7ucbf.z != 127) { printf ("Got e7ucbf.z = %u, expected 127.\n", e7ucbf.z); failures++; } } /* Enum with underlying type signed char. */ enum e8sc { E8SC_M1 = -1, E8SC_100 = 100, }; static struct enum_bitfield_char { enum e8sc x : 1; enum e8sc y : 4; enum e8sc z : 8; } e8scbf = {0, 5, E8SC_100}; static void test_enum_bitfield_char(void) { if (sizeof (struct enum_bitfield_char) != 2) { printf ("Got sizeof(struct enum_bitfield_char) = %zu, expected 2.\n", sizeof(struct enum_bitfield_char)); failures++; } if (e8scbf.x != 0) { printf ("Got e8scbf.x = %d, expected 0.\n", e8scbf.x); failures++; } if (e8scbf.y != 5) { printf ("Got e8scbf.y = %d, expected 10.\n", e8scbf.y); failures++; } if (e8scbf.z != 100) { printf ("Got e8scbf.z = %d, expected 100.\n", e8scbf.z); failures++; } e8scbf.x = -1; e8scbf.y = -3; e8scbf.z = 127; if (e8scbf.x != -1) { printf ("Got e8scbf.x = %d, expected -1.\n", e8scbf.x); failures++; } if (e8scbf.y != -3) { printf ("Got e8scbf.y = %d, expected -3.\n", e8scbf.y); failures++; } if (e8scbf.z != 127) { printf ("Got e8scbf.z = %d, expected 127.\n", e8scbf.z); failures++; } } int main(void) { test_enum_bitfield_uint(); test_enum_bitfield_int(); test_enum_bitfield_uchar(); test_enum_bitfield_char(); printf("failures: %u\n", failures); return failures; }
the_stack_data/58272.c
#include <stdio.h> #include <stdlib.h> #include <math.h> struct programa { int edp[21]; }; int niveis, programas, custo, delay, shift; long double min(long double a, long double b) { return(a < b ? a : b); } long double bt(struct programa p[], int i, int j, long double dp[programas + 1][niveis + 1]) { if (i == programas) { return(0); } if (dp[i][j] == -1) //Descobre qual o melhor caminho de dp[i][j] { dp[i][j] = p[i].edp[j] + bt(p, i + 1, j, dp); //Define ele seguindo reto int k; for (k = 0; k < niveis; k ++) //Testa todos os caminhos diferentes { if (k != j) //Escolhendo sempre o melhor { dp[i][j] = min(dp[i][j], bt(p, i + 1, k, dp) + shift + p[i].edp[k]); } } } return(dp[i][j]); //Se já souber qual é o melhor, já retorna ele } int main() { while (scanf("%d %d %d %d", &niveis, &programas, &custo, &delay) && !(niveis == 0 && programas == 0 && custo == 0 && delay == 0)) { struct programa app[programas]; long double dp[programas + 1][niveis + 1]; int i, j, k, energia, tempo; for (i = 0; i <= programas; i ++) { for (j = 0; j <= niveis; j ++) { if (i < programas && j < niveis) { scanf("%d %d", &energia, &tempo); app[i].edp[j] = energia * tempo; } dp[i][j] = -1; } } shift = custo * delay; printf("%.0LF\n", bt(app, 0, 0, dp)); } return(0); }
the_stack_data/1161916.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test_one(int x) { #pragma omp target #pragma omp teams distribute parallel for for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp target #pragma omp teams distribute parallel for for (int i = 0; i < x; i++) for (int i = 0; i < y; i++) ; } void test_three(int x, int y) { #pragma omp target #pragma omp teams distribute parallel for collapse(1) for (int i = 0; i < x; i++) for (int i = 0; i < y; i++) ; } void test_four(int x, int y) { #pragma omp target #pragma omp teams distribute parallel for collapse(2) for (int i = 0; i < x; i++) for (int i = 0; i < y; i++) ; } void test_five(int x, int y, int z) { #pragma omp target #pragma omp teams distribute parallel for collapse(2) for (int i = 0; i < x; i++) for (int i = 0; i < y; i++) for (int i = 0; i < z; i++) ; } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:3:1, line:8:1> line:3:6 test_one 'void (int)' // CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:15, col:19> col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:22, line:8:1> // CHECK-NEXT: | `-OMPTargetDirective {{.*}} <line:4:1, col:19> // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <<invalid sloc>> <implicit> // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <line:6:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-CapturedStmt {{.*}} <line:5:1, col:42> // CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | |-CapturedStmt {{.*}} <col:1, col:42> // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-OMPTeamsDistributeParallelForDirective {{.*}} <col:1, col:42> openmp_structured_block // CHECK-NEXT: | | | | | `-CapturedStmt {{.*}} <line:6:3, line:7:5> // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | |-CapturedStmt {{.*}} <line:6:3, line:7:5> // CHECK-NEXT: | | | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | | | |-ForStmt {{.*}} <line:6:3, line:7:5> // CHECK-NEXT: | | | | | | | | | |-DeclStmt {{.*}} <line:6:8, col:17> // CHECK-NEXT: | | | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-NullStmt {{.*}} <line:7:5> openmp_structured_block // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <line:5:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:5:1) *const restrict' // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <line:6:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <line:5:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:5:1) *const restrict' // CHECK-NEXT: | | | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | | | `-FieldDecl {{.*}} <line:6:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | |-ForStmt {{.*}} <col:3, line:7:5> // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:6:8, col:17> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-NullStmt {{.*}} <line:7:5> openmp_structured_block // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <line:5:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:5:1) *const restrict' // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <line:6:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:4:1) *const restrict' // CHECK-NEXT: | | | | |-RecordDecl {{.*}} <line:5:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | `-FieldDecl {{.*}} <line:6:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-CapturedStmt {{.*}} <col:3, line:7:5> // CHECK-NEXT: | | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | | |-ForStmt {{.*}} <line:6:3, line:7:5> // CHECK-NEXT: | | | | | | | | |-DeclStmt {{.*}} <line:6:8, col:17> // CHECK-NEXT: | | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-NullStmt {{.*}} <line:7:5> openmp_structured_block // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <line:5:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:5:1) *const restrict' // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <line:6:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:5:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:5:1) *const restrict' // CHECK-NEXT: | | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | | `-FieldDecl {{.*}} <line:6:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-ForStmt {{.*}} <col:3, line:7:5> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:6:8, col:17> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-NullStmt {{.*}} <line:7:5> openmp_structured_block // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:5:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:5:1) *const restrict' // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <line:6:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | |-OMPCapturedExprDecl {{.*}} <col:23> col:23 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | `-OMPCapturedExprDecl {{.*}} <col:3, <invalid sloc>> col:3 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | | `-BinaryOperator {{.*}} <col:3, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:3, col:26> 'int' '/' // CHECK-NEXT: | | | | | |-ParenExpr {{.*}} <col:3> 'int' // CHECK-NEXT: | | | | | | `-BinaryOperator {{.*}} <col:23, col:26> 'int' '+' // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:23, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:23, col:16> 'int' '-' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | |-AlwaysInlineAttr {{.*}} <<invalid sloc>> Implicit __forceinline // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit .global_tid. 'const int' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .part_id. 'const int *const restrict' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .privates. 'void *const restrict' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .copy_fn. 'void (*const restrict)(void *const restrict, ...)' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .task_t. 'void *const' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:4:1) *const restrict' // CHECK-NEXT: | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | `-FieldDecl {{.*}} <line:6:3> col:3 implicit 'int' // CHECK-NEXT: | | | `-OMPCaptureKindAttr {{.*}} <<invalid sloc>> Implicit 9 // CHECK-NEXT: | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | |-OMPTeamsDistributeParallelForDirective {{.*}} <line:5:1, col:42> openmp_structured_block // CHECK-NEXT: | | | `-CapturedStmt {{.*}} <line:6:3, line:7:5> // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-CapturedStmt {{.*}} <line:6:3, line:7:5> // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | |-ForStmt {{.*}} <line:6:3, line:7:5> // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:6:8, col:17> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-NullStmt {{.*}} <line:7:5> openmp_structured_block // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <line:5:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:5:1) *const restrict' // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <line:6:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:5:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:5:1) *const restrict' // CHECK-NEXT: | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | `-FieldDecl {{.*}} <line:6:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-ForStmt {{.*}} <col:3, line:7:5> // CHECK-NEXT: | | | | | |-DeclStmt {{.*}} <line:6:8, col:17> // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-NullStmt {{.*}} <line:7:5> openmp_structured_block // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:5:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:5:1) *const restrict' // CHECK-NEXT: | | | | `-VarDecl {{.*}} <line:6:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:4:1) *const restrict' // CHECK-NEXT: | | |-RecordDecl {{.*}} <line:5:1> col:1 implicit struct definition // CHECK-NEXT: | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | `-FieldDecl {{.*}} <line:6:3> col:3 implicit 'int &' // CHECK-NEXT: | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | |-CapturedStmt {{.*}} <col:3, line:7:5> // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-ForStmt {{.*}} <line:6:3, line:7:5> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:6:8, col:17> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-NullStmt {{.*}} <line:7:5> openmp_structured_block // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:5:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:5:1) *const restrict' // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <line:6:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <line:5:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:5:1) *const restrict' // CHECK-NEXT: | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | `-FieldDecl {{.*}} <line:6:3> col:3 implicit 'int &' // CHECK-NEXT: | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | |-ForStmt {{.*}} <col:3, line:7:5> // CHECK-NEXT: | | | | |-DeclStmt {{.*}} <line:6:8, col:17> // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-NullStmt {{.*}} <line:7:5> openmp_structured_block // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <line:5:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:5:1) *const restrict' // CHECK-NEXT: | | | `-VarDecl {{.*}} <line:6:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | |-OMPCapturedExprDecl {{.*}} <col:23> col:23 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | `-OMPCapturedExprDecl {{.*}} <col:3, <invalid sloc>> col:3 implicit used .capture_expr. 'int' // CHECK-NEXT: | | `-BinaryOperator {{.*}} <col:3, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | |-BinaryOperator {{.*}} <col:3, col:26> 'int' '/' // CHECK-NEXT: | | | |-ParenExpr {{.*}} <col:3> 'int' // CHECK-NEXT: | | | | `-BinaryOperator {{.*}} <col:23, col:26> 'int' '+' // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:23, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:23, col:16> 'int' '-' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | `-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: |-FunctionDecl {{.*}} <line:10:1, line:16:1> line:10:6 test_two 'void (int, int)' // CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:15, col:19> col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:22, col:26> col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:29, line:16:1> // CHECK-NEXT: | `-OMPTargetDirective {{.*}} <line:11:1, col:19> // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <<invalid sloc>> <implicit> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} <line:13:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <line:14:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | `-CapturedStmt {{.*}} <line:12:1, col:42> // CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | |-CapturedStmt {{.*}} <col:1, col:42> // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-OMPTeamsDistributeParallelForDirective {{.*}} <col:1, col:42> openmp_structured_block // CHECK-NEXT: | | | | | `-CapturedStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | |-CapturedStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | | | |-ForStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | | | | | | | |-DeclStmt {{.*}} <line:13:8, col:17> // CHECK-NEXT: | | | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-ForStmt {{.*}} <line:14:5, line:15:7> openmp_structured_block // CHECK-NEXT: | | | | | | | | | |-DeclStmt {{.*}} <line:14:10, col:19> // CHECK-NEXT: | | | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-NullStmt {{.*}} <line:15:7> // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <line:12:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:12:1) *const restrict' // CHECK-NEXT: | | | | | | | | |-VarDecl {{.*}} <line:13:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <line:14:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | |-DeclRefExpr {{.*}} <line:13:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <line:14:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <line:12:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:12:1) *const restrict' // CHECK-NEXT: | | | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | | | |-FieldDecl {{.*}} <line:13:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | | | `-FieldDecl {{.*}} <line:14:25> col:25 implicit 'int &' // CHECK-NEXT: | | | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | |-ForStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:13:8, col:17> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ForStmt {{.*}} <line:14:5, line:15:7> openmp_structured_block // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:14:10, col:19> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-NullStmt {{.*}} <line:15:7> // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <line:12:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:12:1) *const restrict' // CHECK-NEXT: | | | | | | |-VarDecl {{.*}} <line:13:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <line:14:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | |-DeclRefExpr {{.*}} <line:13:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <line:14:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:11:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:11:1) *const restrict' // CHECK-NEXT: | | | | |-RecordDecl {{.*}} <line:12:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | |-FieldDecl {{.*}} <line:13:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | `-FieldDecl {{.*}} <line:14:25> col:25 implicit 'int &' // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-CapturedStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | | |-ForStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | | | | | | |-DeclStmt {{.*}} <line:13:8, col:17> // CHECK-NEXT: | | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ForStmt {{.*}} <line:14:5, line:15:7> openmp_structured_block // CHECK-NEXT: | | | | | | | | |-DeclStmt {{.*}} <line:14:10, col:19> // CHECK-NEXT: | | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-NullStmt {{.*}} <line:15:7> // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <line:12:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:12:1) *const restrict' // CHECK-NEXT: | | | | | | | |-VarDecl {{.*}} <line:13:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <line:14:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | |-DeclRefExpr {{.*}} <line:13:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <line:14:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:12:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:12:1) *const restrict' // CHECK-NEXT: | | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | | |-FieldDecl {{.*}} <line:13:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | | `-FieldDecl {{.*}} <line:14:25> col:25 implicit 'int &' // CHECK-NEXT: | | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-ForStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:13:8, col:17> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ForStmt {{.*}} <line:14:5, line:15:7> openmp_structured_block // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:14:10, col:19> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-NullStmt {{.*}} <line:15:7> // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:12:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:12:1) *const restrict' // CHECK-NEXT: | | | | | |-VarDecl {{.*}} <line:13:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <line:14:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | |-OMPCapturedExprDecl {{.*}} <line:13:23> col:23 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | `-OMPCapturedExprDecl {{.*}} <col:3, <invalid sloc>> col:3 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | | `-BinaryOperator {{.*}} <col:3, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:3, col:26> 'int' '/' // CHECK-NEXT: | | | | | |-ParenExpr {{.*}} <col:3> 'int' // CHECK-NEXT: | | | | | | `-BinaryOperator {{.*}} <col:23, col:26> 'int' '+' // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:23, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:23, col:16> 'int' '-' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | |-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <line:14:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | |-AlwaysInlineAttr {{.*}} <<invalid sloc>> Implicit __forceinline // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:11:1> col:1 implicit .global_tid. 'const int' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .part_id. 'const int *const restrict' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .privates. 'void *const restrict' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .copy_fn. 'void (*const restrict)(void *const restrict, ...)' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .task_t. 'void *const' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:11:1) *const restrict' // CHECK-NEXT: | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | |-FieldDecl {{.*}} <line:13:3> col:3 implicit 'int' // CHECK-NEXT: | | | | `-OMPCaptureKindAttr {{.*}} <<invalid sloc>> Implicit 9 // CHECK-NEXT: | | | `-FieldDecl {{.*}} <line:14:25> col:25 implicit 'int' // CHECK-NEXT: | | | `-OMPCaptureKindAttr {{.*}} <<invalid sloc>> Implicit 9 // CHECK-NEXT: | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | |-OMPTeamsDistributeParallelForDirective {{.*}} <line:12:1, col:42> openmp_structured_block // CHECK-NEXT: | | | `-CapturedStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-CapturedStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | |-ForStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:13:8, col:17> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ForStmt {{.*}} <line:14:5, line:15:7> openmp_structured_block // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:14:10, col:19> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-NullStmt {{.*}} <line:15:7> // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <line:12:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:12:1) *const restrict' // CHECK-NEXT: | | | | | | |-VarDecl {{.*}} <line:13:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <line:14:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | |-DeclRefExpr {{.*}} <line:13:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <line:14:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:12:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:12:1) *const restrict' // CHECK-NEXT: | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | |-FieldDecl {{.*}} <line:13:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | `-FieldDecl {{.*}} <line:14:25> col:25 implicit 'int &' // CHECK-NEXT: | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-ForStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | | | |-DeclStmt {{.*}} <line:13:8, col:17> // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ForStmt {{.*}} <line:14:5, line:15:7> openmp_structured_block // CHECK-NEXT: | | | | | |-DeclStmt {{.*}} <line:14:10, col:19> // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-NullStmt {{.*}} <line:15:7> // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:12:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:12:1) *const restrict' // CHECK-NEXT: | | | | |-VarDecl {{.*}} <line:13:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | `-VarDecl {{.*}} <line:14:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | |-DeclRefExpr {{.*}} <line:13:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <line:14:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:11:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:11:1) *const restrict' // CHECK-NEXT: | | |-RecordDecl {{.*}} <line:12:1> col:1 implicit struct definition // CHECK-NEXT: | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | |-FieldDecl {{.*}} <line:13:3> col:3 implicit 'int &' // CHECK-NEXT: | | | `-FieldDecl {{.*}} <line:14:25> col:25 implicit 'int &' // CHECK-NEXT: | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | |-CapturedStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-ForStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:13:8, col:17> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ForStmt {{.*}} <line:14:5, line:15:7> openmp_structured_block // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:14:10, col:19> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-NullStmt {{.*}} <line:15:7> // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:12:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:12:1) *const restrict' // CHECK-NEXT: | | | | | |-VarDecl {{.*}} <line:13:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <line:14:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | |-DeclRefExpr {{.*}} <line:13:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <line:14:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <line:12:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:12:1) *const restrict' // CHECK-NEXT: | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | |-FieldDecl {{.*}} <line:13:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | `-FieldDecl {{.*}} <line:14:25> col:25 implicit 'int &' // CHECK-NEXT: | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | |-ForStmt {{.*}} <line:13:3, line:15:7> // CHECK-NEXT: | | | | |-DeclStmt {{.*}} <line:13:8, col:17> // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-ForStmt {{.*}} <line:14:5, line:15:7> openmp_structured_block // CHECK-NEXT: | | | | |-DeclStmt {{.*}} <line:14:10, col:19> // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-NullStmt {{.*}} <line:15:7> // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <line:12:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:12:1) *const restrict' // CHECK-NEXT: | | | |-VarDecl {{.*}} <line:13:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | `-VarDecl {{.*}} <line:14:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | |-OMPCapturedExprDecl {{.*}} <line:13:23> col:23 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | `-OMPCapturedExprDecl {{.*}} <col:3, <invalid sloc>> col:3 implicit used .capture_expr. 'int' // CHECK-NEXT: | | `-BinaryOperator {{.*}} <col:3, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | |-BinaryOperator {{.*}} <col:3, col:26> 'int' '/' // CHECK-NEXT: | | | |-ParenExpr {{.*}} <col:3> 'int' // CHECK-NEXT: | | | | `-BinaryOperator {{.*}} <col:23, col:26> 'int' '+' // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:23, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:23, col:16> 'int' '-' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} <line:14:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: |-FunctionDecl {{.*}} <line:18:1, line:24:1> line:18:6 test_three 'void (int, int)' // CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:17, col:21> col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:24, col:28> col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:31, line:24:1> // CHECK-NEXT: | `-OMPTargetDirective {{.*}} <line:19:1, col:19> // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <<invalid sloc>> <implicit> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} <line:21:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <line:22:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | `-CapturedStmt {{.*}} <line:20:1, col:54> // CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | |-CapturedStmt {{.*}} <col:1, col:54> // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-OMPTeamsDistributeParallelForDirective {{.*}} <col:1, col:54> openmp_structured_block // CHECK-NEXT: | | | | | |-OMPCollapseClause {{.*}} <col:43, col:53> // CHECK-NEXT: | | | | | | `-ConstantExpr {{.*}} <col:52> 'int' // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:52> 'int' 1 // CHECK-NEXT: | | | | | `-CapturedStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | |-CapturedStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | | | |-ForStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | | | | | | | |-DeclStmt {{.*}} <line:21:8, col:17> // CHECK-NEXT: | | | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-ForStmt {{.*}} <line:22:5, line:23:7> openmp_structured_block // CHECK-NEXT: | | | | | | | | | |-DeclStmt {{.*}} <line:22:10, col:19> // CHECK-NEXT: | | | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-NullStmt {{.*}} <line:23:7> // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <line:20:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:20:1) *const restrict' // CHECK-NEXT: | | | | | | | | |-VarDecl {{.*}} <line:21:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <line:22:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | |-DeclRefExpr {{.*}} <line:21:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <line:22:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <line:20:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:20:1) *const restrict' // CHECK-NEXT: | | | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | | | |-FieldDecl {{.*}} <line:21:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | | | `-FieldDecl {{.*}} <line:22:25> col:25 implicit 'int &' // CHECK-NEXT: | | | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | |-ForStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:21:8, col:17> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ForStmt {{.*}} <line:22:5, line:23:7> openmp_structured_block // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:22:10, col:19> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-NullStmt {{.*}} <line:23:7> // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <line:20:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:20:1) *const restrict' // CHECK-NEXT: | | | | | | |-VarDecl {{.*}} <line:21:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <line:22:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | |-DeclRefExpr {{.*}} <line:21:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <line:22:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:19:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:19:1) *const restrict' // CHECK-NEXT: | | | | |-RecordDecl {{.*}} <line:20:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | |-FieldDecl {{.*}} <line:21:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | `-FieldDecl {{.*}} <line:22:25> col:25 implicit 'int &' // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-CapturedStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | | |-ForStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | | | | | | |-DeclStmt {{.*}} <line:21:8, col:17> // CHECK-NEXT: | | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ForStmt {{.*}} <line:22:5, line:23:7> openmp_structured_block // CHECK-NEXT: | | | | | | | | |-DeclStmt {{.*}} <line:22:10, col:19> // CHECK-NEXT: | | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-NullStmt {{.*}} <line:23:7> // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <line:20:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:20:1) *const restrict' // CHECK-NEXT: | | | | | | | |-VarDecl {{.*}} <line:21:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <line:22:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | |-DeclRefExpr {{.*}} <line:21:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <line:22:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:20:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:20:1) *const restrict' // CHECK-NEXT: | | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | | |-FieldDecl {{.*}} <line:21:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | | `-FieldDecl {{.*}} <line:22:25> col:25 implicit 'int &' // CHECK-NEXT: | | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-ForStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:21:8, col:17> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ForStmt {{.*}} <line:22:5, line:23:7> openmp_structured_block // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:22:10, col:19> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-NullStmt {{.*}} <line:23:7> // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:20:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:20:1) *const restrict' // CHECK-NEXT: | | | | | |-VarDecl {{.*}} <line:21:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <line:22:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | |-OMPCapturedExprDecl {{.*}} <line:21:23> col:23 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | `-OMPCapturedExprDecl {{.*}} <col:3, <invalid sloc>> col:3 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | | `-BinaryOperator {{.*}} <col:3, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:3, col:26> 'int' '/' // CHECK-NEXT: | | | | | |-ParenExpr {{.*}} <col:3> 'int' // CHECK-NEXT: | | | | | | `-BinaryOperator {{.*}} <col:23, col:26> 'int' '+' // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:23, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:23, col:16> 'int' '-' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | |-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <line:22:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | |-AlwaysInlineAttr {{.*}} <<invalid sloc>> Implicit __forceinline // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:19:1> col:1 implicit .global_tid. 'const int' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .part_id. 'const int *const restrict' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .privates. 'void *const restrict' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .copy_fn. 'void (*const restrict)(void *const restrict, ...)' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .task_t. 'void *const' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:19:1) *const restrict' // CHECK-NEXT: | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | |-FieldDecl {{.*}} <line:21:3> col:3 implicit 'int' // CHECK-NEXT: | | | | `-OMPCaptureKindAttr {{.*}} <<invalid sloc>> Implicit 9 // CHECK-NEXT: | | | `-FieldDecl {{.*}} <line:22:25> col:25 implicit 'int' // CHECK-NEXT: | | | `-OMPCaptureKindAttr {{.*}} <<invalid sloc>> Implicit 9 // CHECK-NEXT: | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | |-OMPTeamsDistributeParallelForDirective {{.*}} <line:20:1, col:54> openmp_structured_block // CHECK-NEXT: | | | |-OMPCollapseClause {{.*}} <col:43, col:53> // CHECK-NEXT: | | | | `-ConstantExpr {{.*}} <col:52> 'int' // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:52> 'int' 1 // CHECK-NEXT: | | | `-CapturedStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-CapturedStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | |-ForStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:21:8, col:17> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ForStmt {{.*}} <line:22:5, line:23:7> openmp_structured_block // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:22:10, col:19> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-NullStmt {{.*}} <line:23:7> // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <line:20:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:20:1) *const restrict' // CHECK-NEXT: | | | | | | |-VarDecl {{.*}} <line:21:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <line:22:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | |-DeclRefExpr {{.*}} <line:21:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <line:22:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:20:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:20:1) *const restrict' // CHECK-NEXT: | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | |-FieldDecl {{.*}} <line:21:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | `-FieldDecl {{.*}} <line:22:25> col:25 implicit 'int &' // CHECK-NEXT: | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-ForStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | | | |-DeclStmt {{.*}} <line:21:8, col:17> // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ForStmt {{.*}} <line:22:5, line:23:7> openmp_structured_block // CHECK-NEXT: | | | | | |-DeclStmt {{.*}} <line:22:10, col:19> // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-NullStmt {{.*}} <line:23:7> // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:20:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:20:1) *const restrict' // CHECK-NEXT: | | | | |-VarDecl {{.*}} <line:21:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | `-VarDecl {{.*}} <line:22:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | |-DeclRefExpr {{.*}} <line:21:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <line:22:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:19:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:19:1) *const restrict' // CHECK-NEXT: | | |-RecordDecl {{.*}} <line:20:1> col:1 implicit struct definition // CHECK-NEXT: | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | |-FieldDecl {{.*}} <line:21:3> col:3 implicit 'int &' // CHECK-NEXT: | | | `-FieldDecl {{.*}} <line:22:25> col:25 implicit 'int &' // CHECK-NEXT: | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | |-CapturedStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-ForStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:21:8, col:17> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ForStmt {{.*}} <line:22:5, line:23:7> openmp_structured_block // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:22:10, col:19> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-NullStmt {{.*}} <line:23:7> // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:20:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:20:1) *const restrict' // CHECK-NEXT: | | | | | |-VarDecl {{.*}} <line:21:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <line:22:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | |-DeclRefExpr {{.*}} <line:21:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <line:22:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <line:20:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:20:1) *const restrict' // CHECK-NEXT: | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | |-FieldDecl {{.*}} <line:21:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | `-FieldDecl {{.*}} <line:22:25> col:25 implicit 'int &' // CHECK-NEXT: | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | |-ForStmt {{.*}} <line:21:3, line:23:7> // CHECK-NEXT: | | | | |-DeclStmt {{.*}} <line:21:8, col:17> // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-ForStmt {{.*}} <line:22:5, line:23:7> openmp_structured_block // CHECK-NEXT: | | | | |-DeclStmt {{.*}} <line:22:10, col:19> // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-NullStmt {{.*}} <line:23:7> // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <line:20:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:20:1) *const restrict' // CHECK-NEXT: | | | |-VarDecl {{.*}} <line:21:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | `-VarDecl {{.*}} <line:22:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | |-OMPCapturedExprDecl {{.*}} <line:21:23> col:23 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | `-OMPCapturedExprDecl {{.*}} <col:3, <invalid sloc>> col:3 implicit used .capture_expr. 'int' // CHECK-NEXT: | | `-BinaryOperator {{.*}} <col:3, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | |-BinaryOperator {{.*}} <col:3, col:26> 'int' '/' // CHECK-NEXT: | | | |-ParenExpr {{.*}} <col:3> 'int' // CHECK-NEXT: | | | | `-BinaryOperator {{.*}} <col:23, col:26> 'int' '+' // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:23, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:23, col:16> 'int' '-' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} <line:22:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: |-FunctionDecl {{.*}} <line:26:1, line:32:1> line:26:6 test_four 'void (int, int)' // CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:16, col:20> col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:23, col:27> col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:30, line:32:1> // CHECK-NEXT: | `-OMPTargetDirective {{.*}} <line:27:1, col:19> // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <<invalid sloc>> <implicit> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} <line:29:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <line:30:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | `-CapturedStmt {{.*}} <line:28:1, col:54> // CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | |-CapturedStmt {{.*}} <col:1, col:54> // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-OMPTeamsDistributeParallelForDirective {{.*}} <col:1, col:54> openmp_structured_block // CHECK-NEXT: | | | | | |-OMPCollapseClause {{.*}} <col:43, col:53> // CHECK-NEXT: | | | | | | `-ConstantExpr {{.*}} <col:52> 'int' // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:52> 'int' 2 // CHECK-NEXT: | | | | | `-CapturedStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | |-CapturedStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | | | |-ForStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | | | | | | | |-DeclStmt {{.*}} <line:29:8, col:17> // CHECK-NEXT: | | | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-ForStmt {{.*}} <line:30:5, line:31:7> // CHECK-NEXT: | | | | | | | | | |-DeclStmt {{.*}} <line:30:10, col:19> // CHECK-NEXT: | | | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-NullStmt {{.*}} <line:31:7> openmp_structured_block // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <line:28:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:28:1) *const restrict' // CHECK-NEXT: | | | | | | | | |-VarDecl {{.*}} <line:29:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <line:30:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | |-DeclRefExpr {{.*}} <line:29:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <line:30:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <line:28:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:28:1) *const restrict' // CHECK-NEXT: | | | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | | | |-FieldDecl {{.*}} <line:29:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | | | `-FieldDecl {{.*}} <line:30:5> col:5 implicit 'int &' // CHECK-NEXT: | | | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | |-ForStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:29:8, col:17> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ForStmt {{.*}} <line:30:5, line:31:7> // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:30:10, col:19> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-NullStmt {{.*}} <line:31:7> openmp_structured_block // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <line:28:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:28:1) *const restrict' // CHECK-NEXT: | | | | | | |-VarDecl {{.*}} <line:29:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <line:30:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | |-DeclRefExpr {{.*}} <line:29:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <line:30:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:27:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:27:1) *const restrict' // CHECK-NEXT: | | | | |-RecordDecl {{.*}} <line:28:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | |-FieldDecl {{.*}} <line:29:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | `-FieldDecl {{.*}} <line:30:5> col:5 implicit 'int &' // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-CapturedStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | | |-ForStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | | | | | | |-DeclStmt {{.*}} <line:29:8, col:17> // CHECK-NEXT: | | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ForStmt {{.*}} <line:30:5, line:31:7> // CHECK-NEXT: | | | | | | | | |-DeclStmt {{.*}} <line:30:10, col:19> // CHECK-NEXT: | | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-NullStmt {{.*}} <line:31:7> openmp_structured_block // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <line:28:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:28:1) *const restrict' // CHECK-NEXT: | | | | | | | |-VarDecl {{.*}} <line:29:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <line:30:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | |-DeclRefExpr {{.*}} <line:29:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <line:30:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:28:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:28:1) *const restrict' // CHECK-NEXT: | | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | | |-FieldDecl {{.*}} <line:29:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | | `-FieldDecl {{.*}} <line:30:5> col:5 implicit 'int &' // CHECK-NEXT: | | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-ForStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:29:8, col:17> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ForStmt {{.*}} <line:30:5, line:31:7> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:30:10, col:19> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-NullStmt {{.*}} <line:31:7> openmp_structured_block // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:28:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:28:1) *const restrict' // CHECK-NEXT: | | | | | |-VarDecl {{.*}} <line:29:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <line:30:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | |-OMPCapturedExprDecl {{.*}} <line:29:23> col:23 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | |-OMPCapturedExprDecl {{.*}} <line:30:25> col:25 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | `-OMPCapturedExprDecl {{.*}} <line:29:3, <invalid sloc>> col:3 implicit used .capture_expr. 'long' // CHECK-NEXT: | | | | `-BinaryOperator {{.*}} <col:3, <invalid sloc>> 'long' '-' // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:3, line:30:28> 'long' '*' // CHECK-NEXT: | | | | | |-ImplicitCastExpr {{.*}} <line:29:3, col:26> 'long' <IntegralCast> // CHECK-NEXT: | | | | | | `-BinaryOperator {{.*}} <col:3, col:26> 'int' '/' // CHECK-NEXT: | | | | | | |-ParenExpr {{.*}} <col:3> 'int' // CHECK-NEXT: | | | | | | | `-BinaryOperator {{.*}} <col:23, col:26> 'int' '+' // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:23, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | | | | | |-BinaryOperator {{.*}} <col:23, col:16> 'int' '-' // CHECK-NEXT: | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <line:30:5, col:28> 'long' <IntegralCast> // CHECK-NEXT: | | | | | `-BinaryOperator {{.*}} <col:5, col:28> 'int' '/' // CHECK-NEXT: | | | | | |-ParenExpr {{.*}} <col:5> 'int' // CHECK-NEXT: | | | | | | `-BinaryOperator {{.*}} <col:25, col:28> 'int' '+' // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:25, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:25, col:18> 'int' '-' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:28> 'int' 1 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:28> 'int' 1 // CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <<invalid sloc>> 'long' <IntegralCast> // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | |-DeclRefExpr {{.*}} <line:29:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <line:30:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | |-AlwaysInlineAttr {{.*}} <<invalid sloc>> Implicit __forceinline // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:27:1> col:1 implicit .global_tid. 'const int' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .part_id. 'const int *const restrict' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .privates. 'void *const restrict' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .copy_fn. 'void (*const restrict)(void *const restrict, ...)' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .task_t. 'void *const' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:27:1) *const restrict' // CHECK-NEXT: | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | |-FieldDecl {{.*}} <line:29:3> col:3 implicit 'int' // CHECK-NEXT: | | | | `-OMPCaptureKindAttr {{.*}} <<invalid sloc>> Implicit 9 // CHECK-NEXT: | | | `-FieldDecl {{.*}} <line:30:5> col:5 implicit 'int' // CHECK-NEXT: | | | `-OMPCaptureKindAttr {{.*}} <<invalid sloc>> Implicit 9 // CHECK-NEXT: | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | |-OMPTeamsDistributeParallelForDirective {{.*}} <line:28:1, col:54> openmp_structured_block // CHECK-NEXT: | | | |-OMPCollapseClause {{.*}} <col:43, col:53> // CHECK-NEXT: | | | | `-ConstantExpr {{.*}} <col:52> 'int' // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:52> 'int' 2 // CHECK-NEXT: | | | `-CapturedStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-CapturedStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | |-ForStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:29:8, col:17> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ForStmt {{.*}} <line:30:5, line:31:7> // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:30:10, col:19> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-NullStmt {{.*}} <line:31:7> openmp_structured_block // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <line:28:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:28:1) *const restrict' // CHECK-NEXT: | | | | | | |-VarDecl {{.*}} <line:29:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <line:30:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | |-DeclRefExpr {{.*}} <line:29:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <line:30:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:28:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:28:1) *const restrict' // CHECK-NEXT: | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | |-FieldDecl {{.*}} <line:29:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | `-FieldDecl {{.*}} <line:30:5> col:5 implicit 'int &' // CHECK-NEXT: | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-ForStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | | | |-DeclStmt {{.*}} <line:29:8, col:17> // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ForStmt {{.*}} <line:30:5, line:31:7> // CHECK-NEXT: | | | | | |-DeclStmt {{.*}} <line:30:10, col:19> // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-NullStmt {{.*}} <line:31:7> openmp_structured_block // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:28:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:28:1) *const restrict' // CHECK-NEXT: | | | | |-VarDecl {{.*}} <line:29:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | `-VarDecl {{.*}} <line:30:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | |-DeclRefExpr {{.*}} <line:29:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <line:30:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:27:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:27:1) *const restrict' // CHECK-NEXT: | | |-RecordDecl {{.*}} <line:28:1> col:1 implicit struct definition // CHECK-NEXT: | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | |-FieldDecl {{.*}} <line:29:3> col:3 implicit 'int &' // CHECK-NEXT: | | | `-FieldDecl {{.*}} <line:30:5> col:5 implicit 'int &' // CHECK-NEXT: | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | |-CapturedStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-ForStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:29:8, col:17> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ForStmt {{.*}} <line:30:5, line:31:7> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:30:10, col:19> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-NullStmt {{.*}} <line:31:7> openmp_structured_block // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:28:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:28:1) *const restrict' // CHECK-NEXT: | | | | | |-VarDecl {{.*}} <line:29:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <line:30:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | |-DeclRefExpr {{.*}} <line:29:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <line:30:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <line:28:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:28:1) *const restrict' // CHECK-NEXT: | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | |-FieldDecl {{.*}} <line:29:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | `-FieldDecl {{.*}} <line:30:5> col:5 implicit 'int &' // CHECK-NEXT: | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | |-ForStmt {{.*}} <line:29:3, line:31:7> // CHECK-NEXT: | | | | |-DeclStmt {{.*}} <line:29:8, col:17> // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-ForStmt {{.*}} <line:30:5, line:31:7> // CHECK-NEXT: | | | | |-DeclStmt {{.*}} <line:30:10, col:19> // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-NullStmt {{.*}} <line:31:7> openmp_structured_block // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <line:28:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:28:1) *const restrict' // CHECK-NEXT: | | | |-VarDecl {{.*}} <line:29:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | `-VarDecl {{.*}} <line:30:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | |-OMPCapturedExprDecl {{.*}} <line:29:23> col:23 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | |-OMPCapturedExprDecl {{.*}} <line:30:25> col:25 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | `-OMPCapturedExprDecl {{.*}} <line:29:3, <invalid sloc>> col:3 implicit used .capture_expr. 'long' // CHECK-NEXT: | | `-BinaryOperator {{.*}} <col:3, <invalid sloc>> 'long' '-' // CHECK-NEXT: | | |-BinaryOperator {{.*}} <col:3, line:30:28> 'long' '*' // CHECK-NEXT: | | | |-ImplicitCastExpr {{.*}} <line:29:3, col:26> 'long' <IntegralCast> // CHECK-NEXT: | | | | `-BinaryOperator {{.*}} <col:3, col:26> 'int' '/' // CHECK-NEXT: | | | | |-ParenExpr {{.*}} <col:3> 'int' // CHECK-NEXT: | | | | | `-BinaryOperator {{.*}} <col:23, col:26> 'int' '+' // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:23, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:23, col:16> 'int' '-' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <line:30:5, col:28> 'long' <IntegralCast> // CHECK-NEXT: | | | `-BinaryOperator {{.*}} <col:5, col:28> 'int' '/' // CHECK-NEXT: | | | |-ParenExpr {{.*}} <col:5> 'int' // CHECK-NEXT: | | | | `-BinaryOperator {{.*}} <col:25, col:28> 'int' '+' // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:25, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:25, col:18> 'int' '-' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:28> 'int' 1 // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:28> 'int' 1 // CHECK-NEXT: | | `-ImplicitCastExpr {{.*}} <<invalid sloc>> 'long' <IntegralCast> // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} <line:29:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} <line:30:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: `-FunctionDecl {{.*}} <line:34:1, line:41:1> line:34:6 test_five 'void (int, int, int)' // CHECK-NEXT: |-ParmVarDecl {{.*}} <col:16, col:20> col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} <col:23, col:27> col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} <col:30, col:34> col:34 used z 'int' // CHECK-NEXT: `-CompoundStmt {{.*}} <col:37, line:41:1> // CHECK-NEXT: `-OMPTargetDirective {{.*}} <line:35:1, col:19> // CHECK-NEXT: |-OMPFirstprivateClause {{.*}} <<invalid sloc>> <implicit> // CHECK-NEXT: | |-DeclRefExpr {{.*}} <line:37:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | |-DeclRefExpr {{.*}} <line:38:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} <line:39:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: `-CapturedStmt {{.*}} <line:36:1, col:54> // CHECK-NEXT: |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | |-CapturedStmt {{.*}} <col:1, col:54> // CHECK-NEXT: | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | |-OMPTeamsDistributeParallelForDirective {{.*}} <col:1, col:54> openmp_structured_block // CHECK-NEXT: | | | | |-OMPCollapseClause {{.*}} <col:43, col:53> // CHECK-NEXT: | | | | | `-ConstantExpr {{.*}} <col:52> 'int' // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:52> 'int' 2 // CHECK-NEXT: | | | | `-CapturedStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-CapturedStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | | |-ForStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | | | | | | | |-DeclStmt {{.*}} <line:37:8, col:17> // CHECK-NEXT: | | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ForStmt {{.*}} <line:38:5, line:40:9> // CHECK-NEXT: | | | | | | | | |-DeclStmt {{.*}} <line:38:10, col:19> // CHECK-NEXT: | | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ForStmt {{.*}} <line:39:7, line:40:9> openmp_structured_block // CHECK-NEXT: | | | | | | | | |-DeclStmt {{.*}} <line:39:12, col:21> // CHECK-NEXT: | | | | | | | | | `-VarDecl {{.*}} <col:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | | | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | | |-BinaryOperator {{.*}} <col:23, col:27> 'int' '<' // CHECK-NEXT: | | | | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | | `-ImplicitCastExpr {{.*}} <col:27> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | | | | | | | | |-UnaryOperator {{.*}} <col:30, col:31> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:30> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-NullStmt {{.*}} <line:40:9> // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <line:36:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:36:1) *const restrict' // CHECK-NEXT: | | | | | | | |-VarDecl {{.*}} <line:37:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | |-VarDecl {{.*}} <line:38:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <line:39:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | | | | |-DeclRefExpr {{.*}} <line:37:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | |-DeclRefExpr {{.*}} <line:38:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <line:39:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:36:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:36:1) *const restrict' // CHECK-NEXT: | | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | | |-FieldDecl {{.*}} <line:37:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | | |-FieldDecl {{.*}} <line:38:5> col:5 implicit 'int &' // CHECK-NEXT: | | | | | | `-FieldDecl {{.*}} <line:39:27> col:27 implicit 'int &' // CHECK-NEXT: | | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-ForStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:37:8, col:17> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ForStmt {{.*}} <line:38:5, line:40:9> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:38:10, col:19> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ForStmt {{.*}} <line:39:7, line:40:9> openmp_structured_block // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:39:12, col:21> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:23, col:27> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:27> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:30, col:31> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:30> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-NullStmt {{.*}} <line:40:9> // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:36:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:36:1) *const restrict' // CHECK-NEXT: | | | | | |-VarDecl {{.*}} <line:37:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | |-VarDecl {{.*}} <line:38:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <line:39:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | | |-DeclRefExpr {{.*}} <line:37:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | |-DeclRefExpr {{.*}} <line:38:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <line:39:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <line:35:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:35:1) *const restrict' // CHECK-NEXT: | | | |-RecordDecl {{.*}} <line:36:1> col:1 implicit struct definition // CHECK-NEXT: | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | |-FieldDecl {{.*}} <line:37:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | |-FieldDecl {{.*}} <line:38:5> col:5 implicit 'int &' // CHECK-NEXT: | | | | `-FieldDecl {{.*}} <line:39:27> col:27 implicit 'int &' // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-CapturedStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | | |-ForStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:37:8, col:17> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ForStmt {{.*}} <line:38:5, line:40:9> // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:38:10, col:19> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ForStmt {{.*}} <line:39:7, line:40:9> openmp_structured_block // CHECK-NEXT: | | | | | | | |-DeclStmt {{.*}} <line:39:12, col:21> // CHECK-NEXT: | | | | | | | | `-VarDecl {{.*}} <col:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:23, col:27> 'int' '<' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | | `-ImplicitCastExpr {{.*}} <col:27> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | | | | | | | |-UnaryOperator {{.*}} <col:30, col:31> 'int' postfix '++' // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:30> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-NullStmt {{.*}} <line:40:9> // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <line:36:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:36:1) *const restrict' // CHECK-NEXT: | | | | | | |-VarDecl {{.*}} <line:37:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | |-VarDecl {{.*}} <line:38:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <line:39:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | | | |-DeclRefExpr {{.*}} <line:37:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | |-DeclRefExpr {{.*}} <line:38:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <line:39:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:36:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:36:1) *const restrict' // CHECK-NEXT: | | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | | |-FieldDecl {{.*}} <line:37:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | | |-FieldDecl {{.*}} <line:38:5> col:5 implicit 'int &' // CHECK-NEXT: | | | | | `-FieldDecl {{.*}} <line:39:27> col:27 implicit 'int &' // CHECK-NEXT: | | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-ForStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | | | | |-DeclStmt {{.*}} <line:37:8, col:17> // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ForStmt {{.*}} <line:38:5, line:40:9> // CHECK-NEXT: | | | | | |-DeclStmt {{.*}} <line:38:10, col:19> // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ForStmt {{.*}} <line:39:7, line:40:9> openmp_structured_block // CHECK-NEXT: | | | | | |-DeclStmt {{.*}} <line:39:12, col:21> // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <col:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:23, col:27> 'int' '<' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} <col:27> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | | | | | |-UnaryOperator {{.*}} <col:30, col:31> 'int' postfix '++' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:30> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-NullStmt {{.*}} <line:40:9> // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:36:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:36:1) *const restrict' // CHECK-NEXT: | | | | |-VarDecl {{.*}} <line:37:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | |-VarDecl {{.*}} <line:38:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | `-VarDecl {{.*}} <line:39:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | |-OMPCapturedExprDecl {{.*}} <line:37:23> col:23 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | |-OMPCapturedExprDecl {{.*}} <line:38:25> col:25 implicit used .capture_expr. 'int' // CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | `-OMPCapturedExprDecl {{.*}} <line:37:3, <invalid sloc>> col:3 implicit used .capture_expr. 'long' // CHECK-NEXT: | | | `-BinaryOperator {{.*}} <col:3, <invalid sloc>> 'long' '-' // CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:3, line:38:28> 'long' '*' // CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <line:37:3, col:26> 'long' <IntegralCast> // CHECK-NEXT: | | | | | `-BinaryOperator {{.*}} <col:3, col:26> 'int' '/' // CHECK-NEXT: | | | | | |-ParenExpr {{.*}} <col:3> 'int' // CHECK-NEXT: | | | | | | `-BinaryOperator {{.*}} <col:23, col:26> 'int' '+' // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:23, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | | | | |-BinaryOperator {{.*}} <col:23, col:16> 'int' '-' // CHECK-NEXT: | | | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <line:38:5, col:28> 'long' <IntegralCast> // CHECK-NEXT: | | | | `-BinaryOperator {{.*}} <col:5, col:28> 'int' '/' // CHECK-NEXT: | | | | |-ParenExpr {{.*}} <col:5> 'int' // CHECK-NEXT: | | | | | `-BinaryOperator {{.*}} <col:25, col:28> 'int' '+' // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:25, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:25, col:18> 'int' '-' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:28> 'int' 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:28> 'int' 1 // CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <<invalid sloc>> 'long' <IntegralCast> // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | |-DeclRefExpr {{.*}} <line:37:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | |-DeclRefExpr {{.*}} <line:38:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <line:39:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | |-AlwaysInlineAttr {{.*}} <<invalid sloc>> Implicit __forceinline // CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <line:35:1> col:1 implicit .global_tid. 'const int' // CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .part_id. 'const int *const restrict' // CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .privates. 'void *const restrict' // CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .copy_fn. 'void (*const restrict)(void *const restrict, ...)' // CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .task_t. 'void *const' // CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:35:1) *const restrict' // CHECK-NEXT: | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | |-FieldDecl {{.*}} <line:37:3> col:3 implicit 'int' // CHECK-NEXT: | | | `-OMPCaptureKindAttr {{.*}} <<invalid sloc>> Implicit 9 // CHECK-NEXT: | | |-FieldDecl {{.*}} <line:38:5> col:5 implicit 'int' // CHECK-NEXT: | | | `-OMPCaptureKindAttr {{.*}} <<invalid sloc>> Implicit 9 // CHECK-NEXT: | | `-FieldDecl {{.*}} <line:39:27> col:27 implicit 'int' // CHECK-NEXT: | | `-OMPCaptureKindAttr {{.*}} <<invalid sloc>> Implicit 9 // CHECK-NEXT: | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | |-OMPTeamsDistributeParallelForDirective {{.*}} <line:36:1, col:54> openmp_structured_block // CHECK-NEXT: | | |-OMPCollapseClause {{.*}} <col:43, col:53> // CHECK-NEXT: | | | `-ConstantExpr {{.*}} <col:52> 'int' // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:52> 'int' 2 // CHECK-NEXT: | | `-CapturedStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | |-CapturedStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | | |-ForStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:37:8, col:17> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ForStmt {{.*}} <line:38:5, line:40:9> // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:38:10, col:19> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ForStmt {{.*}} <line:39:7, line:40:9> openmp_structured_block // CHECK-NEXT: | | | | | | |-DeclStmt {{.*}} <line:39:12, col:21> // CHECK-NEXT: | | | | | | | `-VarDecl {{.*}} <col:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | | |-BinaryOperator {{.*}} <col:23, col:27> 'int' '<' // CHECK-NEXT: | | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | | `-ImplicitCastExpr {{.*}} <col:27> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | | | | | | |-UnaryOperator {{.*}} <col:30, col:31> 'int' postfix '++' // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:30> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-NullStmt {{.*}} <line:40:9> // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <line:36:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:36:1) *const restrict' // CHECK-NEXT: | | | | | |-VarDecl {{.*}} <line:37:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | |-VarDecl {{.*}} <line:38:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <line:39:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | | |-DeclRefExpr {{.*}} <line:37:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | |-DeclRefExpr {{.*}} <line:38:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <line:39:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <line:36:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:36:1) *const restrict' // CHECK-NEXT: | | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | | |-FieldDecl {{.*}} <line:37:3> col:3 implicit 'int &' // CHECK-NEXT: | | | | |-FieldDecl {{.*}} <line:38:5> col:5 implicit 'int &' // CHECK-NEXT: | | | | `-FieldDecl {{.*}} <line:39:27> col:27 implicit 'int &' // CHECK-NEXT: | | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | |-ForStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | | | |-DeclStmt {{.*}} <line:37:8, col:17> // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-ForStmt {{.*}} <line:38:5, line:40:9> // CHECK-NEXT: | | | | |-DeclStmt {{.*}} <line:38:10, col:19> // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-ForStmt {{.*}} <line:39:7, line:40:9> openmp_structured_block // CHECK-NEXT: | | | | |-DeclStmt {{.*}} <line:39:12, col:21> // CHECK-NEXT: | | | | | `-VarDecl {{.*}} <col:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:23, col:27> 'int' '<' // CHECK-NEXT: | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} <col:27> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | | | | |-UnaryOperator {{.*}} <col:30, col:31> 'int' postfix '++' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:30> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-NullStmt {{.*}} <line:40:9> // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <line:36:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:36:1) *const restrict' // CHECK-NEXT: | | | |-VarDecl {{.*}} <line:37:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | |-VarDecl {{.*}} <line:38:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | `-VarDecl {{.*}} <line:39:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | |-DeclRefExpr {{.*}} <line:37:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | |-DeclRefExpr {{.*}} <line:38:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <line:39:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <line:35:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:35:1) *const restrict' // CHECK-NEXT: | |-RecordDecl {{.*}} <line:36:1> col:1 implicit struct definition // CHECK-NEXT: | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | |-FieldDecl {{.*}} <line:37:3> col:3 implicit 'int &' // CHECK-NEXT: | | |-FieldDecl {{.*}} <line:38:5> col:5 implicit 'int &' // CHECK-NEXT: | | `-FieldDecl {{.*}} <line:39:27> col:27 implicit 'int &' // CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | |-CapturedStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | | | |-ForStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | | | | |-DeclStmt {{.*}} <line:37:8, col:17> // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ForStmt {{.*}} <line:38:5, line:40:9> // CHECK-NEXT: | | | | | |-DeclStmt {{.*}} <line:38:10, col:19> // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-ForStmt {{.*}} <line:39:7, line:40:9> openmp_structured_block // CHECK-NEXT: | | | | | |-DeclStmt {{.*}} <line:39:12, col:21> // CHECK-NEXT: | | | | | | `-VarDecl {{.*}} <col:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | | | |-<<<NULL>>> // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:23, col:27> 'int' '<' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} <col:27> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | | | | | |-UnaryOperator {{.*}} <col:30, col:31> 'int' postfix '++' // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:30> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | | `-NullStmt {{.*}} <line:40:9> // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <line:36:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:36:1) *const restrict' // CHECK-NEXT: | | | | |-VarDecl {{.*}} <line:37:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | |-VarDecl {{.*}} <line:38:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | `-VarDecl {{.*}} <line:39:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | |-DeclRefExpr {{.*}} <line:37:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | |-DeclRefExpr {{.*}} <line:38:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <line:39:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:36:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:36:1) *const restrict' // CHECK-NEXT: | | |-RecordDecl {{.*}} <col:1> col:1 implicit struct definition // CHECK-NEXT: | | | |-CapturedRecordAttr {{.*}} <<invalid sloc>> Implicit // CHECK-NEXT: | | | |-FieldDecl {{.*}} <line:37:3> col:3 implicit 'int &' // CHECK-NEXT: | | | |-FieldDecl {{.*}} <line:38:5> col:5 implicit 'int &' // CHECK-NEXT: | | | `-FieldDecl {{.*}} <line:39:27> col:27 implicit 'int &' // CHECK-NEXT: | | `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow // CHECK-NEXT: | | |-ForStmt {{.*}} <line:37:3, line:40:9> // CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:37:8, col:17> // CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | |-<<<NULL>>> // CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<' // CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++' // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | `-ForStmt {{.*}} <line:38:5, line:40:9> // CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:38:10, col:19> // CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | |-<<<NULL>>> // CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<' // CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++' // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | `-ForStmt {{.*}} <line:39:7, line:40:9> openmp_structured_block // CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:39:12, col:21> // CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | | | |-<<<NULL>>> // CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:23, col:27> 'int' '<' // CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:27> 'int' <LValueToRValue> // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:27> 'int' lvalue ParmVar {{.*}} 'z' 'int' // CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:30, col:31> 'int' postfix '++' // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:30> 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | `-NullStmt {{.*}} <line:40:9> // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:36:1> col:1 implicit .global_tid. 'const int *const restrict' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long' // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:36:1) *const restrict' // CHECK-NEXT: | | |-VarDecl {{.*}} <line:37:8, col:16> col:12 used i 'int' cinit // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | |-VarDecl {{.*}} <line:38:10, col:18> col:14 used i 'int' cinit // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | `-VarDecl {{.*}} <line:39:12, col:20> col:16 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:20> 'int' 0 // CHECK-NEXT: | |-OMPCapturedExprDecl {{.*}} <line:37:23> col:23 implicit used .capture_expr. 'int' // CHECK-NEXT: | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | |-OMPCapturedExprDecl {{.*}} <line:38:25> col:25 implicit used .capture_expr. 'int' // CHECK-NEXT: | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: | `-OMPCapturedExprDecl {{.*}} <line:37:3, <invalid sloc>> col:3 implicit used .capture_expr. 'long' // CHECK-NEXT: | `-BinaryOperator {{.*}} <col:3, <invalid sloc>> 'long' '-' // CHECK-NEXT: | |-BinaryOperator {{.*}} <col:3, line:38:28> 'long' '*' // CHECK-NEXT: | | |-ImplicitCastExpr {{.*}} <line:37:3, col:26> 'long' <IntegralCast> // CHECK-NEXT: | | | `-BinaryOperator {{.*}} <col:3, col:26> 'int' '/' // CHECK-NEXT: | | | |-ParenExpr {{.*}} <col:3> 'int' // CHECK-NEXT: | | | | `-BinaryOperator {{.*}} <col:23, col:26> 'int' '+' // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:23, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | | |-BinaryOperator {{.*}} <col:23, col:16> 'int' '-' // CHECK-NEXT: | | | | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:26> 'int' 1 // CHECK-NEXT: | | `-ImplicitCastExpr {{.*}} <line:38:5, col:28> 'long' <IntegralCast> // CHECK-NEXT: | | `-BinaryOperator {{.*}} <col:5, col:28> 'int' '/' // CHECK-NEXT: | | |-ParenExpr {{.*}} <col:5> 'int' // CHECK-NEXT: | | | `-BinaryOperator {{.*}} <col:25, col:28> 'int' '+' // CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:25, <invalid sloc>> 'int' '-' // CHECK-NEXT: | | | | |-BinaryOperator {{.*}} <col:25, col:18> 'int' '-' // CHECK-NEXT: | | | | | |-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue> // CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue OMPCapturedExpr {{.*}} '.capture_expr.' 'int' // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:28> 'int' 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:28> 'int' 1 // CHECK-NEXT: | `-ImplicitCastExpr {{.*}} <<invalid sloc>> 'long' <IntegralCast> // CHECK-NEXT: | `-IntegerLiteral {{.*}} <<invalid sloc>> 'int' 1 // CHECK-NEXT: |-DeclRefExpr {{.*}} <line:37:3> 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: |-DeclRefExpr {{.*}} <line:38:5> 'int' lvalue ParmVar {{.*}} 'y' 'int' // CHECK-NEXT: `-DeclRefExpr {{.*}} <line:39:27> 'int' lvalue ParmVar {{.*}} 'z' 'int'
the_stack_data/32563.c
// Solution by oz123, github.com/oz123 // // based on the UI of solution 2 with better decrypt and encrypt function // see discussion in http://codereview.stackexchange.com/a/2354/19834 // #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <getopt.h> static char *invoc_name = NULL; static char *version_string = "1.0"; static struct option longopts[] = { { "decrypt", no_argument, NULL, 'd' }, { "key", required_argument, NULL, 'k' }, { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, 'v' }, { NULL, 0, NULL, 0 }, }; enum { ENCRYPT, DECRYPT }; static void usage(void); static void version(void); int encode(int ch, int key) { if (islower(ch)) ch = (ch-'a' + key) % 26 + 'a'; else if (isupper(ch)) ch = (ch-'A' + key) % 26 + 'A'; return ch; } int decode(int ch, int key) { return encode(ch, -key); } int main(int argc, char **argv){ int ch; int key = 3; /* shift for Caesar cipher */ int mode = ENCRYPT; invoc_name = argv[0]; while ( ( ch = getopt_long(argc, argv, "edk:hv", longopts, NULL) ) != -1 ) { int valid_key = 0; switch (ch) { case 'd': mode = DECRYPT; break; case 'k': valid_key = sscanf(optarg, "%d", &key); if (valid_key != 1) { key = 3; fprintf(stderr, "Invalid shift, '%s'\n" "Falling back to default: %d\n", optarg, key); } break; case 'h': usage(); exit(EXIT_SUCCESS); case 'v': version(); exit(EXIT_SUCCESS); default: fprintf(stderr, "Try %s --help for more information.\n", invoc_name); exit(EXIT_FAILURE); } } if (mode == ENCRYPT) { while (EOF != (ch=getchar())) putchar(encode(ch, key)); } else { while (EOF != (ch=getchar())) putchar(decode(ch, key)); } return 0; } static void usage(void){ // the variable invoc_name name is available from the main scope printf("Usage: %s [SHORT-OPTION]...\n", invoc_name); printf(" or: %s [LONG-OPTION]...\n", invoc_name); printf("Run caesar cipher on input and output to standard output.\n"); printf("\n"); printf(" -d, --decrypt decrypt text\n"); printf(" -k, --key select shift for cipher (default is 3)\n"); printf(" -h, --help display this help and exit\n"); printf(" -v, --version display version information and exit\n"); } static void version(void){ printf("Caesar cipher %s\n", version_string); }
the_stack_data/34513118.c
// http://codefundas.blogspot.com/2010/09/create-tcp-echo-server-using-libev.html #include <stdio.h> #include <netinet/in.h> #define PORT_NO 3033 #define BUFFER_SIZE 1024 int main() { int sd; struct sockaddr_in addr; int addr_len = sizeof(addr); char buffer[BUFFER_SIZE] = ""; // Create client socket if((sd = socket(PF_INET, SOCK_STREAM, 0)) < 0) { perror("socket error"); return -1; } bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(PORT_NO); addr.sin_addr.s_addr = htonl(INADDR_ANY); // Connect to server socket if(connect(sd, (struct sockaddr *)&addr, sizeof addr) < 0) { perror("Connect error"); return -1; } while (strcmp(buffer, "q") != 0) { // Read input from user and send message to the server gets(buffer); send(sd, buffer, strlen(buffer), 0); // Receive message from the server recv(sd, buffer, BUFFER_SIZE, 0); printf("message: %s\n", buffer); } return 0; }
the_stack_data/15225.c
#include <stdio.h> #include <math.h> int is_prime(const int p) { int i, l = pow(p, 0.5); for (i = 2;i <= l;i++) if (p % i == 0) return 0; return 1; } int main() { int t; FILE* in; in = fopen("c:\\abc.dat", "r"); while (~fscanf(in, "%d", &t)) if (is_prime(t)) printf("%d ", t); fclose(in); return 0; }
the_stack_data/12638811.c
#include <stdio.h> #define IN 1 /* inside a word */ #define OUT 0 /* outside a word */ /* count lines, words, and characters in input */ main() { int c, nl, nw, nc, state; nl = nw = nc = 0; while ((c = getchar()) != EOF) { ++nc; if (c == '\n') ++nl; if (c == ' ' || c == '\n' || c == '\t') state = OUT; else if (state == OUT) { state = IN; ++nw; } } printf("%d %d %d\n", nl, nw, nc); }
the_stack_data/153918.c
#include <stdio.h> int main() { /* puts("153 370 371 407"); return 0; */ int f=1,i,j,k; for (i=1;i<=9;i++) for (j=0;j<=9;j++) for (k=0;k<=9;k++) if (i*i*i+j*j*j+k*k*k==100*i+10*j+k) { if (f){printf("%d%d%d",i,j,k);f=0;} else printf(" %d%d%d",i,j,k); } puts(""); return 0; }
the_stack_data/772920.c
// wrapper for dlldata.c #ifdef _MERGE_PROXYSTUB // merge proxy stub DLL #define REGISTER_PROXY_DLL //DllRegisterServer, etc. #define _WIN32_WINNT 0x0500 //for WinNT 4.0 or Win95 with DCOM #define USE_STUBLESS_PROXY //defined only with MIDL switch /Oicf #pragma comment(lib, "rpcns4.lib") #pragma comment(lib, "rpcrt4.lib") #define ENTRY_PREFIX Prx #include "dlldata.c" #include "ATLExeCOMServer_p.c" #endif //_MERGE_PROXYSTUB
the_stack_data/75137562.c
#include<stdio.h> #include<malloc.h> struct NODE { int item; struct NODE *link; }; typedef struct NODE node; node *head=NULL; node*newnode(int val) { node*p; p=(node*)malloc(sizeof(node)); p->item=val; p->link=NULL; } void display() { node *curr; curr=head; while(curr!=NULL) { printf("%d-",curr->item); curr=curr->link; } } node *insertfirst(int val) { node *p; p=newnode(val); p->link=head; head=p; //return(p); } node* insertbefore(int item1,int val) { node *curr=head,*prev=NULL,*p; while(curr!=NULL && curr->item!=item1) { prev=curr; curr=curr->link; } if(curr==NULL) { printf("Item not found\n"); // return(h); } else { //p=newnode(val); //p->link=curr; //if(curr==h) if(prev=head) insertfirst(val); //h=p; else { p=newnode(val); p->link=prev->link; prev->link=p; } //return(h); } } void insertafter(int item1,int val) { node *curr=head,*p; //printf("curr =%u",curr); while(curr!=NULL && curr->item!=item1) { curr=curr->link; } if(curr==NULL) { printf("item not found\n"); } else { p=newnode(val); p->link=curr->link; curr->link=p; } } int main() { int ch,po,it; node*head=NULL; do { printf("\n1.insert first\n2.insert after\n3.insert before\n4.display\n5.exit"); scanf("%d",&ch); switch(ch) { case 1:printf("enter the value to be inserted at the first position : "); scanf("%d",&po); head=insertfirst(po); break; case 2:printf("enter the item after which the element to be inserted: "); scanf("%d",&it); printf("enter the value to be inserted"); scanf("%d",&po); insertafter(it,po); break; case 3:printf("enter the item before which the element to be inserted"); scanf("%d",&it); printf("enter the value tobe inserted:"); scanf("%d",&po); head=insertbefore(it,po); break; case 4:display(); break; case 5:break; default:printf("invalid choice"); } }while(ch!=5); }
the_stack_data/613317.c
/* PR debug/48928 */ /* { dg-do compile } */ /* { dg-options "-g -O2" } */ _Decimal32 foo (_Decimal32 x) { _Decimal32 y = (x + x) / (9.DF * x); return y; }
the_stack_data/34512290.c
int main() { int n; int c = 0; assume (n > 0); while (unknown()) { if(c == n) { c = 1; } else { c = c + 1; } } //post-condition if(c == n) { assert( c >= 0); //assert( c <= n); } }
the_stack_data/232955670.c
#include <stdlib.h> #include <stdio.h> #include <time.h> #define lower_limit 0 #define upper_limit 100 int main(){ int number, guess; srand( time( 0 ) ); number = lower_limit + rand() % (upper_limit - lower_limit + 1); printf( "Guess the number between %d and %d: ", lower_limit, upper_limit ); while( scanf( "%d", &guess ) == 1 ){ if( number == guess ){ printf( "You guessed correctly!\n" ); break; } printf( "Your guess was too %s.\nTry again: ", number < guess ? "high" : "low" ); } return 0; }
the_stack_data/90762480.c
#include <stdio.h> int main() { int n, k, i, pno=0; scanf("%d %d", &n, &k); k=240-k; for(i=1; pno+(i*5)<=k && i<=n; i++) { pno+=(i*5); } printf("%d\n", --i); return 0; }
the_stack_data/92326274.c
// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep getelementptr char *test(char* C) { return C-1; // Should turn into a GEP } int *test2(int* I) { return I-1; }
the_stack_data/126701900.c
#include <stdio.h> void strcat(char *s, char *t); unsigned int strlen(char *s); int main(void) { char s[100] = "This is the string"; char t[100] = ", yes!"; strcat(s, t); printf("%s\n", s); return 0; } void strcat(char *s, char *t) { int end; end = strlen(s); while(*t != '\0') { *(s++ + end) = *t++; } } unsigned int strlen(char *s) { unsigned int n = 0; while(*s++ != '\0') ++n; return n; }
the_stack_data/104826964.c
#include <numa.h> #include <numaif.h> int main(void) { numa_available(); return 0; }
the_stack_data/830142.c
#include <sys/ioctl.h> #include <sys/stat.h> #include <sys/types.h> #include <linux/fs.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <time.h> #include <errno.h> #include <stdarg.h> #include <string.h> //Buff size must be multiple of 4 #define BUFF_SIZE 1024*1024*5 static void die (const char * format, ...) { va_list vargs; va_start (vargs, format); vfprintf (stderr, format, vargs); if (errno != 0) //Is there no constant for ERROR SUCCESS? fprintf (stderr, ": %s",strerror(errno)); fprintf (stderr, "\n"); exit(1); } int main(int argc, char **argv) { time_t t,start,end; int fd,i; long long length; char buffer[BUFF_SIZE]; unsigned int seed = (unsigned) time(&t); char *device; int die_at_error = 1; if (argc == 3 && !strcmp(argv[1],"--print-range")) { die_at_error = 0; device = argv[2]; } else if (argc == 2) { device = argv[1]; } else { die("Usage: ./%s [--print-range] device",argv[0]); } fd=open(device,O_WRONLY); if (fd < 0) die("Failed to open device!"); if(ioctl(fd,BLKGETSIZE64,&length)==-1) die("Failed to get device size"); printf("Device size: %lld\n",length); //length=1024*1024*26; srand(seed); long long written = 0; time(&start); long long percent = length/100; while (written < length) { if (written > percent) { printf("."); fflush(stdout); percent = percent+length/100; } //printf("written: %lld\n",written); for (i = 0; i < BUFF_SIZE; i+=4) { *((unsigned int*) &buffer[i]) = rand(); } int l = write(fd,buffer,BUFF_SIZE); written += l; if (l < 0) die("\nFailed to write to device"); if (l != BUFF_SIZE && written != length) die("\nFailed to write full int"); } printf("\nManaged to write all data!\n"); close(fd); sync(); time(&end); double seconds = difftime(end,start); printf("Wrote %lld bytes in %d seconds (%.2f MB/s)\n",written,(int)seconds,((double)written/(1024.0*1024.0))/(seconds)); fd = open(device,O_RDONLY); if (fd < 0) die("Failed to open device"); srand(seed); time(&start); long long readbytes = 0; long long failstart = -1; long long failend = -1; percent = length/100; while (readbytes < length) { if (readbytes > percent) { printf(failstart==-1?".":","); fflush(stdout); percent = percent+length/100; } //printf("read: %lld\n",readbytes); int l = read(fd,buffer,BUFF_SIZE); readbytes += l; if (l < 0) die("\nFailed to read from device"); if (l != BUFF_SIZE && readbytes != length) die("\nFailed to read full int"); for (i = 0; i < BUFF_SIZE; i+=4) { if (*((unsigned int*) &buffer[i]) != rand()) { if (failstart == -1) failstart = readbytes-l+i; if (die_at_error) die("\nFailed to validate byte %lld",readbytes-l+i); } else if (failstart != -1) { failend = readbytes-l+i; printf("\nFail at range: %lld-%lld\n",failstart,failend); failstart = -1; } } } printf("\nManaged to read all data correctly\n"); close(fd); time(&end); seconds = difftime(end,start); printf("Read %lld bytes in %d seconds (%.2f MB/s)\n",readbytes,(int)seconds,((double)readbytes/(1024.0*1024.0))/(seconds)); return 0; }
the_stack_data/817604.c
#include <stdio.h> int sum_of_even_fibonacci(int limit) { int n1 = 0; int n2 = 1; int ret = 0; while (n2 <= limit) { int tmp = n1 + n2; // Add the current fibonacci number if it is even. if (n2 % 2 == 0) ret += n2; // Calculate next fibonacci number. n1 = n2; n2 = tmp; } return ret; } int main() { printf("Sum of even fibonacci numbers that do not exceed 4000000 is %d\n", sum_of_even_fibonacci(4000000)); }
the_stack_data/73575336.c
/* BORDER_MAP.C Map Source File. Info: Section : Bank : 0 Map size : 20 x 18 Tile set : Z:\home\jake\Source\gameboy-snake\tools\gbtd\brick.gbr Plane count : 1 plane (8 bits) Plane order : Tiles are continues Tile offset : 0 Split data : No This file was generated by GBMB v1.8 */ #define border_mapWidth 20 #define border_mapHeight 18 #define border_mapBank 0 unsigned char border_map[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; /* End of BORDER_MAP.C */
the_stack_data/124216.c
#include <stdio.h> int main(int argc, char const *argv[]) { int n, *k; n = 25; k = &n; printf("-> n = %d\n", n); printf("-> k = %x\n", k); printf("-> *k = %d\n", *k); return 0; }
the_stack_data/162642216.c
#include <stdio.h> #include <stdlib.h> int main(){ char origem[51]; char destino[51]; FILE *fin, *fout; char ch; printf("Digite o nome do arquivo de origem: \n"); scanf("%[^\n]s", origem); while(getchar() != '\n'); printf("Digite o nome do arquivo de destino: \n"); scanf("%[^\n]s", destino); //Pegar o arquivo fin = fopen(origem, "r"); if(fin==NULL){ printf("Impossível abrir o arquivo %s\n", origem); exit(1); } fout = fopen(destino, "w"); if(fout==NULL){ printf("Impossível criar o arquivo de destino %s \n", destino); exit(2); } while ((ch=fgetc(fin))!=EOF){ fputc(ch, fout); } fclose(fin); fclose(fout); return 0; }
the_stack_data/103550.c
// C11 variable length array #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv){ int j = 5; if (argc == 2) j = atoi(argv[1]); for (int i = 1; i <= j; i++){ int a[i]; // re-allocated each iteration printf("%zu ", sizeof a / sizeof *a); } return 0; }
the_stack_data/90763708.c
#include <stdio.h> int main(){ int i, j, number; scanf("%d", &number); printf("\n"); for(i = 1; i <= number; i++){ for(j = 0; j < i; j++){ printf("*"); } printf("\n"); } return 0; }
the_stack_data/302998.c
void compute_ref (double **a, double **b, double **c, double **d, int N, int num_threads) { for (int i = 0; i < N; i++){ for(int j = 0; j < N; j++) { a[i][j] = 2 * c[i][j]; } } for (int i = 0; i < N; i++) { for (int j = 0 ; j < N; j++) { d[i][j] = a[i][j] * b[i][j] ; } } for (int j = 0; j < N-1; j++) { for (int i = 0; i < N; i++) { d[i][j] = d[i][j+1] + c[i][j]; } } }
the_stack_data/37636760.c
/**/ #include <stdio.h> int main(){ double A, B, C, D, studentscore; char lettergrade; printf("Enter thresholds for A, B, C, D \nin that order, decreasing percentages > Thank you. "); scanf("%lf %lf %lf %lf", &A, &B, &C, &D); printf("Now enter student score (perecnt) >"); scanf("%lf", &studentscore); if(studentscore>=A) lettergrade='A'; else if(studentscore>=B) lettergrade='B'; else if(studentscore>=C) lettergrade='C'; else if(studentscore>=D) lettergrade='D'; else lettergrade='F'; printf("Student has an %c grade\n",lettergrade); return(0); }
the_stack_data/179829878.c
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ typedef struct TYPE_4__ TYPE_2__ ; typedef struct TYPE_3__ TYPE_1__ ; /* Type definitions */ typedef int u8 ; struct TYPE_4__ {unsigned int len; int* msg; } ; struct TYPE_3__ {int* msg; int /*<<< orphan*/ len; } ; struct cec_pin {int state; int tx_nacked; int tx_bit; int tx_extra_bytes; int tx_post_eom; int rx_bit; TYPE_2__ tx_msg; int /*<<< orphan*/ tx_ignore_nack_until_eom; int /*<<< orphan*/ ts; TYPE_1__ rx_msg; int /*<<< orphan*/ kthread_waitq; void* work_tx_status; void* work_tx_ts; int /*<<< orphan*/ tx_generated_poll; int /*<<< orphan*/ tx_low_drive_cnt; } ; typedef void* ktime_t ; /* Variables and functions */ #define ACK_BIT 152 int CEC_ST_RX_DATA_POST_SAMPLE ; #define CEC_ST_TX_DATA_BIT_0_HIGH 151 #define CEC_ST_TX_DATA_BIT_0_HIGH_LONG 150 #define CEC_ST_TX_DATA_BIT_0_HIGH_SHORT 149 #define CEC_ST_TX_DATA_BIT_0_LOW 148 #define CEC_ST_TX_DATA_BIT_1_HIGH 147 #define CEC_ST_TX_DATA_BIT_1_HIGH_LONG 146 #define CEC_ST_TX_DATA_BIT_1_HIGH_POST_SAMPLE 145 #define CEC_ST_TX_DATA_BIT_1_HIGH_POST_SAMPLE_LONG 144 #define CEC_ST_TX_DATA_BIT_1_HIGH_POST_SAMPLE_SHORT 143 #define CEC_ST_TX_DATA_BIT_1_HIGH_PRE_SAMPLE 142 #define CEC_ST_TX_DATA_BIT_1_HIGH_SHORT 141 #define CEC_ST_TX_DATA_BIT_1_LOW 140 #define CEC_ST_TX_DATA_BIT_HIGH_CUSTOM 139 #define CEC_ST_TX_DATA_BIT_LOW_CUSTOM 138 int CEC_ST_TX_LOW_DRIVE ; #define CEC_ST_TX_PULSE_HIGH_CUSTOM 137 #define CEC_ST_TX_PULSE_LOW_CUSTOM 136 #define CEC_ST_TX_START_BIT_HIGH 135 #define CEC_ST_TX_START_BIT_HIGH_CUSTOM 134 #define CEC_ST_TX_START_BIT_HIGH_LONG 133 #define CEC_ST_TX_START_BIT_HIGH_SHORT 132 #define CEC_ST_TX_START_BIT_LOW 131 #define CEC_ST_TX_START_BIT_LOW_CUSTOM 130 #define CEC_ST_TX_WAIT_FOR_HIGH 129 int /*<<< orphan*/ CEC_TIM_DATA_BIT_SAMPLE ; void* CEC_TX_STATUS_ARB_LOST ; void* CEC_TX_STATUS_LOW_DRIVE ; void* CEC_TX_STATUS_NACK ; void* CEC_TX_STATUS_OK ; #define EOM_BIT 128 int /*<<< orphan*/ cec_msg_is_broadcast (TYPE_2__*) ; int /*<<< orphan*/ cec_pin_high (struct cec_pin*) ; int /*<<< orphan*/ cec_pin_low (struct cec_pin*) ; int cec_pin_read (struct cec_pin*) ; int /*<<< orphan*/ cec_pin_to_idle (struct cec_pin*) ; int /*<<< orphan*/ ktime_sub_us (void*,int /*<<< orphan*/ ) ; int /*<<< orphan*/ memset (int*,int /*<<< orphan*/ ,int) ; int /*<<< orphan*/ tx_custom_bit (struct cec_pin*) ; int /*<<< orphan*/ tx_early_eom (struct cec_pin*) ; int /*<<< orphan*/ tx_last_bit (struct cec_pin*) ; int /*<<< orphan*/ tx_long_bit (struct cec_pin*) ; int /*<<< orphan*/ tx_long_start (struct cec_pin*) ; int /*<<< orphan*/ tx_low_drive (struct cec_pin*) ; int /*<<< orphan*/ tx_no_eom (struct cec_pin*) ; int /*<<< orphan*/ tx_short_bit (struct cec_pin*) ; int /*<<< orphan*/ tx_short_start (struct cec_pin*) ; int /*<<< orphan*/ wake_up_interruptible (int /*<<< orphan*/ *) ; __attribute__((used)) static void cec_pin_tx_states(struct cec_pin *pin, ktime_t ts) { bool v; bool is_ack_bit, ack; switch (pin->state) { case CEC_ST_TX_WAIT_FOR_HIGH: if (cec_pin_read(pin)) cec_pin_to_idle(pin); break; case CEC_ST_TX_START_BIT_LOW: if (tx_short_start(pin)) { /* * Error Injection: send an invalid (too short) * start pulse. */ pin->state = CEC_ST_TX_START_BIT_HIGH_SHORT; } else if (tx_long_start(pin)) { /* * Error Injection: send an invalid (too long) * start pulse. */ pin->state = CEC_ST_TX_START_BIT_HIGH_LONG; } else { pin->state = CEC_ST_TX_START_BIT_HIGH; } /* Generate start bit */ cec_pin_high(pin); break; case CEC_ST_TX_START_BIT_LOW_CUSTOM: pin->state = CEC_ST_TX_START_BIT_HIGH_CUSTOM; /* Generate start bit */ cec_pin_high(pin); break; case CEC_ST_TX_DATA_BIT_1_HIGH_POST_SAMPLE: case CEC_ST_TX_DATA_BIT_1_HIGH_POST_SAMPLE_SHORT: case CEC_ST_TX_DATA_BIT_1_HIGH_POST_SAMPLE_LONG: if (pin->tx_nacked) { cec_pin_to_idle(pin); pin->tx_msg.len = 0; if (pin->tx_generated_poll) break; pin->work_tx_ts = ts; pin->work_tx_status = CEC_TX_STATUS_NACK; wake_up_interruptible(&pin->kthread_waitq); break; } /* fall through */ case CEC_ST_TX_DATA_BIT_0_HIGH: case CEC_ST_TX_DATA_BIT_0_HIGH_SHORT: case CEC_ST_TX_DATA_BIT_0_HIGH_LONG: case CEC_ST_TX_DATA_BIT_1_HIGH: case CEC_ST_TX_DATA_BIT_1_HIGH_SHORT: case CEC_ST_TX_DATA_BIT_1_HIGH_LONG: /* * If the read value is 1, then all is OK, otherwise we have a * low drive condition. * * Special case: when we generate a poll message due to an * Arbitration Lost error injection, then ignore this since * the pin can actually be low in that case. */ if (!cec_pin_read(pin) && !pin->tx_generated_poll) { /* * It's 0, so someone detected an error and pulled the * line low for 1.5 times the nominal bit period. */ pin->tx_msg.len = 0; pin->state = CEC_ST_TX_WAIT_FOR_HIGH; pin->work_tx_ts = ts; pin->work_tx_status = CEC_TX_STATUS_LOW_DRIVE; pin->tx_low_drive_cnt++; wake_up_interruptible(&pin->kthread_waitq); break; } /* fall through */ case CEC_ST_TX_DATA_BIT_HIGH_CUSTOM: if (tx_last_bit(pin)) { /* Error Injection: just stop sending after this bit */ cec_pin_to_idle(pin); pin->tx_msg.len = 0; if (pin->tx_generated_poll) break; pin->work_tx_ts = ts; pin->work_tx_status = CEC_TX_STATUS_OK; wake_up_interruptible(&pin->kthread_waitq); break; } pin->tx_bit++; /* fall through */ case CEC_ST_TX_START_BIT_HIGH: case CEC_ST_TX_START_BIT_HIGH_SHORT: case CEC_ST_TX_START_BIT_HIGH_LONG: case CEC_ST_TX_START_BIT_HIGH_CUSTOM: if (tx_low_drive(pin)) { /* Error injection: go to low drive */ cec_pin_low(pin); pin->state = CEC_ST_TX_LOW_DRIVE; pin->tx_msg.len = 0; if (pin->tx_generated_poll) break; pin->work_tx_ts = ts; pin->work_tx_status = CEC_TX_STATUS_LOW_DRIVE; pin->tx_low_drive_cnt++; wake_up_interruptible(&pin->kthread_waitq); break; } if (pin->tx_bit / 10 >= pin->tx_msg.len + pin->tx_extra_bytes) { cec_pin_to_idle(pin); pin->tx_msg.len = 0; if (pin->tx_generated_poll) break; pin->work_tx_ts = ts; pin->work_tx_status = CEC_TX_STATUS_OK; wake_up_interruptible(&pin->kthread_waitq); break; } switch (pin->tx_bit % 10) { default: { /* * In the CEC_ERROR_INJ_TX_ADD_BYTES case we transmit * extra bytes, so pin->tx_bit / 10 can become >= 16. * Generate bit values for those extra bytes instead * of reading them from the transmit buffer. */ unsigned int idx = (pin->tx_bit / 10); u8 val = idx; if (idx < pin->tx_msg.len) val = pin->tx_msg.msg[idx]; v = val & (1 << (7 - (pin->tx_bit % 10))); pin->state = v ? CEC_ST_TX_DATA_BIT_1_LOW : CEC_ST_TX_DATA_BIT_0_LOW; break; } case EOM_BIT: { unsigned int tot_len = pin->tx_msg.len + pin->tx_extra_bytes; unsigned int tx_byte_idx = pin->tx_bit / 10; v = !pin->tx_post_eom && tx_byte_idx == tot_len - 1; if (tot_len > 1 && tx_byte_idx == tot_len - 2 && tx_early_eom(pin)) { /* Error injection: set EOM one byte early */ v = true; pin->tx_post_eom = true; } else if (v && tx_no_eom(pin)) { /* Error injection: no EOM */ v = false; } pin->state = v ? CEC_ST_TX_DATA_BIT_1_LOW : CEC_ST_TX_DATA_BIT_0_LOW; break; } case ACK_BIT: pin->state = CEC_ST_TX_DATA_BIT_1_LOW; break; } if (tx_custom_bit(pin)) pin->state = CEC_ST_TX_DATA_BIT_LOW_CUSTOM; cec_pin_low(pin); break; case CEC_ST_TX_DATA_BIT_0_LOW: case CEC_ST_TX_DATA_BIT_1_LOW: v = pin->state == CEC_ST_TX_DATA_BIT_1_LOW; is_ack_bit = pin->tx_bit % 10 == ACK_BIT; if (v && (pin->tx_bit < 4 || is_ack_bit)) { pin->state = CEC_ST_TX_DATA_BIT_1_HIGH_PRE_SAMPLE; } else if (!is_ack_bit && tx_short_bit(pin)) { /* Error Injection: send an invalid (too short) bit */ pin->state = v ? CEC_ST_TX_DATA_BIT_1_HIGH_SHORT : CEC_ST_TX_DATA_BIT_0_HIGH_SHORT; } else if (!is_ack_bit && tx_long_bit(pin)) { /* Error Injection: send an invalid (too long) bit */ pin->state = v ? CEC_ST_TX_DATA_BIT_1_HIGH_LONG : CEC_ST_TX_DATA_BIT_0_HIGH_LONG; } else { pin->state = v ? CEC_ST_TX_DATA_BIT_1_HIGH : CEC_ST_TX_DATA_BIT_0_HIGH; } cec_pin_high(pin); break; case CEC_ST_TX_DATA_BIT_LOW_CUSTOM: pin->state = CEC_ST_TX_DATA_BIT_HIGH_CUSTOM; cec_pin_high(pin); break; case CEC_ST_TX_DATA_BIT_1_HIGH_PRE_SAMPLE: /* Read the CEC value at the sample time */ v = cec_pin_read(pin); is_ack_bit = pin->tx_bit % 10 == ACK_BIT; /* * If v == 0 and we're within the first 4 bits * of the initiator, then someone else started * transmitting and we lost the arbitration * (i.e. the logical address of the other * transmitter has more leading 0 bits in the * initiator). */ if (!v && !is_ack_bit && !pin->tx_generated_poll) { pin->tx_msg.len = 0; pin->work_tx_ts = ts; pin->work_tx_status = CEC_TX_STATUS_ARB_LOST; wake_up_interruptible(&pin->kthread_waitq); pin->rx_bit = pin->tx_bit; pin->tx_bit = 0; memset(pin->rx_msg.msg, 0, sizeof(pin->rx_msg.msg)); pin->rx_msg.msg[0] = pin->tx_msg.msg[0]; pin->rx_msg.msg[0] &= (0xff << (8 - pin->rx_bit)); pin->rx_msg.len = 0; pin->ts = ktime_sub_us(ts, CEC_TIM_DATA_BIT_SAMPLE); pin->state = CEC_ST_RX_DATA_POST_SAMPLE; pin->rx_bit++; break; } pin->state = CEC_ST_TX_DATA_BIT_1_HIGH_POST_SAMPLE; if (!is_ack_bit && tx_short_bit(pin)) { /* Error Injection: send an invalid (too short) bit */ pin->state = CEC_ST_TX_DATA_BIT_1_HIGH_POST_SAMPLE_SHORT; } else if (!is_ack_bit && tx_long_bit(pin)) { /* Error Injection: send an invalid (too long) bit */ pin->state = CEC_ST_TX_DATA_BIT_1_HIGH_POST_SAMPLE_LONG; } if (!is_ack_bit) break; /* Was the message ACKed? */ ack = cec_msg_is_broadcast(&pin->tx_msg) ? v : !v; if (!ack && (!pin->tx_ignore_nack_until_eom || pin->tx_bit / 10 == pin->tx_msg.len - 1) && !pin->tx_post_eom) { /* * Note: the CEC spec is ambiguous regarding * what action to take when a NACK appears * before the last byte of the payload was * transmitted: either stop transmitting * immediately, or wait until the last byte * was transmitted. * * Most CEC implementations appear to stop * immediately, and that's what we do here * as well. */ pin->tx_nacked = true; } break; case CEC_ST_TX_PULSE_LOW_CUSTOM: cec_pin_high(pin); pin->state = CEC_ST_TX_PULSE_HIGH_CUSTOM; break; case CEC_ST_TX_PULSE_HIGH_CUSTOM: cec_pin_to_idle(pin); break; default: break; } }
the_stack_data/15762919.c
extern int puts(const char *s); int main(void) { puts("Hello, World!"); return 0; }
the_stack_data/182952205.c
/******************************************************************************* (c) 2019 Microchip Technology Inc. and its subsidiaries. Subject to your compliance with these terms, you may use Microchip software and any derivatives exclusively with Microchip products. It is your responsibility to comply with third party license terms applicable to your use of third party software (including open source software) that may accompany Microchip software. THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. *******************************************************************************/ /* #include <stdint.h> #include <stdbool.h> #include "oledC_shapeHandler.h" #include "oledC_shapes.h" #define MAX_NUMBER_OF_SHAPES 32 static void dummyshape(shape_t *shape) { } static shape_t allParsedShapes[MAX_NUMBER_OF_SHAPES]; void initShapesMem(void) { uint8_t i; for(i = 0; i < MAX_NUMBER_OF_SHAPES; i++) { allParsedShapes[i].active = false; allParsedShapes[i].draw = dummyshape; } } void oledC_removeShape(uint8_t drawIndex) { uint8_t i; for(i = drawIndex; i < (MAX_NUMBER_OF_SHAPES - 1); i++) { allParsedShapes[i] = allParsedShapes[i+1]; } allParsedShapes[MAX_NUMBER_OF_SHAPES-1].active = false; } shape_t* oledC_getShape(uint8_t index) { index = index > MAX_NUMBER_OF_SHAPES ? MAX_NUMBER_OF_SHAPES : index; return &allParsedShapes[index]; } void oledC_addShape(uint8_t drawIndex, enum OLEDC_SHAPE shape_type, shape_params_t *params) { uint8_t i; shape_t *newShape; drawIndex = drawIndex >= MAX_NUMBER_OF_SHAPES ? (MAX_NUMBER_OF_SHAPES-1) : drawIndex; for(i = (MAX_NUMBER_OF_SHAPES-1); i > drawIndex && i > 0; i--) { allParsedShapes[i] = allParsedShapes[i-1]; } newShape = &allParsedShapes[drawIndex]; oledC_createShape(shape_type, params, newShape); } void oledC_redrawIndex(uint8_t indShape) { allParsedShapes[indShape].draw(&allParsedShapes[indShape]); } void oledC_redrawTo(uint8_t endInd) { oledC_redrawSome(0,endInd); } void oledC_redrawFrom(uint8_t startInd) { oledC_redrawSome(startInd, MAX_NUMBER_OF_SHAPES); } void oledC_redrawSome(uint8_t startInd, uint8_t endInd) { uint8_t i; endInd = endInd > MAX_NUMBER_OF_SHAPES ? MAX_NUMBER_OF_SHAPES : endInd; for(i = startInd; i < endInd; i++) { if(allParsedShapes[i].active) { allParsedShapes[i].draw(&allParsedShapes[i]); } } } void oledC_eraseShape(uint8_t indShape,uint16_t eraseColor) { shape_t* ourShape = oledC_getShape(indShape); uint16_t saveColor = ourShape->params.point.color; ourShape->params.point.color = eraseColor; ourShape->draw(ourShape); ourShape->params.point.color = saveColor; } void oledC_eraseAll(uint16_t eraseColor) { uint8_t i; for(i = 0; i < MAX_NUMBER_OF_SHAPES; i++) { if(allParsedShapes[i].active) { oledC_eraseShape(i,eraseColor); } } } void oledC_redrawAll(void) { oledC_redrawSome(0,MAX_NUMBER_OF_SHAPES); } */
the_stack_data/143842.c
#include<stdio.h> #include<math.h> #include<stdlib.h> void main() { int a,b,c,d=1; while(d) { system("clear"); printf("\nENTER 2 NUMBERS\n"); scanf("%d%d",&a,&b); printf("\nENTER 1 FOR ADDITION\n2 FOR SUBSTRACTION\n3 FOR MULTIPLICATION\n4 FOR DIVION\n5 FOR EXPONENT\n"); scanf("%d",&c); switch(c) { case 1: printf("%d+%d=%d",a,b,a+b); break; case 2: printf("%d-%d=%d",a,b,a-b); break; case 3: printf("%d*%d=%d",a,b,a*b); break; case 4: printf("%d/%d=%f",a,b,(float)a/b); break; case 5: printf("%d^%d=%f",a,b,(pow(a,b))); break; default: printf("\nTHIS CALCULATOR IS NOT ENOUGH FOR YOUR NEED\n"); } printf("\nDO YOU WANT TO CONTINUE \n IF YES ENTER 1\n IF NO ENTER 0\n"); scanf("%d",&d); } }
the_stack_data/92329262.c
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { /* 10. Faca um programa que receba uma palavra e a imprima de tras-para-frente. */ char frase[30], aux; int i, tam; printf("Digite uma frase: "); fgets(frase, 30, stdin); frase[strlen(frase) - 1] = '\0'; tam = strlen(frase); for(i=0; i<tam/2; i++) { aux = frase[i]; frase[i] = frase[tam - 1 - i]; frase[tam - 1 - i] = aux; } printf("Frase ao contrario: %s\n", frase); system("pause"); return 0; }
the_stack_data/181393335.c
#include <stdio.h> #include<math.h> int main(){ float numero, quadrado, cubo, raiz2, raiz3; printf("Digite o numero:\n"); scanf("%f%*c",&numero); quadrado=(numero*numero); cubo=(numero*numero*numero); raiz2=sqrt(numero); raiz3=cbrt(numero); printf("numero ao quadrado:%2.f\n",quadrado); printf("numero ao cubo:%2.f\n",cubo); printf("raiz quadrada do numero:%2.f\n",raiz2); printf("raiz cubica do numero:%2.f/n",raiz3); return 0; }
the_stack_data/22439.c
#include <stdio.h> int main(){ double a, b, c, media; scanf("%lf", &a); scanf("%lf", &b); scanf("%lf", &c); media = (a*2 + b*3 + c*5)/10; printf("MEDIA = %.1lf\n", media); return 0; }
the_stack_data/818612.c
/** ****************************************************************************** * @file stm32l0xx_ll_i2c.c * @author MCD Application Team * @brief I2C LL module driver. ****************************************************************************** * @attention * * <h2><center>&copy; Copyright (c) 2016 STMicroelectronics. * All rights reserved.</center></h2> * * This software component is licensed by ST under BSD 3-Clause license, * the "License"; You may not use this file except in compliance with the * License. You may obtain a copy of the License at: * opensource.org/licenses/BSD-3-Clause * ****************************************************************************** */ #if defined(USE_FULL_LL_DRIVER) /* Includes ------------------------------------------------------------------*/ #include "stm32l0xx_ll_i2c.h" #include "stm32l0xx_ll_bus.h" #ifdef USE_FULL_ASSERT #include "stm32_assert.h" #else #define assert_param(expr) ((void)0U) #endif /** @addtogroup STM32L0xx_LL_Driver * @{ */ #if defined (I2C1) || defined (I2C2) || defined (I2C3) /** @defgroup I2C_LL I2C * @{ */ /* Private types -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private constants ---------------------------------------------------------*/ /* Private macros ------------------------------------------------------------*/ /** @addtogroup I2C_LL_Private_Macros * @{ */ #define IS_LL_I2C_PERIPHERAL_MODE(__VALUE__) (((__VALUE__) == LL_I2C_MODE_I2C) || \ ((__VALUE__) == LL_I2C_MODE_SMBUS_HOST) || \ ((__VALUE__) == LL_I2C_MODE_SMBUS_DEVICE) || \ ((__VALUE__) == LL_I2C_MODE_SMBUS_DEVICE_ARP)) #define IS_LL_I2C_ANALOG_FILTER(__VALUE__) (((__VALUE__) == LL_I2C_ANALOGFILTER_ENABLE) || \ ((__VALUE__) == LL_I2C_ANALOGFILTER_DISABLE)) #define IS_LL_I2C_DIGITAL_FILTER(__VALUE__) ((__VALUE__) <= 0x0000000FU) #define IS_LL_I2C_OWN_ADDRESS1(__VALUE__) ((__VALUE__) <= 0x000003FFU) #define IS_LL_I2C_TYPE_ACKNOWLEDGE(__VALUE__) (((__VALUE__) == LL_I2C_ACK) || \ ((__VALUE__) == LL_I2C_NACK)) #define IS_LL_I2C_OWN_ADDRSIZE(__VALUE__) (((__VALUE__) == LL_I2C_OWNADDRESS1_7BIT) || \ ((__VALUE__) == LL_I2C_OWNADDRESS1_10BIT)) /** * @} */ /* Private function prototypes -----------------------------------------------*/ /* Exported functions --------------------------------------------------------*/ /** @addtogroup I2C_LL_Exported_Functions * @{ */ /** @addtogroup I2C_LL_EF_Init * @{ */ /** * @brief De-initialize the I2C registers to their default reset values. * @param I2Cx I2C Instance. * @retval An ErrorStatus enumeration value: * - SUCCESS: I2C registers are de-initialized * - ERROR: I2C registers are not de-initialized */ ErrorStatus LL_I2C_DeInit(I2C_TypeDef *I2Cx) { ErrorStatus status = SUCCESS; /* Check the I2C Instance I2Cx */ assert_param(IS_I2C_ALL_INSTANCE(I2Cx)); if (I2Cx == I2C1) { /* Force reset of I2C clock */ LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_I2C1); /* Release reset of I2C clock */ LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_I2C1); } #if defined(I2C2) else if (I2Cx == I2C2) { /* Force reset of I2C clock */ LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_I2C2); /* Release reset of I2C clock */ LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_I2C2); } #endif #if defined(I2C3) else if (I2Cx == I2C3) { /* Force reset of I2C clock */ LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_I2C3); /* Release reset of I2C clock */ LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_I2C3); } #endif else { status = ERROR; } return status; } /** * @brief Initialize the I2C registers according to the specified parameters in I2C_InitStruct. * @param I2Cx I2C Instance. * @param I2C_InitStruct pointer to a @ref LL_I2C_InitTypeDef structure. * @retval An ErrorStatus enumeration value: * - SUCCESS: I2C registers are initialized * - ERROR: Not applicable */ ErrorStatus LL_I2C_Init(I2C_TypeDef *I2Cx, LL_I2C_InitTypeDef *I2C_InitStruct) { /* Check the I2C Instance I2Cx */ assert_param(IS_I2C_ALL_INSTANCE(I2Cx)); /* Check the I2C parameters from I2C_InitStruct */ assert_param(IS_LL_I2C_PERIPHERAL_MODE(I2C_InitStruct->PeripheralMode)); assert_param(IS_LL_I2C_ANALOG_FILTER(I2C_InitStruct->AnalogFilter)); assert_param(IS_LL_I2C_DIGITAL_FILTER(I2C_InitStruct->DigitalFilter)); assert_param(IS_LL_I2C_OWN_ADDRESS1(I2C_InitStruct->OwnAddress1)); assert_param(IS_LL_I2C_TYPE_ACKNOWLEDGE(I2C_InitStruct->TypeAcknowledge)); assert_param(IS_LL_I2C_OWN_ADDRSIZE(I2C_InitStruct->OwnAddrSize)); /* Disable the selected I2Cx Peripheral */ LL_I2C_Disable(I2Cx); /*---------------------------- I2Cx CR1 Configuration ------------------------ * Configure the analog and digital noise filters with parameters : * - AnalogFilter: I2C_CR1_ANFOFF bit * - DigitalFilter: I2C_CR1_DNF[3:0] bits */ LL_I2C_ConfigFilters(I2Cx, I2C_InitStruct->AnalogFilter, I2C_InitStruct->DigitalFilter); /*---------------------------- I2Cx TIMINGR Configuration -------------------- * Configure the SDA setup, hold time and the SCL high, low period with parameter : * - Timing: I2C_TIMINGR_PRESC[3:0], I2C_TIMINGR_SCLDEL[3:0], I2C_TIMINGR_SDADEL[3:0], * I2C_TIMINGR_SCLH[7:0] and I2C_TIMINGR_SCLL[7:0] bits */ LL_I2C_SetTiming(I2Cx, I2C_InitStruct->Timing); /* Enable the selected I2Cx Peripheral */ LL_I2C_Enable(I2Cx); /*---------------------------- I2Cx OAR1 Configuration ----------------------- * Disable, Configure and Enable I2Cx device own address 1 with parameters : * - OwnAddress1: I2C_OAR1_OA1[9:0] bits * - OwnAddrSize: I2C_OAR1_OA1MODE bit */ LL_I2C_DisableOwnAddress1(I2Cx); LL_I2C_SetOwnAddress1(I2Cx, I2C_InitStruct->OwnAddress1, I2C_InitStruct->OwnAddrSize); /* OwnAdress1 == 0 is reserved for General Call address */ if (I2C_InitStruct->OwnAddress1 != 0U) { LL_I2C_EnableOwnAddress1(I2Cx); } /*---------------------------- I2Cx MODE Configuration ----------------------- * Configure I2Cx peripheral mode with parameter : * - PeripheralMode: I2C_CR1_SMBDEN and I2C_CR1_SMBHEN bits */ LL_I2C_SetMode(I2Cx, I2C_InitStruct->PeripheralMode); /*---------------------------- I2Cx CR2 Configuration ------------------------ * Configure the ACKnowledge or Non ACKnowledge condition * after the address receive match code or next received byte with parameter : * - TypeAcknowledge: I2C_CR2_NACK bit */ LL_I2C_AcknowledgeNextData(I2Cx, I2C_InitStruct->TypeAcknowledge); return SUCCESS; } /** * @brief Set each @ref LL_I2C_InitTypeDef field to default value. * @param I2C_InitStruct Pointer to a @ref LL_I2C_InitTypeDef structure. * @retval None */ void LL_I2C_StructInit(LL_I2C_InitTypeDef *I2C_InitStruct) { /* Set I2C_InitStruct fields to default values */ I2C_InitStruct->PeripheralMode = LL_I2C_MODE_I2C; I2C_InitStruct->Timing = 0U; I2C_InitStruct->AnalogFilter = LL_I2C_ANALOGFILTER_ENABLE; I2C_InitStruct->DigitalFilter = 0U; I2C_InitStruct->OwnAddress1 = 0U; I2C_InitStruct->TypeAcknowledge = LL_I2C_NACK; I2C_InitStruct->OwnAddrSize = LL_I2C_OWNADDRESS1_7BIT; } /** * @} */ /** * @} */ /** * @} */ #endif /* I2C1 || I2C2 || I2C3 */ /** * @} */ #endif /* USE_FULL_LL_DRIVER */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
the_stack_data/72871.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <pwd.h> #include <grp.h> #include <ctype.h> #include <dirent.h> #include <sys/stat.h> #include <linux/limits.h> uid_t userIdFromName(const char *name); int getStatus(const char *pid, uid_t *Uid, char *Name, pid_t *PPid, pid_t *Pid); int stringIsDigit(const char *d_name); void dfs(int index, int depth, int *pids[], char *pidsname[], int count[]); int main (int argc, char* argv[]) { int uid = -1; DIR* dir = NULL; struct dirent* ptr = NULL; uid_t statusUID = 0; char cmd_name[1024] = {'\0'}; pid_t PPid = 0; pid_t pid = 0; int *pids[65536] = {NULL}; char *pidsname[65536] = {'\0'}; int count[65536] = {0}; if (argc != 2) { printf("[Usage] %s USER_NAME\n", argv[0]); return 0; } /*get uid*/ uid = userIdFromName(argv[1]); if (uid == -1) { printf("[Usage] %s USER_NAME\n", argv[0]); return 1; } printf("user name = %s, uid = %d\n", argv[1], uid); /*open and read dir*/ dir = opendir("/proc"); while ((ptr = readdir(dir)) != NULL) { /*check if dir and digit*/ if (ptr->d_type != DT_DIR || !stringIsDigit(ptr->d_name)) { continue; } if (!getStatus(ptr->d_name, &statusUID, cmd_name, &PPid, &pid)) { continue; } /*check uid is the user*/ if (statusUID == uid) { // printf("pid = %d, ppid = %d\n", pid, PPid); pidsname[pid] = strdup(cmd_name); pids[PPid] = (int*) realloc(pids[PPid], (count[PPid]+1)* sizeof(int)); pids[PPid][count[PPid]] = pid; count[PPid]++; } } closedir(dir); /*printf the tree*/ dfs(1, 0, pids, pidsname, count); return 0; } /* Return UID corresponding to 'name', or -1 on error */ uid_t userIdFromName(const char *name) { struct passwd *pwd; uid_t u; char *endptr; /* On NULL or empty string */ if (name == NULL || *name == '\0') { return -1; } u = strtol(name, &endptr, 10); if (*endptr == '\0') { return u; } pwd = getpwnam(name); if (pwd == NULL){ return -1; } return pwd->pw_uid; } int getStatus(const char *pid, uid_t *Uid, char *Name, pid_t *PPid, pid_t *Pid) { int ret = 0; FILE *file = NULL; char pathname[PATH_MAX] = {'\0'}; char buf[1024] = {'\0'}; int getuid = 0, getcmdname = 0, getppid = 0, getpid = 0; /*open the stat file by pathname*/ sprintf(pathname, "/proc/%s/status", pid); if ((file = fopen(pathname, "r")) == NULL) { goto Exit; } /*copy the info from status*/ while (fgets(buf, sizeof(buf), file) != NULL) { if (strncmp(buf, "Name:", 5) == 0) { if (sscanf(buf, "Name: %s", Name)) { getcmdname = 1; } } else if (strncmp(buf, "Uid:", 4) == 0) { if (sscanf(buf, "Uid: %d", Uid)) { getuid = 1; } } else if (strncmp(buf, "PPid:", 5) == 0) { if (sscanf(buf, "PPid: %d", PPid)) { getppid = 1; } } else if (strncmp(buf, "Pid:", 4) == 0) { if (sscanf(buf, "Pid: %d", Pid)) { getpid = 1; } } if (getuid && getcmdname && getppid && getpid) { ret = 1; goto Exit; } } Exit: fclose(file); return ret; } int stringIsDigit(const char *d_name) { while (*d_name != '\0') { if (!isdigit(*d_name)) { return 0; } d_name++; } return 1; } void dfs(int index, int depth, int *pids[], char *pidsname[], int count[]) { if (pids[index] == NULL) { return; } if (depth > 0) { for (int i = 0; i < depth; i++) { printf(" "); } } if (pidsname[index]) { printf("-> %s(%d) \n", pidsname[index], index); } else { printf("NONAME\n"); } for (int i = 0; i < count[index]; i++) { dfs(pids[index][i], depth+1, pids, pidsname, count); } }
the_stack_data/200143013.c
int main() { int a; a = 1; int b; b = 0; return a / (b + 1); }
the_stack_data/98576536.c
// // This file was generated by the Retargetable Decompiler // Website: https://retdec.com // Copyright (c) 2018 Retargetable Decompiler <[email protected]> // #include <math.h> #include <stdbool.h> #include <stdint.h> #include <stdlib.h> // ---------------- Integer Types Definitions ----------------- typedef int8_t int3_t; // ----------------- Float Types Definitions ------------------ typedef float float32_t; typedef double float64_t; typedef long double float80_t; // ------------------------ Structures ------------------------ struct vector_unsignedchar_std__allocator_unsignedchar__ { int32_t e0; }; struct vtable_5370_type { int32_t (*e0)(int32_t *); int32_t (*e1)(int32_t *); int32_t (*e2)(int32_t); }; struct vtable_55a8_type { int32_t (*e0)(int32_t *); int32_t (*e1)(int32_t *); }; struct vtable_55e8_type { int32_t (*e0)(int32_t *); int32_t (*e1)(int32_t *); int32_t (*e2)(int32_t); int32_t (*e3)(int32_t); }; // ------------------------- Classes -------------------------- // N5boost16exception_detail10bad_alloc_E // N5boost16exception_detail10clone_baseE // N5boost16exception_detail10clone_implINS0_10bad_alloc_EEE (base classes: N5boost16exception_detail10bad_alloc_E, N5boost16exception_detail10clone_baseE) // N5boost6detail15sp_counted_baseE // N5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEEE (base classes: N5boost6detail15sp_counted_baseE) // N5boost6system12system_errorE // N5boost9exceptionE // ------------------- Function Prototypes -------------------- void _7e_clone_impl(int32_t this, int32_t __in_chrg); void __uninitialized_move_a_3c_CAddress_2a__2c__20_CAddress_2a__2c__20_std_3a__3a_allocator_3c_CAddress_3e__20__3e_(int32_t __first, int32_t __last, int32_t __result, int32_t __alloc); int32_t _GLOBAL__sub_I__ZNK9CAddrInfo14GetTriedBucketERKSt6vectorIhSaIhEE(void); int32_t _Z16WriteCompactSizeI11CDataStreamEvRT_y(int32_t a1, int32_t a2, int32_t a3); int32_t _ZN11CDataStream5writeEPKci_part_346(void); int32_t _ZN11CDataStreamD1Ev(int32_t * a1); int32_t _ZN5boost10shared_ptrIKNS_16exception_detail10clone_baseEED1Ev(int32_t a1); int32_t _ZN5boost16exception_detail10bad_alloc_D0Ev(int32_t * a1); int32_t _ZN5boost16exception_detail10bad_alloc_D1Ev(int32_t * a1); int32_t _ZN5boost16exception_detail10clone_baseD0Ev(int32_t * a1); int32_t _ZN5boost16exception_detail10clone_baseD1Ev(int32_t * a1); int32_t _ZN5boost16exception_detail10clone_implINS0_10bad_alloc_EED0Ev(int32_t * a1); int32_t _ZN5boost16exception_detail10clone_implINS0_10bad_alloc_EED1Ev(int32_t * a1); int32_t _ZN5boost16exception_detail12refcount_ptrINS0_20error_info_containerEED1Ev(int32_t * a1); int32_t _ZN5boost16exception_detail13get_bad_allocILi42EEENS_10shared_ptrIKNS0_10clone_baseEEEv(int32_t * a1); int32_t _ZN5boost16exception_detail20copy_boost_exceptionEPNS_9exceptionEPKS1_(int32_t a1, int32_t a2); int32_t _ZN5boost6detail15sp_counted_base7destroyEv(int32_t * a1); int32_t _ZN5boost6detail15sp_counted_baseD0Ev(int32_t * a1); int32_t _ZN5boost6detail15sp_counted_baseD1Ev(int32_t * a1); int32_t _ZN5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEE11get_deleterERKSt9type_info(void); int32_t _ZN5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEE7disposeEv(int32_t a1); int32_t _ZN5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEED0Ev(int32_t * a1); int32_t _ZN5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEED1Ev(int32_t * a1); int32_t _ZN5boost6system12system_errorD0Ev(int32_t * a1); int32_t _ZN5boost6system12system_errorD1Ev(int32_t * a1); int32_t _ZN5boost6system14error_categoryD0Ev(int32_t * a1); int32_t _ZN5boost6system14error_categoryD1Ev(int32_t * a1); int32_t _ZN5boost9exceptionD0Ev(int32_t a1); int32_t _ZN5boost9exceptionD1Ev(int32_t * a1); void _ZN8CAddrMan10Connected_ERK8CServicex(int32_t this, int32_t addr, int64_t nTime); void _ZN8CAddrMan10SwapRandomEjj(int32_t this, uint32_t nRndPos1, int32_t nRndPos2); void _ZN8CAddrMan11SelectTriedEi(int32_t this, int32_t nKBucket); void _ZN8CAddrMan4Add_ERK8CAddressRK8CNetAddrx(int32_t this, int32_t addr, int32_t source, int64_t nTimePenalty); void _ZN8CAddrMan4FindERK8CNetAddrPi(int32_t this, int32_t addr, int32_t * pnId); void _ZN8CAddrMan5Good_ERK8CServicex(int32_t this, int32_t addr, int64_t nTime); void _ZN8CAddrMan6CreateERK8CAddressRK8CNetAddrPi(int32_t this, int32_t addr, int32_t addrSource, int32_t * pnId); void _ZN8CAddrMan7Select_Ei(int32_t this, int32_t nUnkBias); void _ZN8CAddrMan8Attempt_ERK8CServicex(int32_t this, int32_t addr, int64_t nTime); void _ZN8CAddrMan8GetAddr_ERSt6vectorI8CAddressSaIS1_EE(int32_t this, int32_t vAddr); void _ZN8CAddrMan9MakeTriedER9CAddrInfoii(int32_t this, int32_t info, int32_t nId, int32_t nOrigin); void _ZN8CAddrMan9ShrinkNewEi(int32_t this, int32_t nUBucket); void _ZNK5boost16exception_detail10clone_implINS0_10bad_alloc_EE5cloneEv(int32_t this); int32_t _ZNK5boost16exception_detail10clone_implINS0_10bad_alloc_EE5cloneEv2(int32_t a1); int32_t _ZNK5boost16exception_detail10clone_implINS0_10bad_alloc_EE7rethrowEv(int32_t a1); int32_t _ZNK5boost6system12system_error4whatEv(int32_t a1); int32_t _ZNK5boost6system14error_category10equivalentEiRKNS0_15error_conditionE(int32_t * a1, int32_t a2, int32_t a3); int32_t _ZNK5boost6system14error_category10equivalentERKNS0_10error_codeEi(int32_t a1, int32_t * a2, int32_t a3); int32_t _ZNK5boost6system14error_category23default_error_conditionEi(int32_t * a1, int32_t a2, int32_t a3); void _ZNK9CAddrInfo10IsTerribleEx(int32_t this, int64_t nNow); void _ZNK9CAddrInfo12GetNewBucketERKSt6vectorIhSaIhEERK8CNetAddr(int32_t this, struct vector_unsignedchar_std__allocator_unsignedchar__ nKey, int32_t src); void _ZNK9CAddrInfo14GetTriedBucketERKSt6vectorIhSaIhEE(int32_t this, struct vector_unsignedchar_std__allocator_unsignedchar__ nKey); void _ZNK9CAddrInfo9GetChanceEx(int32_t this, int64_t nNow); int32_t _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(int32_t a1, int32_t * a2); int32_t _ZNSt6vectorI8CAddressSaIS0_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS0_S2_EERKS0_(int32_t * a1, int32_t a2, int32_t a3); int32_t _ZNSt6vectorIc25zero_after_free_allocatorIcEE15_M_range_insertIPKcEEvN9__gnu_cxx17__normal_iteratorIPcS2_EET_SA_St20forward_iterator_tag(int32_t * a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5); int32_t _ZNSt6vectorIhSaIhEED1Ev(int32_t * a1); int32_t _ZNSt6vectorIiSaIiEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPiS1_EERKi(int32_t a1, int32_t * a2); int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE10_M_insert_EPKSt18_Rb_tree_node_baseSC_RKS3_(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t * a5); int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE11equal_rangeERS2_(void); int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_ESC_RS2__isra_334(void); int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE16_M_insert_uniqueERKS3_(int32_t a1, int32_t a2, int32_t a3); int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE17_M_insert_unique_ESt23_Rb_tree_const_iteratorIS3_ERKS3_(int32_t a1, int32_t a2, int32_t a3, int32_t a4); int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE5eraseERS2_(int32_t a1, int32_t a2); int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E(int32_t a1, int32_t a2); int32_t _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE10_M_insert_EPKSt18_Rb_tree_node_baseS8_RKi(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5); int32_t _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE16_M_insert_uniqueERKi(int32_t * a1, int32_t a2); int32_t _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE5eraseERKi(int32_t a1, int32_t * a2); int32_t _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE8_M_eraseEPSt13_Rb_tree_nodeIiE(int32_t a1, int32_t a2); int32_t _ZNSt8_Rb_treeIiSt4pairIKi9CAddrInfoESt10_Select1stIS3_ESt4lessIiESaIS3_EE10_M_insert_EPKSt18_Rb_tree_node_baseSC_RKS3_(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5); int32_t _ZNSt8_Rb_treeIiSt4pairIKi9CAddrInfoESt10_Select1stIS3_ESt4lessIiESaIS3_EE16_M_insert_uniqueERKS3_(int32_t * a1, int32_t a2, int32_t a3); int32_t _ZNSt8_Rb_treeIiSt4pairIKi9CAddrInfoESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_insert_unique_ESt23_Rb_tree_const_iteratorIS3_ERKS3_(int32_t a1, int32_t a2, int32_t a3, int32_t * a4); int32_t _ZNSt8_Rb_treeIiSt4pairIKi9CAddrInfoESt10_Select1stIS3_ESt4lessIiESaIS3_EE5eraseERS1_(int32_t a1, int32_t * a2); int32_t _ZNSt8_Rb_treeIiSt4pairIKi9CAddrInfoESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E(int32_t a1, int32_t a2); int32_t _ZThn20_N5boost16exception_detail10bad_alloc_D0Ev(int32_t a1); int32_t _ZThn20_N5boost16exception_detail10bad_alloc_D1Ev(int32_t a1); int32_t _ZThn20_N5boost16exception_detail10clone_implINS0_10bad_alloc_EED0Ev(int32_t a1); int32_t _ZThn20_N5boost16exception_detail10clone_implINS0_10bad_alloc_EED1Ev(int32_t a1); int32_t _ZThn24_N5boost16exception_detail10clone_implINS0_10bad_alloc_EED0Ev(int32_t a1); int32_t _ZThn24_N5boost16exception_detail10clone_implINS0_10bad_alloc_EED1Ev(int32_t a1); int32_t _ZThn24_NK5boost16exception_detail10clone_implINS0_10bad_alloc_EE5cloneEv(int32_t a1); int32_t _ZThn24_NK5boost16exception_detail10clone_implINS0_10bad_alloc_EE7rethrowEv(int32_t a1); int32_t function_1030(int32_t a1); int32_t function_10ef(void); int32_t function_1102(int32_t a1, int32_t a2, int32_t a3); int32_t function_116b(void); int32_t function_11be(int32_t a1); int32_t function_11e2(void); int32_t function_132d(void); int32_t function_13c0(int32_t a1); int32_t function_1418(void); int32_t function_1437(void); int32_t function_14f0(void); int32_t function_14f9(void); int32_t function_14fc(void); int32_t function_1544(void); int32_t function_1548(void); int32_t function_154b(void); int32_t function_1591(int32_t a1, int32_t a2, int32_t a3); int32_t function_1772(char a1, int32_t result, int32_t a3); int32_t function_18244489(void); int32_t function_1941(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5); int32_t function_196a(void); int32_t function_1973(void); int32_t function_199b(void); int32_t function_19a4(void); int32_t function_19ac(void); int32_t function_1a0c(int32_t a1, int32_t a2, int32_t a3, int32_t a4); int32_t function_1a5e(uint32_t a1, int32_t a2, int32_t a3); int32_t function_1bb3(void); int32_t function_1c58(int32_t a1); int32_t function_1c88(uint32_t a1, int32_t a2, int32_t a3); int32_t function_1cf1(void); int32_t function_1d14(void); int32_t function_1d19(int32_t a1, int32_t a2, int32_t a3, int32_t a4); int32_t function_1db6(void); int32_t function_1dbf(void); int32_t function_1dc2(void); int32_t function_1e0a(void); int32_t function_1e0e(void); int32_t function_1e11(void); int32_t function_1e53(int16_t a1); int32_t function_1fef(void); int32_t function_1ff3(int32_t result, int32_t a2, int32_t a3); int32_t function_2023(void); int32_t function_21cb(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5); int32_t function_21f2(void); int32_t function_21ff(void); int32_t function_2207(void); int32_t function_2222(void); int32_t function_222b(void); int32_t function_2234(void); int32_t function_23b0(int32_t a1); int32_t function_23d8(void); int32_t function_24a8(void); int32_t function_24e1(void); int32_t function_2505(void); int32_t function_2589(int32_t a1); int32_t function_25c2(int16_t a1); int32_t function_25d7(int32_t a1, int32_t a2, int32_t a3); int32_t function_267b(int32_t a1, int32_t a2); int32_t function_26a0(int32_t a1); int32_t function_26b6(void); int32_t function_26c7(void); int32_t function_29b3(int32_t a1); int32_t function_29f3(int32_t a1); int32_t function_2a33(int32_t a1); int32_t function_2a73(int32_t a1); int32_t function_2ab2(void); int32_t function_2e4d(void); int32_t function_2e6f(void); int32_t function_2e98(void); int32_t function_2ec0(void); int32_t function_2ec2(int32_t a1, int32_t a2, int32_t a3, int32_t a4); int32_t function_2ed3(void); int32_t function_2ee4(void); int32_t function_2eea(void); int32_t function_2ef0(void); int32_t function_2ef3(void); int32_t function_2fd6(int32_t a1, int32_t a2); int32_t function_2ff0(void); int32_t function_3015(void); int32_t function_3017(void); int32_t function_301c(void); int32_t function_306e(int32_t a1, int32_t a2); int32_t function_3088(void); int32_t function_30ad(void); int32_t function_30af(void); int32_t function_30b4(void); int32_t function_3117(void); int32_t function_316b(int32_t a1); int32_t function_31e2(int32_t a1); int32_t function_3336(void); int32_t function_3385(void); int32_t function_3388(int32_t a1); int32_t function_34a(void); int32_t function_350a(void); int32_t function_3513(void); int32_t function_3527(void); int32_t function_37b2(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5); int32_t function_37e8(int32_t a1, int32_t a2, int32_t a3); int32_t function_38af(void); int32_t function_38b4(void); int32_t function_38d4(void); int32_t function_38dd(void); int32_t function_38f1(void); int32_t function_3902(void); int32_t function_3908(void); int32_t function_390a(void); int32_t function_3912(void); int32_t function_3968(int32_t a1); int32_t function_3979(void); int32_t function_39c(int32_t a1); int32_t function_39d0(int32_t a1, int32_t a2, int32_t a3, int32_t a4); int32_t function_3a7d(void); int32_t function_3a80(int32_t a1); int32_t function_3ac1(int32_t a1); int32_t function_3afc(void); int32_t function_3b10(void); int32_t function_3b28(void); int32_t function_3b48(void); int32_t function_3b63(int32_t a1); int32_t function_3b6c(void); int32_t function_3b71(void); int32_t function_3be0(int32_t a1, int32_t a2, int32_t a3, int32_t a4); int32_t function_3c40(int32_t a1, int32_t a2, int32_t a3, int32_t a4); int32_t function_3d0b(int32_t result); int32_t function_3d28(void); int32_t function_3d95(int32_t a1); int32_t function_3dc8(void); int32_t function_3dd5(void); int32_t function_3e8b(int32_t result); int32_t function_3ea8(void); int32_t function_3f15(int32_t a1); int32_t function_3f48(void); int32_t function_3f55(void); int32_t function_40(void); int32_t function_4199(void); int32_t function_41a9(int32_t a1); int32_t function_41bb(int32_t a1); int32_t function_41d7(void); int32_t function_4207(void); int32_t function_423(void); int32_t function_42ff(char * a1); int32_t function_4396(void); int32_t function_43b0(int32_t a1); int32_t function_43d0(char * a1, int32_t a2); int32_t function_4470(void); int32_t function_4488(void); int32_t function_449a(void); int32_t function_449f(void); int32_t function_44a4(int32_t a1, int32_t a2); int32_t function_44b0(void); int32_t function_453c(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5); int32_t function_4570(int32_t a1); int32_t function_4586(void); int32_t function_4640(int32_t result); int32_t function_4673(void); int32_t function_46ce(int32_t a1); int32_t function_46fb(void); int32_t function_4718(void); int32_t function_471c(void); int32_t function_472e(int32_t a1, int32_t result); int32_t function_4760(void); int32_t function_4765(void); int32_t function_47fd(int32_t result); int32_t function_4818(int32_t a1); int32_t function_484e(int32_t a1); int32_t function_4858(void); int32_t function_48b9(void); int32_t function_48e9(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5); int32_t function_4918(int32_t a1, int32_t a2, int32_t a3); int32_t function_4930(void); int32_t function_4a4(void); int32_t function_4abc(void); int32_t function_4ae8(void); int32_t function_4b1d(void); int32_t function_4b38(int32_t a1); int32_t function_4b78(void); int32_t function_4b80(void); int32_t function_4ba8(void); int32_t function_4bae(void); int32_t function_4bb7(void); int32_t function_4c5a(int32_t a1); int32_t function_4ce9(void); int32_t function_4d1(void); int32_t function_4d4(void); int32_t function_4d88(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5); int32_t function_4db8(int32_t a1); int32_t function_4dcf(void); int32_t function_4ddb(void); int32_t function_4e33(void); int32_t function_4e37(void); int32_t function_4e45(void); int32_t function_4e67(void); int32_t function_4e80(void); int32_t function_4e88(void); int32_t function_4eb7(int32_t a1); int32_t function_4ebf(void); int32_t function_4f3b(void); int32_t function_4f50(int16_t a1); int32_t function_4f8(void); int32_t function_4f83(void); int32_t function_4fd9(void); int32_t function_4feb(void); int32_t function_5020(int32_t a1); int32_t function_5069(void); int32_t function_5084(int32_t a1); int32_t function_50a0(void); int32_t function_50c0(void); int32_t function_50c6(void); int32_t function_50d0(void); int32_t function_52a4(void); int32_t function_52ae(void); int32_t function_52b8(void); int32_t function_52be(int32_t a1); int32_t function_5c(void); int32_t function_5cf(void); int32_t function_5e0(int32_t a1); int32_t function_61e(int32_t a1); int32_t function_6200(int32_t a1); int32_t function_6270(int32_t a1); int32_t function_6340(int32_t a1); int32_t function_682(float64_t a1); int32_t function_6c8(void); int32_t function_724(void); int32_t function_75b(void); int32_t function_792(void); int32_t function_7e8(void); int32_t function_80c(int32_t result); int32_t function_818(void); int32_t function_833(void); int32_t function_860fdeb3(void); int32_t function_870fe008(void); int32_t function_873(void); int32_t function_878(void); float80_t function_88c(float64_t a1, int32_t a2); int32_t function_89b(void); int32_t function_8a5(void); int32_t function_945(void); int32_t function_955(void); int32_t function_962(int32_t a1, int32_t a2, int32_t a3, int32_t a4); int32_t function_980(int32_t a1, int32_t a2, int32_t a3, int32_t a4); int32_t function_bcc(int32_t a1); int32_t function_bf0(void); int32_t function_c7e(uint32_t a1, uint32_t a2, int32_t a3); int32_t function_d95(int32_t a1); int32_t function_e9d(void); int32_t function_ea4(int32_t a1); int32_t function_eb2(void); int32_t function_eee(int32_t a1, int32_t a2); int32_t function_f28(void); int32_t function_f3a(int32_t a1); int32_t function_f4f(int32_t a1); int32_t function_f68(int32_t a1); int32_t function_f90(void); int32_t unknown_63c0(int32_t a1); int32_t unknown_67d0(int32_t a1); int32_t unknown_6a90(int32_t a1, int32_t a2); int32_t unknown_7320(int32_t a1, int32_t a2); int32_t unknown_7740(int32_t a1, int32_t a2); int32_t unknown_7770(int32_t a1, int32_t a2); int32_t unknown_7800(int32_t a1, int32_t a2); int32_t unknown_8370(int32_t a1, int32_t a2); int32_t unknown_8a50(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5); int32_t unknown_8df0(int32_t a1, int32_t a2, int32_t a3); int32_t unknown_91a0(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5); int32_t unknown_9290(int32_t a1, int32_t a2, int32_t a3, int32_t a4); int32_t unknown_92f0(int32_t a1, int32_t a2, int32_t a3, int32_t a4); int32_t unknown_9370(int32_t a1, int32_t a2); int32_t unknown_95f0(int32_t a1, int32_t a2, int32_t a3); int32_t unknown_9ad0(int32_t a1, int32_t a2, int32_t a3, int32_t a4); int32_t unknown_9bc0(int32_t a1, int32_t a2, int32_t a3); int32_t unknown_9cb0(int32_t a1, int32_t a2); // --------------------- Global Variables --------------------- int32_t g1 = 0; // eax int32_t g2 = 0; // ebp int32_t g3 = 0; // ebx int32_t g4 = 0; // ecx int32_t g5 = 0; // edi int32_t g6 = 0; // edx int32_t g7 = 0; // esi int32_t g8 = 0; // esp int3_t g9 = 0; // fpu_stat_TOP int32_t g10 = 0x2790; int32_t g12; // 0x5589 int32_t g13 = 0; int32_t g15 = 0x3130; int32_t g16 = 0; int32_t g18 = 0x2700; int32_t g19 = 8; char (*g20)[33] = "N5boost6detail15sp_counted_baseE"; int32_t g21 = -0x14f38975; int32_t g22 = -0x49720001; int32_t g23 = 0; bool g24 = false; // of bool g25 = false; // sf bool g26 = false; // zf struct vtable_5370_type g11 = { .e0 = _ZN5boost6system12system_errorD1Ev, .e1 = _ZN5boost6system12system_errorD0Ev, .e2 = _ZNK5boost6system12system_error4whatEv }; struct vtable_55a8_type g14 = { .e0 = _ZN5boost16exception_detail10bad_alloc_D1Ev, .e1 = _ZN5boost16exception_detail10bad_alloc_D0Ev }; struct vtable_55e8_type g17 = { .e0 = _ZN5boost16exception_detail10clone_implINS0_10bad_alloc_EED1Ev, .e1 = _ZN5boost16exception_detail10clone_implINS0_10bad_alloc_EED0Ev, .e2 = _ZNK5boost16exception_detail10clone_implINS0_10bad_alloc_EE5cloneEv2, .e3 = _ZNK5boost16exception_detail10clone_implINS0_10bad_alloc_EE7rethrowEv }; // ------------------------ Functions ------------------------- // Address range: 0x0 - 0x4 int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_ESC_RS2__isra_334(void) { // 0x0 return 0; } // From module: /usr/include/boost/exception/exception.hpp // Address range: 0x10 - 0x1f // Line range: 411 - 976 // Demangled: boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_>::clone() const void _ZNK5boost16exception_detail10clone_implINS0_10bad_alloc_EE5cloneEv(int32_t this) { char v1 = *(char *)&g1; // bp+10 int32_t v2 = 0; // eax *(char *)v2 = (char)v2 + v1; int32_t v3 = 0; // ecx char * v4 = (char *)(v3 + 0x311c2444); // bp+12 *v4 = *v4 + (char)v3; } // From module: /usr/include/boost/exception/exception.hpp // Address range: 0x20 - 0x2e // Line range: 404 - 1289 void _7e_clone_impl(int32_t this, int32_t __in_chrg) { // 0x20 if (g7 == 0) { // bb function_40(); // branch -> 0x24 } } // Address range: 0x40 - 0x59 int32_t function_40(void) { // 0x40 *(int32_t *)g3 = g2; int32_t v1; if (*(int32_t *)20 != v1) { // 0x65 return g3; } // 0x51 return g3; } // Address range: 0x5c - 0x65 int32_t function_5c(void) { char v1 = *(char *)&g1; int32_t v2 = 0; // eax *(char *)v2 = (char)v2 + v1; char v3 = *(char *)&g1; *(char *)v2 = (char)v2 + v3; g7 = *(int32_t *)12; int32_t * v4; _7e_clone_impl((int32_t)&v4, (int32_t)&v4); return (int32_t)&v4; } // From module: /usr/include/c++/4.6/bits/stl_uninitialized.h // Address range: 0x70 - 0x102 // Line range: 264 - 1052 void __uninitialized_move_a_3c_CAddress_2a__2c__20_CAddress_2a__2c__20_std_3a__3a_allocator_3c_CAddress_3e__20__3e_(int32_t __first, int32_t __last, int32_t __result, int32_t __alloc) { int32_t v1 = 0; // bp+74 int32_t v2 = 0; // bp+79 int32_t v3 = 0; // edx int32_t v4 = v3; // bp+88 if (v4 != v1) { // branch -> 0x90 while (true) { int32_t v5 = v4; int32_t v6 = 0; if (v2 != 0) { // 0x94 *(int32_t *)v2 = *(int32_t *)v1; *(int32_t *)(v2 + 4) = *(int32_t *)(v1 + 4); *(int32_t *)(v2 + 8) = *(int32_t *)(v1 + 8); *(int32_t *)(v2 + 12) = *(int32_t *)(v1 + 12); *(int32_t *)(v2 + 16) = *(int32_t *)(v1 + 16); *(int32_t *)(v2 + 20) = *(int32_t *)(v1 + 20); *(int32_t *)(v2 + 24) = *(int32_t *)(v1 + 24); *(int32_t *)(v2 + 28) = *(int32_t *)(v1 + 28); *(int32_t *)(v2 + 32) = *(int32_t *)(v1 + 32); *(int32_t *)(v2 + 36) = *(int32_t *)(v1 + 36); v5 = v3; v6 = v2; // branch -> 0xce } int32_t v7 = v1 + 40; if (v7 == v5) { // break -> 0xd8 break; } v4 = v5; v1 = v7; v2 = v6 + 40; // continue -> 0x90 } // 0xd8 // branch -> 0xed } } // From module: /parallelcoin/src/addrman.h // Address range: 0x110 - 0x227 // Line range: 38 - 571 // Demangled: CAddrInfo::IsTerrible(long long) const void _ZNK9CAddrInfo10IsTerribleEx(int32_t this, int64_t nNow) { uint32_t v1 = (int32_t)nNow; uint32_t v2 = *(int32_t *)(this + 36); // bp+137 uint32_t v3 = *(int32_t *)(this + 32); int32_t v4; uint32_t v5; // bp+168 uint32_t v6; int32_t v7; uint32_t v8; int32_t v9; int32_t v10; if ((v3 || v2) == 0) { // 0x168 v5 = *(int32_t *)(this + 28); v6 = v4 + (int32_t)(v1 > 0xfffffda7); if (v6 >= 0) { // 0x1b8 if (v6 == 0) { // 0x1ba if (v5 > v1 + 600) { // 0x18b // branch -> 0x190 // 0x1a1 return; } } // 0x1c0 if (v5 != 0) { // 0x1cd v9 = (int32_t)(v1 < v5) + v4; if (v9 >= 0 != v9 != 0) { // 0x1da if (v9 >= 0) { // 0x1dc if (v1 - v5 >= 0x4f1a01) { // 0x18b // branch -> 0x190 // 0x1a1 return; } } // 0x1e3 v7 = *(int32_t *)(this + 60); v8 = *(int32_t *)(this + 56); if ((v8 || v7) == 0) { // 0x1ef if (*(int32_t *)(this + 64) > 2) { // 0x1a1 return; } } // 0x1fa v10 = (int32_t)(v1 < v8) + v4 - v7; if (v10 >= 0) { // 0x207 if (v10 <= 0) { // 0x218 if (v1 - v8 < 0x93a81) { // 0x220 // branch -> 0x190 // 0x1a1 return; } } // 0x209 // branch -> 0x190 } // 0x1a1 return; } // 0x18b // branch -> 0x190 } // 0x1a1 return; } // 0x18b // branch -> 0x190 } else { uint32_t v11 = (int32_t)(v1 < 60) + v4; if (v2 <= v11) { // 0x160 if (v2 >= v11) { // 0x162 if (v3 >= v1 - 60) { // 0x155 // branch -> 0x190 // 0x1a1 return; } } // 0x168 v5 = *(int32_t *)(this + 28); v6 = v4 + (int32_t)(v1 > 0xfffffda7); if (v6 < 0) { // 0x18b // branch -> 0x190 // 0x1a1 return; } // 0x1b8 if (v6 == 0) { // 0x1ba if (v5 > v1 + 600) { // 0x18b // branch -> 0x190 // 0x1a1 return; } } // 0x1c0 if (v5 != 0) { // 0x1cd v9 = (int32_t)(v1 < v5) + v4; if (v9 >= 0 != v9 != 0) { // 0x1da if (v9 >= 0) { // 0x1dc if (v1 - v5 >= 0x4f1a01) { // 0x18b // branch -> 0x190 // 0x1a1 return; } } // 0x1e3 v7 = *(int32_t *)(this + 60); v8 = *(int32_t *)(this + 56); if ((v8 || v7) == 0) { // 0x1ef if (*(int32_t *)(this + 64) > 2) { // 0x1a1 return; } } // 0x1fa v10 = (int32_t)(v1 < v8) + v4 - v7; if (v10 >= 0) { // 0x207 if (v10 <= 0) { // 0x218 if (v1 - v8 < 0x93a81) { // 0x220 // branch -> 0x190 // 0x1a1 return; } } // 0x209 // branch -> 0x190 } // 0x1a1 return; } // 0x18b // branch -> 0x190 } // 0x1a1 return; } // 0x155 // branch -> 0x190 } } // From module: /parallelcoin/src/addrman.h // Address range: 0x230 - 0x2ea // Line range: 58 - 79 // Demangled: CAddrInfo::GetChance(long long) const void _ZNK9CAddrInfo9GetChanceEx(int32_t this, int64_t nNow) { int32_t v1 = g2; // bp+230 uint32_t v2 = (int32_t)nNow; int32_t v3; g2 = (int32_t)(v2 < *(int32_t *)(this + 28)) + v3; uint32_t v4 = *(int32_t *)(this + 32); // bp+260 int32_t v5 = v3 - *(int32_t *)(this + 36) + (int32_t)(v2 < v4); // bp+265 int3_t v6 = g9 - 1; g9 = v6; int32_t v7; uint32_t v8; if (v5 < 0) { // 0x2e0 // branch -> 0x2a0 // 0x2a0 v8 = *(int32_t *)(this + 64); if (v8 >= 1) { // 0x2a7 v7 = 1; // branch -> 0x2b0 while (v7 != v8) { // 0x2b0 v7++; // continue -> 0x2b0 } // 0x2b9 g9 = v6; // branch -> 0x2bb } // 0x2c8 g2 = v1; return; } // 0x29e if (v5 <= 0) { // 0x2d2 if (v2 - v4 < 600) { // 0x2e0 // branch -> 0x2a0 } } // 0x2a0 v8 = *(int32_t *)(this + 64); if (v8 >= 1) { // 0x2a7 v7 = 1; // branch -> 0x2b0 while (v7 != v8) { // 0x2b0 v7++; // continue -> 0x2b0 } // 0x2b9 g9 = v6; // branch -> 0x2bb } // 0x2c8 g2 = v1; } // From module: /parallelcoin/src/addrman.h // Address range: 0x2f0 - 0x346 // Line range: 81 - 92 // Demangled: CAddrMan::Find(CNetAddr const &, int *) void _ZN8CAddrMan4FindERK8CNetAddrPi(int32_t this, int32_t addr, int32_t * pnId) { // 0x2f0 g2 = 0; int32_t v1; if (this + 128 == v1) { // bb function_39c(addr); // branch -> 0x338 } } // Address range: 0x34a - 0x39c int32_t function_34a(void) { int32_t * v1 = (int32_t *)(g3 - 0x7bebdbac); int32_t v2 = *v1 - 1; *v1 = v2; int32_t v3; // eax int32_t v4; // ecx int32_t v5; int32_t v6; int32_t * v7; if (v2 == 0) { int32_t v8 = 0; // branch -> 0x37a lab_0x37a: // 0x37a v5 = *(int32_t *)(v8 + 8); int32_t v9; // bp+396 int32_t v10; if (v5 != 0) { // 0x37a v6 = g6; // branch -> 0x381 // branch -> 0x381 lab_0x381: while (true) { // 0x381 if (*(int32_t *)(v5 + 16) < v6) { int32_t v11 = *(int32_t *)(v5 + 12); // bp+386 if (v11 == 0) { // break -> 0x38d break; } v5 = v11; // continue -> 0x381 continue; } else { // 0x378 v4 = v5; v8 = v5; // branch -> 0x37a goto lab_0x37a; } // 0x38d g2 = 0; int32_t v12 = g3; v10 = v4; v9 = v10; int32_t result; // bp+396 if (v12 != v10) { // 0x393 result = v9 + 20; v3 = result; return result; } int32_t v13 = function_39c((int32_t)&v7); // bp+391 v3 = v13; int32_t v14 = v4; v9 = v14; // branch -> 0x393 // 0x393 result = v9 + 20; v3 = result; return result; } // 0x38d // branch -> 0x38d } // 0x38d g2 = 0; v10 = v4; v9 = v10; if (g3 == v10) { // bb114 function_39c((int32_t)&v7); v9 = v4; // branch -> 0x393 } // 0x393 return v9 + 20; } char * v15 = (char *)(g2 - 0x74f68b0a); // bp+356 *v15 = *v15 - (char)v3; g6++; char * v16 = (char *)(g3 - 0x76e7dbb4); *v16 = (char)v4 & *v16; int32_t * v17 = (int32_t *)(g3 - 0x12ce93bd); // bp+363 *v17 = v4 + *v17; int32_t v18 = v3; // 0x3819 if (v3 == 0) { // bb v18 = function_39c((int32_t)&v7); // branch -> 0x36d } int32_t v19 = g3 + (int32_t)&g22; g3 = v19; int32_t v20 = *(int32_t *)(g6 + 32); // bp+370 g6 = v20; v4 = v19; v6 = v20; // branch -> 0x381 // 0x381 v5 = v18; // branch -> 0x381 goto lab_0x381; } // Address range: 0x39c - 0x3c0 int32_t function_39c(int32_t a1) { int32_t v1 = *(int32_t *)20 ^ a1; g6 = v1; if (v1 != 0) { // 0x3b3 } // 0x3ab return g2; } // From module: /parallelcoin/src/addrman.h // Address range: 0x3c0 - 0x410 // Line range: 371 - 388 // Demangled: CAddrMan::Attempt_(CService const &, long long) void _ZN8CAddrMan8Attempt_ERK8CServicex(int32_t this, int32_t addr, int64_t nTime) { // 0x3c0 _ZN8CAddrMan4FindERK8CNetAddrPi(this, addr, NULL); } // Address range: 0x423 - 0x444 int32_t function_423(void) { // 0x423 int32_t v1; int32_t result = *(int32_t *)20 ^ v1; // bp+427 if (result != 0) { // 0x444 } // 0x430 return result; } // From module: /parallelcoin/src/addrman.h // Address range: 0x450 - 0x4a0 // Line range: 510 - 528 // Demangled: CAddrMan::Connected_(CService const &, long long) void _ZN8CAddrMan10Connected_ERK8CServicex(int32_t this, int32_t addr, int64_t nTime) { // 0x450 _ZN8CAddrMan4FindERK8CNetAddrPi(this, addr, NULL); } // Address range: 0x4a4 - 0x4ba int32_t function_4a4(void) { int32_t v1 = 0; // eax int32_t * v2 = (int32_t *)(v1 + 0x438b2b75 + 8 * v1); *v2 = *v2 + 1; char v3 = (char)v1 - 49; g1 = (int32_t)(v3 + (char)false) | v1 & -256; int32_t v4 = 0; // ecx char * v5 = (char *)(v4 - 0x76e3dbac); unsigned char v6 = *v5; unsigned char v7 = (char)v4 % 32; if (v7 != 0) { // bb *v5 = v6 << 8 - v7 | v6 >> v7; // branch -> bb97 } // bb97 return function_18244489(); } // Address range: 0x4d1 - 0x4d2 int32_t function_4d1(void) { // 0x4d1 return g1; } // Address range: 0x4d4 - 0x4f5 int32_t function_4d4(void) { // 0x4d4 int32_t v1; if (*(int32_t *)20 != v1) { // 0x501 return g1; } // 0x4e1 return g1; } // Address range: 0x4f8 - 0x501 int32_t function_4f8(void) { // 0x4f8 if ((uint32_t)g1 < 1201) { // bb g1 = function_4d4(); // branch -> 0x4ff } // 0x4ff return function_4d1(); } // From module: /parallelcoin/src/addrman.h // Address range: 0x510 - 0x5a6 // Line range: 390 - 427 // Demangled: CAddrMan::Select_(int) void _ZN8CAddrMan7Select_Ei(int32_t this, int32_t nUnkBias) { int32_t v1 = *(int32_t *)(nUnkBias + 152) - *(int32_t *)(nUnkBias + 148); // bp+543 g1 = v1 / 4; if (v1 < 4) { // bb g1 = function_80c(this); // branch -> 0x554 } float80_t v2 = (float80_t)*(int32_t *)(nUnkBias + 160); // bp+554 int3_t v3 = -2; g9 = v3; float80_t v4 = sqrtl(v2); float80_t v5 = v2; // bp+570 if (v4 != v4 || 0.0L != 0.0L) { // bb123 g1 = function_89b(); v5 = v2; v3 = g9; // branch -> 0x566 } // 0x566 g9 = v3 - 2; float80_t v6 = sqrtl(v5 * (100.0L - v5)); // bp+582 if (v6 != v6 || 0.0L != 0.0L) { // bb124 function_878(); // branch -> 0x58c } } // Address range: 0x5cf - 0x5d6 int32_t function_5cf(void) { // 0x5cf return function_860fdeb3(); } // Address range: 0x5e0 - 0x5e1 int32_t function_5e0(int32_t a1) { // 0x5e0 return g1; } // Address range: 0x61e - 0x67e int32_t function_61e(int32_t a1) { int32_t * v1 = (int32_t *)(g3 + 0xf8b6c53); *v1 = *v1 - 1; int32_t v2 = 0; // edx int32_t v3; if (v2 == 0) { v3 = function_7e8(); // branch -> 0x62c } else { // 0x61e v3 = g1; // branch -> 0x62c } int32_t v4 = 4 * v3; g5 = v4; int32_t v5 = g7; int32_t v6 = v5; // ecx int32_t v7 = *(int32_t *)v4; // bp+631 g1 = v7; int32_t v8 = v5; int32_t v9 = v2; // branch -> 0x641 lab_0x641: while (true) { int32_t v10 = v9; // bp+641 // branch -> 0x641 int32_t v11; // bp+655 int32_t v12; int32_t v13; while (true) { // 0x641 if (*(int32_t *)(v10 + 16) < v7) { int32_t v14 = *(int32_t *)(v10 + 12); // bp+646 if (v14 == 0) { v12 = v8; // break -> 0x64d break; } v10 = v14; // continue -> 0x641 continue; } else { // 0x638 v6 = v10; int32_t v15 = *(int32_t *)(v10 + 8); if (v15 == 0) { v12 = v10; // break (via goto) -> 0x64d goto lab_0x64d; } v8 = v10; v9 = v15; // continue (via goto) -> 0x641 goto lab_0x641; } v11 = v12; if (v5 == v12) { // bb115 v13 = function_7e8(); g1 = v13; int32_t v16 = v6; v7 = v13; v11 = v16; // branch -> 0x655 } int32_t v17 = *(int32_t *)(v11 + 16); // bp+655 int32_t v18; // bp+662 int32_t result; // bp+669 if (v17 <= v7) { // 0x65e v2 = a1; v18 = g5; result = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(a1, (int32_t *)v18); return result; } // bb116 function_7e8(); // branch -> 0x65e // 0x65e v2 = a1; v18 = g5; result = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(a1, (int32_t *)v18); return result; } lab_0x64d: // 0x64d v11 = v12; if (v5 == v12) { // bb115 v13 = function_7e8(); g1 = v13; v7 = v13; v11 = v6; // branch -> 0x655 } // 0x655 if (*(int32_t *)(v11 + 16) <= v7) { // 0x65e return _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(a1, (int32_t *)g5); } // bb116 function_7e8(); // branch -> 0x65e // 0x65e return _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(a1, (int32_t *)g5); } } // Address range: 0x682 - 0x6c4 int32_t function_682(float64_t a1) { int32_t * v1 = (int32_t *)0x4489243c; // bp+682 *v1 = *v1 - 1; int32_t * v2; _ZNK9CAddrInfo9GetChanceEx(0, (int64_t)&v2); g1 = (int32_t)&v2; return function_5e0((int32_t)(float32_t)(1.2L * (float80_t)a1)); } // Address range: 0x6c8 - 0x6c9 int32_t function_6c8(void) { // 0x6c8 return g1; } // Address range: 0x724 - 0x72b int32_t function_724(void) { // 0x724 return function_870fe008(); } // Address range: 0x75b - 0x76a int32_t function_75b(void) { int32_t * v1 = (int32_t *)0xb493; *v1 = *v1 - 1; char * v2 = (char *)0x2c8d4004; // bp+761 *v2 = (char)0 + *v2; return 0; } // Address range: 0x792 - 0x7df int32_t function_792(void) { int32_t v1 = 0; // ebx int32_t * v2 = (int32_t *)(v1 - 0xf8a0001); // bp+792 *v2 = *v2 + 1; int32_t v3 = *(int32_t *)(v1 + (int32_t)&g23); // bp+798 int32_t result = g1; if (v3 == 0) { // 0x7c0 return result; } // branch -> 0x7b5 while (true) { int32_t v4 = v3; // branch -> 0x7b5 int32_t v5; // edx while (true) { // 0x7b5 int32_t v6; if (*(int32_t *)(v4 + 16) < *(int32_t *)(result + 16)) { // 0x7ba v6 = v4 + 12; // branch -> 0x7ad } else { // 0x7a8 v6 = v4 + 8; // branch -> 0x7ad } int32_t v7 = *(int32_t *)v6; v5 = v7; if (v7 == 0) { // break -> bb break; } v4 = v7; // continue -> 0x7b5 } // bb g1 = function_6c8(); v3 = v5; // branch -> 0x7b5 } } // Address range: 0x7e8 - 0x807 int32_t function_7e8(void) { // 0x7e8 return g1; } // Address range: 0x80c - 0x813 int32_t function_80c(int32_t result) { // 0x80c return result; } // Address range: 0x818 - 0x833 int32_t function_818(void) { int32_t result; int32_t v1; if (*(int32_t *)20 != v1) { // bb result = function_873(); // branch -> 0x829 } // 0x829 return result; } // Address range: 0x833 - 0x873 int32_t function_833(void) { // 0x833 int32_t v1; *(int32_t *)v1 = g5; int32_t v2 = 0; // edx *(int32_t *)(v2 + 4) = *(int32_t *)(g5 + 4); *(int32_t *)(v2 + 8) = *(int32_t *)(g5 + 8); *(int32_t *)(v2 + 12) = *(int32_t *)(g5 + 12); *(int32_t *)(v2 + 16) = *(int32_t *)(g5 + 16); *(int32_t *)(v2 + 20) = *(int32_t *)(g5 + 20); *(int32_t *)(v2 + 24) = *(int32_t *)(g5 + 24); *(int32_t *)(v2 + 28) = *(int32_t *)(g5 + 28); *(int32_t *)(v2 + 32) = *(int32_t *)(g5 + 32); *(int32_t *)(v2 + 36) = *(int32_t *)(g5 + 36); return function_818(); } // Address range: 0x873 - 0x874 int32_t function_873(void) { // 0x873 return g1; } // Address range: 0x878 - 0x887 int32_t function_878(void) { // 0x878 g9 ^= -4; return g1; } // Address range: 0x88c - 0x89b float80_t function_88c(float64_t a1, int32_t a2) { // 0x88c return (int64_t)a2; } // Address range: 0x89b - 0x8a0 int32_t function_89b(void) { // 0x89b g9 += 2; return g1; } // Address range: 0x8a5 - 0x8aa int32_t function_8a5(void) { // 0x8a5 return 0; } // From module: /parallelcoin/src/addrman.h // Address range: 0x8b0 - 0x911 // Line range: 126 - 148 // Demangled: CAddrMan::SelectTried(int) void _ZN8CAddrMan11SelectTriedEi(int32_t this, int32_t nKBucket) { // 0x8b0 g3 = 0; g2 = this + (int32_t)&g22; int32_t v1 = *(int32_t *)(this + 164) + 12 * nKBucket; g7 = v1; g5 = -1; if (*(int32_t *)(v1 + 4) - *(int32_t *)v1 < 4) { // bb function_962(-1, -1, this, this + 100); // branch -> 0x90c } } // Address range: 0x945 - 0x946 int32_t function_945(void) { // 0x945 return g1; } // Address range: 0x955 - 0x95c int32_t function_955(void) { int32_t v1 = 0; // ecx char * v2 = (char *)(v1 - 0x7ce3dbb4); // bp+955 *v2 = (char)false + *v2 - (char)v1; return 0; } // Address range: 0x962 - 0x97d int32_t function_962(int32_t a1, int32_t a2, int32_t a3, int32_t a4) { int32_t result = g5; if (*(int32_t *)20 != a1) { // 0xa44 return result; } // 0x975 g3 = a2; g7 = a3; g5 = a4; return result; } // Address range: 0x980 - 0xa44 int32_t function_980(int32_t a1, int32_t a2, int32_t a3, int32_t a4) { int32_t v1 = a4; // bp+52 int32_t v2 = *(int32_t *)(a2 + (int32_t)&g23); // bp+984 if (v2 == 0) { // 0xa20 return 0; } int32_t v3 = g2; // bp+993 int32_t v4 = v3; // branch -> 0x9a1 lab_0x9a1: while (true) { int32_t v5 = v2; // branch -> 0x9a1 int32_t result3; // 0xa3f14 int32_t v6; int32_t v7; int32_t v8; while (true) { // 0x9a1 if (*(int32_t *)(v5 + 16) < a4) { int32_t v9 = *(int32_t *)(v5 + 12); if (v9 == 0) { result3 = v9; v6 = v4; // break -> 0x9ad break; } v5 = v9; // continue -> 0x9a1 continue; } else { int32_t v10 = *(int32_t *)(v5 + 8); if (v10 == 0) { result3 = 0; v6 = v5; // break (via goto) -> 0x9ad goto lab_0x9ad; } v4 = v5; v2 = v10; // continue (via goto) -> 0x9a1 goto lab_0x9a1; } // 0x9ad int32_t result; if (v6 == v3) { result = result3; // 0xa20 return result; } int32_t v11 = *(int32_t *)(v6 + 16); if (v11 > a4) { result = result3; // 0xa20 return result; } // 0x9b6 v7 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(a3, &v1); int32_t v12 = *(int32_t *)(v7 + 60); v8 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(a3, &a1); g1 = v8; int32_t v13 = *(int32_t *)(v8 + 60); int32_t result2; if (v12 >= v13) { // 0xa07 result2 = function_945(); return result2; } // bb g1 = function_945(); // branch -> 0xa07 // 0xa07 result2 = function_945(); return result2; } lab_0x9ad: // 0x9ad if (v6 == v3 || *(int32_t *)(v6 + 16) > a4) { // 0xa20 return result3; } // 0x9b6 v7 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(a3, &v1); v8 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(a3, &a1); g1 = v8; if (*(int32_t *)(v7 + 60) >= *(int32_t *)(v8 + 60)) { // 0xa07 return function_945(); } // bb g1 = function_945(); // branch -> 0xa07 // 0xa07 return function_945(); } } // From module: /parallelcoin/src/addrman.h // Address range: 0xa50 - 0xbc7 // Line range: 106 - 124 // Demangled: CAddrMan::SwapRandom(unsigned int, unsigned int) void _ZN8CAddrMan10SwapRandomEjj(int32_t this, uint32_t nRndPos1, int32_t nRndPos2) { int32_t v1 = g2; int32_t v2 = g5; int32_t v3 = g7; int32_t v4 = g3; g7 = nRndPos1; g3 = this; if (nRndPos1 != nRndPos2) { int32_t v5 = *(int32_t *)(this + 148); int32_t v6 = (*(int32_t *)(this + 152) - v5) / 4; g1 = v6; int32_t v7 = v6; if (v6 <= nRndPos1) { int32_t v8 = function_bcc(nRndPos2); g1 = v8; v7 = v8; // branch -> 0xa95 } // 0xa95 if (v7 <= nRndPos2) { // bb48 function_bcc(nRndPos2); // branch -> 0xa9f } int32_t v9 = *(int32_t *)(4 * g7 + v5); int32_t v10 = v9; // bp-40 int32_t v11 = *(int32_t *)(v5 + 4 * nRndPos2); g5 = v11; int32_t v12 = g3; int32_t v13 = *(int32_t *)(v12 + (int32_t)&g23); int32_t v14 = v11; // bp-36 if (v13 == 0) { // 0xba8 return; } int32_t v15 = v12 + (int32_t)&g22; g2 = v15; // branch -> 0xad9 lab_0xad9: while (true) { int32_t v16 = v13; // branch -> 0xad9 while (true) { // 0xad9 if (v9 > *(int32_t *)(v16 + 16)) { int32_t v17 = *(int32_t *)(v16 + 12); if (v17 == 0) { // break -> 0xae5 break; } v16 = v17; // continue -> 0xad9 continue; } else { // 0xad0 g2 = v16; int32_t v18 = *(int32_t *)(v16 + 8); if (v18 == 0) { // break (via goto) -> 0xae5 goto lab_0xae5; } v13 = v18; // continue (via goto) -> 0xad9 goto lab_0xad9; } lab_0xae5: // 0xae5 if (v15 == v16 || v9 < *(int32_t *)(v16 + 16)) { // 0xba8 return; } int32_t v19 = v15; // branch -> 0xb09 lab_0xb09: while (true) { int32_t v20 = v13; // branch -> 0xb09 int32_t v21; int32_t v22; int32_t v23; int32_t v24; int32_t v25; while (true) { // 0xb09 if (v11 > *(int32_t *)(v20 + 16)) { int32_t v26 = *(int32_t *)(v20 + 12); if (v26 == 0) { v21 = v19; // break -> 0xb15 break; } v20 = v26; // continue -> 0xb09 continue; } else { int32_t v27 = *(int32_t *)(v20 + 8); if (v27 == 0) { v21 = v20; // break (via goto) -> 0xb15 goto lab_0xb15; } v19 = v20; v13 = v27; // continue (via goto) -> 0xb09 goto lab_0xb09; } // 0xb15 int32_t v28; // eax int32_t v29; // ecx int32_t v30; // edx int32_t v31; int32_t v32; int32_t v33; int32_t v34; int32_t v35; int32_t v36; int32_t v37; int32_t v38; int32_t v39; if (v15 != v21) { uint32_t v40 = *(int32_t *)(v21 + 16); if (v11 >= v40) { // 0xb48 v22 = v12 + 100; g5 = v22; v28 = &v10; v24 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v22, &v10); v29 = nRndPos2; *(int32_t *)(v24 + 76) = nRndPos2; v28 = &v14; v31 = g5; v25 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v31, &v14); v28 = v25; v38 = v14; v30 = v38; v29 = nRndPos2; v32 = g7; *(int32_t *)(v25 + 76) = v32; v33 = g3; v23 = *(int32_t *)(v33 + 148); v28 = v23; v34 = v30; v36 = g7; *(int32_t *)(4 * v36 + v23) = v34; v39 = v10; v30 = v39; v35 = v28; v37 = v29; *(int32_t *)(4 * v37 + v35) = v39; // branch -> 0xb8d // 0xb8d int32_t v41; v28 = v41; g1 = 0; // 0xb9a g3 = v4; g7 = v3; g5 = v2; g2 = v1; return; } } // 0xb20 // branch -> 0xb48 // 0xb48 v22 = v12 + 100; g5 = v22; v28 = &v10; v24 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v22, &v10); v29 = nRndPos2; *(int32_t *)(v24 + 76) = nRndPos2; v28 = &v14; v31 = g5; v25 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v31, &v14); v28 = v25; v38 = v14; v30 = v38; v29 = nRndPos2; v32 = g7; *(int32_t *)(v25 + 76) = v32; v33 = g3; v23 = *(int32_t *)(v33 + 148); v28 = v23; v34 = v30; v36 = g7; *(int32_t *)(4 * v36 + v23) = v34; v39 = v10; v30 = v39; v35 = v28; v37 = v29; *(int32_t *)(4 * v37 + v35) = v39; // branch -> 0xb8d } lab_0xb15: // 0xb15 if (v15 != v21) { // 0xb1b if (v11 >= *(int32_t *)(v21 + 16)) { // 0xb48 v22 = v12 + 100; g5 = v22; v24 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v22, &v10); *(int32_t *)(v24 + 76) = nRndPos2; v25 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(g5, &v14); *(int32_t *)(v25 + 76) = g7; v23 = *(int32_t *)(g3 + 148); *(int32_t *)(4 * g7 + v23) = v14; *(int32_t *)(4 * nRndPos2 + v23) = v10; // branch -> 0xb8d // 0xb8d g1 = 0; // 0xb9a g3 = v4; g7 = v3; g5 = v2; g2 = v1; return; } } // 0xb20 // branch -> 0xb48 // 0xb48 v22 = v12 + 100; g5 = v22; v24 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v22, &v10); *(int32_t *)(v24 + 76) = nRndPos2; v25 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(g5, &v14); *(int32_t *)(v25 + 76) = g7; v23 = *(int32_t *)(g3 + 148); *(int32_t *)(4 * g7 + v23) = v14; *(int32_t *)(4 * nRndPos2 + v23) = v10; // branch -> 0xb8d } } } } // 0xb8d g1 = 0; // 0xb9a g3 = v4; g7 = v3; g5 = v2; g2 = v1; } // Address range: 0xbcc - 0xbf0 int32_t function_bcc(int32_t a1) { // 0xbcc return g1; } // Address range: 0xbf0 - 0xbf1 int32_t function_bf0(void) { // 0xbf0 return g1; } // From module: /parallelcoin/src/addrman.h // Address range: 0xc00 - 0xc7a // Line range: 494 - 508 // Demangled: CAddrMan::GetAddr_(std::vector<CAddress, std::allocator<CAddress> > &) void _ZN8CAddrMan8GetAddr_ERSt6vectorI8CAddressSaIS1_EE(int32_t this, int32_t vAddr) { // 0xc00 g3 = this; int32_t v1 = *(int32_t *)(this + 152); int32_t v2 = *(int32_t *)(this + 148); g5 = v2; uint32_t v3 = (int32_t)(0x51eb851f * (23 * (int64_t)((v1 - v2) / 4) & 0xffffffff) / 0x2000000000); if (v3 == 0 && v3 >= 2500 != v3 != 2500) { // bb function_d95(0); // branch -> 0xc5a } } // Address range: 0xc7e - 0xd95 int32_t function_c7e(uint32_t a1, uint32_t a2, int32_t a3) { int32_t * v1 = (int32_t *)-0x76fbdb94; *v1 = *v1 - 1; int32_t v2 = 0; uint32_t v3 = (v2 + 220 + (int32_t)false) % 256 | v2 & -256; char * v4; int32_t * v5; _ZN8CAddrMan10SwapRandomEjj(v3 + g2, (int32_t)v4, (int32_t)&v5); int32_t v6 = g3; int32_t v7 = *(int32_t *)(v6 + (int32_t)&g23); int32_t v8 = *(int32_t *)(v6 + 148); int32_t result; if (v7 == 0) { // 0xd7c g2++; result = _ZNSt6vectorI8CAddressSaIS0_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS0_S2_EERKS0_((int32_t *)g7, v8, 0); return result; } int32_t v9 = 4 * g2 + v8; g5 = v9; int32_t * v10 = (int32_t *)v9; int32_t v11 = *v10; int32_t v12 = a1; // branch -> 0xcb9 lab_0xcb9: while (true) { int32_t v13 = v7; // branch -> 0xcb9 int32_t result4; // eax int32_t v14; // edx int32_t v15; int32_t v16; int32_t v17; int32_t v18; // 0xd7c16 uint32_t v19; int32_t v20; int32_t v21; int32_t result3; int32_t v22; while (true) { // 0xcb9 if (v11 > *(int32_t *)(v13 + 16)) { int32_t v23 = *(int32_t *)(v13 + 12); if (v23 == 0) { v18 = v23; v19 = v12; // break -> 0xcc5 break; } v13 = v23; // continue -> 0xcb9 continue; } else { int32_t v24 = *(int32_t *)(v13 + 8); if (v24 == 0) { v18 = 0; v19 = v13; // break (via goto) -> 0xcc5 goto lab_0xcc5; } v12 = v13; v7 = v24; // continue (via goto) -> 0xcb9 goto lab_0xcb9; } // 0xcc5 int32_t v25; int32_t v26; int32_t v27; int32_t v28; if (v19 == a1) { v27 = v11; v25 = v18; // 0xd7c v26 = g2; g2 = v26 + 1; v28 = g7; result = _ZNSt6vectorI8CAddressSaIS0_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS0_S2_EERKS0_((int32_t *)v28, v27, v25); result4 = result; return result; } uint32_t v29 = *(int32_t *)(v19 + 16); if (v11 < v29) { v27 = v11; v25 = v18; // 0xd7c v26 = g2; g2 = v26 + 1; v28 = g7; result = _ZNSt6vectorI8CAddressSaIS0_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS0_S2_EERKS0_((int32_t *)v28, v27, v25); result4 = result; return result; } // 0xcd8 result4 = a3; v22 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(a3, v10); result4 = v22; v15 = g7; v20 = *(int32_t *)(v15 + 4); v14 = v20; uint32_t v30 = *(int32_t *)(v15 + 8); if (v20 == v30) { v27 = v20; v25 = v22; // 0xd7c v26 = g2; g2 = v26 + 1; v28 = g7; result = _ZNSt6vectorI8CAddressSaIS0_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS0_S2_EERKS0_((int32_t *)v28, v27, v25); result4 = result; return result; } // 0xcf4 v17 = 40; if (v20 != 0) { int32_t v31 = *(int32_t *)v22; *(int32_t *)v20 = v31; int32_t v32 = result4; int32_t v33 = *(int32_t *)(v32 + 4); int32_t v34 = v14; *(int32_t *)(v34 + 4) = v33; int32_t v35 = result4; int32_t v36 = *(int32_t *)(v35 + 8); int32_t v37 = v14; *(int32_t *)(v37 + 8) = v36; int32_t v38 = result4; int32_t v39 = *(int32_t *)(v38 + 12); int32_t v40 = v14; *(int32_t *)(v40 + 12) = v39; int32_t v41 = result4; int32_t v42 = *(int32_t *)(v41 + 16); int32_t v43 = v14; *(int32_t *)(v43 + 16) = v42; int32_t v44 = result4; int32_t v45 = *(int32_t *)(v44 + 20); int32_t v46 = v14; *(int32_t *)(v46 + 20) = v45; int32_t v47 = result4; int32_t v48 = *(int32_t *)(v47 + 24); int32_t v49 = v14; *(int32_t *)(v49 + 24) = v48; int32_t v50 = result4; int32_t v51 = *(int32_t *)(v50 + 28); int32_t v52 = v14; *(int32_t *)(v52 + 28) = v51; int32_t v53 = result4; int32_t v54 = *(int32_t *)(v53 + 32); int32_t v55 = v14; *(int32_t *)(v55 + 32) = v54; int32_t v56 = result4; v21 = *(int32_t *)(v56 + 36); result4 = v21; int32_t v57 = v14; *(int32_t *)(v57 + 36) = v21; v16 = g7; int32_t v58 = *(int32_t *)(v16 + 4); int32_t v59 = v58 + 40; v15 = v16; v17 = v59; // branch -> 0xd37 } int32_t v60 = g2; uint32_t v61 = v60 + 1; *(int32_t *)(v15 + 4) = v17; int32_t result2; if (v61 == a2) { // bb result3 = function_d95(a3); result4 = result3; result2 = result3; // branch -> 0xd46 // 0xd46 return result2; } int32_t v62 = result4; result2 = v62; // branch -> 0xd46 // 0xd46 return result2; } lab_0xcc5: // 0xcc5 if (v19 == a1 || v11 < *(int32_t *)(v19 + 16)) { // 0xd7c g2++; result = _ZNSt6vectorI8CAddressSaIS0_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS0_S2_EERKS0_((int32_t *)g7, v11, v18); return result; } // 0xcd8 v22 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(a3, v10); result4 = v22; v15 = g7; v20 = *(int32_t *)(v15 + 4); v14 = v20; if (v20 == *(int32_t *)(v15 + 8)) { // 0xd7c g2++; result = _ZNSt6vectorI8CAddressSaIS0_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS0_S2_EERKS0_((int32_t *)g7, v20, v22); return result; } // 0xcf4 v17 = 40; if (v20 != 0) { // 0xcfa *(int32_t *)v20 = *(int32_t *)v22; *(int32_t *)(v14 + 4) = *(int32_t *)(result4 + 4); *(int32_t *)(v14 + 8) = *(int32_t *)(result4 + 8); *(int32_t *)(v14 + 12) = *(int32_t *)(result4 + 12); *(int32_t *)(v14 + 16) = *(int32_t *)(result4 + 16); *(int32_t *)(v14 + 20) = *(int32_t *)(result4 + 20); *(int32_t *)(v14 + 24) = *(int32_t *)(result4 + 24); *(int32_t *)(v14 + 28) = *(int32_t *)(result4 + 28); *(int32_t *)(v14 + 32) = *(int32_t *)(result4 + 32); v21 = *(int32_t *)(result4 + 36); result4 = v21; *(int32_t *)(v14 + 36) = v21; v16 = g7; v15 = v16; v17 = *(int32_t *)(v16 + 4) + 40; // branch -> 0xd37 } // 0xd37 *(int32_t *)(v15 + 4) = v17; if (g2 + 1 == a2) { // bb result3 = function_d95(a3); // branch -> 0xd46 // 0xd46 return result3; } // 0xd37 // branch -> 0xd46 // 0xd46 return result4; } } // Address range: 0xd95 - 0xdaa int32_t function_d95(int32_t a1) { int32_t result = *(int32_t *)20 ^ a1; if (result != 0) { // 0xdaa } // 0xda2 return result; } // From module: /parallelcoin/src/addrman.h // Address range: 0xdb0 - 0xe71 // Line range: 150 - 202 // Demangled: CAddrMan::ShrinkNew(int) void _ZN8CAddrMan9ShrinkNewEi(int32_t this, int32_t nUBucket) { int32_t v1 = *(int32_t *)20; g1 = 0; g7 = this; if (nUBucket < 0) { // bb function_11be(v1); this = g7; // branch -> 0xdd3 } int32_t v2 = *(int32_t *)(this + 180); int32_t v3 = -0x55555555 * (*(int32_t *)(this + 184) - v2) / 8; g1 = v3; if (v3 <= nUBucket) { // bb32 function_11be(v1); // branch -> 0xdf2 } int32_t v4 = v2 + 24 * nUBucket; int32_t v5 = *(int32_t *)(v4 + 12); g3 = v5; int32_t v6 = v4 + 4; g2 = v6; if (v5 == v6) { // bb33 function_ea4(v4); // branch -> 0xe0c } int32_t v7 = g7; int32_t v8 = v7 + 100; int32_t v9 = v7 + (int32_t)&g22; g5 = v9; int32_t v10 = *(int32_t *)(v7 + (int32_t)&g23); g1 = v10; int32_t v11 = v10; // 0xe397 if (v10 == 0) { // bb34 v11 = function_f68(v8); v9 = g5; // branch -> 0xe23 } int32_t v12 = *(int32_t *)(g3 + 16); int32_t v13 = v9; // ecx int32_t v14 = v9; // branch -> 0xe39 lab_0xe39: while (true) { int32_t v15 = v11; // branch -> 0xe39 int32_t v16; int32_t v17; while (true) { // 0xe39 if (*(int32_t *)(v15 + 16) < v12) { int32_t v18 = *(int32_t *)(v15 + 12); g1 = v18; if (v18 == 0) { v17 = v14; // break -> 0xe45 break; } v15 = v18; // continue -> 0xe39 continue; } else { // 0xe30 v13 = v15; int32_t v19 = *(int32_t *)(v15 + 8); g1 = v19; if (v19 == 0) { v17 = v15; // break (via goto) -> 0xe45 goto lab_0xe45; } v14 = v15; v11 = v19; // continue (via goto) -> 0xe39 goto lab_0xe39; } int32_t v20 = v12; v16 = v17; if (v9 == v17) { // bb35 g1 = function_f68(v8); int32_t v21 = v13; int32_t v22; // edx int32_t v23 = v22; v20 = v23; v16 = v21; // branch -> 0xe4d } int32_t v24 = *(int32_t *)(v16 + 16); int32_t v25; if (v24 <= v20) { // 0xe56 v25 = g3; v13 = v8; _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v8, (int32_t *)(v25 + 16)); return; } // bb36 function_f68(v8); // branch -> 0xe56 // 0xe56 v25 = g3; v13 = v8; _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v8, (int32_t *)(v25 + 16)); return; } lab_0xe45: // 0xe45 v16 = v17; if (v9 == v17) { // bb35 g1 = function_f68(v8); v16 = v13; // branch -> 0xe4d } // 0xe4d if (*(int32_t *)(v16 + 16) <= v12) { // 0xe56 _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v8, (int32_t *)(g3 + 16)); return; } // bb36 function_f68(v8); // branch -> 0xe56 // 0xe56 _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v8, (int32_t *)(g3 + 16)); return; } } // Address range: 0xe9d - 0xe9e int32_t function_e9d(void) { // 0xe9d return 0; } // Address range: 0xea4 - 0xeae int32_t function_ea4(int32_t a1) { // 0xea4 return *(int32_t *)(a1 + 20); } // Address range: 0xeb2 - 0xebb int32_t function_eb2(void) { int32_t * v1 = (int32_t *)-0x76dfdbb4; *v1 = *v1 - 1; return 0; } // Address range: 0xeee - 0xf25 int32_t function_eee(int32_t a1, int32_t a2) { // 0xeee g6 = a1; int32_t v1 = *(int32_t *)(a2 + 12); g5 = v1; if (v1 == g2) { // bb g1 = function_1030(g1); a1 = g6; // branch -> 0xf0d } int32_t v2 = g7; g3 = 0; g7 = a1; return function_f4f(v2 + (int32_t)&g22); } // Address range: 0xf28 - 0xf3a int32_t function_f28(void) { // 0xf28 return g1; } // Address range: 0xf3a - 0xf40 int32_t function_f3a(int32_t a1) { // 0xf3a g3++; return g1; } // Address range: 0xf4f - 0xf63 int32_t function_f4f(int32_t a1) { // 0xf4f if (g3 != g7) { // bb function_f28(); // branch -> 0xf53 } // 0xf53 if (a1 != -1) { // bb1 function_f90(); // branch -> 0xf5a } int32_t v1 = *(int32_t *)(g5 + 16); g1 = v1; return function_f3a(v1); } // Address range: 0xf68 - 0xf87 int32_t function_f68(int32_t a1) { // 0xf68 return g1; } // Address range: 0xf90 - 0x1027 int32_t function_f90(void) { // 0xf90 int32_t v1; int32_t v2 = *(int32_t *)(v1 + (int32_t)&g23); if (v2 == 0) { // 0x1003 return 0; } int32_t * v3 = (int32_t *)(g5 + 16); int32_t v4 = *v3; int32_t v5; int32_t v6 = v5; // branch -> 0xfb1 lab_0xfb1: while (true) { int32_t v7 = v2; // branch -> 0xfb1 int32_t v8; // bp+56 int32_t v9; int32_t v10; int32_t result2; // 0x102014 uint32_t v11; int32_t result4; int32_t result3; while (true) { // 0xfb1 if (v4 > *(int32_t *)(v7 + 16)) { int32_t v12 = *(int32_t *)(v7 + 12); if (v12 == 0) { result2 = v12; v10 = v6; // break -> 0xfbd break; } v7 = v12; // continue -> 0xfb1 continue; } else { int32_t v13 = *(int32_t *)(v7 + 8); if (v13 == 0) { result2 = 0; v10 = v7; // break (via goto) -> 0xfbd goto lab_0xfbd; } v6 = v7; v2 = v13; // continue (via goto) -> 0xfb1 goto lab_0xfb1; } // 0xfbd int32_t result; // 0x1003 if (v5 == v10) { result = result2; // 0x1003 return result; } int32_t v14 = *(int32_t *)(v10 + 16); if (v4 < v14) { result = result2; // 0x1003 return result; } int32_t v15 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v9, v3); v11 = *(int32_t *)(v15 + 28); v8 = 0; result3 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v9, &v8); g1 = result3; uint32_t v16 = *(int32_t *)(result3 + 28); result = result3; if (v11 < v16) { // 0x1003 return result; } // bb result4 = function_f3a(v11); result = result4; // branch -> 0x1003 // 0x1003 return result; } lab_0xfbd: // 0xfbd if (v5 == v10 || v4 < *(int32_t *)(v10 + 16)) { // 0x1003 return result2; } // 0xfc8 v11 = *(int32_t *)(_ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v9, v3) + 28); result3 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v9, &v8); g1 = result3; if (v11 < *(int32_t *)(result3 + 28)) { // 0x1003 return result3; } // bb result4 = function_f3a(v11); // branch -> 0x1003 // 0x1003 return result4; } } // Address range: 0x1030 - 0x10d9 int32_t function_1030(int32_t a1) { int32_t v1 = g7; // 0x1030 int32_t v2 = *(int32_t *)(v1 + (int32_t)&g23); // 0x1030 if (v2 == 0) { // 0x10ba return 0; } int32_t v3 = v1 + (int32_t)&g22; // 0x103b int32_t v4 = v3; // branch -> 0x1051 lab_0x1051: while (true) { int32_t v5 = v2; // 0x1051 // branch -> 0x1051 int32_t v6; // bp+56 int32_t v7; int32_t v8; int32_t v9; // 0x1061 int32_t v10; // 0x106a int32_t v11; // 0x107e int32_t * v12; // 0x107b int32_t v13; // 0x10a5 int32_t result4; // 0x10ac int32_t result3; // 0x10d214 int32_t v14; // 0x1074 while (true) { // 0x1051 if (v8 > *(int32_t *)(v5 + 16)) { int32_t v15 = *(int32_t *)(v5 + 12); // 0x1056 if (v15 == 0) { result3 = v15; v9 = v4; // break -> 0x105d break; } v5 = v15; // continue -> 0x1051 continue; } else { int32_t v16 = *(int32_t *)(v5 + 8); // 0x104a if (v16 == 0) { result3 = 0; v9 = v5; // break (via goto) -> 0x105d goto lab_0x105d; } v4 = v5; v2 = v16; // continue (via goto) -> 0x1051 goto lab_0x1051; } // 0x105d int32_t result; // 0x10d2 if (v3 == v9) { result = result3; // 0x10ba return result; } int32_t v17 = *(int32_t *)(v9 + 16); // 0x1061 if (v8 < v17) { result = result3; // 0x10ba return result; } // 0x1066 g3 = &v6; v10 = v1 + 100; g5 = v10; v14 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v10, &v6); g2 = v14; v12 = (int32_t *)(v14 + 68); int32_t v18 = *v12; // 0x107b v11 = v18 - 1; *v12 = v11; if (v11 == 0) { // bb function_116b(); // branch -> 0x108c } // 0x108c _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE5eraseERKi(a1, &v6); g1 = 1; int32_t v19 = *(int32_t *)20; // 0x10a5 v13 = v19 ^ v7; g6 = v13; int32_t result2 = 1; // 0x10b9 if (v13 == 0) { // 0x10b2 return result2; } // bb34 result4 = function_11e2(); result2 = result4; // branch -> 0x10b2 // 0x10b2 return result2; } lab_0x105d: // 0x105d if (v3 == v9 || v8 < *(int32_t *)(v9 + 16)) { // 0x10ba return result3; } // 0x1066 g3 = &v6; v10 = v1 + 100; g5 = v10; v14 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v10, &v6); g2 = v14; v12 = (int32_t *)(v14 + 68); v11 = *v12 - 1; *v12 = v11; if (v11 == 0) { // bb function_116b(); // branch -> 0x108c } // 0x108c _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE5eraseERKi(a1, &v6); g1 = 1; v13 = *(int32_t *)20 ^ v7; g6 = v13; if (v13 == 0) { // 0x10b2 return 1; } // bb34 result4 = function_11e2(); // branch -> 0x10b2 // 0x10b2 return result4; } } // Address range: 0x10ef - 0x10f0 int32_t function_10ef(void) { // 0x10ef return g1; } // Address range: 0x1102 - 0x116b int32_t function_1102(int32_t a1, int32_t a2, int32_t a3) { int32_t * v1 = (int32_t *)(g3 + 0x3120244c); // 0x1102 *v1 = *v1 - 1; *(char *)(g3 - 0x14feeb97) = -1; int32_t v2 = g7; // 0x110f int32_t v3 = *(int32_t *)(v2 + 152); // 0x110f int32_t v4 = *(int32_t *)76; // 0x1125 _ZN8CAddrMan10SwapRandomEjj(v2, v4, (v3 - *(int32_t *)(v2 + 148)) / 4 - 1); int32_t * v5 = (int32_t *)(g7 + 152); // 0x1138 *v5 = *v5 - 4; _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE5eraseERS2_(g7 + 124, a1); g1 = _ZNSt8_Rb_treeIiSt4pairIKi9CAddrInfoESt10_Select1stIS3_ESt4lessIiESaIS3_EE5eraseERS1_(a3, (int32_t *)a2); int32_t * v6 = (int32_t *)(g7 + 176); // 0x1162 *v6 = *v6 - 1; return function_10ef(); } // Address range: 0x116b - 0x11be int32_t function_116b(void) { int32_t v1 = g7; // 0x116b int32_t v2 = *(int32_t *)(v1 + 148); // 0x1171 int32_t v3 = *(int32_t *)(g2 + 76); // 0x1181 _ZN8CAddrMan10SwapRandomEjj(v1, v3, (*(int32_t *)(v1 + 152) - v2) / 4 - 1); int32_t v4 = g7; // 0x1190 int32_t * v5 = (int32_t *)(v4 + 152); // 0x1193 *v5 = *v5 - 4; _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE5eraseERS2_(v4 + 124, g2); int32_t result = _ZNSt8_Rb_treeIiSt4pairIKi9CAddrInfoESt10_Select1stIS3_ESt4lessIiESaIS3_EE5eraseERS1_(g5, (int32_t *)g3); // eax int32_t * v6 = (int32_t *)(g7 + 176); // 0x11b2 *v6 = *v6 - 1; return result; } // Address range: 0x11be - 0x11dd int32_t function_11be(int32_t a1) { // 0x11be return g1; } // Address range: 0x11e2 - 0x11e3 int32_t function_11e2(void) { // 0x11e2 return g1; } // From module: /parallelcoin/src/addrman.h // Address range: 0x11f0 - 0x1320 // Line range: 94 - 104 // Demangled: CAddrMan::Create(CAddress const &, CNetAddr const &, int *) void _ZN8CAddrMan6CreateERK8CAddressRK8CNetAddrPi(int32_t this, int32_t addr, int32_t addrSource, int32_t * pnId) { // 0x11f0 g2 = this; g3 = addr; g7 = addrSource; int32_t * v1 = (int32_t *)(this + (int32_t)&g21); // 0x122e int32_t v2 = *v1; // 0x122e int32_t v3 = v2; // bp-136 *v1 = v2 + 1; int32_t v4 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(g2 + 100, &v3); // 0x1249 int32_t v5 = *(int32_t *)g3; // bp-132 __asm_rep_movsd_memcpy((char *)v4, (char *)&v5, 20); *(int32_t *)(v4 + 32) = 0; *(int32_t *)(v4 + 36) = 0; *(int32_t *)(v4 + 56) = 0; *(int32_t *)(v4 + 60) = 0; *(int32_t *)(v4 + 64) = 0; *(int32_t *)(v4 + 68) = 0; *(int32_t *)(v4 + 76) = -1; *(char *)(v4 + 72) = 0; int32_t v6; // bp-144 g5 = v6; if (g2 + 128 == v6) { // bb function_13c0(g3); // branch -> 0x1316 } } // Address range: 0x132d - 0x13c0 int32_t function_132d(void) { int32_t v1 = 0; // bp+36 int32_t v2; int32_t v3 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v2, &v1); // 0x1343 int32_t v4 = g2; // 0x1348 int32_t v5 = *(int32_t *)(v4 + 152); // 0x1348 g6 = v5; *(int32_t *)(v3 + 76) = (v5 - *(int32_t *)(v4 + 148)) / 4; if (v5 == *(int32_t *)(v4 + 156)) { // bb function_1418(); // branch -> 0x1368 } // 0x1368 if (v5 != 0) { // 0x136c *(int32_t *)v5 = v1; // branch -> 0x1372 } // 0x1372 *(int32_t *)(g2 + 152) = v5 + 4; int32_t v6; if (v6 != 0) { // 0x1383 *(int32_t *)v6 = v1; // branch -> 0x138d } int32_t result = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v2, &v1); // 0x139c g1 = result; int32_t v7; if (*(int32_t *)20 != v7) { // bb14 result = function_1437(); // branch -> 0x13b5 } // 0x13b5 return result; } // Address range: 0x13c0 - 0x1417 int32_t function_13c0(int32_t a1) { int32_t v1 = g3; // bp+120 int32_t v2; // bp+28 _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE17_M_insert_unique_ESt23_Rb_tree_const_iteratorIS3_ERKS3_((int32_t)&v2, g2 + 124, g5, (int32_t)&v1); g5 = a1; return function_132d(); } // Address range: 0x1418 - 0x1437 int32_t function_1418(void) { // 0x1418 g2 += 148; int32_t v1 = 0; // bp+36 return _ZNSt6vectorIiSaIiEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPiS1_EERKi(g6, &v1); } // Address range: 0x1437 - 0x1438 int32_t function_1437(void) { // 0x1437 return g1; } // From module: /parallelcoin/src/addrman.h // Address range: 0x1440 - 0x14ca // Line range: 24 - 1051 // Demangled: CAddrInfo::GetNewBucket(std::vector<unsigned char, std::allocator<unsigned char> > const &, CNetAddr const &) const void _ZNK9CAddrInfo12GetNewBucketERKSt6vectorIhSaIhEERK8CNetAddr(int32_t this, struct vector_unsignedchar_std__allocator_unsignedchar__ nKey, int32_t src) { // 0x1440 g3 = nKey.e0; g7 = src; } // Address range: 0x14f0 - 0x14f8 int32_t function_14f0(void) { int32_t v1 = 0; // eax return (v1 + 139) % 256 | v1 & -256; } // Address range: 0x14f9 - 0x14fc int32_t function_14f9(void) { // 0x14f9 return 0; } // Address range: 0x14fc - 0x1504 int32_t function_14fc(void) { int32_t result = 0; // eax *(char *)0 = *(char *)&g4 + (char)result; return result; } // Address range: 0x1544 - 0x1547 int32_t function_1544(void) { // 0x1544 return 0; } // Address range: 0x1548 - 0x154b int32_t function_1548(void) { // 0x1548 return 0; } // Address range: 0x154b - 0x1553 int32_t function_154b(void) { int32_t result = 0; // eax *(char *)0 = *(char *)&g4 + (char)result; return result; } // Address range: 0x1591 - 0x1641 int32_t function_1591(int32_t a1, int32_t a2, int32_t a3) { int32_t result = 0; // eax if ((bool)false) { int32_t v1 = result + a3; // 0x15cc return 0 == v1 ? (int32_t)&g12 : v1; } // 0x1593 return result; } // Address range: 0x1772 - 0x18d2 int32_t function_1772(char a1, int32_t result, int32_t a3) { // 0x1772 if (!(bool)false) { // 0x1774 return 0; } int32_t v1; // eax *(char *)v1 = (char)v1 + *(char *)&g1; *(char *)v1 = (char)v1 + *(char *)&g1; *(char *)v1 = (char)v1 + *(char *)&g1; int32_t v2 = 0; // ecx char * v3 = (char *)(v2 - 0x7cf3dbac); // 0x17b8 char v4 = *v3 + (char)v2; // 0x17b8 *v3 = v4; int32_t v5 = v2 - 1; // 0x17be if (v5 == 0 || v4 == 0) { // 0x17c0 return result; } char * v6 = (char *)-0x74afdbac; // 0x17e1 *v6 = *v6 + (char)v5; int32_t v7; // bp+174 return &v7; } // Address range: 0x1941 - 0x1964 int32_t function_1941(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5) { int32_t * v1 = (int32_t *)0xff25f8; // 0x1941 *v1 = *v1 - 1; char v2 = *(char *)&g1; // 0x1947 int32_t result = 0; // eax *(char *)result = (char)result + v2; if (*(int32_t *)20 != a1) { // 0x1964 return result; } // 0x1959 return result; } // Address range: 0x196a - 0x196b int32_t function_196a(void) { // 0x196a return 0; } // Address range: 0x1973 - 0x1996 int32_t function_1973(void) { int32_t v1 = 0; // bp+116 _ZNSt6vectorIhSaIhEED1Ev(&v1); int32_t v2 = 0; // bp+104 _ZNSt6vectorIhSaIhEED1Ev(&v2); return _ZN11CDataStreamD1Ev((int32_t *)g7); } // Address range: 0x199b - 0x19a4 int32_t function_199b(void) { // 0x199b _ZN11CDataStream5writeEPKci_part_346(); return function_1973(); } // Address range: 0x19a4 - 0x19ac int32_t function_19a4(void) { // 0x19a4 return 0; } // Address range: 0x19ac - 0x19b4 int32_t function_19ac(void) { // 0x19ac return 0; } // From module: /parallelcoin/src/addrman.h // Address range: 0x19c0 - 0x1a08 // Line range: 313 - 335 // Demangled: CAddrMan::Add_(CAddress const &, CNetAddr const &, long long) void _ZN8CAddrMan4Add_ERK8CAddressRK8CNetAddrx(int32_t this, int32_t addr, int32_t source, int64_t nTimePenalty) { // 0x19c0 return; } // Address range: 0x1a0c - 0x1a38 int32_t function_1a0c(int32_t a1, int32_t a2, int32_t a3, int32_t a4) { int32_t v1 = 0; // 0x1a0c int32_t * v2 = (int32_t *)(v1 + 0x4c8b2775 + 8 * v1); // 0x1a0c *v2 = *v2 + 1; int32_t result = 0; // ebx g1 = result; if (*(int32_t *)20 != 0) { // bb result = function_1d14(); // branch -> 0x1a24 } // 0x1a24 return result; } // Address range: 0x1a5e - 0x1ba6 int32_t function_1a5e(uint32_t a1, int32_t a2, int32_t a3) { int32_t * v1 = (int32_t *)0x44c71c4e; // 0x1a5e *v1 = *v1 - 1; int32_t v2 = 0; // 0x1a64 unsigned char v3 = (char)v2 & 36; // 0x1a64 int32_t v4 = (int32_t)v3 | v2 & -256; // 0x1a64 char * v5 = (char *)v4; // 0x1a66 *v5 = *v5 + v3; char * v6 = (char *)v4; // 0x1a68 *v6 = *v6 + (char)v4; uint32_t v7 = g4; // 0x1a6a g1 = v4 - v7; int32_t v8 = (int32_t)(v4 < v7) - a3; // 0x1a72 g24 = false; g25 = v8 < 0; int32_t v9 = v7; // 0x1a7f if (v8 <= 0) { // bb function_1c58(v7); v9 = g4; // branch -> 0x1a7f } // 0x1a7f int32_t v10; // esi if (v9 == 0) { // 0x1ae8 v10 = 0; int32_t * v11 = (int32_t *)(g5 + 20); // 0x1aed *v11 = *v11 | *(int32_t *)(v10 + 20); int32_t result = *(int32_t *)(v10 + 24); // 0x1af0 int32_t * v12 = (int32_t *)(g5 + 24); // 0x1af3 *v12 = *v12 | result; return result; } int32_t v13 = g5; // 0x1a93 int32_t * v14 = (int32_t *)(v13 + 28); // 0x1a93 int32_t v15 = *v14; // 0x1a93 int32_t v16; int32_t v17; // 0x1b3b int32_t v18; // 0x1b23 int32_t result2; // 0x1b98 int32_t v19; // 0x1b28 int32_t * v20; // 0x1b45 int32_t * v21; // 0x1b4b int32_t v22; // 0x1b9b2 int32_t v23; // 0x1b48 int32_t v24; // 0x1b7e int32_t v25; // 0x1b08 int32_t v26; // 0x1b0c if (v15 == 0) { // 0x1a93 // branch -> 0x1b00 // 0x1b00 v25 = v7 - a1; v26 = (int32_t)(v7 < a1) + a3 - a2; v18 = (v26 >> 31) - 1; v19 = v25 & v18; *v14 = v19; v17 = v10; v20 = (int32_t *)(g5 + 20); *v20 = *v20 | *(int32_t *)(v17 + 20); v23 = *(int32_t *)(v10 + 24); g1 = v23; v21 = (int32_t *)(g5 + 24); *v21 = *v21 | v23; if (*(int32_t *)(v17 + 28) == 0) { // bb120 function_1d19(v19, v26 & v18, v25, v26); // branch -> 0x1b56 } // 0x1b56 v16 = v19; // branch -> 0x1b5e } else { uint32_t v27 = v7 - 0x15180; // 0x1aa2 int32_t v28 = a3 - a2; // 0x1aaa uint32_t v29 = v28 + (int32_t)(v7 < 0x15180) + (int32_t)(v27 < a1); // 0x1ac2 int32_t * v30; // 0x1add int32_t * v31; // 0x1ae3 if (v29 >= 0) { // 0x1ace if (v29 == 0) { // 0x1ad0 if (v15 >= v27 - a1) { // 0x1ada v30 = (int32_t *)(v13 + 20); *v30 = *v30 | *(int32_t *)(v10 + 20); v31 = (int32_t *)(g5 + 24); *v31 = *v31 | *(int32_t *)(v10 + 24); // branch -> 0x1b5e // 0x1b5e if (v15 != 0) { // 0x1b66 // branch -> 0x1b72 } // 0x1b72 v24 = *(int32_t *)(g5 + 68); if (v24 < 1) { // bb122 function_1bb3(); // branch -> 0x1b8e } // 0x1b8e v22 = 1; result2 = 1; // branch -> 0x1b98 while (result2 != v24) { // 0x1b98 v22 *= 2; result2++; // continue -> 0x1b98 } // 0x1ba1 return result2; } } // 0x1b00 v25 = v7 - a1; v26 = (int32_t)(v7 < a1) + v28; v18 = (v26 >> 31) - 1; v19 = v25 & v18; *v14 = v19; v17 = v10; v20 = (int32_t *)(g5 + 20); *v20 = *v20 | *(int32_t *)(v17 + 20); v23 = *(int32_t *)(v10 + 24); g1 = v23; v21 = (int32_t *)(g5 + 24); *v21 = *v21 | v23; if (*(int32_t *)(v17 + 28) == 0) { // bb120 function_1d19(v19, v26 & v18, v25, v26); // branch -> 0x1b56 } // 0x1b56 // branch -> 0x1b5e // 0x1b5e if (v19 != 0) { // 0x1b66 // branch -> 0x1b72 } // 0x1b72 v24 = *(int32_t *)(g5 + 68); if (v24 < 1) { // bb122 function_1bb3(); // branch -> 0x1b8e } // 0x1b8e v22 = 1; result2 = 1; // branch -> 0x1b98 while (result2 != v24) { // 0x1b98 v22 *= 2; result2++; // continue -> 0x1b98 } // 0x1ba1 return result2; } // 0x1ada v30 = (int32_t *)(v13 + 20); *v30 = *v30 | *(int32_t *)(v10 + 20); v31 = (int32_t *)(g5 + 24); *v31 = *v31 | *(int32_t *)(v10 + 24); v16 = v15; // branch -> 0x1b5e } // 0x1b5e if (v16 != 0) { // 0x1b66 // branch -> 0x1b72 } // 0x1b72 v24 = *(int32_t *)(g5 + 68); if (v24 < 1) { // bb122 function_1bb3(); // branch -> 0x1b8e } // 0x1b8e v22 = 1; result2 = 1; // branch -> 0x1b98 while (result2 != v24) { // 0x1b98 v22 *= 2; result2++; // continue -> 0x1b98 } // 0x1ba1 return result2; } // Address range: 0x1bb3 - 0x1c55 int32_t function_1bb3(void) { struct vector_unsignedchar_std__allocator_unsignedchar__ v1; // 0x1bc7 // 0x1bb3 v1 = (struct vector_unsignedchar_std__allocator_unsignedchar__){ .e0 = 0 }; int32_t v2; v1.e0 = v2 + 84; _ZNK9CAddrInfo12GetNewBucketERKSt6vectorIhSaIhEERK8CNetAddr(g5, v1, g2); int32_t * v3; g1 = (int32_t)&v3; int32_t v4 = *(int32_t *)(v2 + 180); // 0x1bd8 g2 = v4 + 8 * ((int32_t)&v3 + 2 * (int32_t)&v3); int32_t v5 = *(int32_t *)(v4 + 8 * ((int32_t)&v3 + 2 * (int32_t)&v3) + 8); // 0x1be2 int32_t v6; // bp+56 int32_t v7; // bp+72 int32_t * v8; // 0x1c27 int32_t result; // 0x1c48 if (v5 == 0) { // 0x1c27 v8 = (int32_t *)(g5 + 68); *v8 = *v8 + 1; if (*(int32_t *)(g2 + 20) == 64) { // bb function_1cf1(); // branch -> 0x1c35 } // 0x1c35 result = _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE16_M_insert_uniqueERKi(&v6, (int32_t)&v7); return result; } int32_t v9 = v4 + 8 * ((int32_t)&v3 + 2 * (int32_t)&v3) + 4; // 0x1be9 g7 = v9; int32_t v10 = v9; // 0x1c183 // branch -> 0x1c09 int32_t v11; // 0x1c1e while (true) { // 0x1c09 int32_t v12; int32_t v13; if (v13 > *(int32_t *)(v5 + 16)) { // 0x1c0e v11 = v10; v12 = v5 + 12; // branch -> 0x1c05 } else { // 0x1c00 g7 = v5; v11 = v5; v12 = v5 + 8; // branch -> 0x1c05 } int32_t v14 = *(int32_t *)v12; if (v14 == 0) { // break -> 0x1c18 break; } v10 = v11; v5 = v14; // continue -> 0x1c09 } // 0x1c18 if (v11 != v9) { // 0x1c1e // branch -> 0x1c27 } // 0x1c27 v8 = (int32_t *)(g5 + 68); *v8 = *v8 + 1; if (*(int32_t *)(g2 + 20) == 64) { // bb function_1cf1(); // branch -> 0x1c35 } // 0x1c35 v6 = 0; result = _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE16_M_insert_uniqueERKi(&v6, (int32_t)&v7); return result; } // Address range: 0x1c58 - 0x1c83 int32_t function_1c58(int32_t a1) { // 0x1c58 if (g25 == g24) { // 0x1c5a // branch -> 0x1c66 } // 0x1c66 return g1; } // Address range: 0x1c88 - 0x1cf1 int32_t function_1c88(uint32_t a1, int32_t a2, int32_t a3) { // 0x1c88 int32_t v1; // bp+72 int32_t * v2; _ZN8CAddrMan6CreateERK8CAddressRK8CNetAddrPi(a3, 0, (int32_t)&v1, &v2); uint32_t result = *(int32_t *)((int32_t)&v2 + 28); // 0x1cb4 *(int32_t *)((int32_t)&v2 + 28) = result - a1 & ((int32_t)(result < a1) - a2 >> 31) - 1; int32_t * v3 = (int32_t *)(a3 + 176); // 0x1ce5 *v3 = *v3 + 1; return result; } // Address range: 0x1cf1 - 0x1d14 int32_t function_1cf1(void) { // 0x1cf1 int32_t v1; _ZN8CAddrMan9ShrinkNewEi(v1, g1); int32_t v2; g2 = *(int32_t *)(v1 + 180) + v2; int32_t * v3; return (int32_t)&v3; } // Address range: 0x1d14 - 0x1d15 int32_t function_1d14(void) { // 0x1d14 return g1; } // Address range: 0x1d19 - 0x1d20 int32_t function_1d19(int32_t a1, int32_t a2, int32_t a3, int32_t a4) { // 0x1d19 return g1; } // From module: /parallelcoin/src/addrman.h // Address range: 0x1d20 - 0x1d90 // Line range: 10 - 1051 // Demangled: CAddrInfo::GetTriedBucket(std::vector<unsigned char, std::allocator<unsigned char> > const &) const void _ZNK9CAddrInfo14GetTriedBucketERKSt6vectorIhSaIhEE(int32_t this, struct vector_unsignedchar_std__allocator_unsignedchar__ nKey) { // 0x1d20 g7 = this; g3 = nKey.e0; } // Address range: 0x1db6 - 0x1dbe int32_t function_1db6(void) { int32_t v1 = 0; // eax return (v1 + 139) % 256 | v1 & -256; } // Address range: 0x1dbf - 0x1dc2 int32_t function_1dbf(void) { // 0x1dbf return 0; } // Address range: 0x1dc2 - 0x1dca int32_t function_1dc2(void) { int32_t result = 0; // eax *(char *)0 = *(char *)&g4 + (char)result; return result; } // Address range: 0x1e0a - 0x1e0d int32_t function_1e0a(void) { // 0x1e0a return 0; } // Address range: 0x1e0e - 0x1e11 int32_t function_1e0e(void) { // 0x1e0e return 0; } // Address range: 0x1e11 - 0x1e19 int32_t function_1e11(void) { int32_t result = 0; // eax *(char *)0 = *(char *)&g4 + (char)result; return result; } // Address range: 0x1e53 - 0x1e56 int32_t function_1e53(int16_t a1) { // 0x1e53 return 0; } // Address range: 0x1fef - 0x1ff3 int32_t function_1fef(void) { // 0x1fef return function_2023(); } // Address range: 0x1ff3 - 0x2023 int32_t function_1ff3(int32_t result, int32_t a2, int32_t a3) { int32_t v1 = 0; // 0x1ff3 *(char *)v1 = (char)v1 + *(char *)&g1; if (a3 - a2 < 0) { // bb function_222b(); // branch -> 0x2009 } // 0x2009 return result; } // Address range: 0x2023 - 0x20e9 int32_t function_2023(void) { // 0x2023 int32_t * v1; _ZNSt6vectorIc25zero_after_free_allocatorIcEE15_M_range_insertIPKcEEvN9__gnu_cxx17__normal_iteratorIPcS2_EET_SA_St20forward_iterator_tag(&v1, (int32_t)&v1, (int32_t)&v1, (int32_t)&v1, (int32_t)&v1); uint32_t v2; uint32_t v3 = v2 % 4; // bp+128 int32_t v4; // bp+136 int32_t v5; _ZNSt6vectorIc25zero_after_free_allocatorIcEE15_M_range_insertIPKcEEvN9__gnu_cxx17__normal_iteratorIPcS2_EET_SA_St20forward_iterator_tag((int32_t *)g7, v5, (int32_t)&v3, (int32_t)&v4, 0); int32_t v6; int32_t v7; int32_t v8 = v7 + v6; // 0x2074 return v5 == v8 ? (int32_t)&g12 : v8; } // Address range: 0x21cb - 0x21ec int32_t function_21cb(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5) { int32_t * v1 = (int32_t *)0x3fe083f0; // 0x21cb *v1 = *v1 - 1; if (*(int32_t *)20 != a1) { // 0x21ec return 0; } // 0x21e1 int32_t result; // eax return result; } // Address range: 0x21f2 - 0x21f3 int32_t function_21f2(void) { // 0x21f2 return 0; } // Address range: 0x21ff - 0x2200 int32_t function_21ff(void) { // 0x21ff return g1; } // Address range: 0x2207 - 0x221e int32_t function_2207(void) { int32_t v1 = 0; // bp+104 _ZNSt6vectorIhSaIhEED1Ev(&v1); return _ZN11CDataStreamD1Ev((int32_t *)g2); } // Address range: 0x2222 - 0x222b int32_t function_2222(void) { int32_t * v1 = (int32_t *)0x24748dc3; // 0x2222 *v1 = *v1 - 1; return function_21ff(); } // Address range: 0x222b - 0x2234 int32_t function_222b(void) { // 0x222b _ZN11CDataStream5writeEPKci_part_346(); return function_2207(); } // Address range: 0x2234 - 0x223c int32_t function_2234(void) { // 0x2234 return 0; } // From module: /parallelcoin/src/addrman.h // Address range: 0x2240 - 0x23a7 // Line range: 204 - 260 // Demangled: CAddrMan::MakeTried(CAddrInfo &, int, int) void _ZN8CAddrMan9MakeTriedER9CAddrInfoii(int32_t this, int32_t info, int32_t nId, int32_t nOrigin) { struct vector_unsignedchar_std__allocator_unsignedchar__ v1; // 0x2303 // 0x2240 g3 = this; g7 = info; int32_t v2 = *(int32_t *)(this + 180); // 0x2264 int32_t v3 = 24 * nOrigin; // 0x226d int32_t v4 = v2 + v3; // 0x2272 int32_t v5 = *(int32_t *)(v4 + 8); // 0x2278 g1 = v5; int32_t v6 = v5; // 0x229910 if (v5 == 0) { // bb v6 = function_23b0(v3); // branch -> 0x2287 } // branch -> 0x2299 lab_0x2299: while (true) { int32_t v7 = v6; // 0x2299 // branch -> 0x2299 while (true) { // 0x2299 int32_t v8; // ecx if (*(int32_t *)(v7 + 16) < nId) { int32_t v9 = *(int32_t *)(v7 + 12); // 0x229e g1 = v9; if (v9 == 0) { // break -> 0x22a5 break; } v7 = v9; // continue -> 0x2299 continue; } else { // 0x2290 v8 = v7; int32_t v10 = *(int32_t *)(v7 + 8); // 0x2292 g1 = v10; if (v10 == 0) { // break (via goto) -> 0x22a5 goto lab_0x22a5; } v6 = v10; // continue (via goto) -> 0x2299 goto lab_0x2299; } lab_0x22a5:; int32_t v11 = v7; // 0x22ad if (v4 + 4 == v7) { // bb61 g1 = function_23b0(nId); v11 = v8; // branch -> 0x22ad } // 0x22ad if (nId < *(int32_t *)(v11 + 16)) { // bb62 g1 = function_23b0(nId); // branch -> 0x22b6 } int32_t v12 = g3; // 0x22b6 int32_t v13; // 0x2308 int32_t v14; // 0x2327 int32_t v15; // 0x232b int32_t v16; // 0x2339 int32_t v17; // 0x2371 int32_t v18; // 0x22f9 int32_t v19; // 0x234d int32_t * v20; // 0x22ea int32_t v21; // 0x235c int32_t v22; // 0x2308 int32_t v23; // 0x2311 int32_t v24; // 0x2314 int32_t v25; // 0x2321 int32_t v26; // 0x2339 int32_t v27; // 0x236a int32_t v28; int32_t * v29; if (v2 != *(int32_t *)(v12 + 184)) { // branch -> 0x22c8 int32_t v30; // 0x22df while (true) { int32_t v31 = _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE5eraseERKi(v2, &nId); // 0x22cf g1 = v31; if (v31 != 0) { int32_t * v32 = (int32_t *)(g7 + 68); // 0x22d8 *v32 = *v32 - 1; // branch -> 0x22dc } int32_t v33 = g5 + 24; // 0x22dc v30 = g3; if (v33 == *(int32_t *)(v30 + 184)) { // break -> 0x22e7 break; } v2 = v33; // continue -> 0x22c8 } // 0x22e7 v20 = (int32_t *)(v30 + 176); *v20 = *v20 - 1; if (*(int32_t *)(g7 + 68) != 0) { // bb64 function_24e1(); // branch -> 0x22f9 } // 0x22f9 v18 = g3 + 84; g2 = v18; v1 = (struct vector_unsignedchar_std__allocator_unsignedchar__){ .e0 = 0 }; v1.e0 = v18; _ZNK9CAddrInfo14GetTriedBucketERKSt6vectorIhSaIhEE(g7, v1); g1 = (int32_t)&v29; v13 = g3; v22 = *(int32_t *)(v13 + 164); v23 = v22 + 4 * ((int32_t)&v29 + 2 * (int32_t)&v29); g5 = v23; v24 = *(int32_t *)(v22 + 4 * ((int32_t)&v29 + 2 * (int32_t)&v29) + 4); g6 = v24; v15 = v13; v14 = (int32_t)&v29; if (v24 - *(int32_t *)v23 < 256) { // bb66 v25 = function_24a8(); v15 = g3; v14 = v25; // branch -> 0x2327 } // 0x2327 _ZN8CAddrMan11SelectTriedEi(v15, v14); v16 = g3; v26 = *(int32_t *)(v16 + (int32_t)&g23); if (v26 == 0) { // 0x2388 return; } // 0x2340 v19 = v16 + (int32_t)&g22; v21 = *(int32_t *)(*(int32_t *)g5 + 4 * (int32_t)&v29); v28 = v19; // branch -> 0x2371 while (true) { // 0x2371 v17 = v26; // branch -> 0x2371 lab_0x2371:; int32_t v34; // 0x2383 while (true) { // 0x2371 if (*(int32_t *)(v17 + 16) < v21) { int32_t v35 = *(int32_t *)(v17 + 12); // 0x2376 if (v35 == 0) { v34 = v28; // break -> 0x237d break; } v17 = v35; // continue -> 0x2371 continue; } else { // 0x2368 v27 = *(int32_t *)(v17 + 8); if (v27 == 0) { v34 = v17; // break (via goto) -> 0x237d goto lab_0x237d; } v28 = v17; // continue (via goto) -> 0x2371 goto lab_0x2371_2; } // 0x237d if (v19 == v34) { // 0x2388 return; } uint32_t v36 = *(int32_t *)(v34 + 16); // 0x2383 if (v36 <= v21) { // bb67 function_23d8(); // branch -> 0x2388 } // 0x2388 return; } lab_0x237d: // 0x237d if (v19 == v34) { // 0x2388 return; } // 0x2383 if (*(int32_t *)(v34 + 16) <= v21) { // bb67 function_23d8(); // branch -> 0x2388 } // 0x2388 return; } } // 0x22e7 v20 = (int32_t *)(v12 + 176); *v20 = *v20 - 1; if (*(int32_t *)(g7 + 68) != 0) { // bb64 function_24e1(); // branch -> 0x22f9 } // 0x22f9 v18 = g3 + 84; g2 = v18; v1 = (struct vector_unsignedchar_std__allocator_unsignedchar__){ .e0 = 0 }; v1.e0 = v18; _ZNK9CAddrInfo14GetTriedBucketERKSt6vectorIhSaIhEE(g7, v1); g1 = (int32_t)&v29; v13 = g3; v22 = *(int32_t *)(v13 + 164); v23 = v22 + 4 * ((int32_t)&v29 + 2 * (int32_t)&v29); g5 = v23; v24 = *(int32_t *)(v22 + 4 * ((int32_t)&v29 + 2 * (int32_t)&v29) + 4); g6 = v24; v15 = v13; v14 = (int32_t)&v29; if (v24 - *(int32_t *)v23 < 256) { // bb66 v25 = function_24a8(); v15 = g3; v14 = v25; // branch -> 0x2327 } // 0x2327 _ZN8CAddrMan11SelectTriedEi(v15, v14); v16 = g3; v26 = *(int32_t *)(v16 + (int32_t)&g23); if (v26 == 0) { // 0x2388 return; } // 0x2340 v19 = v16 + (int32_t)&g22; v21 = *(int32_t *)(*(int32_t *)g5 + 4 * (int32_t)&v29); v28 = v19; v27 = v26; // branch -> 0x2371 lab_0x2371_2: while (true) { // 0x2371 v17 = v27; // branch -> 0x2371 goto lab_0x2371; } } } } // Address range: 0x23b0 - 0x23cf int32_t function_23b0(int32_t a1) { // 0x23b0 return g1; } // Address range: 0x23d8 - 0x24a7 int32_t function_23d8(void) { struct vector_unsignedchar_std__allocator_unsignedchar__ v1; // 0x23fd int32_t v2 = g3 + 100; // 0x23dc int32_t v3; int32_t v4 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v2, (int32_t *)v3); // 0x23ea int32_t v5 = v4 + 40; // 0x23f3 v1 = (struct vector_unsignedchar_std__allocator_unsignedchar__){ .e0 = 0 }; v1.e0 = v5; int32_t * v6; _ZNK9CAddrInfo12GetNewBucketERKSt6vectorIhSaIhEERK8CNetAddr(v4, v1, (int32_t)&v6); int32_t v7 = *(int32_t *)(g3 + 180); // 0x2409 g2 = v7 + 8 * ((int32_t)&v6 + 2 * (int32_t)&v6); uint32_t v8; int32_t v9 = _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(v2, (int32_t *)(g5 + v8)); // 0x241f *(int32_t *)(v9 + 68) = 1; uint32_t v10 = *(int32_t *)(g2 + 20); // 0x242f *(char *)(v9 + 72) = 0; int32_t v11 = g5 + v5; // 0x2490 int32_t v12 = v11; // edx int32_t v13; // bp+48 if (v10 < 63 || v10 == 63) { // 0x2490 _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE16_M_insert_uniqueERKi(&v13, v11); // branch -> 0x245c } else { // 0x243d uint32_t v14; int32_t v15 = *(int32_t *)(g3 + 180) + v14; // 0x2447 v12 = v15; _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE16_M_insert_uniqueERKi(&v13, v15); // branch -> 0x245c } int32_t * v16 = (int32_t *)(g3 + 176); // 0x2466 *v16 = *v16 + 1; *(int32_t *)(4 * v2 + g5) = v12; *(char *)(g7 + 72) = 1; int32_t v17; int32_t v18 = *(int32_t *)20 ^ v17; // 0x2478 g1 = v18; int32_t result = v18; // 0x248c if (v18 != 0) { // bb result = function_2505(); // branch -> 0x2485 } // 0x2485 return result; } // Address range: 0x24a8 - 0x24e1 int32_t function_24a8(void) { int32_t v1 = g6; // 0x24a8 int32_t v2 = g5; // 0x24a8 if (v1 == *(int32_t *)(v2 + 8)) { // 0x24cb g1 = _ZNSt6vectorIiSaIiEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPiS1_EERKi(v2, (int32_t *)v1); // branch -> 0x24be } else { // 0x24ad int32_t v3; // 0x24b8 int32_t v4; // 0x24bb if (v1 != 0) { // 0x24b2 v4 = g5; v3 = g6 + 4; // branch -> 0x24b8 } else { v4 = v2; v3 = 4; } // 0x24b8 *(int32_t *)(v4 + 4) = v3; // branch -> 0x24be } int32_t * v5 = (int32_t *)(g3 + 160); // 0x24be *v5 = *v5 + 1; *(char *)(g7 + 72) = 1; return g1; } // Address range: 0x24e1 - 0x2500 int32_t function_24e1(void) { // 0x24e1 return g1; } // Address range: 0x2505 - 0x2506 int32_t function_2505(void) { // 0x2505 return g1; } // From module: /parallelcoin/src/addrman.h // Address range: 0x2510 - 0x2564 // Line range: 262 - 311 // Demangled: CAddrMan::Good_(CService const &, long long) void _ZN8CAddrMan5Good_ERK8CServicex(int32_t this, int32_t addr, int64_t nTime) { int32_t v1 = 0; // bp-40 _ZN8CAddrMan4FindERK8CNetAddrPi(this, addr, &v1); } // Address range: 0x2589 - 0x25a2 int32_t function_2589(int32_t a1) { int32_t v1 = *(int32_t *)20 ^ a1; // 0x258d g1 = v1; int32_t result = v1; // 0x25a1 if (v1 != 0) { // bb result = function_26c7(); // branch -> 0x259a } // 0x259a return result; } // Address range: 0x25c2 - 0x25d7 int32_t function_25c2(int16_t a1) { int32_t v1 = 0; // ebx int32_t * v2 = (int32_t *)(v1 + 0xb48b); // 0x25c2 *v2 = *v2 - 1; char * v3 = (char *)(v1 + 0xb893); // 0x25c8 int32_t v4 = 0; // ecx *v3 = (char)v4 + *v3; char * v5 = (char *)(v4 + 0x2928244c); // 0x25ce *v5 = *v5 + (char)v4; return 0; } // Address range: 0x25d7 - 0x2658 int32_t function_25d7(int32_t a1, int32_t a2, int32_t a3) { int32_t v1 = 0; // eax int32_t v2 = 0; // edi *(int32_t *)v2 = v1; bool v3 = false; // df int32_t v4 = (v3 ? -4 : 4) + v2; // 0x25da *(char *)v4 = (char)v1; int32_t v5 = (v3 ? -1 : 1) + v4; // 0x25db *(char *)v5 = (char)v1; int32_t v6 = (v3 ? -1 : 1) + v5; // 0x25dc *(char *)v6 = (char)v1; int32_t v7 = 0; // edx int32_t v8; // 0x25ec if (v7 == 0) { // bb v8 = function_2589(0); // branch -> 0x25e6 } else { // 0x25d7 v8 = v1; // branch -> 0x25e6 } int32_t v9 = v7 + v8; // 0x25ea g5 = v8; int32_t v10 = (int64_t)v8 % (int64_t)v7; // 0x2600 int32_t v11 = 24 * v10 + a2; // 0x2607 int32_t v12 = *(int32_t *)(v11 + 8); // 0x260a int32_t v13 = v12; // 0x26299 if (v12 == 0) { // bb129 v13 = function_26a0(v9); v11 = g2; // branch -> 0x2615 } int32_t v14 = v11 + 4; // 0x2615 int32_t v15 = v14; // branch -> 0x2629 lab_0x2629: while (true) { int32_t v16 = v13; // 0x2629 // branch -> 0x2629 int32_t v17; // 0x2635 int32_t v18; // 0x2639 int32_t result3; // 0x2643 int32_t result2; // 0x265418 int32_t v19; // 0x265419 while (true) { // 0x2629 if (a3 > *(int32_t *)(v16 + 16)) { int32_t v20 = *(int32_t *)(v16 + 12); // 0x262e if (v20 == 0) { v19 = v20; v17 = v15; // break -> 0x2635 break; } v16 = v20; // continue -> 0x2629 continue; } else { int32_t v21 = *(int32_t *)(v16 + 8); // 0x2622 if (v21 == 0) { v19 = 0; v17 = v16; // break (via goto) -> 0x2635 goto lab_0x2635; } v15 = v16; v13 = v21; // continue (via goto) -> 0x2629 goto lab_0x2629; } // 0x2635 result2 = v19; v18 = v17; if (v17 == v14) { int32_t v22 = function_26a0(v9); // 0x2637 v1 = v22; int32_t v23 = a3; int32_t v24 = g3; result2 = v22; v18 = v24; a3 = v23; // branch -> 0x2639 } int32_t v25 = *(int32_t *)(v18 + 16); // 0x2639 if (a3 < v25) { int32_t v26 = function_26a0(v9); // 0x263c v1 = v26; result2 = v26; // branch -> 0x263e } int32_t v27 = v7; // 0x263e int32_t result = result2; // 0x2654 int32_t v28; // bp+56 if (v27 != -1) { // 0x2649 a3 = a1; v2 = &v28; return result; } // bb133 result3 = function_2589(v9); v1 = result3; result = result3; // branch -> 0x2649 // 0x2649 a3 = a1; v2 = &v28; return result; } lab_0x2635: // 0x2635 result2 = v19; v18 = v17; if (v17 == v14) { // bb131 result2 = function_26a0(v9); v18 = g3; // branch -> 0x2639 } // 0x2639 if (a3 < *(int32_t *)(v18 + 16)) { // bb132 result2 = function_26a0(v9); // branch -> 0x263e } // 0x263e if (v10 != -1) { // 0x2649 return result2; } // bb133 result3 = function_2589(v9); // branch -> 0x2649 // 0x2649 return result3; } } // Address range: 0x267b - 0x269d int32_t function_267b(int32_t a1, int32_t a2) { int32_t * v1 = (int32_t *)-0x76cbdbbc; // 0x267b *v1 = *v1 - 1; int32_t * v2; _ZN8CAddrMan9MakeTriedER9CAddrInfoii(a2, 0, 0, (int32_t)&v2); return function_2589(a2); } // Address range: 0x26a0 - 0x26b5 int32_t function_26a0(int32_t a1) { // 0x26a0 int32_t * v1; return function_2589((int32_t)&v1); } // Address range: 0x26b6 - 0x26b7 int32_t function_26b6(void) { // 0x26b6 return 0; } // Address range: 0x26c7 - 0x26c8 int32_t function_26c7(void) { // 0x26c7 return g1; } // Address range: 0x26d0 - 0x26fa // Demangled: boost::exception_detail::clone_base::~clone_base() int32_t _ZN5boost16exception_detail10clone_baseD1Ev(int32_t * a1) { // 0x26d0 *a1 = (int32_t)&g16; // 0x26f6 return 0; } // Address range: 0x2700 - 0x272a // Demangled: boost::detail::sp_counted_base::~sp_counted_base() int32_t _ZN5boost6detail15sp_counted_baseD1Ev(int32_t * a1) { // 0x2700 *a1 = (int32_t)&g18; // 0x2726 return 0; } // Address range: 0x2730 - 0x2780 // From class: N5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEEE // Type: virtual member function // Demangled: boost::detail::sp_counted_base::destroy() int32_t _ZN5boost6detail15sp_counted_base7destroyEv(int32_t * a1) { // 0x2730 if (a1 == NULL) { // 0x2775 return 0; // 0x2779 return 0; } // 0x2755 return *(int32_t *)(*a1 + 4); // 0x2779 return 0; } // Address range: 0x2790 - 0x27ba // Demangled: boost::system::error_category::~error_category() int32_t _ZN5boost6system14error_categoryD1Ev(int32_t * a1) { // 0x2790 *a1 = (int32_t)&g10; // 0x27b6 return 0; } // Address range: 0x27c0 - 0x27f4 // Demangled: boost::system::error_category::default_error_condition(int) const int32_t _ZNK5boost6system14error_category23default_error_conditionEi(int32_t * a1, int32_t a2, int32_t a3) { int32_t result = (int32_t)a1; *a1 = a3; *(int32_t *)(result + 4) = a2; // 0x27ee return result; } // Address range: 0x2800 - 0x2864 // Demangled: boost::system::error_category::equivalent(int, boost::system::error_condition const &) const int32_t _ZNK5boost6system14error_category10equivalentEiRKNS0_15error_conditionE(int32_t * a1, int32_t a2, int32_t a3) { int32_t result = 0; // 0x285f int32_t v1; if (*(int32_t *)(a3 + 4) == v1) { // 0x2858 int32_t v2; result = *(int32_t *)a3 == v2; // branch -> 0x2844 } // 0x2844 int32_t v3; if (*(int32_t *)20 != v3) { // 0x285f } // 0x2851 return result; } // Address range: 0x2870 - 0x28b4 // Demangled: boost::system::error_category::equivalent(boost::system::error_code const &, int) const int32_t _ZNK5boost6system14error_category10equivalentERKNS0_10error_codeEi(int32_t a1, int32_t * a2, int32_t a3) { int32_t result = 0; // 0x28af if (*(int32_t *)((int32_t)a2 + 4) == a1) { // 0x28a8 result = *a2 == a3; // branch -> 0x2891 } // 0x289e return result; } // Address range: 0x28c0 - 0x28ea // From class: N5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEEE // Type: virtual member function // Demangled: boost::detail::sp_counted_impl_p<boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_> >::~sp_counted_impl_p() int32_t _ZN5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEED1Ev(int32_t * a1) { // 0x28c0 *a1 = (int32_t)&g18; // 0x28e6 return 0; } // Address range: 0x28f0 - 0x2940 // From class: N5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEEE // Type: virtual member function // Demangled: boost::detail::sp_counted_impl_p<boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_> >::dispose() int32_t _ZN5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEE7disposeEv(int32_t a1) { int32_t v1 = *(int32_t *)(a1 + 12); // 0x2903 if (v1 == 0) { // 0x2935 return 0; // 0x2939 return 0; } // 0x2917 return *(int32_t *)(*(int32_t *)v1 + 4); // 0x2939 return 0; } // Address range: 0x2950 - 0x2970 // From class: N5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEEE // Type: virtual member function // Demangled: boost::detail::sp_counted_impl_p<boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_> >::get_deleter(std::type_info const &) int32_t _ZN5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEE11get_deleterERKSt9type_info(void) { // 0x296c return 0; } // Address range: 0x2980 - 0x29ae // From class: N5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEEE // Type: virtual member function // Demangled: boost::detail::sp_counted_impl_p<boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_> >::~sp_counted_impl_p() int32_t _ZN5boost6detail17sp_counted_impl_pINS_16exception_detail10clone_implINS2_10bad_alloc_EEEED0Ev(int32_t * a1) { // 0x2980 g1 = (int32_t)a1; *a1 = (int32_t)&g18; int32_t result; // 0x2980 result = g1; // branch -> 0x29a7 // 0x29a7 return result; } // Address range: 0x29b3 - 0x29b8 int32_t function_29b3(int32_t a1) { // 0x29b3 return g1; } // Address range: 0x29c0 - 0x29ee // Demangled: boost::detail::sp_counted_base::~sp_counted_base() int32_t _ZN5boost6detail15sp_counted_baseD0Ev(int32_t * a1) { // 0x29c0 g1 = (int32_t)a1; *a1 = (int32_t)&g18; int32_t result; // 0x29c0 result = g1; // branch -> 0x29e7 // 0x29e7 return result; } // Address range: 0x29f3 - 0x29f4 int32_t function_29f3(int32_t a1) { // 0x29f3 return g1; } // Address range: 0x2a00 - 0x2a2e // Demangled: boost::exception_detail::clone_base::~clone_base() int32_t _ZN5boost16exception_detail10clone_baseD0Ev(int32_t * a1) { // 0x2a00 g1 = (int32_t)a1; *a1 = (int32_t)&g16; int32_t result; // 0x2a00 result = g1; // branch -> 0x2a27 // 0x2a27 return result; } // Address range: 0x2a33 - 0x2a38 int32_t function_2a33(int32_t a1) { // 0x2a33 return g1; } // Address range: 0x2a40 - 0x2a6e // Demangled: boost::system::error_category::~error_category() int32_t _ZN5boost6system14error_categoryD0Ev(int32_t * a1) { // 0x2a40 g1 = (int32_t)a1; *a1 = (int32_t)&g10; int32_t result; // 0x2a40 result = g1; // branch -> 0x2a67 // 0x2a67 return result; } // Address range: 0x2a73 - 0x2a78 int32_t function_2a73(int32_t a1) { // 0x2a73 return g1; } // Address range: 0x2a80 - 0x2a87 int32_t _ZThn24_NK5boost16exception_detail10clone_implINS0_10bad_alloc_EE7rethrowEv(int32_t a1) { // 0x2a80 return _ZNK5boost16exception_detail10clone_implINS0_10bad_alloc_EE7rethrowEv(a1 - 24); } // Address range: 0x2a90 - 0x2aac // From class: N5boost16exception_detail10clone_implINS0_10bad_alloc_EEE // Type: virtual member function // Demangled: boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_>::rethrow() const int32_t _ZNK5boost16exception_detail10clone_implINS0_10bad_alloc_EE7rethrowEv(int32_t a1) { // 0x2a90 return 0; } // Address range: 0x2ab2 - 0x2ab3 int32_t function_2ab2(void) { // 0x2ab2 return 0; } // Address range: 0x2d1a - 0x2d48 int32_t _ZN11CDataStream5writeEPKci_part_346(void) { // 0x2d1a return 0; } // Address range: 0x2d50 - 0x2d57 int32_t _ZThn24_NK5boost16exception_detail10clone_implINS0_10bad_alloc_EE5cloneEv(int32_t a1) { // 0x2d50 return _ZNK5boost16exception_detail10clone_implINS0_10bad_alloc_EE5cloneEv2(a1 - 24); } // Address range: 0x2d60 - 0x2de1 // From class: N5boost16exception_detail10clone_implINS0_10bad_alloc_EEE // Type: virtual member function int32_t _ZNK5boost16exception_detail10clone_implINS0_10bad_alloc_EE5cloneEv2(int32_t a1) { // 0x2d60 abort(); // UNREACHABLE } // Address range: 0x2df0 - 0x2e46 // From class: N5boost6system12system_errorE // Type: virtual member function // Demangled: boost::system::system_error::what() const int32_t _ZNK5boost6system12system_error4whatEv(int32_t a1) { int32_t result = *(int32_t *)(a1 + 16); // 0x2e0f if (*(int32_t *)(result - 12) == 0) { // 0x2e40 return 0; } // 0x2e19 g1 = result; // 0x2e2c return result; } // Address range: 0x2e4d - 0x2e50 int32_t function_2e4d(void) { // 0x2e4d return 0; } // Address range: 0x2e6f - 0x2e70 int32_t function_2e6f(void) { // 0x2e6f return g1; } // Address range: 0x2e98 - 0x2ea8 int32_t function_2e98(void) { // 0x2e98 return 0; } // Address range: 0x2ec0 - 0x2ec2 int32_t function_2ec0(void) { // 0x2ec0 return function_2e6f(); } // Address range: 0x2ec2 - 0x2ec3 int32_t function_2ec2(int32_t a1, int32_t a2, int32_t a3, int32_t a4) { // 0x2ec2 return g1; } // Address range: 0x2ed3 - 0x2ed4 int32_t function_2ed3(void) { // 0x2ed3 return g1; } // Address range: 0x2ee4 - 0x2ee5 int32_t function_2ee4(void) { // 0x2ee4 return 0; } // Address range: 0x2eea - 0x2eef int32_t function_2eea(void) { // 0x2eea return 0; } // Address range: 0x2ef0 - 0x2ef2 int32_t function_2ef0(void) { // 0x2ef0 return function_2ed3(); } // Address range: 0x2ef3 - 0x2ef6 int32_t function_2ef3(void) { // 0x2ef3 return 0; } // Address range: 0x2f10 - 0x2f95 // Demangled: boost::shared_ptr<boost::exception_detail::clone_base const>::~shared_ptr() int32_t _ZN5boost10shared_ptrIKNS_16exception_detail10clone_baseEED1Ev(int32_t a1) { int32_t v1 = *(int32_t *)(a1 + 4); // 0x2f2b if (v1 != 0) { int32_t * v2 = (int32_t *)(v1 + 4); // 0x2f39 int32_t v3 = *v2 - 1; // 0x2f39 *v2 = v3; if (v3 == 0) { int32_t * v4 = (int32_t *)(v1 + 8); // 0x2f68 int32_t v5 = *v4; // 0x2f68 *v4 = v5 - 1; if (v5 == 1) { // 0x2f7f return *(int32_t *)(*(int32_t *)v1 + 12); } // 0x2f50 return 0; } } // 0x2f50 return 0; } // Address range: 0x2fa0 - 0x2fc7 // From class: N5boost6system12system_errorE // Type: constructor // Demangled: boost::system::system_error::~system_error() int32_t _ZN5boost6system12system_errorD1Ev(int32_t * a1) { // 0x2fa0 *a1 = (int32_t)&g11; return *(int32_t *)((int32_t)a1 + 16); } // Address range: 0x2fd6 - 0x2ff0 int32_t function_2fd6(int32_t a1, int32_t a2) { int32_t * v1 = (int32_t *)0x651c2444; // 0x2fd6 *v1 = *v1 - 1; int32_t v2 = *(int32_t *)20; // 0x2fdc g1 = v2; int32_t result = v2; // 0x2fef if (v2 != 0) { // bb result = function_3017(); // branch -> 0x2fe4 } // 0x2fe4 return result; } // Address range: 0x2ff0 - 0x2ff1 int32_t function_2ff0(void) { // 0x2ff0 return 0; } // Address range: 0x3015 - 0x3017 int32_t function_3015(void) { // 0x3015 return 0; } // Address range: 0x3017 - 0x3018 int32_t function_3017(void) { // 0x3017 return g1; } // Address range: 0x301c - 0x3027 int32_t function_301c(void) { int32_t result = 0; // eax int32_t * v1 = (int32_t *)(result - 4); // 0x301c *v1 = *v1 - 1; return result; } // Address range: 0x3030 - 0x3057 // From class: N5boost6system12system_errorE // Type: constructor // Demangled: boost::system::system_error::~system_error() int32_t _ZN5boost6system12system_errorD0Ev(int32_t * a1) { // 0x3030 *a1 = (int32_t)&g11; return *(int32_t *)((int32_t)a1 + 16); } // Address range: 0x306e - 0x3088 int32_t function_306e(int32_t a1, int32_t a2) { int32_t * v1 = (int32_t *)0x651c2444; // 0x306e *v1 = *v1 - 1; int32_t v2 = *(int32_t *)20; // 0x3074 g1 = v2; int32_t result = v2; // 0x3087 if (v2 != 0) { // bb result = function_30af(); // branch -> 0x307c } // 0x307c return result; } // Address range: 0x3088 - 0x3089 int32_t function_3088(void) { // 0x3088 return 0; } // Address range: 0x30ad - 0x30af int32_t function_30ad(void) { // 0x30ad return 0; } // Address range: 0x30af - 0x30b0 int32_t function_30af(void) { // 0x30af return g1; } // Address range: 0x30b4 - 0x30bf int32_t function_30b4(void) { int32_t result = 0; // eax int32_t * v1 = (int32_t *)(result - 4); // 0x30b4 *v1 = *v1 - 1; return result; } // Address range: 0x30c0 - 0x3111 // Demangled: boost::exception::~exception() int32_t _ZN5boost9exceptionD1Ev(int32_t * a1) { int32_t v1 = (int32_t)a1; int32_t v2 = *(int32_t *)(v1 + 4); // 0x30d4 *a1 = (int32_t)&g13; if (v2 != 0) { // 0x30e1 if ((char)v2 != 0) { // 0x3108 *(int32_t *)(v1 + 4) = 0; // branch -> 0x30ed } } // 0x30fa return 0; } // Address range: 0x3117 - 0x311a int32_t function_3117(void) { // 0x3117 return 0; } // Address range: 0x3130 - 0x313a int32_t _ZThn20_N5boost16exception_detail10bad_alloc_D1Ev(int32_t a1) { // 0x3130 return function_6270(a1 - 20); } // Address range: 0x3140 - 0x3167 // From class: N5boost16exception_detail10bad_alloc_E // Type: constructor // Demangled: boost::exception_detail::bad_alloc_::~bad_alloc_() int32_t _ZN5boost16exception_detail10bad_alloc_D1Ev(int32_t * a1) { // 0x3140 *a1 = (int32_t)&g14; int32_t result = (int32_t)a1 + 20; // 0x315a *(int32_t *)result = (int32_t)&g15; return result; } // Address range: 0x316b - 0x3186 int32_t function_316b(int32_t a1) { int32_t v1 = 0; // ebx int32_t * v2 = (int32_t *)(v1 + 0x651c2444); // 0x316b *v2 = *v2 - 1; int32_t result = *(int32_t *)20; // 0x3171 g1 = result; if (result != 0) { // 0x3186 return result; } // 0x3179 return function_6200(v1); } // Address range: 0x3190 - 0x319a int32_t _ZThn24_N5boost16exception_detail10clone_implINS0_10bad_alloc_EED1Ev(int32_t a1) { // 0x3190 return function_6340(a1 - 24); } // Address range: 0x31a0 - 0x31aa int32_t _ZThn20_N5boost16exception_detail10clone_implINS0_10bad_alloc_EED1Ev(int32_t a1) { // 0x31a0 return function_6340(a1 - 20); } // Address range: 0x31b0 - 0x31de // From class: N5boost16exception_detail10bad_alloc_E // Type: constructor // Demangled: boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_>::~clone_impl() int32_t _ZN5boost16exception_detail10clone_implINS0_10bad_alloc_EED1Ev(int32_t * a1) { int32_t v1 = (int32_t)a1; *(int32_t *)(v1 + 24) = (int32_t)&g16; *(int32_t *)v1 = (int32_t)&g14; *(int32_t *)(v1 + 20) = (int32_t)&g15; return v1 + 20; } // Address range: 0x31e2 - 0x31fd int32_t function_31e2(int32_t a1) { int32_t v1 = 0; // ebx int32_t * v2 = (int32_t *)(v1 + 0x651c2444); // 0x31e2 *v2 = *v2 - 1; int32_t result = *(int32_t *)20; // 0x31e8 g1 = result; if (result != 0) { // 0x31fd return result; } // 0x31f0 return function_6270(v1); } // Address range: 0x3210 - 0x3217 int32_t _ZThn20_N5boost16exception_detail10bad_alloc_D0Ev(int32_t a1) { // 0x3210 return _ZN5boost16exception_detail10bad_alloc_D0Ev((int32_t *)(a1 - 20)); } // Address range: 0x3220 - 0x3247 // From class: N5boost16exception_detail10bad_alloc_E // Type: constructor // Demangled: boost::exception_detail::bad_alloc_::~bad_alloc_() int32_t _ZN5boost16exception_detail10bad_alloc_D0Ev(int32_t * a1) { // 0x3220 *a1 = (int32_t)&g14; int32_t result = (int32_t)a1 + 20; // 0x323a *(int32_t *)result = (int32_t)&g15; return result; } // Address range: 0x3280 - 0x3287 int32_t _ZThn24_N5boost16exception_detail10clone_implINS0_10bad_alloc_EED0Ev(int32_t a1) { // 0x3280 return _ZN5boost16exception_detail10clone_implINS0_10bad_alloc_EED0Ev((int32_t *)(a1 - 24)); } // Address range: 0x3290 - 0x3297 int32_t _ZThn20_N5boost16exception_detail10clone_implINS0_10bad_alloc_EED0Ev(int32_t a1) { // 0x3290 return _ZN5boost16exception_detail10clone_implINS0_10bad_alloc_EED0Ev((int32_t *)(a1 - 20)); } // Address range: 0x32a0 - 0x32ce // From class: N5boost16exception_detail10bad_alloc_E // Type: constructor // Demangled: boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_>::~clone_impl() int32_t _ZN5boost16exception_detail10clone_implINS0_10bad_alloc_EED0Ev(int32_t * a1) { int32_t v1 = (int32_t)a1; *(int32_t *)(v1 + 24) = (int32_t)&g16; *(int32_t *)v1 = (int32_t)&g14; *(int32_t *)(v1 + 20) = (int32_t)&g15; return v1 + 20; } // Address range: 0x3300 - 0x3331 // Demangled: boost::exception::~exception() int32_t _ZN5boost9exceptionD0Ev(int32_t a1) { // 0x3300 unknown_63c0(a1); g1 = 0; // 0x3329 return 0; } // Address range: 0x3336 - 0x3337 int32_t function_3336(void) { // 0x3336 return g1; } // Address range: 0x3340 - 0x3367 // Demangled: CDataStream::~CDataStream() int32_t _ZN11CDataStreamD1Ev(int32_t * a1) { // 0x3340 g6 = 0; int32_t v1 = *a1; // 0x3355 int32_t v2 = *(int32_t *)((int32_t)a1 + 8); // 0x3357 g1 = v2; if (v1 == 0) { // bb v2 = function_3388(*(int32_t *)20); // branch -> 0x335e } // 0x335e return v2 - v1; } // Address range: 0x3385 - 0x3388 int32_t function_3385(void) { // 0x3385 return 0; } // Address range: 0x3388 - 0x33a0 int32_t function_3388(int32_t a1) { int32_t v1 = *(int32_t *)20 ^ a1; // 0x338c g6 = v1; if (v1 != 0) { // 0x339a return g1; } // 0x3395 return g1; } // Address range: 0x33b0 - 0x33f0 // Demangled: boost::exception_detail::refcount_ptr<boost::exception_detail::error_info_container>::~refcount_ptr() int32_t _ZN5boost16exception_detail12refcount_ptrINS0_20error_info_containerEED1Ev(int32_t * a1) { int32_t v1 = *a1; // 0x33c4 if (v1 != 0) { // 0x33ca if ((char)v1 != 0) { // 0x33e8 *a1 = 0; // branch -> 0x33d6 } } // 0x33e3 return 0; } // Address range: 0x3400 - 0x3504 // Demangled: boost::exception_detail::copy_boost_exception(boost::exception *, boost::exception const *) int32_t _ZN5boost16exception_detail20copy_boost_exceptionEPNS_9exceptionEPKS1_(int32_t a1, int32_t a2) { // 0x3400 if (*(int32_t *)(a2 + 4) != 0) { // 0x343a int32_t v1; if (v1 != 0) { // 0x3459 // branch -> 0x3461 } // 0x3461 // branch -> 0x3489 } int32_t v2 = 0; // edi *(int32_t *)(a1 + 12) = *(int32_t *)(a2 + 12); *(int32_t *)(a1 + 16) = *(int32_t *)(a2 + 16); *(int32_t *)(a1 + 8) = *(int32_t *)(a2 + 8); int32_t v3 = *(int32_t *)(a1 + 4); // 0x349b if (v3 != 0) { // 0x34a2 *(int32_t *)g8 = v3; // branch -> 0x34aa } // 0x34aa *(int32_t *)(a1 + 4) = v2; if (v2 != 0) { // 0x34b1 *(int32_t *)g8 = v2; // branch -> 0x34b9 } int32_t v4 = *(int32_t *)(g8 + 20); // 0x34b9 if (v4 != 0) { // 0x34c1 *(int32_t *)g8 = v4; // branch -> 0x34c9 } int32_t result = *(int32_t *)20 ^ *(int32_t *)(g8 + 28); // 0x34cd if (result != 0) { // 0x3504 return result; } // 0x34d6 return result; } // Address range: 0x350a - 0x350b int32_t function_350a(void) { // 0x350a return 0; } // Address range: 0x3513 - 0x3514 int32_t function_3513(void) { // 0x3513 return g1; } // Address range: 0x3527 - 0x352b int32_t function_3527(void) { // 0x3527 return function_3513(); } // Address range: 0x3690 - 0x378a // From class: N5boost16exception_detail10clone_implINS0_10bad_alloc_EEE // Type: constructor int32_t _ZN5boost16exception_detail13get_bad_allocILi42EEENS_10shared_ptrIKNS0_10clone_baseEEEv(int32_t * a1) { int32_t v1 = (int32_t)&g14; // bp-56 int32_t v2 = (int32_t)&g17; // bp-84 g1 = unknown_6a90((int32_t)&v2, (int32_t)&v1); function_37e8((int32_t)"boost::exception_ptr boost::exception_detail::get_bad_alloc() [with int Dummy = 42, boost::exception_ptr = boost::shared_ptr<const boost::exception_detail::clone_base>]", (int32_t)"/usr/include/boost/exception/detail/exception_ptr.hpp", 81); *a1 = 0; *(int32_t *)((int32_t)a1 + 4) = (int32_t)&g19; *(int32_t *)&g20 = (int32_t)"N5boost6detail15sp_counted_baseE" + 1; int32_t v3; // bp-64 return &v3; } // Address range: 0x37b2 - 0x37e4 int32_t function_37b2(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5) { int32_t * v1 = (int32_t *)-0x6a17dbc4; // 0x37b2 uint32_t v2 = *v1; // 0x37b2 *v1 = v2 - 1; int32_t v3 = 0; // 0x37b8 unsigned char v4 = (char)v3; // 0x37b8 bool v5 = false; // 0x37b8 int32_t v6; if (v2 % 16 > 16 || (v4 & 14) > 9) { char v7 = v4 - 6; // 0x37b8 unsigned char v8 = v5 | v4 > 153 ? v7 - (char)&g21 : v7; // 0x37b8 v6 = (int32_t)v8 | v3 & -256; // branch -> bb108 } else { bool v9 = v5 | v4 > 153; // 0x37b8 int32_t v10 = v9 ? v3 - (int32_t)(char)&g21 : v3; // 0x37b8 v6 = v10 & 255 | v3 & -256; // branch -> bb108 } char * v11 = (char *)v6; // 0x37b9 *v11 = *v11 + (char)v6; int32_t result = 0; // ebx g1 = result; if (*(int32_t *)20 != a1) { // bb109 result = function_38b4(); // branch -> 0x37ce } // 0x37ce return result; } // Address range: 0x37e8 - 0x37ef int32_t function_37e8(int32_t a1, int32_t a2, int32_t a3) { // 0x37e8 return g1; } // Address range: 0x38af - 0x38b4 int32_t function_38af(void) { // 0x38af return 0; } // Address range: 0x38b4 - 0x38b5 int32_t function_38b4(void) { // 0x38b4 return g1; } // Address range: 0x38d4 - 0x38d5 int32_t function_38d4(void) { // 0x38d4 return 0; } // Address range: 0x38dd - 0x38de int32_t function_38dd(void) { // 0x38dd return g1; } // Address range: 0x38f1 - 0x38f2 int32_t function_38f1(void) { // 0x38f1 return g1; } // Address range: 0x3902 - 0x3903 int32_t function_3902(void) { // 0x3902 return 0; } // Address range: 0x3908 - 0x390a int32_t function_3908(void) { // 0x3908 return function_38dd(); } // Address range: 0x390a - 0x3912 int32_t function_390a(void) { // 0x390a return function_38dd(); } // Address range: 0x3912 - 0x3926 int32_t function_3912(void) { // 0x3912 int32_t v1; g1 = unknown_67d0(v1); return function_38f1(); } // Address range: 0x3930 - 0x395d // Demangled: std::vector<unsigned char, std::allocator<unsigned char> >::~vector() int32_t _ZNSt6vectorIhSaIhEED1Ev(int32_t * a1) { int32_t v1 = *a1; // 0x3943 g1 = v1; int32_t result = v1; // 0x395a2 if (v1 == 0) { int32_t v2 = function_3968(*(int32_t *)20); // 0x3947 g1 = v2; result = v2; // branch -> 0x3949 } // 0x3956 return result; } // Address range: 0x3968 - 0x3979 int32_t function_3968(int32_t a1) { int32_t v1 = *(int32_t *)20 ^ a1; // 0x396c g1 = v1; int32_t result = v1; // 0x3978 if (v1 != 0) { // bb result = function_3979(); // branch -> 0x3975 } // 0x3975 return result; } // Address range: 0x3979 - 0x3980 int32_t function_3979(void) { // 0x3979 return g1; } // Address range: 0x3990 - 0x39c7 // Demangled: std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_erase(std::_Rb_tree_node<int> *) int32_t _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE8_M_eraseEPSt13_Rb_tree_nodeIiE(int32_t a1, int32_t a2) { // 0x3990 if (a2 != 0) { // 0x39b2 return unknown_7320(a1, *(int32_t *)(a2 + 12)); } // 0x39ae return function_39d0(*(int32_t *)20, 0, 0, 0); } // Address range: 0x39d0 - 0x39e4 int32_t function_39d0(int32_t a1, int32_t a2, int32_t a3, int32_t a4) { int32_t result = *(int32_t *)20 ^ a1; // 0x39d4 if (result != 0) { // 0x39e4 } // 0x39dd return result; } // Address range: 0x39f0 - 0x3a78 // Demangled: std::vector<int, std::allocator<int> >::_M_insert_aux(__gnu_cxx::__normal_iterator<int *, std::vector<int, std::allocator<int> > >, int const &) int32_t _ZNSt6vectorIiSaIiEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPiS1_EERKi(int32_t a1, int32_t * a2) { int32_t v1 = g3; // 0x39f3 g3 = a1; int32_t v2 = g7; // 0x3a07 g7 = (int32_t)a2; int32_t v3 = *(int32_t *)(a1 + 4); // 0x3a17 g6 = v3; if (v3 == *(int32_t *)(a1 + 8)) { // bb function_3a80(*(int32_t *)20); // branch -> 0x3a23 } int32_t v4 = -4; if (v3 != 0) { int32_t v5 = v3 - 4; // 0x3a27 *(int32_t *)v3 = *(int32_t *)v5; v4 = v5; // branch -> 0x3a2c } // 0x3a2c *(int32_t *)(g3 + 4) = v3 + 4; int32_t v6 = *(int32_t *)g5; // 0x3a35 g3 = v6; int32_t v7 = v4 - g7; // 0x3a37 if (v7 >= 4) { // 0x3a68 return v7 - v7 % 4; } // 0x3a40 *(int32_t *)g7 = v6; g1 = 0; // 0x3a53 g3 = v1; g7 = v2; return 0; } // Address range: 0x3a7d - 0x3a7f int32_t function_3a7d(void) { // 0x3a7d return 0; } // Address range: 0x3a80 - 0x3ab4 int32_t function_3a80(int32_t a1) { // 0x3a80 g1 = g3; int32_t v1 = g6 - g3; // 0x3a82 int32_t v2 = v1 / 4; // 0x3a84 g6 = v2; if (v1 < 4) { // bb g1 = function_3b10(); // branch -> 0x3a8f } int32_t v3 = 2 * v2; // 0x3a8f g4 = v3; if (v1 < 4 || v2 < v3) { // bb6 function_3b71(); // branch -> 0x3a9a } // 0x3a9a return -4; } // Address range: 0x3ac1 - 0x3af7 int32_t function_3ac1(int32_t a1) { int32_t v1 = 4 * g6 + g2; // 0x3ac1 if (v1 != 0) { // 0x3ac9 *(int32_t *)v1 = g5; // branch -> 0x3acd } int32_t v2 = g7 - g1; // 0x3ad1 g6 = v2 / 4; int32_t v3 = 4; // 0x3add if (v2 >= 4) { // bb function_3b28(); v3 = g5 + 4; // branch -> 0x3ada } int32_t v4 = *(int32_t *)(g3 + 4) - g7; // 0x3ae3 g1 = v4 / 4; int32_t v5 = 0; // 0x3aee int32_t v6 = g3; // 0x3aec if (v4 >= 4) { // bb10 function_3b48(); v5 = g5; v6 = g3; // branch -> 0x3aec } // 0x3aec g1 = v6; g5 = v5 + v3 + g2; int32_t result = v6; // 0x3af4 if (v6 == 0) { // bb11 result = function_3afc(); // branch -> 0x3af4 } // 0x3af4 return result; } // Address range: 0x3afc - 0x3b0d int32_t function_3afc(void) { // 0x3afc *(int32_t *)g3 = g2; int32_t v1; g2 += v1; *(int32_t *)(g3 + 4) = g5; *(int32_t *)(g3 + 8) = g2; return g1; } // Address range: 0x3b10 - 0x3b21 int32_t function_3b10(void) { int32_t result = g1; // 0x3b12 g6 = (g7 - result) / 4; return result; } // Address range: 0x3b28 - 0x3b41 int32_t function_3b28(void) { // 0x3b28 g5 = 4 * g6; return g1; } // Address range: 0x3b48 - 0x3b5e int32_t function_3b48(void) { int32_t result = g1; // 0x3b48 g5 = 4 * result; return result; } // Address range: 0x3b63 - 0x3b6c int32_t function_3b63(int32_t a1) { // 0x3b63 return 0; } // Address range: 0x3b6c - 0x3b6d int32_t function_3b6c(void) { // 0x3b6c return g1; } // Address range: 0x3b71 - 0x3b9a int32_t function_3b71(void) { int32_t v1 = g6; // 0x3b7d g2 = 0; int32_t result = g1; // 0x3b88 g6 = (g7 - result) / 4; if (g4 == 0) { // bb result = function_3ac1(8 * v1); // branch -> 0x3b95 } // 0x3b95 return result; } // Address range: 0x3ba0 - 0x3bd7 // Demangled: std::_Rb_tree<int, std::pair<int const, CAddrInfo>, std::_Select1st<std::pair<int const, CAddrInfo> >, std::less<int>, std::allocator<std::pair<int const, CAddrInfo> > >::_M_erase(std::_Rb_tree_node<std::pair<int const, CAddrInfo> > *) int32_t _ZNSt8_Rb_treeIiSt4pairIKi9CAddrInfoESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E(int32_t a1, int32_t a2) { // 0x3ba0 if (a2 != 0) { // 0x3bc2 return unknown_7740(a1, *(int32_t *)(a2 + 12)); } // 0x3bbe return function_3be0(*(int32_t *)20, 0, 0, 0); } // Address range: 0x3be0 - 0x3bf4 int32_t function_3be0(int32_t a1, int32_t a2, int32_t a3, int32_t a4) { int32_t result = *(int32_t *)20 ^ a1; // 0x3be4 if (result != 0) { // 0x3bf4 } // 0x3bed return result; } // Address range: 0x3c00 - 0x3c37 // Demangled: std::_Rb_tree<CNetAddr, std::pair<CNetAddr const, int>, std::_Select1st<std::pair<CNetAddr const, int> >, std::less<CNetAddr>, std::allocator<std::pair<CNetAddr const, int> > >::_M_erase(std::_Rb_tree_node<std::pair<CNetAddr const, int> > *) int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E(int32_t a1, int32_t a2) { // 0x3c00 if (a2 != 0) { // 0x3c22 return unknown_7800(a1, *(int32_t *)(a2 + 12)); } // 0x3c1e return function_3c40(*(int32_t *)20, 0, 0, 0); } // Address range: 0x3c40 - 0x3c54 int32_t function_3c40(int32_t a1, int32_t a2, int32_t a3, int32_t a4) { int32_t result = *(int32_t *)20 ^ a1; // 0x3c44 if (result != 0) { // 0x3c54 } // 0x3c4d return result; } // Address range: 0x3c60 - 0x3cdd // Demangled: std::_Rb_tree<int, std::pair<int const, CAddrInfo>, std::_Select1st<std::pair<int const, CAddrInfo> >, std::less<int>, std::allocator<std::pair<int const, CAddrInfo> > >::erase(int const &) int32_t _ZNSt8_Rb_treeIiSt4pairIKi9CAddrInfoESt10_Select1stIS3_ESt4lessIiESaIS3_EE5eraseERS1_(int32_t a1, int32_t * a2) { // 0x3c60 g5 = a1; int32_t v1 = *(int32_t *)(a1 + 8); // 0x3c7c int32_t v2 = a1 + 4; // 0x3c7f g2 = v2; g3 = v2; if (v1 != 0) { int32_t v3 = *a2; // 0x3c94 g6 = v3; g1 = v1; // branch -> 0x3ca7 while (true) { int32_t v4 = v1; // 0x3ca0 // branch -> 0x3ca7 while (true) { uint32_t v5 = *(int32_t *)(v4 + 16); // 0x3ca7 if (v5 < v3) { int32_t v6 = *(int32_t *)(v4 + 12); // 0x3ca0 g1 = v6; if (v6 == 0) { // break -> 0x3cb7 break; } v4 = v6; // continue -> 0x3ca7 continue; } else { if (v5 <= v3) { // bb v4 = function_3d28(); // branch -> 0x3cae } // 0x3cae g3 = v4; int32_t v7 = *(int32_t *)(v4 + 8); // 0x3cb0 g1 = v7; if (v7 != 0) { // 0x3cae v3 = g6; v1 = v7; // branch -> 0x3ca7 break; } } // 0x3cb7 // branch -> 0x3cbb } // 0x3cb7 // branch -> 0x3cb7 // 0x3cb7 // branch -> 0x3cbb } } int32_t v8 = *(int32_t *)(a1 + 20); // 0x3cbb int32_t result = v8; // 0x3cda int32_t v9 = v2; // 0x3cda if (*(int32_t *)(a1 + 12) == v2) { // bb28 result = function_3d95(v8); v9 = g3; // branch -> 0x3ccb } // 0x3ccb if (v9 != v2) { // 0x3cda return result; } // 0x3cd1 return function_3dc8(); } // Address range: 0x3d0b - 0x3d28 int32_t function_3d0b(int32_t result) { // 0x3d0b g1 = result; int32_t v1; if (*(int32_t *)20 != v1) { // bb result = function_3dd5(); // branch -> 0x3d20 } // 0x3d20 return result; } // Address range: 0x3d28 - 0x3d95 int32_t function_3d28(void) { int32_t result = g1; // 0x3d28 int32_t v1 = *(int32_t *)(result + 12); // 0x3d28 g7 = v1; int32_t v2 = *(int32_t *)(result + 8); // 0x3d2b if (v1 != 0) { // branch -> 0x3d41 lab_0x3d41: while (true) { int32_t v3 = v1; // 0x3d41 // branch -> 0x3d41 while (true) { // 0x3d41 if (*(int32_t *)(v3 + 16) > g6) { int32_t v4 = *(int32_t *)(v3 + 8); // 0x3d3a g7 = v4; if (v4 == 0) { // break (via goto) -> 0x3d4d goto lab_0x3d4d; } v1 = v4; // continue (via goto) -> 0x3d41 goto lab_0x3d41; } else { int32_t v5 = *(int32_t *)(v3 + 12); // 0x3d46 g7 = v5; if (v5 == 0) { // break -> 0x3d4d break; } v3 = v5; // continue -> 0x3d41 continue; } // 0x3d4d // branch -> 0x3d51 } // 0x3d4d // branch -> 0x3d4d lab_0x3d4d:; // 0x3d4d // branch -> 0x3d51 } } // 0x3d51 if (v2 == 0) { // 0x3d5f return result; } // branch -> 0x3d71 lab_0x3d71: while (true) { int32_t v6 = v2; // 0x3d71 // branch -> 0x3d71 while (true) { // 0x3d71 if (*(int32_t *)(v6 + 16) < g6) { int32_t v7 = *(int32_t *)(v6 + 12); // 0x3d76 if (v7 == 0) { // break -> 0x3d7d break; } v6 = v7; // continue -> 0x3d71 continue; } else { int32_t v8 = *(int32_t *)(v6 + 8); // 0x3d6a if (v8 == 0) { // break (via goto) -> 0x3d7d goto lab_0x3d7d; } v2 = v8; // continue (via goto) -> 0x3d71 goto lab_0x3d71; } int32_t v9 = g5; // 0x3d81 int32_t result2 = *(int32_t *)(v9 + 20); // 0x3d88 return result2; } lab_0x3d7d: // 0x3d7d return *(int32_t *)(g5 + 20); } } // Address range: 0x3d95 - 0x3dc8 int32_t function_3d95(int32_t a1) { // 0x3d95 int32_t v1; unknown_7800(g5, v1); *(int32_t *)(g5 + 12) = g2; *(int32_t *)(g5 + 8) = 0; *(int32_t *)(g5 + 16) = g2; *(int32_t *)(g5 + 20) = 0; return function_3d0b(v1); } // Address range: 0x3dc8 - 0x3dd5 int32_t function_3dc8(void) { // 0x3dc8 return function_3d0b(0); } // Address range: 0x3dd5 - 0x3dd6 int32_t function_3dd5(void) { // 0x3dd5 return g1; } // Address range: 0x3de0 - 0x3e5d // Demangled: std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::erase(int const &) int32_t _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE5eraseERKi(int32_t a1, int32_t * a2) { // 0x3de0 g5 = a1; int32_t v1 = *(int32_t *)(a1 + 8); // 0x3dfc int32_t v2 = a1 + 4; // 0x3dff g2 = v2; g3 = v2; if (v1 != 0) { int32_t v3 = *a2; // 0x3e14 g6 = v3; g1 = v1; // branch -> 0x3e27 while (true) { int32_t v4 = v1; // 0x3e20 // branch -> 0x3e27 while (true) { uint32_t v5 = *(int32_t *)(v4 + 16); // 0x3e27 if (v5 < v3) { int32_t v6 = *(int32_t *)(v4 + 12); // 0x3e20 g1 = v6; if (v6 == 0) { // break -> 0x3e37 break; } v4 = v6; // continue -> 0x3e27 continue; } else { if (v5 <= v3) { // bb v4 = function_3ea8(); // branch -> 0x3e2e } // 0x3e2e g3 = v4; int32_t v7 = *(int32_t *)(v4 + 8); // 0x3e30 g1 = v7; if (v7 != 0) { // 0x3e2e v3 = g6; v1 = v7; // branch -> 0x3e27 break; } } // 0x3e37 // branch -> 0x3e3b } // 0x3e37 // branch -> 0x3e37 // 0x3e37 // branch -> 0x3e3b } } int32_t v8 = *(int32_t *)(a1 + 20); // 0x3e3b int32_t result = v8; // 0x3e5a int32_t v9 = v2; // 0x3e5a if (*(int32_t *)(a1 + 12) == v2) { // bb28 result = function_3f15(v8); v9 = g3; // branch -> 0x3e4b } // 0x3e4b if (v9 != v2) { // 0x3e5a return result; } // 0x3e51 return function_3f48(); } // Address range: 0x3e8b - 0x3ea8 int32_t function_3e8b(int32_t result) { // 0x3e8b g1 = result; int32_t v1; if (*(int32_t *)20 != v1) { // bb result = function_3f55(); // branch -> 0x3ea0 } // 0x3ea0 return result; } // Address range: 0x3ea8 - 0x3f15 int32_t function_3ea8(void) { int32_t result = g1; // 0x3ea8 int32_t v1 = *(int32_t *)(result + 12); // 0x3ea8 g7 = v1; int32_t v2 = *(int32_t *)(result + 8); // 0x3eab if (v1 != 0) { // branch -> 0x3ec1 lab_0x3ec1: while (true) { int32_t v3 = v1; // 0x3ec1 // branch -> 0x3ec1 while (true) { // 0x3ec1 if (*(int32_t *)(v3 + 16) > g6) { int32_t v4 = *(int32_t *)(v3 + 8); // 0x3eba g7 = v4; if (v4 == 0) { // break (via goto) -> 0x3ecd goto lab_0x3ecd; } v1 = v4; // continue (via goto) -> 0x3ec1 goto lab_0x3ec1; } else { int32_t v5 = *(int32_t *)(v3 + 12); // 0x3ec6 g7 = v5; if (v5 == 0) { // break -> 0x3ecd break; } v3 = v5; // continue -> 0x3ec1 continue; } // 0x3ecd // branch -> 0x3ed1 } // 0x3ecd // branch -> 0x3ecd lab_0x3ecd:; // 0x3ecd // branch -> 0x3ed1 } } // 0x3ed1 if (v2 == 0) { // 0x3edf return result; } // branch -> 0x3ef1 lab_0x3ef1: while (true) { int32_t v6 = v2; // 0x3ef1 // branch -> 0x3ef1 while (true) { // 0x3ef1 if (*(int32_t *)(v6 + 16) < g6) { int32_t v7 = *(int32_t *)(v6 + 12); // 0x3ef6 if (v7 == 0) { // break -> 0x3efd break; } v6 = v7; // continue -> 0x3ef1 continue; } else { int32_t v8 = *(int32_t *)(v6 + 8); // 0x3eea if (v8 == 0) { // break (via goto) -> 0x3efd goto lab_0x3efd; } v2 = v8; // continue (via goto) -> 0x3ef1 goto lab_0x3ef1; } int32_t v9 = g5; // 0x3f01 int32_t result2 = *(int32_t *)(v9 + 20); // 0x3f08 return result2; } lab_0x3efd: // 0x3efd return *(int32_t *)(g5 + 20); } } // Address range: 0x3f15 - 0x3f48 int32_t function_3f15(int32_t a1) { // 0x3f15 int32_t v1; unknown_7770(g5, v1); *(int32_t *)(g5 + 12) = g2; *(int32_t *)(g5 + 8) = 0; *(int32_t *)(g5 + 16) = g2; *(int32_t *)(g5 + 20) = 0; return function_3e8b(v1); } // Address range: 0x3f48 - 0x3f55 int32_t function_3f48(void) { // 0x3f48 return function_3e8b(0); } // Address range: 0x3f55 - 0x3f56 int32_t function_3f55(void) { // 0x3f55 return g1; } // Address range: 0x3f60 - 0x418d // Demangled: std::vector<CAddress, std::allocator<CAddress> >::_M_insert_aux(__gnu_cxx::__normal_iterator<CAddress *, std::vector<CAddress, std::allocator<CAddress> > >, CAddress const &) int32_t _ZNSt6vectorI8CAddressSaIS0_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS0_S2_EERKS0_(int32_t * a1, int32_t a2, int32_t a3) { int32_t v1 = (int32_t)a1; int32_t v2 = g2; // 0x3f60 int32_t v3 = v1; // esi g3 = a2; g2 = a3; int32_t v4 = *(int32_t *)(v1 + 4); // 0x3f7f if (v4 == *(int32_t *)(v1 + 8)) { int32_t v5 = *a1; // 0x40f0 g6 = v5; int32_t v6 = (v4 - v5) / 8; // 0x40f4 int32_t v7 = -0x33333333 * v6; // 0x40f7 if (v7 == 0) { // bb39 function_41bb(*(int32_t *)20); // branch -> 0x4105 } int32_t v8 = -0x66666666 * v6; // 0x4105 g1 = v8; if (v7 < v8 || 0x33333333 * v6 == 0) { // bb40 function_41d7(); // branch -> 0x4110 } int32_t v9 = 8 * (g3 - g6) / 8; // 0x4140 int32_t v10 = v9 - 16; // 0x4140 if (v10 != 0) { // 0x4147 *(int32_t *)v10 = *(int32_t *)g2; *(int32_t *)(v9 - 12) = *(int32_t *)(g2 + 4); *(int32_t *)(v9 - 8) = *(int32_t *)(g2 + 8); *(int32_t *)(v9 - 4) = *(int32_t *)(g2 + 12); *(int32_t *)v9 = *(int32_t *)(g2 + 16); *(int32_t *)(v9 | 4) = *(int32_t *)(g2 + 20); *(int32_t *)(v9 + 8) = *(int32_t *)(g2 + 24); *(int32_t *)(v9 + 12) = *(int32_t *)(g2 + 28); *(int32_t *)(v9 + 16) = *(int32_t *)(g2 + 32); *(int32_t *)(v9 + 20) = *(int32_t *)(g2 + 36); // branch -> 0x4182 } // 0x4182 return *(int32_t *)v3; } int32_t v11 = 0; // edx int32_t v12 = 40; // 0x3fcf if (v4 != 0) { // 0x3f91 *(int32_t *)v4 = *(int32_t *)(v4 - 40); *(int32_t *)(v4 + 4) = *(int32_t *)(v4 - 36); *(int32_t *)(v4 + 8) = *(int32_t *)(v4 - 32); *(int32_t *)(v4 + 12) = *(int32_t *)(v4 - 28); *(int32_t *)(v4 + 16) = *(int32_t *)(v4 - 24); *(int32_t *)(v4 + 20) = *(int32_t *)(v4 - 20); *(int32_t *)(v4 + 24) = *(int32_t *)(v4 - 16); *(int32_t *)(v4 + 28) = *(int32_t *)(v4 - 12); *(int32_t *)(v4 + 32) = *(int32_t *)(v4 - 8); *(int32_t *)(v4 + 36) = *(int32_t *)(v4 - 4); int32_t v13 = v3; // 0x3fcc int32_t v14 = *(int32_t *)(v13 + 4); // 0x3fcc v11 = v14; v1 = v13; v12 = v14 + 40; // branch -> 0x3fcf } // 0x3fcf *(int32_t *)(v1 + 4) = v12; int32_t v15 = *(int32_t *)g2; // 0x3fd5 int32_t v16 = v11 - 40; // 0x3fd8 int32_t v17 = v16; // ecx int32_t v18 = *(int32_t *)(g2 + 4); // 0x3fe6 int32_t v19 = -0x33333333 * (v16 - g3) / 8; // 0x3fe9 int32_t v20 = *(int32_t *)(g2 + 8); // 0x3ff3 int32_t v21 = *(int32_t *)(g2 + 12); // 0x3ffc int32_t v22 = *(int32_t *)(g2 + 16); // 0x4003 int32_t v23 = *(int32_t *)(g2 + 20); // 0x400a int32_t v24 = *(int32_t *)(g2 + 24); // 0x4011 int32_t v25 = *(int32_t *)(g2 + 28); // 0x4018 int32_t v26 = *(int32_t *)(g2 + 32); // 0x401f int32_t v27 = *(int32_t *)(g2 + 36); // 0x4026 int32_t result; // 0x40ed if (v19 >= 1) { int32_t v28 = 0; // eax v3 = v19; int32_t v29 = 0; // 0x403c // branch -> 0x4038 while (true) { int32_t v30 = *(int32_t *)(v29 - 40 + v16); // 0x4038 *(int32_t *)(v11 - 40 + v29) = v30; int32_t v31 = v28; // 0x4040 int32_t v32 = *(int32_t *)(v17 - 36 + v31); // 0x4040 *(int32_t *)(v31 - 36 + v11) = v32; int32_t v33 = v28; // 0x4048 int32_t v34 = *(int32_t *)(v17 - 32 + v33); // 0x4048 *(int32_t *)(v33 - 32 + v11) = v34; int32_t v35 = v28; // 0x4050 int32_t v36 = *(int32_t *)(v17 - 28 + v35); // 0x4050 *(int32_t *)(v35 - 28 + v11) = v36; int32_t v37 = v28; // 0x4058 int32_t v38 = *(int32_t *)(v17 - 24 + v37); // 0x4058 *(int32_t *)(v37 - 24 + v11) = v38; int32_t v39 = v28; // 0x4060 int32_t v40 = *(int32_t *)(v17 - 20 + v39); // 0x4060 *(int32_t *)(v39 - 20 + v11) = v40; int32_t v41 = v28; // 0x4068 int32_t v42 = *(int32_t *)(v17 - 16 + v41); // 0x4068 *(int32_t *)(v41 - 16 + v11) = v42; int32_t v43 = v28; // 0x4070 int32_t v44 = *(int32_t *)(v17 - 12 + v43); // 0x4070 *(int32_t *)(v43 - 12 + v11) = v44; int32_t v45 = v28; // 0x4078 int32_t v46 = *(int32_t *)(v17 - 8 + v45); // 0x4078 *(int32_t *)(v45 - 8 + v11) = v46; int32_t v47 = v28; // 0x4080 int32_t v48 = *(int32_t *)(v17 - 4 + v47); // 0x4080 *(int32_t *)(v47 - 4 + v11) = v48; int32_t v49 = v28 - 40; // 0x4088 v28 = v49; int32_t v50 = v3 - 1; // 0x408b v3 = v50; if (v50 == 0) { // 0x4090 // branch -> 0x4090 // 0x4090 *(int32_t *)g3 = v15; *(int32_t *)(g3 + 4) = v18; *(int32_t *)(g3 + 8) = v20; *(int32_t *)(g3 + 12) = v21; *(int32_t *)(g3 + 16) = v22; *(int32_t *)(g3 + 20) = v23; *(int32_t *)(g3 + 24) = v24; *(int32_t *)(g3 + 28) = v25; *(int32_t *)(g3 + 32) = v26; g1 = v27; *(int32_t *)(g3 + 36) = v27; // 0x4090 // branch -> 0x40e6 // 0x40e6 g2 = v2; return g1; } // 0x4038 v29 = v49; v16 = v17; // branch -> 0x4038 } } // 0x4090 *(int32_t *)g3 = v15; *(int32_t *)(g3 + 4) = v18; *(int32_t *)(g3 + 8) = v20; *(int32_t *)(g3 + 12) = v21; *(int32_t *)(g3 + 16) = v22; *(int32_t *)(g3 + 20) = v23; *(int32_t *)(g3 + 24) = v24; *(int32_t *)(g3 + 28) = v25; *(int32_t *)(g3 + 32) = v26; g1 = v27; *(int32_t *)(g3 + 36) = v27; // 0x4090 result = g1; // branch -> 0x40e6 // 0x40e6 g2 = v2; return result; } // Address range: 0x4199 - 0x41a0 int32_t function_4199(void) { int32_t * v1 = (int32_t *)-0x762d7aea; // 0x4199 *v1 = *v1 - 1; return 0; } // Address range: 0x41a9 - 0x41bb int32_t function_41a9(int32_t a1) { int32_t * v1 = (int32_t *)0x247c033e; // 0x41a9 *v1 = *v1 - 1; int32_t v2 = 0; // eax unsigned char v3 = (char)false + (char)v2; // 0x41b2 return (int32_t)v3 | v2 & -256; } // Address range: 0x41bb - 0x41d7 int32_t function_41bb(int32_t a1) { int32_t result = g3 - g6; // 0x41bd g6 = -0x33333333 * result / 8; return result; } // Address range: 0x41d7 - 0x4207 int32_t function_41d7(void) { // 0x41d7 g6 = -0x33333333 * (g3 - g6) / 8; return g1; } // Address range: 0x4207 - 0x4208 int32_t function_4207(void) { // 0x4207 return g1; } // Address range: 0x4210 - 0x42f0 // Demangled: void std::vector<char, zero_after_free_allocator<char> >::_M_range_insert<char const *>(__gnu_cxx::__normal_iterator<char *, std::vector<char, zero_after_free_allocator<char> > >, char const *, char const *, std::forward_iterator_tag) int32_t _ZNSt6vectorIc25zero_after_free_allocatorIcEE15_M_range_insertIPKcEEvN9__gnu_cxx17__normal_iteratorIPcS2_EET_SA_St20forward_iterator_tag(int32_t * a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5) { int32_t v1 = (int32_t)a1; int32_t v2 = g2; // 0x4210 int32_t v3 = g5; // 0x4211 int32_t v4 = g7; // 0x4212 int32_t v5 = g3; // 0x4213 g3 = a4; g1 = 0; g5 = v1; g7 = a2; if (a4 == a3) { // 0x42b1 g3 = v5; g7 = v4; g5 = v3; g2 = v2; return 0; } int32_t v6 = *(int32_t *)(v1 + 4); // 0x423b g4 = v6; uint32_t v7 = a4 - a3; // 0x4243 g2 = v7; if (v7 > *(int32_t *)(v1 + 8) - v6) { int32_t v8 = *a1; // 0x42c0 int32_t v9 = v6 - v8; // 0x42c2 int32_t v10 = -1 - v9; // 0x42ca g1 = v10; int32_t result = v10; // 0x42ed5 uint32_t v11 = v9; // 0x42d6 if (v7 > v10) { int32_t v12 = function_44a4(a3, v8); // 0x42ce g1 = v12; result = v12; v11 = v9; // branch -> 0x42d4 } int32_t v13 = v7 < v11 ? v11 : v7; // 0x42d6 g2 = v13; int32_t v14 = v13 + v11; // 0x42d9 g4 = v14; if (v14 >= v11) { // bb41 result = function_43b0(-1); // branch -> 0x42e9 } // 0x42e9 return result; } int32_t v15 = v6 - a2; // 0x424d if (v7 >= v15) { // bb function_43d0((char *)v15, a3); v6 = g4; // branch -> 0x425b } int32_t v16 = v6 - v7; // 0x425d int32_t v17; // 0x4288 if (v7 == 0) { // 0x425b v17 = g5; // branch -> 0x4286 } else { // branch -> 0x4270 while (true) { int32_t v18 = v6; // 0x427f int32_t v19 = 0; // 0x427c if (v6 != 0) { // 0x4274 *(char *)v6 = *(char *)v16; v18 = g4; v19 = v6; // branch -> 0x4279 } int32_t v20 = v16 + 1; // 0x4279 v16 = v20; if (v20 == v18) { // break -> 0x4283 break; } v6 = v19 + 1; v16 = v20; // continue -> 0x4270 } int32_t v21 = g5; // 0x4283 v17 = v21; v6 = *(int32_t *)(v21 + 4); // branch -> 0x4286 } // 0x4286 *(int32_t *)(v17 + 4) = v6 + v7; int32_t v22 = v16 - g7; // 0x428f g1 = v22; int32_t result2 = v22; // 0x42b817 if (v22 != 0) { int32_t v23 = function_4488(); // 0x4291 g1 = v23; result2 = v23; // branch -> 0x4297 } if (v7 != 0) { int32_t v24 = function_4470(); // 0x4299 g1 = v24; result2 = v24; // branch -> 0x42a0 } // 0x42b1 g3 = v5; g7 = v4; g5 = v3; g2 = v2; return result2; } // Address range: 0x42ff - 0x4389 int32_t function_42ff(char * a1) { // 0x42ff char * v1; int32_t v2 = (int32_t)v1; // 0x42ff int32_t v3 = (int32_t)a1; // 0x4303 int32_t v4 = v3; // ebp int32_t v5 = v3; // 0x4331 int32_t v6; // eax int32_t v7; // edx if (v2 != g7) { // 0x4309 v7 = v2; v6 = v3; int32_t v8 = g7; // 0x431f7 int32_t v9 = v2; // 0x4314 int32_t v10 = v3; // 0x4317 // branch -> 0x4310 int32_t v11; // 0x4323 while (true) { // 0x4310 v11 = v8; int32_t v12 = 0; // 0x431c int32_t v13 = v9; // 0x4319 if (v10 != 0) { // 0x4314 *(char *)v10 = *(char *)v9; v11 = g7; v12 = v6; v13 = v7; // branch -> 0x4319 } int32_t v14 = v13 + 1; // 0x4319 v7 = v14; int32_t v15 = v12 + 1; // 0x431c v6 = v15; if (v14 == v11) { // break -> 0x4323 break; } v8 = v11; v9 = v14; v10 = v15; // continue -> 0x4310 } int32_t v16 = v11 - v2 + v3; // 0x4329 v4 = v16; v5 = v16; // branch -> 0x432d } // 0x432d char * v17; int32_t v18 = (int32_t)v17; // 0x432d v6 = v18; v7 = v5; int32_t v19 = v18; // 0x433c // branch -> 0x4338 int32_t v20; // 0x4341 while (true) { int32_t v21 = 0; // 0x4344 int32_t v22 = v19; // 0x4341 if (v5 != 0) { // 0x433c *(char *)v5 = *(char *)v19; v21 = v7; v22 = v6; // branch -> 0x4341 } // 0x4341 v20 = v22 + 1; v6 = v20; int32_t v23 = v21 + 1; // 0x4344 v7 = v23; if (v20 == g3) { // break -> 0x434b break; } v19 = v20; v5 = v23; // continue -> 0x4338 } int32_t v24 = v4 + v20 - v18; // 0x434f g2 = v24; int32_t v25 = g5; // 0x4351 int32_t v26 = *(int32_t *)(v25 + 4); // 0x4351 if (v26 != g7) { // 0x4358 v7 = g7; int32_t v27 = v26; // 0x436f16 int32_t v28 = g7; // 0x4364 // branch -> 0x4360 int32_t v29; // 0x4369 while (true) { int32_t v30 = v27; // 0x436f int32_t v31 = 0; // 0x436c int32_t v32 = v28; // 0x4369 if (v24 != 0) { // 0x4364 *(char *)v24 = *(char *)v28; v30 = v26; v31 = v24; v32 = v7; // branch -> 0x4369 } // 0x4369 v29 = v32 + 1; v7 = v29; if (v29 == v30) { // break -> 0x4373 break; } v27 = v30; v28 = v29; v24 = v31 + 1; // continue -> 0x4360 } // 0x4373 g2 += v29 - g7; v25 = g5; // branch -> 0x4377 } // 0x4377 g3 = v25; int32_t v33 = *(int32_t *)(v25 + 8); // 0x4380 if (v25 == 0) { // bb v33 = function_4396(); // branch -> 0x4380 } // 0x4380 return v33 - v25; } // Address range: 0x4396 - 0x43ab int32_t function_4396(void) { // 0x4396 *(int32_t *)(g5 + 4) = g2; int32_t v1 = 0; // eax *(int32_t *)g5 = v1; int32_t v2; int32_t result = v1 + v2; // 0x439f *(int32_t *)(g5 + 8) = result; return result; } // Address range: 0x43b0 - 0x43cd int32_t function_43b0(int32_t a1) { // 0x43b0 if (g4 != 0) { // bb function_44b0(); // branch -> 0x43b8 } // 0x43b8 return function_42ff(NULL); } // Address range: 0x43d0 - 0x4468 int32_t function_43d0(char * a1, int32_t a2) { int32_t v1 = g4; // 0x43d4 int32_t v2 = v1; // eax int32_t v3 = (int32_t)a1; // 0x43d6 int32_t v4 = v3 + a2; // 0x43d6 int32_t v5 = v4; // edx int32_t v6; // 0x4406 int32_t v7; // 0x440a if (g3 == v4) { // 0x43d0 v7 = g5; v6 = v1; // branch -> 0x4402 } else { int32_t v8 = g3; // 0x43f76 int32_t v9 = v1; // 0x43ef while (true) { int32_t v10 = v8; // 0x43f7 int32_t v11 = 0; // 0x43f4 int32_t v12 = v4; // 0x43f1 if (v9 != 0) { // 0x43ec *(char *)v9 = *(char *)v4; v10 = g3; v11 = v2; v12 = v5; // branch -> 0x43f1 } int32_t v13 = v12 + 1; // 0x43f1 v5 = v13; int32_t v14 = v11 + 1; // 0x43f4 v2 = v14; if (v13 == v10) { // break -> 0x43fb break; } v8 = v10; v4 = v13; v9 = v14; // continue -> 0x43e8 } // 0x43fb g4 = v1; int32_t v15 = g5; // 0x43ff v7 = v15; v6 = *(int32_t *)(v15 + 4); // branch -> 0x4402 } int32_t v16 = g2 - v3 + v6; // 0x4406 int32_t v17 = v16; // ebp *(int32_t *)(v7 + 4) = v16; int32_t v18; // 0x4433 int32_t v19; // 0x443b if (v1 == g7) { // 0x4402 v19 = g5; v18 = v17; // branch -> 0x442f } else { // 0x440f v2 = g7; int32_t v20 = g7; // 0x441c int32_t v21 = v17; // 0x441f // branch -> 0x4418 while (true) { int32_t v22 = 0; // 0x4425 int32_t v23 = v20; // 0x4422 if (v21 != 0) { // 0x441c *(char *)v21 = *(char *)v20; v22 = v17; v23 = v2; // branch -> 0x4422 } int32_t v24 = v23 + 1; // 0x4422 v2 = v24; int32_t v25 = v22 + 1; // 0x4425 v17 = v25; if (v24 == g4) { // break -> 0x442c break; } v20 = v24; v21 = v25; // continue -> 0x4418 } int32_t v26 = g5; // 0x442c v19 = v26; v18 = *(int32_t *)(v26 + 4); // branch -> 0x442f } // 0x442f g1 = v3; *(int32_t *)(v19 + 4) = v18 + v3; int32_t v27; int32_t result; // 0x4467 if ((*(int32_t *)20 ^ v27) != 0) { // bb result = function_449f(); // branch -> 0x4451 } else { // 0x442f result = g1; // branch -> 0x4451 } // 0x4451 return result; } // Address range: 0x4470 - 0x4483 int32_t function_4470(void) { // 0x4470 int32_t v1; int32_t result; // 0x4481 if (*(int32_t *)20 != v1) { // bb result = function_449f(); // branch -> 0x447d } else { // 0x4470 result = g1; // branch -> 0x447d } // 0x447d return result; } // Address range: 0x4488 - 0x4495 int32_t function_4488(void) { // 0x4488 return g1; } // Address range: 0x449a - 0x449f int32_t function_449a(void) { // 0x449a return 0; } // Address range: 0x449f - 0x44a0 int32_t function_449f(void) { // 0x449f return g1; } // Address range: 0x44a4 - 0x44ab int32_t function_44a4(int32_t a1, int32_t a2) { // 0x44a4 return g1; } // Address range: 0x44b0 - 0x44b9 int32_t function_44b0(void) { // 0x44b0 return g1; } // Address range: 0x44c0 - 0x450e // Demangled: std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_insert_(std::_Rb_tree_node_base const *, std::_Rb_tree_node_base const *, int const &) int32_t _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE10_M_insert_EPKSt18_Rb_tree_node_baseS8_RKi(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5) { // 0x44c0 g6 = a5; g5 = a4; int32_t result = a3; // 0x4507 if (a3 == 0) { // bb result = function_4570(*(int32_t *)20); // branch -> 0x44ff } // 0x44ff return result; } // Address range: 0x453c - 0x456c int32_t function_453c(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5) { int32_t * v1 = (int32_t *)-0x7ce3dbbc; // 0x453c *v1 = *v1 - 1; int32_t v2 = 0; // 0x4543 int32_t v3 = (v2 + 1 + (int32_t)false) % 256 | v2 & -256; // 0x4543 int32_t result = 0; // esi *(int32_t *)result = v3; g1 = result; if (*(int32_t *)20 != a1) { // bb result = function_4586(); // branch -> 0x4556 } // 0x4556 return result; } // Address range: 0x4570 - 0x4586 int32_t function_4570(int32_t a1) { int32_t v1 = *(int32_t *)(g5 + 16); // 0x4574 int32_t v2 = g6 - v1; // 0x4577 return v2 < 0 != ((v2 ^ g6) & (g6 ^ v1)) < 0; } // Address range: 0x4586 - 0x4587 int32_t function_4586(void) { // 0x4586 return g1; } // Address range: 0x4590 - 0x4628 // Demangled: std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_insert_unique(int const &) int32_t _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE16_M_insert_uniqueERKi(int32_t * a1, int32_t a2) { int32_t v1 = (int32_t)a1; int32_t v2 = g5; // 0x4591 int32_t v3 = g7; // 0x4592 int32_t v4 = g3; // 0x4593 g5 = a2; g3 = v1; int32_t result = *(int32_t *)(a2 + 8); // 0x45af g7 = result; int32_t v5; // 0x4617 if (result == 0) { // 0x4617 v5 = a2 + 4; g7 = v5; // branch -> 0x4620 } else { // 0x45ba int32_t v6; int32_t v7 = *(int32_t *)v6; // 0x45be // branch -> 0x45d6 while (true) { int32_t v8 = *(int32_t *)(result + 16); // 0x45d6 int32_t v9; // 0x45f8 int32_t result3; // 0x4609 int32_t v10; // 0x45f8 int32_t result2; // 0x4623 int32_t v11; // 0x45c8 int32_t v12; // 0x45f6 if (v8 > v7) { // 0x45c8 v11 = *(int32_t *)(result + 8); if (v11 == 0) { // 0x4620 if (result != *(int32_t *)(a2 + 12)) { // 0x4625 return result; } // bb33 result2 = function_4640(v8); // branch -> 0x4625 // 0x4625 return result2; // 0x45f2 v10 = v1; v9 = result; if (v8 < v7) { // bb v12 = function_4640(v8); v10 = g3; v9 = v12; // branch -> 0x45f8 } // 0x45f8 *(int32_t *)v10 = v9; *(char *)(g3 + 4) = 0; result3 = g3; g1 = result3; // 0x460d g3 = v4; g7 = v3; g5 = v2; return result3; } } else { int32_t v13 = *(int32_t *)(result + 12); // 0x45dd if (v13 == 0) { // 0x45f2 v10 = v1; v9 = result; if (v8 < v7) { // bb v12 = function_4640(v8); v10 = g3; v9 = v12; // branch -> 0x45f8 } // 0x45f8 *(int32_t *)v10 = v9; *(char *)(g3 + 4) = 0; result3 = g3; g1 = result3; // 0x460d g3 = v4; g7 = v3; g5 = v2; return result3; } v11 = v13; } // 0x45d4 g7 = v11; result = v11; // branch -> 0x45d6 } } int32_t result4 = 0; // 0x4625 if (v5 == *(int32_t *)(a2 + 12)) { // bb33 int32_t v14; result4 = function_4640(v14); // branch -> 0x4625 } // 0x4625 return result4; } // Address range: 0x4640 - 0x4673 int32_t function_4640(int32_t result) { // 0x4640 int32_t v1; // bp+44 unknown_8a50((int32_t)&v1, g5, 0, g7, result); *(char *)(g3 + 4) = 1; *(int32_t *)g3 = result; return result; } // Address range: 0x4673 - 0x4678 int32_t function_4673(void) { // 0x4673 return g1; } // Address range: 0x4680 - 0x46ba // Demangled: std::_Rb_tree<CNetAddr, std::pair<CNetAddr const, int>, std::_Select1st<std::pair<CNetAddr const, int> >, std::less<CNetAddr>, std::allocator<std::pair<CNetAddr const, int> > >::equal_range(CNetAddr const &) int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE11equal_rangeERS2_(void) { // 0x4680 int32_t v1; g7 = v1 + 4; int32_t result = 0; // 0x46b6 if (*(int32_t *)(v1 + 8) == 0) { // bb result = function_46ce(*(int32_t *)20); // branch -> 0x46ac } // 0x46ac return result; } // Address range: 0x46ce - 0x46f0 int32_t function_46ce(int32_t a1) { // 0x46ce *(int32_t *)g3 = g7; *(int32_t *)(g3 + 4) = g7; g1 = g3; int32_t result = g3; // 0x46ed if (*(int32_t *)20 != a1) { // bb result = function_4765(); // branch -> 0x46e6 } // 0x46e6 return result; } // Address range: 0x46fb - 0x4707 int32_t function_46fb(void) { int32_t result = 0; // eax int32_t * v1 = (int32_t *)(result - 0x176f78c + 8 * result); // 0x46fb *v1 = *v1 + 1; return result; } // Address range: 0x4718 - 0x4719 int32_t function_4718(void) { // 0x4718 return g1; } // Address range: 0x471c - 0x471d int32_t function_471c(void) { // 0x471c return g1; } // Address range: 0x472e - 0x4760 int32_t function_472e(int32_t a1, int32_t result) { int32_t * v1 = (int32_t *)-0x7bebdbac; // 0x472e *v1 = *v1 - 1; if (*(int32_t *)8 != 0) { // bb function_471c(); // branch -> 0x4740 } // 0x4740 _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE11equal_rangeERS2_(); *(int32_t *)(g3 + 4) = g7; *(int32_t *)g3 = result; return result; } // Address range: 0x4760 - 0x4765 int32_t function_4760(void) { // 0x4760 return function_4718(); } // Address range: 0x4765 - 0x4766 int32_t function_4765(void) { // 0x4765 return g1; } // Address range: 0x4770 - 0x47cd // Demangled: std::_Rb_tree<CNetAddr, std::pair<CNetAddr const, int>, std::_Select1st<std::pair<CNetAddr const, int> >, std::less<CNetAddr>, std::allocator<std::pair<CNetAddr const, int> > >::erase(CNetAddr const &) int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE5eraseERS2_(int32_t a1, int32_t a2) { // 0x4770 g5 = a1; int32_t v1; // bp-52 unknown_8df0((int32_t)&v1, a1, a2); int32_t v2 = g5; // 0x479f g2 = v1; int32_t v3; int32_t result = v3; // 0x47ca int32_t v4 = v2; // 0x47b8 if (*(int32_t *)(v2 + 12) == v3) { // bb result = function_4818(*(int32_t *)(v2 + 20)); v1 = g2; v4 = g5; // branch -> 0x47b8 } // 0x47b8 if (v1 != result) { // 0x47ca return result; } // 0x47c3 return function_484e(v4 + 4); } // Address range: 0x47fd - 0x4816 int32_t function_47fd(int32_t result) { // 0x47fd g1 = result; int32_t v1; if (*(int32_t *)20 != v1) { // bb result = function_4858(); // branch -> 0x480e } // 0x480e return result; } // Address range: 0x4818 - 0x484e int32_t function_4818(int32_t a1) { int32_t v1 = g5; // 0x4818 int32_t v2 = *(int32_t *)(v1 + 8); // 0x4825 unknown_8370(v1, v2); int32_t v3 = v1 + 4; // edx *(int32_t *)(g5 + 8) = 0; *(int32_t *)(g5 + 20) = 0; *(int32_t *)(g5 + 12) = v3; *(int32_t *)(g5 + 16) = v3; return function_47fd(v2); } // Address range: 0x484e - 0x4858 int32_t function_484e(int32_t a1) { // 0x484e return function_47fd(0); } // Address range: 0x4858 - 0x4859 int32_t function_4858(void) { // 0x4858 return g1; } // Address range: 0x4860 - 0x48b5 // Demangled: std::_Rb_tree<int, std::pair<int const, CAddrInfo>, std::_Select1st<std::pair<int const, CAddrInfo> >, std::less<int>, std::allocator<std::pair<int const, CAddrInfo> > >::_M_insert_(std::_Rb_tree_node_base const *, std::_Rb_tree_node_base const *, std::pair<int const, CAddrInfo> const &) int32_t _ZNSt8_Rb_treeIiSt4pairIKi9CAddrInfoESt10_Select1stIS3_ESt4lessIiESaIS3_EE10_M_insert_EPKSt18_Rb_tree_node_baseSC_RKS3_(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5) { // 0x4860 g6 = a4; g7 = a5; int32_t v1 = a2 + 4; // 0x4891 int32_t result = v1; // 0x48ae if (a3 == 0) { // bb result = function_4918(a1, v1, 1); // branch -> 0x48aa } // 0x48aa return result; } // Address range: 0x48b9 - 0x48c0 int32_t function_48b9(void) { int32_t * v1 = (int32_t *)-0x76efdbac; // 0x48b9 *v1 = *v1 - 1; return 0; } // Address range: 0x48e9 - 0x4917 int32_t function_48e9(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5) { int32_t v1 = 0; // ebx int32_t * v2 = (int32_t *)(v1 - 0x7cebdbbc); // 0x48e9 *v2 = *v2 - 1; int32_t v3 = 0; // 0x48f0 int32_t v4 = (v3 + 1 + (int32_t)false) % 256 | v3 & -256; // 0x48f0 g1 = v4; *(int32_t *)v4 = v1; int32_t result; // 0x4914 if (*(int32_t *)20 != a1) { // bb result = function_4930(); // branch -> 0x4901 } else { // 0x48e9 result = g1; // branch -> 0x4901 } // 0x4901 return result; } // Address range: 0x4918 - 0x4930 int32_t function_4918(int32_t a1, int32_t a2, int32_t a3) { int32_t v1 = *(int32_t *)(g6 + 16); // 0x491c int32_t v2 = g7 - v1; // 0x491f return v2 < 0 != ((v2 ^ g7) & (g7 ^ v1)) < 0; } // Address range: 0x4930 - 0x4931 int32_t function_4930(void) { // 0x4930 return g1; } // Address range: 0x4940 - 0x4a23 // Demangled: std::_Rb_tree<int, std::pair<int const, CAddrInfo>, std::_Select1st<std::pair<int const, CAddrInfo> >, std::less<int>, std::allocator<std::pair<int const, CAddrInfo> > >::_M_insert_unique(std::pair<int const, CAddrInfo> const &) int32_t _ZNSt8_Rb_treeIiSt4pairIKi9CAddrInfoESt10_Select1stIS3_ESt4lessIiESaIS3_EE16_M_insert_uniqueERKS3_(int32_t * a1, int32_t a2, int32_t a3) { int32_t v1 = (int32_t)a1; // ebx int32_t v2 = *(int32_t *)(a2 + 8); // 0x495f int32_t v3; // bp-48 int32_t result; // 0x49b9 int32_t v4; // 0x49d5 int32_t v5; // 0x49e3 if (v2 == 0) { // 0x49c7 v4 = a2 + 4; v5 = 0; // branch -> 0x49d0 } else { uint32_t v6 = *(int32_t *)a3; // 0x496e // branch -> 0x4986 while (true) { uint32_t v7 = *(int32_t *)(v2 + 16); // 0x4986 int32_t v8; // 0x49fb int32_t v9; // 0x4978 if (v7 > v6) { // 0x4978 v9 = *(int32_t *)(v2 + 8); if (v9 == 0) { v4 = v2; v5 = v2; // 0x49d0 if (v4 != *(int32_t *)(a2 + 12)) { // 0x49d5 if (*(int32_t *)(v5 + 16) >= *(int32_t *)a3) { // 0x49a8 *a1 = v5; *(char *)(v1 + 4) = 0; // branch -> 0x49ae // 0x49ae result = v1; if (*(int32_t *)20 != *(int32_t *)(g8 + 60)) { // 0x4a23 return result; } // 0x49bd return result; } v8 = v4; } else { v8 = v4; } // 0x49f0 unknown_91a0((int32_t)&v3, a2, 0, v8, a3); *(char *)(v1 + 4) = 1; *(int32_t *)v1 = a3; // branch -> 0x49ae // 0x49ae result = v1; if (*(int32_t *)20 != *(int32_t *)(g8 + 60)) { // 0x4a23 return result; } // 0x49bd return result; } } else { int32_t v10 = *(int32_t *)(v2 + 12); // 0x498d if (v10 == 0) { // 0x49a2 if (v7 >= v6) { // 0x49a8 *a1 = v2; *(char *)(v1 + 4) = 0; // branch -> 0x49ae // 0x49ae result = v1; if (*(int32_t *)20 != *(int32_t *)(g8 + 60)) { // 0x4a23 return result; } // 0x49bd return result; } v8 = v2; // 0x49f0 unknown_91a0((int32_t)&v3, a2, 0, v8, a3); *(char *)(v1 + 4) = 1; *(int32_t *)v1 = a3; // branch -> 0x49ae // 0x49ae result = v1; if (*(int32_t *)20 != *(int32_t *)(g8 + 60)) { // 0x4a23 return result; } // 0x49bd return result; } v9 = v10; } // 0x4984 v2 = v9; // branch -> 0x4986 } } // 0x49d0 if (v4 == *(int32_t *)(a2 + 12)) { // 0x49f0 unknown_91a0((int32_t)&v3, a2, 0, v4, a3); *(char *)(v1 + 4) = 1; *(int32_t *)v1 = a3; // branch -> 0x49ae // 0x49ae result = v1; if (*(int32_t *)20 != *(int32_t *)(g8 + 60)) { // 0x4a23 return result; } // 0x49bd return result; } // 0x49d5 if (*(int32_t *)(v5 + 16) >= *(int32_t *)a3) { // 0x49a8 *a1 = v5; *(char *)(v1 + 4) = 0; // branch -> 0x49ae // 0x49ae result = v1; if (*(int32_t *)20 != *(int32_t *)(g8 + 60)) { // 0x4a23 return result; } // 0x49bd return result; } // 0x49f0 unknown_91a0((int32_t)&v3, a2, 0, v4, a3); *(char *)(v1 + 4) = 1; *(int32_t *)v1 = a3; // branch -> 0x49ae // 0x49ae result = v1; if (*(int32_t *)20 != *(int32_t *)(g8 + 60)) { // 0x4a23 return result; } // 0x49bd return result; } // Address range: 0x4a30 - 0x4a84 // Demangled: std::_Rb_tree<int, std::pair<int const, CAddrInfo>, std::_Select1st<std::pair<int const, CAddrInfo> >, std::less<int>, std::allocator<std::pair<int const, CAddrInfo> > >::_M_insert_unique_(std::_Rb_tree_const_iterator<std::pair<int const, CAddrInfo> >, std::pair<int const, CAddrInfo> const &) int32_t _ZNSt8_Rb_treeIiSt4pairIKi9CAddrInfoESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_insert_unique_ESt23_Rb_tree_const_iteratorIS3_ERKS3_(int32_t a1, int32_t a2, int32_t a3, int32_t * a4) { int32_t v1 = (int32_t)a4; g5 = a2; g3 = a3; g7 = a1; g2 = v1; int32_t v2 = a3; // 0x4a6d if (a2 + 4 == a3) { // bb function_4b38(*(int32_t *)20); v2 = g3; v1 = g2; // branch -> 0x4a6a } uint32_t v3 = *(int32_t *)v1; // 0x4a6a uint32_t v4 = *(int32_t *)(v2 + 16); // 0x4a6d int32_t v5 = v3 - v4; // 0x4a6d g24 = ((v5 ^ v3) & (v4 ^ v3)) < 0; g26 = v5 == 0; g25 = v5 < 0; if (v3 >= v4) { // bb115 function_4ae8(); v2 = g3; // branch -> 0x4a72 } int32_t v6 = *(int32_t *)(g5 + 12); // 0x4a72 g1 = v6; int32_t result = v6; // 0x4a80 if (v6 == v2) { // bb116 result = function_4bae(); // branch -> 0x4a7d } // 0x4a7d return result; } // Address range: 0x4abc - 0x4ae5 int32_t function_4abc(void) { // 0x4abc g1 = g7; int32_t result = g7; // 0x4ae2 int32_t v1; if (*(int32_t *)20 != v1) { // bb result = function_4bb7(); // branch -> 0x4acf } // 0x4acf return result; } // Address range: 0x4ae8 - 0x4b00 int32_t function_4ae8(void) { // 0x4ae8 if (g26 || g25 != g24) { // bb function_4b78(); // branch -> 0x4aee } int32_t v1 = *(int32_t *)(g5 + 16); // 0x4aee g1 = v1; int32_t result = v1; // 0x4afc if (v1 == g3) { // bb3 result = function_4b80(); // branch -> 0x4af9 } // 0x4af9 return result; } // Address range: 0x4b1d - 0x4b36 int32_t function_4b1d(void) { int32_t v1 = g1; // 0x4b1d unknown_9290(g7, g5, v1, v1); return function_4abc(); } // Address range: 0x4b38 - 0x4b72 int32_t function_4b38(int32_t a1) { int32_t v1 = g5; // 0x4b38 int32_t v2; // bp+40 if (*(int32_t *)(v1 + 20) == 0) { // 0x4b50 unknown_9370((int32_t)&v2, v1); *(int32_t *)g7 = a1; return function_4abc(); } int32_t v3 = *(int32_t *)(v1 + 16); // 0x4b3f g1 = v3; if (*(int32_t *)(v3 + 16) < g2) { // bb function_4b80(); // branch -> 0x4b50 } // 0x4b50 unknown_9370((int32_t)&v2, g5); *(int32_t *)g7 = a1; return function_4abc(); } // Address range: 0x4b78 - 0x4b7f int32_t function_4b78(void) { // 0x4b78 *(int32_t *)g7 = g3; return function_4abc(); } // Address range: 0x4b80 - 0x4ba4 int32_t function_4b80(void) { // 0x4b80 unknown_9290(g7, g5, 0, g1); return function_4abc(); } // Address range: 0x4ba8 - 0x4bae int32_t function_4ba8(void) { // 0x4ba8 return 0; } // Address range: 0x4bae - 0x4bb7 int32_t function_4bae(void) { // 0x4bae return function_4b1d(); } // Address range: 0x4bb7 - 0x4bb8 int32_t function_4bb7(void) { // 0x4bb7 return g1; } // Address range: 0x4bc0 - 0x4c47 // Demangled: std::map<int, CAddrInfo, std::less<int>, std::allocator<std::pair<int const, CAddrInfo> > >::operator[](int const &) int32_t _ZNSt3mapIi9CAddrInfoSt4lessIiESaISt4pairIKiS0_EEEixERS4_(int32_t a1, int32_t * a2) { int32_t v1 = g2; // 0x4bc0 int32_t v2 = g5; // 0x4bc1 int32_t v3 = g7; // 0x4bc2 int32_t v4 = g3; // 0x4bc3 g2 = a1; g5 = (int32_t)a2; int32_t v5 = *(int32_t *)(a1 + 8); // 0x4be7 int32_t v6 = a1 + 4; // 0x4bea int32_t v7; // bp-112 if (v5 == 0) { // 0x4c38 g3 = v6; // branch -> 0x4c40 } else { uint32_t v8 = *a2; // 0x4bf1 g3 = v6; int32_t v9 = v6; // branch -> 0x4c01 lab_0x4c01: while (true) { int32_t v10 = v5; // 0x4c01 // branch -> 0x4c01 int32_t v11; // 0x4c24 int32_t result2; // 0x4c24 int32_t result3; // 0x4c4416 while (true) { // 0x4c01 if (v8 > *(int32_t *)(v10 + 16)) { int32_t v12 = *(int32_t *)(v10 + 12); // 0x4c06 if (v12 == 0) { result3 = v12; v11 = v9; // break -> 0x4c0d break; } v10 = v12; // continue -> 0x4c01 continue; } else { // 0x4bf8 g3 = v10; int32_t v13 = *(int32_t *)(v10 + 8); // 0x4bfa if (v13 == 0) { result3 = 0; v11 = v10; // break (via goto) -> 0x4c0d goto lab_0x4c0d; } v9 = v10; v5 = v13; // continue (via goto) -> 0x4c01 goto lab_0x4c01; } // 0x4c0d int32_t result; // 0x4c44 if (v6 == v11) { result = result3; // 0x4c40 g7 = &v7; return result; } uint32_t v14 = *(int32_t *)(v11 + 16); // 0x4c11 if (v14 > v8) { result = result3; // 0x4c40 g7 = &v7; return result; } // 0x4c16 result2 = v11 + 20; g1 = result2; // 0x4c2d g3 = v4; g7 = v3; g5 = v2; g2 = v1; return result2; } lab_0x4c0d: // 0x4c0d if (v6 == v11 || *(int32_t *)(v11 + 16) > v8) { // 0x4c40 g7 = &v7; return result3; } // 0x4c16 result2 = v11 + 20; g1 = result2; // 0x4c2d g3 = v4; g7 = v3; g5 = v2; g2 = v1; return result2; } } // 0x4c40 g7 = &v7; return 0; } // Address range: 0x4c5a - 0x4ce9 int32_t function_4c5a(int32_t a1) { int32_t v1 = 0; // ebx int32_t * v2 = (int32_t *)(v1 + 0x14b907); // 0x4c5a *v2 = *v2 - 1; char v3 = *(char *)&g1; // 0x4c60 int32_t v4 = 0; // eax *(char *)v4 = (char)v4 + v3; int32_t v5 = 0; // bp+44 __asm_rep_movsd_memcpy((char *)&v5, (char *)0, 0); int32_t v6; // bp+28 int32_t v7 = &v6; // 0x4cc5 return unknown_95f0(v7, v1, (int32_t)&v4); } // Address range: 0x4ce9 - 0x4cea int32_t function_4ce9(void) { // 0x4ce9 return g1; } // Address range: 0x4cf0 - 0x4d84 // Demangled: std::_Rb_tree<CNetAddr, std::pair<CNetAddr const, int>, std::_Select1st<std::pair<CNetAddr const, int> >, std::less<CNetAddr>, std::allocator<std::pair<CNetAddr const, int> > >::_M_insert_(std::_Rb_tree_node_base const *, std::_Rb_tree_node_base const *, std::pair<CNetAddr const, int> const &) int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE10_M_insert_EPKSt18_Rb_tree_node_baseSC_RKS3_(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t * a5) { int32_t result = a3; // eax int32_t v1 = (int32_t)a5; // ebx int32_t v2 = a2 + 4; // 0x4d22 g4 = v2; g2 = a4; int32_t v3 = a3; // 0x4d52 if (a3 == 0) { int32_t v4 = function_4db8(v2); // 0x4d31 result = v4; v3 = v4; // branch -> 0x4d37 } int32_t v5 = v3 + 16; // 0x4d4b if (v5 != 0) { // 0x4d50 *(int32_t *)v5 = *(int32_t *)v1; *(int32_t *)(result + 20) = *(int32_t *)(v1 + 4); *(int32_t *)(result + 24) = *(int32_t *)(v1 + 8); *(int32_t *)(result + 28) = *(int32_t *)(v1 + 12); *(int32_t *)(result + 32) = *(int32_t *)(v1 + 16); // branch -> 0x4d6d } else { result = v3; } // 0x4d6d return result; } // Address range: 0x4d88 - 0x4db8 int32_t function_4d88(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5) { int32_t * v1 = (int32_t *)-0x7ce7dbbc; // 0x4d88 *v1 = *v1 - 1; int32_t v2 = 0; // 0x4d8f int32_t v3 = (v2 + 1 + (int32_t)false) % 256 | v2 & -256; // 0x4d8f int32_t result = 0; // edi *(int32_t *)result = v3; g1 = result; if (*(int32_t *)20 != a1) { // bb result = function_4ddb(); // branch -> 0x4da2 } // 0x4da2 return result; } // Address range: 0x4db8 - 0x4dca int32_t function_4db8(int32_t a1) { // 0x4db8 return g2 + 16; } // Address range: 0x4dcf - 0x4ddb int32_t function_4dcf(void) { // 0x4dcf return 0; } // Address range: 0x4ddb - 0x4ddc int32_t function_4ddb(void) { // 0x4ddb return g1; } // Address range: 0x4de0 - 0x4e23 // Demangled: std::_Rb_tree<CNetAddr, std::pair<CNetAddr const, int>, std::_Select1st<std::pair<CNetAddr const, int> >, std::less<CNetAddr>, std::allocator<std::pair<CNetAddr const, int> > >::_M_insert_unique(std::pair<CNetAddr const, int> const &) int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE16_M_insert_uniqueERKS3_(int32_t a1, int32_t a2, int32_t a3) { // 0x4de0 g2 = a2; g1 = 0; g5 = a1; g7 = a3; int32_t v1 = *(int32_t *)(a2 + 8); // 0x4dff if (v1 != 0) { // 0x4e19 return v1 + 16; } // 0x4e06 return function_4eb7(*(int32_t *)20); } // Address range: 0x4e33 - 0x4e37 int32_t function_4e33(void) { // 0x4e33 return g1; } // Address range: 0x4e37 - 0x4e3f int32_t function_4e37(void) { // 0x4e37 int32_t result; // 0x4e3c if (g3 == *(int32_t *)(g2 + 12)) { // bb result = function_4e88(); // branch -> 0x4e3c } else { // 0x4e37 result = g1; // branch -> 0x4e3c } // 0x4e3c return result; } // Address range: 0x4e45 - 0x4e48 int32_t function_4e45(void) { // 0x4e45 return 0; } // Address range: 0x4e67 - 0x4e80 int32_t function_4e67(void) { int32_t result = g5; // 0x4e72 g1 = result; int32_t v1; if (*(int32_t *)20 != v1) { // bb result = function_4ebf(); // branch -> 0x4e76 } // 0x4e76 return result; } // Address range: 0x4e80 - 0x4e84 int32_t function_4e80(void) { // 0x4e80 return 0; } // Address range: 0x4e88 - 0x4eb7 int32_t function_4e88(void) { // 0x4e88 int32_t v1; // bp+44 int32_t v2 = &v1; // 0x4e88 unknown_9ad0(v2, 0, g3, g7); *(char *)(g5 + 4) = 1; *(int32_t *)g5 = v2; return function_4e67(); } // Address range: 0x4eb7 - 0x4ebf int32_t function_4eb7(int32_t a1) { // 0x4eb7 g3 = g2 + 4; return function_4e37(); } // Address range: 0x4ebf - 0x4ec4 int32_t function_4ebf(void) { // 0x4ebf return g1; } // Address range: 0x4ed0 - 0x4f18 // Demangled: std::_Rb_tree<CNetAddr, std::pair<CNetAddr const, int>, std::_Select1st<std::pair<CNetAddr const, int> >, std::less<CNetAddr>, std::allocator<std::pair<CNetAddr const, int> > >::_M_insert_unique_(std::_Rb_tree_const_iterator<std::pair<CNetAddr const, int> >, std::pair<CNetAddr const, int> const &) int32_t _ZNSt8_Rb_treeI8CNetAddrSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE17_M_insert_unique_ESt23_Rb_tree_const_iteratorIS3_ERKS3_(int32_t a1, int32_t a2, int32_t a3, int32_t a4) { // 0x4ed0 g5 = a2; g3 = a3; g7 = a1; int32_t v1 = a2 + 4; // 0x4ef7 g2 = a4; int32_t result = v1; // 0x4f15 if (v1 == a3) { // bb result = function_5020(*(int32_t *)20); // branch -> 0x4f0a } // 0x4f0a return result; } // Address range: 0x4f3b - 0x4f44 int32_t function_4f3b(void) { int32_t * v1 = (int32_t *)-0x76fbdb94; // 0x4f3b *v1 = *v1 - 1; return 0; } // Address range: 0x4f50 - 0x4f5c int32_t function_4f50(int16_t a1) { int32_t * v1 = (int32_t *)-0x7bdbdbac; // 0x4f50 *v1 = *v1 - 1; unsigned char v2 = *(char *)&g5; // 0x4f56 *(char *)0 = v2 / 16 | 16 * v2; return 0; } // Address range: 0x4f83 - 0x4fac int32_t function_4f83(void) { // 0x4f83 int32_t v1; int32_t v2 = *(int32_t *)20 ^ v1; // 0x4f87 g6 = v2; g1 = g7; int32_t result = g7; // 0x4fa9 if (v2 != 0) { // bb result = function_50d0(); // branch -> 0x4f96 } // 0x4f96 return result; } // Address range: 0x4fd9 - 0x4fde int32_t function_4fd9(void) { // 0x4fd9 return 0; } // Address range: 0x4feb - 0x501f int32_t function_4feb(void) { int32_t * v1 = (int32_t *)(g3 - 0x7bdbdbac); // 0x4feb *v1 = *v1 - 1; char * v2 = (char *)(g3 - 117 + g7); // 0x4ff1 *v2 = 8 * *v2; *(char *)g5 = __asm_insb((int16_t)g6); // bb function_50c0(); // branch -> 0x5003 // 0x5003 unknown_9bc0(g7, g5, g6); return function_4f83(); } // Address range: 0x5020 - 0x5065 int32_t function_5020(int32_t a1) { int32_t v1 = g5; // 0x5020 if (*(int32_t *)(v1 + 20) != 0) { // 0x5058 return *(int32_t *)(v1 + 16) + 16; } // 0x5027 int32_t v2; // bp+40 unknown_9cb0((int32_t)&v2, v1); *(int32_t *)g7 = a1; return function_4f83(); } // Address range: 0x5069 - 0x507b int32_t function_5069(void) { int32_t v1 = 0; // eax int32_t * v2 = (int32_t *)(v1 + 0x6c89b974 + 8 * v1); // 0x5069 *v2 = *v2 + 1; return function_5084(*(int32_t *)(g5 + 16)); } // Address range: 0x5084 - 0x50a0 int32_t function_5084(int32_t a1) { // 0x5084 unknown_9bc0(g7, g5, 0); return function_4f83(); } // Address range: 0x50a0 - 0x50c0 int32_t function_50a0(void) { // 0x50a0 unknown_9bc0(g7, 0, 0); return function_4f83(); } // Address range: 0x50c0 - 0x50c6 int32_t function_50c0(void) { // 0x50c0 return function_5084(g3); } // Address range: 0x50c6 - 0x50d0 int32_t function_50c6(void) { // 0x50c6 return function_5084(0); } // Address range: 0x50d0 - 0x50d1 int32_t function_50d0(void) { // 0x50d0 return g1; } // Address range: 0x50e0 - 0x5223 // Demangled: void WriteCompactSize<CDataStream>(CDataStream &, unsigned long long) int32_t _Z16WriteCompactSizeI11CDataStreamEvRT_y(int32_t a1, int32_t a2, int32_t a3) { int32_t v1 = *(int32_t *)20; // bp-16 int32_t v2; // bp-17 int32_t v3; // 0x5143 int32_t result; // 0x515b if (a3 != 0) { int32_t v4 = *(int32_t *)(a1 + 4); // 0x5106 v2 = -1; unknown_92f0(a1, v4, (int32_t)&v2, (int32_t)&v1); // branch -> 0x5143 // 0x5143 v3 = *(int32_t *)(a1 + 4); int32_t v5; // bp-28 unknown_92f0(a1, v3, (int32_t)&a2, (int32_t)&v5); result = *(int32_t *)20 ^ v1; if (result != 0) { // 0x5223 return result; } // 0x5168 return result; } // 0x5170 if (a2 < 253) { // 0x51c0 v2 = a2; // branch -> 0x5143 // 0x5143 v3 = *(int32_t *)(a1 + 4); unknown_92f0(a1, v3, (int32_t)&v2, (int32_t)&v1); result = *(int32_t *)20 ^ v1; if (result != 0) { // 0x5223 return result; } // 0x5168 return result; } // 0x5177 int32_t * v6; if (a2 < 0x10000) { int32_t v7 = *(int32_t *)(a1 + 4); // 0x51e5 v2 = -3; unknown_92f0(a1, v7, (int32_t)&v2, (int32_t)&v1); int32_t v8; // bp-18 v6 = &v8; // branch -> 0x5143 } else { int32_t v9 = *(int32_t *)(a1 + 4); // 0x5182 v2 = -2; unknown_92f0(a1, v9, (int32_t)&v2, (int32_t)&v1); v6 = &a2; // branch -> 0x5143 } // 0x5143 v3 = *(int32_t *)(a1 + 4); unknown_92f0(a1, v3, (int32_t)&a2, (int32_t)v6); result = *(int32_t *)20 ^ v1; if (result != 0) { // 0x5223 return result; } // 0x5168 return result; } // Address range: 0x5230 - 0x5246 int32_t _GLOBAL__sub_I__ZNK9CAddrInfo14GetTriedBucketERKSt6vectorIhSaIhEE(void) { // 0x5230 return 0; } // Address range: 0x52a4 - 0x52aa int32_t function_52a4(void) { // 0x52a4 return 0; } // Address range: 0x52ae - 0x52b4 int32_t function_52ae(void) { // 0x52ae return 0; } // Address range: 0x52b8 - 0x52be int32_t function_52b8(void) { // 0x52b8 return 0; } // Address range: 0x52be - 0x52cf int32_t function_52be(int32_t a1) { int32_t result = *(int32_t *)20 ^ a1; // 0x52c2 if (result != 0) { // 0x52cf } // 0x52cb return result; } // Address range: 0x6200 - 0x6201 int32_t function_6200(int32_t a1) { // 0x6200 return g1; } // Address range: 0x6270 - 0x6271 int32_t function_6270(int32_t a1) { // 0x6270 return g1; } // Address range: 0x6340 - 0x6341 int32_t function_6340(int32_t a1) { // 0x6340 return g1; } // Address range: 0x18244489 - 0x1824448a int32_t function_18244489(void) { // 0x18244489 return g1; } // Address range: 0x860fdeb3 - 0x860fdeb4 int32_t function_860fdeb3(void) { // 0x860fdeb3 return g1; } // Address range: 0x870fe008 - 0x870fe009 int32_t function_870fe008(void) { // 0x870fe008 return g1; } // --------------------- Meta-Information --------------------- // Detected compiler/packer: gcc (4.6.3) // Detected language: C++ // Detected functions: 335 // Decompilation date: 2018-06-09 23:53:48