user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rdx
  mov    %rsp,%rsi
  mov    $0xa,%edi
  movsd  D18(%rip),%xmm0
  call   <ecvt@plt>
  test   %rax,%rax
  je     L11
  mov    %rax,%rdi
  call   <puts@plt>
  mov    (%rsp),%esi
  lea    D26(%rip),%rbx
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x4(%rsp),%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L11:
  lea    0x4(%rsp),%r12
  mov    %rsp,%rbp
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    $0x5,%edi
  movsd  D30(%rip),%xmm0
  call   <ecvt@plt>
  mov    %rax,%rdi
  call   <puts@plt>
  mov    (%rsp),%esi
  lea    D26(%rip),%rbx
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x4(%rsp),%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    $0x5,%edi
  movsd  D41(%rip),%xmm0
  call   <ecvt@plt>
  mov    %rax,%rdi
  call   <puts@plt>
  mov    (%rsp),%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x4(%rsp),%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    $0x5,%edi
  movsd  D44(%rip),%xmm0
  call   <ecvt@plt>
  mov    %rax,%rdi
  call   <puts@plt>
  mov    (%rsp),%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x4(%rsp),%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    $0x2,%edi
  pxor   %xmm0,%xmm0
  call   <ecvt@plt>
  mov    %rax,%rdi
  call   <puts@plt>
  mov    (%rsp),%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x4(%rsp),%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  mov    $0x0,%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L14:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D18
type_guessed: f64
name: extract_symbolic_data
arguments: label: D26
type_guessed: string
name: extract_symbolic_data
arguments: label: D30
type_guessed: f64
name: extract_symbolic_data
arguments: label: D41
type_guessed: byte[8]
name: extract_symbolic_data
arguments: label: D44
type_guessed: f64

tool: D18: 12.2223

tool: D26: %d


tool: D30: 110.01

tool: {"D41": [0xd7,0xa3,0x70,0x3d,0x0a,0x5c,0x91,0xc0]}

tool: D44: 0.01

assistant: ```c
int main() {
  double d = 12.2223;
  int decpt, sign;
  char *rs = ecvt(d, 10, &decpt, &sign);
  if (rs) {
    printf("%s\n", rs);
    printf("%d\n", decpt);
    printf("%d\n", sign);
  }
  rs = ecvt(110.01, 5, &decpt, &sign);
  printf("%s\n", rs);
  printf("%d\n", decpt);
  printf("%d\n", sign);
  rs = ecvt(-1111.01, 5, &decpt, &sign);
  printf("%s\n", rs);
  printf("%d\n", decpt);
  printf("%d\n", sign);
  rs = ecvt(0.01, 5, &decpt, &sign);
  printf("%s\n", rs);
  printf("%d\n", decpt);
  printf("%d\n", sign);
  rs = ecvt(0.0, 2, &decpt, &sign);
  printf("%s\n", rs);
  printf("%d\n", decpt);
  printf("%d\n", sign);
}
```