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

```asm
<draw_hex_table>:
  endbr64
  push   %r14
  lea    D11(%rip),%rdi
  xor    %r14d,%r14d
  push   %r13
  lea    D65(%rip),%r13
  push   %r12
  lea    D77(%rip),%r12
  push   %rbp
  lea    D38(%rip),%rbp
  push   %rbx
  lea    D30(%rip),%rbx
  call   <puts@plt>
  nopw   0x0(%rax,%rax,1)
L56:
  xor    %edx,%edx
  xor    %esi,%esi
  xor    %r8d,%r8d
  xor    %edi,%edi
L48:
  lea    (%rdx,%rdx,1),%ecx
  mov    %r14d,%eax
  shr    %cl,%eax
  and    $0x3,%eax
  cmp    $0x2,%eax
  je     L123
  cmp    $0x3,%eax
  je     L41
  mov    %edx,%ecx
  mov    %eax,%r9d
  shl    %cl,%r9d
  mov    %r9d,%ecx
  or     %esi,%ecx
  cmp    $0x1,%eax
  cmove  %rcx,%rsi
L74:
  add    $0x1,%edx
  cmp    $0x4,%edx
  jne    L48
  cmp    $0x4,%edi
  je     L35
  cmp    $0x4,%r8d
  je     L101
  test   %edi,%edi
  je     L163
  test   %r8d,%r8d
  jne    L8
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <printf@plt>
L31:
  add    $0x1,%r14d
  test   $0x7,%r14b
  je     L50
L169:
  cmp    $0x100,%r14d
  jne    L56
  pop    %rbx
  lea    D4(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1080 <puts@plt>
  nopw   0x0(%rax,%rax,1)
L41:
  add    $0x1,%edi
  jmp    L74
  nopl   (%rax)
L123:
  add    $0x1,%r8d
  jmp    L74
  xchg   %ax,%ax
L50:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L169
  nopl   0x0(%rax)
L8:
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L31
  nopl   0x0(%rax)
L163:
  test   %r8d,%r8d
  jne    L8
  movsbl 0x0(%r13,%rsi,1),%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L31
  nopw   0x0(%rax,%rax,1)
L35:
  lea    D18(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L31
  nopl   0x0(%rax,%rax,1)
L101:
  lea    D26(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L31
```

tool_calls: name: read_data
arguments: data_label: D11
type: string
name: read_data
arguments: data_label: D65
type: string
name: read_data
arguments: data_label: D77
type: string
name: read_data
arguments: data_label: D38
type: string
name: read_data
arguments: data_label: D30
type: string
name: read_data
arguments: data_label: D4
type: string
name: read_data
arguments: data_label: D18
type: string
name: read_data
arguments: data_label: D26
type: string

tool: D11: extern const char hex_digits[256] = {

tool: D65: 0123456789abcdef

tool: D77:  '%c',

tool: D38:  'X',

tool: D30:  'Z',

tool: D4: };

tool: D18:  'z',

tool: D26:  'x',

assistant: ```c
void draw_hex_table() {
  unsigned idx;
  printf("extern const char hex_digits[256] = {\n");
  for (idx = 0; idx < 256; idx += 1) {
    unsigned cnt_z = 0, cnt_x = 0;
    unsigned bv = 0, bdx;
    for (bdx = 0; bdx < 4; bdx += 1) {
      switch ((idx >> (bdx * 2)) & 3) {
      case 0:
        break;
      case 1:
        bv |= 1 << bdx;
        break;
      case 2:
        cnt_x += 1;
        break;
      case 3:
        cnt_z += 1;
        break;
      }
    }
    if (cnt_z == 4)
      printf(" 'z',");
    else if (cnt_x == 4)
      printf(" 'x',");
    else if ((cnt_z > 0) && (cnt_x == 0))
      printf(" 'Z',");
    else if (cnt_x > 0)
      printf(" 'X',");
    else
      printf(" '%c',", "0123456789abcdef"[bv]);
    if (((idx + 1) % 8) == 0)
      printf("\n");
  }
  printf("};\n");
}
```