user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<load_char_table>:
  endbr64
  push   %r15
  push   %r14
  mov    %rsi,%r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %edx,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  setne  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  xor    %edi,%edi
  test   %r14,%r14
  setne  %dil
  call   <assert@plt>
  mov    0x8(%rsp),%ecx
  test   %ecx,%ecx
  jle    L340
  movslq %ecx,%rdx
  xor    %esi,%esi
  mov    %r14,%rdi
  mov    %ecx,0x8(%rsp)
  call   <memset@plt>
  mov    0x8(%rsp),%ecx
L340:
  movzbl (%r12),%eax
  cmp    $0x9,%al
  je     L213
  xor    %ebx,%ebx
  cmp    $0x20,%al
  jne    L411
L213:
  mov    $0x1,%eax
L20:
  movzbl (%r12,%rax,1),%edx
  mov    %eax,%ebx
  add    $0x1,%rax
  cmp    $0x20,%dl
  je     L20
  cmp    $0x9,%dl
  je     L20
L411:
  mov    %r12,%rdi
  mov    %ecx,0x8(%rsp)
  call   <strlen@plt>
  mov    0x8(%rsp),%ecx
  sub    %ebx,%eax
  cmp    %ebx,%eax
  mov    %eax,%r15d
  jl     L418
  xor    %r8d,%r8d
  xor    %r13d,%r13d
  lea    -0x1(%rax),%r9d
  xor    %ebp,%ebp
  lea    0x33(%rsp),%rdi
  lea    D60(%rip),%r10
  jmp    L234
  nopw   0x0(%rax,%rax,1)
L28:
  test   %r13d,%r13d
  je     L263
  cmp    $0x5c,%esi
  je     L252
L64:
  cmp    %ebp,%ecx
  je     L257
  movslq %ebp,%rdx
  add    $0x1,%ebp
  mov    %al,(%r14,%rdx,1)
L147:
  add    $0x1,%ebx
  mov    $0x1,%r13d
  cmp    %ebx,%r15d
  jl     L171
L234:
  movslq %ebx,%rdx
  movsbl (%r12,%rdx,1),%esi
  mov    %esi,0x2c(%rsp)
  mov    %esi,%eax
  test   %esi,%esi
  je     L67
  cmp    $0x22,%esi
  jne    L28
  test   %r13d,%r13d
  je     L147
  test   %r8d,%r8d
  jne    L116
  add    $0x1,%ebx
  mov    %r13d,%r8d
  mov    $0x1,%r13d
  cmp    %ebx,%r15d
  jge    L234
  nopl   0x0(%rax)
L171:
  mov    $0x1,%r13d
  cmp    %ebp,%ecx
  jle    L177
  movslq %ebp,%rbp
  movb   $0x0,(%r14,%rbp,1)
  jmp    L177
  nopl   0x0(%rax,%rax,1)
L252:
  cmp    %ebx,%r9d
  je     L257
  add    $0x1,%ebx
  movslq %ebx,%rsi
  movzbl (%r12,%rsi,1),%eax
  cmp    $0x30,%al
  je     L161
  cmp    $0x6e,%al
  je     L201
  jg     L404
  cmp    $0x22,%al
  je     L64
  cmp    $0x5c,%al
  je     L64
  cs nopw 0x0(%rax,%rax,1)
L254:
  lea    -0x3(%r15),%r11d
  cmp    %ebx,%r11d
  jle    L257
  mov    %rdi,%r11
  lea    0x4(%rdx),%r13
  mov    %esi,%ebx
  sub    %rdx,%r11
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  ja     L375
L323:
  mov    %al,-0x1(%r11,%rsi,1)
  add    $0x1,%rsi
  cmp    %rsi,%r13
  je     L8
  movzbl (%r12,%rsi,1),%eax
  mov    %esi,%ebx
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  jbe    L323
L375:
  lea    D14(%rip),%rdi
  xor    %r13d,%r13d
  call   <puts@plt>
  jmp    L177
  nopl   0x0(%rax,%rax,1)
L404:
  cmp    $0x72,%al
  jne    L254
  mov    $0xd,%eax
  jmp    L64
  cs nopw 0x0(%rax,%rax,1)
L116:
  lea    D11(%rip),%rdi
  xor    %r13d,%r13d
  call   <puts@plt>
L177:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L327
  add    $0x48,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L161:
  xor    %eax,%eax
  jmp    L64
  nop
L201:
  mov    $0xa,%eax
  jmp    L64
  nopw   0x0(%rax,%rax,1)
