// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-gcc.c
// Function: wait_execvp
static void wait_execvp(_u8* path, _u8** argv) {
  _s32 pid, st;
  
  if (getenv("BUNNY_EXEC")) {    
    _u32 i = 0;
    debug(">> EXEC");
    while (argv[i]) debug(" %s",argv[i++]);
    debug("\n");
  }
  
  pid = fork();
  if (pid < 0) fatal("unable to spawn a process");
  
  if (!pid) {
    argv[0] = path;
    execvp(path,(char**)argv);
    pfatal("unable to invoke gcc (set $BUNNY_GCC)");
  } else {

    if (waitpid(pid,&st,0) != pid) pfatal("waitpid() fails?");
    
    if (WIFSIGNALED(st)) fatal("gcc died on signal %u",WTERMSIG(st));
    else if (WEXITSTATUS(st))
      fatal("gcc error (exit code %u)",WEXITSTATUS(st));
  }
  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x163a(%rip), %rdi      # 0x53b7
callq 0x11b0
testq %rax, %rax
jne 0x3dee
callq 0x1060
testl %eax, %eax
js 0x3e41
je 0x3e80
movl %eax, %ebp
leaq 0xc(%rsp), %rsi
movl %eax, %edi
xorl %edx, %edx
callq 0x1100
cmpl %ebp, %eax
jne 0x3eca
movl 0xc(%rsp), %edx
movl %edx, %eax
andl $0x7f, %eax
movl %eax, %ecx
shll $0x18, %ecx
addl $0x1000000, %ecx        # imm = 0x1000000
cmpl $0x2000000, %ecx        # imm = 0x2000000
jge 0x3f19
shrl $0x8, %edx
andl $0xff, %edx
jne 0x3f53
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x51eb(%rip), %r12      # 0x8fe0
movq (%r12), %rcx
leaq 0x15c2(%rip), %rdi      # 0x53c2
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x1230
leaq 0x16ee(%rip), %r15      # 0x5500
xorl %ebp, %ebp
movl %ebp, %eax
movq (%rbx,%rax,8), %rdx
movq (%r12), %rsi
testq %rdx, %rdx
je 0x3e34
incl %ebp
movq %rsi, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x11e0
jmp 0x3e14
pushq $0xa
popq %rdi
callq 0x11c0
jmp 0x3d87
movq 0x5198(%rip), %rbx      # 0x8fe0
movq (%rbx), %rcx
leaq 0x1578(%rip), %rdi      # 0x53ca
pushq $0x30
popq %rsi
pushq $0x1
popq %rdx
callq 0x1230
movq (%rbx), %rdi
leaq 0x1376(%rip), %rsi      # 0x51dd
leaq 0x158d(%rip), %rdx      # 0x53fb
leaq 0x1385(%rip), %rcx      # 0x51fa
movl $0xff, %r8d
jmp 0x3f89
movq %r14, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10f0
movq 0x514b(%rip), %rbx      # 0x8fe0
movq (%rbx), %rcx
leaq 0x1568(%rip), %rdi      # 0x5407
pushq $0x3b
popq %rsi
pushq $0x1
popq %rdx
callq 0x1230
movq (%rbx), %rdi
leaq 0x1329(%rip), %rsi      # 0x51dd
leaq 0x1540(%rip), %rdx      # 0x53fb
leaq 0x1338(%rip), %rcx      # 0x51fa
movl $0x104, %r8d            # imm = 0x104
jmp 0x3f04
movq 0x510f(%rip), %rbx      # 0x8fe0
movq (%rbx), %rcx
leaq 0x1578(%rip), %rdi      # 0x5453
pushq $0x26
popq %rsi
pushq $0x1
popq %rdx
callq 0x1230
movq (%rbx), %rdi
leaq 0x12ed(%rip), %rsi      # 0x51dd
leaq 0x1504(%rip), %rdx      # 0x53fb
leaq 0x12fc(%rip), %rcx      # 0x51fa
movl $0x107, %r8d            # imm = 0x107
xorl %eax, %eax
callq 0x11e0
leaq 0x1531(%rip), %rdi      # 0x5443
callq 0x1110
jmp 0x3f90
movq 0x50c0(%rip), %rbx      # 0x8fe0
movq (%rbx), %rdi
leaq 0x1550(%rip), %rsi      # 0x547a
movl %eax, %edx
xorl %eax, %eax
callq 0x11e0
movq (%rbx), %rdi
leaq 0x12a0(%rip), %rsi      # 0x51dd
leaq 0x14b7(%rip), %rdx      # 0x53fb
leaq 0x12af(%rip), %rcx      # 0x51fa
movl $0x109, %r8d            # imm = 0x109
jmp 0x3f89
movq 0x5086(%rip), %rbx      # 0x8fe0
movq (%rbx), %rdi
leaq 0x1543(%rip), %rsi      # 0x54a7
xorl %eax, %eax
callq 0x11e0
movq (%rbx), %rdi
leaq 0x1268(%rip), %rsi      # 0x51dd
leaq 0x147f(%rip), %rdx      # 0x53fb
leaq 0x1277(%rip), %rcx      # 0x51fa
movl $0x10b, %r8d            # imm = 0x10B
xorl %eax, %eax
callq 0x11e0
pushq $0x1
popq %rdi
callq 0x11a0