// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp_in.c
// Function: tcp_process
static err_t
tcp_process(struct tcp_pcb *pcb)
{
  struct tcp_seg *rseg;
  u8_t acceptable = 0;
  err_t err;

  err = ERR_OK;

  LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL);

  /* Process incoming RST segments. */
  if (flags & TCP_RST) {
    /* First, determine if the reset is acceptable. */
    if (pcb->state == SYN_SENT) {
      /* "In the SYN-SENT state (a RST received in response to an initial SYN),
          the RST is acceptable if the ACK field acknowledges the SYN." */
      if (ackno == pcb->snd_nxt) {
        acceptable = 1;
      }
    } else {
      /* "In all states except SYN-SENT, all reset (RST) segments are validated
          by checking their SEQ-fields." */
      if (seqno == pcb->rcv_nxt) {
        acceptable = 1;
      } else  if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
                                  pcb->rcv_nxt + pcb->rcv_wnd)) {
        /* If the sequence number is inside the window, we send a challenge ACK
           and wait for a re-send with matching sequence number.
           This follows RFC 5961 section 3.2 and addresses CVE-2004-0230
           (RST spoofing attack), which is present in RFC 793 RST handling. */
        tcp_ack_now(pcb);
      }
    }

    if (acceptable) {
      LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n"));
      LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED);
      recv_flags |= TF_RESET;
      tcp_clear_flags(pcb, TF_ACK_DELAY);
      return ERR_RST;
    } else {
      LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n",
                                    seqno, pcb->rcv_nxt));
      LWIP_DEBUGF(TCP_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n",
                              seqno, pcb->rcv_nxt));
      return ERR_OK;
    }
  }

  if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) {
    /* Cope with new connection attempt after remote end crashed */
    tcp_ack_now(pcb);
    return ERR_OK;
  }

  if ((pcb->flags & TF_RXCLOSED) == 0) {
    /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */
    pcb->tmr = tcp_ticks;
  }
  pcb->keep_cnt_sent = 0;
  pcb->persist_probe = 0;

  tcp_parseopt(pcb);

  /* Do different things depending on the TCP state. */
  switch (pcb->state) {
    case SYN_SENT:
      LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %"U32_F" pcb->snd_nxt %"U32_F" unacked %"U32_F"\n", ackno,
                                    pcb->snd_nxt, lwip_ntohl(pcb->unacked->tcphdr->seqno)));
      /* received SYN ACK with expected sequence number? */
      if ((flags & TCP_ACK) && (flags & TCP_SYN)
          && (ackno == pcb->lastack + 1)) {
        pcb->rcv_nxt = seqno + 1;
        pcb->rcv_ann_right_edge = pcb->rcv_nxt;
        pcb->lastack = ackno;
        pcb->snd_wnd = tcphdr->wnd;
        pcb->snd_wnd_max = pcb->snd_wnd;
        pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */
        pcb->state = ESTABLISHED;

#if TCP_CALCULATE_EFF_SEND_MSS
        pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip);
