// File: /workspace/github_c_makefile_star2_O2/silverneko[P]miku/./src/testsuite.cpp
// Function: eval(submission&, int, int, int)
void eval(submission &sub, int td, int boxid, int spBoxid)
{
   int problem_id = sub.problem_id;
   setExitStatus(sub, td);
   if(sub.verdict[td] != OK){
      return ;
   }
   
   if(sub.problem_type == 1){
      ostringstream sout;
      sout << "/tmp/box/" << spBoxid << "/box/sj.out ";
      string sjpath(sout.str());
      sout.str("");
      sout << "./testdata/" << setfill('0') << setw(4) << problem_id << "/input" << setw(3) << td << ' ';
      string tdin(sout.str());
      sout.str("");
      sout << "./testdata/" << setfill('0') << setw(4) << problem_id << "/output" << setw(3) << td << ' ';
      string tdout(sout.str());
      sout.str("");
      sout << "/tmp/box/" << boxid << "/box/output ";
      string ttout(sout.str());
      FILE* Pipe = popen((sjpath+ttout+tdin+tdout).c_str(), "r");
      int result = 1;
      fscanf(Pipe, "%d", &result);
      pclose(Pipe);
      cout << "[special judge] :" << (sjpath+ttout+tdin+tdout) << endl;
      cout << "[special judge] td:" << td << " result:" << result << endl;
      if(result == 0)
         sub.verdict[td] = AC;
      else
         sub.verdict[td] = WA;
      return ;
   }

   int status = AC;
   //solution output
   ostringstream sout;
   sout << "./testdata/" << setfill('0') << setw(4) << problem_id
      << "/output" << setw(3) << td;
   fstream tsol(sout.str());
   //user output
   sout.str("");
   sout << "/tmp/box/" << boxid << "/box/output";
   fstream mout(sout.str());
   while(true){
      if(tsol.eof() != mout.eof()){
         while(tsol.eof() != mout.eof()){
            string s;
            if(tsol.eof()){
               getline(mout, s);
            }else{
               getline(tsol, s);
            }
            s.erase(s.find_last_not_of(" \n\r\t") + 1);
            if(s != ""){
               status = WA;
               break;
            }
         }
         break;
      }
      if(tsol.eof() && mout.eof()){
         break;
      }
      string s, t;
      getline(tsol, s);
      getline(mout, t);
      s.erase(s.find_last_not_of(" \n\r\t") + 1);
      t.erase(t.find_last_not_of(" \n\r\t") + 1);
      if(s != t){
         status = WA;
         break;
      }
   }
   sub.verdict[td] = status;
   return ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x658, %rsp            # imm = 0x658
movl %ecx, %ebx
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %r13
movl (%rdi), %r12d
callq 0x55a1
movslq %ebp, %rax
cmpl $0x0, 0x734(%r13,%rax,4)
jne 0x5456
movq %rax, 0x50(%rsp)
cmpl $0x1, 0xcc(%r13)
jne 0x510b
leaq 0x448(%rsp), %r15
movq %r15, %rdi
callq 0x3360
leaq 0x3779(%rip), %rsi      # 0x84ac
movq %r15, %rdi
callq 0x3290
movq %rax, %rdi
movl %ebx, %esi
callq 0x34c0
leaq 0x376a(%rip), %rsi      # 0x84b6
movq %rax, %rdi
callq 0x3290
leaq 0x450(%rsp), %r15
leaq 0xc0(%rsp), %rdi
movq %r15, %rsi
callq 0x3430
leaq 0x37af(%rip), %rsi      # 0x8522
leaq 0x2d0(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x3992
leaq 0x2d0(%rsp), %rsi
movq %r15, %rdi
callq 0x33e0
leaq 0x2d0(%rsp), %rdi
callq 0x3170
leaq 0x371a(%rip), %rsi      # 0x84c3
leaq 0x448(%rsp), %rdi
callq 0x3290
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x3410
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x4, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %r12d, %esi
callq 0x34c0
leaq 0x36ec(%rip), %rsi      # 0x84cf
movq %rax, %rdi
callq 0x3290
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x3, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %ebp, %esi
callq 0x34c0
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x32f0
leaq 0x2d0(%rsp), %rdi
movq %r15, %rsi
callq 0x3430
leaq 0x36fb(%rip), %rsi      # 0x8522
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x3992
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x33e0
leaq 0x8(%rsp), %rdi
callq 0x3170
leaq 0x366f(%rip), %rsi      # 0x84c3
leaq 0x448(%rsp), %rdi
callq 0x3290
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x3410
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x4, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %r12d, %esi
callq 0x34c0
leaq 0x3688(%rip), %rsi      # 0x8516
movq %rax, %rdi
callq 0x3290
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x3, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %ebp, %esi
callq 0x34c0
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x32f0
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x3430
leaq 0x3653(%rip), %rsi      # 0x8522
leaq 0x30(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x3992
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x33e0
leaq 0x30(%rsp), %rdi
callq 0x3170
leaq 0x35ad(%rip), %rsi      # 0x84ac
leaq 0x448(%rsp), %rdi
callq 0x3290
movq %rax, %rdi
movl %r14d, %esi
callq 0x34c0
leaq 0x35b8(%rip), %rsi      # 0x84d6
movq %rax, %rdi
callq 0x3290
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x3430
leaq 0x60(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x5ccd
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x2d0(%rsp), %rdx
callq 0x5cae
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x5cae
leaq 0xa0(%rsp), %r14
movq (%r14), %rdi
leaq 0x3816(%rip), %rsi      # 0x87a6
callq 0x3110
movq %rax, %rbx
movq %r14, %rdi
callq 0x3170
leaq 0x80(%rsp), %rdi
callq 0x3170
leaq 0x60(%rsp), %rdi
callq 0x3170
leaq 0x2c(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x376a(%rip), %rsi      # 0x8733
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3500
movq %rbx, %rdi
callq 0x33a0
movq 0x6fe6(%rip), %rdi      # 0xbfc8
leaq 0x34fa(%rip), %rsi      # 0x84e3
callq 0x3290
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x5ccd
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x2d0(%rsp), %rdx
callq 0x5cae
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x5cae
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdi
callq 0x3280
movq %rax, %rdi
callq 0x31a0
leaq 0xa0(%rsp), %rdi
callq 0x3170
leaq 0x80(%rsp), %rdi
callq 0x3170
leaq 0x60(%rsp), %rdi
callq 0x3170
movq 0x6f49(%rip), %rdi      # 0xbfc8
leaq 0x346f(%rip), %rsi      # 0x84f5
callq 0x3290
movq %rax, %rdi
movl %ebp, %esi
callq 0x34c0
leaq 0x346d(%rip), %rsi      # 0x8509
movq %rax, %rdi
callq 0x3290
movl 0x2c(%rsp), %esi
movq %rax, %rdi
callq 0x34c0
movq %rax, %rdi
callq 0x31a0
cmpl $0x1, 0x2c(%rsp)
pushq $0xb
popq %rax
sbbl $0x0, %eax
movq 0x50(%rsp), %rcx
movl %eax, 0x734(%r13,%rcx,4)
leaq 0x30(%rsp), %rdi
callq 0x3170
leaq 0x8(%rsp), %rdi
callq 0x3170
leaq 0x2d0(%rsp), %rdi
callq 0x3170
leaq 0xc0(%rsp), %rdi
callq 0x3170
leaq 0x448(%rsp), %rdi
jmp 0x5451
leaq 0x2d0(%rsp), %rbx
movq %rbx, %rdi
callq 0x3360
leaq 0x33a1(%rip), %rsi      # 0x84c3
movq %rbx, %rdi
callq 0x3290
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x3410
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x4, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %r12d, %esi
callq 0x34c0
leaq 0x33bf(%rip), %rsi      # 0x8516
movq %rax, %rdi
callq 0x3290
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x3, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %ebp, %esi
callq 0x34c0
leaq 0x2d8(%rsp), %rbx
leaq 0xc0(%rsp), %rdi
movq %rbx, %rsi
callq 0x3430
leaq 0x448(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
pushq $0x18
popq %rdx
callq 0x3480
leaq 0xc0(%rsp), %rdi
callq 0x3170
leaq 0x3365(%rip), %rsi      # 0x8522
leaq 0xc0(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x3992
leaq 0xc0(%rsp), %rsi
movq %rbx, %rdi
callq 0x33e0
leaq 0xc0(%rsp), %rdi
callq 0x3170
leaq 0x32b9(%rip), %rsi      # 0x84ac
leaq 0x2d0(%rsp), %rdi
callq 0x3290
movq %rax, %rdi
movl %r14d, %esi
callq 0x34c0
leaq 0x3300(%rip), %rsi      # 0x8512
movq %rax, %rdi
callq 0x3290
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x3430
movq %r13, 0x58(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x18
popq %rdx
callq 0x3480
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x3170
xorl %r14d, %r14d
leaq 0x30(%rsp), %r13
leaq 0x32c1(%rip), %rbp      # 0x851e
pushq $-0x1
popq %rbx
movq 0x448(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x468(%rsp,%rax), %eax
andl $0x2, %eax
movl %eax, %edx
shrl %edx
movq 0xc0(%rsp), %rcx
movq -0x18(%rcx), %rcx
movl 0xe0(%rsp,%rcx), %ecx
movl %ecx, %esi
andl $0x2, %esi
shrl %esi
cmpb %sil, %dl
jne 0x5355
testl %ecx, %eax
jne 0x541b
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
movb %r14b, 0x18(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
andq $0x0, 0x38(%rsp)
movb %r14b, 0x40(%rsp)
leaq 0x448(%rsp), %rdi
movq %r12, %rsi
callq 0x3070
leaq 0xc0(%rsp), %rdi
movq %r13, %rsi
callq 0x3070
movq %r12, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x34f0
leaq 0x1(%rax), %rsi
movq %r12, %rdi
movq %rbx, %rdx
callq 0x30a0
movq %r13, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x34f0
leaq 0x1(%rax), %rsi
movq %r13, %rdi
movq %rbx, %rdx
callq 0x30a0
movq %r12, %rdi
movq %r13, %rsi
callq 0x5d0f
movl %eax, %r15d
movq %r13, %rdi
callq 0x3170
movq %r12, %rdi
callq 0x3170
testb %r15b, %r15b
je 0x5260
jmp 0x5417
leaq 0x8(%rsp), %rbx
leaq 0x31bd(%rip), %r14      # 0x851e
pushq $-0x1
popq %r13
leaq 0x31b6(%rip), %rbp      # 0x8522
movq 0x448(%rsp), %rax
movq -0x18(%rax), %rcx
movb 0x468(%rsp,%rcx), %cl
andb $0x2, %cl
shrb %cl
movq 0xc0(%rsp), %rdx
movq -0x18(%rdx), %rdx
movb 0xe0(%rsp,%rdx), %dl
andb $0x2, %dl
shrb %dl
cmpb %dl, %cl
je 0x541b
leaq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq -0x18(%rax), %rax
testb $0x2, 0x468(%rsp,%rax)
leaq 0x448(%rsp), %rdi
je 0x53d3
leaq 0xc0(%rsp), %rdi
movq %rbx, %rsi
callq 0x3070
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x34f0
leaq 0x1(%rax), %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x30a0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x5d05
movl %eax, %r12d
movq %rbx, %rdi
callq 0x3170
testb %r12b, %r12b
je 0x536c
pushq $0xb
jmp 0x541d
pushq $0xa
popq %rdx
movq 0x58(%rsp), %rax
movq 0x50(%rsp), %rcx
movl %edx, 0x734(%rax,%rcx,4)
leaq 0xc0(%rsp), %rdi
callq 0x3090
leaq 0x448(%rsp), %rdi
callq 0x3090
leaq 0x2d0(%rsp), %rdi
callq 0x30b0
addq $0x658, %rsp            # imm = 0x658
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5471
jmp 0x5476
jmp 0x551b
movq %rax, %rbx
jmp 0x54e4
movq %rax, %rbx
jmp 0x54f1
jmp 0x551b
jmp 0x54fd
jmp 0x551b
jmp 0x54fd
jmp 0x5511
jmp 0x54fd
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x54ab
jmp 0x5511
jmp 0x5502
jmp 0x5516
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x3170
jmp 0x557f
jmp 0x5502
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x3170
jmp 0x558c
jmp 0x550c
jmp 0x5511
jmp 0x5516
jmp 0x5507
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x3170
leaq 0x80(%rsp), %rdi
callq 0x3170
leaq 0x60(%rsp), %rdi
callq 0x3170
jmp 0x551e
movq %rax, %rbx
jmp 0x5528
movq %rax, %rbx
jmp 0x557f
movq %rax, %rbx
jmp 0x554c
movq %rax, %rbx
jmp 0x558c
movq %rax, %rbx
jmp 0x5532
movq %rax, %rbx
jmp 0x553f
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3170
leaq 0x8(%rsp), %rdi
callq 0x3170
leaq 0x2d0(%rsp), %rdi
callq 0x3170
leaq 0xc0(%rsp), %rdi
callq 0x3170
leaq 0x448(%rsp), %rdi
jmp 0x5594
movq %rax, %rbx
jmp 0x5568
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3170
leaq 0x8(%rsp), %rdi
callq 0x3170
leaq 0xc0(%rsp), %rdi
callq 0x3090
leaq 0x448(%rsp), %rdi
callq 0x3090
leaq 0x2d0(%rsp), %rdi
callq 0x30b0
movq %rbx, %rdi
callq 0x34d0