// File: /workspace/github_c_makefile_star2_O3/silverneko[P]miku/isolate/isolate.c
// Function: run
static void
run(char **argv)
{
  if (!dir_exists("box"))
    die("Box directory not found, did you run `isolate --init'?");

  chowntree("box", box_uid, box_gid);
  cleanup_ownership = 1;

  if (pipe(error_pipes) < 0)
    die("pipe: %m");
  for (int i=0; i<2; i++)
    if (fcntl(error_pipes[i], F_SETFD, fcntl(error_pipes[i], F_GETFD) | FD_CLOEXEC) < 0 ||
        fcntl(error_pipes[i], F_SETFL, fcntl(error_pipes[i], F_GETFL) | O_NONBLOCK) < 0)
      die("fcntl on pipe: %m");

  box_pid = clone(
    box_inside,			// Function to execute as the body of the new process
    argv,			// Pass our stack
    SIGCHLD | CLONE_NEWIPC | CLONE_NEWNET | CLONE_NEWNS | CLONE_NEWPID,
    argv);			// Pass the arguments
  if (box_pid < 0)
    die("clone: %m");
  if (!box_pid)
    die("clone returned 0");
  box_keeper();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x538, %rsp            # imm = 0x538
movq %rdi, %rbx
leaq 0x1fa3(%rip), %rdi      # 0x53b9
leaq 0x130(%rsp), %rsi
callq 0x2320
testl %eax, %eax
js 0x3495
movl $0xf000, %eax           # imm = 0xF000
andl 0x148(%rsp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x3495
movl 0x6048(%rip), %eax      # 0x9488
movl 0x6046(%rip), %ecx      # 0x948c
movl %eax, 0x6034(%rip)      # 0x9480
movl %ecx, 0x6032(%rip)      # 0x9484
leaq 0x1f60(%rip), %rdi      # 0x53b9
leaq 0xd92(%rip), %rsi       # 0x41f2
movl $0x20, %edx
movl $0x3, %ecx
callq 0x2050
movb $0x1, 0x5ede(%rip)      # 0x9354
leaq 0x6413(%rip), %r14      # 0x9890
movq %r14, %rdi
callq 0x22a0
testl %eax, %eax
jns 0x34a1
leaq 0x256c(%rip), %rdi      # 0x59fc
jmp 0x3540
leaq 0x2520(%rip), %rdi      # 0x59bc
jmp 0x3540
movb $0x1, %r15b
xorl %r12d, %r12d
movl (%r14,%r12,4), %ebp
movl %ebp, %edi
movl $0x1, %esi
xorl %eax, %eax
callq 0x2110
orl $0x1, %eax
movl %ebp, %edi
movl $0x2, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x3539
movl (%r14,%r12,4), %ebp
movl %ebp, %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x2110
orl $0x800, %eax            # imm = 0x800
movl %ebp, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x3539
movl $0x1, %r12d
testb $0x1, %r15b
movl $0x0, %r15d
jne 0x34a7
leaq 0xfa4(%rip), %rdi       # 0x44b8
movq %rbx, %rsi
movl $0x68020011, %edx       # imm = 0x68020011
movq %rbx, %rcx
xorl %eax, %eax
callq 0x20e0
movl %eax, 0x5e24(%rip)      # 0x9350
testl %eax, %eax
jns 0x3547
leaq 0x24ce(%rip), %rdi      # 0x5a05
jmp 0x3540
leaq 0x24b3(%rip), %rdi      # 0x59f3
xorl %eax, %eax
callq 0x2d7f
jne 0x3552
leaq 0x24bf(%rip), %rdi      # 0x5a0f
jmp 0x3540
movl 0x6338(%rip), %eax      # 0x9890
movl %eax, 0x633a(%rip)      # 0x9898
movl 0x6330(%rip), %edi      # 0x9894
callq 0x2280
leaq 0x98(%rsp), %rbx
movl $0x98, %esi
movq %rbx, %rdi
callq 0x2420
leaq 0x172a(%rip), %rax      # 0x4caf
movq %rax, (%rbx)
movl $0x2, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x20d0
leaq 0x5ed2(%rip), %rdi      # 0x9470
xorl %esi, %esi
callq 0x2230
movl $0x2, %edi
callq 0x2430
movl %eax, 0x5daf(%rip)      # 0x9364
testl %eax, %eax
jg 0x35c5
leaq 0x26e4(%rip), %rdi      # 0x5ca4
jmp 0x3540
movl 0x5d45(%rip), %eax      # 0x9310
orl 0x5d37(%rip), %eax      # 0x9308
je 0x35fb
leaq 0x16f7(%rip), %rax      # 0x4cd1
leaq 0x98(%rsp), %rsi
movq %rax, (%rsi)
movl $0xe, %edi
xorl %edx, %edx
callq 0x20d0
movl $0x1, %edi
callq 0x2270
leaq 0x4(%rsp), %rbx
leaq 0x8(%rsp), %r14
movq 0x59ec(%rip), %r13      # 0x8ff8
leaq 0x27f4(%rip), %r15      # 0x5e07
leaq 0x27d1(%rip), %r12      # 0x5deb
cmpl $0x0, 0x627b(%rip)      # 0x989c
je 0x367f
cmpl $0x0, 0x5ce6(%rip)      # 0x9310
je 0x3646
callq 0x3fe5
cmpl 0x5cd9(%rip), %eax      # 0x9310
jg 0x381b
cmpl $0x2, 0x5cc8(%rip)      # 0x930c
jge 0x36b8
cmpl $0x0, 0x5cbb(%rip)      # 0x9308
je 0x3675
xorl %edi, %edi
callq 0x3de3
movl %eax, %ebp
cmpl $0x2, 0x5cad(%rip)      # 0x930c
jge 0x36a6
cmpl 0x5ca1(%rip), %ebp      # 0x9308
jle 0x3675
cmpl 0x5ca5(%rip), %ebp      # 0x9314
jg 0x3772
movl $0x0, 0x621d(%rip)      # 0x989c
movl 0x5ccb(%rip), %edi      # 0x9350
movq %rbx, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x23f0
testl %eax, %eax
jns 0x36cd
callq 0x2060
cmpl $0x4, (%rax)
je 0x361a
jmp 0x371e
movq (%r13), %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2300
jmp 0x3661
movq (%r13), %rdi
movq %r12, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x2300
jmp 0x3646
cmpl 0x5c7d(%rip), %eax      # 0x9350
jne 0x372a
movl $0x0, 0x5c71(%rip)      # 0x9350
movl 0x61b3(%rip), %edi      # 0x9898
leaq 0x130(%rsp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x22c0
testl %eax, %eax
jle 0x373a
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movb $0x0, 0x130(%rsp,%rax)
leaq 0x20df(%rip), %rdi      # 0x57ee
leaq 0x130(%rsp), %rsi
xorl %eax, %eax
callq 0x2d7f
leaq 0x2596(%rip), %rdi      # 0x5cbb
jmp 0x3540
leaq 0x2594(%rip), %rdi      # 0x5cc5
movl %eax, %esi
xorl %eax, %eax
callq 0x2d7f
movl 0x4(%rsp), %eax
movl %eax, %ecx
andl $0x7f, %ecx
jne 0x377e
leaq 0x8(%rsp), %rdi
callq 0x3c95
movzbl 0x5(%rsp), %esi
testl %esi, %esi
jne 0x37bb
movl 0x5baa(%rip), %eax      # 0x9308
testl %eax, %eax
je 0x3809
cmpl %eax, 0x5bec(%rip)      # 0x9358
jle 0x3809
leaq 0x2597(%rip), %rdi      # 0x5d10
jmp 0x3822
movl %ecx, %edx
shll $0x18, %edx
addl $0x1000000, %edx        # imm = 0x1000000
cmpl $0x2000000, %edx        # imm = 0x2000000
jl 0x37d7
leaq 0x25de(%rip), %rdi      # 0x5d76
movl %ecx, %esi
xorl %eax, %eax
callq 0x3b16
leaq 0x8(%rsp), %rdi
callq 0x3c95
movl 0x4(%rsp), %esi
andl $0x7f, %esi
leaq 0x25c9(%rip), %rdi      # 0x5d82
jmp 0x3802
leaq 0x2521(%rip), %rdi      # 0x5ce3
xorl %eax, %eax
callq 0x3b16
movzbl 0x5(%rsp), %esi
leaq 0x251b(%rip), %rdi      # 0x5cf0
jmp 0x3802
cmpb $0x7f, %al
jne 0x3829
movzbl %ah, %esi
leaq 0x2591(%rip), %rdi      # 0x5d76
xorl %eax, %eax
callq 0x3b16
leaq 0x8(%rsp), %rdi
callq 0x3c95
movzbl 0x5(%rsp), %esi
leaq 0x259b(%rip), %rdi      # 0x5d9d
xorl %eax, %eax
callq 0x4ce5
movl 0x5b01(%rip), %eax      # 0x9310
testl %eax, %eax
je 0x3835
cmpl %eax, 0x5b43(%rip)      # 0x935c
jle 0x3835
leaq 0x2506(%rip), %rdi      # 0x5d28
xorl %eax, %eax
callq 0x4ce5
leaq 0x2586(%rip), %rdi      # 0x5db6
jmp 0x3731
callq 0x3ae9
movq (%r13), %rdi
movslq 0x5b13(%rip), %rcx      # 0x9358
imulq $0x10624dd3, %rcx, %rdx # imm = 0x10624DD3
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x26, %rdx
addl %eax, %edx
imull $0x3e8, %edx, %eax      # imm = 0x3E8
subl %eax, %ecx
movslq 0x5af4(%rip), %r9       # 0x935c
imulq $0x10624dd3, %r9, %r8   # imm = 0x10624DD3
movq %r8, %rax
shrq $0x3f, %rax
sarq $0x26, %r8
addl %eax, %r8d
imull $0x3e8, %r8d, %eax      # imm = 0x3E8
subl %eax, %r9d
leaq 0x24bf(%rip), %rsi      # 0x5d4d
xorl %eax, %eax
callq 0x2300
xorl %edi, %edi
callq 0x3bb5