// File: /workspace/github_c_makefile_star2_O2/silverneko[P]miku/./src/testsuite.cpp
// Function: setExitStatus(submission&, int)
void setExitStatus(submission &sub, int td)
{
   ostringstream sout;
   sout << "./testzone/META" << td;
   ifstream fin(sout.str());
   string line;
   map<string,string> META;
   while(!fin.eof() && getline(fin, line)){
      for(int i = 0; i < line.size(); ++i)
         if(line[i] == ':')
            line[i] = ' ';
      istringstream in(line);
      string a, b;
      in >> a >> b;
      META[a] = b;
   }

   //mem_used
   sub.mem[td] = cast(META["max-rss"]).to<int>();
   //time_used
   sub.time[td] = 1000 * cast(META["time"]).to<double>();
   //verdict
   if(META["status"] == ""){
      sub.verdict[td] = OK;
   }else if(META["status"] == "TO"){
      sub.verdict[td] = TLE;
   }else if(META["status"] == "SG"){
      switch(cast(META["exitsig"]).to<int>()){
         case 11:
            sub.verdict[td] = MLE;
            break;
         default :
            sub.verdict[td] = RE;
      }
   }else if(META["status"] == "RE"){
      sub.verdict[td] = RE;
   }else{
      // "XX"
      sub.verdict[td] = ER;
   }
   return ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5a8, %rsp            # imm = 0x5A8
movl %esi, %ebp
movq %rdi, 0x8(%rsp)
leaq 0x430(%rsp), %rbx
movq %rbx, %rdi
callq 0x3360
leaq 0x2ea7(%rip), %rsi      # 0x8477
movq %rbx, %rdi
callq 0x3290
movq %rax, %rdi
movl %ebp, %esi
callq 0x34c0
movl %ebp, 0x34(%rsp)
leaq 0x438(%rsp), %rsi
leaq 0xa8(%rsp), %rdi
callq 0x3430
leaq 0x228(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x3450
leaq 0xa8(%rsp), %r14
movq %r14, %rdi
callq 0x3170
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0x60(%rsp), %rcx
andl $0x0, (%rcx)
andq $0x0, 0x8(%rcx)
movb $0x0, (%rax)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
andq $0x0, 0x20(%rcx)
leaq 0x88(%rsp), %r12
xorl %r15d, %r15d
leaq 0x10(%rsp), %rbx
leaq 0x38(%rsp), %rbp
leaq 0x58(%rsp), %r13
movq 0x228(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x248(%rsp,%rax)
jne 0x574b
leaq 0x228(%rsp), %rdi
movq %r12, %rsi
callq 0x3070
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x574b
xorl %eax, %eax
cmpq %rax, 0x90(%rsp)
jbe 0x56ca
movq 0x88(%rsp), %rcx
cmpb $0x3a, (%rcx,%rax)
jne 0x56c5
movb $0x20, (%rcx,%rax)
incq %rax
jmp 0x56a9
movq %r14, %rdi
movq %r12, %rsi
pushq $0x8
popq %rdx
callq 0x34a0
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
movb %r15b, 0x20(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
andq $0x0, 0x40(%rsp)
movb %r15b, 0x48(%rsp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3330
movq %rax, %rdi
movq %rbp, %rsi
callq 0x3330
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5b82
movq %rax, %rdi
movq %rbp, %rsi
callq 0x31b0
movq %rbp, %rdi
callq 0x3170
movq %rbx, %rdi
callq 0x3170
movq %r14, %rdi
callq 0x3180
jmp 0x566b
leaq 0x2d35(%rip), %rsi      # 0x8487
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x3992
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5be8
leaq 0xa8(%rsp), %rdi
movq %rax, %rsi
callq 0x3370
leaq 0xa8(%rsp), %rdi
callq 0x39ce
movslq 0x34(%rsp), %r14
movq 0x8(%rsp), %rcx
movl %eax, 0xa54(%rcx,%r14,4)
leaq 0xa8(%rsp), %rdi
callq 0x3170
leaq 0x10(%rsp), %rdi
callq 0x3170
leaq 0x2cd2(%rip), %rsi      # 0x848f
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x3992
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5be8
leaq 0xa8(%rsp), %rdi
movq %rax, %rsi
callq 0x3370
leaq 0xa8(%rsp), %rdi
callq 0x5c4e
mulsd 0x2bc0(%rip), %xmm0     # 0x83c0
cvttsd2si %xmm0, %eax
movq 0x8(%rsp), %rcx
movl %eax, 0xd74(%rcx,%r14,4)
leaq 0xa8(%rsp), %rdi
callq 0x3170
leaq 0x10(%rsp), %rdi
callq 0x3170
leaq 0x2c65(%rip), %rsi      # 0x8494
leaq 0xa8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x3992
leaq 0x58(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x5be8
leaq 0x2cc8(%rip), %rsi      # 0x8522
movq %rax, %rdi
callq 0x5b74
movl %eax, %ebx
leaq 0xa8(%rsp), %rdi
callq 0x3170
testb %bl, %bl
je 0x5888
movq 0x8(%rsp), %rax
andl $0x0, 0x734(%rax,%r14,4)
jmp 0x5a1c
leaq 0x2c05(%rip), %rsi      # 0x8494
leaq 0xa8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x3992
leaq 0x58(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x5be8
leaq 0x2be1(%rip), %rsi      # 0x849b
movq %rax, %rdi
callq 0x5b74
movl %eax, %ebx
leaq 0xa8(%rsp), %rdi
callq 0x3170
testb %bl, %bl
je 0x58eb
movq 0x8(%rsp), %rax
movl $0xc, 0x734(%rax,%r14,4)
jmp 0x5a1c
leaq 0x2ba2(%rip), %rsi      # 0x8494
leaq 0xa8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x3992
leaq 0x58(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x5be8
leaq 0x2b81(%rip), %rsi      # 0x849e
movq %rax, %rdi
callq 0x5b74
movl %eax, %ebx
leaq 0xa8(%rsp), %rdi
callq 0x3170
testb %bl, %bl
je 0x59ab
leaq 0x2b62(%rip), %rsi      # 0x84a1
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x3992
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5be8
leaq 0xa8(%rsp), %rdi
movq %rax, %rsi
callq 0x3370
leaq 0xa8(%rsp), %rdi
callq 0x39ce
movl %eax, %ebx
leaq 0xa8(%rsp), %rdi
callq 0x3170
leaq 0x10(%rsp), %rdi
callq 0x3170
cmpl $0xb, %ebx
jne 0x59f8
movq 0x8(%rsp), %rax
movl $0xd, 0x734(%rax,%r14,4)
jmp 0x5a1c
leaq 0x2ae2(%rip), %rsi      # 0x8494
leaq 0xa8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x3992
leaq 0x58(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x5be8
leaq 0x2acc(%rip), %rsi      # 0x84a9
movq %rax, %rdi
callq 0x5b74
movl %eax, %ebx
leaq 0xa8(%rsp), %rdi
callq 0x3170
testb %bl, %bl
je 0x5a0b
movq 0x8(%rsp), %rax
movl $0xf, 0x734(%rax,%r14,4)
jmp 0x5a1c
movq 0x8(%rsp), %rax
movl $0x13, 0x734(%rax,%r14,4)
leaq 0x58(%rsp), %rdi
callq 0x5dee
leaq 0x88(%rsp), %rdi
callq 0x3170
leaq 0x228(%rsp), %rdi
callq 0x30d0
leaq 0x430(%rsp), %rdi
callq 0x30b0
addq $0x5a8, %rsp            # imm = 0x5A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5a84
jmp 0x5a71
jmp 0x5ac4
jmp 0x5ac4
jmp 0x5aae
jmp 0x5a71
jmp 0x5ac4
jmp 0x5a71
jmp 0x5ac4
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
jmp 0x5ab6
jmp 0x5ac4
jmp 0x5a84
jmp 0x5ac4
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x3170
jmp 0x5ab1
jmp 0x5ac4
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x3170
jmp 0x5b11
jmp 0x5abd
jmp 0x5aae
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3170
jmp 0x5aed
movq %rax, %rbx
jmp 0x5b11
jmp 0x5ac4
movq %rax, %rbx
jmp 0x5aed
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3170
leaq 0x10(%rsp), %rdi
callq 0x3170
leaq 0xa8(%rsp), %rdi
callq 0x3180
leaq 0x58(%rsp), %rdi
callq 0x5dee
leaq 0x88(%rsp), %rdi
callq 0x3170
leaq 0x228(%rsp), %rdi
callq 0x30d0
leaq 0x430(%rsp), %rdi
callq 0x30b0
movq %rbx, %rdi
callq 0x34d0