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

```asm
<get_service>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L175
L42:
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L142
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xc0,%eax
  test   %eax,%eax
  je     L96
  cmpl   $0x64,-0xc(%rbp)
  jbe    L158
  mov    $0x0,%eax
  jmp    L109
L158:
  addl   $0x1,-0xc(%rbp)
  mov    -0x20(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x1c(%rbp)
  jae    L16
  mov    $0x0,%eax
  jmp    L109
L16:
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  lea    0x1(%rax),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %edx,%eax
  and    $0x3fff,%eax
  mov    %eax,-0x20(%rbp)
  jmp    L175
L96:
  mov    -0x20(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x20(%rbp)
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x1c(%rbp)
  jae    L61
  mov    $0x0,%eax
  jmp    L109
L61:
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5f,%al
  jne    L121
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x4(%rbp),%eax
  lea    D5(%rip),%rdx
  mov    %eax,%esi
  mov    %rcx,%rdi
  call   <label_equals@plt>
  test   %rax,%rax
  jne    L75
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x4(%rbp),%eax
  lea    D2(%rip),%rdx
  mov    %eax,%esi
  mov    %rcx,%rdi
  call   <label_equals@plt>
  test   %rax,%rax
  je     L66
L75:
  cmpl   $0x0,-0x8(%rbp)
  je     L66
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x8(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  jmp    L109
L66:
  mov    -0x20(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L26
L121:
  movl   $0x0,-0x8(%rbp)
L26:
  mov    -0x4(%rbp),%eax
  add    %eax,-0x20(%rbp)
L175:
  mov    -0x20(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jb     L42
  jmp    L159
L142:
  nop
L159:
  mov    $0x0,%eax
L109:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D5
type_guessed: string
name: disassemble_data
arguments: data_label: D2
type_guessed: string

tool: D5: _udp

tool: D2: _tcp

assistant: ```c
unsigned get_service(const unsigned char *px, unsigned length, unsigned offset, const unsigned char **r_service, unsigned *r_service_length) {
  unsigned recurse_count = 0;
  unsigned offset_of_serv = 0;
  while (offset < length) {
    unsigned len;
    if (px[offset] == 0x00)
      break;
    if (px[offset] & 0xC0) {
      if (recurse_count > 100)
        return 0;
      else
        recurse_count++;
      if (offset + 2 > length)
        return 0;
      offset = (*((unsigned char *)(px + offset) + 0) << 8 | *((unsigned char *)(px + offset) + 1) << 0) & 0x3FFF;
      continue;
    }
    len = px[offset++];
    if (offset + len > length)
      return 0;
    if (px[offset] == '_') {
      if (label_equals(px + offset, len, "_udp") || label_equals(px + offset, len, "_tcp")) {
        if (offset_of_serv) {
          *r_service = px + offset_of_serv + 1;
          *r_service_length = px[offset_of_serv];
          return 0;
        }
      }
      offset_of_serv = offset - 1;
    } else
      offset_of_serv = 0;
    offset += len;
  }
  return 0;
}
```