LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_new_port
static u16_t
tcp_new_port(void)
{
  u8_t i;
  u16_t n = 0;
  struct tcp_pcb *pcb;

again:
  tcp_port++;
  if (tcp_port == TCP_LOCAL_PORT_RANGE_END) {
    tcp_port = TCP_LOCAL_PORT_RANGE_START;
  }
  /* Check all PCB lists. */
  for (i = 0; i < NUM_TCP_PCB_LISTS; i++) {
    for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) {
      if (pcb->local_port == tcp_port) {
        n++;
        if (n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) {
          return 0;
        }
        goto again;
      }
    }
  }
  return tcp_port;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw $0x0, -0x6(%rbp)
movw 0x22e27(%rip), %ax      # 0x2f148
addw $0x1, %ax
movw %ax, 0x22e1c(%rip)      # 0x2f148
movzwl 0x22e15(%rip), %eax     # 0x2f148
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0xc343
movw $0xc000, 0x22e05(%rip)  # imm = 0xC000
movb $0x0, -0x3(%rbp)
movzbl -0x3(%rbp), %eax
cmpl $0x4, %eax
jge 0xc3c2
movzbl -0x3(%rbp), %eax
movl %eax, %ecx
leaq 0x229b3(%rip), %rax     # 0x2ed10
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xc3b6
movq -0x10(%rbp), %rax
movzwl 0x4e(%rax), %eax
movzwl 0x22dca(%rip), %ecx     # 0x2f148
cmpl %ecx, %eax
jne 0xc3a6
movw -0x6(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x6(%rbp)
movzwl -0x6(%rbp), %eax
cmpl $0x3fff, %eax           # imm = 0x3FFF
jle 0xc3a1
movw $0x0, -0x2(%rbp)
jmp 0xc3cd
jmp 0xc31a
jmp 0xc3a8
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xc368
jmp 0xc3b8
movb -0x3(%rbp), %al
addb $0x1, %al
movb %al, -0x3(%rbp)
jmp 0xc347
movw 0x22d7f(%rip), %ax      # 0x2f148
movw %ax, -0x2(%rbp)
movw -0x2(%rbp), %ax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_bind_netif
void
tcp_bind_netif(struct tcp_pcb *pcb, const struct netif *netif)
{
  LWIP_ASSERT_CORE_LOCKED();
  if (netif != NULL) {
    pcb->netif_idx = netif_get_index(netif);
  } else {
    pcb->netif_idx = NETIF_NO_INDEX;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xc40c
movq -0x10(%rbp), %rax
movzbl 0xee(%rax), %eax
addl $0x1, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x30(%rax)
jmp 0xc414
movq -0x8(%rbp), %rax
movb $0x0, 0x30(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_update_rcv_ann_wnd
u32_t
tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb)
{
  u32_t new_right_edge;

  LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL);
  new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd;

  if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) {
    /* we can advertise more window */
    pcb->rcv_ann_wnd = pcb->rcv_wnd;
    return new_right_edge - pcb->rcv_ann_right_edge;
  } else {
    if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) {
      /* Can happen due to other end sending out of advertised window,
       * but within actual available (but not yet advertised) window */
      pcb->rcv_ann_wnd = 0;
    } else {
      /* keep the right edge of window constant */
      u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt;
#if !LWIP_WND_SCALE
      LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff);
#endif
      pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd;
    }
    return 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xc7b4
jmp 0xc785
leaq 0x1ab40(%rip), %rdi     # 0x272cc
leaq 0x1b70f(%rip), %rsi     # 0x27ea2
movl $0x3a6, %edx            # imm = 0x3A6
leaq 0x1b5cc(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xc7b6
movq -0x10(%rbp), %rax
movl 0x5c(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0x60(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %ecx
movl $0x4000, %eax           # imm = 0x4000
cmpl %ecx, %eax
jge 0xc7f5
movl $0x4000, %eax           # imm = 0x4000
movl %eax, -0x24(%rbp)
jmp 0xc800
movq -0x10(%rbp), %rax
movzwl 0x6a(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
movl -0x1c(%rbp), %ecx
movl -0x24(%rbp), %edx
addl %edx, %ecx
subl %ecx, %eax
cmpl $0x0, %eax
jl 0xc834
movq -0x10(%rbp), %rax
movw 0x60(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x62(%rax)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
subl 0x64(%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0xc8b5
movq -0x10(%rbp), %rax
movl 0x5c(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0x64(%rcx), %eax
cmpl $0x0, %eax
jle 0xc853
movq -0x10(%rbp), %rax
movw $0x0, 0x62(%rax)
jmp 0xc8ae
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0x5c(%rcx), %eax
movl %eax, -0x18(%rbp)
cmpl $0xffff, -0x18(%rbp)    # imm = 0xFFFF
jbe 0xc89e
jmp 0xc86f
leaq 0x1aa56(%rip), %rdi     # 0x272cc
leaq 0x1b649(%rip), %rsi     # 0x27ec6
movl $0x3b6, %edx            # imm = 0x3B6
leaq 0x1b4e2(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xc8a0
movl -0x18(%rbp), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x62(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_recved
void
tcp_recved(struct tcp_pcb *pcb, u16_t len)
{
  u32_t wnd_inflation;
  tcpwnd_size_t rcv_wnd;

  LWIP_ASSERT_CORE_LOCKED();

  LWIP_ERROR("tcp_recved: invalid pcb", pcb != NULL, return);

  /* pcb->state LISTEN not allowed here */
  LWIP_ASSERT("don't call tcp_recved for listen-pcbs",
              pcb->state != LISTEN);

  rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len);
  if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) {
    /* window got too big or tcpwnd_size_t overflow */
    LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: window got too big or tcpwnd_size_t overflow\n"));
    pcb->rcv_wnd = TCP_WND_MAX(pcb);
  } else  {
    pcb->rcv_wnd = rcv_wnd;
  }

  wnd_inflation = tcp_update_rcv_ann_wnd(pcb);

  /* If the change in the right edge of window is significant (default
   * watermark is TCP_WND/4), then send an explicit update now.
   * Otherwise wait for a packet to be sent in the normal course of
   * events (or more window to be available later) */
  if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) {
    tcp_ack_now(pcb);
    tcp_output(pcb);
  }

  LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: received %"U16_F" bytes, wnd %"TCPWNDSIZE_F" (%"TCPWNDSIZE_F").\n",
                          len, pcb->rcv_wnd, (u16_t)(TCP_WND_MAX(pcb) - pcb->rcv_wnd)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xc90b
jmp 0xc8dc
leaq 0x1a9e9(%rip), %rdi     # 0x272cc
leaq 0x1b5f6(%rip), %rsi     # 0x27ee0
movl $0x3cf, %edx            # imm = 0x3CF
leaq 0x1b475(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xc90d
jmp 0xc90f
movq -0x8(%rbp), %rax
cmpl $0x1, 0x48(%rax)
jne 0xc94a
jmp 0xc91b
leaq 0x1a9aa(%rip), %rdi     # 0x272cc
leaq 0x1b5cf(%rip), %rsi     # 0x27ef8
movl $0x3d3, %edx            # imm = 0x3D3
leaq 0x1b436(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xc94c
movq -0x8(%rbp), %rax
movzwl 0x60(%rax), %eax
movzwl -0xa(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x12(%rbp)
movzwl -0x12(%rbp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jg 0xc979
movzwl -0x12(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0x60(%rcx), %ecx
cmpl %ecx, %eax
jge 0xc989
jmp 0xc97b
jmp 0xc97d
movq -0x8(%rbp), %rax
movw $0x8000, 0x60(%rax)     # imm = 0x8000
jmp 0xc995
movw -0x12(%rbp), %cx
movq -0x8(%rbp), %rax
movw %cx, 0x60(%rax)
movq -0x8(%rbp), %rdi
callq 0xc770
movl %eax, -0x10(%rbp)
cmpl $0x16d0, -0x10(%rbp)    # imm = 0x16D0
jb 0xc9cb
jmp 0xc9ac
movq -0x8(%rbp), %rax
movzwl 0x52(%rax), %eax
orl $0x2, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x52(%rax)
movq -0x8(%rbp), %rdi
callq 0x14b70
jmp 0xc9cd
jmp 0xc9cf
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_pcb_purge
void
tcp_pcb_purge(struct tcp_pcb *pcb)
{
  LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return);

  if (pcb->state != CLOSED &&
      pcb->state != TIME_WAIT &&
      pcb->state != LISTEN) {

    LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n"));

    tcp_backlog_accepted(pcb);

    if (pcb->refused_data != NULL) {
      LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n"));
      pbuf_free(pcb->refused_data);
      pcb->refused_data = NULL;
    }
    if (pcb->unsent != NULL) {
      LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: not all data sent\n"));
    }
    if (pcb->unacked != NULL) {
      LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->unacked\n"));
    }
#if TCP_QUEUE_OOSEQ
    if (pcb->ooseq != NULL) {
      LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n"));
      tcp_free_ooseq(pcb);
    }
#endif /* TCP_QUEUE_OOSEQ */

    /* Stop the retransmission timer as it will expect data on unacked
       queue if it fires */
    pcb->rtime = -1;

    tcp_segs_free(pcb->unsent);
    tcp_segs_free(pcb->unacked);
    pcb->unacked = pcb->unsent = NULL;
#if TCP_OVERSIZE
    pcb->unsent_oversize = 0;
#endif /* TCP_OVERSIZE */
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xd2f4
jmp 0xd2c5
leaq 0x1a000(%rip), %rdi     # 0x272cc
leaq 0x1af85(%rip), %rsi     # 0x28258
movl $0x851, %edx            # imm = 0x851
leaq 0x1aa8c(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xd2f6
movq -0x8(%rbp), %rax
cmpl $0x0, 0x48(%rax)
je 0xd3ed
movq -0x8(%rbp), %rax
cmpl $0xa, 0x48(%rax)
je 0xd3ed
movq -0x8(%rbp), %rax
cmpl $0x1, 0x48(%rax)
je 0xd3ed
jmp 0xd322
jmp 0xd324
movq -0x8(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
je 0xd355
jmp 0xd334
jmp 0xd336
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rdi
callq 0x7260
movq -0x8(%rbp), %rax
movq $0x0, 0xc0(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
je 0xd369
jmp 0xd365
jmp 0xd367
jmp 0xd369
movq -0x8(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
je 0xd37d
jmp 0xd379
jmp 0xd37b
jmp 0xd37d
movq -0x8(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
je 0xd398
jmp 0xd38d
jmp 0xd38f
movq -0x8(%rbp), %rdi
callq 0xd270
movq -0x8(%rbp), %rax
movw $0xffff, 0x68(%rax)     # imm = 0xFFFF
movq -0x8(%rbp), %rax
movq 0xa8(%rax), %rdi
callq 0xbc50
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rdi
callq 0xbc50
movq -0x8(%rbp), %rax
movq $0x0, 0xa8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xb0(%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0xa0(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_txnow
void
tcp_txnow(void)
{
  struct tcp_pcb *pcb;

  for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
    if (pcb->flags & TF_NAGLEMEMERR) {
      tcp_output(pcb);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x22249(%rip), %rax     # 0x2f908
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xd6f5
movq -0x8(%rbp), %rax
movzwl 0x52(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xd6e5
movq -0x8(%rbp), %rdi
callq 0x14b70
jmp 0xd6e7
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xd6c3
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_recv_null
err_t
tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
{
  LWIP_UNUSED_ARG(arg);

  LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG);

  if (p != NULL) {
    tcp_recved(pcb, p->tot_len);
    pbuf_free(p);
  } else if (err == ERR_OK) {
    return tcp_close(pcb);
  }
  return ERR_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movb %al, -0x21(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xd751
jmp 0xd722
leaq 0x19ba3(%rip), %rdi     # 0x272cc
leaq 0x1aa65(%rip), %rsi     # 0x28195
movl $0x698, %edx            # imm = 0x698
leaq 0x1a62f(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xd753
cmpq $0x0, -0x20(%rbp)
je 0xd776
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movzwl 0x10(%rax), %esi
callq 0xc8c0
movq -0x20(%rbp), %rdi
callq 0x7260
jmp 0xd78f
movsbl -0x21(%rbp), %eax
cmpl $0x0, %eax
jne 0xd78d
movq -0x18(%rbp), %rdi
callq 0xb2a0
movb %al, -0x1(%rbp)
jmp 0xd793
jmp 0xd78f
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_seg_free
void
tcp_seg_free(struct tcp_seg *seg)
{
  if (seg != NULL) {
    if (seg->p != NULL) {
      pbuf_free(seg->p);
#if TCP_DEBUG
      seg->p = NULL;
#endif /* TCP_DEBUG */
    }
    memp_free(MEMP_TCP_SEG, seg);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xd7e5
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xd7d7
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x7260
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rsi
movl $0x4, %edi
callq 0x4a80
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_seg_copy
struct tcp_seg *
tcp_seg_copy(struct tcp_seg *seg)
{
  struct tcp_seg *cseg;

  LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL);

  cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG);
  if (cseg == NULL) {
    return NULL;
  }
  SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg));
  pbuf_ref(cseg->p);
  return cseg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xd894
jmp 0xd865
leaq 0x19a60(%rip), %rdi     # 0x272cc
leaq 0x1a908(%rip), %rsi     # 0x2817b
movl $0x682, %edx            # imm = 0x682
leaq 0x1a4ec(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xd896
movl $0x4, %edi
callq 0x4930
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xd8b5
movq $0x0, -0x8(%rbp)
jmp 0xd8f0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x7c30
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_handle_closepend
static void
tcp_handle_closepend(void)
{
  struct tcp_pcb *pcb = tcp_active_pcbs;

  while (pcb != NULL) {
    struct tcp_pcb *next = pcb->next;
    /* send pending FIN */
    if (pcb->flags & TF_CLOSEPEND) {
      LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n"));
      tcp_clear_flags(pcb, TF_CLOSEPEND);
      tcp_close_shutdown_fin(pcb);
    }
    pcb = next;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x21e49(%rip), %rax     # 0x2f908
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xdb17
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x52(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xdb0d
jmp 0xdae8
jmp 0xdaea
jmp 0xdaec
movq -0x8(%rbp), %rax
movzwl 0x52(%rax), %eax
andl $0xfff7, %eax           # imm = 0xFFF7
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x52(%rax)
movq -0x8(%rbp), %rdi
callq 0xd400
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xdac3
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_kill_timewait
static void
tcp_kill_timewait(void)
{
  struct tcp_pcb *pcb, *inactive;
  u32_t inactivity;

  inactivity = 0;
  inactive = NULL;
  /* Go through the list of TIME_WAIT pcbs and get the oldest pcb. */
  for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
    if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
      inactivity = tcp_ticks - pcb->tmr;
      inactive = pcb;
    }
  }
  if (inactive != NULL) {
    LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n",
                            (void *)inactive, inactivity));
    tcp_abort(inactive);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x14(%rbp)
movq $0x0, -0x10(%rbp)
movq 0x21dd2(%rip), %rax     # 0x2f910
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xdb83
movl 0x21dcd(%rip), %eax     # 0x2f91c
movq -0x8(%rbp), %rcx
subl 0x58(%rcx), %eax
cmpl -0x14(%rbp), %eax
jb 0xdb73
movl 0x21dbb(%rip), %eax     # 0x2f91c
movq -0x8(%rbp), %rcx
subl 0x58(%rcx), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xdb75
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xdb42
cmpq $0x0, -0x10(%rbp)
je 0xdb97
jmp 0xdb8c
jmp 0xdb8e
movq -0x10(%rbp), %rdi
callq 0xbc90
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_kill_state
static void
tcp_kill_state(enum tcp_state state)
{
  struct tcp_pcb *pcb, *inactive;
  u32_t inactivity;

  LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK));

  inactivity = 0;
  inactive = NULL;
  /* Go through the list of active pcbs and get the oldest pcb that is in state
     CLOSING/LAST_ACK. */
  for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
    if (pcb->state == state) {
      if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
        inactivity = tcp_ticks - pcb->tmr;
        inactive = pcb;
      }
    }
  }
  if (inactive != NULL) {
    LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_closing: killing oldest %s PCB %p (%"S32_F")\n",
                            tcp_state_str[state], (void *)inactive, inactivity));
    /* Don't send a RST, since no data is lost. */
    tcp_abandon(inactive, 0);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x8, -0x4(%rbp)
je 0xdbe8
cmpl $0x9, -0x4(%rbp)
je 0xdbe8
jmp 0xdbb9
leaq 0x1970c(%rip), %rdi     # 0x272cc
leaq 0x1a8f5(%rip), %rsi     # 0x284bc
movl $0x6dd, %edx            # imm = 0x6DD
leaq 0x1a198(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xdbea
movl $0x0, -0x1c(%rbp)
movq $0x0, -0x18(%rbp)
movq 0x21d08(%rip), %rax     # 0x2f908
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xdc53
movq -0x10(%rbp), %rax
movl 0x48(%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0xdc43
movl 0x21cff(%rip), %eax     # 0x2f91c
movq -0x10(%rbp), %rcx
subl 0x58(%rcx), %eax
cmpl -0x1c(%rbp), %eax
jb 0xdc41
movl 0x21ced(%rip), %eax     # 0x2f91c
movq -0x10(%rbp), %rcx
subl 0x58(%rcx), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xdc43
jmp 0xdc45
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xdc04
cmpq $0x0, -0x18(%rbp)
je 0xdc69
jmp 0xdc5c
jmp 0xdc5e
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xb750
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_kill_prio
static void
tcp_kill_prio(u8_t prio)
{
  struct tcp_pcb *pcb, *inactive;
  u32_t inactivity;
  u8_t mprio;

  mprio = LWIP_MIN(TCP_PRIO_MAX, prio);

  /* We want to kill connections with a lower prio, so bail out if 
   * supplied prio is 0 - there can never be a lower prio
   */
  if (mprio == 0) {
    return;
  }

  /* We only want kill connections with a lower prio, so decrement prio by one 
   * and start searching for oldest connection with same or lower priority than mprio.
   * We want to find the connections with the lowest possible prio, and among
   * these the one with the longest inactivity time.
   */
  mprio--;

  inactivity = 0;
  inactive = NULL;
  for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
        /* lower prio is always a kill candidate */
    if ((pcb->prio < mprio) ||
        /* longer inactivity is also a kill candidate */
        ((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) {
      inactivity = tcp_ticks - pcb->tmr;
      inactive   = pcb;
      mprio      = pcb->prio;
    }
  }
  if (inactive != NULL) {
    LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n",
                            (void *)inactive, inactivity));
    tcp_abort(inactive);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movzbl -0x1(%rbp), %ecx
movl $0x7f, %eax
cmpl %ecx, %eax
jge 0xdc95
movl $0x7f, %eax
movl %eax, -0x24(%rbp)
jmp 0xdc9c
movzbl -0x1(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movb %al, -0x1d(%rbp)
movzbl -0x1d(%rbp), %eax
cmpl $0x0, %eax
jne 0xdcb0
jmp 0xdd51
movb -0x1d(%rbp), %al
addb $-0x1, %al
movb %al, -0x1d(%rbp)
movl $0x0, -0x1c(%rbp)
movq $0x0, -0x18(%rbp)
movq 0x21c3a(%rip), %rax     # 0x2f908
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xdd3d
movq -0x10(%rbp), %rax
movzbl 0x4c(%rax), %eax
movzbl -0x1d(%rbp), %ecx
cmpl %ecx, %eax
jl 0xdd0b
movq -0x10(%rbp), %rax
movzbl 0x4c(%rax), %eax
movzbl -0x1d(%rbp), %ecx
cmpl %ecx, %eax
jne 0xdd2d
movl 0x21c1d(%rip), %eax     # 0x2f91c
movq -0x10(%rbp), %rcx
subl 0x58(%rcx), %eax
cmpl -0x1c(%rbp), %eax
jb 0xdd2d
movl 0x21c0b(%rip), %eax     # 0x2f91c
movq -0x10(%rbp), %rcx
subl 0x58(%rcx), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movb 0x4c(%rax), %al
movb %al, -0x1d(%rbp)
jmp 0xdd2f
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xdcd2
cmpq $0x0, -0x18(%rbp)
je 0xdd51
jmp 0xdd46
jmp 0xdd48
movq -0x18(%rbp), %rdi
callq 0xbc90
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_new_ip_type
struct tcp_pcb *
tcp_new_ip_type(u8_t type)
{
  struct tcp_pcb *pcb;
  pcb = tcp_alloc(TCP_PRIO_NORMAL);
#if LWIP_IPV4 && LWIP_IPV6
  if (pcb != NULL) {
    IP_SET_TYPE_VAL(pcb->local_ip, type);
    IP_SET_TYPE_VAL(pcb->remote_ip, type);
  }
#else
  LWIP_UNUSED_ARG(type);
#endif /* LWIP_IPV4 && LWIP_IPV6 */
  return pcb;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movl $0x40, %edi
callq 0xd900
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xddad
jmp 0xdd95
movb -0x1(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x14(%rax)
jmp 0xdda1
movb -0x1(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2c(%rax)
jmp 0xddad
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_poll
void
tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval)
{
  LWIP_ASSERT_CORE_LOCKED();

  LWIP_ERROR("tcp_poll: invalid pcb", pcb != NULL, return);
  LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN);

#if LWIP_CALLBACK_API
  pcb->poll = poll;
#else /* LWIP_CALLBACK_API */
  LWIP_UNUSED_ARG(poll);
#endif /* LWIP_CALLBACK_API */
  pcb->pollinterval = interval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xdfcd
jmp 0xdf9e
leaq 0x19327(%rip), %rdi     # 0x272cc
leaq 0x1a278(%rip), %rsi     # 0x28224
movl $0x83d, %edx            # imm = 0x83D
leaq 0x19db3(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xdfcf
jmp 0xdfd1
movq -0x8(%rbp), %rax
cmpl $0x1, 0x48(%rax)
jne 0xe00c
jmp 0xdfdd
leaq 0x192e8(%rip), %rdi     # 0x272cc
leaq 0x1a24f(%rip), %rsi     # 0x2823a
movl $0x83e, %edx            # imm = 0x83E
leaq 0x19d74(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xe00e
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xe8(%rax)
movb -0x11(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x55(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_pcbs_sane
s16_t
tcp_pcbs_sane(void)
{
  struct tcp_pcb *pcb;
  for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
    LWIP_ASSERT("tcp_pcbs_sane: active pcb->state != CLOSED", pcb->state != CLOSED);
    LWIP_ASSERT("tcp_pcbs_sane: active pcb->state != LISTEN", pcb->state != LISTEN);
    LWIP_ASSERT("tcp_pcbs_sane: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT);
  }
  for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
    LWIP_ASSERT("tcp_pcbs_sane: tw pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
  }
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x218c9(%rip), %rax     # 0x2f908
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe11e
jmp 0xe050
movq -0x8(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jne 0xe08b
jmp 0xe05c
leaq 0x19269(%rip), %rdi     # 0x272cc
leaq 0x1a2ee(%rip), %rsi     # 0x28358
movl $0x9d9, %edx            # imm = 0x9D9
leaq 0x19cf5(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xe08d
jmp 0xe08f
movq -0x8(%rbp), %rax
cmpl $0x1, 0x48(%rax)
jne 0xe0ca
jmp 0xe09b
leaq 0x1922a(%rip), %rdi     # 0x272cc
leaq 0x1a2da(%rip), %rsi     # 0x28383
movl $0x9da, %edx            # imm = 0x9DA
leaq 0x19cb6(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xe0cc
jmp 0xe0ce
movq -0x8(%rbp), %rax
cmpl $0xa, 0x48(%rax)
jne 0xe109
jmp 0xe0da
leaq 0x191eb(%rip), %rdi     # 0x272cc
leaq 0x1a2c6(%rip), %rsi     # 0x283ae
movl $0x9db, %edx            # imm = 0x9DB
leaq 0x19c77(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xe10b
jmp 0xe10d
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xe043
movq 0x217eb(%rip), %rax     # 0x2f910
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe17f
jmp 0xe132
movq -0x8(%rbp), %rax
cmpl $0xa, 0x48(%rax)
je 0xe16d
jmp 0xe13e
leaq 0x19187(%rip), %rdi     # 0x272cc
leaq 0x1a290(%rip), %rsi     # 0x283dc
movl $0x9de, %edx            # imm = 0x9DE
leaq 0x19c13(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xe16f
jmp 0xe171
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xe129
movw $0x1, %ax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_netif_ip_addr_changed_pcblist
static void
tcp_netif_ip_addr_changed_pcblist(const ip_addr_t *old_addr, struct tcp_pcb *pcb_list)
{
  struct tcp_pcb *pcb;
  pcb = pcb_list;

  LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL);

  while (pcb != NULL) {
    /* PCB bound to current local interface address? */
    if (ip_addr_cmp(&pcb->local_ip, old_addr)
#if LWIP_AUTOIP
        /* connections to link-local addresses must persist (RFC3927 ch. 1.9) */
        && (!IP_IS_V4_VAL(pcb->local_ip) || !ip4_addr_islinklocal(ip_2_ip4(&pcb->local_ip)))
#endif /* LWIP_AUTOIP */
       ) {
      /* this connection must be aborted */
      struct tcp_pcb *next = pcb->next;
      LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: aborting TCP pcb %p\n", (void *)pcb));
      tcp_abort(pcb);
      pcb = next;
    } else {
      pcb = pcb->next;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xe490
jmp 0xe461
leaq 0x18e64(%rip), %rdi     # 0x272cc
leaq 0x1a05b(%rip), %rsi     # 0x284ca
movl $0x900, %edx            # imm = 0x900
leaq 0x198f0(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xe492
jmp 0xe494
cmpq $0x0, -0x18(%rbp)
je 0xe55f
movq -0x18(%rbp), %rax
movzbl 0x14(%rax), %eax
movq -0x8(%rbp), %rcx
movzbl 0x14(%rcx), %ecx
cmpl %ecx, %eax
je 0xe4be
xorl %eax, %eax
testb $0x1, %al
jne 0xe52d
jmp 0xe54e
movq -0x18(%rbp), %rax
movzbl 0x14(%rax), %eax
cmpl $0x6, %eax
jne 0xe51f
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jne 0xe54e
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0xe54e
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0xe54e
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jne 0xe54e
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %eax
movq -0x8(%rbp), %rcx
movzbl 0x10(%rcx), %ecx
cmpl %ecx, %eax
je 0xe52d
jmp 0xe54e
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jne 0xe54e
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xe53b
movq -0x18(%rbp), %rdi
callq 0xbc90
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xe55a
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xe494
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_tcp_get_tcp_addrinfo
err_t
tcp_tcp_get_tcp_addrinfo(struct tcp_pcb *pcb, int local, ip_addr_t *addr, u16_t *port)
{
  if (pcb) {
    if (local) {
      if (addr) {
        *addr = pcb->local_ip;
      }
      if (port) {
        *port = pcb->local_port;
      }
    } else {
      if (addr) {
        *addr = pcb->remote_ip;
      }
      if (port) {
        *port = pcb->remote_port;
      }
    }
    return ERR_OK;
  }
  return ERR_VAL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xe635
cmpl $0x0, -0x14(%rbp)
je 0xe5f1
cmpq $0x0, -0x20(%rbp)
je 0xe5d9
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
cmpq $0x0, -0x28(%rbp)
je 0xe5ef
movq -0x10(%rbp), %rax
movw 0x4e(%rax), %cx
movq -0x28(%rbp), %rax
movw %cx, (%rax)
jmp 0xe62f
cmpq $0x0, -0x20(%rbp)
je 0xe617
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rdx
movq %rdx, (%rax)
movq 0x20(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x28(%rcx), %rcx
movq %rcx, 0x10(%rax)
cmpq $0x0, -0x28(%rbp)
je 0xe62d
movq -0x10(%rbp), %rax
movw 0x50(%rax), %cx
movq -0x28(%rbp), %rax
movw %cx, (%rax)
jmp 0xe62f
movb $0x0, -0x1(%rbp)
jmp 0xe639
movb $-0x6, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_debug_print
void
tcp_debug_print(struct tcp_hdr *tcphdr)
{
  LWIP_DEBUGF(TCP_DEBUG, ("TCP header:\n"));
  LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n"));
  LWIP_DEBUGF(TCP_DEBUG, ("|    %5"U16_F"      |    %5"U16_F"      | (src port, dest port)\n",
                          lwip_ntohs(tcphdr->src), lwip_ntohs(tcphdr->dest)));
  LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n"));
  LWIP_DEBUGF(TCP_DEBUG, ("|           %010"U32_F"          | (seq no)\n",
                          lwip_ntohl(tcphdr->seqno)));
  LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n"));
  LWIP_DEBUGF(TCP_DEBUG, ("|           %010"U32_F"          | (ack no)\n",
                          lwip_ntohl(tcphdr->ackno)));
  LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n"));
  LWIP_DEBUGF(TCP_DEBUG, ("| %2"U16_F" |   |%"U16_F"%"U16_F"%"U16_F"%"U16_F"%"U16_F"%"U16_F"|     %5"U16_F"     | (hdrlen, flags (",
                          TCPH_HDRLEN(tcphdr),
                          (u16_t)(TCPH_FLAGS(tcphdr) >> 5 & 1),
                          (u16_t)(TCPH_FLAGS(tcphdr) >> 4 & 1),
                          (u16_t)(TCPH_FLAGS(tcphdr) >> 3 & 1),
                          (u16_t)(TCPH_FLAGS(tcphdr) >> 2 & 1),
                          (u16_t)(TCPH_FLAGS(tcphdr) >> 1 & 1),
                          (u16_t)(TCPH_FLAGS(tcphdr)      & 1),
                          lwip_ntohs(tcphdr->wnd)));
  tcp_debug_print_flags(TCPH_FLAGS(tcphdr));
  LWIP_DEBUGF(TCP_DEBUG, ("), win)\n"));
  LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n"));
  LWIP_DEBUGF(TCP_DEBUG, ("|    0x%04"X16_F"     |     %5"U16_F"     | (chksum, urgp)\n",
                          lwip_ntohs(tcphdr->chksum), lwip_ntohs(tcphdr->urgp)));
  LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n"));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0xe64e
jmp 0xe650
jmp 0xe652
jmp 0xe654
jmp 0xe656
jmp 0xe658
jmp 0xe65a
jmp 0xe65c
jmp 0xe65e
jmp 0xe660
jmp 0xe662
jmp 0xe664
jmp 0xe666
jmp 0xe668
jmp 0xe66a
jmp 0xe66c
jmp 0xe66e
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %edi
callq 0x251c0
movzwl %ax, %eax
andl $0x3f, %eax
movzbl %al, %edi
callq 0xe6a0
jmp 0xe68b
jmp 0xe68d
jmp 0xe68f
jmp 0xe691
jmp 0xe693
jmp 0xe695
jmp 0xe697
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_debug_print_flags
void
tcp_debug_print_flags(u8_t flags)
{
  if (flags & TCP_FIN) {
    LWIP_DEBUGF(TCP_DEBUG, ("FIN "));
  }
  if (flags & TCP_SYN) {
    LWIP_DEBUGF(TCP_DEBUG, ("SYN "));
  }
  if (flags & TCP_RST) {
    LWIP_DEBUGF(TCP_DEBUG, ("RST "));
  }
  if (flags & TCP_PSH) {
    LWIP_DEBUGF(TCP_DEBUG, ("PSH "));
  }
  if (flags & TCP_ACK) {
    LWIP_DEBUGF(TCP_DEBUG, ("ACK "));
  }
  if (flags & TCP_URG) {
    LWIP_DEBUGF(TCP_DEBUG, ("URG "));
  }
  if (flags & TCP_ECE) {
    LWIP_DEBUGF(TCP_DEBUG, ("ECE "));
  }
  if (flags & TCP_CWR) {
    LWIP_DEBUGF(TCP_DEBUG, ("CWR "));
  }
  LWIP_DEBUGF(TCP_DEBUG, ("\n"));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movzbl -0x1(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xe6bc
jmp 0xe6b8
jmp 0xe6ba
jmp 0xe6bc
movzbl -0x1(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xe6ce
jmp 0xe6ca
jmp 0xe6cc
jmp 0xe6ce
movzbl -0x1(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xe6e0
jmp 0xe6dc
jmp 0xe6de
jmp 0xe6e0
movzbl -0x1(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xe6f2
jmp 0xe6ee
jmp 0xe6f0
jmp 0xe6f2
movzbl -0x1(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xe704
jmp 0xe700
jmp 0xe702
jmp 0xe704
movzbl -0x1(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xe716
jmp 0xe712
jmp 0xe714
jmp 0xe716
movzbl -0x1(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xe728
jmp 0xe724
jmp 0xe726
jmp 0xe728
movzbl -0x1(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xe73c
jmp 0xe738
jmp 0xe73a
jmp 0xe73c
jmp 0xe73e
jmp 0xe740
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_debug_print_pcbs
void
tcp_debug_print_pcbs(void)
{
  struct tcp_pcb *pcb;
  struct tcp_pcb_listen *pcbl;

  LWIP_DEBUGF(TCP_DEBUG, ("Active PCB states:\n"));
  for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
    LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F", foreign port %"U16_F" snd_nxt %"U32_F" rcv_nxt %"U32_F" ",
                            pcb->local_port, pcb->remote_port,
                            pcb->snd_nxt, pcb->rcv_nxt));
    tcp_debug_print_state(pcb->state);
  }

  LWIP_DEBUGF(TCP_DEBUG, ("Listen PCB states:\n"));
  for (pcbl = tcp_listen_pcbs.listen_pcbs; pcbl != NULL; pcbl = pcbl->next) {
    LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F" ", pcbl->local_port));
    tcp_debug_print_state(pcbl->state);
  }

  LWIP_DEBUGF(TCP_DEBUG, ("TIME-WAIT PCB states:\n"));
  for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
    LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F", foreign port %"U16_F" snd_nxt %"U32_F" rcv_nxt %"U32_F" ",
                            pcb->local_port, pcb->remote_port,
                            pcb->snd_nxt, pcb->rcv_nxt));
    tcp_debug_print_state(pcb->state);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
jmp 0xe75a
movq 0x211a7(%rip), %rax     # 0x2f908
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe78a
jmp 0xe76e
jmp 0xe770
movq -0x8(%rbp), %rax
movl 0x48(%rax), %edi
callq 0xb340
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xe765
jmp 0xe78c
jmp 0xe78e
movq 0x21163(%rip), %rax     # 0x2f8f8
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xe7be
jmp 0xe7a2
jmp 0xe7a4
movq -0x10(%rbp), %rax
movl 0x48(%rax), %edi
callq 0xb340
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xe799
jmp 0xe7c0
jmp 0xe7c2
movq 0x21147(%rip), %rax     # 0x2f910
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe7f2
jmp 0xe7d6
jmp 0xe7d8
movq -0x8(%rbp), %rax
movl 0x48(%rax), %edi
callq 0xb340
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xe7cd
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_listen_closed
static void
tcp_listen_closed(struct tcp_pcb *pcb)
{
#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG
  size_t i;
  LWIP_ASSERT("pcb != NULL", pcb != NULL);
  LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN);
  for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) {
    tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb);
  }
#endif
  LWIP_UNUSED_ARG(pcb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xe844
jmp 0xe815
leaq 0x18ab0(%rip), %rdi     # 0x272cc
leaq 0x19c1c(%rip), %rsi     # 0x2843f
movl $0x111, %edx            # imm = 0x111
leaq 0x1953c(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xe846
jmp 0xe848
movq -0x8(%rbp), %rax
cmpl $0x1, 0x48(%rax)
je 0xe883
jmp 0xe854
leaq 0x18a71(%rip), %rdi     # 0x272cc
leaq 0x19be9(%rip), %rsi     # 0x2844b
movl $0x112, %edx            # imm = 0x112
leaq 0x194fd(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xe885
movq $0x1, -0x10(%rbp)
cmpq $0x4, -0x10(%rbp)
jae 0xe8bd
movq -0x10(%rbp), %rcx
leaq 0x20471(%rip), %rax     # 0x2ed10
movq (%rax,%rcx,8), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0xe930
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xe88d
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp.c
// Function: tcp_remove_listener
static void
tcp_remove_listener(struct tcp_pcb *list, struct tcp_pcb_listen *lpcb)
{
  struct tcp_pcb *pcb;

  LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL);

  for (pcb = list; pcb != NULL; pcb = pcb->next) {
    if (pcb->listener == lpcb) {
      pcb->listener = NULL;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xe978
jmp 0xe949
leaq 0x1897c(%rip), %rdi     # 0x272cc
leaq 0x19b09(%rip), %rsi     # 0x28460
movl $0xff, %edx
leaq 0x19408(%rip), %rcx     # 0x27d6b
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xe97a
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xe9b9
movq -0x18(%rbp), %rax
movq 0xc8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xe9a9
movq -0x18(%rbp), %rax
movq $0x0, 0xc8(%rax)
jmp 0xe9ab
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xe982
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp_in.c
// Function: tcp_timewait_input
static void
tcp_timewait_input(struct tcp_pcb *pcb)
{
  /* RFC 1337: in TIME_WAIT, ignore RST and ACK FINs + any 'acceptable' segments */
  /* RFC 793 3.9 Event Processing - Segment Arrives:
   * - first check sequence number - we skip that one in TIME_WAIT (always
   *   acceptable since we only send ACKs)
   * - second check the RST bit (... return) */
  if (flags & TCP_RST) {
    return;
  }

  LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL);

  /* - fourth, check the SYN bit, */
  if (flags & TCP_SYN) {
    /* If an incoming segment is not acceptable, an acknowledgment
       should be sent in reply */
    if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd)) {
      /* If the SYN is in the window it is an error, send a reset */
      tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
              ip_current_src_addr(), tcphdr->dest, tcphdr->src);
      return;
    }
  } else if (flags & TCP_FIN) {
    /* - eighth, check the FIN bit: Remain in the TIME-WAIT state.
         Restart the 2 MSL time-wait timeout.*/
    pcb->tmr = tcp_ticks;
  }

  if ((tcplen > 0)) {
    /* Acknowledge data, FIN or out-of-window SYN */
    tcp_ack_now(pcb);
    tcp_output(pcb);
  }
  return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movzbl 0x20029(%rip), %eax     # 0x2f94c
andl $0x4, %eax
cmpl $0x0, %eax
je 0xf930
jmp 0xfa50
jmp 0xf932
cmpq $0x0, -0x8(%rbp)
jne 0xf96a
jmp 0xf93b
leaq 0x1798a(%rip), %rdi     # 0x272cc
leaq 0x18e3f(%rip), %rsi     # 0x28788
movl $0x2fe, %edx            # imm = 0x2FE
leaq 0x18c4f(%rip), %rcx     # 0x285a4
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0xf96c
movzbl 0x1ffd9(%rip), %eax     # 0x2f94c
andl $0x2, %eax
cmpl $0x0, %eax
je 0xfa00
movl 0x1ffbf(%rip), %eax     # 0x2f944
movq -0x8(%rbp), %rcx
subl 0x5c(%rcx), %eax
cmpl $0x0, %eax
jl 0xf9fe
movl 0x1ffad(%rip), %eax     # 0x2f944
movq -0x8(%rbp), %rcx
movl 0x5c(%rcx), %ecx
movq -0x8(%rbp), %rdx
movzwl 0x60(%rdx), %edx
addl %edx, %ecx
subl %ecx, %eax
cmpl $0x0, %eax
jg 0xf9fe
movq -0x8(%rbp), %rdi
movl 0x1ff8f(%rip), %esi     # 0x2f948
movl 0x1ff85(%rip), %edx     # 0x2f944
movzwl 0x1ff88(%rip), %eax     # 0x2f94e
addl %eax, %edx
movq 0x1ff59(%rip), %rax     # 0x2f928
movw 0x2(%rax), %r9w
movq 0x1ff4d(%rip), %rax     # 0x2f928
leaq 0x1fd8e(%rip), %r8      # 0x2f770
movq %r8, %rcx
addq $0x3c, %rcx
addq $0x24, %r8
movzwl %r9w, %r9d
movzwl (%rax), %eax
movl %eax, (%rsp)
callq 0x16110
jmp 0xfa50
jmp 0xfa21
movzbl 0x1ff45(%rip), %eax     # 0x2f94c
andl $0x1, %eax
cmpl $0x0, %eax
je 0xfa1f
leaq 0x1ff06(%rip), %rax     # 0x2f91c
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x58(%rax)
jmp 0xfa21
movzwl 0x1ff26(%rip), %eax     # 0x2f94e
cmpl $0x0, %eax
jle 0xfa4e
jmp 0xfa2f
movq -0x8(%rbp), %rax
movzwl 0x52(%rax), %eax
orl $0x2, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x52(%rax)
movq -0x8(%rbp), %rdi
callq 0x14b70
jmp 0xfa50
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp_in.c
// Function: tcp_input_delayed_close
static int
tcp_input_delayed_close(struct tcp_pcb *pcb)
{
  LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL);

  if (recv_flags & TF_CLOSED) {
    /* The connection has been closed and we will deallocate the
        PCB. */
    if (!(pcb->flags & TF_RXCLOSED)) {
      /* Connection closed although the application has only shut down the
          tx side: call the PCB's err callback and indicate the closure to
          ensure the application doesn't continue using the PCB. */
      TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_CLSD);
    }
    tcp_pcb_remove(&tcp_active_pcbs, pcb);
    tcp_free(pcb);
    return 1;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x10c14
jmp 0x10be5
leaq 0x166e0(%rip), %rdi     # 0x272cc
leaq 0x17b38(%rip), %rsi     # 0x2872b
movl $0x260, %edx            # imm = 0x260
leaq 0x179a5(%rip), %rcx     # 0x285a4
movb $0x0, %al
callq 0x20d0
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
callq 0x2040
jmp 0x10c16
movzbl 0x1ed5b(%rip), %eax     # 0x2f978
andl $0x10, %eax
cmpl $0x0, %eax
je 0x10c85
movq -0x10(%rbp), %rax
movzwl 0x52(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x10c63
jmp 0x10c37
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf0(%rax)
je 0x10c5f
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rdi
movl $0xfffffff1, %esi       # imm = 0xFFFFFFF1
callq *%rax
jmp 0x10c61
jmp 0x10c63
movq -0x10(%rbp), %rsi
leaq 0x1ec9a(%rip), %rdi     # 0x2f908
callq 0xb9d0
movq -0x10(%rbp), %rdi
callq 0xa630
movl $0x1, -0x4(%rbp)
jmp 0x10c8c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp_in.c
// Function: tcp_get_next_optbyte
static u8_t
tcp_get_next_optbyte(void)
{
  u16_t optidx = tcp_optidx++;
  if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) {
    u8_t *opts = (u8_t *)tcphdr + TCP_HLEN;
    return opts[optidx];
  } else {
    u8_t idx = (u8_t)(optidx - tcphdr_opt1len);
    return tcphdr_opt2[idx];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw 0x1eb3d(%rip), %ax      # 0x2f988
movw %ax, %cx
addw $0x1, %cx
movw %cx, 0x1eb2f(%rip)      # 0x2f988
movw %ax, -0x4(%rbp)
cmpq $0x0, 0x1ead3(%rip)     # 0x2f938
je 0x10e76
movzwl -0x4(%rbp), %eax
movzwl 0x1eace(%rip), %ecx     # 0x2f940
cmpl %ecx, %eax
jge 0x10e95
movq 0x1eaab(%rip), %rax     # 0x2f928
addq $0x14, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl -0x4(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
jmp 0x10eb6
movzwl -0x4(%rbp), %eax
movzwl 0x1eaa0(%rip), %ecx     # 0x2f940
subl %ecx, %eax
movb %al, -0x11(%rbp)
movq 0x1ea8c(%rip), %rax     # 0x2f938
movzbl -0x11(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/tcp_out.c
// Function: tcp_seg_add_chksum
static void
tcp_seg_add_chksum(u16_t chksum, u16_t len, u16_t *seg_chksum,
                   u8_t *seg_chksum_swapped)
{
  u32_t helper;
  /* add chksum to old chksum and fold to u16_t */
  helper = chksum + *seg_chksum;
  chksum = FOLD_U32T(helper);
  if ((len & 1) != 0) {
    *seg_chksum_swapped = 1 - *seg_chksum_swapped;
    chksum = SWAP_BYTES_IN_WORD(chksum);
  }
  *seg_chksum = chksum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movw %di, %si
movw %si, -0x2(%rbp)
movw %ax, -0x4(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movzwl -0x2(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shrl $0x10, %eax
movl %eax, %eax
movl -0x1c(%rbp), %ecx
andq $0xffff, %rcx           # imm = 0xFFFF
addq %rcx, %rax
movw %ax, -0x2(%rbp)
movzwl -0x4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x13dc4
movq -0x18(%rbp), %rax
movzbl (%rax), %ecx
movl $0x1, %eax
subl %ecx, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movzwl -0x2(%rbp), %eax
andl $0xff, %eax
shll $0x8, %eax
movzwl -0x2(%rbp), %ecx
andl $0xff00, %ecx           # imm = 0xFF00
sarl $0x8, %ecx
orl %ecx, %eax
movw %ax, -0x2(%rbp)
movw -0x2(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)