// File: /workspace/github_c_makefile_star2_O2/silverneko[P]miku/./src/server_io.cpp
// Function: fetchSubmission(submission&)
int fetchSubmission(submission &sub)
{
   FILE *Pipe = popen("fetch_submission.py", "r");
   fscanf(Pipe, "%d", &sub.submission_id);
   if(sub.submission_id < 0){
      pclose(Pipe);
      return sub.submission_id;
   }
   fscanf(Pipe, "%d", &sub.problem_id);
   fscanf(Pipe, "%d", &sub.problem_type);
   fscanf(Pipe, "%d", &sub.submitter_id);
   char buff[30];
   fscanf(Pipe, "%s", buff);
   pclose(Pipe);
   if(string(buff) == "c++11"){
      sub.lang = "c++";
      sub.std = "c++11";
   }else if(string(buff) == "c++"){
      sub.lang = "c++";
      sub.std = "";
   }else if(string(buff) == "c"){
      sub.lang = "c";
      sub.std = "";
   }else if(string(buff) == "haskell"){
      sub.lang = "haskell";
      sub.std = "";
   }else{
      sub.lang = "c++";
      sub.std = "c++11";
   }
   return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x1f4f(%rip), %rdi      # 0x8682
leaq 0x206c(%rip), %rsi      # 0x87a6
callq 0x3110
movq %rax, %r14
leaq 0x4(%rbx), %r15
leaq 0x1fe6(%rip), %rsi      # 0x8733
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3500
cmpl $0x0, 0x4(%rbx)
js 0x681a
leaq 0x1fc8(%rip), %r15      # 0x8733
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3500
leaq 0xcc(%rbx), %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3500
leaq 0xc8(%rbx), %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3500
leaq 0x1eec(%rip), %rsi      # 0x8696
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3500
movq %r14, %rdi
callq 0x33a0
leaq 0x38(%rsp), %r14
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3992
leaq 0x1eb9(%rip), %rsi      # 0x8699
movq %r14, %rdi
callq 0x5b74
movl %eax, %ebp
movq %r14, %rdi
callq 0x3170
testb %bpl, %bpl
je 0x682a
leaq 0x68(%rbx), %rdi
leaq 0x1d21(%rip), %rsi      # 0x8523
callq 0x3520
addq $0x88, %rbx
leaq 0x1e84(%rip), %rsi      # 0x8699
jmp 0x68bf
movq %r14, %rdi
callq 0x33a0
movl (%r15), %eax
jmp 0x68c9
leaq 0x38(%rsp), %r14
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0x3992
leaq 0x1cdb(%rip), %rsi      # 0x8523
movq %r14, %rdi
callq 0x5b74
movl %eax, %ebp
movq %r14, %rdi
callq 0x3170
testb %bpl, %bpl
je 0x686c
leaq 0x68(%rbx), %rdi
leaq 0x1cb9(%rip), %rsi      # 0x8523
jmp 0x68ac
leaq 0x38(%rsp), %r14
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0x3992
leaq 0x1bc2(%rip), %rsi      # 0x844c
movq %r14, %rdi
callq 0x5b74
movl %eax, %ebp
movq %r14, %rdi
callq 0x3170
testb %bpl, %bpl
je 0x68d4
leaq 0x68(%rbx), %rdi
leaq 0x1ba0(%rip), %rsi      # 0x844c
callq 0x3520
addq $0x88, %rbx
leaq 0x1c63(%rip), %rsi      # 0x8522
movq %rbx, %rdi
callq 0x3520
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x38(%rsp), %r14
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0x3992
leaq 0x1b21(%rip), %rsi      # 0x8413
movq %r14, %rdi
callq 0x5b74
movl %eax, %ebp
movq %r14, %rdi
callq 0x3170
leaq 0x68(%rbx), %rdi
addq $0x88, %rbx
testb %bpl, %bpl
je 0x6922
leaq 0x1af8(%rip), %rsi      # 0x8413
callq 0x3520
jmp 0x68b8
leaq 0x1bfa(%rip), %rsi      # 0x8523
callq 0x3520
jmp 0x680e