// File: /workspace/github_c_makefile_star2_O2/silverneko[P]miku/./src/server_io.cpp
// Function: sendResult(submission&, int, bool)
int sendResult(submission &sub, int verdict, bool done)
{
   ostringstream sout;
   sout << "update_verdict.py " << sub.submission_id << ' ';
   if(verdict == CE){
      sout << "CE";
   }else if(verdict == ER){
      sout << "ER";
   }else{
      for(int i = 0; i < sub.testdata_count; ++i){
         sout << fromVerdict(sub.verdict[i]).toAbr() << '/';
         sout << sub.time[i] << '/';
         sout << sub.mem[i] << '/';
         
         cerr << "td" << i << " : time " << sub.time[i];
         cerr << " mem " << sub.mem[i];
         cerr << " verdict " << fromVerdict(sub.verdict[i]).toStr();
         cerr << endl;
      }
   }
   if(done){
      sout << " OK OK";
   }else{
      sout << " NO NO";
   }
   system(sout.str().c_str());
   return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %edx, 0xc(%rsp)
movl %esi, %ebx
movq %rdi, %r14
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x3360
leaq 0x1432(%rip), %rsi      # 0x8736
movq %r15, %rdi
callq 0x3290
movl 0x4(%r14), %esi
movq %rax, %rdi
callq 0x34c0
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x32f0
cmpl $0x11, %ebx
je 0x7336
cmpl $0x13, %ebx
jne 0x73a9
leaq 0x1418(%rip), %rsi      # 0x874c
jmp 0x733d
leaq 0x140c(%rip), %rsi      # 0x8749
leaq 0x30(%rsp), %rdi
callq 0x3290
leaq 0x141d(%rip), %rax      # 0x876b
leaq 0x141d(%rip), %rsi      # 0x8772
cmpb $0x0, 0xc(%rsp)
cmovneq %rax, %rsi
leaq 0x30(%rsp), %rdi
callq 0x3290
leaq 0x38(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x3430
movq 0x10(%rsp), %rdi
callq 0x3260
leaq 0x10(%rsp), %rdi
callq 0x3170
leaq 0x30(%rsp), %rdi
callq 0x30b0
xorl %eax, %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
leaq 0x30(%rsp), %r13
pushq $0x2f
popq %rbp
movq 0x4c35(%rip), %rbx      # 0xbff0
movslq 0xf0(%r14), %rax
cmpq %rax, %r15
jge 0x7347
movl 0x734(%r14,%r15,4), %eax
movl %eax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x75a6
movq %r13, %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, %rdi
movl %ebp, %esi
callq 0x32f0
movl 0xd74(%r14,%r15,4), %esi
movq %r13, %rdi
callq 0x34c0
movq %rax, %rdi
movl %ebp, %esi
callq 0x32f0
movl 0xa54(%r14,%r15,4), %esi
movq %r13, %rdi
callq 0x34c0
movq %rax, %rdi
movl %ebp, %esi
callq 0x32f0
movq %rbx, %rdi
leaq 0x131f(%rip), %rsi      # 0x874f
callq 0x3290
movq %rax, %rdi
movl %r15d, %esi
callq 0x34c0
movq %rax, %rdi
leaq 0x1308(%rip), %rsi      # 0x8752
callq 0x3290
movl 0xd74(%r14,%r15,4), %esi
movq %rax, %rdi
callq 0x34c0
movq %rbx, %rdi
leaq 0x12f2(%rip), %rsi      # 0x875b
callq 0x3290
movl 0xa54(%r14,%r15,4), %esi
movq %rax, %rdi
callq 0x34c0
movq %rbx, %rdi
leaq 0x12d9(%rip), %rsi      # 0x8761
callq 0x3290
movq %rax, %r12
movl 0x734(%r14,%r15,4), %eax
movl %eax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x75ca
movq %r12, %rdi
movq %rax, %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x31a0
incq %r15
jmp 0x73bb
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3170
jmp 0x74db
jmp 0x74d8
jmp 0x74d8
jmp 0x74d8
jmp 0x74d8
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x30b0
movq %rbx, %rdi
callq 0x34d0