// File: /workspace/github_c_makefile_star2_O0/mabdi[P]bunney/bunny-gcc.c
// Function: dump_code
static void dump_code(void) {
  _u32 fno;

  if (output_file) {
    debug("[bunny] STAGE 3/3: Dumping modified source to '%s'...\n",output_file);
  } else {      
    debug("[bunny] STAGE 3/3: Dumping modified source to stdout...\n");
  }
  
  for (fno=0;fno<used_files.c;fno++) {
    _u8  cbuf[1024], fname[128];
    _s32 fin, fout, i;
    
    sprintf(fname,".bunny-%x-%u-f.i",mypid,fno);
    
    if (output_file) {
       unlink(output_file);
       fout = open(output_file, O_CREAT | O_EXCL | O_WRONLY, 0600);
       if (fout < 0) pfatal("unable to create '%s'",output_file);
    } else fout = 1;
    
    fin = open(fname, O_RDONLY);
    if (!fin) pfatal("unable to read '%s'",fname);
    
    while ((i=read(fin,cbuf,sizeof(cbuf))) > 0) write(fout,cbuf,i);
    
    close(fin);
    if (output_file) close(fout);
    
    if (!getenv("BUNNY_KEEPTEMP")) unlink(fname);
  }      
  
  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4a0, %rsp            # imm = 0x4A0
cmpq $0x0, 0x5c85(%rip)      # 0xb178
je 0x5516
movq 0x5ae4(%rip), %rax      # 0xafe0
movq (%rax), %rdi
movq 0x5c72(%rip), %rdx      # 0xb178
leaq 0x36f4(%rip), %rsi      # 0x8c01
movb $0x0, %al
callq 0x11c0
jmp 0x552e
movq 0x5ac3(%rip), %rax      # 0xafe0
movq (%rax), %rdi
leaq 0x3711(%rip), %rsi      # 0x8c38
movb $0x0, %al
callq 0x11c0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x5c4a(%rip), %eax      # 0xb188
jae 0x5721
leaq -0x490(%rbp), %rdi
movl 0x5bff(%rip), %edx      # 0xb150
movl -0x4(%rbp), %ecx
leaq 0x1d8a(%rip), %rsi      # 0x72e5
movb $0x0, %al
callq 0x1040
cmpq $0x0, 0x5c0e(%rip)      # 0xb178
je 0x5608
movq 0x5c01(%rip), %rdi      # 0xb178
callq 0x1090
movq 0x5bf5(%rip), %rdi      # 0xb178
movl $0xc1, %esi
movl $0x180, %edx            # imm = 0x180
movb $0x0, %al
callq 0x10e0
movl %eax, -0x498(%rbp)
cmpl $0x0, -0x498(%rbp)
jge 0x5606
jmp 0x55a5
movq 0x5a34(%rip), %rax      # 0xafe0
movq (%rax), %rdi
movq 0x5bc2(%rip), %rdx      # 0xb178
leaq 0x36b4(%rip), %rsi      # 0x8c71
movb $0x0, %al
callq 0x11c0
movq 0x5a15(%rip), %rax      # 0xafe0
movq (%rax), %rdi
leaq 0x1c08(%rip), %rsi      # 0x71dd
leaq 0x36c1(%rip), %rdx      # 0x8c9d
leaq 0x1c17(%rip), %rcx      # 0x71fa
movl $0x3ad, %r8d            # imm = 0x3AD
movb $0x0, %al
callq 0x11c0
leaq 0x1e4c(%rip), %rdi      # 0x7443
callq 0x1110
movl $0x1, %edi
callq 0x1190
jmp 0x5612
movl $0x1, -0x498(%rbp)
leaq -0x490(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x10e0
movl %eax, -0x494(%rbp)
cmpl $0x0, -0x494(%rbp)
jne 0x5694
jmp 0x5633
movq 0x59a6(%rip), %rax      # 0xafe0
movq (%rax), %rdi
leaq -0x490(%rbp), %rdx
leaq 0x365c(%rip), %rsi      # 0x8ca7
movb $0x0, %al
callq 0x11c0
movq 0x5987(%rip), %rax      # 0xafe0
movq (%rax), %rdi
leaq 0x1b7a(%rip), %rsi      # 0x71dd
leaq 0x3633(%rip), %rdx      # 0x8c9d
leaq 0x1b89(%rip), %rcx      # 0x71fa
movl $0x3b1, %r8d            # imm = 0x3B1
movb $0x0, %al
callq 0x11c0
leaq 0x1dbe(%rip), %rdi      # 0x7443
callq 0x1110
movl $0x1, %edi
callq 0x1190
jmp 0x5696
movl -0x494(%rbp), %edi
leaq -0x410(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x11d0
movl %eax, -0x49c(%rbp)
cmpl $0x0, %eax
jle 0x56d3
movl -0x498(%rbp), %edi
leaq -0x410(%rbp), %rsi
movslq -0x49c(%rbp), %rdx
callq 0x1070
jmp 0x5696
movl -0x494(%rbp), %edi
callq 0x1230
cmpq $0x0, 0x5a92(%rip)      # 0xb178
je 0x56f3
movl -0x498(%rbp), %edi
callq 0x1230
leaq 0x1e17(%rip), %rdi      # 0x7511
callq 0x11a0
cmpq $0x0, %rax
jne 0x5711
leaq -0x490(%rbp), %rdi
callq 0x1090
jmp 0x5713
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x5535
addq $0x4a0, %rsp            # imm = 0x4A0
popq %rbp
retq
nopw (%rax,%rax)