user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    D49(%rip),%rdi
  call   <printf@plt>
  mov    %rsp,%rdi
  mov    $0x0,%esi
  call   <to_edge@plt>
  mov    %eax,%esi
  lea    D0(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%ebx
  mov    %rsp,%r12
  lea    D0(%rip),%rbp
  lea    D37(%rip),%r13
L48:
  add    $0x1,%ebx
  cmp    $0x19a1,%ebx
  je     L16
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <to_edge@plt>
  mov    %eax,%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movslq %ebx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %ebx,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  mov    %ebx,%edx
  sub    %eax,%edx
  cmp    $0x9,%edx
  jne    L48
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L48
L16:
  lea    D71(%rip),%rdi
  call   <puts@plt>
  lea    D7(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%ebx
  mov    $0x1,%ebp
  lea    D0(%rip),%r12
  lea    D37(%rip),%r13
  jmp    L111
L54:
  add    $0x1,%eax
  cmp    $0x8,%eax
  je     L86
L68:
  bt     %eax,%ebx
  jae    L54
  lea    (%rax,%rax,1),%ecx
  mov    %ebp,%edx
  shl    %cl,%edx
  add    %edx,%esi
  jmp    L54
L86:
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movslq %ebx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %ebx,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  mov    %ebx,%edx
  sub    %eax,%edx
  cmp    $0x9,%edx
  je     L2
L67:
  add    $0x1,%ebx
  cmp    $0x100,%ebx
  je     L73
L111:
  mov    $0x0,%esi
  mov    $0x0,%eax
  jmp    L68
L2:
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L67
L73:
  lea    D47(%rip),%rdi
  call   <puts@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L99
  mov    $0x0,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L99:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D49
type: string
name: extract_symbolic_data
arguments: label: D0
type: string
name: extract_symbolic_data
arguments: label: D37
type: string
name: extract_symbolic_data
arguments: label: D71
type: string
name: extract_symbolic_data
arguments: label: D7
type: string
name: extract_symbolic_data
arguments: label: D47
type: string

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

tool: D0:  %5u,

tool: D37: 
    

tool: D71: 
};


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

tool: D47: 
};

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;
}
```