// File: /workspace/github_c_makefile_star2_O0/mabdi[P]bunney/bunny-flow.c
// Function: insert_data
static void insert_data(_u32 position, _u32 len, _u8* buf) {
  _u32 f, roff;
  
  if (!len) return;

  /* set_data() will wrap otherwise... but accept EOF */
  if (position > cur_fuzzable) position = cur_fuzzable;
  
  f = lookup_file(position, 0, &roff);
  load_data(f);

  infile[f].dirty = 1;  
  
  infile[f].data = realloc(infile[f].data, infile[f].cur_len + len);
  if (!infile[f].data) fatal("out of memory");

  if (roff != infile[f].cur_len)
    memmove(infile[f].data + roff + len, infile[f].data + roff, infile[f].cur_len - roff);

  infile[f].cur_len += len;
  cur_fuzzable += len;
  
  set_data(position,len,buf);    
  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x41bd
jmp 0x4361
movl -0x4(%rbp), %eax
cmpl 0x3fde(%rip), %eax      # 0x81a4
jbe 0x41d1
movl 0x3fd6(%rip), %eax      # 0x81a4
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %edi
xorl %esi, %esi
leaq -0x18(%rbp), %rdx
callq 0x39b0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edi
callq 0x3b00
movq 0x3fa7(%rip), %rax      # 0x8198
movl -0x14(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movb $0x1, 0x1c(%rax)
movq 0x3f92(%rip), %rax      # 0x8198
movl -0x14(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq 0x3f7d(%rip), %rax      # 0x8198
movl -0x14(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
addl -0x8(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x1250
movq %rax, %rcx
movq 0x3f5a(%rip), %rax      # 0x8198
movl -0x14(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq 0x3f45(%rip), %rax      # 0x8198
movl -0x14(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0x42b4
jmp 0x4266
movq 0x2d73(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0xfa3(%rip), %rsi       # 0x521a
movb $0x0, %al
callq 0x11b0
movq 0x2d5b(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0xdad(%rip), %rsi       # 0x503c
leaq 0x12e1(%rip), %rdx      # 0x5577
leaq 0xdb4(%rip), %rcx       # 0x5051
movl $0x138, %r8d            # imm = 0x138
movb $0x0, %al
callq 0x11b0
movl $0x1, %edi
callq 0x1180
movl -0x18(%rbp), %eax
movq 0x3eda(%rip), %rcx      # 0x8198
movl -0x14(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
je 0x4329
movq 0x3ec4(%rip), %rax      # 0x8198
movl -0x14(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movl -0x18(%rbp), %eax
addq %rax, %rdi
movl -0x8(%rbp), %eax
addq %rax, %rdi
movq 0x3ea3(%rip), %rax      # 0x8198
movl -0x14(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
movl -0x18(%rbp), %eax
addq %rax, %rsi
movq 0x3e88(%rip), %rax      # 0x8198
movl -0x14(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
subl -0x18(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x1240
movl -0x8(%rbp), %ecx
movq 0x3e65(%rip), %rax      # 0x8198
movl -0x14(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rax
addl 0x18(%rax), %ecx
movl %ecx, 0x18(%rax)
movl -0x8(%rbp), %eax
addl 0x3e58(%rip), %eax      # 0x81a4
movl %eax, 0x3e52(%rip)      # 0x81a4
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
callq 0x4080
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)