user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<handle_jis>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x8000(%rsp),%r11
L54:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L54
  sub    $0xfe8,%rsp
  lea    D25(%rip),%rdx
  mov    %fs:0x28,%rax
  mov    %rax,0x8fd8(%rsp)
  mov    %esi,%eax
  mov    %rdi,%r15
  mov    %esi,%r13d
  lea    0x8bd0(%rsp),%rbp
  lea    0x38(%rsp),%r14
  test   %eax,%eax
  lea    D30(%rip),%rax
  cmovne %rdx,%rax
  mov    $0x8a10,%edx
  xor    %esi,%esi
  xor    %r12d,%r12d
  mov    %rax,0x18(%rsp)
  lea    0x1c0(%rsp),%rax
  mov    %rax,%rdi
  mov    %rax,0x28(%rsp)
  call   <memset@plt>
  lea    0x40(%rsp),%rax
  mov    $0x178,%edx
  xor    %esi,%esi
  mov    %rax,%rdi
  mov    %rax,0x8(%rsp)
  call   <memset@plt>
  movl   $0x0,0x10(%rsp)
  movl   $0x0,0x20(%rsp)
  nopl   (%rax)
L81:
  mov    %r15,%rdx
  mov    $0x400,%esi
  mov    %rbp,%rdi
  call   <getline@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  je     L186
  movzbl 0x8bd0(%rsp),%eax
  test   %al,%al
  je     L81
  cmp    $0x23,%al
  je     L81
  mov    %rbp,0x38(%rsp)
  mov    %rbp,%rdi
  test   %r13d,%r13d
  jne    L62
L163:
  xor    %edx,%edx
  mov    %r14,%rsi
  call   <strtol@plt>
  mov    0x38(%rsp),%rdi
  xor    %edx,%edx
  mov    %r14,%rsi
  mov    %eax,%ebx
  call   <strtol@plt>
  movzbl %bh,%edx
  sub    $0x21,%edx
  mov    %eax,%ecx
  movzbl %bl,%eax
  mov    0x20(%rsp),%ebx
  sub    $0x21,%eax
  cmp    %edx,%r12d
  movslq %edx,%rsi
  cmovl  %edx,%r12d
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  mov    %ebx,0x20(%rsp)
  cmp    %eax,0x40(%rsp,%rsi,4)
  jge    L196
  mov    %eax,0x40(%rsp,%rsi,4)
L196:
  imul   $0x5e,%edx,%edx
  addl   $0x1,0x10(%rsp)
  add    %eax,%edx
  movslq %edx,%rdx
  mov    %ecx,0x1c0(%rsp,%rdx,4)
  jmp    L81
  nopw   0x0(%rax,%rax,1)
L62:
  xor    %edx,%edx
  mov    %r14,%rsi
  call   <strtol@plt>
  mov    0x38(%rsp),%rdi
  jmp    L163
  nopl   0x0(%rax)
L186:
  mov    %r12d,%esi
  lea    0x1(%r12),%r13d
  xor    %eax,%eax
  xor    %r14d,%r14d
  lea    D55(%rip),%rdi
  movslq %r13d,%r15
  xor    %ebp,%ebp
  call   <printf@plt>
  lea    D79(%rip),%r12
  jmp    L95
  nopw   0x0(%rax,%rax,1)
L203:
  add    $0x1,%rbp
  add    $0x1,%r14d
  cmp    %rbp,%r15
  je     L209
L95:
  mov    0x8(%rsp),%rax
  mov    %ebp,%esi
  mov    (%rax,%rbp,4),%edx
  test   %edx,%edx
  jne    L203
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%rbp
  call   <printf@plt>
  cmp    %rbp,%r15
  jne    L95
L209:
  mov    0x20(%rsp),%eax
  lea    D12(%rip),%rdi
  xor    %r12d,%r12d
  lea    D7(%rip),%r15
  add    $0x1,%eax
  imul   %eax,%r14d
  mov    %eax,0x24(%rsp)
  imul   $0x64,0x10(%rsp),%eax
  cltd
  idiv   %r14d
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x18(%rsp),%rsi
  mov    %r14d,%edx
  xor    %eax,%eax
  lea    D57(%rip),%rdi
  call   <printf@plt>
  mov    0x28(%rsp),%rax
  mov    0x8(%rsp),%rbp
  mov    %rax,0x10(%rsp)
  imul   $0x5e,%r13d,%eax
  mov    %eax,0x18(%rsp)
  jmp    L219
  nop
