// File: /workspace/github_c_makefile_star2_O0/mabdi[P]bunney/bunny-main.c
// Function: process_fuzz_main
static void process_fuzz_main(_u8* dir, struct bunny_traceitem* useref, _u8 eff) {
  struct bunny_traceitem *cal, *ref;
  _u32 exit_status = 0, diff_count = 0;
  _u32 cno, i, par;
  _u8  path_diff = 0;
  _u8  early_bailout = 0;
  _u64 st_exec = exec_cnt;

  point_inflow(dir);
  flow_command(FLOW_RESCAN,0,0,0);
  
  outf("\n=== Fuzzing cycle %u/%u (%s) ===\n\n", cur_cycle, total_queue - 1, dir);

  if (!useref) {

    outf("[+] New call path - process calibration: ");
  
    cal = malloc(cal_cycles * sizeof(struct bunny_traceitem));
    if (!cal) fatal("out of memory");
    ref = cal;
  
    for (cno=0;cno<cal_cycles;cno++) {
      struct bunny_traceitem *tmp;
       
      tmp = run_program();
      memcpy(cal+cno,tmp,sizeof(struct bunny_traceitem));
      exit_status |= tmp->exit_status;
 
      if (exit_status & EXITF_NOCALLS) break;

      if (cno) {

        if (tmp->thread_count != ref->thread_count) path_diff = 1;

        if (cno) 
          if (ref->exec_cksum  != tmp->exec_cksum ||
              ref->param_count != tmp->param_count) path_diff = 1;

      }

      outf(".");
      fflush(stdout);

      /* On the first cycle, sleep for slightly over a second to make sure we spot all
         time(0)-based changes in function parameters. */
      if (!cno && cal_cycles > 1) {
        usleep(1100000);        
        usleeps_done++;
      }
 
      free(tmp);

    }
  
    outf("DONE %s\n", cal_cycles > 1 ? "(full mode)" : " (basic mode)");

    if (!useref && ref->func_skip)
      outf("    >>> Reference skips %u function call%s - over limit of %u (use -M to adjust).\n",ref->func_skip,
           (ref->func_skip == 1) ? "" : "s", func_limit);
    
    if (exit_status) {
    
      outf("[!] WARNING: Anomalous behavior of the traced program detected in calibration phase!\n"
           "    Trace branch will be abandoned to prevent false positives later on.\n"
           "    Branch '%s', fuzzing cycle #%u, condition list: \n", dir, cur_cycle);

      if (exit_status & EXITF_CRASH)    outf("      - Application crashed unexpectedly!\n");
      if (exit_status & EXITF_NOCALLS)  outf("      - Trace log for the application is empty - executable is missing,\n"
                                             "        broken, or not compiled with bunny-gcc? Maybe you need -d option?\n");
      if (exit_status & EXITF_TIMEOUT)  outf("      - Execution time limit exceeded (%u ms, use -x to change).\n", time_limit);
      if (exit_status & EXITF_STUCK)    outf("      - No-op stall time limit exceeded (%u ms, use -s to change).\n", stall_limit);
      return;
       
    }

    if (path_diff) {
      outf("[!] WARNING: Program flow pattern changes arbitrarily for same input in calibration phase!\n"
           "    Trace branch will be abandoned to avoid false positives later on.\n"
           "    Branch '%s', fuzzing cycle #%u.\n", dir, cur_cycle);
      return;
    }

    /* We want to detect any fluctuations, not just range changes, so
       we have to waste some CPU cycles during the calibration process.
       Not a big deal. */

    for (par=0;par < ref->param_count;par++)
      for (cno=1;cno < cal_cycles;cno++)
        if (ref->param_data[par] != cal[cno].param_data[par]) {
          ref->param_range[par] = RANGE64_VOLATILE;
          diff_count++;
          break;
        }

    if (diff_count)
      outf("    Variations detected for %u/%u function parameters.\n",diff_count,ref->param_count);
    else
      outf("    Found %u fixed function parameters in the trace.\n",ref->param_count);

    /* Free calibration data except for ref-> */
    for (cno=1;cno<cal_cycles;cno++)
      discard_context(cal+cno,0);  
    ref = realloc(ref,sizeof(struct bunny_traceitem));
    cal = 0;

    register_new_exec(ref,0);
    
    /* We updated parameter ranges and registered the call path, so let's 
       self-checksum the reference trace */

    do_param_cksum(ref);

    register_new_param(ref,0,0,0,0);

    ref->fuzzable = flow_command(FLOW_GET_FUZZABLE,0,0,0);  

    outf("    Tracing %u process%s, %u functions, %u bytes fuzzable (c=%016llx p=%016llx)\n", 
         ref->thread_count, ref->thread_count == 1 ? "" : "es", ref->func_count,
         ref->fuzzable, ref->exec_cksum, ref->param_cksum);

  } else {

    ref = useref;
    
    ref->param_cksum = 0xBADBADBADBADBAD0LL;
    ref->fuzzable    = flow_command(FLOW_GET_FUZZABLE,0,0,0);  

    outf("[+] Revisiting call path c=%016llx, %u bytes fuzzable, %u functions.\n", 
         ref->exec_cksum, ref->fuzzable, ref->func_count);

  }

  reg_execs  = 0;
  reg_params = 0;

  if (skip_rounds) {
    outf("[!] Rounds 0-7 skipped (-k option in effect).\n");
    goto skip_to_8;
  }

  /* Mini-fuzzing for effector values */

  if (eff) {
    outf("[+] Fuzzing known effectors first (0/8).\n");
    eff_valset_walk(ref);
  }

  /* Actual fuzzing begins here */
  

  outf("[+] Attempting variable window walking bit flipping (1/8).\n");
  
  for (i=1;i <= bitflip_max;i += bitflip_inc) 
    if (bitflip_walk(ref,i)) { early_bailout = 1; goto fuzz_bailout; }

  outf("[+] Attempting walking value pattern set (2/8).\n");

  if (valset_walk(ref,1)) { early_bailout = 1; goto fuzz_bailout; }
  if (valset_walk(ref,2)) { early_bailout = 1; goto fuzz_bailout; }
  if (valset_walk(ref,4)) { early_bailout = 1; goto fuzz_bailout; }

  outf("[+] Attempting walking value randomization (3/8).\n");

  /* If use_all8 is in effect, there's no point in trying random 1-byte values */

  if (!use_all8) 
    if (valset_rand_walk(ref,1)) { early_bailout = 1; goto fuzz_bailout; }

  if (valset_rand_walk(ref,2)) { early_bailout = 1; goto fuzz_bailout; }
  if (valset_rand_walk(ref,4)) { early_bailout = 1; goto fuzz_bailout; }

  outf("[+] Attempting block deletion operations (4/8).\n");

  for (i=1;i <= chunk_max;i += chunk_inc)
    if (delete_walk(ref,i))               { early_bailout = 1; goto fuzz_bailout; }

  outf("[+] Attempting block overwrite operations (5/8).\n");

  for (i=1;i <= chunk_max;i += chunk_inc)
    if (chunk_walk(ref,FLOW_OVERWRITE,i)) { early_bailout = 1; goto fuzz_bailout; }

  outf("[+] Attempting block cloning operations (6/8).\n");

  for (i=1;i <= chunk_max;i += chunk_inc)
    if (chunk_walk(ref,FLOW_INSERT,i))    { early_bailout = 1; goto fuzz_bailout; }

  outf("[+] Attempting block swap operations (7/8).\n");

  for (i=1;i <= chunk_max;i += chunk_inc)
    if (chunk_walk(ref,FLOW_SWAP,i))      { early_bailout = 1; goto fuzz_bailout; }

skip_to_8:

  outf("[+] Attempting random stacking and rearrangement (8/8).\n");
  if (random_stack(ref)) early_bailout = 1;

fuzz_bailout:

  if (!early_bailout) outf("[+] Fuzzing cycle completed successfully (%llu execs).\n",exec_cnt - st_exec);
  else { 
    outf("[!] Fuzzing cycle terminated on abort condition (%llu execs).\n",exec_cnt - st_exec);
    fuzz_ign++;
  }
  
  free_input(dir,1);
  cur_cycle++;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movb $0x0, -0x3d(%rbp)
movb $0x0, -0x3e(%rbp)
movq 0xc05e(%rip), %rax      # 0x12350
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7130
movl $0x1, %edi
xorl %ecx, %ecx
movl %ecx, %esi
movl %ecx, %edx
callq 0x7590
movl 0xc033(%rip), %esi      # 0x12348
movl 0xc09d(%rip), %edx      # 0x123b8
subl $0x1, %edx
movq -0x8(%rbp), %rcx
leaq 0x924e(%rip), %rdi      # 0xf577
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xbfa0(%rip)      # 0x122d8
je 0x6362
movq 0xbf97(%rip), %rdi      # 0x122d8
movl 0xc001(%rip), %edx      # 0x12348
movl 0xc06b(%rip), %ecx      # 0x123b8
subl $0x1, %ecx
movq -0x8(%rbp), %r8
leaq 0x921c(%rip), %rsi      # 0xf577
movb $0x0, %al
callq 0x22d0
jmp 0x6364
cmpq $0x0, -0x10(%rbp)
jne 0x6aa5
jmp 0x6371
leaq 0x9223(%rip), %rdi      # 0xf59b
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xbf51(%rip)      # 0x122d8
je 0x639e
movq 0xbf48(%rip), %rdi      # 0x122d8
leaq 0x9204(%rip), %rsi      # 0xf59b
movb $0x0, %al
callq 0x22d0
jmp 0x63a0
movl 0xbe86(%rip), %eax      # 0x1222c
imulq $0x70, %rax, %rdi
callq 0x2280
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x6453
jmp 0x63c0
jmp 0x63c2
leaq 0x8143(%rip), %rdi      # 0xe50c
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xbf00(%rip)      # 0x122d8
je 0x63ef
movq 0xbef7(%rip), %rdi      # 0x122d8
leaq 0x8124(%rip), %rsi      # 0xe50c
movb $0x0, %al
callq 0x22d0
jmp 0x63f1
jmp 0x63f3
leaq 0x7db7(%rip), %rdi      # 0xe1b1
leaq 0x91c4(%rip), %rsi      # 0xf5c5
leaq 0x7db9(%rip), %rdx      # 0xe1c1
movl $0x653, %ecx            # imm = 0x653
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xbebc(%rip)      # 0x122d8
je 0x6447
movq 0xbeb3(%rip), %rdi      # 0x122d8
leaq 0x7d85(%rip), %rsi      # 0xe1b1
leaq 0x9192(%rip), %rdx      # 0xf5c5
leaq 0x7d87(%rip), %rcx      # 0xe1c1
movl $0x653, %r8d            # imm = 0x653
movb $0x0, %al
callq 0x22d0
jmp 0x6449
movl $0x1, %edi
callq 0x2250
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl 0xbdc1(%rip), %eax      # 0x1222c
jae 0x657b
callq 0x7b70
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
movl -0x34(%rbp), %eax
imulq $0x70, %rax, %rax
addq %rax, %rdi
movq -0x50(%rbp), %rsi
movl $0x70, %edx
callq 0x2180
movq -0x50(%rbp), %rax
movl (%rax), %eax
orl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x64b2
jmp 0x657b
cmpl $0x0, -0x34(%rbp)
je 0x64fc
movq -0x50(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x28(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x64cc
movb $0x1, -0x3d(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x64fa
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x50(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x64f4
movq -0x28(%rbp), %rax
movl 0x28(%rax), %eax
movq -0x50(%rbp), %rcx
cmpl 0x28(%rcx), %eax
je 0x64f8
movb $0x1, -0x3d(%rbp)
jmp 0x64fa
jmp 0x64fc
jmp 0x64fe
leaq 0x90d2(%rip), %rdi      # 0xf5d7
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xbdc4(%rip)      # 0x122d8
je 0x652b
movq 0xbdbb(%rip), %rdi      # 0x122d8
leaq 0x90b3(%rip), %rsi      # 0xf5d7
movb $0x0, %al
callq 0x22d0
jmp 0x652d
movq 0xba8c(%rip), %rax      # 0x11fc0
movq (%rax), %rdi
callq 0x2220
cmpl $0x0, -0x34(%rbp)
jne 0x6564
cmpl $0x1, 0xbce3(%rip)      # 0x1222c
jbe 0x6564
movl $0x10c8e0, %edi         # imm = 0x10C8E0
callq 0x22b0
movl 0xbe15(%rip), %eax      # 0x12370
addl $0x1, %eax
movl %eax, 0xbe0c(%rip)      # 0x12370
movq -0x50(%rbp), %rdi
callq 0x2240
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x6462
jmp 0x657d
movl 0xbca9(%rip), %ecx      # 0x1222c
leaq 0x9064(%rip), %rsi      # 0xf5ee
leaq 0x9051(%rip), %rax      # 0xf5e2
cmpl $0x1, %ecx
cmovaq %rax, %rsi
leaq 0x903a(%rip), %rdi      # 0xf5d9
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xbd2a(%rip)      # 0x122d8
je 0x65e0
movq 0xbd21(%rip), %rdi      # 0x122d8
movl 0xbc6f(%rip), %ecx      # 0x1222c
leaq 0x902a(%rip), %rdx      # 0xf5ee
leaq 0x9017(%rip), %rax      # 0xf5e2
cmpl $0x1, %ecx
cmovaq %rax, %rdx
leaq 0x9000(%rip), %rsi      # 0xf5d9
movb $0x0, %al
callq 0x22d0
jmp 0x65e2
cmpq $0x0, -0x10(%rbp)
jne 0x6681
movq -0x28(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x6681
jmp 0x65fd
movq -0x28(%rbp), %rax
movl 0x38(%rax), %esi
movq -0x28(%rbp), %rax
movl 0x38(%rax), %ecx
leaq 0x8d60(%rip), %rdx      # 0xf372
leaq 0x9d47(%rip), %rax      # 0x10360
cmpl $0x1, %ecx
cmoveq %rax, %rdx
movl 0xbbea(%rip), %ecx      # 0x12210
leaq 0x8fcf(%rip), %rdi      # 0xf5fc
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xbc9c(%rip)      # 0x122d8
je 0x667d
movq 0xbc93(%rip), %rdi      # 0x122d8
movq -0x28(%rbp), %rax
movl 0x38(%rax), %edx
movq -0x28(%rbp), %rax
movl 0x38(%rax), %esi
leaq 0x8d18(%rip), %rcx      # 0xf372
leaq 0x9cff(%rip), %rax      # 0x10360
cmpl $0x1, %esi
cmoveq %rax, %rcx
movl 0xbba1(%rip), %r8d      # 0x12210
leaq 0x8f86(%rip), %rsi      # 0xf5fc
movb $0x0, %al
callq 0x22d0
jmp 0x667f
jmp 0x6681
cmpl $0x0, -0x2c(%rbp)
je 0x67e5
jmp 0x668d
movq -0x8(%rbp), %rsi
movl 0xbcb1(%rip), %edx      # 0x12348
leaq 0x8fb1(%rip), %rdi      # 0xf64f
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xbc2b(%rip)      # 0x122d8
je 0x66ce
movq 0xbc22(%rip), %rdi      # 0x122d8
movq -0x8(%rbp), %rdx
movl 0xbc88(%rip), %ecx      # 0x12348
leaq 0x8f88(%rip), %rsi      # 0xf64f
movb $0x0, %al
callq 0x22d0
jmp 0x66d0
movl -0x2c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x670e
jmp 0x66dd
leaq 0x903e(%rip), %rdi      # 0xf722
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xbbe5(%rip)      # 0x122d8
je 0x670a
movq 0xbbdc(%rip), %rdi      # 0x122d8
leaq 0x901f(%rip), %rsi      # 0xf722
movb $0x0, %al
callq 0x22d0
jmp 0x670c
jmp 0x670e
movl -0x2c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x674c
jmp 0x671b
leaq 0x902b(%rip), %rdi      # 0xf74d
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xbba7(%rip)      # 0x122d8
je 0x6748
movq 0xbb9e(%rip), %rdi      # 0x122d8
leaq 0x900c(%rip), %rsi      # 0xf74d
movb $0x0, %al
callq 0x22d0
jmp 0x674a
jmp 0x674c
movl -0x2c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x6796
jmp 0x6759
movl 0xba95(%rip), %esi      # 0x121f4
leaq 0x907a(%rip), %rdi      # 0xf7e0
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xbb63(%rip)      # 0x122d8
je 0x6792
movq 0xbb5a(%rip), %rdi      # 0x122d8
movl 0xba70(%rip), %edx      # 0x121f4
leaq 0x9055(%rip), %rsi      # 0xf7e0
movb $0x0, %al
callq 0x22d0
jmp 0x6794
jmp 0x6796
movl -0x2c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x67e0
jmp 0x67a3
movl 0xba47(%rip), %esi      # 0x121f0
leaq 0x9072(%rip), %rdi      # 0xf822
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xbb19(%rip)      # 0x122d8
je 0x67dc
movq 0xbb10(%rip), %rdi      # 0x122d8
movl 0xba22(%rip), %edx      # 0x121f0
leaq 0x904d(%rip), %rsi      # 0xf822
movb $0x0, %al
callq 0x22d0
jmp 0x67de
jmp 0x67e0
jmp 0x7008
cmpb $0x0, -0x3d(%rbp)
je 0x6835
jmp 0x67ed
movq -0x8(%rbp), %rsi
movl 0xbb51(%rip), %edx      # 0x12348
leaq 0x9068(%rip), %rdi      # 0xf866
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xbacb(%rip)      # 0x122d8
je 0x682e
movq 0xbac2(%rip), %rdi      # 0x122d8
movq -0x8(%rbp), %rdx
movl 0xbb28(%rip), %ecx      # 0x12348
leaq 0x903f(%rip), %rsi      # 0xf866
movb $0x0, %al
callq 0x22d0
jmp 0x6830
jmp 0x7008
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jae 0x68c3
movl $0x1, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl 0xb9d4(%rip), %eax      # 0x1222c
jae 0x68b3
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0x20(%rbp), %rcx
movl -0x34(%rbp), %edx
imulq $0x70, %rdx, %rdx
addq %rdx, %rcx
movq 0x30(%rcx), %rcx
movl -0x3c(%rbp), %edx
cmpl (%rcx,%rdx,4), %eax
je 0x68a6
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x3c(%rbp), %ecx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
movq %rdx, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x68b3
jmp 0x68a8
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x684f
jmp 0x68b5
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x683c
cmpl $0x0, -0x30(%rbp)
je 0x6910
jmp 0x68cb
movl -0x30(%rbp), %esi
movq -0x28(%rbp), %rax
movl 0x28(%rax), %edx
leaq 0x9050(%rip), %rdi      # 0xf92c
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb9ed(%rip)      # 0x122d8
je 0x690c
movq 0xb9e4(%rip), %rdi      # 0x122d8
movl -0x30(%rbp), %edx
movq -0x28(%rbp), %rax
movl 0x28(%rax), %ecx
leaq 0x9027(%rip), %rsi      # 0xf92c
movb $0x0, %al
callq 0x22d0
jmp 0x690e
jmp 0x6951
jmp 0x6912
movq -0x28(%rbp), %rax
movl 0x28(%rax), %esi
leaq 0x9044(%rip), %rdi      # 0xf964
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb9a9(%rip)      # 0x122d8
je 0x694d
movq 0xb9a0(%rip), %rdi      # 0x122d8
movq -0x28(%rbp), %rax
movl 0x28(%rax), %edx
leaq 0x901e(%rip), %rsi      # 0xf964
movb $0x0, %al
callq 0x22d0
jmp 0x694f
jmp 0x6951
movl $0x1, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl 0xb8cb(%rip), %eax      # 0x1222c
jae 0x6983
movq -0x20(%rbp), %rdi
movl -0x34(%rbp), %eax
imulq $0x70, %rax, %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x8570
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x6958
movq -0x28(%rbp), %rdi
movl $0x70, %esi
callq 0x2360
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x8770
movq -0x28(%rbp), %rdi
callq 0x8b20
movq -0x28(%rbp), %rdi
xorl %r8d, %r8d
movl %r8d, %esi
movl %r8d, %edx
movl %r8d, %ecx
callq 0x8b80
movl $0x3, %edi
xorl %ecx, %ecx
movl %ecx, %esi
movl %ecx, %edx
callq 0x7590
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
leaq 0x7bf3(%rip), %rdx      # 0xe5e7
leaq 0x9965(%rip), %rax      # 0x10360
cmpl $0x1, %ecx
cmoveq %rax, %rdx
movq -0x28(%rbp), %rax
movl 0x54(%rax), %ecx
movq -0x28(%rbp), %rax
movl 0x4(%rax), %r8d
movq -0x28(%rbp), %rax
movq 0x10(%rax), %r9
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
leaq 0x8f72(%rip), %rdi      # 0xf99a
movq %rax, (%rsp)
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb89d(%rip)      # 0x122d8
je 0x6a9e
movq 0xb894(%rip), %rdi      # 0x122d8
movq -0x28(%rbp), %rax
movl 0x8(%rax), %edx
movq -0x28(%rbp), %rax
movl 0x8(%rax), %esi
leaq 0x7b8e(%rip), %rcx      # 0xe5e7
leaq 0x9900(%rip), %rax      # 0x10360
cmpl $0x1, %esi
cmoveq %rax, %rcx
movq -0x28(%rbp), %rax
movl 0x54(%rax), %r8d
movq -0x28(%rbp), %rax
movl 0x4(%rax), %r9d
movq -0x28(%rbp), %rax
movq 0x10(%rax), %r10
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
leaq 0x8f0c(%rip), %rsi      # 0xf99a
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x22d0
jmp 0x6aa0
jmp 0x6b36
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movabsq $-0x4524524524524530, %rcx # imm = 0xBADBADBADBADBAD0
movq %rcx, 0x18(%rax)
movl $0x3, %edi
xorl %ecx, %ecx
movl %ecx, %esi
movl %ecx, %edx
callq 0x7590
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x28(%rbp), %rax
movl 0x54(%rax), %ecx
leaq 0x8ef6(%rip), %rdi      # 0xf9eb
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb7d4(%rip)      # 0x122d8
je 0x6b32
movq 0xb7cb(%rip), %rdi      # 0x122d8
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x28(%rbp), %rax
movl 0x54(%rax), %r8d
leaq 0x8ec0(%rip), %rsi      # 0xf9eb
movb $0x0, %al
callq 0x22d0
jmp 0x6b34
jmp 0x6b36
movl $0x0, 0xb888(%rip)      # 0x123c8
movl $0x0, 0xb882(%rip)      # 0x123cc
cmpb $0x0, 0xb7b5(%rip)      # 0x12306
je 0x6b89
jmp 0x6b55
leaq 0x8ed5(%rip), %rdi      # 0xfa31
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb76d(%rip)      # 0x122d8
je 0x6b82
movq 0xb764(%rip), %rdi      # 0x122d8
leaq 0x8eb6(%rip), %rsi      # 0xfa31
movb $0x0, %al
callq 0x22d0
jmp 0x6b84
jmp 0x6f02
cmpb $0x0, -0x11(%rbp)
je 0x6bc9
jmp 0x6b91
leaq 0x8ec8(%rip), %rdi      # 0xfa60
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb731(%rip)      # 0x122d8
je 0x6bbe
movq 0xb728(%rip), %rdi      # 0x122d8
leaq 0x8ea9(%rip), %rsi      # 0xfa60
movb $0x0, %al
callq 0x22d0
jmp 0x6bc0
movq -0x28(%rbp), %rdi
callq 0x8ef0
jmp 0x6bcb
leaq 0x8eb8(%rip), %rdi      # 0xfa8a
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb6f7(%rip)      # 0x122d8
je 0x6bf8
movq 0xb6ee(%rip), %rdi      # 0x122d8
leaq 0x8e99(%rip), %rsi      # 0xfa8a
movb $0x0, %al
callq 0x22d0
jmp 0x6bfa
movl $0x1, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl 0xb5f2(%rip), %eax      # 0x121fc
ja 0x6c35
movq -0x28(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x9680
cmpb $0x0, %al
je 0x6c25
movb $0x1, -0x3e(%rbp)
jmp 0x6f46
jmp 0x6c27
movl 0xb5cb(%rip), %eax      # 0x121f8
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x6c01
jmp 0x6c37
leaq 0x8e88(%rip), %rdi      # 0xfac6
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb68b(%rip)      # 0x122d8
je 0x6c64
movq 0xb682(%rip), %rdi      # 0x122d8
leaq 0x8e69(%rip), %rsi      # 0xfac6
movb $0x0, %al
callq 0x22d0
jmp 0x6c66
movq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x99b0
cmpb $0x0, %al
je 0x6c81
movb $0x1, -0x3e(%rbp)
jmp 0x6f46
movq -0x28(%rbp), %rdi
movl $0x2, %esi
callq 0x99b0
cmpb $0x0, %al
je 0x6c9c
movb $0x1, -0x3e(%rbp)
jmp 0x6f46
movq -0x28(%rbp), %rdi
movl $0x4, %esi
callq 0x99b0
cmpb $0x0, %al
je 0x6cb7
movb $0x1, -0x3e(%rbp)
jmp 0x6f46
jmp 0x6cb9
leaq 0x8e37(%rip), %rdi      # 0xfaf7
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb609(%rip)      # 0x122d8
je 0x6ce6
movq 0xb600(%rip), %rdi      # 0x122d8
leaq 0x8e18(%rip), %rsi      # 0xfaf7
movb $0x0, %al
callq 0x22d0
jmp 0x6ce8
cmpb $0x0, 0xb612(%rip)      # 0x12301
jne 0x6d0e
movq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x9f80
cmpb $0x0, %al
je 0x6d0c
movb $0x1, -0x3e(%rbp)
jmp 0x6f46
jmp 0x6d0e
movq -0x28(%rbp), %rdi
movl $0x2, %esi
callq 0x9f80
cmpb $0x0, %al
je 0x6d29
movb $0x1, -0x3e(%rbp)
jmp 0x6f46
movq -0x28(%rbp), %rdi
movl $0x4, %esi
callq 0x9f80
cmpb $0x0, %al
je 0x6d44
movb $0x1, -0x3e(%rbp)
jmp 0x6f46
jmp 0x6d46
leaq 0x8ddd(%rip), %rdi      # 0xfb2a
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb57c(%rip)      # 0x122d8
je 0x6d73
movq 0xb573(%rip), %rdi      # 0x122d8
leaq 0x8dbe(%rip), %rsi      # 0xfb2a
movb $0x0, %al
callq 0x22d0
jmp 0x6d75
movl $0x1, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl 0xb47f(%rip), %eax      # 0x12204
ja 0x6db0
movq -0x28(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0xa530
cmpb $0x0, %al
je 0x6da0
movb $0x1, -0x3e(%rbp)
jmp 0x6f46
jmp 0x6da2
movl 0xb458(%rip), %eax      # 0x12200
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x6d7c
jmp 0x6db2
leaq 0x8da2(%rip), %rdi      # 0xfb5b
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb510(%rip)      # 0x122d8
je 0x6ddf
movq 0xb507(%rip), %rdi      # 0x122d8
leaq 0x8d83(%rip), %rsi      # 0xfb5b
movb $0x0, %al
callq 0x22d0
jmp 0x6de1
movl $0x1, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl 0xb413(%rip), %eax      # 0x12204
ja 0x6e21
movq -0x28(%rbp), %rdi
movl -0x38(%rbp), %edx
movl $0x69, %esi
callq 0xa820
cmpb $0x0, %al
je 0x6e11
movb $0x1, -0x3e(%rbp)
jmp 0x6f46
jmp 0x6e13
movl 0xb3e7(%rip), %eax      # 0x12200
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x6de8
jmp 0x6e23
leaq 0x8d63(%rip), %rdi      # 0xfb8d
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb49f(%rip)      # 0x122d8
je 0x6e50
movq 0xb496(%rip), %rdi      # 0x122d8
leaq 0x8d44(%rip), %rsi      # 0xfb8d
movb $0x0, %al
callq 0x22d0
jmp 0x6e52
movl $0x1, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl 0xb3a2(%rip), %eax      # 0x12204
ja 0x6e92
movq -0x28(%rbp), %rdi
movl -0x38(%rbp), %edx
movl $0x6a, %esi
callq 0xa820
cmpb $0x0, %al
je 0x6e82
movb $0x1, -0x3e(%rbp)
jmp 0x6f46
jmp 0x6e84
movl 0xb376(%rip), %eax      # 0x12200
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x6e59
jmp 0x6e94
leaq 0x8d22(%rip), %rdi      # 0xfbbd
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb42e(%rip)      # 0x122d8
je 0x6ec1
movq 0xb425(%rip), %rdi      # 0x122d8
leaq 0x8d03(%rip), %rsi      # 0xfbbd
movb $0x0, %al
callq 0x22d0
jmp 0x6ec3
movl $0x1, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl 0xb331(%rip), %eax      # 0x12204
ja 0x6f00
movq -0x28(%rbp), %rdi
movl -0x38(%rbp), %edx
movl $0x6b, %esi
callq 0xa820
cmpb $0x0, %al
je 0x6ef0
movb $0x1, -0x3e(%rbp)
jmp 0x6f46
jmp 0x6ef2
movl 0xb308(%rip), %eax      # 0x12200
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x6eca
jmp 0x6f02
jmp 0x6f04
leaq 0x8cdf(%rip), %rdi      # 0xfbea
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb3be(%rip)      # 0x122d8
je 0x6f31
movq 0xb3b5(%rip), %rdi      # 0x122d8
leaq 0x8cc0(%rip), %rsi      # 0xfbea
movb $0x0, %al
callq 0x22d0
jmp 0x6f33
movq -0x28(%rbp), %rdi
callq 0xad50
cmpb $0x0, %al
je 0x6f44
movb $0x1, -0x3e(%rbp)
jmp 0x6f46
cmpb $0x0, -0x3e(%rbp)
jne 0x6f95
jmp 0x6f4e
movq 0xb3fb(%rip), %rsi      # 0x12350
subq -0x48(%rbp), %rsi
leaq 0x8cc3(%rip), %rdi      # 0xfc23
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb369(%rip)      # 0x122d8
je 0x6f91
movq 0xb360(%rip), %rdi      # 0x122d8
movq 0xb3d1(%rip), %rdx      # 0x12350
subq -0x48(%rbp), %rdx
leaq 0x8c99(%rip), %rsi      # 0xfc23
movb $0x0, %al
callq 0x22d0
jmp 0x6f93
jmp 0x6feb
jmp 0x6f97
movq 0xb3b2(%rip), %rsi      # 0x12350
subq -0x48(%rbp), %rsi
leaq 0x8cb2(%rip), %rdi      # 0xfc5b
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0xb320(%rip)      # 0x122d8
je 0x6fda
movq 0xb317(%rip), %rdi      # 0x122d8
movq 0xb388(%rip), %rdx      # 0x12350
subq -0x48(%rbp), %rdx
leaq 0x8c88(%rip), %rsi      # 0xfc5b
movb $0x0, %al
callq 0x22d0
jmp 0x6fdc
movl 0xb36a(%rip), %eax      # 0x1234c
addl $0x1, %eax
movl %eax, 0xb361(%rip)      # 0x1234c
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xb300
movl 0xb349(%rip), %eax      # 0x12348
addl $0x1, %eax
movl %eax, 0xb340(%rip)      # 0x12348
addq $0x60, %rsp
popq %rbp
retq
nop