// File: /workspace/github_c_makefile_star2_O0/mabdi[P]bunney/bunny-flow.c
// Function: get_data
static _u8* get_data(_u32 position, _u32 len,_u8* where) {
  _u32 f, roff;
      
  if (!where) {
    where = malloc(len);
    if (!where) fatal("out of memory");
  }

  if (!len) return where;

  /* Absolutely no data left? Just return zeros */ 
  if (!cur_fuzzable) {
    memset(where, 0, len);
    return where;
  }

  /* Otherwise, just wrap the address space */
  position %= cur_fuzzable;
  
  f = lookup_file(position, 1, &roff);
  load_data(f);
  
  /* Can it be done in a single read? */
  if (roff + len <= infile[f].cur_len) {
    memcpy(where,infile[f].data + roff, len);
  /* Multiple reads needed */
  } else {
    _u32 cancopy = infile[f].cur_len - roff;
    memcpy(where,infile[f].data + roff, cancopy);
    position += cancopy;
    len -= cancopy;
    get_data(position, len, where + cancopy);
  }
  
  return where;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3f50
movl -0x10(%rbp), %eax
movl %eax, %edi
callq 0x1190
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3f4e
jmp 0x3f00
movq 0x30d9(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x1309(%rip), %rsi      # 0x521a
movb $0x0, %al
callq 0x11b0
movq 0x30c1(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x1113(%rip), %rsi      # 0x503c
leaq 0x163e(%rip), %rdx      # 0x556e
leaq 0x111a(%rip), %rcx      # 0x5051
movl $0xee, %r8d
movb $0x0, %al
callq 0x11b0
movl $0x1, %edi
callq 0x1180
jmp 0x3f50
cmpl $0x0, -0x10(%rbp)
jne 0x3f63
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4070
cmpl $0x0, 0x423a(%rip)      # 0x81a4
jne 0x3f89
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x10c0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4070
movl 0x4215(%rip), %ecx      # 0x81a4
movl -0xc(%rbp), %eax
xorl %edx, %edx
divl %ecx
movl %edx, -0xc(%rbp)
movl -0xc(%rbp), %edi
movl $0x1, %esi
leaq -0x20(%rbp), %rdx
callq 0x39b0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3b00
movl -0x20(%rbp), %eax
addl -0x10(%rbp), %eax
movq 0x41d6(%rip), %rcx      # 0x8198
movl -0x1c(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
ja 0x3ffc
movq -0x18(%rbp), %rdi
movq 0x41bc(%rip), %rax      # 0x8198
movl -0x1c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
movl -0x20(%rbp), %eax
addq %rax, %rsi
movl -0x10(%rbp), %eax
movl %eax, %edx
callq 0x10e0
jmp 0x4068
movq 0x4195(%rip), %rax      # 0x8198
movl -0x1c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
subl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rdi
movq 0x4177(%rip), %rax      # 0x8198
movl -0x1c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
movl -0x20(%rbp), %eax
addq %rax, %rsi
movl -0x24(%rbp), %eax
movl %eax, %edx
callq 0x10e0
movl -0x24(%rbp), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x24(%rbp), %ecx
movl -0x10(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x24(%rbp), %eax
addq %rax, %rdx
callq 0x3ed0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)