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

```asm
<ft_putnbr_fd>:
  endbr64
  push   %r15
  mov    %edi,%eax
  mov    %esi,%r15d
  push   %r14
  push   %r13
  mov    $0xcccccccd,%r13d
  push   %r12
  push   %rbp
  mov    %eax,%ebp
  push   %rbx
  sub    $0x38,%rsp
  test   %eax,%eax
  js     L44
L10:
  cmp    $0x9,%ebp
  jbe    L119
L87:
  mov    %ebp,%r12d
  mov    %r12,%rax
  imul   %r13,%rax
  shr    $0x23,%rax
  mov    %rax,0x10(%rsp)
  cmp    $0x63,%ebp
  jbe    L35
  imul   $0x51eb851f,%r12,%rax
  shr    $0x25,%rax
  mov    %rax,0x18(%rsp)
  cmp    $0x3e7,%ebp
  jbe    L4
  imul   $0x10624dd3,%r12,%rax
  shr    $0x26,%rax
  mov    %rax,0x20(%rsp)
  cmp    $0x270f,%ebp
  jbe    L83
  mov    $0xd1b71759,%r14d
  imul   %r12,%r14
  shr    $0x2d,%r14
  cmp    $0x1869f,%ebp
  jbe    L112
  mov    %ebp,%ebx
  shr    $0x5,%ebx
  imul   $0xa7c5ac5,%rbx,%rbx
  shr    $0x27,%rbx
  cmp    $0xf423f,%ebp
  jbe    L77
  imul   $0x431bde83,%r12,%rax
  shr    $0x32,%rax
  mov    %rax,0x8(%rsp)
  cmp    $0x98967f,%ebp
  jbe    L5
  imul   $0x6b5fca6b,%r12,%rdx
  shr    $0x36,%rdx
  cmp    $0x5f5e0ff,%ebp
  jbe    L96
  imul   $0x55e63b89,%r12,%rax
  shr    $0x39,%rax
  cmp    $0x3b9ac9ff,%ebp
  jbe    L113
  mov    %ebp,%edi
  mov    %r15d,%esi
  mov    %edx,0x2c(%rsp)
  shr    $0x9,%edi
  mov    %eax,0x28(%rsp)
  imul   $0x44b83,%rdi,%rdi
  shr    $0x27,%rdi
  call   <ft_putnbr_fd>
  mov    0x28(%rsp),%ecx
  mov    0x2c(%rsp),%edx
  mov    %rcx,%rax
  imul   %r13,%rcx
  shr    $0x23,%rcx
  lea    (%rcx,%rcx,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%eax
L113:
  lea    0x30(%rax),%edi
  mov    %r15d,%esi
  mov    %edx,0x28(%rsp)
  call   <ft_putchar_fd@plt>
  mov    0x28(%rsp),%eax
  mov    %rax,%rdx
  imul   %r13,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%edx
L96:
  lea    0x30(%rdx),%edi
  mov    %r15d,%esi
  call   <ft_putchar_fd@plt>
  mov    0x8(%rsp),%eax
  mov    %rax,%rcx
  imul   %r13,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,0x8(%rsp)
L5:
  mov    0x8(%rsp),%edi
  mov    %r15d,%esi
  add    $0x30,%edi
  call   <ft_putchar_fd@plt>
  mov    %ebx,%eax
  imul   %r13,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%ebx
L77:
  lea    0x30(%rbx),%edi
  mov    %r15d,%esi
  call   <ft_putchar_fd@plt>
  mov    %r14d,%eax
  imul   %r13,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%r14d
L112:
  lea    0x30(%r14),%edi
  mov    %r15d,%esi
  call   <ft_putchar_fd@plt>
  mov    0x20(%rsp),%eax
  mov    %rax,%rcx
  imul   %r13,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,0x20(%rsp)
L83:
  mov    0x20(%rsp),%edi
  mov    %r15d,%esi
  add    $0x30,%edi
  call   <ft_putchar_fd@plt>
  mov    0x18(%rsp),%eax
  mov    %rax,%rsi
  imul   %r13,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%esi
  mov    %esi,0x18(%rsp)
L4:
  mov    0x18(%rsp),%edi
  mov    %r15d,%esi
  add    $0x30,%edi
  call   <ft_putchar_fd@plt>
  mov    0x10(%rsp),%eax
  mov    %rax,%rdx
  imul   %r13,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%edx
  mov    %edx,0x10(%rsp)
L35:
  mov    0x10(%rsp),%edi
  mov    %r15d,%esi
  add    $0x30,%edi
  call   <ft_putchar_fd@plt>
  mov    %r12,%rax
  imul   %r13,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%edx
  mov    %ebp,%eax
  add    %edx,%edx
  sub    %edx,%eax
  mov    %eax,%ebp
  test   %eax,%eax
  jns    L10
L44:
  mov    %r15d,%esi
  mov    $0x2d,%edi
  neg    %ebp
  call   <ft_putchar_fd@plt>
  cmp    $0x9,%ebp
  ja     L87
L119:
  add    $0x38,%rsp
  lea    0x30(%rbp),%edi
  mov    %r15d,%esi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <ft_putchar_fd@plt>
```

assistant: ```c
void ft_putnbr_fd(int n, int fd) {
  unsigned int nbr;
  if (n < 0) {
    ft_putchar_fd('-', fd);
    nbr = -n;
  } else
    nbr = n;
  if (nbr >= 10) {
    ft_putnbr_fd(nbr / 10, fd);
    ft_putnbr_fd(nbr % 10, fd);
  } else {
    ft_putchar_fd(nbr + '0', fd);
  }
}
```