user: Translate the below assembly code into C programming language:

```asm
<load_ip_address>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x28,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  setne  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  xor    %edi,%edi
  test   %rbx,%rbx
  setne  %dil
  call   <assert@plt>
  movzbl (%r15),%eax
  cmp    $0x9,%al
  je     L107
  cmp    $0x20,%al
  jne    L102
  nopw   0x0(%rax,%rax,1)
L107:
  movzbl 0x1(%r15),%eax
  add    $0x1,%r15
  cmp    $0x20,%al
  je     L107
  cmp    $0x9,%al
  je     L107
L102:
  xor    %ebp,%ebp
  lea    0x14(%rsp),%r14
  lea    D62(%rip),%r13
  xor    %ebx,%ebx
L138:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <sscanf@plt>
  mov    %eax,%r12d
  cmp    $0x1,%eax
  jne    L88
  mov    0x14(%rsp),%esi
  cmp    $0xff,%esi
  jg     L159
  test   %esi,%esi
  js     L151
  mov    $0x1,%edi
  call   <assert@plt>
  xor    %edi,%edi
  cmpl   $0xff,0x14(%rsp)
  setle  %dil
  shl    $0x8,%ebp
  call   <assert@plt>
  lea    D40(%rip),%rsi
  mov    %r15,%rdi
  or     0x14(%rsp),%ebp
  call   <strspn@plt>
  cltq
  add    %r15,%rax
  movzbl (%rax),%edx
  test   $0xdf,%dl
  je     L80
  cmp    $0x9,%dl
  je     L80
  cmp    $0x2e,%dl
  jne    L13
  cmp    $0x3,%ebx
  je     L19
  lea    0x1(%rax),%r15
  add    $0x1,%ebx
  jmp    L138
  nopw   0x0(%rax,%rax,1)
L19:
  mov    $0x4,%esi
  lea    D26(%rip),%rdi
  xor    %eax,%eax
  xor    %r12d,%r12d
  call   <printf@plt>
L51:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L22
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L80:
  cmp    $0x3,%ebx
  je     L163
  lea    D73(%rip),%rdi
  xor    %r12d,%r12d
  call   <puts@plt>
  jmp    L51
L88:
  mov    %r15,%rsi
  lea    D65(%rip),%rdi
  xor    %eax,%eax
  xor    %r12d,%r12d
  call   <printf@plt>
  jmp    L51
L159:
  lea    D37(%rip),%rdi
  xor    %eax,%eax
  xor    %r12d,%r12d
  call   <printf@plt>
  jmp    L51
L151:
  lea    D7(%rip),%rdi
  xor    %eax,%eax
  xor    %r12d,%r12d
  call   <printf@plt>
  jmp    L51
L163:
  mov    %ebp,%edi
  call   <htonl@plt>
  mov    0x8(%rsp),%rcx
  mov    %eax,(%rcx)
  jmp    L51
L13:
  lea    D68(%rip),%rdi
  xor    %r12d,%r12d
  call   <puts@plt>
  jmp    L51
L22:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D62
type_guessed: string
name: disassemble_data
arguments: tag: D40
type_guessed: string
name: disassemble_data
arguments: tag: D26
type_guessed: string
name: disassemble_data
arguments: tag: D73
type_guessed: string
name: disassemble_data
arguments: tag: D65
type_guessed: string
name: disassemble_data
arguments: tag: D37
type_guessed: string
name: disassemble_data
arguments: tag: D7
type_guessed: string
name: disassemble_data
arguments: tag: D68
type_guessed: string

tool: D62: %d

tool: D40: 0123456789

tool: D26: load_ip_address: Too many IP bytes, only %u expected


tool: D73: load_ip_address: Separating dot not found

tool: D65: load_ip_address: Unable to parse IP byte from string '%s'


tool: D37: load_ip_address: Invalid IP byte %d higher than 255


tool: D7: load_ip_address: Invalid IP byte %d lower than 0


tool: D68: load_ip_address: IP byte is not a number

assistant: ```c
int load_ip_address(const char *data, struct in_addr *addr) {
  int i, tmp;
  unsigned int ip;
  const char *pos;
  assert(data != NULL);
  assert(addr != NULL);
  pos = data;
  while (*pos == ' ' || *pos == '\t')
    pos++;
  ip = 0;
  for (i = 0;; i++) {
    if (sscanf(pos, "%d", &tmp) != 1) {
      printf("load_ip_address: Unable to parse IP byte "
             "from string '%s'\n",
             pos);
      return 0;
    }
    if (tmp > 255) {
      printf("load_ip_address: Invalid IP byte %d higher "
             "than 255\n",
             tmp);
      return 0;
    }
    if (tmp < 0) {
      printf("load_ip_address: Invalid IP byte %d lower "
             "than 0\n",
             tmp);
      return 0;
    }
    assert(tmp >= 0);
    assert(tmp <= 255);
    ip = (ip << 8) | tmp;
    pos = pos + strspn(pos, "0123456789");
    if (*pos == '\0' || *pos == ' ' || *pos == '\t') {
      if (i == 4 - 1)
        break;
      printf("load_ip_address: Separating dot not found\n");
      return 0;
    }
    if (*pos == '.') {
      if (i == 4 - 1) {
        printf("load_ip_address: Too many IP "
               "bytes, only %u expected\n",
               4);
        return 0;
      }
      pos++;
    } else {
      printf("load_ip_address: IP byte is not a number\n");
      return 0;
    }
  }
  addr->s_addr = htonl(ip);
  return 1;
}
```