// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-main.c
// Function: valset_walk
static _u8 valset_walk(struct bunny_traceitem* t, _u8 size) {
  struct naive_list_int* l = 0;
  _u32 val;
  _s32 pos;

  if (reg_execs > cycle_branch_limit && (zero_range || reg_params > cycle_value_limit)) return 1;

  switch (size) {
    case 1: l = &byte_val_list; break;
    case 2: l = &word_val_list; break;
    case 4: l = &dword_val_list; break;
  }

  for (val=0;val < l->c; val++) 
    for (pos=0;pos < (_s32)t->fuzzable - size ;pos++) {
      struct bunny_traceitem* n;
      _s32 rval = 0;
      _u8 rne = 0;

      flow_command(FLOW_RESET,0,0,0);

      switch (size) {
        case 1: flow_command(FLOW_SETBYTE , pos, (rval = (_s8)l->v[val]) , 0); break;
        case 2: flow_command(FLOW_SETWORD , pos, (rval = (_s16)l->v[val]), 0); break;
        case 4: flow_command(FLOW_SETDWORD, pos, (rval = (_s32)l->v[val]), 0); break;
      }

      n = run_program();

      if (check_crash(n)) {
        outf("setting offset #%u to %d (%s).\n\n",pos, rval,
             (size == 1) ? "byte" : (size == 2) ? "word" : "dword" );
        if (keep_fault) continue;
        return 1;
      }

      if (reg_execs > cycle_branch_limit) epath_ign++;
        else if ((rne=register_new_exec(n,1))) {
        outf("      Triggered by setting offset #%u to %d (%s).\n",pos, rval,
             (size == 1) ? "byte" : (size == 2) ? "word" : "dword" );
        reg_execs++;
        if (reg_execs > cycle_branch_limit) 
          outf("      >>> Per-cycle call path limit of %u exceeded (use -N to adjust).\n",cycle_branch_limit);
      }

      if (reg_params > cycle_value_limit) ppath_ign++;
        else if (register_new_param(n,pos,size,1,rne)) {
          outf("      Triggered by setting offset #%u to %d (%s).\n",pos, rval,
               (size == 1) ? "byte" : (size == 2) ? "word" : "dword" );
          reg_params++;
          if (reg_params > cycle_value_limit) 
            outf("      >>> Per-cycle function parameter limit of %u exceeded (use -P to adjust).\n",cycle_value_limit);
        }
    
      /* Context not saved */
      if (!rne) discard_context(n,1);
    
    }

  return 0;
  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq %rdi, 0x20(%rsp)
movl 0x775f(%rip), %eax      # 0x10358
cmpl 0x7629(%rip), %eax      # 0x10228
jbe 0x8c23
movb $0x1, %r12b
cmpb $0x0, 0x768a(%rip)      # 0x10295
jne 0x8efd
movl 0x7745(%rip), %eax      # 0x1035c
cmpl 0x760f(%rip), %eax      # 0x1022c
ja 0x8efd
leal -0x1(%rbx), %eax
cmpb $0x3, %al
ja 0x8c3f
movzbl %al, %eax
leaq 0x716c(%rip), %rcx      # 0xfda0
movq (%rcx,%rax,8), %rax
movq %rax, 0x8(%rsp)
jmp 0x8c48
movq $0x0, 0x8(%rsp)
movzbl %bl, %ebp
cmpb $0x2, %bl
leaq 0x4671(%rip), %rax      # 0xd2c6
leaq 0x4669(%rip), %rcx      # 0xd2c5
cmoveq %rax, %rcx
cmpb $0x1, %bl
leaq 0x4656(%rip), %r15      # 0xd2c0
cmovneq %rcx, %r15
xorl %ecx, %ecx
movq %rbx, 0x18(%rsp)
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
xorl %r12d, %r12d
cmpq %rax, %rcx
jae 0x8efd
movq %rcx, 0x10(%rsp)
movq 0x20(%rsp), %rax
movl 0x4(%rax), %eax
subl %ebp, %eax
cmpl %eax, %r12d
jge 0x8eed
xorl %r13d, %r13d
pushq $0x2
popq %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x713e
cmpb $0x4, %bl
je 0x8ced
cmpl $0x2, %ebp
je 0x8cd7
cmpl $0x1, %ebp
jne 0x8d0e
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movsbl (%rax,%rcx,4), %r13d
pushq $0x65
jmp 0x8d00
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movswl (%rax,%rcx,4), %r13d
pushq $0x66
jmp 0x8d00
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movl (%rax,%rcx,4), %r13d
pushq $0x67
popq %rdi
movl %r12d, %esi
movl %r13d, %edx
xorl %ecx, %ecx
callq 0x713e
callq 0x7471
movq %rax, %r14
movq %rax, %rdi
callq 0x9e9c
testb %al, %al
je 0x8d6d
leaq 0x4576(%rip), %r14      # 0xd29f
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2030
movq 0x7525(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x8d5b
movq %r14, %rsi
movl %r12d, %edx
movl %r13d, %ecx
movq %r15, %r8
xorl %eax, %eax
callq 0x22d0
cmpb $0x0, 0x7530(%rip)      # 0x10292
jne 0x8ee5
jmp 0x8efa
movl 0x75e5(%rip), %eax      # 0x10358
cmpl 0x74af(%rip), %eax      # 0x10228
jbe 0x8d86
incl 0x756f(%rip)            # 0x102f0
jmp 0x8e1e
movq %r14, %rdi
pushq $0x1
popq %rsi
callq 0x82d0
testb %al, %al
je 0x8e1e
leaq 0x452b(%rip), %rbx      # 0xd2cb
movq %rbx, %rdi
movl %r12d, %esi
movl %r13d, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2030
movq 0x74ae(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x8dd2
movq %rbx, %rsi
movl %r12d, %edx
movl %r13d, %ecx
movq %r15, %r8
xorl %eax, %eax
callq 0x22d0
movl 0x7580(%rip), %eax      # 0x10358
incl %eax
movl %eax, 0x7578(%rip)      # 0x10358
movl 0x7442(%rip), %esi      # 0x10228
xorl %ebx, %ebx
cmpl %esi, %eax
jbe 0x8e20
leaq 0x450b(%rip), %rdi      # 0xd2fe
xorl %eax, %eax
callq 0x2030
movq 0x7467(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x8e20
movl 0x741c(%rip), %edx      # 0x10228
xorl %ebx, %ebx
leaq 0x44e9(%rip), %rsi      # 0xd2fe
xorl %eax, %eax
callq 0x22d0
jmp 0x8e20
movb $0x1, %bl
movl 0x7536(%rip), %eax      # 0x1035c
cmpl 0x7400(%rip), %eax      # 0x1022c
jbe 0x8e39
incl 0x74c4(%rip)            # 0x102f8
jmp 0x8ed1
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
pushq $0x1
popq %rcx
callq 0x859d
testb %al, %al
je 0x8ed1
leaq 0x4473(%rip), %rdi      # 0xd2cb
movl %r12d, %esi
movl %r13d, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2030
movq 0x73f9(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x8e8b
leaq 0x4450(%rip), %rsi      # 0xd2cb
movl %r12d, %edx
movl %r13d, %ecx
movq %r15, %r8
xorl %eax, %eax
callq 0x22d0
movl 0x74cb(%rip), %eax      # 0x1035c
incl %eax
movl %eax, 0x74c3(%rip)      # 0x1035c
movl 0x738d(%rip), %esi      # 0x1022c
cmpl %esi, %eax
jbe 0x8ed1
leaq 0x449c(%rip), %rdi      # 0xd346
xorl %eax, %eax
callq 0x2030
movq 0x73b0(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x8ed1
movl 0x7369(%rip), %edx      # 0x1022c
leaq 0x447c(%rip), %rsi      # 0xd346
xorl %eax, %eax
callq 0x22d0
testb %bl, %bl
movq 0x18(%rsp), %rbx
je 0x8ee5
movq %r14, %rdi
pushq $0x1
popq %rsi
callq 0x8190
incl %r12d
jmp 0x8c8e
movq 0x10(%rsp), %rcx
incq %rcx
jmp 0x8c75
movb $0x1, %r12b
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq