user: 请将以下的汇编代码转换成C语言代码:

```asm
<ft_putnbr_fd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    D7(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jns    L1
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  mov    $0x2d,%edi
  call   <ft_putchar_fd@plt>
  mov    D7(%rip),%rdx
  mov    (%rdx),%edx
  cmp    %edx,%eax
  jne    L77
  mov    -0x8(%rbp),%eax
  jmp    L41
L77:
  mov    D60(%rip),%rax
  mov    (%rax),%eax
L41:
  mov    %eax,-0x8(%rbp)
  cmpl   $0xfffffff7,-0x14(%rbp)
  jge    L104
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x4(%rbp)
  negl   -0x4(%rbp)
  mov    -0x18(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <ft_putnbr_fd>
  mov    D7(%rip),%rdx
  mov    (%rdx),%edx
  cmp    %edx,%eax
  jne    L38
  mov    -0x8(%rbp),%eax
  jmp    L10
L38:
  mov    D60(%rip),%rax
  mov    (%rax),%eax
L10:
  mov    %eax,-0x8(%rbp)
L104:
  mov    -0x14(%rbp),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  add    %eax,%eax
  sub    %eax,%edx
  mov    %edx,-0x14(%rbp)
  mov    $0x30,%eax
  sub    -0x14(%rbp),%eax
  mov    -0x18(%rbp),%edx
  mov    %edx,%esi
  mov    %eax,%edi
  call   <ft_putchar_fd@plt>
  mov    D7(%rip),%rdx
  mov    (%rdx),%edx
  cmp    %edx,%eax
  jne    L109
  mov    -0x8(%rbp),%eax
  jmp    L71
L109:
  mov    D60(%rip),%rax
  mov    (%rax),%eax
L71:
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  jmp    L86
L1:
  cmpl   $0x9,-0x14(%rbp)
  jle    L63
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  sub    %eax,%edx
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  mov    %edx,%edi
  call   <ft_putnbr_fd>
  mov    D7(%rip),%rdx
  mov    (%rdx),%edx
  cmp    %edx,%eax
  jne    L22
  mov    -0x8(%rbp),%eax
  jmp    L113
L22:
  mov    D60(%rip),%rax
  mov    (%rax),%eax
L113:
  mov    %eax,-0x8(%rbp)
L63:
  mov    -0x14(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  add    $0x30,%edx
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  mov    %edx,%edi
  call   <ft_putchar_fd@plt>
  mov    D7(%rip),%rdx
  mov    (%rdx),%edx
  cmp    %edx,%eax
  jne    L28
  mov    -0x8(%rbp),%eax
  jmp    L132
L28:
  mov    D60(%rip),%rax
  mov    (%rax),%eax
L132:
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
L86:
  leave
  ret
```

assistant: ```c
int ft_putnbr_fd(int n, int fd) {
  int m;
  int ret;
  ret = EXIT_SUCCESS;
  if (n < 0) {
    ret = ft_putchar_fd('-', fd) == EXIT_SUCCESS ? ret : EXIT_FAILURE;
    if (n < -9) {
      m = n / 10;
      m = -m;
      ret = ft_putnbr_fd(m, fd) == EXIT_SUCCESS ? ret : EXIT_FAILURE;
    }
    n = n % 10;
    ret = ft_putchar_fd(-n + '0', fd) == EXIT_SUCCESS ? ret : EXIT_FAILURE;
    return (ret);
  }
  if (n > 9)
    ret = ft_putnbr_fd(n / 10, fd) == EXIT_SUCCESS ? ret : EXIT_FAILURE;
  ret = ft_putchar_fd(n % 10 + '0', fd) == EXIT_SUCCESS ? ret : EXIT_FAILURE;
  return (ret);
}
```