// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp_out.c
// Function: tcp_output
err_t
tcp_output(struct tcp_pcb *pcb)
{
  struct tcp_seg *seg, *useg;
  u32_t wnd, snd_nxt;
  err_t err;
  struct netif *netif;
#if TCP_CWND_DEBUG
  s16_t i = 0;
#endif /* TCP_CWND_DEBUG */

  LWIP_ASSERT_CORE_LOCKED();

  LWIP_ASSERT("tcp_output: invalid pcb", pcb != NULL);
  /* pcb->state LISTEN not allowed here */
  LWIP_ASSERT("don't call tcp_output for listen-pcbs",
              pcb->state != LISTEN);

  /* First, check if we are invoked by the TCP input processing
     code. If so, we do not output anything. Instead, we rely on the
     input processing code to call us when input processing is done
     with. */
  if (tcp_input_pcb == pcb) {
    return ERR_OK;
  }

  wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd);

  seg = pcb->unsent;

  if (seg == NULL) {
    LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: nothing to send (%p)\n",
                                   (void *)pcb->unsent));
    LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_output: snd_wnd %"TCPWNDSIZE_F
                                 ", cwnd %"TCPWNDSIZE_F", wnd %"U32_F
                                 ", seg == NULL, ack %"U32_F"\n",
                                 pcb->snd_wnd, pcb->cwnd, wnd, pcb->lastack));

    /* If the TF_ACK_NOW flag is set and the ->unsent queue is empty, construct
     * an empty ACK segment and send it. */
    if (pcb->flags & TF_ACK_NOW) {
      return tcp_send_empty_ack(pcb);
    }
    /* nothing to send: shortcut out of here */
    goto output_done;
  } else {
    LWIP_DEBUGF(TCP_CWND_DEBUG,
                ("tcp_output: snd_wnd %"TCPWNDSIZE_F", cwnd %"TCPWNDSIZE_F", wnd %"U32_F
                 ", effwnd %"U32_F", seq %"U32_F", ack %"U32_F"\n",
                 pcb->snd_wnd, pcb->cwnd, wnd,
                 lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len,
                 lwip_ntohl(seg->tcphdr->seqno), pcb->lastack));
  }

  netif = tcp_route(pcb, &pcb->local_ip, &pcb->remote_ip);
  if (netif == NULL) {
    return ERR_RTE;
  }

  /* If we don't have a local IP address, we get one from netif */
  if (ip_addr_isany(&pcb->local_ip)) {
    const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip);
    if (local_ip == NULL) {
      return ERR_RTE;
    }
    ip_addr_copy(pcb->local_ip, *local_ip);
  }

  /* Handle the current segment not fitting within the window */
  if (lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd) {
    /* We need to start the persistent timer when the next unsent segment does not fit
     * within the remaining (could be 0) send window and RTO timer is not running (we
     * have no in-flight data). If window is still too small after persist timer fires,
     * then we split the segment. We don't consider the congestion window since a cwnd
     * smaller than 1 SMSS implies in-flight data
     */
    if (wnd == pcb->snd_wnd && pcb->unacked == NULL && pcb->persist_backoff == 0) {
      pcb->persist_cnt = 0;
      pcb->persist_backoff = 1;
      pcb->persist_probe = 0;
    }
    /* We need an ACK, but can't send data now, so send an empty ACK */
    if (pcb->flags & TF_ACK_NOW) {
      return tcp_send_empty_ack(pcb);
    }
    goto output_done;
  }
  /* Stop persist timer, above conditions are not active */
  pcb->persist_backoff = 0;

  /* useg should point to last segment on unacked queue */
  useg = pcb->unacked;
  if (useg != NULL) {
    for (; useg->next != NULL; useg = useg->next);
  }
  /* data available and window allows it to be sent? */
  while (seg != NULL &&
         lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
    LWIP_ASSERT("RST not expected here!",
                (TCPH_FLAGS(seg->tcphdr) & TCP_RST) == 0);
    /* Stop sending if the nagle algorithm would prevent it
     * Don't stop:
     * - if tcp_write had a memory error before (prevent delayed ACK timeout) or
     * - if FIN was already enqueued for this PCB (SYN is always alone in a segment -
     *   either seg->next != NULL or pcb->unacked == NULL;
     *   RST is no sent using tcp_write/tcp_output.
     */
    if ((tcp_do_output_nagle(pcb) == 0) &&
        ((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) {
      break;
    }
#if TCP_CWND_DEBUG
    LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_output: snd_wnd %"TCPWNDSIZE_F", cwnd %"TCPWNDSIZE_F", wnd %"U32_F", effwnd %"U32_F", seq %"U32_F", ack %"U32_F", i %"S16_F"\n",
                                 pcb->snd_wnd, pcb->cwnd, wnd,
                                 lwip_ntohl(seg->tcphdr->seqno) + seg->len -
                                 pcb->lastack,
                                 lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i));
    ++i;
#endif /* TCP_CWND_DEBUG */

    if (pcb->state != SYN_SENT) {
      TCPH_SET_FLAG(seg->tcphdr, TCP_ACK);
    }

    err = tcp_output_segment(seg, pcb, netif);
    if (err != ERR_OK) {
      /* segment could not be sent, for whatever reason */
      tcp_set_flags(pcb, TF_NAGLEMEMERR);
      return err;
    }
#if TCP_OVERSIZE_DBGCHECK
    seg->oversize_left = 0;
#endif /* TCP_OVERSIZE_DBGCHECK */
    pcb->unsent = seg->next;
    if (pcb->state != SYN_SENT) {
      tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
    }
    snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
    if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
      pcb->snd_nxt = snd_nxt;
    }
    /* put segment on unacknowledged list if length > 0 */
    if (TCP_TCPLEN(seg) > 0) {
      seg->next = NULL;
      /* unacked list is empty? */
      if (pcb->unacked == NULL) {
        pcb->unacked = seg;
        useg = seg;
        /* unacked list is not empty? */
      } else {
        /* In the case of fast retransmit, the packet should not go to the tail
         * of the unacked queue, but rather somewhere before it. We need to check for
         * this case. -STJ Jul 27, 2004 */
        if (TCP_SEQ_LT(lwip_ntohl(seg->tcphdr->seqno), lwip_ntohl(useg->tcphdr->seqno))) {
          /* add segment to before tail of unacked list, keeping the list sorted */
          struct tcp_seg **cur_seg = &(pcb->unacked);
          while (*cur_seg &&
                 TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
            cur_seg = &((*cur_seg)->next );
          }
          seg->next = (*cur_seg);
          (*cur_seg) = seg;
        } else {
          /* add segment to tail of unacked list */
          useg->next = seg;
          useg = useg->next;
        }
      }
      /* do not queue empty segments on the unacked list */
    } else {
      tcp_seg_free(seg);
    }
    seg = pcb->unsent;
  }