L50:
  addq   $0x178,0x10(%rsp)
  add    $0x4,%rbp
  add    $0x5e,%r12d
  cmp    %r12d,0x18(%rsp)
  je     L207
L219:
  mov    0x0(%rbp),%eax
  test   %eax,%eax
  je     L50
  mov    0x24(%rsp),%eax
  mov    0x10(%rsp),%r13
  mov    %ebx,%r14d
  add    %ebx,%eax
  mov    %eax,0x8(%rsp)
  jmp    L205
  nopl   0x0(%rax,%rax,1)
L22:
  add    $0x4,%r13
  cmp    %r14d,0x8(%rsp)
  je     L69
L205:
  mov    0x0(%r13),%esi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r14d,%eax
  add    $0x1,%r14d
  and    $0x7,%eax
  cmp    $0x7,%eax
  jne    L22
  mov    $0xa,%edi
  add    $0x4,%r13
  call   <putchar@plt>
  cmp    %r14d,0x8(%rsp)
  jne    L205
L69:
  mov    0x20(%rsp),%eax
  lea    0x1(%rax,%rbx,1),%ebx
  jmp    L50
  nop
L207:
  and    $0x7,%ebx
  jne    L184
L20:
  lea    D41(%rip),%rdi
  call   <puts@plt>
  mov    0x8fd8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L23
  add    $0x8fe8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L184:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L20
L23:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D25
type_infered: string
name: unpack_data
arguments: data_label: D30
type_infered: string
name: unpack_data
arguments: data_label: D55
type_infered: string
name: unpack_data
arguments: data_label: D79
type_infered: string
name: unpack_data
arguments: data_label: D12
type_infered: string
name: unpack_data
arguments: data_label: D7
type_infered: string
name: unpack_data
arguments: data_label: D57
type_infered: string
name: unpack_data
arguments: data_label: D41
type_infered: string

tool: D25: jis208

tool: D30: jis212

tool: D55: /* max row = %d. The following rows are excluded:

tool: D79:  %d

tool: D12: , density=%d%% */


tool: D7: 0x%04x, 

tool: D57: const unsigned short table_%s[%d] = {


tool: D41: };


assistant: ```c
void handle_jis(FILE *f, int is_jis208) {
  int c1, c2, b1, b2, b1_max, b2_max, i, j, nb, n;
  int table[94 * 94];
  int table_b2_max[94];
  char line[1024];
  const char *p;
  const char *name = is_jis208 ? "jis208" : "jis212";
  memset(table, 0, sizeof(table));
  memset(table_b2_max, 0, sizeof(table_b2_max));
  b1_max = 0;
  b2_max = 0;
  nb = 0;
  for (;;) {
    if (!getline(line, sizeof(line), f))
      break;
    if (line[0] == '\0' || line[0] == '#')
      continue;
    p = line;
    if (is_jis208)
      c1 = strtol(p, (char **)&p, 0);
    c1 = strtol(p, (char **)&p, 0);
    c2 = strtol(p, (char **)&p, 0);
    b1 = (c1 >> 8) & 0xff;
    b2 = (c1)&0xff;
    b1 = b1 - 0x21;
    b2 = b2 - 0x21;
    if (b1 > b1_max)
      b1_max = b1;
    if (b2 > b2_max)
      b2_max = b2;
    if (b2 > table_b2_max[b1])
      table_b2_max[b1] = b2;
    table[b1 * 94 + b2] = c2;
    nb++;
  }
  printf("/* max row = %d. The following rows are excluded:", b1_max);
  n = 0;
  for (i = 0; i <= b1_max; i++) {
    if (table_b2_max[i] == 0) {
      printf(" %d", i);
    } else {
      n++;
    }
  }
  printf(", density=%d%% */\n", nb * 100 / (n * (b2_max + 1)));
  printf("const unsigned short table_%s[%d] = {\n", name, n * (b2_max + 1));
  n = 0;
  for (i = 0; i <= b1_max; i++) {
    if (table_b2_max[i] != 0) {
      for (j = 0; j <= b2_max; j++) {
        printf("0x%04x, ", table[i * 94 + j]);
        if ((n++ & 7) == 7)
          printf("\n");
      }
    }
  }
  if ((n & 7) != 0)
    printf("\n");
  printf("};\n\n");
}
```