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

```asm
<draw_hex_table>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  lea    D8(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%ebx
  mov    $0x1,%ebp
  lea    D56(%rip),%r13
  lea    D46(%rip),%r12
  jmp    L177
L26:
  mov    %edx,%edi
  mov    %ebp,%r10d
  mov    %esi,%ecx
  shl    %cl,%r10d
  or     %r10d,%edx
  cmp    $0x1,%eax
  cmovne %edi,%edx
L60:
  add    $0x1,%esi
  cmp    $0x4,%esi
  je     L95
L37:
  lea    (%rsi,%rsi,1),%ecx
  mov    %ebx,%eax
  shr    %cl,%eax
  and    $0x3,%eax
  cmp    $0x2,%eax
  je     L52
  cmp    $0x3,%eax
  jne    L26
  add    $0x1,%r9d
  jmp    L60
L52:
  add    $0x1,%r8d
  jmp    L60
L95:
  cmp    $0x4,%r9d
  je     L107
  cmp    $0x4,%r8d
  je     L166
  test   %r9d,%r9d
  je     L78
  test   %r8d,%r8d
  je     L167
L78:
  test   %r8d,%r8d
  je     L8
  lea    D21(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L44:
  add    $0x1,%ebx
  test   $0x7,%bl
  je     L189
L43:
  cmp    $0x100,%ebx
  je     L126
L177:
  mov    $0x0,%esi
  mov    $0x0,%edx
  mov    $0x0,%r8d
  mov    $0x0,%r9d
  jmp    L37
L107:
  lea    D42(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L44
L166:
  lea    D16(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L44
L167:
  lea    D14(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L44
L8:
  mov    %edx,%edx
  movsbl 0x0(%r13,%rdx,1),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L44
L189:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L43
L126:
  lea    D6(%rip),%rdi
  call   <puts@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: read_data
arguments: tag: D8
data_type: string
name: read_data
arguments: tag: D56
data_type: string
name: read_data
arguments: tag: D46
data_type: string
name: read_data
arguments: tag: D21
data_type: string
name: read_data
arguments: tag: D42
data_type: string
name: read_data
arguments: tag: D16
data_type: string
name: read_data
arguments: tag: D14
data_type: string
name: read_data
arguments: tag: D6
data_type: string

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

tool: D56: 0123456789abcdef

tool: D46:  '%c',

tool: D21:  'X',

tool: D42:  'z',

tool: D16:  'x',

tool: D14:  'Z',

tool: D6: };

assistant: ```c
void draw_hex_table(void) {
  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");
}
```