user: What would the C source look like for the assembly code provided here:

```asm
<parse_ip>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0xffffffff,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x18(%rbp),%eax
  cmp    $0x1,%eax
  jg     L216
  mov    $0xffffffff,%eax
  jmp    L29
L216:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D8(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L22
  mov    $0x0,%eax
  call   <NEXT_ARG@plt>
  mov    -0x38(%rbp),%rdx
  lea    -0x10(%rbp),%rsi
  lea    -0x18(%rbp),%rax
  mov    $0xc,%ecx
  mov    %rax,%rdi
  call   <parse_ip_addr@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L22:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D90(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L136
  mov    $0x0,%eax
  call   <NEXT_ARG@plt>
  mov    -0x38(%rbp),%rdx
  lea    -0x10(%rbp),%rsi
  lea    -0x18(%rbp),%rax
  mov    $0x10,%ecx
  mov    %rax,%rdi
  call   <parse_ip_addr@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L136:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D138(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L225
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D25(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <matches@plt>
  test   %rax,%rax
  jne    L162
L225:
  mov    $0x0,%eax
  call   <NEXT_ARG@plt>
  mov    -0x38(%rbp),%rdx
  lea    -0x10(%rbp),%rsi
  lea    -0x18(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x1,%ecx
  mov    %rax,%rdi
  call   <parse_u8@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L162:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D85(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L68
  mov    $0x0,%eax
  call   <NEXT_ARG@plt>
  mov    -0x38(%rbp),%rdx
  lea    -0x10(%rbp),%rsi
  lea    -0x18(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    %rax,%rdi
  call   <parse_u8@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L68:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D81(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L238
  mov    $0x0,%eax
  call   <NEXT_ARG@plt>
  mov    -0x38(%rbp),%rdx
  lea    -0x10(%rbp),%rsi
  lea    -0x18(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x9,%ecx
  mov    %rax,%rdi
  call   <parse_u8@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L238:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D105(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <matches@plt>
  test   %rax,%rax
  jne    L52
  mov    $0x0,%eax
  call   <NEXT_ARG@plt>
  mov    -0x38(%rbp),%rdx
  lea    -0x10(%rbp),%rsi
  lea    -0x18(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x1,%ecx
  mov    %rax,%rdi
  call   <parse_u8@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L52:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D40(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L81
  mov    -0x18(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  add    $0x8,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x6,%ecx
  mov    $0x3fff,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <pack_key16@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L81:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D58(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L224
  mov    -0x18(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  add    $0x8,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x6,%ecx
  mov    $0x1fff,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <pack_key16@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L224:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D15(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L144
  mov    -0x18(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  add    $0x8,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x6,%ecx
  mov    $0x4000,%edx
  mov    $0x4000,%esi
  mov    %rax,%rdi
  call   <pack_key16@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L144:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D5(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L51
  mov    -0x18(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  add    $0x8,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x6,%ecx
  mov    $0x2000,%edx
  mov    $0x2000,%esi
  mov    %rax,%rdi
  call   <pack_key16@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L51:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D3(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L223
  mov    $0x0,%eax
  call   <NEXT_ARG@plt>
  mov    -0x38(%rbp),%rdx
  lea    -0x10(%rbp),%rsi
  lea    -0x18(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x16,%ecx
  mov    %rax,%rdi
  call   <parse_u16@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L223:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D107(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L324
  mov    $0x0,%eax
  call   <NEXT_ARG@plt>
  mov    -0x38(%rbp),%rdx
  lea    -0x10(%rbp),%rsi
  lea    -0x18(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x14,%ecx
  mov    %rax,%rdi
  call   <parse_u16@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L324:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D44(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L78
  mov    $0x0,%eax
  call   <NEXT_ARG@plt>
  mov    -0x38(%rbp),%rdx
  lea    -0x10(%rbp),%rsi
  lea    -0x18(%rbp),%rax
  mov    $0x0,%r8d
  mov    $0x14,%ecx
  mov    %rax,%rdi
  call   <parse_u8@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L78:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D2(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L88
  mov    $0x0,%eax
  call   <NEXT_ARG@plt>
  mov    -0x38(%rbp),%rdx
  lea    -0x10(%rbp),%rsi
  lea    -0x18(%rbp),%rax
  mov    $0x1,%r8d
  mov    $0x14,%ecx
  mov    %rax,%rdi
  call   <parse_u8@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L194
L88:
  mov    $0xffffffff,%eax
  jmp    L29
L194:
  mov    -0x18(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x10(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x14(%rbp),%eax
L29:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L160
  call   <__stack_chk_fail@plt>
L160:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D8
datatype: string
name: parse_data
arguments: data_tag: D90
datatype: string
name: parse_data
arguments: data_tag: D138
datatype: string
name: parse_data
arguments: data_tag: D25
datatype: string
name: parse_data
arguments: data_tag: D85
datatype: string
name: parse_data
arguments: data_tag: D81
datatype: string
name: parse_data
arguments: data_tag: D105
datatype: string
name: parse_data
arguments: data_tag: D40
datatype: string
name: parse_data
arguments: data_tag: D58
datatype: string
name: parse_data
arguments: data_tag: D15
datatype: string
name: parse_data
arguments: data_tag: D5
datatype: string
name: parse_data
arguments: data_tag: D3
datatype: string
name: parse_data
arguments: data_tag: D107
datatype: string
name: parse_data
arguments: data_tag: D44
datatype: string
name: parse_data
arguments: data_tag: D2
datatype: string

tool: D8: src

tool: D90: dst

tool: D138: tos

tool: D25: dsfield

tool: D85: ihl

tool: D81: protocol

tool: D105: precedence

tool: D40: nofrag

tool: D58: firstfrag

tool: D15: df

tool: D5: mf

tool: D3: dport

tool: D107: sport

tool: D44: icmp_type

tool: D2: 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;
}
```