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

```asm
<main>:
  endbr64
  push   %r14
  lea    D5(%rip),%rdi
  xor    %r14d,%r14d
  push   %r13
  lea    D52(%rip),%r13
  push   %r12
  mov    $0xcccccccd,%r12d
  push   %rbp
  lea    D50(%rip),%rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  call   <printf@plt>
  xor    %esi,%esi
  mov    %rbx,%rdi
  call   <to_edge@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  nopl   0x0(%rax)
L7:
  add    $0x1,%r14d
  cmp    $0x19a1,%r14d
  je     L9
L83:
  mov    %r14d,%esi
  mov    %rbx,%rdi
  call   <to_edge@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r14d,%eax
  mov    %r14d,%edx
  imul   %r12,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%edx
  cmp    $0x9,%edx
  jne    L7
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%r14d
  call   <printf@plt>
  cmp    $0x19a1,%r14d
  jne    L83
L9:
  lea    D65(%rip),%rdi
  xor    %ebx,%ebx
  mov    $0x1,%r14d
  mov    $0xcccccccd,%r12d
  call   <puts@plt>
  lea    D43(%rip),%rdi
  xor    %eax,%eax
  lea    D52(%rip),%r13
  call   <printf@plt>
  nopl   0x0(%rax)
L26:
  xor    %esi,%esi
  xor    %eax,%eax
  nopl   0x0(%rax)
L19:
  bt     %eax,%ebx
  jae    L41
  lea    (%rax,%rax,1),%ecx
  mov    %r14d,%edx
  shl    %cl,%edx
  add    %edx,%esi
L41:
  add    $0x1,%eax
  cmp    $0x8,%eax
  jne    L19
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %ebx,%eax
  mov    %ebx,%edx
  imul   %r12,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%edx
  cmp    $0x9,%edx
  je     L76
L79:
  add    $0x1,%ebx
  cmp    $0x100,%ebx
  jne    L26
  lea    D4(%rip),%rdi
  call   <puts@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x30,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nop
L76:
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L79
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D5
type: string
name: retrieve_data
arguments: tag: D52
type: string
name: retrieve_data
arguments: tag: D50
type: string
name: retrieve_data
arguments: tag: D65
type: string
name: retrieve_data
arguments: tag: D43
type: string
name: retrieve_data
arguments: tag: D4
type: string

tool: D5: unsigned short Edge_To_Quat[6561] = 
{
    

tool: D52: 
    

tool: D50:  %5u,

tool: D65: 
};


tool: D43: unsigned short String_To_Quat[256] = 
{
    

tool: D4: 
};

assistant: ```c
main() {
  int edge[8], i;
  printf("unsigned short Edge_To_Quat[6561] = \n{\n    ");
  for (i = 0; i < 6561; i++) {
    printf(" %5u,", to_edge(edge, i));
    if (i % 10 == 9)
      printf("\n    ");
  }
  printf("\n};\n\n");
  printf("unsigned short String_To_Quat[256] = \n{\n    ");
  for (i = 0; i < 256; i++) {
    register j, total;
    total = 0;
    for (j = 0; j < 8; j++)
      if (((i >> j) & 1) == 1)
        total += 1 << (2 * j);
    printf(" %5u,", total);
    if (i % 10 == 9)
      printf("\n    ");
  }
  printf("\n};\n");
  return 0;
}
```