user: 请将以下的汇编代码转换成C语言代码：

```asm
<check_tldline>:
  endbr64
  cmpb   $0x2f,(%rdi)
  jne    L121
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  movzbl 0x1(%rdi),%eax
  mov    %rdi,%rbx
  sub    $0x41,%eax
  cmp    $0x19,%al
  ja     L97
  lea    D8(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
L121:
  lea    D28(%rip),%rdi
  jmp    10b0 <error@plt>
  nopl   0x0(%rax)
L97:
  lea    D34(%rip),%rdi
L15:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    10b0 <error@plt>
  nopl   0x0(%rax)
  mov    $0x1c,%r13d
  xor    %r14d,%r14d
  nopl   0x0(%rax)
L180:
  movsbl 0x2(%rbx),%edi
  call   <xtoi@plt>
  lea    0x3(%rbx),%rdi
  mov    $0x4,%esi
  mov    %eax,%r12d
  call   <get_nibbles@plt>
  lea    D1(%rip),%rdi
  mov    %eax,%ebp
  cmp    $0xffffffff,%eax
  je     L15
  xor    %r13d,%ebp
  lea    D7(%rip),%rdi
  cmp    $0xffffffff,%r12d
  je     L15
  test   %r14b,%r14b
  jne    L108
L31:
  movsbl 0x7(%rbx),%edi
  call   <xtoi@plt>
  cmp    $0xffffffff,%eax
  je     L119
  test   %eax,%eax
  jle    L4
  sub    $0x1,%eax
  lea    0xc(%rbx),%r12
  lea    0x10(%rbx,%rax,4),%r13
  jmp    L116
  nopl   0x0(%rax)
L25:
  mov    %ebp,%edi
  mov    $0x1,%esi
  add    $0x4,%r12
  call   <rotl16@plt>
  xor    %ebx,%eax
  mov    %eax,%ebp
  cmp    %r13,%r12
  je     L4
L116:
  mov    $0x4,%esi
  mov    %r12,%rdi
  call   <get_nibbles@plt>
  mov    %eax,%ebx
  cmp    $0xffffffff,%eax
  jne    L25
  pop    %rbx
  lea    D24(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    10b0 <error@plt>
  nopl   (%rax)
  mov    $0x10,%r13d
  xor    %r14d,%r14d
  jmp    L180
  cs nopw 0x0(%rax,%rax,1)
  mov    $0x12,%r13d
  xor    %r14d,%r14d
  jmp    L180
  movsbl 0x5(%rdi),%eax
  xor    %r14d,%r14d
  lea    -0x4c(%rax,%rax,1),%r13d
  jmp    L180
  mov    $0x16,%r13d
  xor    %r14d,%r14d
  jmp    L180
  mov    $0xc,%r13d
  mov    $0x1,%r14d
  jmp    L180
  mov    $0x14,%r13d
  xor    %r14d,%r14d
  jmp    L180
  mov    $0x1c,%r13d
  mov    $0x1,%r14d
  jmp    L180
  nopl   (%rax)
L4:
  pop    %rbx
  mov    %ebp,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L108:
  mov    %ebp,%edi
  mov    $0x1,%esi
  call   <rotl16@plt>
  xor    %r12d,%eax
  mov    %eax,%ebp
  jmp    L31
  cs nopw 0x0(%rax,%rax,1)
L119:
  lea    D51(%rip),%rdi
  jmp    L15
  mov    $0x10,%ebp
  jmp    L31
  mov    $0x12,%r13d
  mov    $0x1,%r14d
  jmp    L180
  mov    $0xc,%ebp
  jmp    L31
```

tool_calls: name: retrieve_data
arguments: data_tag: D28
type_infered: string
name: retrieve_data
arguments: data_tag: D34
type_infered: string
name: retrieve_data
arguments: data_tag: D1
type_infered: string
name: retrieve_data
arguments: data_tag: D7
type_infered: string
name: retrieve_data
arguments: data_tag: D24
type_infered: string
name: retrieve_data
arguments: data_tag: D51
type_infered: string

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

tool: D34: illegal Command type in TLD LDM line

tool: D1: ldm: illegal char in address field

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

tool: D24: ldm: illegal char in data word

tool: D51: ldm: illegal character in data count

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;
}
```