// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/raw.c
// Function: raw_connect
err_t
raw_connect(struct raw_pcb *pcb, const ip_addr_t *ipaddr)
{
  LWIP_ASSERT_CORE_LOCKED();
  if ((pcb == NULL) || (ipaddr == NULL)) {
    return ERR_VAL;
  }
  ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr);
#if LWIP_IPV6 && LWIP_IPV6_SCOPES
  /* If the given IP address should have a zone but doesn't, assign one now,
   * using the bound address to make a more informed decision when possible. */
  if (IP_IS_V6(&pcb->remote_ip) &&
      ip6_addr_lacks_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNKNOWN)) {
    ip6_addr_select_zone(ip_2_ip6(&pcb->remote_ip), ip_2_ip6(&pcb->local_ip));
  }
#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
  raw_set_flags(pcb, RAW_FLAGS_CONNECTED);
  return ERR_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x979e
cmpq $0x0, -0x18(%rbp)
jne 0x97a7
movb $-0x6, -0x1(%rbp)
jmp 0x9a14
jmp 0x97a9
jmp 0x97ab
movq -0x10(%rbp), %rax
addq $0x18, %rax
cmpq $0x0, %rax
je 0x97cb
jmp 0x97bb
movq -0x18(%rbp), %rax
movb 0x14(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2c(%rax)
jmp 0x97cb
jmp 0x97cd
cmpq $0x0, -0x18(%rbp)
je 0x98a8
movq -0x18(%rbp), %rax
movzbl 0x14(%rax), %eax
cmpl $0x6, %eax
jne 0x98a8
jmp 0x97eb
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x97fc
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x9805
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x9820
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x982a
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x9845
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x984f
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x986a
xorl %eax, %eax
movl %eax, -0x30(%rbp)
jmp 0x9874
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x988f
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x989a
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x28(%rax)
jmp 0x98f7
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x98b9
xorl %eax, %eax
movl %eax, -0x38(%rbp)
jmp 0x98c2
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x28(%rax)
jmp 0x98f7
jmp 0x98f9
movq -0x10(%rbp), %rax
addq $0x18, %rax
cmpq $0x0, %rax
je 0x99fa
movq -0x10(%rbp), %rax
movzbl 0x2c(%rax), %eax
cmpl $0x6, %eax
jne 0x99fa
movq -0x10(%rbp), %rax
movzbl 0x28(%rax), %eax
cmpl $0x0, %eax
jne 0x99fa
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
andq $0xc0ff, %rax           # imm = 0xC0FF
cmpq $0x80fe, %rax           # imm = 0x80FE
je 0x9970
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
andq $0x8fff, %rax           # imm = 0x8FFF
cmpq $0x1ff, %rax            # imm = 0x1FF
je 0x9970
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
andq $0x8fff, %rax           # imm = 0x8FFF
cmpq $0x2ff, %rax            # imm = 0x2FF
jne 0x99fa
jmp 0x9972
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x1c270
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x99f6
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
andq $0xc0ff, %rax           # imm = 0xC0FF
cmpq $0x80fe, %rax           # imm = 0x80FE
je 0x99cd
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
andq $0x8fff, %rax           # imm = 0x8FFF
cmpq $0x1ff, %rax            # imm = 0x1FF
je 0x99cd
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
andq $0x8fff, %rax           # imm = 0x8FFF
cmpq $0x2ff, %rax            # imm = 0x2FF
jne 0x99e3
movq -0x20(%rbp), %rax
movzbl 0xee(%rax), %eax
addl $0x1, %eax
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
jmp 0x99ea
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0x99ea
movl -0x3c(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x28(%rax)
jmp 0x99f8
jmp 0x99fa
jmp 0x99fc
movq -0x10(%rbp), %rax
movzbl 0x41(%rax), %eax
orl $0x1, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x41(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)