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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movsd  D135(%rip),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  lea    -0x1c(%rbp),%rdx
  lea    -0x20(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    $0xa,%edi
  movq   %rax,%xmm0
  call   <ecvt@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  je     L13
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L13:
  lea    -0x1c(%rbp),%rdx
  lea    -0x20(%rbp),%rcx
  mov    D75(%rip),%rax
  mov    %rcx,%rsi
  mov    $0x5,%edi
  movq   %rax,%xmm0
  call   <ecvt@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x1c(%rbp),%rdx
  lea    -0x20(%rbp),%rcx
  mov    D46(%rip),%rax
  mov    %rcx,%rsi
  mov    $0x5,%edi
  movq   %rax,%xmm0
  call   <ecvt@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x1c(%rbp),%rdx
  lea    -0x20(%rbp),%rcx
  mov    D103(%rip),%rax
  mov    %rcx,%rsi
  mov    $0x5,%edi
  movq   %rax,%xmm0
  call   <ecvt@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x1c(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x2,%edi
  mov    D98(%rip),%rax
  movq   %rax,%xmm0
  call   <ecvt@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L6
  call   <__stack_chk_fail@plt>
L6:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D135
type_guessed: f64
name: disassemble_data
arguments: tag: D148
type_guessed: string
name: disassemble_data
arguments: tag: D75
type_guessed: f64
name: disassemble_data
arguments: tag: D46
type_guessed: byte[8]
name: disassemble_data
arguments: tag: D103
type_guessed: f64
name: disassemble_data
arguments: tag: D98
type_guessed: f64

tool: D135: 12.2223

tool: D148: %d


tool: D75: 110.01

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

tool: D103: 0.01

tool: D98: 0

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