L8:
  lea    0x2c(%rsp),%rdx
  mov    %r10,%rsi
  mov    %r9d,0x1c(%rsp)
  mov    %ecx,0x18(%rsp)
  mov    %r8d,0x14(%rsp)
  movb   $0x0,0x36(%rsp)
  mov    %rdi,0x8(%rsp)
  call   <sscanf@plt>
  cmp    $0x1,%eax
  jne    L375
  movzbl 0x2c(%rsp),%eax
  mov    0x8(%rsp),%rdi
  lea    D60(%rip),%r10
  mov    0x14(%rsp),%r8d
  mov    0x18(%rsp),%ecx
  mov    0x1c(%rsp),%r9d
  jmp    L64
  nopw   0x0(%rax,%rax,1)
L67:
  cmp    $0x1,%r8d
  jne    L115
  test   %r13d,%r13d
  jne    L171
L115:
  lea    D54(%rip),%rdi
  xor    %r13d,%r13d
  call   <puts@plt>
  jmp    L177
  nopl   0x0(%rax,%rax,1)
L257:
  lea    D53(%rip),%rdi
  xor    %r13d,%r13d
  call   <puts@plt>
  jmp    L177
L263:
  lea    D28(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L177
L418:
  xor    %ebp,%ebp
  jmp    L171
L327:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D60
datatype: string
name: unpack_data
arguments: data_label: D14
datatype: string
name: unpack_data
arguments: data_label: D11
datatype: string
name: unpack_data
arguments: data_label: D54
datatype: string
name: unpack_data
arguments: data_label: D53
datatype: string
name: unpack_data
arguments: data_label: D28
datatype: string

tool: D60: %03o

tool: D14: load_char_table: Invalid octal number

tool: D11: load_char_table: Unexpected '"'

tool: D54: load_char_table: Unexpected end of string

tool: D53: load_char_table: String longer than expected

tool: D28: load_char_table: Unrecognized character '%c'


assistant: ```c
int load_char_table(const char *data, char *table, int maxlen) {
  int i, j, startpos;
  char temp[5];
  int val, write, len;
  char ch;
  int start, stop;
  assert(data != NULL);
  assert(table != NULL);
  for (i = 0; i < maxlen; i++) {
    table[i] = '\0';
  }
  write = 0;
  start = 0;
  stop = 0;
  startpos = 0;
  while (data[startpos] == ' ' || data[startpos] == '\t')
    startpos++;
  len = strlen(data) - startpos;
  for (i = startpos; i <= len; i++) {
    val = data[i];
    if (val == '\0') {
      if (start == 1 && stop == 1)
        break;
      printf("load_char_table: Unexpected end of string\n");
      return 0;
    }
    if (val == '"') {
      if (start == 0) {
        start = 1;
        continue;
      } else if (stop == 0) {
        stop = 1;
        continue;
      } else {
        printf("load_char_table: Unexpected '\"'\n");
        return 0;
      }
    } else {
      if (start == 0) {
        printf("load_char_table: Unrecognized "
               "character '%c'\n",
               val);
        return 0;
      }
    }
    if (val == '\\') {
      if (i == len - 1) {
        printf("load_char_table: String longer "
               "than expected\n");
        return 0;
      }
      i++;
      if (data[i] == '0') {
        ch = '\0';
      } else if (data[i] == 'n') {
        ch = '\n';
      } else if (data[i] == 'r') {
        ch = '\r';
      } else if (data[i] == '\\') {
        ch = '\\';
      } else if (data[i] == '"') {
        ch = '"';
      } else {
        if (i >= len - 3) {
          printf("load_char_table: String "
                 "longer than expected\n");
          return 0;
        }
        for (j = 0; j < 3; j++) {
          ch = data[i];
          i++;
          if (ch < '0' || ch > '9') {
            printf("load_char_table: "
                   "Invalid octal "
                   "number\n");
            return 0;
          }
          temp[j] = ch;
        }
        i--;
        temp[3] = '\0';
        if (sscanf(temp, "%03o", &val) != 1) {
          printf("load_char_table: Invalid "
                 "octal number\n");
          return 0;
        }
        ch = val;
      }
    } else {
      ch = val;
    }
    if (write == maxlen) {
      printf("load_char_table: String longer than "
             "expected\n");
      return 0;
    }
    table[write] = ch;
    write++;
  }
  if (write < maxlen) {
    table[write] = '\0';
  }
  return 1;
}
```