// File: 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
subq $0x880, %rsp            # imm = 0x880
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
je 0x25fb
movq 0x39f2(%rip), %rax      # 0x5fc8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movl -0x8(%rbp), %ecx
leaq 0x1a3a(%rip), %rsi      # 0x4024
movb $0x0, %al
callq 0x2290
movl $0x1, %edi
callq 0x2220
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x2120
movl $0x0, -0x4c(%rbp)
movl $0x1, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x1a15(%rip), %rsi      # 0x403d
leaq -0x50(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0x2240
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x267a
movq 0x3984(%rip), %rax      # 0x5fc8
movq (%rax), %rax
movq %rax, -0x6f8(%rbp)
movl -0x1c(%rbp), %edi
callq 0x2270
movq -0x6f8(%rbp), %rdi
movq %rax, %rdx
leaq 0x19db(%rip), %rsi      # 0x4042
movb $0x0, %al
callq 0x2290
movl $0x1, -0x4(%rbp)
jmp 0x3126
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x26fb
movq -0x60(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x60(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x60(%rbp), %rax
movl 0xc(%rax), %edx
callq 0x2070
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
jne 0x26b9
leaq 0x19a1(%rip), %rdi      # 0x4053
callq 0x2190
jmp 0x26ed
movl -0x14(%rbp), %edi
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x60(%rbp), %rax
movl 0x10(%rax), %edx
callq 0x2180
cmpl $-0x1, %eax
jne 0x26eb
movl -0x14(%rbp), %edi
callq 0x2330
leaq 0x197e(%rip), %rdi      # 0x4062
callq 0x2190
jmp 0x26ed
jmp 0x26fb
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x2682
cmpq $0x0, -0x60(%rbp)
jne 0x2726
movq 0x38bf(%rip), %rax      # 0x5fc8
movq (%rax), %rdi
leaq 0x195f(%rip), %rsi      # 0x4072
movb $0x0, %al
callq 0x2290
movl $0x2, -0x4(%rbp)
jmp 0x3126
movl -0x14(%rbp), %edi
leaq -0x460(%rbp), %rsi
movl $0x200, %edx            # imm = 0x200
xorl %ecx, %ecx
callq 0x20b0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x275b
leaq 0x1941(%rip), %rdi      # 0x408d
callq 0x2190
movl $0x1, %edi
callq 0x2220
movslq -0x1c(%rbp), %rax
movb $0x0, -0x460(%rbp,%rax)
movl -0x1c(%rbp), %esi
leaq -0x460(%rbp), %rdx
leaq 0x1925(%rip), %rdi      # 0x409d
movb $0x0, %al
callq 0x2040
movq 0x385a(%rip), %rdi      # 0x5fe0
leaq -0x260(%rbp), %rsi
movq %rsi, -0x710(%rbp)
callq 0x3140
movq -0x710(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, -0x714(%rbp)
callq 0x20f0
movl -0x714(%rbp), %edi
movq -0x710(%rbp), %rsi
movq %rax, %rdx
xorl %ecx, %ecx
movl %ecx, -0x704(%rbp)
callq 0x2110
movl -0x704(%rbp), %ecx
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %edi
leaq -0x460(%rbp), %rsi
movl $0x200, %edx            # imm = 0x200
callq 0x20b0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x468(%rbp)
movq %rax, %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rdi
subq %rcx, %rdi
movq %rdi, -0x700(%rbp)
movq %rdi, %rsp
movq %rax, -0x470(%rbp)
leaq 0x1899(%rip), %rsi      # 0x40ba
leaq 0x1895(%rip), %rdx      # 0x40bd
movb $0x0, %al
callq 0x2060
movslq -0x1c(%rbp), %rax
movb $0x0, -0x460(%rbp,%rax)
movl -0x1c(%rbp), %esi
leaq -0x460(%rbp), %rdx
leaq 0x1851(%rip), %rdi      # 0x409d
movb $0x0, %al
callq 0x2040
movq -0x700(%rbp), %rsi
leaq -0x460(%rbp), %rdi
callq 0x2280
cmpl $0x0, %eax
jne 0x2889
movl -0x14(%rbp), %edi
callq 0x2330
movl $0x0, -0x4(%rbp)
movl $0x1, -0x474(%rbp)
jmp 0x311c
leaq -0x499(%rbp), %rdi
movq %rdi, -0x720(%rbp)
callq 0x2310
movq -0x720(%rbp), %rdx
leaq -0x498(%rbp), %rdi
leaq -0x460(%rbp), %rsi
callq 0x3190
jmp 0x28b8
leaq -0x499(%rbp), %rdi
callq 0x21f0
leaq -0x510(%rbp), %rax
movq %rax, %rcx
addq $0x60, %rcx
movq %rcx, -0x730(%rbp)
movq %rax, -0x728(%rbp)
movq -0x728(%rbp), %rdi
movq %rdi, -0x738(%rbp)
callq 0x2260
movq -0x738(%rbp), %rax
movq -0x730(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0x728(%rbp)
jne 0x28e0
leaq -0x690(%rbp), %rdi
leaq -0x498(%rbp), %rsi
movl $0x8, %edx
callq 0x22e0
jmp 0x292b
leaq -0x690(%rbp), %rdi
leaq -0x510(%rbp), %rsi
callq 0x2250
movq %rax, -0x740(%rbp)
jmp 0x2947
movq -0x740(%rbp), %rdi
leaq -0x4f0(%rbp), %rsi
callq 0x2250
movq %rax, -0x748(%rbp)
jmp 0x2963
movq -0x748(%rbp), %rdi
leaq -0x4d0(%rbp), %rsi
callq 0x2250
jmp 0x2978
leaq -0x6b0(%rbp), %rdi
leaq -0x510(%rbp), %rsi
callq 0x20e0
jmp 0x298d
leaq -0x4f0(%rbp), %rsi
leaq -0x6d0(%rbp), %rdi
callq 0x20e0
jmp 0x29a2
leaq -0x4d0(%rbp), %rsi
leaq -0x6f0(%rbp), %rdi
callq 0x20e0
jmp 0x29b7
xorl %eax, %eax
movl %eax, %esi
leaq -0x6b0(%rbp), %rdi
callq 0x2350
movq %rax, -0x750(%rbp)
jmp 0x29d0
movq -0x750(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x66, %eax
jne 0x2cea
leaq 0x162b(%rip), %rsi      # 0x4015
leaq -0x6b0(%rbp), %rdi
callq 0x3240
movb %al, -0x751(%rbp)
jmp 0x29fe
movb -0x751(%rbp), %al
testb $0x1, %al
jne 0x2a0d
jmp 0x2b1f
leaq -0x260(%rbp), %rax
movq %rax, -0x768(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x6d0(%rbp), %rdi
callq 0x3270
movsd %xmm0, -0x760(%rbp)
jmp 0x2a35
xorl %eax, %eax
movl %eax, %esi
leaq -0x6f0(%rbp), %rdi
callq 0x3270
movsd %xmm0, -0x770(%rbp)
jmp 0x2a4f
movq -0x768(%rbp), %rdi
movsd -0x770(%rbp), %xmm1
movsd -0x760(%rbp), %xmm0
addsd %xmm1, %xmm0
leaq 0x1659(%rip), %rsi      # 0x40ca
movb $0x1, %al
callq 0x2060
jmp 0x2ce5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4a8(%rbp)
movl %eax, -0x4ac(%rbp)
leaq -0x499(%rbp), %rdi
callq 0x21f0
jmp 0x312e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4a8(%rbp)
movl %eax, -0x4ac(%rbp)
jmp 0x30c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4a8(%rbp)
movl %eax, -0x4ac(%rbp)
jmp 0x3077
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4a8(%rbp)
movl %eax, -0x4ac(%rbp)
jmp 0x306b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4a8(%rbp)
movl %eax, -0x4ac(%rbp)
jmp 0x305f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4a8(%rbp)
movl %eax, -0x4ac(%rbp)
leaq -0x6f0(%rbp), %rdi
callq 0x2140
jmp 0x305f
leaq 0x14ea(%rip), %rsi      # 0x4010
leaq -0x6b0(%rbp), %rdi
callq 0x3240
movb %al, -0x771(%rbp)
jmp 0x2b3a
movb -0x771(%rbp), %al
testb $0x1, %al
jne 0x2b46
jmp 0x2bb6
leaq -0x260(%rbp), %rax
movq %rax, -0x788(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x6d0(%rbp), %rdi
callq 0x3270
movsd %xmm0, -0x780(%rbp)
jmp 0x2b6e
xorl %eax, %eax
movl %eax, %esi
leaq -0x6f0(%rbp), %rdi
callq 0x3270
movsd %xmm0, -0x790(%rbp)
jmp 0x2b88
movq -0x788(%rbp), %rdi
movsd -0x790(%rbp), %xmm1
movsd -0x780(%rbp), %xmm0
subsd %xmm1, %xmm0
leaq 0x1520(%rip), %rsi      # 0x40ca
movb $0x1, %al
callq 0x2060
jmp 0x2ce3
leaq 0x1462(%rip), %rsi      # 0x401f
leaq -0x6b0(%rbp), %rdi
callq 0x3240
movb %al, -0x791(%rbp)
jmp 0x2bd1
movb -0x791(%rbp), %al
testb $0x1, %al
jne 0x2bdd
jmp 0x2c4d
leaq -0x260(%rbp), %rax
movq %rax, -0x7a8(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x6d0(%rbp), %rdi
callq 0x3270
movsd %xmm0, -0x7a0(%rbp)
jmp 0x2c05
xorl %eax, %eax
movl %eax, %esi
leaq -0x6f0(%rbp), %rdi
callq 0x3270
movsd %xmm0, -0x7b0(%rbp)
jmp 0x2c1f
movq -0x7a8(%rbp), %rdi
movsd -0x7b0(%rbp), %xmm1
movsd -0x7a0(%rbp), %xmm0
mulsd %xmm1, %xmm0
leaq 0x1489(%rip), %rsi      # 0x40ca
movb $0x1, %al
callq 0x2060
jmp 0x2ce1
leaq 0x13c6(%rip), %rsi      # 0x401a
leaq -0x6b0(%rbp), %rdi
callq 0x3240
movb %al, -0x7b1(%rbp)
jmp 0x2c68
movb -0x7b1(%rbp), %al
testb $0x1, %al
jne 0x2c74
jmp 0x2cdf
leaq -0x260(%rbp), %rax
movq %rax, -0x7c8(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x6d0(%rbp), %rdi
callq 0x3270
movsd %xmm0, -0x7c0(%rbp)
jmp 0x2c9c
xorl %eax, %eax
movl %eax, %esi
leaq -0x6f0(%rbp), %rdi
callq 0x3270
movsd %xmm0, -0x7d0(%rbp)
jmp 0x2cb6
movq -0x7c8(%rbp), %rdi
movsd -0x7d0(%rbp), %xmm1
movsd -0x7c0(%rbp), %xmm0
divsd %xmm1, %xmm0
leaq 0x13f2(%rip), %rsi      # 0x40ca
movb $0x1, %al
callq 0x2060
jmp 0x2ce1
jmp 0x2ce3
jmp 0x2ce5
jmp 0x2f4d
leaq 0x1325(%rip), %rsi      # 0x4016
leaq -0x6b0(%rbp), %rdi
callq 0x3240
movb %al, -0x7d1(%rbp)
jmp 0x2d05
movb -0x7d1(%rbp), %al
testb $0x1, %al
jne 0x2d11
jmp 0x2d81
leaq -0x260(%rbp), %rax
movq %rax, -0x7e0(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x6d0(%rbp), %rdi
movl $0xa, %edx
callq 0x32b0
movl %eax, -0x7d8(%rbp)
jmp 0x2d3c
xorl %eax, %eax
movl %eax, %esi
leaq -0x6f0(%rbp), %rdi
movl $0xa, %edx
callq 0x32b0
movl %eax, -0x7e4(%rbp)
jmp 0x2d59
movq -0x7e0(%rbp), %rdi
movl -0x7e4(%rbp), %eax
movl -0x7d8(%rbp), %edx
addl %eax, %edx
leaq 0x135c(%rip), %rsi      # 0x40d1
movb $0x0, %al
callq 0x2060
jmp 0x2f4b
leaq 0x1289(%rip), %rsi      # 0x4011
leaq -0x6b0(%rbp), %rdi
callq 0x3240
movb %al, -0x7e5(%rbp)
jmp 0x2d9c
movb -0x7e5(%rbp), %al
testb $0x1, %al
jne 0x2da8
jmp 0x2e18
leaq -0x260(%rbp), %rax
movq %rax, -0x7f8(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x6d0(%rbp), %rdi
movl $0xa, %edx
callq 0x32b0
movl %eax, -0x7ec(%rbp)
jmp 0x2dd3
xorl %eax, %eax
movl %eax, %esi
leaq -0x6f0(%rbp), %rdi
movl $0xa, %edx
callq 0x32b0
movl %eax, -0x7fc(%rbp)
jmp 0x2df0
movq -0x7f8(%rbp), %rdi
movl -0x7fc(%rbp), %eax
movl -0x7ec(%rbp), %edx
subl %eax, %edx
leaq 0x12c5(%rip), %rsi      # 0x40d1
movb $0x0, %al
callq 0x2060
jmp 0x2f49
leaq 0x1201(%rip), %rsi      # 0x4020
leaq -0x6b0(%rbp), %rdi
callq 0x3240
movb %al, -0x7fd(%rbp)
jmp 0x2e33
movb -0x7fd(%rbp), %al
testb $0x1, %al
jne 0x2e3f
jmp 0x2eb0
leaq -0x260(%rbp), %rax
movq %rax, -0x810(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x6d0(%rbp), %rdi
movl $0xa, %edx
callq 0x32b0
movl %eax, -0x804(%rbp)
jmp 0x2e6a
xorl %eax, %eax
movl %eax, %esi
leaq -0x6f0(%rbp), %rdi
movl $0xa, %edx
callq 0x32b0
movl %eax, -0x814(%rbp)
jmp 0x2e87
movq -0x810(%rbp), %rdi
movl -0x814(%rbp), %eax
movl -0x804(%rbp), %edx
imull %eax, %edx
leaq 0x122d(%rip), %rsi      # 0x40d1
movb $0x0, %al
callq 0x2060
jmp 0x2f47
leaq 0x1164(%rip), %rsi      # 0x401b
leaq -0x6b0(%rbp), %rdi
callq 0x3240
movb %al, -0x815(%rbp)
jmp 0x2ecb
movb -0x815(%rbp), %al
testb $0x1, %al
jne 0x2ed7
jmp 0x2f45
leaq -0x260(%rbp), %rax
movq %rax, -0x828(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x6d0(%rbp), %rdi
movl $0xa, %edx
callq 0x32b0
movl %eax, -0x81c(%rbp)
jmp 0x2f02
xorl %eax, %eax
movl %eax, %esi
leaq -0x6f0(%rbp), %rdi
movl $0xa, %edx
callq 0x32b0
movl %eax, -0x82c(%rbp)
jmp 0x2f1f
movq -0x828(%rbp), %rdi
movl -0x82c(%rbp), %ecx
movl -0x81c(%rbp), %eax
cltd
idivl %ecx
movl %eax, %edx
leaq 0x1193(%rip), %rsi      # 0x40d1
movb $0x0, %al
callq 0x2060
jmp 0x2f47
jmp 0x2f49
jmp 0x2f4b
jmp 0x2f4d
leaq 0x1181(%rip), %rdi      # 0x40d5
xorl %eax, %eax
leaq -0x260(%rbp), %rsi
callq 0x2040
jmp 0x2f64
movl -0x14(%rbp), %eax
movl %eax, -0x844(%rbp)
leaq -0x260(%rbp), %rdi
movq %rdi, -0x840(%rbp)
callq 0x20f0
movl -0x844(%rbp), %edi
movq -0x840(%rbp), %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x2110
movq %rax, -0x838(%rbp)
jmp 0x2fa0
movq -0x838(%rbp), %rax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %edi
leaq -0x460(%rbp), %rsi
movl $0x200, %edx            # imm = 0x200
xorl %ecx, %ecx
callq 0x20b0
movq %rax, -0x850(%rbp)
jmp 0x2fc9
movq -0x850(%rbp), %rax
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
movb $0x0, -0x460(%rbp,%rax)
movl -0x1c(%rbp), %esi
leaq 0x10b4(%rip), %rdi      # 0x409d
xorl %eax, %eax
leaq -0x460(%rbp), %rdx
callq 0x2040
jmp 0x2ff9
movl -0x14(%rbp), %edi
callq 0x2330
jmp 0x3003
movl $0x0, -0x4(%rbp)
movl $0x1, -0x474(%rbp)
leaq -0x6f0(%rbp), %rdi
callq 0x2140
leaq -0x6d0(%rbp), %rdi
callq 0x2140
leaq -0x6b0(%rbp), %rdi
callq 0x2140
leaq -0x690(%rbp), %rdi
callq 0x2100
leaq -0x510(%rbp), %rax
movq %rax, -0x860(%rbp)
addq $0x60, %rax
movq %rax, -0x858(%rbp)
jmp 0x3085
leaq -0x6d0(%rbp), %rdi
callq 0x2140
leaq -0x6b0(%rbp), %rdi
callq 0x2140
leaq -0x690(%rbp), %rdi
callq 0x2100
jmp 0x30c4
movq -0x858(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x868(%rbp)
callq 0x2140
movq -0x860(%rbp), %rcx
movq -0x868(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x858(%rbp)
jne 0x3085
leaq -0x498(%rbp), %rdi
callq 0x2140
jmp 0x311c
leaq -0x510(%rbp), %rax
movq %rax, -0x878(%rbp)
addq $0x60, %rax
movq %rax, -0x870(%rbp)
movq -0x870(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x880(%rbp)
callq 0x2140
movq -0x878(%rbp), %rcx
movq -0x880(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x870(%rbp)
jne 0x30dd
leaq -0x498(%rbp), %rdi
callq 0x2140
jmp 0x312e
movq -0x468(%rbp), %rax
movq %rax, %rsp
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
movq -0x4a8(%rbp), %rdi
callq 0x2300
nopw (%rax,%rax)