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

```asm
<check_tldline>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  movb   $0x1,-0x1a(%rbp)
  movb   $0x0,-0x19(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L176
  lea    D73(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
  jmp    L227
L176:
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x41,%eax
  cmp    $0x19,%eax
  ja     L196
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D4(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D4(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  movb   $0x1,-0x19(%rbp)
  movl   $0x9,-0x14(%rbp)
  jmp    L25
  movl   $0xa,-0x14(%rbp)
  jmp    L25
  mov    -0x28(%rbp),%rax
  add    $0x5,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x26,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L25
  movl   $0xb,-0x14(%rbp)
  jmp    L25
  movb   $0x0,-0x1a(%rbp)
  movl   $0x6,-0x14(%rbp)
  jmp    L25
  movl   $0x6,-0x14(%rbp)
  movb   $0x1,-0x19(%rbp)
  jmp    L25
  movb   $0x0,-0x1a(%rbp)
  movl   $0x8,-0x14(%rbp)
  jmp    L25
  movb   $0x1,-0x19(%rbp)
  movl   $0xe,-0x14(%rbp)
  jmp    L25
L196:
  lea    D64(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
  jmp    L227
L25:
  shll   -0x14(%rbp)
  cmpb   $0x0,-0x1a(%rbp)
  je     L38
  mov    -0x28(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <xtoi@plt>
  mov    %eax,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x3,%rax
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <get_nibbles@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0xffffffff,-0xc(%rbp)
  jne    L40
  lea    D76(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
  jmp    L227
L40:
  mov    -0xc(%rbp),%eax
  xor    %eax,-0x14(%rbp)
  cmpl   $0xffffffff,-0x10(%rbp)
  jne    L14
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
  jmp    L227
L14:
  cmpb   $0x0,-0x19(%rbp)
  je     L38
  mov    -0x14(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <rotl16@plt>
  xor    -0x10(%rbp),%eax
  mov    %eax,-0x14(%rbp)
L38:
  mov    -0x28(%rbp),%rax
  add    $0x7,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <xtoi@plt>
  mov    %eax,-0x8(%rbp)
  cmpl   $0xffffffff,-0x8(%rbp)
  jne    L33
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
  jmp    L227
L33:
  movl   $0x0,-0x18(%rbp)
  jmp    L112
L229:
  mov    -0x18(%rbp),%eax
  shl    $0x2,%eax
  cltq
  lea    0xc(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <get_nibbles@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0xffffffff,-0x4(%rbp)
  jne    L78
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
  jmp    L227
L78:
  mov    -0x14(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <rotl16@plt>
  xor    -0x4(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  addl   $0x1,-0x18(%rbp)
L112:
  mov    -0x18(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L229
  mov    -0x14(%rbp),%eax
L227:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D73
type: string
name: disassemble_data
arguments: data_label: D64
type: string
name: disassemble_data
arguments: data_label: D76
type: string
name: disassemble_data
arguments: data_label: D23
type: string
name: disassemble_data
arguments: data_label: D53
type: string
name: disassemble_data
arguments: data_label: D37
type: string

tool: D73: ldm: illegal start character for LDM line

tool: D64: illegal Command type in TLD LDM line

tool: D76: ldm: illegal char in address field

tool: D23: ldm: illegal char in MS-nibble of address

tool: D53: ldm: illegal character in data count

tool: D37: ldm: illegal char in data word

assistant: ```c
int check_tldline(char *line) {
  int i, code, datacnt;
  char address_field_used = (!0), cmd_m_c_t = 0;
  if (line[0] != '/')
    return error("ldm: illegal start character for LDM line");
  switch (line[1]) {
  case 'M':
    cmd_m_c_t = (!0);
  case 'I':
  case 'O':
    code = 0x9;
    break;
  case 'N':
    code = 0xA;
    break;
  case 'L':
    code = 0xA + (*(line + 5) - '0');
    break;
  case 'Q':
    code = 0xB;
    break;
  case 'A':
    address_field_used = 0;
    code = 0x6;
    break;
  case 'T':
    code = 0x6;
    cmd_m_c_t = (!0);
    break;
  case 'Z':
    address_field_used = 0;
  case 'G':
  case 'H':
    code = 0x8;
    break;
  case 'C':
    cmd_m_c_t = (!0);
  case 'B':
  case 'P':
    code = 0xE;
    break;
  default:
    return error("illegal Command type in TLD LDM line");
  }
  code <<= 1;
  if (address_field_used) {
    int addr_hinibble = xtoi(line[2]);
    int addr16 = get_nibbles(line + 2 + 1, 4);
    if (addr16 == -1)
      return error("ldm: illegal char in address field");
    code ^= (int)addr16;
    if (addr_hinibble == -1)
      return error("ldm: illegal char in MS-nibble of address");
    if (cmd_m_c_t)
      code = rotl16(code, 1) ^ addr_hinibble;
  }
  if ((datacnt = xtoi(line[7])) == -1)
    return error("ldm: illegal character in data count");
  for (i = 0; i < datacnt; i++) {
    int dataword = get_nibbles(line + 12 + (4 * i), 4);
    if (dataword == -1)
      return error("ldm: illegal char in data word");
    code = rotl16(code, 1) ^ (int)dataword;
  }
  return code;
}
```