// File: /workspace/github_c_makefile_star2_O0/FH0[P]tun_direct/lwip-2.1.2/src/core/raw.c
// Function: raw_bind
err_t
raw_bind(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->local_ip, ipaddr);
#if LWIP_IPV6 && LWIP_IPV6_SCOPES
  /* If the given IP address should have a zone but doesn't, assign one now.
   * This is legacy support: scope-aware callers should always provide properly
   * zoned source addresses. */
  if (IP_IS_V6(&pcb->local_ip) &&
      ip6_addr_lacks_zone(ip_2_ip6(&pcb->local_ip), IP6_UNKNOWN)) {
    ip6_addr_select_zone(ip_2_ip6(&pcb->local_ip), ip_2_ip6(&pcb->local_ip));
  }
#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
  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 0x94de
cmpq $0x0, -0x18(%rbp)
jne 0x94e7
movb $-0x6, -0x1(%rbp)
jmp 0x972a
jmp 0x94e9
jmp 0x94eb
movq -0x10(%rbp), %rax
cmpq $0x0, %rax
je 0x9507
jmp 0x94f7
movq -0x18(%rbp), %rax
movb 0x14(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x14(%rax)
jmp 0x9507
jmp 0x9509
cmpq $0x0, -0x18(%rbp)
je 0x95e3
movq -0x18(%rbp), %rax
movzbl 0x14(%rax), %eax
cmpl $0x6, %eax
jne 0x95e3
jmp 0x9527
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x9538
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x9541
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x955b
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x9565
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x9580
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x958a
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x95a5
xorl %eax, %eax
movl %eax, -0x30(%rbp)
jmp 0x95af
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x95ca
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x95d5
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, 0x10(%rax)
jmp 0x9631
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x95f4
xorl %eax, %eax
movl %eax, -0x38(%rbp)
jmp 0x95fd
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %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 0x9631
jmp 0x9633
movq -0x10(%rbp), %rax
cmpq $0x0, %rax
je 0x9726
movq -0x10(%rbp), %rax
movzbl 0x14(%rax), %eax
cmpl $0x6, %eax
jne 0x9726
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x0, %eax
jne 0x9726
movq -0x10(%rbp), %rax
movl (%rax), %eax
andq $0xc0ff, %rax           # imm = 0xC0FF
cmpq $0x80fe, %rax           # imm = 0x80FE
je 0x96a3
movq -0x10(%rbp), %rax
movl (%rax), %eax
andq $0x8fff, %rax           # imm = 0x8FFF
cmpq $0x1ff, %rax            # imm = 0x1FF
je 0x96a3
movq -0x10(%rbp), %rax
movl (%rax), %eax
andq $0x8fff, %rax           # imm = 0x8FFF
cmpq $0x2ff, %rax            # imm = 0x2FF
jne 0x9726
jmp 0x96a5
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1c270
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x9722
movq -0x10(%rbp), %rax
movl (%rax), %eax
andq $0xc0ff, %rax           # imm = 0xC0FF
cmpq $0x80fe, %rax           # imm = 0x80FE
je 0x96f9
movq -0x10(%rbp), %rax
movl (%rax), %eax
andq $0x8fff, %rax           # imm = 0x8FFF
cmpq $0x1ff, %rax            # imm = 0x1FF
je 0x96f9
movq -0x10(%rbp), %rax
movl (%rax), %eax
andq $0x8fff, %rax           # imm = 0x8FFF
cmpq $0x2ff, %rax            # imm = 0x2FF
jne 0x970f
movq -0x20(%rbp), %rax
movzbl 0xee(%rax), %eax
addl $0x1, %eax
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
jmp 0x9716
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0x9716
movl -0x3c(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x10(%rax)
jmp 0x9724
jmp 0x9726
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)