user: What is the c source code of the assembly code below?

```asm
<parse_ip>:
  endbr64
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    (%rsi),%rdx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  mov    (%rdi),%eax
  mov    %rdx,0x10(%rsp)
  mov    %eax,0xc(%rsp)
  cmp    $0x1,%eax
  jle    L212
  mov    %rdi,%rbp
  mov    (%rdx),%rdi
  mov    %rsi,%rbx
  lea    D104(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L223
  mov    0x10(%rsp),%rax
  lea    D145(%rip),%rsi
  mov    (%rax),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L169
  mov    0x10(%rsp),%rax
  lea    D66(%rip),%rsi
  mov    (%rax),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L18
  mov    0x10(%rsp),%rax
  lea    D5(%rip),%rsi
  mov    (%rax),%rdi
  call   <matches@plt>
  test   %rax,%rax
  jne    L20
L18:
  xor    %eax,%eax
L226:
  call   <NEXT_ARG@plt>
  lea    0x10(%rsp),%rsi
  xor    %r8d,%r8d
  mov    %r12,%rdx
  lea    0xc(%rsp),%rdi
  mov    $0x1,%ecx
  call   <parse_u8@plt>
  jmp    L185
  nopl   0x0(%rax)
L169:
  call   <NEXT_ARG@plt>
  lea    0x10(%rsp),%rsi
  lea    0xc(%rsp),%rdi
  mov    %r12,%rdx
  mov    $0x10,%ecx
  call   <parse_ip_addr@plt>
L185:
  mov    0xc(%rsp),%edx
  mov    %edx,0x0(%rbp)
  mov    0x10(%rsp),%rdx
  mov    %rdx,(%rbx)
L255:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L104
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L223:
  call   <NEXT_ARG@plt>
  lea    0x10(%rsp),%rsi
  lea    0xc(%rsp),%rdi
  mov    %r12,%rdx
  mov    $0xc,%ecx
  call   <parse_ip_addr@plt>
  jmp    L185
  xchg   %ax,%ax
L20:
  mov    0x10(%rsp),%rax
  lea    D33(%rip),%rsi
  mov    (%rax),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L116
  mov    0x10(%rsp),%rax
  lea    D7(%rip),%rsi
  mov    (%rax),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L248
  mov    0x10(%rsp),%rax
  lea    D60(%rip),%rsi
  mov    (%rax),%rdi
  call   <matches@plt>
  test   %rax,%rax
  je     L226
  mov    0x10(%rsp),%rax
  lea    D136(%rip),%rsi
  mov    (%rax),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L156
  mov    0x10(%rsp),%rax
  lea    D146(%rip),%rsi
  mov    (%rax),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L198
  mov    0x10(%rsp),%rax
  lea    D37(%rip),%rsi
  mov    (%rax),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L73
  mov    0x10(%rsp),%rax
  lea    D90(%rip),%rsi
  mov    (%rax),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L23
  mov    0x10(%rsp),%rax
  lea    D103(%rip),%rsi
  mov    (%rax),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L115
  mov    0x10(%rsp),%rax
  lea    D28(%rip),%rsi
  mov    (%rax),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L11
  mov    0x10(%rsp),%rax
  lea    D91(%rip),%rsi
  mov    (%rax),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L56
  mov    0x10(%rsp),%rax
  lea    D126(%rip),%rsi
  mov    (%rax),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L212
  call   <NEXT_ARG@plt>
  lea    0x10(%rsp),%rsi
  lea    0xc(%rsp),%rdi
  mov    %r12,%rdx
  mov    $0x1,%r8d
  mov    $0x14,%ecx
  call   <parse_u8@plt>
  jmp    L185
  nopw   0x0(%rax,%rax,1)
L116:
  call   <NEXT_ARG@plt>
  lea    0x10(%rsp),%rsi
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  lea    0xc(%rsp),%rdi
  mov    %r12,%rdx
  call   <parse_u8@plt>
  jmp    L185
  nopl   0x0(%rax)
L248:
  call   <NEXT_ARG@plt>
  lea    0x10(%rsp),%rsi
  xor    %r8d,%r8d
  mov    %r12,%rdx
  lea    0xc(%rsp),%rdi
  mov    $0x9,%ecx
  call   <parse_u8@plt>
  jmp    L185
  nopl   0x0(%rax)
L212:
  mov    $0xffffffff,%eax
  jmp    L255
  nopw   0x0(%rax,%rax,1)
L156:
  xor    %r8d,%r8d
  mov    $0x6,%ecx
  mov    $0x3fff,%edx
  xor    %esi,%esi
  mov    %r12,%rdi
  subl   $0x1,0xc(%rsp)
  addq   $0x8,0x10(%rsp)
  call   <pack_key16@plt>
  jmp    L185
L198:
  xor    %r8d,%r8d
  mov    $0x6,%ecx
  mov    $0x1fff,%edx
  xor    %esi,%esi
  mov    %r12,%rdi
  subl   $0x1,0xc(%rsp)
  addq   $0x8,0x10(%rsp)
  call   <pack_key16@plt>
  jmp    L185
L73:
  xor    %r8d,%r8d
  mov    $0x6,%ecx
  mov    $0x4000,%edx
  mov    %r12,%rdi
  mov    $0x4000,%esi
  subl   $0x1,0xc(%rsp)
  addq   $0x8,0x10(%rsp)
  call   <pack_key16@plt>
  jmp    L185
L23:
  xor    %r8d,%r8d
  mov    $0x6,%ecx
  mov    $0x2000,%edx
  mov    %r12,%rdi
  mov    $0x2000,%esi
  subl   $0x1,0xc(%rsp)
  addq   $0x8,0x10(%rsp)
  call   <pack_key16@plt>
  jmp    L185
L115:
  call   <NEXT_ARG@plt>
  lea    0x10(%rsp),%rsi
  xor    %r8d,%r8d
  mov    %r12,%rdx
  lea    0xc(%rsp),%rdi
  mov    $0x16,%ecx
  call   <parse_u16@plt>
  jmp    L185
L11:
  call   <NEXT_ARG@plt>
  lea    0x10(%rsp),%rsi
  xor    %r8d,%r8d
  mov    %r12,%rdx
  lea    0xc(%rsp),%rdi
  mov    $0x14,%ecx
  call   <parse_u16@plt>
  jmp    L185
L56:
  call   <NEXT_ARG@plt>
  lea    0x10(%rsp),%rsi
  xor    %r8d,%r8d
  mov    %r12,%rdx
  lea    0xc(%rsp),%rdi
  mov    $0x14,%ecx
  call   <parse_u8@plt>
  jmp    L185
L104:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D104
type_guessed: string
name: unpack_data
arguments: label: D145
type_guessed: string
name: unpack_data
arguments: label: D66
type_guessed: string
name: unpack_data
arguments: label: D5
type_guessed: string
name: unpack_data
arguments: label: D33
type_guessed: string
name: unpack_data
arguments: label: D7
type_guessed: string
name: unpack_data
arguments: label: D60
type_guessed: string
name: unpack_data
arguments: label: D136
type_guessed: string
name: unpack_data
arguments: label: D146
type_guessed: string
name: unpack_data
arguments: label: D37
type_guessed: string
name: unpack_data
arguments: label: D90
type_guessed: string
name: unpack_data
arguments: label: D103
type_guessed: string
name: unpack_data
arguments: label: D28
type_guessed: string
name: unpack_data
arguments: label: D91
type_guessed: string
name: unpack_data
arguments: label: D126
type_guessed: string

tool: D104: src

tool: D145: dst

tool: D66: tos

tool: D5: dsfield

tool: D33: ihl

tool: D7: protocol

tool: D60: precedence

tool: D136: nofrag

tool: D146: firstfrag

tool: D37: df

tool: D90: mf

tool: D103: dport

tool: D28: sport

tool: D91: icmp_type

tool: D126: icmp_code

assistant: ```c
int parse_ip(int *argc_p, char ***argv_p, struct tc_u32_sel *sel) {
  int res = -1;
  int argc = *argc_p;
  char **argv = *argv_p;
  if (argc < 2)
    return -1;
  if (strcmp(*argv, "src") == 0) {
    NEXT_ARG();
    res = parse_ip_addr(&argc, &argv, sel, 12);
    goto done;
  }
  if (strcmp(*argv, "dst") == 0) {
    NEXT_ARG();
    res = parse_ip_addr(&argc, &argv, sel, 16);
    goto done;
  }
  if (strcmp(*argv, "tos") == 0 || matches(*argv, "dsfield") == 0) {
    NEXT_ARG();
    res = parse_u8(&argc, &argv, sel, 1, 0);
    goto done;
  }
  if (strcmp(*argv, "ihl") == 0) {
    NEXT_ARG();
    res = parse_u8(&argc, &argv, sel, 0, 0);
    goto done;
  }
  if (strcmp(*argv, "protocol") == 0) {
    NEXT_ARG();
    res = parse_u8(&argc, &argv, sel, 9, 0);
    goto done;
  }
  if (matches(*argv, "precedence") == 0) {
    NEXT_ARG();
    res = parse_u8(&argc, &argv, sel, 1, 0);
    goto done;
  }
  if (strcmp(*argv, "nofrag") == 0) {
    argc--;
    argv++;
    res = pack_key16(sel, 0, 0x3FFF, 6, 0);
    goto done;
  }
  if (strcmp(*argv, "firstfrag") == 0) {
    argc--;
    argv++;
    res = pack_key16(sel, 0, 0x1FFF, 6, 0);
    goto done;
  }
  if (strcmp(*argv, "df") == 0) {
    argc--;
    argv++;
    res = pack_key16(sel, 0x4000, 0x4000, 6, 0);
    goto done;
  }
  if (strcmp(*argv, "mf") == 0) {
    argc--;
    argv++;
    res = pack_key16(sel, 0x2000, 0x2000, 6, 0);
    goto done;
  }
  if (strcmp(*argv, "dport") == 0) {
    NEXT_ARG();
    res = parse_u16(&argc, &argv, sel, 22, 0);
    goto done;
  }
  if (strcmp(*argv, "sport") == 0) {
    NEXT_ARG();
    res = parse_u16(&argc, &argv, sel, 20, 0);
    goto done;
  }
  if (strcmp(*argv, "icmp_type") == 0) {
    NEXT_ARG();
    res = parse_u8(&argc, &argv, sel, 20, 0);
    goto done;
  }
  if (strcmp(*argv, "icmp_code") == 0) {
    NEXT_ARG();
    res = parse_u8(&argc, &argv, sel, 20, 1);
    goto done;
  }
  return -1;
done:
  *argc_p = argc;
  *argv_p = argv;
  return res;
}
```