// File: /workspace/github_cpp_makefile_star2_O1/BruceHu1005[P]np-assignment1/clientmain.cpp
// Function: main
int main(int argc, char *argv[]){
  
  /* Do magic */
  int sock_fd, send_num, recv_num;
  struct addrinfo hints, *servinfo, *p;
  char send_buf[BUFF_LEN];
  char recv_buf[BUFF_LEN];

  if (argc != 2) {
	  fprintf(stderr,"usage: %s hostname (%d)\n",argv[0],argc);
	  exit(1);
	}
  memset(&hints, 0, sizeof hints);
  hints.ai_family = AF_UNSPEC;
  hints.ai_socktype = SOCK_STREAM;
  

  if ((recv_num = getaddrinfo(argv[1], PORT, &hints, &servinfo)) != 0) {
        fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(recv_num));
        return 1;
  }

  for(p = servinfo; p != NULL; p = p->ai_next) {
    if ((sock_fd = socket(p->ai_family, p->ai_socktype,
      p->ai_protocol)) == -1) {
      perror("client: socket");
      continue;
    }

    if (connect(sock_fd, p->ai_addr, p->ai_addrlen) == -1) {
      close(sock_fd);
      perror("client: connect");
      continue;
    }
    break;
  }
  if (p == NULL) {
    fprintf(stderr, "client: failed to connect\n");
    return 2;
  }
  recv_num = recv(sock_fd, recv_buf, sizeof(recv_buf), 0);
  if(recv_num<0 ){
  perror("recvfrom error:");
  exit(1);
  }
  else {
    recv_buf[recv_num] = '\0';
    printf("client receive %d bytes: %s\n", recv_num, recv_buf);
  } 
  
  std::cin >> send_buf;
  send_num=send(sock_fd,send_buf, strlen(send_buf), 0);
  recv_num = recv(sock_fd, recv_buf, sizeof(recv_buf), 0);
  char dis[recv_num];
  sprintf(dis, "%s", "disconnected");
  recv_buf[recv_num] = '\0';
  printf("client receive %d bytes: %s\n", recv_num, recv_buf);
  
  if (strcmp(recv_buf, dis) == 0) {
    close(sock_fd);
    return 0;
  }
  
  string temp = recv_buf;
  string calc[3];
  istringstream is(temp);
  is>>calc[0]>>calc[1]>>calc[2];
  string ptr = calc[0];
  string num1 = calc[1];
  string num2 = calc[2]; 
 
  if(ptr[0]=='f'){
    if (ptr == "fadd")
    {
      sprintf(send_buf, "%8.8g\n", stod(num1) + stod(num2));
    }
    else if (ptr == "fsub")
    {
      sprintf(send_buf, "%8.8g\n", stod(num1) - stod(num2));
    }
    else if (ptr == "fmul")
    {
      sprintf(send_buf, "%8.8g\n", stod(num1) * stod(num2));
    }
    else if (ptr == "fdiv")
    {
      sprintf(send_buf, "%8.8g\n", stod(num1) / stod(num2));
    }
  }
  else{
    if (ptr == "add")
    {
      sprintf(send_buf, "%d\n", stoi(num1) + stoi(num2));
    }
    else if (ptr == "sub")
    {
      sprintf(send_buf, "%d\n", stoi(num1) - stoi(num2));
    }
    else if (ptr == "mul")
    {
      sprintf(send_buf, "%d\n", stoi(num1) * stoi(num2));
    }
    else if (ptr == "div")
    {
      sprintf(send_buf, "%d\n", stoi(num1) / stoi(num2));
    }
  }
  printf("Answer of Client is %s\n", send_buf);
  send_num=send(sock_fd, send_buf, strlen(send_buf), 0);
  recv_num = recv(sock_fd, recv_buf, sizeof(recv_buf), 0);
  recv_buf[recv_num] = '\0';
  printf("client receive %d bytes: %s\n", recv_num, recv_buf);

  close(sock_fd);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6b8, %rsp            # imm = 0x6B8
