// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x10(%rbp)
leaq 0x3165(%rip), %rdi      # 0xf71b
leaq 0x3282(%rip), %rsi      # 0xf83f
callq 0x4130
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x4, %rdx
leaq 0x31f3(%rip), %rsi      # 0xf7cc
movb $0x0, %al
callq 0x4630
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jge 0xc602
movq -0x18(%rbp), %rdi
callq 0x44c0
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0xc9f9
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x31bb(%rip), %rsi      # 0xf7cc
movq %rsi, -0x110(%rbp)
xorl %eax, %eax
movb %al, -0x101(%rbp)
callq 0x4630
movq -0x110(%rbp), %rsi
movb -0x101(%rbp), %al
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0xcc, %rdx
callq 0x4630
movq -0x110(%rbp), %rsi
movb -0x101(%rbp), %al
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0xc8, %rdx
callq 0x4630
movb -0x101(%rbp), %al
movq -0x18(%rbp), %rdi
leaq 0x30b7(%rip), %rsi      # 0xf72f
leaq -0x40(%rbp), %rdx
movq %rdx, -0x100(%rbp)
callq 0x4630
movq -0x18(%rbp), %rdi
callq 0x44c0
leaq -0x61(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x4600
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x4d90
jmp 0xc6ba
leaq 0x3071(%rip), %rsi      # 0xf732
leaq -0x60(%rbp), %rdi
callq 0x8e90
movb %al, -0x111(%rbp)
jmp 0xc6d2
leaq -0x60(%rbp), %rdi
callq 0x4240
leaq -0x61(%rbp), %rdi
callq 0x43a0
movb -0x111(%rbp), %al
testb $0x1, %al
jne 0xc6f0
jmp 0xc751
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
leaq 0x2e6c(%rip), %rsi      # 0xf56b
callq 0x4490
movq -0x10(%rbp), %rdi
addq $0x88, %rdi
leaq 0x301c(%rip), %rsi      # 0xf732
callq 0x4490
jmp 0xc9f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc743
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x4240
leaq -0x61(%rbp), %rdi
callq 0x43a0
jmp 0xca05
leaq -0x99(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x4600
movq -0x120(%rbp), %rdx
leaq -0x98(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x4d90
jmp 0xc77d
leaq 0x2de7(%rip), %rsi      # 0xf56b
leaq -0x98(%rbp), %rdi
callq 0x8e90
movb %al, -0x121(%rbp)
jmp 0xc798
leaq -0x98(%rbp), %rdi
callq 0x4240
leaq -0x99(%rbp), %rdi
callq 0x43a0
movb -0x121(%rbp), %al
testb $0x1, %al
jne 0xc7bc
jmp 0xc823
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
leaq 0x2da0(%rip), %rsi      # 0xf56b
callq 0x4490
movq -0x10(%rbp), %rdi
addq $0x88, %rdi
leaq 0x2d88(%rip), %rsi      # 0xf56a
callq 0x4490
jmp 0xc9f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc812
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x4240
leaq -0x99(%rbp), %rdi
callq 0x43a0
jmp 0xca05
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x4600
movq -0x130(%rbp), %rdx
leaq -0xc0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x4d90
jmp 0xc84f
leaq 0x2c3e(%rip), %rsi      # 0xf494
leaq -0xc0(%rbp), %rdi
callq 0x8e90
movb %al, -0x131(%rbp)
jmp 0xc86a
leaq -0xc0(%rbp), %rdi
callq 0x4240
leaq -0xc1(%rbp), %rdi
callq 0x43a0
movb -0x131(%rbp), %al
testb $0x1, %al
jne 0xc88e
jmp 0xc8f5
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
leaq 0x2bf7(%rip), %rsi      # 0xf494
callq 0x4490
movq -0x10(%rbp), %rdi
addq $0x88, %rdi
leaq 0x2cb6(%rip), %rsi      # 0xf56a
callq 0x4490
jmp 0xc9ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc8e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x4240
leaq -0xc1(%rbp), %rdi
callq 0x43a0
jmp 0xca05
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x4600
movq -0x140(%rbp), %rdx
leaq -0xe8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x4d90
jmp 0xc921
leaq 0x2b33(%rip), %rsi      # 0xf45b
leaq -0xe8(%rbp), %rdi
callq 0x8e90
movb %al, -0x141(%rbp)
jmp 0xc93c
leaq -0xe8(%rbp), %rdi
callq 0x4240
leaq -0xe9(%rbp), %rdi
callq 0x43a0
movb -0x141(%rbp), %al
testb $0x1, %al
jne 0xc960
jmp 0xc9c1
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
leaq 0x2aec(%rip), %rsi      # 0xf45b
callq 0x4490
movq -0x10(%rbp), %rdi
addq $0x88, %rdi
leaq 0x2be4(%rip), %rsi      # 0xf56a
callq 0x4490
jmp 0xc9ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc9b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x4240
leaq -0xe9(%rbp), %rdi
callq 0x43a0
jmp 0xca05
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
leaq 0x2b9b(%rip), %rsi      # 0xf56b
callq 0x4490
movq -0x10(%rbp), %rdi
addq $0x88, %rdi
leaq 0x2d4b(%rip), %rsi      # 0xf732
callq 0x4490
jmp 0xc9ee
jmp 0xc9f0
jmp 0xc9f2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x45f0
nop