// File: /workspace/github_c_makefile_star2_O1/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 0x1f71(%rip), %rdi      # 0x53be
leaq 0x130(%rsp), %rsi
callq 0x2320
testl %eax, %eax
js 0x34cc
movl $0xf000, %eax           # imm = 0xF000
andl 0x148(%rsp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x34cc
movl 0x6011(%rip), %eax      # 0x9488
movl 0x600f(%rip), %ecx      # 0x948c
movl %eax, 0x5ffd(%rip)      # 0x9480
movl %ecx, 0x5ffb(%rip)      # 0x9484
leaq 0x1f2e(%rip), %rdi      # 0x53be
leaq 0xd8a(%rip), %rsi       # 0x4221
movl $0x20, %edx
movl $0x3, %ecx
callq 0x2050
movb $0x1, 0x5ea7(%rip)      # 0x9354
leaq 0x63dc(%rip), %r14      # 0x9890
movq %r14, %rdi
callq 0x22a0
testl %eax, %eax
jns 0x34d8
leaq 0x253a(%rip), %rdi      # 0x5a01
jmp 0x356c
leaq 0x24ee(%rip), %rdi      # 0x59c1
jmp 0x356c
xorl %r15d, %r15d
movl (%r15,%r14), %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 0x3565
movl (%r15,%r14), %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 0x3565
addq $0x4, %r15
cmpq $0x4, %r15
je 0x34db
leaq 0xfa7(%rip), %rdi       # 0x44e7
movq %rbx, %rsi
movl $0x68020011, %edx       # imm = 0x68020011
movq %rbx, %rcx
xorl %eax, %eax
callq 0x20e0
movl %eax, 0x5df8(%rip)      # 0x9350
testl %eax, %eax
jns 0x3573
leaq 0x24a7(%rip), %rdi      # 0x5a0a
jmp 0x356c
leaq 0x248c(%rip), %rdi      # 0x59f8
xorl %eax, %eax
callq 0x2de4
jne 0x357e
leaq 0x2498(%rip), %rdi      # 0x5a14
jmp 0x356c
movl 0x630c(%rip), %eax      # 0x9890
movl %eax, 0x630e(%rip)      # 0x9898
movl 0x6304(%rip), %edi      # 0x9894
callq 0x2280
leaq 0x98(%rsp), %rbx
movl $0x98, %esi
movq %rbx, %rdi
callq 0x2420
leaq 0x1788(%rip), %rax      # 0x4d39
movq %rax, (%rbx)
movl $0x2, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x20d0
leaq 0x5ea6(%rip), %rdi      # 0x9470
xorl %esi, %esi
callq 0x2230
movl $0x2, %edi
callq 0x2430
movl %eax, 0x5d83(%rip)      # 0x9364
testl %eax, %eax
jg 0x35f1
leaq 0x26bb(%rip), %rdi      # 0x5ca7
jmp 0x356c
movl 0x5d19(%rip), %eax      # 0x9310
orl 0x5d0b(%rip), %eax      # 0x9308
je 0x3627
leaq 0x1755(%rip), %rax      # 0x4d5b
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 0x59c0(%rip), %r13      # 0x8ff8
leaq 0x27cb(%rip), %r15      # 0x5e0a
leaq 0x27a8(%rip), %r12      # 0x5dee
cmpl $0x0, 0x624f(%rip)      # 0x989c
je 0x36ab
cmpl $0x0, 0x5cba(%rip)      # 0x9310
je 0x3672
callq 0x4014
cmpl 0x5cad(%rip), %eax      # 0x9310
jg 0x3847
cmpl $0x2, 0x5c9c(%rip)      # 0x930c
jge 0x36e4
cmpl $0x0, 0x5c8f(%rip)      # 0x9308
je 0x36a1
xorl %edi, %edi
callq 0x3e11
movl %eax, %ebp
cmpl $0x2, 0x5c81(%rip)      # 0x930c
jge 0x36d2
cmpl 0x5c75(%rip), %ebp      # 0x9308
jle 0x36a1
cmpl 0x5c79(%rip), %ebp      # 0x9314
jg 0x379e
movl $0x0, 0x61f1(%rip)      # 0x989c
movl 0x5c9f(%rip), %edi      # 0x9350
movq %rbx, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x23f0
testl %eax, %eax
jns 0x36f9
callq 0x2060
cmpl $0x4, (%rax)
je 0x3646
jmp 0x374a
movq (%r13), %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2300
jmp 0x368d
movq (%r13), %rdi
movq %r12, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x2300
jmp 0x3672
cmpl 0x5c51(%rip), %eax      # 0x9350
jne 0x3756
movl $0x0, 0x5c45(%rip)      # 0x9350
movl 0x6187(%rip), %edi      # 0x9898
leaq 0x130(%rsp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x22c0
testl %eax, %eax
jle 0x3766
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movb $0x0, 0x130(%rsp,%rax)
leaq 0x20b8(%rip), %rdi      # 0x57f3
leaq 0x130(%rsp), %rsi
xorl %eax, %eax
callq 0x2de4
leaq 0x256d(%rip), %rdi      # 0x5cbe
jmp 0x356c
leaq 0x256b(%rip), %rdi      # 0x5cc8
movl %eax, %esi
xorl %eax, %eax
callq 0x2de4
movl 0x4(%rsp), %eax
movl %eax, %ecx
andl $0x7f, %ecx
jne 0x37aa
leaq 0x8(%rsp), %rdi
callq 0x3cc3
movzbl 0x5(%rsp), %esi
testl %esi, %esi
jne 0x37e7
movl 0x5b7e(%rip), %eax      # 0x9308
testl %eax, %eax
je 0x3835
cmpl %eax, 0x5bc0(%rip)      # 0x9358
jle 0x3835
leaq 0x256e(%rip), %rdi      # 0x5d13
jmp 0x384e
movl %ecx, %edx
shll $0x18, %edx
addl $0x1000000, %edx        # imm = 0x1000000
cmpl $0x2000000, %edx        # imm = 0x2000000
jl 0x3803
leaq 0x25b5(%rip), %rdi      # 0x5d79
movl %ecx, %esi
xorl %eax, %eax
callq 0x3b44
leaq 0x8(%rsp), %rdi
callq 0x3cc3
movl 0x4(%rsp), %esi
andl $0x7f, %esi
leaq 0x25a0(%rip), %rdi      # 0x5d85
jmp 0x382e
leaq 0x24f8(%rip), %rdi      # 0x5ce6
xorl %eax, %eax
callq 0x3b44
movzbl 0x5(%rsp), %esi
leaq 0x24f2(%rip), %rdi      # 0x5cf3
jmp 0x382e
cmpb $0x7f, %al
jne 0x3855
movzbl %ah, %esi
leaq 0x2568(%rip), %rdi      # 0x5d79
xorl %eax, %eax
callq 0x3b44
leaq 0x8(%rsp), %rdi
callq 0x3cc3
movzbl 0x5(%rsp), %esi
leaq 0x2572(%rip), %rdi      # 0x5da0
xorl %eax, %eax
callq 0x4d6f
movl 0x5ad5(%rip), %eax      # 0x9310
testl %eax, %eax
je 0x3861
cmpl %eax, 0x5b17(%rip)      # 0x935c
jle 0x3861
leaq 0x24dd(%rip), %rdi      # 0x5d2b
xorl %eax, %eax
callq 0x4d6f
leaq 0x255d(%rip), %rdi      # 0x5db9
jmp 0x375d
callq 0x3b17
movq (%r13), %rdi
movslq 0x5ae7(%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 0x5ac8(%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 0x2496(%rip), %rsi      # 0x5d50
xorl %eax, %eax
callq 0x2300
xorl %edi, %edi
callq 0x3be3