// File: /workspace/github_c_makefile_star2_O3/mabdi[P]bunney/bunny-main.c
// Function: make_input
static _u8* make_input(_u8* prefix) {
  _u8 *curdir, tmp[MAXTOKEN];
  DIR* d;
  struct dirent* dent;
  static _u8 *newdir = 0;

  if (newdir) free(newdir);

  curdir = strdup(N(out_dir,".flow-out"));
  if (!curdir) fatal("out of memory");

  sprintf(tmp,"%s%03llu",prefix, input_cnt / 1000);
  mkdir(N(out_dir,tmp),0755);
  sprintf(tmp,"%s%03llu/%03llu",prefix, input_cnt / 1000, input_cnt % 1000);
  newdir = strdup(N(out_dir,tmp));
  if (!newdir) fatal("out of memory");

  input_cnt++;

  mkdir(newdir,0755);
  free_input(newdir,0);

  d = opendir(curdir);
  if (!d) pfatal("cannot open '%s' for reading",curdir);

  while ((dent = readdir(d))) {
    _u8 *odname;
    if (dent->d_name[0] == '.') continue;

    odname = strdup(N(curdir,dent->d_name));
    if (!odname) fatal("out of memory");

    if (link(odname, N(newdir,dent->d_name)))
      pfatal("cannot link '%s' to '%s/",odname,newdir);

    free(odname);

  }

  closedir(d);
  free(curdir);

  return newdir;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rdi, %r14
movq 0x260f6(%rip), %rdi     # 0x30360
testq %rdi, %rdi
je 0xa274
callq 0x2220
movq 0x5ff5(%rip), %rdi      # 0x10270
leaq 0x2033(%rip), %rsi      # 0xc2b5
callq 0x769c
movq %rax, %rdi
callq 0x2390
testq %rax, %rax
je 0xa4a4
movq %rax, %rbx
movq 0x260c6(%rip), %rax     # 0x30368
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %r12 # imm = 0x20C49BA5E353F7CF
mulq %r12
movq %rdx, %rcx
shrq $0x4, %rcx
leaq 0x2e68(%rip), %rsi      # 0xd129
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2050
movq 0x5f98(%rip), %rdi      # 0x10270
movq %r15, %rsi
callq 0x769c
movq %rax, %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x20f0
movq 0x26074(%rip), %r8      # 0x30368
movq %r8, %rax
shrq $0x3, %rax
mulq %r12
movq %rdx, %rcx
shrq $0x4, %rcx
imulq $0x3e8, %rcx, %rax      # imm = 0x3E8
subq %rax, %r8
leaq 0x2e1c(%rip), %rsi      # 0xd132
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2050
movq 0x5f46(%rip), %rdi      # 0x10270
movq %r15, %rsi
callq 0x769c
movq %rax, %rdi
callq 0x2390
movq %rax, 0x2601f(%rip)     # 0x30360
testq %rax, %rax
je 0xa521
incq 0x26017(%rip)           # 0x30368
movq %rax, %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x20f0
movq 0x25ffb(%rip), %rdi     # 0x30360
xorl %esi, %esi
callq 0x9f0f
movq %rbx, %rdi
callq 0x2300
testq %rax, %rax
je 0xa5a2
movq %rax, %r14
movq %rax, %rdi
callq 0x2320
testq %rax, %rax
je 0xa3f0
movq %rax, %r15
cmpb $0x2e, 0x13(%r15)
je 0xa3e0
addq $0x13, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x769c
movq %rax, %rdi
callq 0x2390
testq %rax, %rax
je 0xa416
movq %rax, %r12
movq 0x25fa3(%rip), %rdi     # 0x30360
movq %r15, %rsi
callq 0x769c
movq %r12, %rdi
movq %rax, %rsi
callq 0x20a0
movq %r12, %rdi
testl %eax, %eax
jne 0xa49f
callq 0x2220
movq %r14, %rdi
callq 0x2320
movq %rax, %r15
testq %rax, %rax
jne 0xa390
movq %r14, %rdi
callq 0x2350
movq %rbx, %rdi
callq 0x2220
movq 0x25f59(%rip), %rax     # 0x30360
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x117b(%rip), %rdi      # 0xb598
xorl %eax, %eax
callq 0x2030
movq 0x5e3d(%rip), %rcx      # 0x10268
testq %rcx, %rcx
je 0xa446
leaq 0x1161(%rip), %rdi      # 0xb598
movl $0x24, %esi
movl $0x1, %edx
callq 0x23b0
leaq 0xdf0(%rip), %rdi       # 0xb23d
leaq 0x2cca(%rip), %rsi      # 0xd11e
leaq 0xdf2(%rip), %rdx       # 0xb24d
movl $0x36c, %ecx            # imm = 0x36C
xorl %eax, %eax
callq 0x2030
movq 0x5dfa(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa495
leaq 0xdc3(%rip), %rsi       # 0xb23d
leaq 0x2c9d(%rip), %rdx      # 0xd11e
leaq 0xdc5(%rip), %rcx       # 0xb24d
movl $0x36c, %r8d            # imm = 0x36C
xorl %eax, %eax
callq 0x22d0
movl $0x1, %edi
callq 0x2230
callq 0x2dbd
leaq 0x10ed(%rip), %rdi      # 0xb598
xorl %eax, %eax
callq 0x2030
movq 0x5daf(%rip), %rcx      # 0x10268
testq %rcx, %rcx
je 0xa4d4
leaq 0x10d3(%rip), %rdi      # 0xb598
movl $0x24, %esi
movl $0x1, %edx
callq 0x23b0
leaq 0xd62(%rip), %rdi       # 0xb23d
leaq 0x2c3c(%rip), %rsi      # 0xd11e
leaq 0xd64(%rip), %rdx       # 0xb24d
movl $0x357, %ecx            # imm = 0x357
xorl %eax, %eax
callq 0x2030
movq 0x5d6c(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa495
leaq 0xd35(%rip), %rsi       # 0xb23d
leaq 0x2c0f(%rip), %rdx      # 0xd11e
leaq 0xd37(%rip), %rcx       # 0xb24d
movl $0x357, %r8d            # imm = 0x357
jmp 0xa48e
leaq 0x1070(%rip), %rdi      # 0xb598
xorl %eax, %eax
callq 0x2030
movq 0x5d32(%rip), %rcx      # 0x10268
testq %rcx, %rcx
je 0xa551
leaq 0x1056(%rip), %rdi      # 0xb598
movl $0x24, %esi
movl $0x1, %edx
callq 0x23b0
leaq 0xce5(%rip), %rdi       # 0xb23d
leaq 0x2bbf(%rip), %rsi      # 0xd11e
leaq 0xce7(%rip), %rdx       # 0xb24d
movl $0x35d, %ecx            # imm = 0x35D
xorl %eax, %eax
callq 0x2030
movq 0x5cef(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa495
leaq 0xcb4(%rip), %rsi       # 0xb23d
leaq 0x2b8e(%rip), %rdx      # 0xd11e
leaq 0xcb6(%rip), %rcx       # 0xb24d
movl $0x35d, %r8d            # imm = 0x35D
jmp 0xa48e
movq %rbx, %rdi
callq 0x2e60