#if TCP_OVERSIZE
  if (pcb->unsent == NULL) {
    /* last unsent has been removed, reset unsent_oversize */
    pcb->unsent_oversize = 0;
  }
#endif /* TCP_OVERSIZE */

output_done:
  tcp_clear_flags(pcb, TF_NAGLEMEMERR);
  return ERR_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x14bb7
jmp 0x14b88
leaq 0x1273d(%rip), %rdi     # 0x272cc
leaq 0x14266(%rip), %rsi     # 0x28dfc
movl $0x4e1, %edx            # imm = 0x4E1
leaq 0x13e30(%rip), %rcx     # 0x289d2
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x14bb9
jmp 0x14bbb
movq -0x10(%rbp), %rax
cmpl $0x1, 0x48(%rax)
jne 0x14bf6
jmp 0x14bc7
leaq 0x126fe(%rip), %rdi     # 0x272cc
leaq 0x1423f(%rip), %rsi     # 0x28e14
movl $0x4e4, %edx            # imm = 0x4E4
leaq 0x13df1(%rip), %rcx     # 0x289d2
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x14bf8
leaq 0x1ad81(%rip), %rax     # 0x2f980
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x14c11
movb $0x0, -0x1(%rbp)
jmp 0x1539d
movq -0x10(%rbp), %rax
movzwl 0x98(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0x80(%rcx), %ecx
cmpl %ecx, %eax
jge 0x14c3b
movq -0x10(%rbp), %rax
movzwl 0x98(%rax), %eax
movl %eax, -0x4c(%rbp)
jmp 0x14c49
movq -0x10(%rbp), %rax
movzwl 0x80(%rax), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x14c93
jmp 0x14c67
jmp 0x14c69
jmp 0x14c6b
jmp 0x14c6d
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x14c8e
movq -0x10(%rbp), %rdi
callq 0x153b0
movb %al, -0x1(%rbp)
jmp 0x1539d
jmp 0x1537f
jmp 0x14c95
jmp 0x14c97
jmp 0x14c99
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x18, %rdx
callq 0x15530
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x14cc2
movb $-0x4, -0x1(%rbp)
jmp 0x1539d
movq -0x10(%rbp), %rax
cmpq $0x0, %rax
jne 0x14cd7
movb $0x1, %al
testb $0x1, %al
jne 0x14d47
jmp 0x14e71
movq -0x10(%rbp), %rax
cmpq $0x0, %rax
je 0x14d30
movq -0x10(%rbp), %rax
movzbl 0x14(%rax), %eax
cmpl $0x6, %eax
jne 0x14d30
movq -0x10(%rbp), %rax
cmpq $0x0, %rax
je 0x14d47
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x14e71
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x14e71
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x14e71
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0x14d47
jmp 0x14e71
movq -0x10(%rbp), %rax
cmpq $0x0, %rax
je 0x14d47
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x14e71
movq -0x10(%rbp), %rax
addq $0x18, %rax
cmpq $0x0, %rax
je 0x14d92
movq -0x10(%rbp), %rax
movzbl 0x2c(%rax), %eax
cmpl $0x6, %eax
jne 0x14d92
cmpq $0x0, -0x38(%rbp)
je 0x14d80
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x1c290
movq %rax, -0x58(%rbp)
jmp 0x14d88
xorl %eax, %eax
movq %rax, -0x58(%rbp)
jmp 0x14d88
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x14db7
cmpq $0x0, -0x38(%rbp)
je 0x14da7
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x68(%rbp)
jmp 0x14daf
xorl %eax, %eax
movq %rax, -0x68(%rbp)
jmp 0x14daf
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x14dcf
movb $-0x4, -0x1(%rbp)
jmp 0x1539d
jmp 0x14dd1
jmp 0x14dd3
movq -0x40(%rbp), %rax
movb 0x14(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x14(%rax)
movq -0x40(%rbp), %rax
movzbl 0x14(%rax), %eax
cmpl $0x6, %eax
jne 0x14e36
jmp 0x14df0
movq -0x40(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x40(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x40(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x40(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x40(%rbp), %rax
movb 0x10(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x10(%rax)
jmp 0x14e6d
movq -0x40(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x10(%rax)
jmp 0x14e6d
jmp 0x14e6f
jmp 0x14e71
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %edi
callq 0x251f0
movq -0x10(%rbp), %rcx
subl 0x7c(%rcx), %eax
movq -0x18(%rbp), %rcx
movzwl 0x10(%rcx), %ecx
addl %ecx, %eax
cmpl -0x24(%rbp), %eax
jbe 0x14f0e
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0x98(%rcx), %ecx
cmpl %ecx, %eax
jne 0x14ee8
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
jne 0x14ee8
movq -0x10(%rbp), %rax
movzbl 0xfd(%rax), %eax
cmpl $0x0, %eax
jne 0x14ee8
movq -0x10(%rbp), %rax
movb $0x0, 0xfc(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0xfd(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0xfe(%rax)
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x14f09
movq -0x10(%rbp), %rdi
callq 0x153b0
movb %al, -0x1(%rbp)
jmp 0x1539d
jmp 0x1537f
movq -0x10(%rbp), %rax
movb $0x0, 0xfd(%rax)
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x14f4c
jmp 0x14f31
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x14f4a
jmp 0x14f3d
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x14f31
jmp 0x14f4c
jmp 0x14f4e
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x69(%rbp)
je 0x14f84
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %edi
callq 0x251f0
movq -0x10(%rbp), %rcx
subl 0x7c(%rcx), %eax
movq -0x18(%rbp), %rcx
movzwl 0x10(%rcx), %ecx
addl %ecx, %eax
cmpl -0x24(%rbp), %eax
setbe %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x14f90
jmp 0x15362
jmp 0x14f92
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movzwl 0xc(%rax), %edi
callq 0x251c0
movzwl %ax, %eax
andl $0x3f, %eax
movzbl %al, %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x14fe5
jmp 0x14fb6
leaq 0x1230f(%rip), %rdi     # 0x272cc
leaq 0x13e76(%rip), %rsi     # 0x28e3a
movl $0x537, %edx            # imm = 0x537
leaq 0x13a02(%rip), %rcx     # 0x289d2
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x14fe7
movq -0x10(%rbp), %rcx
movb $0x1, %al
cmpq $0x0, 0xb0(%rcx)
movb %al, -0x6a(%rbp)
je 0x15086
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %ecx
andl $0x44, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x6a(%rbp)
jne 0x15086
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
je 0x15057
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rcx
movb $0x1, %al
cmpq $0x0, (%rcx)
movb %al, -0x6a(%rbp)
jne 0x15086
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movzwl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %edx
movb $0x1, %al
cmpl %edx, %ecx
movb %al, -0x6a(%rbp)
jge 0x15086
movq -0x10(%rbp), %rax
movzwl 0x9c(%rax), %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x6b(%rbp)
je 0x15080
movq -0x10(%rbp), %rax
movzwl 0x9e(%rax), %eax
cmpl $0x5a, %eax
setge %al
movb %al, -0x6b(%rbp)
movb -0x6b(%rbp), %al
movb %al, -0x6a(%rbp)
movb -0x6a(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
jne 0x150b2
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
andl $0xa0, %eax
cmpl $0x0, %eax
jne 0x150b2
jmp 0x15362
movq -0x10(%rbp), %rax
cmpl $0x2, 0x48(%rax)
je 0x150ef
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movzwl 0xc(%rax), %eax
movl %eax, -0x70(%rbp)
movl $0x10, %edi
callq 0x251c0
movw %ax, %cx
movl -0x70(%rbp), %eax
movzwl %cx, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movw %cx, 0xc(%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x155c0
movb %al, -0x29(%rbp)
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
je 0x15131
jmp 0x1510e
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
orl $0x80, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x52(%rax)
movb -0x29(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x1539d
movq -0x18(%rbp), %rax
movw $0x0, 0x12(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x48(%rax)
je 0x15173
jmp 0x15159
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
andl $0xfffc, %eax           # imm = 0xFFFC
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x52(%rax)
jmp 0x15173
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %edi
callq 0x251f0
movl %eax, -0x74(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x10(%rax), %eax
movl %eax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movzwl 0xc(%rax), %edi
callq 0x251c0
movl -0x78(%rbp), %ecx
movw %ax, %dx
movl -0x74(%rbp), %eax
movzwl %dx, %edx
andl $0x3f, %edx
movzbl %dl, %edi
andl $0x3, %edi
xorl %edx, %edx
movl $0x1, %esi
cmpl $0x0, %edi
cmovnel %esi, %edx
addl %edx, %ecx
addl %ecx, %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x88(%rax), %eax
subl -0x28(%rbp), %eax
cmpl $0x0, %eax
jge 0x151ea
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x88(%rax)
movq -0x18(%rbp), %rax
movzwl 0x10(%rax), %eax
movl %eax, -0x7c(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movzwl 0xc(%rax), %edi
callq 0x251c0
movw %ax, %cx
movl -0x7c(%rbp), %eax
movzwl %cx, %ecx
andl $0x3f, %ecx
movzbl %cl, %esi
andl $0x3, %esi
xorl %ecx, %ecx
movl $0x1, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
addl %ecx, %eax
cmpl $0x0, %eax
jbe 0x15345
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
jne 0x15265
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x15343
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %edi
callq 0x251f0
movl %eax, -0x80(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %edi
callq 0x251f0
movl %eax, %ecx
movl -0x80(%rbp), %eax
subl %ecx, %eax
cmpl $0x0, %eax
jge 0x1532b
movq -0x10(%rbp), %rax
addq $0xb0, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, (%rcx)
movb %al, -0x81(%rbp)
je 0x152f7
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %edi
callq 0x251f0
movl %eax, -0x88(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %edi
callq 0x251f0
movl %eax, %ecx
movl -0x88(%rbp), %eax
subl %ecx, %eax
cmpl $0x0, %eax
setl %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x15303
jmp 0x15310
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x152a6
movq -0x48(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
jmp 0x15341
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x15343
jmp 0x1534e
movq -0x18(%rbp), %rdi
callq 0xd7a0
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x14f4e
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x1537d
movq -0x10(%rbp), %rax
movw $0x0, 0xa0(%rax)
jmp 0x1537f
jmp 0x15381
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
andl $0xff7f, %eax           # imm = 0xFF7F
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x52(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)