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

```asm
<ft_putnbr>:
  endbr64
  push   %r12
  mov    %edi,%eax
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %edi,0xc(%rsp)
  mov    %fs:0x28,%rdx
  mov    %rdx,0x18(%rsp)
  xor    %edx,%edx
  test   %edi,%edi
  js     L142
L183:
  cmp    $0x9,%eax
  jg     L91
  add    $0x30,%eax
  lea    0xc(%rsp),%rsi
  mov    $0x1,%edx
  xor    %r12d,%r12d
  mov    %eax,0xc(%rsp)
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <write@plt>
L199:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L171
  add    $0x20,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nop
L91:
  movslq %eax,%rcx
  mov    %eax,%esi
  imul   $0x66666667,%rcx,%rdx
  sar    $0x1f,%esi
  sar    $0x22,%rdx
  sub    %esi,%edx
  mov    %edx,0x10(%rsp)
  cmp    $0x63,%eax
  jg     L29
  add    $0x30,%edx
  lea    0x10(%rsp),%rsi
  mov    $0x1,%edi
  xor    %eax,%eax
  mov    %edx,0x10(%rsp)
  mov    $0x1,%edx
  xor    %r12d,%r12d
  call   <write@plt>
L61:
  movslq 0xc(%rsp),%rax
  mov    %rax,%rcx
  imul   $0x66666667,%rax,%rax
  mov    %ecx,%edx
  sar    $0x1f,%edx
  sar    $0x22,%rax
  sub    %edx,%eax
  lea    (%rax,%rax,4),%edx
  mov    %ecx,%eax
  add    %edx,%edx
  sub    %edx,%eax
  mov    %eax,0x10(%rsp)
  js     L32
L193:
  add    $0x30,%eax
  lea    0x10(%rsp),%rsi
  mov    $0x1,%edx
  mov    $0x1,%edi
  mov    %eax,0x10(%rsp)
  xor    %eax,%eax
  call   <write@plt>
  jmp    L199
  nopl   0x0(%rax)
L142:
  mov    $0x1,%edx
  lea    D7(%rip),%rsi
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <write@plt>
  mov    0xc(%rsp),%eax
  neg    %eax
  mov    %eax,0xc(%rsp)
  jmp    L183
  nop
L29:
  imul   $0x51eb851f,%rcx,%rdx
  sar    $0x25,%rdx
  sub    %esi,%edx
  mov    %edx,0x14(%rsp)
  cmp    $0x3e7,%eax
  jg     L188
  add    $0x30,%edx
  lea    0x14(%rsp),%rsi
  mov    $0x1,%edi
  xor    %eax,%eax
  mov    %edx,0x14(%rsp)
  mov    $0x1,%edx
  xor    %r12d,%r12d
  call   <write@plt>
L146:
  movslq 0x10(%rsp),%rax
  mov    %rax,%rcx
  imul   $0x66666667,%rax,%rax
  mov    %ecx,%edx
  sar    $0x1f,%edx
  sar    $0x22,%rax
  sub    %edx,%eax
  lea    (%rax,%rax,4),%edx
  mov    %ecx,%eax
  add    %edx,%edx
  sub    %edx,%eax
  mov    %eax,0x14(%rsp)
  js     L39
L3:
  add    $0x30,%eax
  lea    0x14(%rsp),%rsi
  mov    $0x1,%edx
  mov    $0x1,%edi
  mov    %eax,0x14(%rsp)
  xor    %eax,%eax
  call   <write@plt>
  jmp    L61
  nopl   0x0(%rax,%rax,1)
L32:
  lea    D7(%rip),%rbp
  mov    $0x1,%edx
  mov    $0x1,%edi
  xor    %eax,%eax
  mov    %rbp,%rsi
  call   <write@plt>
  mov    0x10(%rsp),%esi
  mov    %esi,%eax
  neg    %eax
  mov    %eax,0x10(%rsp)
  cmp    $0xfffffff7,%esi
  jge    L193
  movslq %eax,%rcx
  sar    $0x1f,%eax
  imul   $0x66666667,%rcx,%rdx
  sar    $0x22,%rdx
  sub    %eax,%edx
  mov    %edx,0x14(%rsp)
  cmp    $0xffffff9d,%esi
  jl     L57
  add    $0x30,%edx
  lea    0x14(%rsp),%rsi
  mov    $0x1,%edi
  xor    %eax,%eax
  mov    %edx,0x14(%rsp)
  mov    $0x1,%edx
  xor    %ebx,%ebx
  call   <write@plt>
L12:
  movslq 0x10(%rsp),%rax
  mov    %rax,%rcx
  imul   $0x66666667,%rax,%rax
  mov    %ecx,%edx
  sar    $0x1f,%edx
  sar    $0x22,%rax
  sub    %edx,%eax
  lea    (%rax,%rax,4),%edx
  mov    %ecx,%eax
  add    %edx,%edx
  sub    %edx,%eax
  mov    %eax,0x14(%rsp)
  js     L13
L37:
  add    $0x30,%eax
  lea    0x14(%rsp),%rsi
  mov    $0x1,%edx
  mov    $0x1,%edi
  mov    %eax,0x14(%rsp)
  xor    %eax,%eax
  call   <write@plt>
L117:
  sub    %ebx,%r12d
  jmp    L199
  nopl   (%rax)
L188:
  imul   $0x10624dd3,%rcx,%rdi
  sar    $0x26,%rdi
  sub    %esi,%edi
  call   <ft_putnbr>
  mov    %eax,%r12d
  movslq 0x14(%rsp),%rax
  mov    %rax,%rdi
  imul   $0x66666667,%rax,%rax
  mov    %edi,%edx
  sar    $0x1f,%edx
  sar    $0x22,%rax
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%edi
  call   <ft_putnbr>
  sub    %eax,%r12d
  jmp    L146
  nopl   0x0(%rax,%rax,1)
L13:
  mov    $0x1,%edx
  mov    %rbp,%rsi
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <write@plt>
  mov    0x14(%rsp),%edx
  mov    %edx,%eax
  neg    %eax
  mov    %eax,0x14(%rsp)
  cmp    $0xfffffff7,%edx
  jge    L37
  movslq %eax,%rdi
  sar    $0x1f,%eax
  imul   $0x66666667,%rdi,%rdi
  sar    $0x22,%rdi
  sub    %eax,%edi
  call   <ft_putnbr>
  mov    %eax,%ebp
  movslq 0x14(%rsp),%rax
  mov    %rax,%rdi
  imul   $0x66666667,%rax,%rax
  mov    %edi,%edx
  sar    $0x1f,%edx
  sar    $0x22,%rax
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%edi
  call   <ft_putnbr>
  sub    %eax,%ebp
  sub    %ebp,%ebx
  jmp    L117
  nopw   0x0(%rax,%rax,1)
L57:
  imul   $0x51eb851f,%rcx,%rdi
  sar    $0x25,%rdi
  sub    %eax,%edi
  call   <ft_putnbr>
  mov    %eax,%ebx
  movslq 0x14(%rsp),%rax
  mov    %rax,%rdi
  imul   $0x66666667,%rax,%rax
  mov    %edi,%edx
  sar    $0x1f,%edx
  sar    $0x22,%rax
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%edi
  call   <ft_putnbr>
  sub    %eax,%ebx
  jmp    L12
  nopl   0x0(%rax)
L39:
  mov    $0x1,%edx
  lea    D7(%rip),%rsi
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <write@plt>
  mov    0x14(%rsp),%edx
  mov    %edx,%eax
  neg    %eax
  mov    %eax,0x14(%rsp)
  cmp    $0xfffffff7,%edx
  jge    L3
  movslq %eax,%rdi
  sar    $0x1f,%eax
  imul   $0x66666667,%rdi,%rdi
  sar    $0x22,%rdi
  sub    %eax,%edi
  call   <ft_putnbr>
  mov    %eax,%ebx
  movslq 0x14(%rsp),%rax
  mov    %rax,%rdi
  imul   $0x66666667,%rax,%rax
  mov    %edi,%edx
  sar    $0x1f,%edx
  sar    $0x22,%rax
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%edi
  call   <ft_putnbr>
  sub    %eax,%ebx
  sub    %ebx,%r12d
  jmp    L61
L171:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D7
type_infered: string

tool: D7: -

assistant: ```c
int ft_putnbr(int nbr) {
  if (nbr < 0) {
    write(1, "-", 1);
    nbr = nbr * -1;
  }
  if (nbr >= 10) {
    return nbr = ft_putnbr(nbr / 10) - ft_putnbr(nbr % 10);
  }
  nbr += 48;
  write(1, &nbr, 1);
  return (0);
}
```