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

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  lea    D109(%rip),%rdi
  call   <puts@plt>
  lea    D76(%rip),%rdi
  call   <puts@plt>
  lea    D95(%rip),%rdi
  call   <puts@plt>
  pxor   %xmm0,%xmm0
  lea    D82(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x1,%ebx
  lea    D129(%rip),%r12
  lea    D82(%rip),%rbp
  jmp    L161
L23:
  mov    %r12,%rdi
  call   <puts@plt>
L100:
  mov    %ebx,%eax
  mov    $0x0,%edx
L115:
  add    $0x1,%edx
  add    %eax,%eax
  cmp    $0x80,%eax
  jle    L115
L35:
  sub    $0x7,%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  mov    %rbp,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  add    $0x1,%ebx
  cmp    $0x81,%ebx
  je     L50
L161:
  cmp    $0x80,%ebx
  je     L23
  jle    L100
  mov    $0x0,%edx
  jmp    L35
L50:
  mov    $0x1,%ebx
  lea    D82(%rip),%rbp
  jmp    L43
L137:
  lea    -0x180(%rax,%rax,1),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    %rbp,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  add    $0x1,%ebx
  cmp    $0x81,%ebx
  je     L37
L43:
  mov    %ebx,%eax
  neg    %eax
  cmovs  %ebx,%eax
  cmp    $0x7f,%eax
  jg     L137
L130:
  add    %eax,%eax
  cmp    $0x7f,%eax
  jle    L130
  jmp    L137
L37:
  lea    D79(%rip),%rdi
  call   <puts@plt>
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x18(%rsp)
  movsd  %xmm7,0x10(%rsp)
  mov    $0x40,%ebx
  mov    D125(%rip),%rbp
  jmp    L165
L36:
  lea    D15(%rip),%rdi
  call   <puts@plt>
  jmp    L165
L133:
  cvttsd2si 0x8(%rsp),%rax
  mov    %eax,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  lea    D112(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  0x8(%rsp),%xmm0
  subsd  0x28(%rsp),%xmm0
  movapd %xmm0,%xmm4
  maxsd  0x10(%rsp),%xmm4
  movsd  %xmm4,0x10(%rsp)
  mulsd  0x20(%rsp),%xmm0
  mulsd  D30(%rip),%xmm0
  maxsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x18(%rsp)
  add    $0x1,%ebx
  cmp    $0x80,%ebx
  je     L123
  cmp    $0x60,%ebx
  je     L36
L165:
  pxor   %xmm3,%xmm3
  cvtsi2sd %ebx,%xmm3
  movsd  %xmm3,0x20(%rsp)
  movsd  D102(%rip),%xmm2
  divsd  %xmm3,%xmm2
  movsd  %xmm2,0x28(%rsp)
  movsd  %xmm2,0x8(%rsp)
  movq   %rbp,%xmm0
  andpd  %xmm2,%xmm0
  movsd  D8(%rip),%xmm5
  ucomisd %xmm0,%xmm5
  jbe    L133
  cvttsd2si %xmm2,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movapd %xmm2,%xmm1
  cmpnlesd %xmm0,%xmm1
  movsd  D96(%rip),%xmm7
  andpd  %xmm7,%xmm1
  addsd  %xmm1,%xmm0
  movq   %rbp,%xmm1
  andnpd %xmm2,%xmm1
  orpd   %xmm1,%xmm0
  movsd  %xmm0,0x8(%rsp)
  jmp    L133
L123:
  movapd %xmm0,%xmm1
  movapd %xmm4,%xmm0
  lea    D86(%rip),%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  mov    $0x0,%eax
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D109
datatype: string
name: retrieve_data
arguments: data_label: D76
datatype: string
name: retrieve_data
arguments: data_label: D95
datatype: string
name: retrieve_data
arguments: data_label: D82
datatype: string
name: retrieve_data
arguments: data_label: D129
datatype: string
name: retrieve_data
arguments: data_label: D79
datatype: string
name: retrieve_data
arguments: data_label: D125
datatype: byte[8]
name: retrieve_data
arguments: data_label: D15
datatype: string
name: retrieve_data
arguments: data_label: D112
datatype: string
name: retrieve_data
arguments: data_label: D30
datatype: f32[2]
name: retrieve_data
arguments: data_label: D102
datatype: f32[2]
name: retrieve_data
arguments: data_label: D8
datatype: f32[2]
name: retrieve_data
arguments: data_label: D96
datatype: f32[2]
name: retrieve_data
arguments: data_label: D86
datatype: string

tool: D109: /* This table has been generated by divtab-sh4.c.  */

tool: D76: 	.balign 4

tool: D95: LOCAL(div_table_clz):

tool: D82: 	.byte	%d


tool: D129: /* Lookup table translating positive divisor to index into table of
   normalized inverse.  N.B. the '0' entry is also the last entry of the
 previous table, and causes an unaligned access for division by zero.  */
LOCAL(div_table_ix):

tool: D79: /* 1/64 .. 1/127, normalized.  There is an implicit leading 1 in bit 32.  */
	.balign 4
LOCAL(zero_l):

tool: {"D125": [0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f]}

tool: D15: LOCAL(div_table):

tool: D112: 	.long	0x%X


tool: {"D30": [0.0,1.0]}

tool: {"D102": [0.0,56.0]}

tool: {"D8": [0.0,176.0]}

tool: {"D96": [0.0,1.875]}

tool: D86: 	/* maximum error: %f scaled: %f*/


assistant: ```c
int main() {
  int i, j;
  double q, r, err, max_err = 0, max_s_err = 0;
  puts("/* This table has been generated by divtab-sh4.c.  */");
  puts("\t.balign 4");
  puts("LOCAL(div_table_clz):");
  printf("\t.byte\t%d\n", 0);
  for (i = 1; i <= 128; i++) {
    int n = 0;
    if (i == 128)
      puts("/* Lookup table translating positive divisor to index into table of\n   normalized inverse.  N.B. the '0' entry is also the last entry of the\n previous table, and causes an unaligned access for division by zero.  */\nLOCAL(div_table_ix):");
    for (j = i; j <= 128; j += j)
      n++;
    printf("\t.byte\t%d\n", n - 7);
  }
  for (i = 1; i <= 128; i++) {
    j = i < 0 ? -i : i;
    while (j < 128)
      j += j;
    printf("\t.byte\t%d\n", j * 2 - 96 * 4);
  }
  puts("/* 1/64 .. 1/127, normalized.  There is an implicit leading 1 in bit 32.  */\n	.balign 4\nLOCAL(zero_l):");
  for (i = 64; i < 128; i++) {
    if (i == 96)
      puts("LOCAL(div_table):");
    q = 4. * (1 << 30) * 128 / i;
    r = ceil(q);
    printf("\t.long\t0x%X\n", (unsigned)r);
    err = r - q;
    if (err > max_err)
      max_err = err;
    err = err * i / 128;
    if (err > max_s_err)
      max_s_err = err;
  }
  printf("\t/* maximum error: %f scaled: %f*/\n", max_err, max_s_err);
  exit(0);
}
```