// File: /workspace/github_c_makefile_star2_O0/mabdi[P]bunney/bunny-main.c
// Function: random_stack
static _u8 random_stack(struct bunny_traceitem* t) {
  struct bunny_traceitem* n;
  _u32 i, j, rne = 0;

  for (i=0;i < rand_phase_cycles; i++) {

    flow_command(FLOW_RESET,0,0,0);

    for (j=0;j<rand_phase_stacking;j++) {
      _u32 fuz = flow_command(FLOW_GET_FUZZABLE, 0, 0, 0);
      _u32 pos, cnt;

      switch (R(8)) {
        case 0:
          flow_command(FLOW_SETBYTE, R(fuz), random(), 0); 
          break;

        case 1:
          if (fuz > 1)
            flow_command(FLOW_SETWORD, R(fuz - 1), random(), 0);
          break;

        case 2:
          if (fuz > 3) 
            flow_command(FLOW_SETDWORD, R(fuz - 3), R32(), 0);
          break;

        case 3:
          pos = R(fuz * 8);
          cnt = R(fuz * 8 - pos) + 1;
          flow_command(FLOW_BITFLIP, pos, cnt, 0); 
          break;

        case 4:
          if (fuz >= size_limit) break;
          pos = R(fuz);
          cnt = (R(fuz-pos) % chunk_max) + 1;
          cnt %= chunk_max;
          flow_command(FLOW_INSERT, pos, cnt, R(fuz));
          break;

        case 5:
          pos = R(fuz);
          cnt = (R(fuz-pos) % chunk_max) + 1;
          flow_command(FLOW_OVERWRITE, pos, cnt, R(fuz));
          break;

        case 6:
          pos = R(fuz);
          cnt = (R(fuz-pos) % chunk_max) + 1;
          flow_command(FLOW_SWAP, pos, cnt, R(fuz));
          break;

        case 7:
          pos = R(fuz);
          cnt = (R(fuz-pos) % chunk_max) + 1;
          if (fuz > cnt) 
            flow_command(FLOW_DELETE, pos, cnt, 0);
          break;

      }

    }

    n = run_program();
  
    if (check_crash(n)) {
      outf("random rearrangement.\n\n");
      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 random rearrangement.\n");
      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,0,0,1,rne)) {
      outf("      Triggered by random rearrangement.\n");
      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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x74a9(%rip), %eax      # 0x1221c
jae 0xb2e5
movl $0x2, %edi
xorl %ecx, %ecx
movl %ecx, %esi
movl %ecx, %edx
callq 0x7590
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x7487(%rip), %eax      # 0x12220
jae 0xb0bf
movl $0x3, %edi
xorl %ecx, %ecx
movl %ecx, %esi
movl %ecx, %edx
callq 0x7590
movl %eax, -0x28(%rbp)
callq 0x2120
movq %rax, %rdx
addq $0x7, %rdx
testq %rax, %rax
movq %rax, %rcx
cmovsq %rdx, %rcx
andq $-0x8, %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
subq $0x7, %rax
ja 0xb0af
movq -0x38(%rbp), %rax
leaq 0x333c(%rip), %rcx      # 0xe124
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x2120
movl -0x28(%rbp), %ecx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x3c(%rbp)
callq 0x2120
movl -0x3c(%rbp), %esi
movl %eax, %edx
movl $0x65, %edi
xorl %ecx, %ecx
callq 0x7590
jmp 0xb0af
cmpl $0x1, -0x28(%rbp)
jbe 0xae51
callq 0x2120
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x40(%rbp)
callq 0x2120
movl -0x40(%rbp), %esi
movl %eax, %edx
movl $0x66, %edi
xorl %ecx, %ecx
callq 0x7590
jmp 0xb0af
cmpl $0x3, -0x28(%rbp)
jbe 0xaea0
callq 0x2120
movl -0x28(%rbp), %ecx
subl $0x3, %ecx
movl %ecx, %ecx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x4c(%rbp)
callq 0x2120
shlq $0x10, %rax
movq %rax, -0x48(%rbp)
callq 0x2120
movl -0x4c(%rbp), %esi
movq %rax, %rcx
movq -0x48(%rbp), %rax
xorq %rcx, %rax
movl %eax, %edx
movl $0x67, %edi
xorl %ecx, %ecx
callq 0x7590
jmp 0xb0af
callq 0x2120
movl -0x28(%rbp), %ecx
shll $0x3, %ecx
movl %ecx, %ecx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x2c(%rbp)
callq 0x2120
movl -0x28(%rbp), %ecx
shll $0x3, %ecx
subl -0x2c(%rbp), %ecx
movl %ecx, %ecx
cqto
idivq %rcx
addq $0x1, %rdx
movl %edx, %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
movl $0x64, %edi
xorl %ecx, %ecx
callq 0x7590
jmp 0xb0af
movl -0x28(%rbp), %eax
cmpl 0x740e(%rip), %eax      # 0x12308
jb 0xaf01
jmp 0xb0af
callq 0x2120
movl -0x28(%rbp), %ecx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x2c(%rbp)
callq 0x2120
movl -0x28(%rbp), %ecx
subl -0x2c(%rbp), %ecx
movl %ecx, %ecx
cqto
idivq %rcx
movq %rdx, %rax
movl 0x72d6(%rip), %ecx      # 0x12204
cqto
idivq %rcx
addq $0x1, %rdx
movl %edx, %eax
movl %eax, -0x30(%rbp)
movl 0x72c2(%rip), %ecx      # 0x12204
movl -0x30(%rbp), %eax
xorl %edx, %edx
divl %ecx
movl %edx, -0x30(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x50(%rbp)
callq 0x2120
movl -0x54(%rbp), %esi
movl -0x28(%rbp), %ecx
cqto
idivq %rcx
movq %rdx, %rax
movl -0x50(%rbp), %edx
movl %eax, %ecx
movl $0x6a, %edi
callq 0x7590
jmp 0xb0af
callq 0x2120
movl -0x28(%rbp), %ecx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x2c(%rbp)
callq 0x2120
movl -0x28(%rbp), %ecx
subl -0x2c(%rbp), %ecx
movl %ecx, %ecx
cqto
idivq %rcx
movq %rdx, %rax
movl 0x7258(%rip), %ecx      # 0x12204
cqto
idivq %rcx
addq $0x1, %rdx
movl %edx, %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x58(%rbp)
callq 0x2120
movl -0x5c(%rbp), %esi
movl -0x28(%rbp), %ecx
cqto
idivq %rcx
movq %rdx, %rax
movl -0x58(%rbp), %edx
movl %eax, %ecx
movl $0x69, %edi
callq 0x7590
jmp 0xb0af
callq 0x2120
movl -0x28(%rbp), %ecx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x2c(%rbp)
callq 0x2120
movl -0x28(%rbp), %ecx
subl -0x2c(%rbp), %ecx
movl %ecx, %ecx
cqto
idivq %rcx
movq %rdx, %rax
movl 0x71ea(%rip), %ecx      # 0x12204
cqto
idivq %rcx
addq $0x1, %rdx
movl %edx, %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x60(%rbp)
callq 0x2120
movl -0x64(%rbp), %esi
movl -0x28(%rbp), %ecx
cqto
idivq %rcx
movq %rdx, %rax
movl -0x60(%rbp), %edx
movl %eax, %ecx
movl $0x6b, %edi
callq 0x7590
jmp 0xb0af
callq 0x2120
movl -0x28(%rbp), %ecx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x2c(%rbp)
callq 0x2120
movl -0x28(%rbp), %ecx
subl -0x2c(%rbp), %ecx
movl %ecx, %ecx
cqto
idivq %rcx
movq %rdx, %rax
movl 0x717f(%rip), %ecx      # 0x12204
cqto
idivq %rcx
addq $0x1, %rdx
movl %edx, %eax
movl %eax, -0x30(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jbe 0xb0ad
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
movl $0x68, %edi
xorl %ecx, %ecx
callq 0x7590
jmp 0xb0af
jmp 0xb0b1
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xad90
callq 0x7b70
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xcf40
cmpb $0x0, %al
je 0xb11d
jmp 0xb0d7
leaq 0x54fe(%rip), %rdi      # 0x105dc
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0x71eb(%rip)      # 0x122d8
je 0xb104
movq 0x71e2(%rip), %rdi      # 0x122d8
leaq 0x54df(%rip), %rsi      # 0x105dc
movb $0x0, %al
callq 0x22d0
jmp 0xb106
cmpb $0x0, 0x71f5(%rip)      # 0x12302
je 0xb114
jmp 0xb2d7
movb $0x1, -0x1(%rbp)
jmp 0xb2e9
movl 0x72a5(%rip), %eax      # 0x123c8
cmpl 0x70fb(%rip), %eax      # 0x12224
jbe 0xb13f
movl 0x722f(%rip), %eax      # 0x12360
addl $0x1, %eax
movl %eax, 0x7226(%rip)      # 0x12360
jmp 0xb1ed
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x8770
movzbl %al, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0xb1eb
jmp 0xb15e
leaq 0x548f(%rip), %rdi      # 0x105f4
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0x7164(%rip)      # 0x122d8
je 0xb18b
movq 0x715b(%rip), %rdi      # 0x122d8
leaq 0x5470(%rip), %rsi      # 0x105f4
movb $0x0, %al
callq 0x22d0
jmp 0xb18d
movl 0x7235(%rip), %eax      # 0x123c8
addl $0x1, %eax
movl %eax, 0x722c(%rip)      # 0x123c8
movl 0x7226(%rip), %eax      # 0x123c8
cmpl 0x707c(%rip), %eax      # 0x12224
jbe 0xb1e9
jmp 0xb1ac
movl 0x7072(%rip), %esi      # 0x12224
leaq 0x50bb(%rip), %rdi      # 0x10274
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0x7110(%rip)      # 0x122d8
je 0xb1e5
movq 0x7107(%rip), %rdi      # 0x122d8
movl 0x704d(%rip), %edx      # 0x12224
leaq 0x5096(%rip), %rsi      # 0x10274
movb $0x0, %al
callq 0x22d0
jmp 0xb1e7
jmp 0xb1e9
jmp 0xb1eb
jmp 0xb1ed
movl 0x71d9(%rip), %eax      # 0x123cc
cmpl 0x702f(%rip), %eax      # 0x12228
jbe 0xb20f
movl 0x7167(%rip), %eax      # 0x12368
addl $0x1, %eax
movl %eax, 0x715e(%rip)      # 0x12368
jmp 0xb2c1
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %eax
xorl %edx, %edx
movl $0x1, %ecx
movl %edx, %esi
movzbl %al, %r8d
callq 0x8b80
cmpb $0x0, %al
je 0xb2bf
jmp 0xb232
leaq 0x53bb(%rip), %rdi      # 0x105f4
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0x7090(%rip)      # 0x122d8
je 0xb25f
movq 0x7087(%rip), %rdi      # 0x122d8
leaq 0x539c(%rip), %rsi      # 0x105f4
movb $0x0, %al
callq 0x22d0
jmp 0xb261
movl 0x7165(%rip), %eax      # 0x123cc
addl $0x1, %eax
movl %eax, 0x715c(%rip)      # 0x123cc
movl 0x7156(%rip), %eax      # 0x123cc
cmpl 0x6fac(%rip), %eax      # 0x12228
jbe 0xb2bd
jmp 0xb280
movl 0x6fa2(%rip), %esi      # 0x12228
leaq 0x502f(%rip), %rdi      # 0x102bc
movb $0x0, %al
callq 0x2030
cmpq $0x0, 0x703c(%rip)      # 0x122d8
je 0xb2b9
movq 0x7033(%rip), %rdi      # 0x122d8
movl 0x6f7d(%rip), %edx      # 0x12228
leaq 0x500a(%rip), %rsi      # 0x102bc
movb $0x0, %al
callq 0x22d0
jmp 0xb2bb
jmp 0xb2bd
jmp 0xb2bf
jmp 0xb2c1
cmpl $0x0, -0x24(%rbp)
jne 0xb2d5
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x8570
jmp 0xb2d7
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xad6a
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)