#endif /* TCP_CALCULATE_EFF_SEND_MSS */

        pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
        LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SENT): cwnd %"TCPWNDSIZE_F
                                     " ssthresh %"TCPWNDSIZE_F"\n",
                                     pcb->cwnd, pcb->ssthresh));
        LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0));
        --pcb->snd_queuelen;
        LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"TCPWNDSIZE_F"\n", (tcpwnd_size_t)pcb->snd_queuelen));
        rseg = pcb->unacked;
        if (rseg == NULL) {
          /* might happen if tcp_output fails in tcp_rexmit_rto()
             in which case the segment is on the unsent list */
          rseg = pcb->unsent;
          LWIP_ASSERT("no segment to free", rseg != NULL);
          pcb->unsent = rseg->next;
        } else {
          pcb->unacked = rseg->next;
        }
        tcp_seg_free(rseg);

        /* If there's nothing left to acknowledge, stop the retransmit
           timer, otherwise reset it to start again */
        if (pcb->unacked == NULL) {
          pcb->rtime = -1;
        } else {
          pcb->rtime = 0;
          pcb->nrtx = 0;
        }

        /* Call the user specified function to call when successfully
         * connected. */
        TCP_EVENT_CONNECTED(pcb, ERR_OK, err);
        if (err == ERR_ABRT) {
          return ERR_ABRT;
        }
        tcp_ack_now(pcb);
      }
      /* received ACK? possibly a half-open connection */
      else if (flags & TCP_ACK) {
        /* send a RST to bring the other side in a non-synchronized state. */
        tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
                ip_current_src_addr(), tcphdr->dest, tcphdr->src);
        /* Resend SYN immediately (don't wait for rto timeout) to establish
          connection faster, but do not send more SYNs than we otherwise would
          have, or we might get caught in a loop on loopback interfaces. */
        if (pcb->nrtx < TCP_SYNMAXRTX) {
          pcb->rtime = 0;
          tcp_rexmit_rto(pcb);
        }
      }
      break;
    case SYN_RCVD:
      if (flags & TCP_ACK) {
        /* expected ACK number? */
        if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
          pcb->state = ESTABLISHED;
          LWIP_DEBUGF(TCP_DEBUG, ("TCP connection established %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG
          if (pcb->listener == NULL) {
            /* listen pcb might be closed by now */
            err = ERR_VAL;
          } else
#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */
          {
#if LWIP_CALLBACK_API
            LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL);
#endif
            tcp_backlog_accepted(pcb);
            /* Call the accept function. */
            TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err);
          }
          if (err != ERR_OK) {
            /* If the accept function returns with an error, we abort
             * the connection. */
            /* Already aborted? */
            if (err != ERR_ABRT) {
              tcp_abort(pcb);
            }
            return ERR_ABRT;
          }
          /* If there was any data contained within this ACK,
           * we'd better pass it on to the application as well. */
          tcp_receive(pcb);

          /* Prevent ACK for SYN to generate a sent event */
          if (recv_acked != 0) {
            recv_acked--;
          }

          pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
          LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SYN_RCVD): cwnd %"TCPWNDSIZE_F
                                       " ssthresh %"TCPWNDSIZE_F"\n",
                                       pcb->cwnd, pcb->ssthresh));

          if (recv_flags & TF_GOT_FIN) {
            tcp_ack_now(pcb);
            pcb->state = CLOSE_WAIT;
          }
        } else {
          /* incorrect ACK number, send RST */
          tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
                  ip_current_src_addr(), tcphdr->dest, tcphdr->src);
        }
      } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) {
        /* Looks like another copy of the SYN - retransmit our SYN-ACK */
        tcp_rexmit(pcb);
      }
      break;
    case CLOSE_WAIT:
    /* FALLTHROUGH */
    case ESTABLISHED:
      tcp_receive(pcb);
      if (recv_flags & TF_GOT_FIN) { /* passive close */
        tcp_ack_now(pcb);
        pcb->state = CLOSE_WAIT;
      }
      break;
    case FIN_WAIT_1:
      tcp_receive(pcb);
      if (recv_flags & TF_GOT_FIN) {
        if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
            pcb->unsent == NULL) {
          LWIP_DEBUGF(TCP_DEBUG,
                      ("TCP connection closed: FIN_WAIT_1 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
          tcp_ack_now(pcb);
          tcp_pcb_purge(pcb);
          TCP_RMV_ACTIVE(pcb);
          pcb->state = TIME_WAIT;
          TCP_REG(&tcp_tw_pcbs, pcb);
        } else {
          tcp_ack_now(pcb);
          pcb->state = CLOSING;
        }
      } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
                 pcb->unsent == NULL) {
        pcb->state = FIN_WAIT_2;
      }
      break;
    case FIN_WAIT_2:
      tcp_receive(pcb);
      if (recv_flags & TF_GOT_FIN) {
        LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: FIN_WAIT_2 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
        tcp_ack_now(pcb);
        tcp_pcb_purge(pcb);
        TCP_RMV_ACTIVE(pcb);
        pcb->state = TIME_WAIT;
        TCP_REG(&tcp_tw_pcbs, pcb);
      }
      break;
    case CLOSING:
      tcp_receive(pcb);
      if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
        LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
        tcp_pcb_purge(pcb);
        TCP_RMV_ACTIVE(pcb);
        pcb->state = TIME_WAIT;
        TCP_REG(&tcp_tw_pcbs, pcb);
      }
      break;
    case LAST_ACK:
      tcp_receive(pcb);
      if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
        LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: LAST_ACK %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
        /* bugfix #21699: don't set pcb->state to CLOSED here or we risk leaking segments */
        recv_flags |= TF_CLOSED;
      }
      break;
    default:
      break;
  }
  return ERR_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movb $0x0, -0x19(%rbp)
