// File: /workspace/github_c_makefile_star2_O0/silverneko[P]miku/./src/sandbox.cpp
// Function: sandboxExec(int, sandboxOptions const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int sandboxExec(int boxid, const sandboxOptions &opt, const string &comm)
{
   ostringstream sout;
   sout << "isolate --box-id=" << boxid;
   if(opt.cgroup) sout << " --cg";
   if(opt.preserve_env) sout << " --full-env";
   for(int i = 0; i < opt.dirs.size(); ++i)
      sout << " --dir=" << opt.dirs[i];
   if(!opt.input.empty()) sout << " --stdin=" << opt.input;
   if(!opt.output.empty()) sout << " --stdout=" << opt.output;
   if(!opt.errout.empty()) sout << " --stderr=" << opt.errout;
   if(!opt.meta.empty()) sout << " --meta=" << opt.meta;
   if(opt.mem != 0) sout << " --mem=" << opt.mem;
   sout << " --processes=" << opt.procs;
   double timeout = opt.timeout * 0.001;
   if(opt.timeout != 0){
      sout << " --time=" << fixed << setprecision(3) << timeout;
      sout << " --wall-time=" << fixed << setprecision(3) << timeout * 2;
   }
   if(opt.fsize_limit) sout << " --fsize=" << opt.fsize_limit;
   sout << " --file-limit=" << opt.file_limit;
   sout << " --extra-time=0.2";
   sout << " --run -- " << comm;
   cerr << "[debug] box-" << boxid << " execute command : " << sout.str() << endl;
   
   system(sout.str().c_str());
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x190(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0x4480
movq -0x200(%rbp), %rdi
leaq 0x9d41(%rip), %rsi      # 0xf2d8
callq 0x4320
movq %rax, -0x1f8(%rbp)
jmp 0x55a5
movq -0x1f8(%rbp), %rdi
movl -0x4(%rbp), %esi
callq 0x45e0
jmp 0x55b6
movq -0x10(%rbp), %rax
testb $0x1, (%rax)
je 0x55ed
leaq 0x9d24(%rip), %rsi      # 0xf2ea
leaq -0x190(%rbp), %rdi
callq 0x4320
jmp 0x55d4
jmp 0x55ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0x5b51
movq -0x10(%rbp), %rax
testb $0x1, 0x1(%rax)
je 0x560e
leaq 0x9cf2(%rip), %rsi      # 0xf2f0
leaq -0x190(%rbp), %rdi
callq 0x4320
jmp 0x560c
jmp 0x560e
movl $0x0, -0x1a0(%rbp)
movslq -0x1a0(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x5e70
movq %rax, %rcx
movq -0x208(%rbp), %rax
cmpq %rcx, %rax
jae 0x5696
leaq 0x9cb3(%rip), %rsi      # 0xf2fc
leaq -0x190(%rbp), %rdi
callq 0x4320
movq %rax, -0x210(%rbp)
jmp 0x565e
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movslq -0x1a0(%rbp), %rsi
callq 0x5e90
movq -0x210(%rbp), %rdi
movq %rax, %rsi
callq 0x4310
jmp 0x5683
jmp 0x5685
movl -0x1a0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a0(%rbp)
jmp 0x5618
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x4590
testb $0x1, %al
jne 0x56db
leaq 0x9c56(%rip), %rsi      # 0xf304
leaq -0x190(%rbp), %rdi
callq 0x4320
movq %rax, -0x218(%rbp)
jmp 0x56c3
movq -0x218(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
callq 0x4310
jmp 0x56d9
jmp 0x56db
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
callq 0x4590
testb $0x1, %al
jne 0x5720
leaq 0x9c1b(%rip), %rsi      # 0xf30e
leaq -0x190(%rbp), %rdi
callq 0x4320
movq %rax, -0x220(%rbp)
jmp 0x5708
movq -0x220(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x40, %rsi
callq 0x4310
jmp 0x571e
jmp 0x5720
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
callq 0x4590
testb $0x1, %al
jne 0x5765
leaq 0x9be1(%rip), %rsi      # 0xf319
leaq -0x190(%rbp), %rdi
callq 0x4320
movq %rax, -0x228(%rbp)
jmp 0x574d
movq -0x228(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x60, %rsi
callq 0x4310
jmp 0x5763
jmp 0x5765
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
callq 0x4590
testb $0x1, %al
jne 0x57ad
leaq 0x9ba4(%rip), %rsi      # 0xf324
leaq -0x190(%rbp), %rdi
callq 0x4320
movq %rax, -0x230(%rbp)
jmp 0x5795
movq -0x230(%rbp), %rdi
movq -0x10(%rbp), %rsi
subq $-0x80, %rsi
callq 0x4310
jmp 0x57ab
jmp 0x57ad
movq -0x10(%rbp), %rax
cmpl $0x0, 0xa0(%rax)
je 0x57f0
leaq 0x9b6c(%rip), %rsi      # 0xf32d
leaq -0x190(%rbp), %rdi
callq 0x4320
movq %rax, -0x238(%rbp)
jmp 0x57d6
movq -0x238(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xa0(%rax), %esi
callq 0x45e0
jmp 0x57ee
jmp 0x57f0
leaq 0x9b3e(%rip), %rsi      # 0xf335
leaq -0x190(%rbp), %rdi
callq 0x4320
movq %rax, -0x240(%rbp)
jmp 0x580c
movq -0x240(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xa4(%rax), %esi
callq 0x45e0
jmp 0x5824
movq -0x10(%rbp), %rax
cvtsi2sdl 0xa8(%rax), %xmm0
movsd 0x9a98(%rip), %xmm1     # 0xf2d0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x1a8(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xa8(%rax)
je 0x5969
leaq 0x9ae7(%rip), %rsi      # 0xf343
leaq -0x190(%rbp), %rdi
callq 0x4320
movq %rax, -0x248(%rbp)
jmp 0x5871
movq -0x248(%rbp), %rdi
leaq 0x631(%rip), %rsi       # 0x5eb0
callq 0x4140
movq %rax, -0x250(%rbp)
jmp 0x588d
movl $0x3, %edi
callq 0x5ee0
movl %eax, -0x254(%rbp)
jmp 0x589f
movq -0x250(%rbp), %rdi
movl -0x254(%rbp), %eax
movl %eax, -0x1ac(%rbp)
movl -0x1ac(%rbp), %esi
callq 0x4540
movq %rax, -0x260(%rbp)
jmp 0x58c6
movq -0x260(%rbp), %rdi
movsd -0x1a8(%rbp), %xmm0
callq 0x4650
jmp 0x58dc
leaq 0x9a69(%rip), %rsi      # 0xf34c
leaq -0x190(%rbp), %rdi
callq 0x4320
movq %rax, -0x268(%rbp)
jmp 0x58f8
movq -0x268(%rbp), %rdi
leaq 0x5aa(%rip), %rsi       # 0x5eb0
callq 0x4140
movq %rax, -0x270(%rbp)
jmp 0x5914
movl $0x3, %edi
callq 0x5ee0
movl %eax, -0x274(%rbp)
jmp 0x5926
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %eax
movl %eax, -0x1b0(%rbp)
movl -0x1b0(%rbp), %esi
callq 0x4540
movq %rax, -0x280(%rbp)
jmp 0x594d
movq -0x280(%rbp), %rdi
movsd -0x1a8(%rbp), %xmm0
addsd %xmm0, %xmm0
callq 0x4650
jmp 0x5967
jmp 0x5969
movq -0x10(%rbp), %rax
cmpl $0x0, 0xb0(%rax)
je 0x59ac
leaq 0x99dd(%rip), %rsi      # 0xf35a
leaq -0x190(%rbp), %rdi
callq 0x4320
movq %rax, -0x288(%rbp)
jmp 0x5992
movq -0x288(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xb0(%rax), %esi
callq 0x45e0
jmp 0x59aa
jmp 0x59ac
leaq 0x99b1(%rip), %rsi      # 0xf364
leaq -0x190(%rbp), %rdi
callq 0x4320
movq %rax, -0x290(%rbp)
jmp 0x59c8
movq -0x290(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xac(%rax), %esi
callq 0x45e0
jmp 0x59e0
leaq 0x998c(%rip), %rsi      # 0xf373
leaq -0x190(%rbp), %rdi
callq 0x4320
jmp 0x59f5
leaq 0x9989(%rip), %rsi      # 0xf385
leaq -0x190(%rbp), %rdi
callq 0x4320
movq %rax, -0x298(%rbp)
jmp 0x5a11
movq -0x298(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4310
jmp 0x5a23
movq 0xf5c6(%rip), %rdi      # 0x14ff0
leaq 0x995f(%rip), %rsi      # 0xf390
callq 0x4320
movq %rax, -0x2a0(%rbp)
jmp 0x5a3f
movq -0x2a0(%rbp), %rdi
movl -0x4(%rbp), %esi
callq 0x45e0
movq %rax, -0x2a8(%rbp)
jmp 0x5a57
movq -0x2a8(%rbp), %rdi
leaq 0x9938(%rip), %rsi      # 0xf39d
callq 0x4320
movq %rax, -0x2b0(%rbp)
jmp 0x5a73
leaq -0x1d0(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x4350
jmp 0x5a88
movq -0x2b0(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x4310
movq %rax, -0x2b8(%rbp)
jmp 0x5aa4
movq -0x2b8(%rbp), %rdi
movq 0xf4f6(%rip), %rsi      # 0x14fa8
callq 0x4370
jmp 0x5ab9
leaq -0x1d0(%rbp), %rdi
callq 0x4240
leaq -0x1f0(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x4350
jmp 0x5ada
leaq -0x1f0(%rbp), %rdi
callq 0x4180
movq %rax, %rdi
callq 0x42f0
jmp 0x5af0
leaq -0x1f0(%rbp), %rdi
callq 0x4240
leaq -0x190(%rbp), %rdi
callq 0x40d0
xorl %eax, %eax
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x4240
jmp 0x5b51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x4240
leaq -0x190(%rbp), %rdi
callq 0x40d0
movq -0x198(%rbp), %rdi
callq 0x45f0
nopl (%rax)