// File: /workspace/github_c_makefile_star2_O0/mabdi[P]bunney/bunny-flow.c
// Function: remove_data
static void remove_data(_u32 position, _u32 len) {
  _u32 f, roff;

  if (!len) return;

  f = lookup_file(position, 1, &roff);
  load_data(f);
  
  if (roff == infile[f].cur_len) return; /* EOF already */

  infile[f].dirty = 1;
  
  /* Can remove in one operation? */
  if (roff + len <= infile[f].cur_len) {
    if (roff + len < infile[f].cur_len)
      memmove(infile[f].data + roff, infile[f].data + roff + len, infile[f].cur_len - roff);

    infile[f].data = myrealloc(infile[f].data, infile[f].cur_len - len);

    if (!infile[f].data) fatal("out of memory");
    infile[f].cur_len -= len;
    cur_fuzzable -= len;
  } else {
    _u32 candel = infile[f].cur_len - roff;
    /* Remove everything to EOF, repeat */
    infile[f].data = myrealloc(infile[f].data, roff);
    if (!infile[f].data) fatal("out of memory");
    cur_fuzzable -= candel;
    infile[f].cur_len = roff;
    remove_data(position, len - candel);
  }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x2f29
jmp 0x31e0
movl -0x4(%rbp), %edi
movl $0x1, %esi
leaq -0x10(%rbp), %rdx
callq 0x39b0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %edi
callq 0x3b00
movl -0x10(%rbp), %eax
movq 0x5249(%rip), %rcx      # 0x8198
movl -0xc(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
jne 0x2f63
jmp 0x31e0
movq 0x522e(%rip), %rax      # 0x8198
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movb $0x1, 0x1c(%rax)
movl -0x10(%rbp), %eax
addl -0x8(%rbp), %eax
movq 0x5213(%rip), %rcx      # 0x8198
movl -0xc(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
ja 0x30f3
movl -0x10(%rbp), %eax
addl -0x8(%rbp), %eax
movq 0x51f3(%rip), %rcx      # 0x8198
movl -0xc(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
jae 0x3010
movq 0x51dd(%rip), %rax      # 0x8198
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movl -0x10(%rbp), %eax
addq %rax, %rdi
movq 0x51c2(%rip), %rax      # 0x8198
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
movl -0x10(%rbp), %eax
addq %rax, %rsi
movl -0x8(%rbp), %eax
addq %rax, %rsi
movq 0x51a1(%rip), %rax      # 0x8198
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
subl -0x10(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x1240
movq 0x5181(%rip), %rax      # 0x8198
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq 0x516c(%rip), %rax      # 0x8198
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %esi
subl -0x8(%rbp), %esi
callq 0x3ea0
movq %rax, %rcx
movq 0x514d(%rip), %rax      # 0x8198
movl -0xc(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq 0x5138(%rip), %rax      # 0x8198
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0x30c1
jmp 0x3073
movq 0x3f66(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x2196(%rip), %rsi      # 0x521a
movb $0x0, %al
callq 0x11b0
movq 0x3f4e(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x1fa0(%rip), %rsi      # 0x503c
leaq 0x24bf(%rip), %rdx      # 0x5562
leaq 0x1fa7(%rip), %rcx      # 0x5051
movl $0x159, %r8d            # imm = 0x159
movb $0x0, %al
callq 0x11b0
movl $0x1, %edi
callq 0x1180
movl -0x8(%rbp), %edx
movq 0x50cd(%rip), %rax      # 0x8198
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x18(%rax)
movl -0x8(%rbp), %ecx
movl 0x50be(%rip), %eax      # 0x81a4
subl %ecx, %eax
movl %eax, 0x50b6(%rip)      # 0x81a4
jmp 0x31e0
movq 0x509e(%rip), %rax      # 0x8198
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
subl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movq 0x5084(%rip), %rax      # 0x8198
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movl -0x10(%rbp), %esi
callq 0x3ea0
movq %rax, %rcx
movq 0x5064(%rip), %rax      # 0x8198
movl -0xc(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq 0x504f(%rip), %rax      # 0x8198
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0x31aa
jmp 0x315c
movq 0x3e7d(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x20ad(%rip), %rsi      # 0x521a
movb $0x0, %al
callq 0x11b0
movq 0x3e65(%rip), %rax      # 0x6fe0
movq (%rax), %rdi
leaq 0x1eb7(%rip), %rsi      # 0x503c
leaq 0x23d6(%rip), %rdx      # 0x5562
leaq 0x1ebe(%rip), %rcx      # 0x5051
movl $0x160, %r8d            # imm = 0x160
movb $0x0, %al
callq 0x11b0
movl $0x1, %edi
callq 0x1180
movl -0x14(%rbp), %ecx
movl 0x4ff1(%rip), %eax      # 0x81a4
subl %ecx, %eax
movl %eax, 0x4fe9(%rip)      # 0x81a4
movl -0x10(%rbp), %ecx
movq 0x4fd3(%rip), %rax      # 0x8198
movl -0xc(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
subl -0x14(%rbp), %esi
callq 0x2f10
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)