cmpl $0x2, %edi
jne 0x2fca
xorpd %xmm0, %xmm0
leaq -0x360(%rbp), %rdx
movapd %xmm0, (%rdx)
movapd %xmm0, 0x20(%rdx)
movapd %xmm0, 0x10(%rdx)
movl $0x1, 0x8(%rdx)
movq 0x8(%rsi), %rdi
leaq 0x1acf(%rip), %rsi      # 0x403d
leaq -0xc8(%rbp), %rcx
callq 0x2180
testl %eax, %eax
jne 0x2bec
movq -0xc8(%rbp), %r14
testq %r14, %r14
sete %r12b
je 0x25ed
leaq 0x1aba(%rip), %r15      # 0x4053
leaq 0x1ac2(%rip), %r13      # 0x4062
movl 0x4(%r14), %edi
movl 0x8(%r14), %esi
movl 0xc(%r14), %edx
callq 0x2060
movl %eax, %ebx
movq %r15, %rdi
cmpl $-0x1, %eax
je 0x25d9
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movl %ebx, %edi
callq 0x2110
cmpl $-0x1, %eax
jne 0x25ed
movl %ebx, %edi
callq 0x2270
movq %r13, %rdi
callq 0x2120
movq 0x28(%r14), %r14
testq %r14, %r14
sete %r12b
jne 0x25a0
jmp 0x25ed
testb $0x1, %r12b
jne 0x2bfd
leaq -0x560(%rbp), %rsi
movl $0x200, %edx            # imm = 0x200
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x2090
testl %eax, %eax
js 0x2fd6
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movb $0x0, -0x560(%rbp,%rcx)
leaq 0x1a72(%rip), %rdi      # 0x409d
leaq -0x560(%rbp), %rdx
movl %eax, %esi
xorl %eax, %eax
callq 0x2040
movq 0x399e(%rip), %r14      # 0x5fe0
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $-0x201, %r15           # imm = 0xFDFF
addq 0x10(%r14,%rax), %r15
leaq -0x330(%rbp), %rsi
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
callq 0x2230
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r14,%rax)
jne 0x2697
cmpq $-0x201, %r15           # imm = 0xFDFF
ja 0x2697
movq 0xe8(%r14,%rax), %rdi
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x2fc0
leaq -0x330(%rbp), %r14
movq %r14, %rdi
callq 0x20b0
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x20c0
leaq -0x560(%rbp), %r14
movl $0x200, %edx            # imm = 0x200
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x2090
movq %rsp, %r13
movl %eax, %ecx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rdx
movq %rdx, %r15
subq %rcx, %r15
negq %rcx
movq %r15, %rsp
movabsq $0x656e6e6f63736964, %rsi # imm = 0x656E6E6F63736964
movq %rsi, (%rdx,%rcx)
movabsq $0x64657463656e6e, %rcx # imm = 0x64657463656E6E
movq %rcx, 0x5(%r15)
movslq %eax, %rsi
movb $0x0, -0x560(%rbp,%rsi)
leaq 0x1986(%rip), %rdi      # 0x409d
movq %r14, %rdx
xorl %eax, %eax
callq 0x2040
movq %r14, %rdi
movq %r15, %rsi
callq 0x21b0
testl %eax, %eax
je 0x28d9
leaq -0xb0(%rbp), %r15
movq %r15, -0x10(%r15)
movq %r14, %rdi
callq 0x20b0
leaq (%rax,%rbp), %rdx
addq $-0x560, %rdx           # imm = 0xFAA0
leaq -0xc0(%rbp), %rdi
movq %r14, %rsi
callq 0x3382
movl $0x10, %eax
leaq (%rax,%rbp), %rcx
addq $-0x130, %rcx           # imm = 0xFED0
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x70, %rax
jne 0x2766
leaq -0x6e0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
movl $0x8, %edx
callq 0x2210
leaq -0x6e0(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x2190
leaq -0x110(%rbp), %rsi
movq %rax, %rdi
callq 0x2190
leaq -0xf0(%rbp), %rsi
movq %rax, %rdi
callq 0x2190
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x32e8
leaq -0x90(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
addq %rsi, %rdx
leaq -0xa0(%rbp), %rdi
callq 0x32e8
leaq -0x70(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x80(%rbp), %rdi
callq 0x32e8
movq -0x60(%rbp), %rax
cmpb $0x66, (%rax)
jne 0x28e5
leaq 0x17c1(%rip), %rsi      # 0x4015
leaq -0x60(%rbp), %rdi
callq 0x2080
testl %eax, %eax
je 0x298f
leaq 0x17a4(%rip), %rsi      # 0x4010
leaq -0x60(%rbp), %rdi
callq 0x2080
testl %eax, %eax
je 0x2ab5
leaq 0x179b(%rip), %rsi      # 0x401f
leaq -0x60(%rbp), %rdi
callq 0x2080
testl %eax, %eax
je 0x2c6f
leaq 0x177e(%rip), %rsi      # 0x401a
leaq -0x60(%rbp), %rdi
callq 0x2080
testl %eax, %eax
jne 0x2e8b
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
callq 0x31bc
movsd %xmm0, -0x38(%rbp)
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
callq 0x31bc
movsd -0x38(%rbp), %xmm1
divsd %xmm0, %xmm1
jmp 0x2e72
movl %ebx, %edi
callq 0x2270
jmp 0x2fac
leaq 0x172a(%rip), %rsi      # 0x4016
leaq -0x60(%rbp), %rdi
callq 0x2080
testl %eax, %eax
je 0x29e8
leaq 0x170d(%rip), %rsi      # 0x4011
leaq -0x60(%rbp), %rdi
callq 0x2080
testl %eax, %eax
je 0x2b0e
leaq 0x1704(%rip), %rsi      # 0x4020
leaq -0x60(%rbp), %rdi
callq 0x2080
testl %eax, %eax
je 0x2cc8
leaq 0x16e7(%rip), %rsi      # 0x401b
leaq -0x60(%rbp), %rdi
callq 0x2080
testl %eax, %eax
jne 0x2e8b
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3246
movl %eax, %r14d
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3246
movl %eax, %ecx
movl %r14d, %eax
cltd
idivl %ecx
leaq 0x1747(%rip), %rsi      # 0x40c1
leaq -0x330(%rbp), %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x2050
jmp 0x2e8b
movq -0xa0(%rbp), %r15
callq 0x2030
movq %rax, %r14
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
leaq -0x40(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x20f0
cmpq %r15, (%r12)
je 0x2fdb
movl (%r14), %eax
testl %eax, %eax
movsd %xmm0, -0x38(%rbp)
je 0x2c0c
cmpl $0x22, %eax
jne 0x2c12
leaq 0x16fa(%rip), %rdi      # 0x40dd
callq 0x21f0
movq %r13, -0x38(%rbp)
movq -0xa0(%rbp), %r12
callq 0x2030
movq %rax, %r14
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
leaq -0x40(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x21c0
cmpq %r12, (%r13)
je 0x2fe7
movq %rax, %r15
movslq %r15d, %rax
cmpq %r15, %rax
jne 0x2ff3
movl (%r14), %eax
cmpl $0x22, %eax
je 0x2ff3
testl %eax, %eax
jne 0x2a4a
movl -0x2c(%rbp), %eax
movl %eax, (%r14)
movq -0x80(%rbp), %r12
movl (%r14), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x21c0
cmpq %r12, (%r13)
je 0x300b
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rdx
cmpq %rcx, %rdx
leaq -0x50(%rbp), %r12
movq -0x38(%rbp), %r13
jb 0x3017
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x3017
testl %ecx, %ecx
jne 0x2aad
movl -0x2c(%rbp), %ecx
movl %ecx, (%r14)
addl %r15d, %eax
jmp 0x2d91
movq -0xa0(%rbp), %r15
callq 0x2030
movq %rax, %r14
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
leaq -0x40(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x20f0
cmpq %r15, (%r12)
je 0x3023
movl (%r14), %eax
testl %eax, %eax
movsd %xmm0, -0x38(%rbp)
je 0x2db4
cmpl $0x22, %eax
jne 0x2dba
leaq 0x15d4(%rip), %rdi      # 0x40dd
callq 0x21f0
movq %r13, -0x38(%rbp)
movq -0xa0(%rbp), %r12
callq 0x2030
movq %rax, %r14
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
leaq -0x40(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x21c0
cmpq %r12, (%r13)
je 0x302f
movq %rax, %r15
movslq %r15d, %rax
cmpq %r15, %rax
jne 0x303b
movl (%r14), %eax
cmpl $0x22, %eax
je 0x303b
testl %eax, %eax
jne 0x2b70
movl -0x2c(%rbp), %eax
movl %eax, (%r14)
movq -0x80(%rbp), %r12
movl (%r14), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x21c0
cmpq %r12, (%r13)
je 0x3053
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rdx
cmpq %rcx, %rdx
leaq -0x50(%rbp), %r12
movq -0x38(%rbp), %r13
jb 0x305f
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x305f
testl %ecx, %ecx
jne 0x2bd3
movl -0x2c(%rbp), %ecx
movl %ecx, (%r14)
subl %eax, %r15d
leaq 0x14e4(%rip), %rsi      # 0x40c1
leaq -0x330(%rbp), %rdi
movl %r15d, %edx
jmp 0x2da1
movl %eax, %edi
callq 0x22bc
movl $0x1, %eax
jmp 0x2fb1
callq 0x2333
movl $0x2, %eax
jmp 0x2fb1
movl -0x2c(%rbp), %eax
movl %eax, (%r14)
movq -0x80(%rbp), %r15
movl (%r14), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
movq %r15, %rdi
movq %r12, %rsi
callq 0x20f0
cmpq %r15, (%r12)
je 0x2fff
movl (%r14), %eax
testl %eax, %eax
leaq -0xb0(%rbp), %r15
leaq -0x50(%rbp), %r12
je 0x2c5b
cmpl $0x22, %eax
jne 0x2c61
leaq 0x1487(%rip), %rdi      # 0x40dd
callq 0x21f0
movl -0x2c(%rbp), %eax
movl %eax, (%r14)
movsd -0x38(%rbp), %xmm1
addsd %xmm0, %xmm1
jmp 0x2e72
movq -0xa0(%rbp), %r15
callq 0x2030
movq %rax, %r14
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
leaq -0x40(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x20f0
cmpq %r15, (%r12)
je 0x306b
movl (%r14), %eax
testl %eax, %eax
movsd %xmm0, -0x38(%rbp)
je 0x2e14
cmpl $0x22, %eax
jne 0x2e1a
leaq 0x141a(%rip), %rdi      # 0x40dd
callq 0x21f0
movq %r13, -0x38(%rbp)
movq -0xa0(%rbp), %r12
callq 0x2030
movq %rax, %r14
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
leaq -0x40(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x21c0
cmpq %r12, (%r13)
je 0x3077
movq %rax, %r15
movslq %r15d, %rax
cmpq %r15, %rax
jne 0x3083
movl (%r14), %eax
cmpl $0x22, %eax
je 0x3083
testl %eax, %eax
jne 0x2d2a
movl -0x2c(%rbp), %eax
movl %eax, (%r14)
movq -0x80(%rbp), %r12
movl (%r14), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x21c0
cmpq %r12, (%r13)
je 0x309b
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rdx
cmpq %rcx, %rdx
leaq -0x50(%rbp), %r12
movq -0x38(%rbp), %r13
jb 0x30a7
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x30a7
testl %ecx, %ecx
jne 0x2d8d
movl -0x2c(%rbp), %ecx
movl %ecx, (%r14)
imull %r15d, %eax
leaq 0x1329(%rip), %rsi      # 0x40c1
leaq -0x330(%rbp), %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x2050
leaq -0xb0(%rbp), %r15
jmp 0x2e8b
movl -0x2c(%rbp), %eax
movl %eax, (%r14)
movq -0x80(%rbp), %r15
movl (%r14), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
movq %r15, %rdi
movq %r12, %rsi
callq 0x20f0
cmpq %r15, (%r12)
je 0x3047
movl (%r14), %eax
testl %eax, %eax
leaq -0xb0(%rbp), %r15
leaq -0x50(%rbp), %r12
je 0x2e03
cmpl $0x22, %eax
jne 0x2e09
leaq 0x12df(%rip), %rdi      # 0x40dd
callq 0x21f0
movl -0x2c(%rbp), %eax
movl %eax, (%r14)
movsd -0x38(%rbp), %xmm1
subsd %xmm0, %xmm1
jmp 0x2e72
movl -0x2c(%rbp), %eax
movl %eax, (%r14)
movq -0x80(%rbp), %r15
movl (%r14), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
movq %r15, %rdi
movq %r12, %rsi
callq 0x20f0
cmpq %r15, (%r12)
je 0x308f
movl (%r14), %eax
testl %eax, %eax
leaq -0xb0(%rbp), %r15
leaq -0x50(%rbp), %r12
je 0x2e63
cmpl $0x22, %eax
jne 0x2e69
leaq 0x127f(%rip), %rdi      # 0x40dd
callq 0x21f0
movl -0x2c(%rbp), %eax
movl %eax, (%r14)
movsd -0x38(%rbp), %xmm1
mulsd %xmm0, %xmm1
leaq 0x1241(%rip), %rsi      # 0x40ba
leaq -0x330(%rbp), %rdi
movapd %xmm1, %xmm0
movb $0x1, %al
callq 0x2050
leaq 0x1233(%rip), %rdi      # 0x40c5
leaq -0x330(%rbp), %r14
movq %r14, %rsi
xorl %eax, %eax
callq 0x2040
movq %r14, %rdi
callq 0x20b0
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x20c0
leaq -0x560(%rbp), %rsi
movl $0x200, %edx            # imm = 0x200
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x2090
movslq %eax, %rsi
movb $0x0, -0x560(%rbp,%rsi)
leaq 0x11bc(%rip), %rdi      # 0x409d
leaq -0x560(%rbp), %rdx
xorl %eax, %eax
callq 0x2040
movl %ebx, %edi
callq 0x2270
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x2f0f
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x2f31
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x2f46
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2160
movq 0x307b(%rip), %rsi      # 0x5fc8
leaq -0x6e0(%rbp), %rdi
callq 0x21d0
leaq -0x668(%rbp), %rdi
callq 0x20a0
movq $-0x60, %rbx
leaq -0xe0(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x2f87
movq (%r14), %rsi
incq %rsi
callq 0x2160
addq $-0x20, %r14
addq $0x20, %rbx
jne 0x2f73
movq -0xc0(%rbp), %rdi
cmpq %r15, %rdi
je 0x2fac
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x2160
movq %r13, %rsp
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x22ec
jmp 0x2697
movl %edi, %eax
movq %rsi, %rdi
movl %eax, %esi
callq 0x2290
callq 0x231b
leaq 0x10fb(%rip), %rdi      # 0x40dd
callq 0x20d0
leaq 0x10f4(%rip), %rdi      # 0x40e2
callq 0x20d0
leaq 0x10e8(%rip), %rdi      # 0x40e2
callq 0x21f0
leaq 0x10d7(%rip), %rdi      # 0x40dd
callq 0x20d0
leaq 0x10d0(%rip), %rdi      # 0x40e2
callq 0x20d0
leaq 0x10c4(%rip), %rdi      # 0x40e2
callq 0x21f0
leaq 0x10b3(%rip), %rdi      # 0x40dd
callq 0x20d0
leaq 0x10ac(%rip), %rdi      # 0x40e2
callq 0x20d0
leaq 0x10a0(%rip), %rdi      # 0x40e2
callq 0x21f0
leaq 0x108f(%rip), %rdi      # 0x40dd
callq 0x20d0
leaq 0x1088(%rip), %rdi      # 0x40e2
callq 0x20d0
leaq 0x107c(%rip), %rdi      # 0x40e2
callq 0x21f0
leaq 0x106b(%rip), %rdi      # 0x40dd
callq 0x20d0
leaq 0x1064(%rip), %rdi      # 0x40e2
callq 0x20d0
leaq 0x1058(%rip), %rdi      # 0x40e2
callq 0x21f0
leaq 0x1047(%rip), %rdi      # 0x40dd
callq 0x20d0
leaq 0x1040(%rip), %rdi      # 0x40e2
callq 0x20d0
leaq 0x1034(%rip), %rdi      # 0x40e2
callq 0x21f0
jmp 0x30c9
jmp 0x30c9
jmp 0x30c9
jmp 0x30c9
jmp 0x30c9
jmp 0x30c9
jmp 0x30c9
jmp 0x30c9
jmp 0x30c9
jmp 0x30c9
jmp 0x30c9
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x30f3
movl -0x2c(%rbp), %eax
movl %eax, (%r14)
jmp 0x30f3
movq %rax, %rbx
jmp 0x310c
movq %rax, %rbx
jmp 0x312e
jmp 0x30eb
movq %rax, %rbx
jmp 0x3166
movq %rax, %rbx
jmp 0x3147
movq %rax, %rbx
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x310c
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x312e
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x3147
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2160
movq 0x2e7a(%rip), %rsi      # 0x5fc8
leaq -0x6e0(%rbp), %rdi
callq 0x21d0
leaq -0x668(%rbp), %rdi
callq 0x20a0
movq $-0x60, %r14
leaq -0xe0(%rbp), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x3188
movq (%r15), %rsi
incq %rsi
callq 0x2160
addq $-0x20, %r15
addq $0x20, %r14
jne 0x3174
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x31b4
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x2160
movq %rbx, %rdi
callq 0x2240