// File: /workspace/github_c_makefile_star2_O1/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 0x26122(%rip), %rdi     # 0x30360
testq %rdi, %rdi
je 0xa248
callq 0x2220
movq 0x6021(%rip), %rdi      # 0x10270
leaq 0x205f(%rip), %rsi      # 0xc2b5
callq 0x760a
movq %rax, %rdi
callq 0x2390
testq %rax, %rax
je 0xa478
movq %rax, %rbx
movq 0x260f2(%rip), %rax     # 0x30368
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %r12 # imm = 0x20C49BA5E353F7CF
mulq %r12
movq %rdx, %rcx
shrq $0x4, %rcx
leaq 0x2e94(%rip), %rsi      # 0xd129
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2050
movq 0x5fc4(%rip), %rdi      # 0x10270
movq %r15, %rsi
callq 0x760a
movq %rax, %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x20f0
movq 0x260a0(%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 0x2e48(%rip), %rsi      # 0xd132
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2050
movq 0x5f72(%rip), %rdi      # 0x10270
movq %r15, %rsi
callq 0x760a
movq %rax, %rdi
callq 0x2390
movq %rax, 0x2604b(%rip)     # 0x30360
testq %rax, %rax
je 0xa4f5
incq 0x26043(%rip)           # 0x30368
movq %rax, %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x20f0
movq 0x26027(%rip), %rdi     # 0x30360
xorl %esi, %esi
callq 0x9ee3
movq %rbx, %rdi
callq 0x2300
testq %rax, %rax
je 0xa576
movq %rax, %r14
movq %rax, %rdi
callq 0x2320
testq %rax, %rax
je 0xa3c4
movq %rax, %r15
cmpb $0x2e, 0x13(%r15)
je 0xa3b4
addq $0x13, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x760a
movq %rax, %rdi
callq 0x2390
testq %rax, %rax
je 0xa3ea
movq %rax, %r12
movq 0x25fcf(%rip), %rdi     # 0x30360
movq %r15, %rsi
callq 0x760a
movq %r12, %rdi
movq %rax, %rsi
callq 0x20a0
movq %r12, %rdi
testl %eax, %eax
jne 0xa473
callq 0x2220
movq %r14, %rdi
callq 0x2320
movq %rax, %r15
testq %rax, %rax
jne 0xa364
movq %r14, %rdi
callq 0x2350
movq %rbx, %rdi
callq 0x2220
movq 0x25f85(%rip), %rax     # 0x30360
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x11a7(%rip), %rdi      # 0xb598
xorl %eax, %eax
callq 0x2030
movq 0x5e69(%rip), %rcx      # 0x10268
testq %rcx, %rcx
je 0xa41a
leaq 0x118d(%rip), %rdi      # 0xb598
movl $0x24, %esi
movl $0x1, %edx
callq 0x23b0
leaq 0xe1c(%rip), %rdi       # 0xb23d
leaq 0x2cf6(%rip), %rsi      # 0xd11e
leaq 0xe1e(%rip), %rdx       # 0xb24d
movl $0x36c, %ecx            # imm = 0x36C
xorl %eax, %eax
callq 0x2030
movq 0x5e26(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa469
leaq 0xdef(%rip), %rsi       # 0xb23d
leaq 0x2cc9(%rip), %rdx      # 0xd11e
leaq 0xdf1(%rip), %rcx       # 0xb24d
movl $0x36c, %r8d            # imm = 0x36C
xorl %eax, %eax
callq 0x22d0
movl $0x1, %edi
callq 0x2230
callq 0x2dbd
leaq 0x1119(%rip), %rdi      # 0xb598
xorl %eax, %eax
callq 0x2030
movq 0x5ddb(%rip), %rcx      # 0x10268
testq %rcx, %rcx
je 0xa4a8
leaq 0x10ff(%rip), %rdi      # 0xb598
movl $0x24, %esi
movl $0x1, %edx
callq 0x23b0
leaq 0xd8e(%rip), %rdi       # 0xb23d
leaq 0x2c68(%rip), %rsi      # 0xd11e
leaq 0xd90(%rip), %rdx       # 0xb24d
movl $0x357, %ecx            # imm = 0x357
xorl %eax, %eax
callq 0x2030
movq 0x5d98(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa469
leaq 0xd61(%rip), %rsi       # 0xb23d
leaq 0x2c3b(%rip), %rdx      # 0xd11e
leaq 0xd63(%rip), %rcx       # 0xb24d
movl $0x357, %r8d            # imm = 0x357
jmp 0xa462
leaq 0x109c(%rip), %rdi      # 0xb598
xorl %eax, %eax
callq 0x2030
movq 0x5d5e(%rip), %rcx      # 0x10268
testq %rcx, %rcx
je 0xa525
leaq 0x1082(%rip), %rdi      # 0xb598
movl $0x24, %esi
movl $0x1, %edx
callq 0x23b0
leaq 0xd11(%rip), %rdi       # 0xb23d
leaq 0x2beb(%rip), %rsi      # 0xd11e
leaq 0xd13(%rip), %rdx       # 0xb24d
movl $0x35d, %ecx            # imm = 0x35D
xorl %eax, %eax
callq 0x2030
movq 0x5d1b(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0xa469
leaq 0xce0(%rip), %rsi       # 0xb23d
leaq 0x2bba(%rip), %rdx      # 0xd11e
leaq 0xce2(%rip), %rcx       # 0xb24d
movl $0x35d, %r8d            # imm = 0x35D
jmp 0xa462
movq %rbx, %rdi
callq 0x2e60