#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 */

/* Type definitions */

/* Variables and functions */
int O_CREAT;
int O_RDWR;
int PATH_MAX;
int S_IRWXG;
int S_IRWXO;
int S_IRWXU;
int /*<<< orphan*/ __NR_gettid;
int close(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ fsync(int);
int /*<<< orphan*/ getcwd(char *, int);
int gethostname(char *, int);
int init_compile(int, char *, char *);
char *malloc(int);
int mkdir(char *, int);
int open(char *, int, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ pthread_exit(void *);
scalar_t__ rm_file_dir(int, int, char *, char *);
int sprintf(char *, char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ sync();
char *syscall(int /*<<< orphan*/);
int /*<<< orphan*/ usleep(int);
int write(int, char *, int);
void *crte_mk_rm(void *args) {
  int dircnt;
  int fd;
  int filecnt;
  int numchar[2];
  char *dirname;
  char *tmpdirname;
  char *cfilename;
  char *mkfilename;
  char *hostname;
  char *prog_buf;
  char *make_buf;
  char *pwd;
  long *locargptr = (long *)args;
  volatile int exit_val = 0;
  if ((dirname = malloc(sizeof(char) * 2048)) == NULL) {
    perror("crte_mk_rm(): dirname malloc()");
    do {
      exit_val = -1;
      ;
      pthread_exit((void *)exit_val);
    } while (0);
  }
  if ((tmpdirname = malloc(sizeof(char) * 2048)) == NULL) {
    perror("crte_mk_rm(): tmpdirname malloc()");
    do {
      exit_val = -1;
      ;
      pthread_exit((void *)exit_val);
    } while (0);
  }
  if ((cfilename = malloc(sizeof(char) * 2048)) == NULL) {
    perror("crte_mk_rm(): cfilename malloc()");
    do {
      exit_val = -1;
      ;
      pthread_exit((void *)exit_val);
    } while (0);
  }
  if ((mkfilename = malloc(sizeof(char) * 2048)) == NULL) {
    perror("crte_mk_rm(): mkfilename malloc()");
    do {
      exit_val = -1;
      ;
      pthread_exit((void *)exit_val);
    } while (0);
  }
  if ((prog_buf = malloc(sizeof(char) * 4096)) == NULL) {
    perror("crte_mk_rm(): prog_buf malloc()");
    do {
      exit_val = -1;
      ;
      pthread_exit((void *)exit_val);
    } while (0);
  }
  if ((pwd = malloc(PATH_MAX)) == NULL) {
    perror("crte_mk_rm(): pwd malloc()");
    do {
      exit_val = -1;
      ;
      pthread_exit((void *)exit_val);
    } while (0);
  }
  if ((hostname = malloc(sizeof(char) * 1024)) == NULL) {
    perror("crte_mk_rm(): hostname malloc()");
    do {
      exit_val = -1;
      ;
      pthread_exit((void *)exit_val);
    } while (0);
  }
  if (gethostname(hostname, 255) == -1) {
    perror("crte_mk_rm(): gethostname()");
    do {
      exit_val = -1;
      ;
      pthread_exit((void *)exit_val);
    } while (0);
  }
  if (!getcwd(pwd, PATH_MAX)) {
    perror("crte_mk_rm(): getcwd()");
    do {
      exit_val = -1;
      ;
      pthread_exit((void *)exit_val);
    } while (0);
  }
  numchar[0] = sprintf(prog_buf, "main()\n{\n\t printf(\"hello world\");\n}\n");
  for (dircnt = 0; dircnt < (int)locargptr[0]; dircnt++) {
    if (dircnt == 0)
      sprintf(dirname, "%s.%ld", hostname, syscall(__NR_gettid));
    else {
      sprintf(tmpdirname, "%s/%ld.%d", dirname, syscall(__NR_gettid), dircnt);
      sprintf(dirname, "%s", tmpdirname);
    }
    sync();
    ;
    if (mkdir(dirname, 0777) == -1) {
      perror("crte_mk_rm(): mkdir()");
      do {
        exit_val = -1;
        ;
        pthread_exit((void *)exit_val);
      } while (0);
    }
  }
  sync();
  usleep(10);
  for (dircnt = 0; dircnt < (int)locargptr[0]; dircnt++) {
    if (dircnt == 0)
      sprintf(dirname, "%s/%s.%ld", pwd, hostname, syscall(__NR_gettid));
    else {
      sprintf(tmpdirname, "%s/%ld.%d", dirname, syscall(__NR_gettid), dircnt);
      sprintf(dirname, "%s", tmpdirname);
    }
    sync();
    if ((make_buf = malloc(sizeof(char) * 4096)) == NULL) {
      perror("crte_mk_rm(): make_buf malloc()");
      do {
        exit_val = -1;
        ;
        pthread_exit((void *)exit_val);
      } while (0);
    }
    sprintf(mkfilename, "%s/makefile", dirname);
    {
      char *dotc = malloc(10);
      dotc = ".c";
      sync();
      usleep(10);
      if (dircnt == (locargptr[0] - 1)) {
        numchar[1] = sprintf(make_buf,
                             "CFLAGS := -O -w -g\n"
                             "SUBDIRS = %ld.%d\n"
                             "SRCS=$(wildcard *.c)\n"
                             "TARGETS=$(patsubst %%%s,\%%,$(SRCS))\n"
                             "all:\t $(TARGETS)\n"
                             "clean:\n"
                             "\trm -f $(TARGETS)\n",
                             syscall(__NR_gettid), dircnt + 1, dotc);
      } else {
        numchar[1] =
            sprintf(make_buf,
                    "CFLAGS := -O -w -g\n"
                    "SUBDIRS = %ld.%d\n"
                    "SRCS=$(wildcard *.c)\n"
                    "TARGETS=$(patsubst %%%s,\%%,$(SRCS))\n\n\n"
                    "all:\t $(TARGETS)\n"
                    "\t@for i in $(SUBDIRS); do $(MAKE) -C $$i ; done\n\n"
                    "clean:\n"
                    "\trm -f $(TARGETS)\n"
                    "\t@for i in $(SUBDIRS); do $(MAKE) -C $$i clean ; done\n",
                    syscall(__NR_gettid), dircnt + 1, dotc);
      }
    }
    sync();
    usleep(10);
    ;
    if ((fd = open(mkfilename, O_CREAT | O_RDWR,
                   S_IRWXU | S_IRWXG | S_IRWXO)) == -1) {
      ;

      ;
      perror("crte_mk_rm() failed creating makefile: open()");
      do {
        exit_val = -1;
        ;
        pthread_exit((void *)exit_val);
      } while (0);
    } else {
      sync();
      if (write(fd, make_buf, numchar[1]) == -1) {
        perror("crte_mk_rm(): write()");
        do {
          exit_val = -1;
          ;
          pthread_exit((void *)exit_val);
        } while (0);
      }
      free(make_buf);
      if (close(fd) == -1) {
        perror("crte_mk_rm(): close()");
        do {
          exit_val = -1;
          ;
          pthread_exit((void *)exit_val);
        } while (0);
      }
    }
  }
  for (dircnt = 0; dircnt < (int)locargptr[0]; dircnt++) {
    if (dircnt == 0)
      sprintf(dirname, "%s/%s.%ld", pwd, hostname, syscall(__NR_gettid));
    else {
      sprintf(tmpdirname, "%s/%ld.%d", dirname, syscall(__NR_gettid), dircnt);
      sprintf(dirname, "%s", tmpdirname);
    }
    sync();
    for (filecnt = 0; filecnt < (int)locargptr[1]; filecnt++) {
      sprintf(cfilename, "%s/%ld.%d.%d.c", dirname, syscall(__NR_gettid),
              dircnt, filecnt);

      ;
      if ((fd = open(cfilename, O_CREAT | O_RDWR,
                     S_IRWXU | S_IRWXG | S_IRWXO)) == -1) {
        fprintf(stderr, "open() failed to create file %s\n", cfilename);
        perror("crte_mk_rm(): failed creating .c files: open()");
        do {
          exit_val = -1;
          ;
          pthread_exit((void *)exit_val);
        } while (0);
      } else {
        sync();
        if (write(fd, prog_buf, numchar[0]) == -1) {
          perror("crte_mk_rm(): write()");
          do {
            exit_val = -1;
            ;
            pthread_exit((void *)exit_val);
          } while (0);
        }
        fsync(fd);
        if (close(fd) == -1) {
          perror("crte_mk_rm(): close()");
          do {
            exit_val = -1;
            ;
            pthread_exit((void *)exit_val);
          } while (0);
        }
      }
    }
  }
  if (init_compile(1, pwd, hostname) == 1) {
    fprintf(stderr, "init_compile() make failed\n");
    do {
      exit_val = -1;
      ;
      pthread_exit((void *)exit_val);
    } while (0);
  } else {
    if (init_compile(0, pwd, hostname) == 1) {
      fprintf(stderr, "init_compile() make clean failed\n");
      do {
        exit_val = -1;
        ;
        pthread_exit((void *)exit_val);
      } while (0);
    }
  }
  sync();
  if (rm_file_dir((int)locargptr[0], (int)locargptr[1], hostname, pwd)) {
    fprintf(stderr, "crte_mk_rm(): rm_file_dir() failed\n");
    do {
      exit_val = -1;
      ;
      pthread_exit((void *)exit_val);
    } while (0);
  }
  do {
    exit_val = 0;
    ;
    pthread_exit((void *)exit_val);
  } while (0);
}


x86 assembly (clang, -O0):
<crte_mk_rm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x70(%rbp)
movl   $0x0,-0x74(%rbp)
mov    $0x800,%edi
call   10e0 <malloc@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    1279 <crte_mk_rm+0x59>
lea    0xda3(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1279 <crte_mk_rm+0x59>
mov    $0x800,%edi
call   10e0 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    12b4 <crte_mk_rm+0x94>
lea    0xd87(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    12b4 <crte_mk_rm+0x94>
mov    $0x800,%edi
call   10e0 <malloc@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
jne    12ef <crte_mk_rm+0xcf>
lea    0xd6e(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    12ef <crte_mk_rm+0xcf>
mov    $0x800,%edi
call   10e0 <malloc@plt>
mov    %rax,-0x48(%rbp)
cmp    $0x0,%rax
jne    132a <crte_mk_rm+0x10a>
lea    0xd54(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    132a <crte_mk_rm+0x10a>
mov    $0x1000,%edi
call   10e0 <malloc@plt>
mov    %rax,-0x58(%rbp)
cmp    $0x0,%rax
jne    1365 <crte_mk_rm+0x145>
lea    0xd3b(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1365 <crte_mk_rm+0x145>
mov    0x2c7c(%rip),%rax
mov    (%rax),%edi
call   10e0 <malloc@plt>
mov    %rax,-0x68(%rbp)
cmp    $0x0,%rax
jne    13a4 <crte_mk_rm+0x184>
lea    0xd1c(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    13a4 <crte_mk_rm+0x184>
mov    $0x400,%edi
call   10e0 <malloc@plt>
mov    %rax,-0x50(%rbp)
cmp    $0x0,%rax
jne    13df <crte_mk_rm+0x1bf>
lea    0xcfc(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    13df <crte_mk_rm+0x1bf>
mov    -0x50(%rbp),%rdi
mov    $0xff,%esi
call   1120 <gethostname@plt>
cmp    $0xffffffff,%eax
jne    1419 <crte_mk_rm+0x1f9>
lea    0xce2(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1419 <crte_mk_rm+0x1f9>
mov    -0x68(%rbp),%rdi
mov    0x2bc4(%rip),%rax
mov    (%rax),%esi
call   1080 <getcwd@plt>
cmp    $0x0,%eax
jne    1457 <crte_mk_rm+0x237>
lea    0xcc0(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1457 <crte_mk_rm+0x237>
mov    -0x58(%rbp),%rdi
lea    0xcb0(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x70(%rbp),%rcx
mov    (%rcx),%rcx
cmp    %ecx,%eax
jge    1588 <crte_mk_rm+0x368>
cmpl   $0x0,-0x14(%rbp)
jne    14d7 <crte_mk_rm+0x2b7>
mov    -0x30(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    0x2b0c(%rip),%rax
mov    (%rax),%edi
call   10b0 <syscall@plt>
mov    -0x90(%rbp),%rdi
mov    -0x88(%rbp),%rdx
mov    %rax,%rcx
lea    0xc92(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
jmp    1534 <crte_mk_rm+0x314>
mov    -0x38(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    0x2ac4(%rip),%rax
mov    (%rax),%edi
call   10b0 <syscall@plt>
mov    -0xa0(%rbp),%rdi
mov    -0x98(%rbp),%rdx
mov    %rax,%rcx
mov    -0x14(%rbp),%r8d
lea    0xc20(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0xc14(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    $0x0,%al
call   10c0 <sync@plt>
mov    -0x30(%rbp),%rdi
mov    $0x1ff,%esi
call   1050 <mkdir@plt>
cmp    $0xffffffff,%eax
jne    1575 <crte_mk_rm+0x355>
lea    0xbeb(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1575 <crte_mk_rm+0x355>
jmp    157a <crte_mk_rm+0x35a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1473 <crte_mk_rm+0x253>
mov    $0x0,%al
call   10c0 <sync@plt>
mov    $0xa,%edi
call   1140 <usleep@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x70(%rbp),%rcx
mov    (%rcx),%rcx
cmp    %ecx,%eax
jge    189b <crte_mk_rm+0x67b>
cmpl   $0x0,-0x14(%rbp)
jne    1616 <crte_mk_rm+0x3f6>
mov    -0x30(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    0x29d4(%rip),%rax
mov    (%rax),%edi
call   10b0 <syscall@plt>
mov    -0xb8(%rbp),%rdi
mov    -0xb0(%rbp),%rdx
mov    -0xa8(%rbp),%rcx
mov    %rax,%r8
lea    0xb50(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
jmp    1673 <crte_mk_rm+0x453>
mov    -0x38(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    0x2985(%rip),%rax
mov    (%rax),%edi
call   10b0 <syscall@plt>
mov    -0xc8(%rbp),%rdi
mov    -0xc0(%rbp),%rdx
mov    %rax,%rcx
mov    -0x14(%rbp),%r8d
lea    0xae1(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0xad5(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    $0x0,%al
call   10c0 <sync@plt>
mov    $0x1000,%edi
call   10e0 <malloc@plt>
mov    %rax,-0x60(%rbp)
cmp    $0x0,%rax
jne    16b5 <crte_mk_rm+0x495>
lea    0xacb(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    16b5 <crte_mk_rm+0x495>
mov    -0x48(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xac0(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    $0xa,%edi
call   10e0 <malloc@plt>
mov    %rax,-0x80(%rbp)
lea    0xc8f(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    $0x0,%al
call   10c0 <sync@plt>
mov    $0xa,%edi
call   1140 <usleep@plt>
movslq -0x14(%rbp),%rax
mov    -0x70(%rbp),%rcx
mov    (%rcx),%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
jne    1750 <crte_mk_rm+0x530>
mov    -0x60(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    0x2899(%rip),%rax
mov    (%rax),%edi
call   10b0 <syscall@plt>
mov    -0xd0(%rbp),%rdi
mov    %rax,%rdx
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    -0x80(%rbp),%r8
lea    0xa4f(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    %eax,-0x20(%rbp)
jmp    178e <crte_mk_rm+0x56e>
mov    -0x60(%rbp),%rax
mov    %rax,-0xd8(%rbp)
mov    0x2856(%rip),%rax
mov    (%rax),%edi
call   10b0 <syscall@plt>
mov    -0xd8(%rbp),%rdi
mov    %rax,%rdx
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    -0x80(%rbp),%r8
lea    0xa94(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   10c0 <sync@plt>
mov    $0xa,%edi
call   1140 <usleep@plt>
mov    -0x48(%rbp),%rdi
mov    0x284e(%rip),%rax
mov    (%rax),%esi
mov    0x2815(%rip),%rax
or     (%rax),%esi
mov    0x2814(%rip),%rax
mov    (%rax),%edx
mov    0x27fb(%rip),%rax
or     (%rax),%edx
mov    0x2812(%rip),%rax
or     (%rax),%edx
call   1100 <open@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
jne    1804 <crte_mk_rm+0x5e4>
lea    0xb21(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1888 <crte_mk_rm+0x668>
mov    $0x0,%al
call   10c0 <sync@plt>
mov    -0x18(%rbp),%edi
mov    -0x60(%rbp),%rsi
mov    -0x20(%rbp),%edx
call   1060 <write@plt>
cmp    $0xffffffff,%eax
jne    1846 <crte_mk_rm+0x626>
lea    0xb0d(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1846 <crte_mk_rm+0x626>
mov    -0x60(%rbp),%rdi
call   1040 <free@plt>
mov    -0x18(%rbp),%edi
call   1090 <close@plt>
cmp    $0xffffffff,%eax
jne    1883 <crte_mk_rm+0x663>
lea    0xae6(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1883 <crte_mk_rm+0x663>
jmp    1888 <crte_mk_rm+0x668>
jmp    188d <crte_mk_rm+0x66d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    15a0 <crte_mk_rm+0x380>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x70(%rbp),%rcx
mov    (%rcx),%rcx
cmp    %ecx,%eax
jge    1b0a <crte_mk_rm+0x8ea>
cmpl   $0x0,-0x14(%rbp)
jne    1918 <crte_mk_rm+0x6f8>
mov    -0x30(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0xe0(%rbp)
mov    0x26d2(%rip),%rax
mov    (%rax),%edi
call   10b0 <syscall@plt>
mov    -0xf0(%rbp),%rdi
mov    -0xe8(%rbp),%rdx
mov    -0xe0(%rbp),%rcx
mov    %rax,%r8
lea    0x84e(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
jmp    1975 <crte_mk_rm+0x755>
mov    -0x38(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0xf8(%rbp)
mov    0x2683(%rip),%rax
mov    (%rax),%edi
call   10b0 <syscall@plt>
mov    -0x100(%rbp),%rdi
mov    -0xf8(%rbp),%rdx
mov    %rax,%rcx
mov    -0x14(%rbp),%r8d
lea    0x7df(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0x7d3(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    $0x0,%al
call   10c0 <sync@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x70(%rbp),%rcx
mov    0x8(%rcx),%rcx
cmp    %ecx,%eax
jge    1af7 <crte_mk_rm+0x8d7>
mov    -0x40(%rbp),%rax
mov    %rax,-0x110(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    0x2605(%rip),%rax
mov    (%rax),%edi
call   10b0 <syscall@plt>
mov    -0x110(%rbp),%rdi
mov    -0x108(%rbp),%rdx
mov    %rax,%rcx
mov    -0x14(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
lea    0x989(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    -0x40(%rbp),%rdi
mov    0x260c(%rip),%rax
mov    (%rax),%esi
mov    0x25d3(%rip),%rax
or     (%rax),%esi
mov    0x25d2(%rip),%rax
mov    (%rax),%edx
mov    0x25b9(%rip),%rax
or     (%rax),%edx
mov    0x25d0(%rip),%rax
or     (%rax),%edx
call   1100 <open@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
jne    1a61 <crte_mk_rm+0x841>
mov    0x257e(%rip),%rax
mov    (%rax),%edi
mov    -0x40(%rbp),%rdx
lea    0x93b(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
lea    0x94e(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1ae4 <crte_mk_rm+0x8c4>
mov    $0x0,%al
call   10c0 <sync@plt>
mov    -0x18(%rbp),%edi
mov    -0x58(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1060 <write@plt>
cmp    $0xffffffff,%eax
jne    1aa3 <crte_mk_rm+0x883>
lea    0x8b0(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1aa3 <crte_mk_rm+0x883>
mov    -0x18(%rbp),%edi
call   10f0 <fsync@plt>
mov    -0x18(%rbp),%edi
call   1090 <close@plt>
cmp    $0xffffffff,%eax
jne    1adf <crte_mk_rm+0x8bf>
lea    0x88a(%rip),%rdi
call   1110 <perror@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1adf <crte_mk_rm+0x8bf>
jmp    1ae4 <crte_mk_rm+0x8c4>
jmp    1ae9 <crte_mk_rm+0x8c9>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1983 <crte_mk_rm+0x763>
jmp    1afc <crte_mk_rm+0x8dc>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    18a2 <crte_mk_rm+0x682>
mov    -0x68(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    $0x1,%edi
call   1070 <init_compile@plt>
cmp    $0x1,%eax
jne    1b53 <crte_mk_rm+0x933>
mov    0x247c(%rip),%rax
mov    (%rax),%edi
lea    0x88d(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1b9e <crte_mk_rm+0x97e>
mov    -0x68(%rbp),%rsi
mov    -0x50(%rbp),%rdx
xor    %edi,%edi
call   1070 <init_compile@plt>
cmp    $0x1,%eax
jne    1b99 <crte_mk_rm+0x979>
mov    0x2436(%rip),%rax
mov    (%rax),%edi
lea    0x863(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1b99 <crte_mk_rm+0x979>
jmp    1b9e <crte_mk_rm+0x97e>
mov    $0x0,%al
call   10c0 <sync@plt>
mov    -0x70(%rbp),%rax
mov    (%rax),%rax
mov    %eax,%edi
mov    -0x70(%rbp),%rax
mov    0x8(%rax),%rax
mov    %eax,%esi
mov    -0x50(%rbp),%rdx
mov    -0x68(%rbp),%rcx
call   1030 <rm_file_dir@plt>
cmp    $0x0,%rax
je     1bfd <crte_mk_rm+0x9dd>
mov    0x23d2(%rip),%rax
mov    (%rax),%edi
lea    0x821(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0xffffffff,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
jmp    1bfd <crte_mk_rm+0x9dd>
jmp    1c02 <crte_mk_rm+0x9e2>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
movslq %eax,%rdi
call   10d0 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crte_mk_rm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdi,0x10(%rsp)
movl   $0x0,0xc(%rsp)
mov    $0x800,%edi
call   10f0 <malloc@plt>
mov    %rax,%r13
test   %rax,%rax
je     1920 <crte_mk_rm+0x6f0>
mov    $0x800,%edi
call   10f0 <malloc@plt>
mov    %rax,0x28(%rsp)
test   %rax,%rax
je     1943 <crte_mk_rm+0x713>
mov    $0x800,%edi
call   10f0 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1966 <crte_mk_rm+0x736>
mov    $0x800,%edi
call   10f0 <malloc@plt>
mov    %rax,0x40(%rsp)
test   %rax,%rax
je     1989 <crte_mk_rm+0x759>
mov    $0x1000,%edi
call   10f0 <malloc@plt>
mov    %rax,0x38(%rsp)
test   %rax,%rax
je     19ac <crte_mk_rm+0x77c>
mov    0x2d22(%rip),%r15
mov    (%r15),%edi
call   10f0 <malloc@plt>
mov    %rax,%rbp
test   %rax,%rax
je     19cf <crte_mk_rm+0x79f>
mov    $0x400,%edi
call   10f0 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     19f2 <crte_mk_rm+0x7c2>
mov    %rbx,0x18(%rsp)
mov    %rbx,%rdi
mov    $0xff,%esi
call   1130 <gethostname@plt>
cmp    $0xffffffff,%eax
je     1a15 <crte_mk_rm+0x7e5>
mov    (%r15),%esi
mov    %rbp,%rdi
call   1090 <getcwd@plt>
test   %eax,%eax
je     1a38 <crte_mk_rm+0x808>
mov    %rbp,0x20(%rsp)
movups 0xdf8(%rip),%xmm0
mov    0x38(%rsp),%rcx
movups %xmm0,0x10(%rcx)
movups 0xdd8(%rip),%xmm0
movups %xmm0,(%rcx)
movabs $0xa7d0a3b292264,%rax
mov    %rax,0x1d(%rcx)
mov    0x10(%rsp),%rax
cmpl   $0x0,(%rax)
jle    142d <crte_mk_rm+0x1fd>
mov    0x2c58(%rip),%rbx
mov    (%rbx),%edi
call   10c0 <syscall@plt>
lea    0xdec(%rip),%rsi
mov    %r13,%rdi
mov    0x18(%rsp),%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1140 <sprintf@plt>
xor    %eax,%eax
call   10d0 <sync@plt>
mov    %r13,%rdi
mov    $0x1ff,%esi
call   1060 <mkdir@plt>
cmp    $0xffffffff,%eax
je     1a5b <crte_mk_rm+0x82b>
mov    0x10(%rsp),%rax
cmpl   $0x2,(%rax)
jl     142d <crte_mk_rm+0x1fd>
mov    $0x1,%ebp
lea    0xd80(%rip),%r15
mov    0x28(%rsp),%r12
jmp    13cc <crte_mk_rm+0x19c>
xchg   %ax,%ax
add    $0x1,%ebp
mov    0x10(%rsp),%rax
cmp    (%rax),%ebp
jge    142d <crte_mk_rm+0x1fd>
mov    (%rbx),%edi
call   10c0 <syscall@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r13,%rdx
mov    %rax,%rcx
mov    %ebp,%r8d
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1050 <strcpy@plt>
xor    %eax,%eax
call   10d0 <sync@plt>
mov    %r13,%rdi
mov    $0x1ff,%esi
call   1060 <mkdir@plt>
cmp    $0xffffffff,%eax
jne    13c0 <crte_mk_rm+0x190>
lea    0xd2d(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    13c0 <crte_mk_rm+0x190>
xor    %eax,%eax
call   10d0 <sync@plt>
mov    $0xa,%edi
call   1150 <usleep@plt>
mov    0x10(%rsp),%rax
cmpl   $0x0,(%rax)
jle    184a <crte_mk_rm+0x61a>
xor    %ebp,%ebp
mov    %r13,0x30(%rsp)
jmp    1498 <crte_mk_rm+0x268>
lea    0xeaa(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
mov    0x30(%rsp),%r13
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
mov    0x10(%rsp),%rax
mov    (%rax),%rax
movslq %eax,%rcx
cmp    %rcx,%rbp
jge    1673 <crte_mk_rm+0x443>
mov    0x2b19(%rip),%rax
mov    (%rax),%edi
call   10c0 <syscall@plt>
test   %rbp,%rbp
je     14e0 <crte_mk_rm+0x2b0>
mov    0x28(%rsp),%rbx
mov    %rbx,%rdi
lea    0xc7d(%rip),%rsi
mov    %r13,%rdx
mov    %rax,%rcx
mov    %ebp,%r8d
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1050 <strcpy@plt>
jmp    14fe <crte_mk_rm+0x2ce>
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
lea    0xc6d(%rip),%rsi
mov    0x20(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    %rax,%r8
xor    %eax,%eax
call   1140 <sprintf@plt>
xor    %eax,%eax
call   10d0 <sync@plt>
mov    $0x1000,%edi
call   10f0 <malloc@plt>
mov    %rax,%r15
test   %rax,%rax
je     1630 <crte_mk_rm+0x400>
mov    0x40(%rsp),%r13
mov    %r13,%rdi
lea    0xc57(%rip),%rsi
mov    0x30(%rsp),%rdx
xor    %eax,%eax
call   1140 <sprintf@plt>
xor    %eax,%eax
call   10d0 <sync@plt>
mov    $0xa,%edi
call   1150 <usleep@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%rbx
add    $0xffffffffffffffff,%rbx
mov    0x2a5e(%rip),%rax
mov    (%rax),%edi
call   10c0 <syscall@plt>
lea    0x1(%rbp),%ecx
cmp    %rbx,%rbp
lea    0xca7(%rip),%rsi
lea    0xc18(%rip),%rdx
cmove  %rdx,%rsi
mov    %r15,%rdi
mov    %rax,%rdx
lea    0xde6(%rip),%r8
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %eax,%r12d
xor    %eax,%eax
call   10d0 <sync@plt>
mov    $0xa,%edi
call   1150 <usleep@plt>
mov    0x2a20(%rip),%rax
mov    (%rax),%esi
mov    0x2a47(%rip),%rax
or     (%rax),%esi
mov    0x2a06(%rip),%rax
mov    (%rax),%edx
mov    0x2a0d(%rip),%rax
or     (%rax),%edx
mov    0x2a14(%rip),%rax
or     (%rax),%edx
mov    %r13,%rdi
call   1110 <open@plt>
cmp    $0xffffffff,%eax
je     1455 <crte_mk_rm+0x225>
mov    %eax,%ebx
xor    %eax,%eax
call   10d0 <sync@plt>
mov    %ebx,%edi
mov    %r15,%rsi
mov    %r12d,%edx
call   1070 <write@plt>
cmp    $0xffffffff,%eax
je     1653 <crte_mk_rm+0x423>
mov    %r15,%rdi
call   1040 <free@plt>
mov    %ebx,%edi
call   10a0 <close@plt>
cmp    $0xffffffff,%eax
mov    0x30(%rsp),%r13
jne    1480 <crte_mk_rm+0x250>
lea    0xd2c(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
jmp    146e <crte_mk_rm+0x23e>
lea    0xb2a(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    151b <crte_mk_rm+0x2eb>
lea    0xcda(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    15fa <crte_mk_rm+0x3ca>
test   %eax,%eax
jle    184a <crte_mk_rm+0x61a>
lea    0xcde(%rip),%rbp
xor    %r15d,%r15d
jmp    16a2 <crte_mk_rm+0x472>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r15d
mov    0x10(%rsp),%rax
cmp    (%rax),%r15d
jge    184a <crte_mk_rm+0x61a>
mov    0x290f(%rip),%rax
mov    (%rax),%edi
call   10c0 <syscall@plt>
test   %r15d,%r15d
je     16f0 <crte_mk_rm+0x4c0>
mov    0x28(%rsp),%rbx
mov    %rbx,%rdi
lea    0xa73(%rip),%rsi
mov    %r13,%rdx
mov    %rax,%rcx
mov    %r15d,%r8d
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1050 <strcpy@plt>
jmp    170e <crte_mk_rm+0x4de>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
lea    0xa5d(%rip),%rsi
mov    0x20(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    %rax,%r8
xor    %eax,%eax
call   1140 <sprintf@plt>
xor    %eax,%eax
call   10d0 <sync@plt>
mov    0x10(%rsp),%rax
cmpl   $0x0,0x8(%rax)
jle    1690 <crte_mk_rm+0x460>
xor    %r12d,%r12d
jmp    1783 <crte_mk_rm+0x553>
mov    0x2878(%rip),%rax
mov    (%rax),%edi
lea    0xc36(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
lea    0xc46(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12d
mov    0x10(%rsp),%rax
cmp    0x8(%rax),%r12d
jge    1690 <crte_mk_rm+0x460>
mov    0x282e(%rip),%rax
mov    (%rax),%edi
call   10c0 <syscall@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %rax,%rcx
mov    %r15d,%r8d
mov    %r12d,%r9d
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    0x2817(%rip),%rax
mov    (%rax),%esi
mov    0x283e(%rip),%rax
or     (%rax),%esi
mov    0x27fd(%rip),%rax
mov    (%rax),%edx
mov    0x2804(%rip),%rax
or     (%rax),%edx
mov    0x280b(%rip),%rax
or     (%rax),%edx
mov    %r14,%rdi
call   1110 <open@plt>
cmp    $0xffffffff,%eax
je     1729 <crte_mk_rm+0x4f9>
mov    %eax,%ebx
xor    %eax,%eax
call   10d0 <sync@plt>
mov    %ebx,%edi
mov    0x38(%rsp),%rsi
mov    $0x24,%edx
call   1070 <write@plt>
cmp    $0xffffffff,%eax
je     182a <crte_mk_rm+0x5fa>
mov    %ebx,%edi
call   1100 <fsync@plt>
mov    %ebx,%edi
call   10a0 <close@plt>
cmp    $0xffffffff,%eax
jne    1770 <crte_mk_rm+0x540>
lea    0xb25(%rip),%rdi
jmp    174a <crte_mk_rm+0x51a>
lea    0xb03(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    1807 <crte_mk_rm+0x5d7>
mov    $0x1,%edi
mov    0x20(%rsp),%rbx
mov    %rbx,%rsi
mov    0x18(%rsp),%rbp
mov    %rbp,%rdx
call   1080 <init_compile@plt>
cmp    $0x1,%eax
jne    187b <crte_mk_rm+0x64b>
mov    0x2738(%rip),%rax
mov    (%rax),%edi
lea    0xb46(%rip),%rsi
jmp    189d <crte_mk_rm+0x66d>
xor    %edi,%edi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1080 <init_compile@plt>
cmp    $0x1,%eax
jne    18b6 <crte_mk_rm+0x686>
mov    0x2714(%rip),%rax
mov    (%rax),%edi
lea    0xb3e(%rip),%rsi
xor    %eax,%eax
call   10b0 <fprintf@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
xor    %eax,%eax
call   10d0 <sync@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%edi
mov    0x8(%rax),%esi
mov    %rbp,%rdx
mov    %rbx,%rcx
call   1030 <rm_file_dir@plt>
test   %rax,%rax
je     1900 <crte_mk_rm+0x6d0>
mov    0x26ca(%rip),%rax
mov    (%rax),%edi
lea    0xb16(%rip),%rsi
xor    %eax,%eax
call   10b0 <fprintf@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
movl   $0x0,0xc(%rsp)
movslq 0xc(%rsp),%rdi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10e0 <pthread_exit@plt>
lea    0x6d9(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    1261 <crte_mk_rm+0x31>
lea    0x6d5(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    1279 <crte_mk_rm+0x49>
lea    0x6d4(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    128f <crte_mk_rm+0x5f>
lea    0x6d2(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    12a7 <crte_mk_rm+0x77>
lea    0x6d1(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    12bf <crte_mk_rm+0x8f>
lea    0x6ce(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    12da <crte_mk_rm+0xaa>
lea    0x6c6(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    12f0 <crte_mk_rm+0xc0>
lea    0x6c3(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    130b <crte_mk_rm+0xdb>
lea    0x6bc(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    131e <crte_mk_rm+0xee>
lea    0x6df(%rip),%rdi
call   1120 <perror@plt>
movl   $0xffffffff,0xc(%rsp)
ff
movslq 0xc(%rsp),%rdi
call   10e0 <pthread_exit@plt>
jmp    139d <crte_mk_rm+0x16d>

LLVM IR (-O0):
@.str = [31 x i8] c"crte_mk_rm(): dirname malloc()\00"
@.str.1 = [34 x i8] c"crte_mk_rm(): tmpdirname malloc()\00"
@.str.2 = [33 x i8] c"crte_mk_rm(): cfilename malloc()\00"
@.str.3 = [34 x i8] c"crte_mk_rm(): mkfilename malloc()\00"
@.str.4 = [32 x i8] c"crte_mk_rm(): prog_buf malloc()\00"
@PATH_MAX = global i32 0
@.str.5 = [27 x i8] c"crte_mk_rm(): pwd malloc()\00"
@.str.6 = [32 x i8] c"crte_mk_rm(): hostname malloc()\00"
@.str.7 = [28 x i8] c"crte_mk_rm(): gethostname()\00"
@.str.8 = [23 x i8] c"crte_mk_rm(): getcwd()\00"
@.str.9 = [37 x i8] c"main()\0A{\0A\09 printf(\22hello world\22);\0A}\0A\00"
@.str.10 = [7 x i8] c"%s.%ld\00"
@__NR_gettid = global i32 0
@.str.11 = [10 x i8] c"%s/%ld.%d\00"
@.str.12 = [3 x i8] c"%s\00"
@.str.13 = [22 x i8] c"crte_mk_rm(): mkdir()\00"
@.str.14 = [10 x i8] c"%s/%s.%ld\00"
@.str.15 = [32 x i8] c"crte_mk_rm(): make_buf malloc()\00"
@.str.16 = [12 x i8] c"%s/makefile\00"
@.str.17 = [3 x i8] c".c\00"
@.str.18 = [136 x i8] c"CFLAGS := -O -w -g\0ASUBDIRS = %ld.%d\0ASRCS=$(wildcard *.c)\0ATARGETS=$(patsubst %%%s,%%,$(SRCS))\0Aall:\09 $(TARGETS)\0Aclean:\0A\09rm -f $(TARGETS)\0A\00"
@.str.19 = [241 x i8] c"CFLAGS := -O -w -g\0ASUBDIRS = %ld.%d\0ASRCS=$(wildcard *.c)\0ATARGETS=$(patsubst %%%s,%%,$(SRCS))\0A\0A\0Aall:\09 $(TARGETS)\0A\09@for i in $(SUBDIRS); do $(MAKE) -C $$i ; done\0A\0Aclean:\0A\09rm -f $(TARGETS)\0A\09@for i in $(SUBDIRS); do $(MAKE) -C $$i clean ; done\0A\00"
@O_CREAT = global i32 0
@O_RDWR = global i32 0
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IRWXO = global i32 0
@.str.20 = [46 x i8] c"crte_mk_rm() failed creating makefile: open()\00"
@.str.21 = [22 x i8] c"crte_mk_rm(): write()\00"
@.str.22 = [22 x i8] c"crte_mk_rm(): close()\00"
@.str.23 = [15 x i8] c"%s/%ld.%d.%d.c\00"
@stderr = global i32 0
@.str.24 = [33 x i8] c"open() failed to create file %s\0A\00"
@.str.25 = [47 x i8] c"crte_mk_rm(): failed creating .c files: open()\00"
@.str.26 = [28 x i8] c"init_compile() make failed\0A\00"
@.str.27 = [34 x i8] c"init_compile() make clean failed\0A\00"
@.str.28 = [36 x i8] c"crte_mk_rm(): rm_file_dir() failed\0A\00"
define i8* @crte_mk_rm(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [2 x i32]
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i64*
%17 = alloca i32
%18 = alloca i8*
store i8* %0, i8** %3
%19 = load i8*, i8** %3
%20 = bitcast i8* %19 to i64*
store i64* %20, i64** %16
store volatile i32 0, i32* %17
%21 = call i8* @malloc(i32 2048)
store i8* %21, i8** %8
%22 = icmp eq i8* %21, null
br i1 %22, label %23, label %31
23: ; preds = %1
%24 = call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %25
25: ; preds = %23
store volatile i32 -1, i32* %17
%26 = load volatile i32, i32* %17
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to i8*
%29 = call i32 @pthread_exit(i8* %28)
br label %30
30: ; preds = %25
br label %31
31: ; preds = %30, %1
%32 = call i8* @malloc(i32 2048)
store i8* %32, i8** %9
%33 = icmp eq i8* %32, null
br i1 %33, label %34, label %42
34: ; preds = %31
%35 = call i32 @perror(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %36
36: ; preds = %34
store volatile i32 -1, i32* %17
%37 = load volatile i32, i32* %17
%38 = sext i32 %37 to i64
%39 = inttoptr i64 %38 to i8*
%40 = call i32 @pthread_exit(i8* %39)
br label %41
41: ; preds = %36
br label %42
42: ; preds = %41, %31
%43 = call i8* @malloc(i32 2048)
store i8* %43, i8** %10
%44 = icmp eq i8* %43, null
br i1 %44, label %45, label %53
45: ; preds = %42
%46 = call i32 @perror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
br label %47
47: ; preds = %45
store volatile i32 -1, i32* %17
%48 = load volatile i32, i32* %17
%49 = sext i32 %48 to i64
%50 = inttoptr i64 %49 to i8*
%51 = call i32 @pthread_exit(i8* %50)
br label %52
52: ; preds = %47
br label %53
53: ; preds = %52, %42
%54 = call i8* @malloc(i32 2048)
store i8* %54, i8** %11
%55 = icmp eq i8* %54, null
br i1 %55, label %56, label %64
56: ; preds = %53
%57 = call i32 @perror(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
br label %58
58: ; preds = %56
store volatile i32 -1, i32* %17
%59 = load volatile i32, i32* %17
%60 = sext i32 %59 to i64
%61 = inttoptr i64 %60 to i8*
%62 = call i32 @pthread_exit(i8* %61)
br label %63
63: ; preds = %58
br label %64
64: ; preds = %63, %53
%65 = call i8* @malloc(i32 4096)
store i8* %65, i8** %13
%66 = icmp eq i8* %65, null
br i1 %66, label %67, label %75
67: ; preds = %64
%68 = call i32 @perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
br label %69
69: ; preds = %67
store volatile i32 -1, i32* %17
%70 = load volatile i32, i32* %17
%71 = sext i32 %70 to i64
%72 = inttoptr i64 %71 to i8*
%73 = call i32 @pthread_exit(i8* %72)
br label %74
74: ; preds = %69
br label %75
75: ; preds = %74, %64
%76 = load i32, i32* @PATH_MAX
%77 = call i8* @malloc(i32 %76)
store i8* %77, i8** %15
%78 = icmp eq i8* %77, null
br i1 %78, label %79, label %87
79: ; preds = %75
%80 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
br label %81
81: ; preds = %79
store volatile i32 -1, i32* %17
%82 = load volatile i32, i32* %17
%83 = sext i32 %82 to i64
%84 = inttoptr i64 %83 to i8*
%85 = call i32 @pthread_exit(i8* %84)
br label %86
86: ; preds = %81
br label %87
87: ; preds = %86, %75
%88 = call i8* @malloc(i32 1024)
store i8* %88, i8** %12
%89 = icmp eq i8* %88, null
br i1 %89, label %90, label %98
90: ; preds = %87
%91 = call i32 @perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
br label %92
92: ; preds = %90
store volatile i32 -1, i32* %17
%93 = load volatile i32, i32* %17
%94 = sext i32 %93 to i64
%95 = inttoptr i64 %94 to i8*
%96 = call i32 @pthread_exit(i8* %95)
br label %97
97: ; preds = %92
br label %98
98: ; preds = %97, %87
%99 = load i8*, i8** %12
%100 = call i32 @gethostname(i8* %99, i32 255)
%101 = icmp eq i32 %100, -1
br i1 %101, label %102, label %110
102: ; preds = %98
%103 = call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
br label %104
104: ; preds = %102
store volatile i32 -1, i32* %17
%105 = load volatile i32, i32* %17
%106 = sext i32 %105 to i64
%107 = inttoptr i64 %106 to i8*
%108 = call i32 @pthread_exit(i8* %107)
br label %109
109: ; preds = %104
br label %110
110: ; preds = %109, %98
%111 = load i8*, i8** %15
%112 = load i32, i32* @PATH_MAX
%113 = call i32 @getcwd(i8* %111, i32 %112)
%114 = icmp ne i32 %113, 0
br i1 %114, label %123, label %115
115: ; preds = %110
%116 = call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
br label %117
117: ; preds = %115
store volatile i32 -1, i32* %17
%118 = load volatile i32, i32* %17
%119 = sext i32 %118 to i64
%120 = inttoptr i64 %119 to i8*
%121 = call i32 @pthread_exit(i8* %120)
br label %122
122: ; preds = %117
br label %123
123: ; preds = %122, %110
%124 = load i8*, i8** %13
%125 = call i32 (i8*, i8*, ...) @sprintf(i8* %124, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0))
%126 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 %125, i32* %126
store i32 0, i32* %4
br label %127
127: ; preds = %167, %123
%128 = load i32, i32* %4
%129 = load i64*, i64** %16
%130 = getelementptr inbounds i64, i64* %129, i64 0
%131 = load i64, i64* %130
%132 = trunc i64 %131 to i32
%133 = icmp slt i32 %128, %132
br i1 %133, label %134, label %170
134: ; preds = %127
%135 = load i32, i32* %4
%136 = icmp eq i32 %135, 0
br i1 %136, label %137, label %143
137: ; preds = %134
%138 = load i8*, i8** %8
%139 = load i8*, i8** %12
%140 = load i32, i32* @__NR_gettid
%141 = call i8* @syscall(i32 %140)
%142 = call i32 (i8*, i8*, ...) @sprintf(i8* %138, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8* %139, i8* %141)
br label %153
143: ; preds = %134
%144 = load i8*, i8** %9
%145 = load i8*, i8** %8
%146 = load i32, i32* @__NR_gettid
%147 = call i8* @syscall(i32 %146)
%148 = load i32, i32* %4
%149 = call i32 (i8*, i8*, ...) @sprintf(i8* %144, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* %145, i8* %147, i32 %148)
%150 = load i8*, i8** %8
%151 = load i8*, i8** %9
%152 = call i32 (i8*, i8*, ...) @sprintf(i8* %150, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8* %151)
br label %153
153: ; preds = %143, %137
%154 = call i32 (...) @sync()
%155 = load i8*, i8** %8
%156 = call i32 @mkdir(i8* %155, i32 511)
%157 = icmp eq i32 %156, -1
br i1 %157, label %158, label %166
158: ; preds = %153
%159 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
br label %160
160: ; preds = %158
store volatile i32 -1, i32* %17
%161 = load volatile i32, i32* %17
%162 = sext i32 %161 to i64
%163 = inttoptr i64 %162 to i8*
%164 = call i32 @pthread_exit(i8* %163)
br label %165
165: ; preds = %160
br label %166
166: ; preds = %165, %153
br label %167
167: ; preds = %166
%168 = load i32, i32* %4
%169 = add nsw i32 %168, 1
store i32 %169, i32* %4
br label %127
170: ; preds = %127
%171 = call i32 (...) @sync()
%172 = call i32 @usleep(i32 10)
store i32 0, i32* %4
br label %173
173: ; preds = %298, %170
%174 = load i32, i32* %4
%175 = load i64*, i64** %16
%176 = getelementptr inbounds i64, i64* %175, i64 0
%177 = load i64, i64* %176
%178 = trunc i64 %177 to i32
%179 = icmp slt i32 %174, %178
br i1 %179, label %180, label %301
180: ; preds = %173
%181 = load i32, i32* %4
%182 = icmp eq i32 %181, 0
br i1 %182, label %183, label %190
183: ; preds = %180
%184 = load i8*, i8** %8
%185 = load i8*, i8** %15
%186 = load i8*, i8** %12
%187 = load i32, i32* @__NR_gettid
%188 = call i8* @syscall(i32 %187)
%189 = call i32 (i8*, i8*, ...) @sprintf(i8* %184, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i8* %185, i8* %186, i8* %188)
br label %200
190: ; preds = %180
%191 = load i8*, i8** %9
%192 = load i8*, i8** %8
%193 = load i32, i32* @__NR_gettid
%194 = call i8* @syscall(i32 %193)
%195 = load i32, i32* %4
%196 = call i32 (i8*, i8*, ...) @sprintf(i8* %191, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* %192, i8* %194, i32 %195)
%197 = load i8*, i8** %8
%198 = load i8*, i8** %9
%199 = call i32 (i8*, i8*, ...) @sprintf(i8* %197, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8* %198)
br label %200
200: ; preds = %190, %183
%201 = call i32 (...) @sync()
%202 = call i8* @malloc(i32 4096)
store i8* %202, i8** %14
%203 = icmp eq i8* %202, null
br i1 %203, label %204, label %212
204: ; preds = %200
%205 = call i32 @perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0))
br label %206
206: ; preds = %204
store volatile i32 -1, i32* %17
%207 = load volatile i32, i32* %17
%208 = sext i32 %207 to i64
%209 = inttoptr i64 %208 to i8*
%210 = call i32 @pthread_exit(i8* %209)
br label %211
211: ; preds = %206
br label %212
212: ; preds = %211, %200
%213 = load i8*, i8** %11
%214 = load i8*, i8** %8
%215 = call i32 (i8*, i8*, ...) @sprintf(i8* %213, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0), i8* %214)
%216 = call i8* @malloc(i32 10)
store i8* %216, i8** %18
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i8** %18
%217 = call i32 (...) @sync()
%218 = call i32 @usleep(i32 10)
%219 = load i32, i32* %4
%220 = sext i32 %219 to i64
%221 = load i64*, i64** %16
%222 = getelementptr inbounds i64, i64* %221, i64 0
%223 = load i64, i64* %222
%224 = sub nsw i64 %223, 1
%225 = icmp eq i64 %220, %224
br i1 %225, label %226, label %235
226: ; preds = %212
%227 = load i8*, i8** %14
%228 = load i32, i32* @__NR_gettid
%229 = call i8* @syscall(i32 %228)
%230 = load i32, i32* %4
%231 = add nsw i32 %230, 1
%232 = load i8*, i8** %18
%233 = call i32 (i8*, i8*, ...) @sprintf(i8* %227, i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.18, i64 0, i64 0), i8* %229, i32 %231, i8* %232)
%234 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %233, i32* %234
br label %244
235: ; preds = %212
%236 = load i8*, i8** %14
%237 = load i32, i32* @__NR_gettid
%238 = call i8* @syscall(i32 %237)
%239 = load i32, i32* %4
%240 = add nsw i32 %239, 1
%241 = load i8*, i8** %18
%242 = call i32 (i8*, i8*, ...) @sprintf(i8* %236, i8* getelementptr inbounds ([241 x i8], [241 x i8]* @.str.19, i64 0, i64 0), i8* %238, i32 %240, i8* %241)
%243 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %242, i32* %243
br label %244
244: ; preds = %235, %226
%245 = call i32 (...) @sync()
%246 = call i32 @usleep(i32 10)
%247 = load i8*, i8** %11
%248 = load i32, i32* @O_CREAT
%249 = load i32, i32* @O_RDWR
%250 = or i32 %248, %249
%251 = load i32, i32* @S_IRWXU
%252 = load i32, i32* @S_IRWXG
%253 = or i32 %251, %252
%254 = load i32, i32* @S_IRWXO
%255 = or i32 %253, %254
%256 = call i32 @open(i8* %247, i32 %250, i32 %255)
store i32 %256, i32* %5
%257 = icmp eq i32 %256, -1
br i1 %257, label %258, label %266
258: ; preds = %244
%259 = call i32 @perror(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.20, i64 0, i64 0))
br label %260
260: ; preds = %258
store volatile i32 -1, i32* %17
%261 = load volatile i32, i32* %17
%262 = sext i32 %261 to i64
%263 = inttoptr i64 %262 to i8*
%264 = call i32 @pthread_exit(i8* %263)
br label %265
265: ; preds = %260
br label %297
266: ; preds = %244
%267 = call i32 (...) @sync()
%268 = load i32, i32* %5
%269 = load i8*, i8** %14
%270 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%271 = load i32, i32* %270
%272 = call i32 @write(i32 %268, i8* %269, i32 %271)
%273 = icmp eq i32 %272, -1
br i1 %273, label %274, label %282
274: ; preds = %266
%275 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.21, i64 0, i64 0))
br label %276
276: ; preds = %274
store volatile i32 -1, i32* %17
%277 = load volatile i32, i32* %17
%278 = sext i32 %277 to i64
%279 = inttoptr i64 %278 to i8*
%280 = call i32 @pthread_exit(i8* %279)
br label %281
281: ; preds = %276
br label %282
282: ; preds = %281, %266
%283 = load i8*, i8** %14
%284 = call i32 @free(i8* %283)
%285 = load i32, i32* %5
%286 = call i32 @close(i32 %285)
%287 = icmp eq i32 %286, -1
br i1 %287, label %288, label %296
288: ; preds = %282
%289 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.22, i64 0, i64 0))
br label %290
290: ; preds = %288
store volatile i32 -1, i32* %17
%291 = load volatile i32, i32* %17
%292 = sext i32 %291 to i64
%293 = inttoptr i64 %292 to i8*
%294 = call i32 @pthread_exit(i8* %293)
br label %295
295: ; preds = %290
br label %296
296: ; preds = %295, %282
br label %297
297: ; preds = %296, %265
br label %298
298: ; preds = %297
%299 = load i32, i32* %4
%300 = add nsw i32 %299, 1
store i32 %300, i32* %4
br label %173
301: ; preds = %173
store i32 0, i32* %4
br label %302
302: ; preds = %404, %301
%303 = load i32, i32* %4
%304 = load i64*, i64** %16
%305 = getelementptr inbounds i64, i64* %304, i64 0
%306 = load i64, i64* %305
%307 = trunc i64 %306 to i32
%308 = icmp slt i32 %303, %307
br i1 %308, label %309, label %407
309: ; preds = %302
%310 = load i32, i32* %4
%311 = icmp eq i32 %310, 0
br i1 %311, label %312, label %319
312: ; preds = %309
%313 = load i8*, i8** %8
%314 = load i8*, i8** %15
%315 = load i8*, i8** %12
%316 = load i32, i32* @__NR_gettid
%317 = call i8* @syscall(i32 %316)
%318 = call i32 (i8*, i8*, ...) @sprintf(i8* %313, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i8* %314, i8* %315, i8* %317)
br label %329
319: ; preds = %309
%320 = load i8*, i8** %9
%321 = load i8*, i8** %8
%322 = load i32, i32* @__NR_gettid
%323 = call i8* @syscall(i32 %322)
%324 = load i32, i32* %4
%325 = call i32 (i8*, i8*, ...) @sprintf(i8* %320, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* %321, i8* %323, i32 %324)
%326 = load i8*, i8** %8
%327 = load i8*, i8** %9
%328 = call i32 (i8*, i8*, ...) @sprintf(i8* %326, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8* %327)
br label %329
329: ; preds = %319, %312
%330 = call i32 (...) @sync()
store i32 0, i32* %6
br label %331
331: ; preds = %400, %329
%332 = load i32, i32* %6
%333 = load i64*, i64** %16
%334 = getelementptr inbounds i64, i64* %333, i64 1
%335 = load i64, i64* %334
%336 = trunc i64 %335 to i32
%337 = icmp slt i32 %332, %336
br i1 %337, label %338, label %403
338: ; preds = %331
%339 = load i8*, i8** %10
%340 = load i8*, i8** %8
%341 = load i32, i32* @__NR_gettid
%342 = call i8* @syscall(i32 %341)
%343 = load i32, i32* %4
%344 = load i32, i32* %6
%345 = call i32 (i8*, i8*, ...) @sprintf(i8* %339, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.23, i64 0, i64 0), i8* %340, i8* %342, i32 %343, i32 %344)
%346 = load i8*, i8** %10
%347 = load i32, i32* @O_CREAT
%348 = load i32, i32* @O_RDWR
%349 = or i32 %347, %348
%350 = load i32, i32* @S_IRWXU
%351 = load i32, i32* @S_IRWXG
%352 = or i32 %350, %351
%353 = load i32, i32* @S_IRWXO
%354 = or i32 %352, %353
%355 = call i32 @open(i8* %346, i32 %349, i32 %354)
store i32 %355, i32* %5
%356 = icmp eq i32 %355, -1
br i1 %356, label %357, label %368
357: ; preds = %338
%358 = load i32, i32* @stderr
%359 = load i8*, i8** %10
%360 = call i32 (i32, i8*, ...) @fprintf(i32 %358, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.24, i64 0, i64 0), i8* %359)
%361 = call i32 @perror(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.25, i64 0, i64 0))
br label %362
362: ; preds = %357
store volatile i32 -1, i32* %17
%363 = load volatile i32, i32* %17
%364 = sext i32 %363 to i64
%365 = inttoptr i64 %364 to i8*
%366 = call i32 @pthread_exit(i8* %365)
br label %367
367: ; preds = %362
br label %399
368: ; preds = %338
%369 = call i32 (...) @sync()
%370 = load i32, i32* %5
%371 = load i8*, i8** %13
%372 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%373 = load i32, i32* %372
%374 = call i32 @write(i32 %370, i8* %371, i32 %373)
%375 = icmp eq i32 %374, -1
br i1 %375, label %376, label %384
376: ; preds = %368
%377 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.21, i64 0, i64 0))
br label %378
378: ; preds = %376
store volatile i32 -1, i32* %17
%379 = load volatile i32, i32* %17
%380 = sext i32 %379 to i64
%381 = inttoptr i64 %380 to i8*
%382 = call i32 @pthread_exit(i8* %381)
br label %383
383: ; preds = %378
br label %384
384: ; preds = %383, %368
%385 = load i32, i32* %5
%386 = call i32 @fsync(i32 %385)
%387 = load i32, i32* %5
%388 = call i32 @close(i32 %387)
%389 = icmp eq i32 %388, -1
br i1 %389, label %390, label %398
390: ; preds = %384
%391 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.22, i64 0, i64 0))
br label %392
392: ; preds = %390
store volatile i32 -1, i32* %17
%393 = load volatile i32, i32* %17
%394 = sext i32 %393 to i64
%395 = inttoptr i64 %394 to i8*
%396 = call i32 @pthread_exit(i8* %395)
br label %397
397: ; preds = %392
br label %398
398: ; preds = %397, %384
br label %399
399: ; preds = %398, %367
br label %400
400: ; preds = %399
%401 = load i32, i32* %6
%402 = add nsw i32 %401, 1
store i32 %402, i32* %6
br label %331
403: ; preds = %331
br label %404
404: ; preds = %403
%405 = load i32, i32* %4
%406 = add nsw i32 %405, 1
store i32 %406, i32* %4
br label %302
407: ; preds = %302
%408 = load i8*, i8** %15
%409 = load i8*, i8** %12
%410 = call i32 @init_compile(i32 1, i8* %408, i8* %409)
%411 = icmp eq i32 %410, 1
br i1 %411, label %412, label %421
412: ; preds = %407
%413 = load i32, i32* @stderr
%414 = call i32 (i32, i8*, ...) @fprintf(i32 %413, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.26, i64 0, i64 0))
br label %415
415: ; preds = %412
store volatile i32 -1, i32* %17
%416 = load volatile i32, i32* %17
%417 = sext i32 %416 to i64
%418 = inttoptr i64 %417 to i8*
%419 = call i32 @pthread_exit(i8* %418)
br label %420
420: ; preds = %415
br label %436
421: ; preds = %407
%422 = load i8*, i8** %15
%423 = load i8*, i8** %12
%424 = call i32 @init_compile(i32 0, i8* %422, i8* %423)
%425 = icmp eq i32 %424, 1
br i1 %425, label %426, label %435
426: ; preds = %421
%427 = load i32, i32* @stderr
%428 = call i32 (i32, i8*, ...) @fprintf(i32 %427, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.27, i64 0, i64 0))
br label %429
429: ; preds = %426
store volatile i32 -1, i32* %17
%430 = load volatile i32, i32* %17
%431 = sext i32 %430 to i64
%432 = inttoptr i64 %431 to i8*
%433 = call i32 @pthread_exit(i8* %432)
br label %434
434: ; preds = %429
br label %435
435: ; preds = %434, %421
br label %436
436: ; preds = %435, %420
%437 = call i32 (...) @sync()
%438 = load i64*, i64** %16
%439 = getelementptr inbounds i64, i64* %438, i64 0
%440 = load i64, i64* %439
%441 = trunc i64 %440 to i32
%442 = load i64*, i64** %16
%443 = getelementptr inbounds i64, i64* %442, i64 1
%444 = load i64, i64* %443
%445 = trunc i64 %444 to i32
%446 = load i8*, i8** %12
%447 = load i8*, i8** %15
%448 = call i64 @rm_file_dir(i32 %441, i32 %445, i8* %446, i8* %447)
%449 = icmp ne i64 %448, 0
br i1 %449, label %450, label %459
450: ; preds = %436
%451 = load i32, i32* @stderr
%452 = call i32 (i32, i8*, ...) @fprintf(i32 %451, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.28, i64 0, i64 0))
br label %453
453: ; preds = %450
store volatile i32 -1, i32* %17
%454 = load volatile i32, i32* %17
%455 = sext i32 %454 to i64
%456 = inttoptr i64 %455 to i8*
%457 = call i32 @pthread_exit(i8* %456)
br label %458
458: ; preds = %453
br label %459
459: ; preds = %458, %436
br label %460
460: ; preds = %459
store volatile i32 0, i32* %17
%461 = load volatile i32, i32* %17
%462 = sext i32 %461 to i64
%463 = inttoptr i64 %462 to i8*
%464 = call i32 @pthread_exit(i8* %463)
br label %465
465: ; preds = %460
%466 = load i8*, i8** %2
ret i8* %466
}

LLVM IR (-O2):
@.str = [31 x i8] c"crte_mk_rm(): dirname malloc()\00"
@.str.1 = [34 x i8] c"crte_mk_rm(): tmpdirname malloc()\00"
@.str.2 = [33 x i8] c"crte_mk_rm(): cfilename malloc()\00"
@.str.3 = [34 x i8] c"crte_mk_rm(): mkfilename malloc()\00"
@.str.4 = [32 x i8] c"crte_mk_rm(): prog_buf malloc()\00"
@PATH_MAX = global i32 0
@.str.5 = [27 x i8] c"crte_mk_rm(): pwd malloc()\00"
@.str.6 = [32 x i8] c"crte_mk_rm(): hostname malloc()\00"
@.str.7 = [28 x i8] c"crte_mk_rm(): gethostname()\00"
@.str.8 = [23 x i8] c"crte_mk_rm(): getcwd()\00"
@.str.9 = [37 x i8] c"main()\0A{\0A\09 printf(\22hello world\22);\0A}\0A\00"
@.str.10 = [7 x i8] c"%s.%ld\00"
@__NR_gettid = global i32 0
@.str.11 = [10 x i8] c"%s/%ld.%d\00"
@.str.13 = [22 x i8] c"crte_mk_rm(): mkdir()\00"
@.str.14 = [10 x i8] c"%s/%s.%ld\00"
@.str.15 = [32 x i8] c"crte_mk_rm(): make_buf malloc()\00"
@.str.16 = [12 x i8] c"%s/makefile\00"
@.str.17 = [3 x i8] c".c\00"
@.str.18 = [136 x i8] c"CFLAGS := -O -w -g\0ASUBDIRS = %ld.%d\0ASRCS=$(wildcard *.c)\0ATARGETS=$(patsubst %%%s,%%,$(SRCS))\0Aall:\09 $(TARGETS)\0Aclean:\0A\09rm -f $(TARGETS)\0A\00"
@.str.19 = [241 x i8] c"CFLAGS := -O -w -g\0ASUBDIRS = %ld.%d\0ASRCS=$(wildcard *.c)\0ATARGETS=$(patsubst %%%s,%%,$(SRCS))\0A\0A\0Aall:\09 $(TARGETS)\0A\09@for i in $(SUBDIRS); do $(MAKE) -C $$i ; done\0A\0Aclean:\0A\09rm -f $(TARGETS)\0A\09@for i in $(SUBDIRS); do $(MAKE) -C $$i clean ; done\0A\00"
@O_CREAT = global i32 0
@O_RDWR = global i32 0
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IRWXO = global i32 0
@.str.20 = [46 x i8] c"crte_mk_rm() failed creating makefile: open()\00"
@.str.21 = [22 x i8] c"crte_mk_rm(): write()\00"
@.str.22 = [22 x i8] c"crte_mk_rm(): close()\00"
@.str.23 = [15 x i8] c"%s/%ld.%d.%d.c\00"
@stderr = global i32 0
@.str.24 = [33 x i8] c"open() failed to create file %s\0A\00"
@.str.25 = [47 x i8] c"crte_mk_rm(): failed creating .c files: open()\00"
@.str.26 = [28 x i8] c"init_compile() make failed\0A\00"
@.str.27 = [34 x i8] c"init_compile() make clean failed\0A\00"
@.str.28 = [36 x i8] c"crte_mk_rm(): rm_file_dir() failed\0A\00"
define noalias i8* @crte_mk_rm(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i8* %0 to i64*
%4 = bitcast i32* %2 to i8*
store volatile i32 0, i32* %2
%5 = tail call dereferenceable_or_null(2048) i8* @malloc(i32 2048)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = tail call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
store volatile i32 -1, i32* %2
%9 = load volatile i32, i32* %2
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
%12 = tail call i32 @pthread_exit(i8* %11)
br label %13
13: ; preds = %7, %1
%14 = tail call dereferenceable_or_null(2048) i8* @malloc(i32 2048)
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %22
16: ; preds = %13
%17 = tail call i32 @perror(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
store volatile i32 -1, i32* %2
%18 = load volatile i32, i32* %2
%19 = sext i32 %18 to i64
%20 = inttoptr i64 %19 to i8*
%21 = tail call i32 @pthread_exit(i8* %20)
br label %22
22: ; preds = %16, %13
%23 = tail call dereferenceable_or_null(2048) i8* @malloc(i32 2048)
%24 = icmp eq i8* %23, null
br i1 %24, label %25, label %31
25: ; preds = %22
%26 = tail call i32 @perror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
store volatile i32 -1, i32* %2
%27 = load volatile i32, i32* %2
%28 = sext i32 %27 to i64
%29 = inttoptr i64 %28 to i8*
%30 = tail call i32 @pthread_exit(i8* %29)
br label %31
31: ; preds = %25, %22
%32 = tail call dereferenceable_or_null(2048) i8* @malloc(i32 2048)
%33 = icmp eq i8* %32, null
br i1 %33, label %34, label %40
34: ; preds = %31
%35 = tail call i32 @perror(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
store volatile i32 -1, i32* %2
%36 = load volatile i32, i32* %2
%37 = sext i32 %36 to i64
%38 = inttoptr i64 %37 to i8*
%39 = tail call i32 @pthread_exit(i8* %38)
br label %40
40: ; preds = %34, %31
%41 = tail call dereferenceable_or_null(4096) i8* @malloc(i32 4096)
%42 = icmp eq i8* %41, null
br i1 %42, label %43, label %49
43: ; preds = %40
%44 = tail call i32 @perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
store volatile i32 -1, i32* %2
%45 = load volatile i32, i32* %2
%46 = sext i32 %45 to i64
%47 = inttoptr i64 %46 to i8*
%48 = tail call i32 @pthread_exit(i8* %47)
br label %49
49: ; preds = %43, %40
%50 = load i32, i32* @PATH_MAX
%51 = tail call i8* @malloc(i32 %50)
%52 = icmp eq i8* %51, null
br i1 %52, label %53, label %59
53: ; preds = %49
%54 = tail call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
store volatile i32 -1, i32* %2
%55 = load volatile i32, i32* %2
%56 = sext i32 %55 to i64
%57 = inttoptr i64 %56 to i8*
%58 = tail call i32 @pthread_exit(i8* %57)
br label %59
59: ; preds = %53, %49
%60 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
%61 = icmp eq i8* %60, null
br i1 %61, label %62, label %68
62: ; preds = %59
%63 = tail call i32 @perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
store volatile i32 -1, i32* %2
%64 = load volatile i32, i32* %2
%65 = sext i32 %64 to i64
%66 = inttoptr i64 %65 to i8*
%67 = tail call i32 @pthread_exit(i8* %66)
br label %68
68: ; preds = %62, %59
%69 = tail call i32 @gethostname(i8* %60, i32 255)
%70 = icmp eq i32 %69, -1
br i1 %70, label %71, label %77
71: ; preds = %68
%72 = tail call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
store volatile i32 -1, i32* %2
%73 = load volatile i32, i32* %2
%74 = sext i32 %73 to i64
%75 = inttoptr i64 %74 to i8*
%76 = tail call i32 @pthread_exit(i8* %75)
br label %77
77: ; preds = %71, %68
%78 = load i32, i32* @PATH_MAX
%79 = tail call i32 @getcwd(i8* %51, i32 %78)
%80 = icmp eq i32 %79, 0
br i1 %80, label %81, label %87
81: ; preds = %77
%82 = tail call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
store volatile i32 -1, i32* %2
%83 = load volatile i32, i32* %2
%84 = sext i32 %83 to i64
%85 = inttoptr i64 %84 to i8*
%86 = tail call i32 @pthread_exit(i8* %85)
br label %87
87: ; preds = %81, %77
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(37) %41, i8* align 1 dereferenceable(37) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0), i64 37, i1 false)
%88 = load i64, i64* %3
%89 = trunc i64 %88 to i32
%90 = icmp sgt i32 %89, 0
br i1 %90, label %91, label %128
91: ; preds = %87
%92 = load i32, i32* @__NR_gettid
%93 = tail call i8* @syscall(i32 %92)
%94 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %5, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8* %60, i8* %93)
%95 = tail call i32 (...) @sync()
%96 = tail call i32 @mkdir(i8* %5, i32 511)
%97 = icmp eq i32 %96, -1
br i1 %97, label %98, label %104
98: ; preds = %91
%99 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
store volatile i32 -1, i32* %2
%100 = load volatile i32, i32* %2
%101 = sext i32 %100 to i64
%102 = inttoptr i64 %101 to i8*
%103 = tail call i32 @pthread_exit(i8* %102)
br label %104
104: ; preds = %98, %91
%105 = load i64, i64* %3
%106 = trunc i64 %105 to i32
%107 = icmp sgt i32 %106, 1
br i1 %107, label %108, label %128
108: ; preds = %104, %123
%109 = phi i32 [ %124, %123 ], [ 1, %104 ]
%110 = load i32, i32* @__NR_gettid
%111 = tail call i8* @syscall(i32 %110)
%112 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %14, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* %5, i8* %111, i32 %109)
%113 = tail call i8* @strcpy(i8* dereferenceable(1) %5, i8* dereferenceable(1) %14)
%114 = tail call i32 (...) @sync()
%115 = tail call i32 @mkdir(i8* %5, i32 511)
%116 = icmp eq i32 %115, -1
br i1 %116, label %117, label %123
117: ; preds = %108
%118 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
store volatile i32 -1, i32* %2
%119 = load volatile i32, i32* %2
%120 = sext i32 %119 to i64
%121 = inttoptr i64 %120 to i8*
%122 = tail call i32 @pthread_exit(i8* %121)
br label %123
123: ; preds = %108, %117
%124 = add nuw nsw i32 %109, 1
%125 = load i64, i64* %3
%126 = trunc i64 %125 to i32
%127 = icmp slt i32 %124, %126
br i1 %127, label %108, label %128
128: ; preds = %123, %104, %87
%129 = tail call i32 (...) @sync()
%130 = tail call i32 @usleep(i32 10)
%131 = load i64, i64* %3
%132 = trunc i64 %131 to i32
%133 = icmp sgt i32 %132, 0
br i1 %133, label %140, label %280
134: ; preds = %209
%135 = trunc i64 %211 to i32
%136 = icmp sgt i32 %135, 0
br i1 %136, label %137, label %280
137: ; preds = %134
%138 = getelementptr inbounds i8, i8* %0, i64 8
%139 = bitcast i8* %138 to i64*
br label %215
140: ; preds = %128, %209
%141 = phi i64 [ %210, %209 ], [ 0, %128 ]
%142 = icmp eq i64 %141, 0
%143 = load i32, i32* @__NR_gettid
%144 = tail call i8* @syscall(i32 %143)
br i1 %142, label %145, label %147
145: ; preds = %140
%146 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %5, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i8* %51, i8* %60, i8* %144)
br label %151
147: ; preds = %140
%148 = trunc i64 %141 to i32
%149 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %14, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* %5, i8* %144, i32 %148)
%150 = tail call i8* @strcpy(i8* dereferenceable(1) %5, i8* dereferenceable(1) %14)
br label %151
151: ; preds = %147, %145
%152 = tail call i32 (...) @sync()
%153 = tail call dereferenceable_or_null(4096) i8* @malloc(i32 4096)
%154 = icmp eq i8* %153, null
br i1 %154, label %155, label %161
155: ; preds = %151
%156 = tail call i32 @perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0))
store volatile i32 -1, i32* %2
%157 = load volatile i32, i32* %2
%158 = sext i32 %157 to i64
%159 = inttoptr i64 %158 to i8*
%160 = tail call i32 @pthread_exit(i8* %159)
br label %161
161: ; preds = %155, %151
%162 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %32, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0), i8* %5)
%163 = tail call i32 (...) @sync()
%164 = tail call i32 @usleep(i32 10)
%165 = load i64, i64* %3
%166 = add nsw i64 %165, -1
%167 = icmp eq i64 %166, %141
%168 = load i32, i32* @__NR_gettid
%169 = tail call i8* @syscall(i32 %168)
%170 = trunc i64 %141 to i32
%171 = add i32 %170, 1
%172 = select i1 %167, i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([241 x i8], [241 x i8]* @.str.19, i64 0, i64 0)
%173 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %153, i8* dereferenceable(1) %172, i8* %169, i32 %171, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0))
%174 = tail call i32 (...) @sync()
%175 = tail call i32 @usleep(i32 10)
%176 = load i32, i32* @O_CREAT
%177 = load i32, i32* @O_RDWR
%178 = or i32 %177, %176
%179 = load i32, i32* @S_IRWXU
%180 = load i32, i32* @S_IRWXG
%181 = or i32 %180, %179
%182 = load i32, i32* @S_IRWXO
%183 = or i32 %181, %182
%184 = tail call i32 @open(i8* %32, i32 %178, i32 %183)
%185 = icmp eq i32 %184, -1
br i1 %185, label %186, label %188
186: ; preds = %161
%187 = tail call i32 @perror(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.20, i64 0, i64 0))
store volatile i32 -1, i32* %2
br label %204
188: ; preds = %161
%189 = tail call i32 (...) @sync()
%190 = tail call i32 @write(i32 %184, i8* %153, i32 %173)
%191 = icmp eq i32 %190, -1
br i1 %191, label %192, label %198
192: ; preds = %188
%193 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.21, i64 0, i64 0))
store volatile i32 -1, i32* %2
%194 = load volatile i32, i32* %2
%195 = sext i32 %194 to i64
%196 = inttoptr i64 %195 to i8*
%197 = tail call i32 @pthread_exit(i8* %196)
br label %198
198: ; preds = %192, %188
%199 = tail call i32 @free(i8* %153)
%200 = tail call i32 @close(i32 %184)
%201 = icmp eq i32 %200, -1
br i1 %201, label %202, label %209
202: ; preds = %198
%203 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.22, i64 0, i64 0))
store volatile i32 -1, i32* %2
br label %204
204: ; preds = %202, %186
%205 = load volatile i32, i32* %2
%206 = sext i32 %205 to i64
%207 = inttoptr i64 %206 to i8*
%208 = tail call i32 @pthread_exit(i8* %207)
br label %209
209: ; preds = %204, %198
%210 = add nuw nsw i64 %141, 1
%211 = load i64, i64* %3
%212 = shl i64 %211, 32
%213 = ashr exact i64 %212, 32
%214 = icmp slt i64 %210, %213
br i1 %214, label %140, label %134
215: ; preds = %137, %275
%216 = phi i32 [ 0, %137 ], [ %276, %275 ]
%217 = icmp eq i32 %216, 0
%218 = load i32, i32* @__NR_gettid
%219 = tail call i8* @syscall(i32 %218)
br i1 %217, label %220, label %222
220: ; preds = %215
%221 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %5, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i8* %51, i8* %60, i8* %219)
br label %225
222: ; preds = %215
%223 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %14, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* %5, i8* %219, i32 %216)
%224 = tail call i8* @strcpy(i8* dereferenceable(1) %5, i8* dereferenceable(1) %14)
br label %225
225: ; preds = %222, %220
%226 = tail call i32 (...) @sync()
%227 = load i64, i64* %139
%228 = trunc i64 %227 to i32
%229 = icmp sgt i32 %228, 0
br i1 %229, label %230, label %275
230: ; preds = %225, %270
%231 = phi i32 [ %271, %270 ], [ 0, %225 ]
%232 = load i32, i32* @__NR_gettid
%233 = tail call i8* @syscall(i32 %232)
%234 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %23, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.23, i64 0, i64 0), i8* %5, i8* %233, i32 %216, i32 %231)
%235 = load i32, i32* @O_CREAT
%236 = load i32, i32* @O_RDWR
%237 = or i32 %236, %235
%238 = load i32, i32* @S_IRWXU
%239 = load i32, i32* @S_IRWXG
%240 = or i32 %239, %238
%241 = load i32, i32* @S_IRWXO
%242 = or i32 %240, %241
%243 = tail call i32 @open(i8* %23, i32 %237, i32 %242)
%244 = icmp eq i32 %243, -1
br i1 %244, label %245, label %249
245: ; preds = %230
%246 = load i32, i32* @stderr
%247 = tail call i32 (i32, i8*, ...) @fprintf(i32 %246, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.24, i64 0, i64 0), i8* %23)
%248 = tail call i32 @perror(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.25, i64 0, i64 0))
store volatile i32 -1, i32* %2
br label %265
249: ; preds = %230
%250 = tail call i32 (...) @sync()
%251 = tail call i32 @write(i32 %243, i8* %41, i32 36)
%252 = icmp eq i32 %251, -1
br i1 %252, label %253, label %259
253: ; preds = %249
%254 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.21, i64 0, i64 0))
store volatile i32 -1, i32* %2
%255 = load volatile i32, i32* %2
%256 = sext i32 %255 to i64
%257 = inttoptr i64 %256 to i8*
%258 = tail call i32 @pthread_exit(i8* %257)
br label %259
259: ; preds = %253, %249
%260 = tail call i32 @fsync(i32 %243)
%261 = tail call i32 @close(i32 %243)
%262 = icmp eq i32 %261, -1
br i1 %262, label %263, label %270
263: ; preds = %259
%264 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.22, i64 0, i64 0))
store volatile i32 -1, i32* %2
br label %265
265: ; preds = %263, %245
%266 = load volatile i32, i32* %2
%267 = sext i32 %266 to i64
%268 = inttoptr i64 %267 to i8*
%269 = tail call i32 @pthread_exit(i8* %268)
br label %270
270: ; preds = %265, %259
%271 = add nuw nsw i32 %231, 1
%272 = load i64, i64* %139
%273 = trunc i64 %272 to i32
%274 = icmp slt i32 %271, %273
br i1 %274, label %230, label %275
275: ; preds = %270, %225
%276 = add nuw nsw i32 %216, 1
%277 = load i64, i64* %3
%278 = trunc i64 %277 to i32
%279 = icmp slt i32 %276, %278
br i1 %279, label %215, label %280
280: ; preds = %275, %128, %134
%281 = tail call i32 @init_compile(i32 1, i8* %51, i8* %60)
%282 = icmp eq i32 %281, 1
br i1 %282, label %283, label %286
283: ; preds = %280
%284 = load i32, i32* @stderr
%285 = tail call i32 (i32, i8*, ...) @fprintf(i32 %284, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.26, i64 0, i64 0))
store volatile i32 -1, i32* %2
br label %292
286: ; preds = %280
%287 = tail call i32 @init_compile(i32 0, i8* %51, i8* %60)
%288 = icmp eq i32 %287, 1
br i1 %288, label %289, label %297
289: ; preds = %286
%290 = load i32, i32* @stderr
%291 = tail call i32 (i32, i8*, ...) @fprintf(i32 %290, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.27, i64 0, i64 0))
store volatile i32 -1, i32* %2
br label %292
292: ; preds = %283, %289
%293 = load volatile i32, i32* %2
%294 = sext i32 %293 to i64
%295 = inttoptr i64 %294 to i8*
%296 = tail call i32 @pthread_exit(i8* %295)
br label %297
297: ; preds = %292, %286
%298 = tail call i32 (...) @sync()
%299 = load i64, i64* %3
%300 = trunc i64 %299 to i32
%301 = getelementptr inbounds i8, i8* %0, i64 8
%302 = bitcast i8* %301 to i64*
%303 = load i64, i64* %302
%304 = trunc i64 %303 to i32
%305 = tail call i64 @rm_file_dir(i32 %300, i32 %304, i8* %60, i8* %51)
%306 = icmp eq i64 %305, 0
br i1 %306, label %314, label %307
307: ; preds = %297
%308 = load i32, i32* @stderr
%309 = tail call i32 (i32, i8*, ...) @fprintf(i32 %308, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.28, i64 0, i64 0))
store volatile i32 -1, i32* %2
%310 = load volatile i32, i32* %2
%311 = sext i32 %310 to i64
%312 = inttoptr i64 %311 to i8*
%313 = tail call i32 @pthread_exit(i8* %312)
br label %314
314: ; preds = %297, %307
store volatile i32 0, i32* %2
%315 = load volatile i32, i32* %2
%316 = sext i32 %315 to i64
%317 = inttoptr i64 %316 to i8*
%318 = tail call i32 @pthread_exit(i8* %317)
ret i8* undef
}