user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  movl   $0x20,-0x24(%rbp)
  jmp    L45
L198:
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x20(%rbp)
  jmp    L149
L112:
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%esi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x20(%rbp)
L149:
  cmpl   $0xf,-0x20(%rbp)
  jle    L112
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x10,-0x24(%rbp)
L45:
  cmpl   $0x7f,-0x24(%rbp)
  jle    L198
  movl   $0x80,-0x24(%rbp)
  jmp    L152
L74:
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x20(%rbp)
  jmp    L98
L33:
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  sar    $0x6,%eax
  and    $0x1f,%eax
  add    $0xc0,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x20(%rbp)
L98:
  cmpl   $0xf,-0x20(%rbp)
  jle    L33
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x10,-0x24(%rbp)
L152:
  cmpl   $0x7ff,-0x24(%rbp)
  jle    L74
  movl   $0x800,-0x24(%rbp)
  jmp    L67
L200:
  cmpl   $0xd79f,-0x24(%rbp)
  jle    L95
  cmpl   $0xdfff,-0x24(%rbp)
  jle    L4
L95:
  cmpl   $0xfdcf,-0x24(%rbp)
  jle    L116
  cmpl   $0xfdef,-0x24(%rbp)
  jle    L23
L116:
  cmpl   $0xffef,-0x24(%rbp)
  jle    L166
  cmpl   $0xffff,-0x24(%rbp)
  jle    L144
L166:
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x20(%rbp)
  jmp    L115
L75:
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x1c(%rbp),%eax
  sar    $0x6,%eax
  and    $0x3f,%eax
  sub    $0xffffff80,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x1c(%rbp),%eax
  sar    $0xc,%eax
  and    $0xf,%eax
  add    $0xe0,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x18(%rbp),%ecx
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x20(%rbp)
L115:
  cmpl   $0xf,-0x20(%rbp)
  jle    L75
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L119
L4:
  nop
  jmp    L119
L23:
  nop
  jmp    L119
L144:
  nop
L119:
  addl   $0x10,-0x24(%rbp)
L67:
  cmpl   $0xffff,-0x24(%rbp)
  jle    L200
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D6
datatype: string
name: unpack_data
arguments: tag: D15
datatype: string
name: unpack_data
arguments: tag: D14
datatype: string
name: unpack_data
arguments: tag: D29
datatype: string

tool: D6: %04x:

tool: D15:  %c

tool: D14:  %c%c

tool: D29:  %c%c%c

assistant: ```c
int main(int argc, char **argv) {
  int k, j;
  for (k = 0x20; k < 0x80; k += 0x10) {
    printf("%04x:", k);
    for (j = 0; j < 0x10; j++)
      printf(" %c", k + j);
    printf("\n");
  }
  for (k = 0x80; k < 0x800; k += 0x10) {
    printf("%04x:", k);
    for (j = 0; j < 0x10; j++) {
      int sum = k + j;
      int b0 = 0x80 + ((sum & 0x003f));
      int b1 = 0xc0 + ((sum & 0x07c0) >> 6);
      printf(" %c%c", b1, b0);
    }
    printf("\n");
  }
  for (k = 0x800; k < 0x10000; k += 0x10) {
    if (k >= 0xd7a0 && k < 0xe000)
      continue;
    if (k >= 0xfdd0 && k < 0xfdf0)
      continue;
    if (k >= 0xfff0 && k < 0x10000)
      continue;
    printf("%04x:", k);
    for (j = 0; j < 0x10; j++) {
      int sum = k + j;
      int b0 = 0x80 + ((sum & 0x003f));
      int b1 = 0x80 + ((sum & 0x0fc0) >> 6);
      int b2 = 0xe0 + ((sum & 0xf000) >> 12);
      printf(" %c%c%c", b2, b1, b0);
    }
    printf("\n");
  }
}
```