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

```asm
<main_double>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x1,-0x14(%rbp)
  jmp    L12
L2:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strtod@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%esi
  lea    D79(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  -0x10(%rbp),%xmm0
  addsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  -0x10(%rbp),%xmm0
  subsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  -0x10(%rbp),%xmm0
  divsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  addl   $0x1,-0x14(%rbp)
L12:
  mov    -0x14(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L2
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D1
type_infered: string
name: disassemble_data
arguments: label: D36
type_infered: string
name: disassemble_data
arguments: label: D79
type_infered: string
name: disassemble_data
arguments: label: D17
type_infered: string
name: disassemble_data
arguments: label: D14
type_infered: string
name: disassemble_data
arguments: label: D55
type_infered: string
name: disassemble_data
arguments: label: D52
type_infered: string
name: disassemble_data
arguments: label: D7
type_infered: string
name: disassemble_data
arguments: label: D19
type_infered: string

tool: D1: double

tool: D36: val str: %s


tool: D79: val int: %d


tool: D17: val flt: %.9f


tool: D14: last: %.9f


tool: D55: +: %.9f


tool: D52: -: %.9f


tool: D7: *: %.9f


tool: D19: /: %.9f


assistant: ```c
int main_double(int argc, char *argv[]) {
  int i;
  double last = 0.0;
  double x;
  printf("double\n");
  for (i = 1; i < argc; ++i) {
    printf("val str: %s\n", argv[i]);
    x = strtod(argv[i], 0);
    printf("val int"
           ": %d\n",
           (int)(x));
    printf("val flt"
           ": %."
           "9"
           "f\n",
           (double)(x));
    printf("last"
           ": %."
           "9"
           "f\n",
           (double)(last));
    printf("+"
           ": %."
           "9"
           "f\n",
           (double)(last + x));
    printf("-"
           ": %."
           "9"
           "f\n",
           (double)(last - x));
    printf("*"
           ": %."
           "9"
           "f\n",
           (double)(last * x));
    printf("/"
           ": %."
           "9"
           "f\n",
           (double)(last / x));
    printf("\n");
    last = x;
  }
  return 0;
}
```