movb $0x0, -0x1a(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xff5f
jmp 0xff30
leaq 0x17395(%rip), %rdi     # 0x272cc
leaq 0x1886a(%rip), %rsi     # 0x287a8
movl $0x32c, %edx            # imm = 0x32C
leaq 0x1865a(%rip), %rcx     # 0x285a4
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xff61
movzbl 0x1f9e4(%rip), %eax     # 0x2f94c
andl $0x4, %eax
cmpl $0x0, %eax
je 0x10084
movq -0x10(%rbp), %rax
cmpl $0x2, 0x48(%rax)
jne 0xff96
movl 0x1f9c4(%rip), %eax     # 0x2f948
movq -0x10(%rbp), %rcx
cmpl 0x88(%rcx), %eax
jne 0xff94
movb $0x1, -0x19(%rbp)
jmp 0xfff9
movl 0x1f9a8(%rip), %eax     # 0x2f944
movq -0x10(%rbp), %rcx
cmpl 0x5c(%rcx), %eax
jne 0xffab
movb $0x1, -0x19(%rbp)
jmp 0xfff7
movl 0x1f993(%rip), %eax     # 0x2f944
movq -0x10(%rbp), %rcx
subl 0x5c(%rcx), %eax
cmpl $0x0, %eax
jl 0xfff5
movl 0x1f981(%rip), %eax     # 0x2f944
movq -0x10(%rbp), %rcx
movl 0x5c(%rcx), %ecx
movq -0x10(%rbp), %rdx
movzwl 0x60(%rdx), %edx
addl %edx, %ecx
subl %ecx, %eax
cmpl $0x0, %eax
jg 0xfff5
jmp 0xffdd
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
orl $0x2, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x52(%rax)
jmp 0xfff5
jmp 0xfff7
jmp 0xfff9
cmpb $0x0, -0x19(%rbp)
je 0x10073
jmp 0x10001
jmp 0x10003
jmp 0x10005
movq -0x10(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jne 0x10040
jmp 0x10011
leaq 0x172b4(%rip), %rdi     # 0x272cc
leaq 0x187a2(%rip), %rsi     # 0x287c1
movl $0x348, %edx            # imm = 0x348
leaq 0x18579(%rip), %rcx     # 0x285a4
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x10042
movzbl 0x1f92f(%rip), %eax     # 0x2f978
orl $0x8, %eax
movb %al, 0x1f926(%rip)      # 0x2f978
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
andl $0xfffe, %eax           # imm = 0xFFFE
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x52(%rax)
movb $-0xe, -0x1(%rbp)
jmp 0x10bbb
jmp 0x10075
jmp 0x10077
jmp 0x10079
jmp 0x1007b
movb $0x0, -0x1(%rbp)
jmp 0x10bbb
movzbl 0x1f8c1(%rip), %eax     # 0x2f94c
andl $0x2, %eax
cmpl $0x0, %eax
je 0x100c8
movq -0x10(%rbp), %rax
cmpl $0x2, 0x48(%rax)
je 0x100c8
movq -0x10(%rbp), %rax
cmpl $0x3, 0x48(%rax)
je 0x100c8
jmp 0x100a9
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
orl $0x2, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x52(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x10bbb
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x100e8
leaq 0x1f83d(%rip), %rax     # 0x2f91c
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x58(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0xff(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0xfe(%rax)
movq -0x10(%rbp), %rdi
callq 0x10cc0
movq -0x10(%rbp), %rax
movl 0x48(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x7, %eax
ja 0x10bb5
movq -0x40(%rbp), %rax
leaq 0x18441(%rip), %rcx     # 0x2856c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x10136
jmp 0x10138
movzbl 0x1f80d(%rip), %eax     # 0x2f94c
andl $0x10, %eax
cmpl $0x0, %eax
je 0x1046e
movzbl 0x1f7fa(%rip), %eax     # 0x2f94c
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1046e
movl 0x1f7e4(%rip), %eax     # 0x2f948
movq -0x10(%rbp), %rcx
movl 0x7c(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x1046e
movl 0x1f7c8(%rip), %ecx     # 0x2f944
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x5c(%rax)
movq -0x10(%rbp), %rax
movl 0x5c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
movl 0x1f7ae(%rip), %ecx     # 0x2f948
movq -0x10(%rbp), %rax
movl %ecx, 0x7c(%rax)
movq 0x1f780(%rip), %rax     # 0x2f928
movw 0xe(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x98(%rax)
movq -0x10(%rbp), %rax
movw 0x98(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x9a(%rax)
movl 0x1f771(%rip), %ecx     # 0x2f944
subl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8c(%rax)
movq -0x10(%rbp), %rax
movl $0x4, 0x48(%rax)
movq -0x10(%rbp), %rax
movw 0x6a(%rax), %ax
movw %ax, -0x42(%rbp)
movq -0x10(%rbp), %rax
addq $0x18, %rax
cmpq $0x0, %rax
je 0x10229
movq -0x10(%rbp), %rax
movzbl 0x2c(%rax), %eax
cmpl $0x6, %eax
jne 0x10229
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x1c270
movq %rax, -0x50(%rbp)
jmp 0x1023a
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x196c0
movq %rax, -0x50(%rbp)
movw -0x42(%rbp), %ax
movq -0x50(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x18, %rdx
movzwl %ax, %edi
callq 0xd140
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x6a(%rax)
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %eax
shll $0x2, %eax
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %eax
shll %eax
cmpl $0x111c, %eax           # imm = 0x111C
jbe 0x1028b
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %eax
shll %eax
movl %eax, -0x58(%rbp)
jmp 0x10295
movl $0x111c, %eax           # imm = 0x111C
movl %eax, -0x58(%rbp)
jmp 0x10295
movl -0x54(%rbp), %eax
movl -0x58(%rbp), %ecx
cmpl %ecx, %eax
jae 0x102af
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %eax
shll $0x2, %eax
movl %eax, -0x5c(%rbp)
jmp 0x102df
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %eax
shll %eax
cmpl $0x111c, %eax           # imm = 0x111C
jbe 0x102cf
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %eax
shll %eax
movl %eax, -0x60(%rbp)
jmp 0x102d9
movl $0x111c, %eax           # imm = 0x111C
movl %eax, -0x60(%rbp)
jmp 0x102d9
movl -0x60(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x80(%rax)
jmp 0x102f2
jmp 0x102f4
movq -0x10(%rbp), %rax
movzwl 0x9e(%rax), %eax
cmpl $0x0, %eax
jg 0x10335
jmp 0x10306
leaq 0x16fbf(%rip), %rdi     # 0x272cc
leaq 0x184cd(%rip), %rsi     # 0x287e1
movl $0x37c, %edx            # imm = 0x37C
leaq 0x18284(%rip), %rcx     # 0x285a4
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x10337
movq -0x10(%rbp), %rax
movw 0x9e(%rax), %cx
addw $-0x1, %cx
movw %cx, 0x9e(%rax)
jmp 0x1034f
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x103c2
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x103ac
jmp 0x1037d
leaq 0x16f48(%rip), %rdi     # 0x272cc
leaq 0x1846c(%rip), %rsi     # 0x287f7
movl $0x384, %edx            # imm = 0x384
leaq 0x1820d(%rip), %rcx     # 0x285a4
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x103ae
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa8(%rax)
jmp 0x103d4
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x18(%rbp), %rdi
callq 0xd7a0
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
jne 0x103f7
movq -0x10(%rbp), %rax
movw $0xffff, 0x68(%rax)     # imm = 0xFFFF
jmp 0x10409
movq -0x10(%rbp), %rax
movw $0x0, 0x68(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x7a(%rax)
jmp 0x1040b
movq -0x10(%rbp), %rax
cmpq $0x0, 0xe0(%rax)
je 0x10439
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq *%rax
movb %al, -0x1a(%rbp)
jmp 0x1043d
movb $0x0, -0x1a(%rbp)
jmp 0x1043f
movsbl -0x1a(%rbp), %eax
cmpl $-0xd, %eax
jne 0x10451
movb $-0xd, -0x1(%rbp)
jmp 0x10bbb
jmp 0x10453
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
orl $0x2, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x52(%rax)
jmp 0x104ee
movzbl 0x1f4d7(%rip), %eax     # 0x2f94c
andl $0x10, %eax
cmpl $0x0, %eax
je 0x104ec
movq -0x10(%rbp), %rdi
movl 0x1f4c1(%rip), %esi     # 0x2f948
movl 0x1f4b7(%rip), %edx     # 0x2f944
movzwl 0x1f4ba(%rip), %eax     # 0x2f94e
addl %eax, %edx
movq 0x1f48b(%rip), %rax     # 0x2f928
movw 0x2(%rax), %r9w
movq 0x1f47f(%rip), %rax     # 0x2f928
leaq 0x1f2c0(%rip), %r8      # 0x2f770
movq %r8, %rcx
addq $0x3c, %rcx
addq $0x24, %r8
movzwl %r9w, %r9d
movzwl (%rax), %eax
movl %eax, (%rsp)
callq 0x16110
movq -0x10(%rbp), %rax
movzbl 0x7a(%rax), %eax
cmpl $0x6, %eax
jge 0x104ea
movq -0x10(%rbp), %rax
movw $0x0, 0x68(%rax)
movq -0x10(%rbp), %rdi
callq 0x15dd0
jmp 0x104ec
jmp 0x104ee
jmp 0x10bb7
movzbl 0x1f452(%rip), %eax     # 0x2f94c
andl $0x10, %eax
cmpl $0x0, %eax
je 0x10748
movl 0x1f43c(%rip), %eax     # 0x2f948
movq -0x10(%rbp), %rcx
movl 0x7c(%rcx), %ecx
addl $0x1, %ecx
subl %ecx, %eax
cmpl $0x0, %eax
jl 0x106f9
movl 0x1f421(%rip), %eax     # 0x2f948
movq -0x10(%rbp), %rcx
subl 0x88(%rcx), %eax
cmpl $0x0, %eax
jg 0x106f9
movq -0x10(%rbp), %rax
movl $0x4, 0x48(%rax)
jmp 0x10547
movq -0x10(%rbp), %rax
cmpq $0x0, 0xc8(%rax)
jne 0x1055e
movb $-0x6, -0x1a(%rbp)
jmp 0x105e5
jmp 0x10560
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
cmpq $0x0, 0x50(%rax)
jne 0x105a3
jmp 0x10574
leaq 0x16d51(%rip), %rdi     # 0x272cc
leaq 0x18288(%rip), %rsi     # 0x2880a
movl $0x3b8, %edx            # imm = 0x3B8
leaq 0x18016(%rip), %rcx     # 0x285a4
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x105a5
jmp 0x105a7
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
cmpq $0x0, 0x50(%rax)
je 0x105dd
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
movq 0x50(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq *%rax
movb %al, -0x1a(%rbp)
jmp 0x105e1
movb $-0x10, -0x1a(%rbp)
jmp 0x105e3
jmp 0x105e5
movsbl -0x1a(%rbp), %eax
cmpl $0x0, %eax
je 0x10609
movsbl -0x1a(%rbp), %eax
cmpl $-0xd, %eax
je 0x10600
movq -0x10(%rbp), %rdi
callq 0xbc90
movb $-0xd, -0x1(%rbp)
jmp 0x10bbb
movq -0x10(%rbp), %rdi
callq 0x10ec0
movzwl 0x1f361(%rip), %eax     # 0x2f97a
cmpl $0x0, %eax
je 0x10630
movw 0x1f355(%rip), %ax      # 0x2f97a
addw $-0x1, %ax
movw %ax, 0x1f34a(%rip)      # 0x2f97a
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %eax
shll $0x2, %eax
movl %eax, -0x64(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %eax
shll %eax
cmpl $0x111c, %eax           # imm = 0x111C
jbe 0x1065e
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %eax
shll %eax
movl %eax, -0x68(%rbp)
jmp 0x10668
movl $0x111c, %eax           # imm = 0x111C
movl %eax, -0x68(%rbp)
jmp 0x10668
movl -0x64(%rbp), %eax
movl -0x68(%rbp), %ecx
cmpl %ecx, %eax
jae 0x10682
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %eax
shll $0x2, %eax
movl %eax, -0x6c(%rbp)
jmp 0x106b2
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %eax
shll %eax
cmpl $0x111c, %eax           # imm = 0x111C
jbe 0x106a2
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %eax
shll %eax
movl %eax, -0x70(%rbp)
jmp 0x106ac
movl $0x111c, %eax           # imm = 0x111C
movl %eax, -0x70(%rbp)
jmp 0x106ac
movl -0x70(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x80(%rax)
jmp 0x106c5
movzbl 0x1f2ac(%rip), %eax     # 0x2f978
andl $0x20, %eax
cmpl $0x0, %eax
je 0x106f7
jmp 0x106d6
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
orl $0x2, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x52(%rax)
movq -0x10(%rbp), %rax
movl $0x7, 0x48(%rax)
jmp 0x10746
movq -0x10(%rbp), %rdi
movl 0x1f245(%rip), %esi     # 0x2f948
movl 0x1f23b(%rip), %edx     # 0x2f944
movzwl 0x1f23e(%rip), %eax     # 0x2f94e
addl %eax, %edx
movq 0x1f20f(%rip), %rax     # 0x2f928
movw 0x2(%rax), %r9w
movq 0x1f203(%rip), %rax     # 0x2f928
leaq 0x1f044(%rip), %r8      # 0x2f770
movq %r8, %rcx
addq $0x3c, %rcx
addq $0x24, %r8
movzwl %r9w, %r9d
movzwl (%rax), %eax
movl %eax, (%rsp)
callq 0x16110
jmp 0x10776
movzbl 0x1f1fd(%rip), %eax     # 0x2f94c
andl $0x2, %eax
cmpl $0x0, %eax
je 0x10774
movl 0x1f1e7(%rip), %eax     # 0x2f944
movq -0x10(%rbp), %rcx
movl 0x5c(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x10774
movq -0x10(%rbp), %rdi
callq 0x15e40
jmp 0x10776
jmp 0x10bb7
movq -0x10(%rbp), %rdi
callq 0x10ec0
movzbl 0x1f1ed(%rip), %eax     # 0x2f978
andl $0x20, %eax
cmpl $0x0, %eax
je 0x107b6
jmp 0x10795
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
orl $0x2, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x52(%rax)
movq -0x10(%rbp), %rax
movl $0x7, 0x48(%rax)
jmp 0x10bb7
movq -0x10(%rbp), %rdi
callq 0x10ec0
movzbl 0x1f1ad(%rip), %eax     # 0x2f978
andl $0x20, %eax
cmpl $0x0, %eax
je 0x10917
movzbl 0x1f16e(%rip), %eax     # 0x2f94c
andl $0x10, %eax
cmpl $0x0, %eax
je 0x108f2
movl 0x1f158(%rip), %eax     # 0x2f948
movq -0x10(%rbp), %rcx
cmpl 0x88(%rcx), %eax
jne 0x108f2
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x108f2
jmp 0x10814
jmp 0x10816
jmp 0x10818
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
orl $0x2, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x52(%rax)
movq -0x10(%rbp), %rdi
callq 0xd2b0
jmp 0x10839
leaq 0x1f0c8(%rip), %rax     # 0x2f908
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x10863
leaq 0x1f0b8(%rip), %rax     # 0x2f908
movq (%rax), %rax
movq 0x38(%rax), %rcx
leaq 0x1f0aa(%rip), %rax     # 0x2f908
movq %rcx, (%rax)
jmp 0x108aa
leaq 0x1f09e(%rip), %rax     # 0x2f908
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x108a8
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x10898
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x38(%rax)
jmp 0x108a8
jmp 0x1089a
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x10871
jmp 0x108aa
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
leaq 0x1f05c(%rip), %rax     # 0x2f919
movb $0x1, (%rax)
movq -0x10(%rbp), %rax
movl $0xa, 0x48(%rax)
leaq 0x1f03e(%rip), %rax     # 0x2f910
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rcx
leaq 0x1f028(%rip), %rax     # 0x2f910
movq %rcx, (%rax)
callq 0x16a90
jmp 0x10915
jmp 0x108f4
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
orl $0x2, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x52(%rax)
movq -0x10(%rbp), %rax
movl $0x8, 0x48(%rax)
jmp 0x10953
movzbl 0x1f02e(%rip), %eax     # 0x2f94c
andl $0x10, %eax
cmpl $0x0, %eax
je 0x10951
movl 0x1f01c(%rip), %eax     # 0x2f948
movq -0x10(%rbp), %rcx
cmpl 0x88(%rcx), %eax
jne 0x10951
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x10951
movq -0x10(%rbp), %rax
movl $0x6, 0x48(%rax)
jmp 0x10953
jmp 0x10bb7
movq -0x10(%rbp), %rdi
callq 0x10ec0
movzbl 0x1f010(%rip), %eax     # 0x2f978
andl $0x20, %eax
cmpl $0x0, %eax
je 0x10a54
jmp 0x10976
jmp 0x10978
jmp 0x1097a
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
orl $0x2, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x52(%rax)
movq -0x10(%rbp), %rdi
callq 0xd2b0
jmp 0x1099b
leaq 0x1ef66(%rip), %rax     # 0x2f908
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x109c5
leaq 0x1ef56(%rip), %rax     # 0x2f908
movq (%rax), %rax
movq 0x38(%rax), %rcx
leaq 0x1ef48(%rip), %rax     # 0x2f908
movq %rcx, (%rax)
jmp 0x10a0c
leaq 0x1ef3c(%rip), %rax     # 0x2f908
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x10a0a
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x109fa
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x38(%rax)
jmp 0x10a0a
jmp 0x109fc
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x109d3
jmp 0x10a0c
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
leaq 0x1eefa(%rip), %rax     # 0x2f919
movb $0x1, (%rax)
movq -0x10(%rbp), %rax
movl $0xa, 0x48(%rax)
leaq 0x1eedc(%rip), %rax     # 0x2f910
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rcx
leaq 0x1eec6(%rip), %rax     # 0x2f910
movq %rcx, (%rax)
callq 0x16a90
jmp 0x10a54
jmp 0x10bb7
movq -0x10(%rbp), %rdi
callq 0x10ec0
movzbl 0x1eee3(%rip), %eax     # 0x2f94c
andl $0x10, %eax
cmpl $0x0, %eax
je 0x10b65
movl 0x1eecd(%rip), %eax     # 0x2f948
movq -0x10(%rbp), %rcx
cmpl 0x88(%rcx), %eax
jne 0x10b65
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x10b65
jmp 0x10a9f
jmp 0x10aa1
movq -0x10(%rbp), %rdi
callq 0xd2b0
jmp 0x10aac
leaq 0x1ee55(%rip), %rax     # 0x2f908
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x10ad6
leaq 0x1ee45(%rip), %rax     # 0x2f908
movq (%rax), %rax
movq 0x38(%rax), %rcx
leaq 0x1ee37(%rip), %rax     # 0x2f908
movq %rcx, (%rax)
jmp 0x10b1d
leaq 0x1ee2b(%rip), %rax     # 0x2f908
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x10b1b
movq -0x38(%rbp), %rax
movq 0x38(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x10b0b
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x38(%rax)
jmp 0x10b1b
jmp 0x10b0d
movq -0x38(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x10ae4
jmp 0x10b1d
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
leaq 0x1ede9(%rip), %rax     # 0x2f919
movb $0x1, (%rax)
movq -0x10(%rbp), %rax
movl $0xa, 0x48(%rax)
leaq 0x1edcb(%rip), %rax     # 0x2f910
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rcx
leaq 0x1edb5(%rip), %rax     # 0x2f910
movq %rcx, (%rax)
callq 0x16a90
jmp 0x10b65
jmp 0x10bb7
movq -0x10(%rbp), %rdi
callq 0x10ec0
movzbl 0x1edd5(%rip), %eax     # 0x2f94c
andl $0x10, %eax
cmpl $0x0, %eax
je 0x10bb3
movl 0x1edc3(%rip), %eax     # 0x2f948
movq -0x10(%rbp), %rcx
cmpl 0x88(%rcx), %eax
jne 0x10bb3
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x10bb3
jmp 0x10ba1
jmp 0x10ba3
movzbl 0x1edce(%rip), %eax     # 0x2f978
orl $0x10, %eax
movb %al, 0x1edc5(%rip)      # 0x2f978
jmp 0x10bb7
jmp 0x10bb7
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)