// File: /workspace/github_c_makefile_star2_O0/mabdi[P]bunney/bunny-flow.c
// Function: reload_config
static void reload_config(void) {
  DIR* d;
  struct dirent* dent;
  _u32 i;
   
  for (i=0;i<infcount;i++) {
    free(infile[i].fname);
    if (infile[i].data) free(infile[i].data);
  }
  
  if (infile) free(infile);

  infcount = 0;
  infile   = 0;
  orig_fuzzable = 0;
  
  if (chdir(indir) || !(d = opendir(".")))
    pfatal("cannot open '%s' for reading",indir);
    
  while ((dent = readdir(d))) {
    struct stat st;
    _u8* x;
    
    if (dent->d_name[0] == '.') continue;
    
    x = strrchr(dent->d_name,'.');
    
    infile = realloc(infile,(infcount + 1) * sizeof(struct file_record));
    if (!infile) fatal("out of memory");
    
    infile[infcount].asis = (x && !strcmp(x,".keep"));

    infile[infcount].fname = strdup(dent->d_name);
    if (!infile[infcount].fname) fatal("out of memory");
    
    infile[infcount].data  = 0;
    infile[infcount].dirty = 0;
    
    if (access(dent->d_name,R_OK) || stat(dent->d_name,&st))
      pfatal("unable to access '%s/%s'",indir,dent->d_name);
      
    if (!S_ISREG(st.st_mode))
      fatal("'%s/%s' is not a regular file",indir,dent->d_name);

    /* 4 GB total oughta be enough for everybody... */
    infile[infcount].orig_len   = st.st_size;
    infile[infcount].cur_len    = st.st_size;
    if (!infile[infcount].asis) orig_fuzzable += st.st_size;
    
    infcount++;
  }

  closedir(d);
  
  if (!orig_fuzzable)
    fatal("directory '%s' contains no fuzzable entries",indir);

  if (infcount > 1)
    qsort(infile,infcount,sizeof(struct file_record),inf_sorter);

  debug("Loaded directory '%s': %u entries, %u bytes to fuzz\n",indir,infcount,orig_fuzzable);

  if (chdir(workdir))
    pfatal("unable to go back to work directory");

  cur_fuzzable = orig_fuzzable;
  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x6a05(%rip), %eax      # 0x8190
jae 0x17e5
movq 0x6a04(%rip), %rax      # 0x8198
movl -0x14(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x1170
movq 0x69eb(%rip), %rax      # 0x8198
movl -0x14(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x17d8
movq 0x69d3(%rip), %rax      # 0x8198
movl -0x14(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x1170
jmp 0x17da
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1782
cmpq $0x0, 0x69ab(%rip)      # 0x8198
je 0x17fb
movq 0x69a2(%rip), %rdi      # 0x8198
callq 0x1170
movl $0x0, 0x698b(%rip)      # 0x8190
movq $0x0, 0x6988(%rip) # 0x8198
movl $0x0, 0x6986(%rip)      # 0x81a0
movq 0x595f(%rip), %rdi      # 0x7180
callq 0x11e0
cmpl $0x0, %eax
jne 0x1841
leaq 0x39a5(%rip), %rdi      # 0x51d7
callq 0x1200
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
jne 0x18a4
jmp 0x1843
movq 0x5796(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
movq 0x592c(%rip), %rdx      # 0x7180
leaq 0x397e(%rip), %rsi      # 0x51d9
movb $0x0, %al
callq 0x11b0
movq 0x5777(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x37c9(%rip), %rsi      # 0x503c
leaq 0x3992(%rip), %rdx      # 0x520c
leaq 0x37d0(%rip), %rcx      # 0x5051
movl $0x69, %r8d
movb $0x0, %al
callq 0x11b0
leaq 0x3887(%rip), %rdi      # 0x511c
callq 0x1100
movl $0x1, %edi
callq 0x1180
jmp 0x18a6
movq -0x8(%rbp), %rdi
callq 0x1210
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x1c06
movq -0x10(%rbp), %rax
movsbl 0x13(%rax), %eax
cmpl $0x2e, %eax
jne 0x18cc
jmp 0x18a6
movq -0x10(%rbp), %rdi
addq $0x13, %rdi
movl $0x2e, %esi
callq 0x1130
movq %rax, -0xb0(%rbp)
movq 0x68ac(%rip), %rdi      # 0x8198
movl 0x689e(%rip), %eax      # 0x8190
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
shlq $0x5, %rsi
callq 0x1250
movq %rax, 0x688f(%rip)      # 0x8198
cmpq $0x0, 0x6887(%rip)      # 0x8198
jne 0x1963
jmp 0x1915
movq 0x56c4(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x38f4(%rip), %rsi      # 0x521a
movb $0x0, %al
callq 0x11b0
movq 0x56ac(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x36fe(%rip), %rsi      # 0x503c
leaq 0x38c7(%rip), %rdx      # 0x520c
leaq 0x3705(%rip), %rcx      # 0x5051
movl $0x74, %r8d
movb $0x0, %al
callq 0x11b0
movl $0x1, %edi
callq 0x1180
xorl %eax, %eax
cmpq $0x0, -0xb0(%rbp)
movb %al, -0xb1(%rbp)
je 0x1996
movq -0xb0(%rbp), %rdi
leaq 0x38bc(%rip), %rsi      # 0x523f
callq 0x11a0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0xb1(%rbp)
movb -0xb1(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq 0x67ee(%rip), %rax      # 0x8198
movl 0x67e0(%rip), %edx      # 0x8190
shlq $0x5, %rdx
addq %rdx, %rax
movb %cl, 0x10(%rax)
movq -0x10(%rbp), %rdi
addq $0x13, %rdi
callq 0x1270
movq %rax, %rcx
movq 0x67c7(%rip), %rax      # 0x8198
movl 0x67b9(%rip), %edx      # 0x8190
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq 0x67b0(%rip), %rax      # 0x8198
movl 0x67a2(%rip), %ecx      # 0x8190
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x1a4b
jmp 0x19fd
movq 0x55dc(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x380c(%rip), %rsi      # 0x521a
movb $0x0, %al
callq 0x11b0
movq 0x55c4(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x3616(%rip), %rsi      # 0x503c
leaq 0x37df(%rip), %rdx      # 0x520c
leaq 0x361d(%rip), %rcx      # 0x5051
movl $0x79, %r8d
movb $0x0, %al
callq 0x11b0
movl $0x1, %edi
callq 0x1180
movq 0x6746(%rip), %rax      # 0x8198
movl 0x6738(%rip), %ecx      # 0x8190
shlq $0x5, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movq 0x672a(%rip), %rax      # 0x8198
movl 0x671c(%rip), %ecx      # 0x8190
shlq $0x5, %rcx
addq %rcx, %rax
movb $0x0, 0x1c(%rax)
movq -0x10(%rbp), %rdi
addq $0x13, %rdi
movl $0x4, %esi
callq 0x1260
cmpl $0x0, %eax
jne 0x1aaf
movq -0x10(%rbp), %rdi
addq $0x13, %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1110
cmpl $0x0, %eax
je 0x1b1a
jmp 0x1ab1
movq 0x5528(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
movq 0x56be(%rip), %rdx      # 0x7180
movq -0x10(%rbp), %rcx
addq $0x13, %rcx
leaq 0x3774(%rip), %rsi      # 0x5245
movb $0x0, %al
callq 0x11b0
movq 0x5501(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x3553(%rip), %rsi      # 0x503c
leaq 0x371c(%rip), %rdx      # 0x520c
leaq 0x355a(%rip), %rcx      # 0x5051
movl $0x7f, %r8d
movb $0x0, %al
callq 0x11b0
leaq 0x3611(%rip), %rdi      # 0x511c
callq 0x1100
movl $0x1, %edi
callq 0x1180
movl -0x90(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
je 0x1b8b
jmp 0x1b2e
movq 0x54ab(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
movq 0x5641(%rip), %rdx      # 0x7180
movq -0x10(%rbp), %rcx
addq $0x13, %rcx
leaq 0x3726(%rip), %rsi      # 0x5274
movb $0x0, %al
callq 0x11b0
movq 0x5484(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x34d6(%rip), %rsi      # 0x503c
leaq 0x369f(%rip), %rdx      # 0x520c
leaq 0x34dd(%rip), %rcx      # 0x5051
movl $0x82, %r8d
movb $0x0, %al
callq 0x11b0
movl $0x1, %edi
callq 0x1180
movq -0x78(%rbp), %rax
movl %eax, %ecx
movq 0x6600(%rip), %rax      # 0x8198
movl 0x65f2(%rip), %edx      # 0x8190
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x78(%rbp), %rax
movl %eax, %ecx
movq 0x65e3(%rip), %rax      # 0x8198
movl 0x65d5(%rip), %edx      # 0x8190
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq 0x65cc(%rip), %rax      # 0x8198
movl 0x65be(%rip), %ecx      # 0x8190
shlq $0x5, %rcx
addq %rcx, %rax
cmpb $0x0, 0x10(%rax)
jne 0x1bf2
movq -0x78(%rbp), %rcx
movl 0x65b7(%rip), %eax      # 0x81a0
addq %rcx, %rax
movl %eax, 0x65ae(%rip)      # 0x81a0
movl 0x6598(%rip), %eax      # 0x8190
addl $0x1, %eax
movl %eax, 0x658f(%rip)      # 0x8190
jmp 0x18a6
movq -0x8(%rbp), %rdi
callq 0x1230
cmpl $0x0, 0x658a(%rip)      # 0x81a0
jne 0x1c6f
jmp 0x1c1a
movq 0x53bf(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
movq 0x5555(%rip), %rdx      # 0x7180
leaq 0x3677(%rip), %rsi      # 0x52a9
movb $0x0, %al
callq 0x11b0
movq 0x53a0(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x33f2(%rip), %rsi      # 0x503c
leaq 0x35bb(%rip), %rdx      # 0x520c
leaq 0x33f9(%rip), %rcx      # 0x5051
movl $0x8f, %r8d
movb $0x0, %al
callq 0x11b0
movl $0x1, %edi
callq 0x1180
cmpl $0x1, 0x651a(%rip)      # 0x8190
jbe 0x1c98
movq 0x6519(%rip), %rdi      # 0x8198
movl 0x650b(%rip), %eax      # 0x8190
movl %eax, %esi
movl $0x20, %edx
leaq 0xdbd(%rip), %rcx       # 0x2a50
callq 0x1280
movq 0x5341(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
movq 0x54d7(%rip), %rdx      # 0x7180
movl 0x64e1(%rip), %ecx      # 0x8190
movl 0x64ea(%rip), %r8d      # 0x81a0
leaq 0x362f(%rip), %rsi      # 0x52ec
movb $0x0, %al
callq 0x11b0
leaq 0x54c5(%rip), %rdi      # 0x7190
callq 0x11e0
cmpl $0x0, %eax
je 0x1d31
jmp 0x1cd7
movq 0x5302(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x3639(%rip), %rsi      # 0x5321
movb $0x0, %al
callq 0x11b0
movq 0x52ea(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x333c(%rip), %rsi      # 0x503c
leaq 0x3505(%rip), %rdx      # 0x520c
leaq 0x3343(%rip), %rcx      # 0x5051
movl $0x97, %r8d
movb $0x0, %al
callq 0x11b0
leaq 0x33fa(%rip), %rdi      # 0x511c
callq 0x1100
movl $0x1, %edi
callq 0x1180
movl 0x6469(%rip), %eax      # 0x81a0
movl %eax, 0x6467(%rip)      # 0x81a4
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)