// File: /workspace/github_c_makefile_star2_O3/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 0x3350
leaq 0xbff(%rip), %rsi       # 0x9781
movl $0x12, %edx
movq %r15, %rdi
callq 0x32f0
movl 0x4(%r14), %esi
leaq 0x30(%rsp), %rdi
callq 0x34d0
leaq 0x10(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x32f0
cmpl $0x11, %ebx
je 0x8bc5
cmpl $0x13, %ebx
jne 0x8be0
leaq 0xbd4(%rip), %rsi       # 0x9797
jmp 0x8bcc
leaq 0xbc8(%rip), %rsi       # 0x9794
leaq 0x30(%rsp), %rdi
movl $0x2, %edx
callq 0x32f0
jmp 0x8d94
cmpl $0x0, 0xf0(%r14)
jle 0x8d94
xorl %r15d, %r15d
leaq 0x30(%rsp), %r12
leaq 0x10(%rsp), %r13
movq 0x43e6(%rip), %rbp      # 0xcfe8
movl 0x734(%r14,%r15,4), %eax
addl $-0xa, %eax
leaq 0x90e(%rip), %rbx       # 0x9522
cmpl $0x9, %eax
ja 0x8c29
movl %eax, %eax
leaq 0xc8a(%rip), %rcx       # 0x98ac
movslq (%rcx,%rax,4), %rbx
addq %rcx, %rbx
movq %rbx, %rdi
callq 0x3130
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x32f0
movb $0x2f, 0x10(%rsp)
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x32f0
movl 0xd74(%r14,%r15,4), %esi
movq %r12, %rdi
callq 0x34d0
movb $0x2f, 0x10(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x32f0
movl 0xa54(%r14,%r15,4), %esi
movq %r12, %rdi
callq 0x34d0
movb $0x2f, 0x10(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x32f0
movl $0x2, %edx
movq %rbp, %rdi
leaq 0xaed(%rip), %rsi       # 0x979a
callq 0x32f0
movq %rbp, %rdi
movl %r15d, %esi
callq 0x34d0
movq %rax, %rbx
movl $0x8, %edx
movq %rax, %rdi
leaq 0xace(%rip), %rsi       # 0x979d
callq 0x32f0
movl 0xd74(%r14,%r15,4), %esi
movq %rbx, %rdi
callq 0x34d0
movl $0x5, %edx
movq %rbp, %rdi
leaq 0xab3(%rip), %rsi       # 0x97a6
callq 0x32f0
movl 0xa54(%r14,%r15,4), %esi
movq %rbp, %rdi
callq 0x34d0
movl $0x9, %edx
movq %rbp, %rdi
leaq 0xa95(%rip), %rsi       # 0x97ac
callq 0x32f0
movl 0x734(%r14,%r15,4), %eax
addl $-0xa, %eax
leaq 0xb79(%rip), %rbx       # 0x98a7
cmpl $0x9, %eax
ja 0x8d43
movl %eax, %eax
leaq 0xb98(%rip), %rcx       # 0x98d4
movslq (%rcx,%rax,4), %rbx
addq %rcx, %rbx
movq %rbx, %rdi
callq 0x3130
movq %rbp, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x32f0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
incq %r15
movslq 0xf0(%r14), %rax
cmpq %rax, %r15
jl 0x8c02
leaq 0xa1b(%rip), %rax       # 0x97b6
leaq 0xa1b(%rip), %rsi       # 0x97bd
cmpb $0x0, 0xc(%rsp)
cmovneq %rax, %rsi
leaq 0x30(%rsp), %rdi
movl $0x6, %edx
callq 0x32f0
leaq 0x38(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x3430
movq 0x10(%rsp), %rdi
callq 0x3240
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8dee
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x41c3(%rip), %rsi      # 0xcfb8
leaq 0x30(%rsp), %rdi
callq 0x3170
leaq 0xa0(%rsp), %rdi
callq 0x3100
xorl %eax, %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8e4b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x8e4b
jmp 0x8e48
jmp 0x8e48
jmp 0x8e48
jmp 0x8e48
movq %rax, %rbx
movq 0x4166(%rip), %rsi      # 0xcfb8
leaq 0x30(%rsp), %rdi
callq 0x3170
leaq 0xa0(%rsp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x34e0