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

```asm
<ft_putnbr_fd>:
  endbr64
  push   %r13
  mov    %edi,%r13d
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %edi,%edi
  js     L68
  je     L70
  movslq %edi,%rbx
  mov    %edi,%edx
  xor    %r12d,%r12d
  imul   $0x66666667,%rbx,%rax
  sar    $0x1f,%edx
  sar    $0x22,%rax
  sub    %edx,%eax
  lea    (%rax,%rax,4),%edx
  mov    %edi,%eax
  add    %edx,%edx
  sub    %edx,%eax
L183:
  imul   $0x66666667,%rbx,%rbx
  mov    %al,0xe(%rsp)
  mov    %r13d,%eax
  sar    $0x1f,%eax
  sar    $0x22,%rbx
  sub    %eax,%ebx
  je     L137
  movslq %ebx,%rax
  mov    %ebx,%edx
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%edx
  sar    $0x22,%rax
  sub    %edx,%eax
  lea    (%rax,%rax,4),%edx
  add    %edx,%edx
  sub    %edx,%ebx
  mov    %ebx,%edx
  neg    %edx
  cmovs  %ebx,%edx
  mov    %dl,0xf(%rsp)
  test   %eax,%eax
  je     L182
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x22,%rdx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  neg    %ecx
  cmovns %ecx,%eax
  mov    %al,0x10(%rsp)
  test   %edx,%edx
  je     L14
  movslq %edx,%rax
  mov    %edx,%ecx
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%ecx
  sar    $0x22,%rax
  sub    %ecx,%eax
  lea    (%rax,%rax,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%edx
  mov    %edx,%ecx
  neg    %ecx
  cmovns %ecx,%edx
  mov    %dl,0x11(%rsp)
  test   %eax,%eax
  je     L88
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x22,%rdx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  neg    %ecx
  cmovns %ecx,%eax
  mov    %al,0x12(%rsp)
  test   %edx,%edx
  je     L59
  movslq %edx,%rax
  mov    %edx,%ecx
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%ecx
  sar    $0x22,%rax
  sub    %ecx,%eax
  lea    (%rax,%rax,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%edx
  mov    %edx,%ecx
  neg    %ecx
  cmovns %ecx,%edx
  mov    %dl,0x13(%rsp)
  test   %eax,%eax
  je     L163
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x22,%rdx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  neg    %ecx
  cmovns %ecx,%eax
  mov    %al,0x14(%rsp)
  test   %edx,%edx
  je     L192
  movslq %edx,%rax
  mov    %edx,%ecx
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%ecx
  sar    $0x22,%rax
  sub    %ecx,%eax
  lea    (%rax,%rax,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%edx
  mov    %edx,%ecx
  neg    %ecx
  cmovns %ecx,%edx
  mov    %dl,0x15(%rsp)
  test   %eax,%eax
  je     L89
  movslq %eax,%rdx
  mov    %eax,%ecx
  mov    $0x8,%ebx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x22,%rdx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  neg    %ecx
  cmovns %ecx,%eax
  mov    %al,0x16(%rsp)
  test   %edx,%edx
  je     L137
  mov    %edx,%eax
  mov    $0x9,%ebx
  neg    %eax
  cmp    $0xc4653601,%r13d
  cmovge %edx,%eax
  mov    %al,0x17(%rsp)
L137:
  movslq %ebx,%rbx
  lea    0xe(%rsp),%r13
  nopw   0x0(%rax,%rax,1)
L210:
  movzbl 0x0(%r13,%rbx,1),%eax
  mov    %ebp,%esi
  sub    $0x1,%rbx
  lea    0x30(%rax),%edi
  movsbl %dil,%edi
  call   <ft_putchar_fd@plt>
  add    %eax,%r12d
  cmp    $0xffffffff,%ebx
  jne    L210
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L156
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L70:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L156
  add    $0x28,%rsp
  mov    $0x30,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1070 <ft_putchar_fd@plt>
L68:
  mov    $0x2d,%edi
  movslq %r13d,%rbx
  call   <ft_putchar_fd@plt>
  mov    %r13d,%edx
  mov    %eax,%r12d
  imul   $0x66666667,%rbx,%rax
  sar    $0x1f,%edx
  sar    $0x22,%rax
  sub    %edx,%eax
  lea    (%rax,%rax,4),%edx
  mov    %r13d,%eax
  add    %edx,%edx
  mov    %edx,%ecx
  sub    %r13d,%ecx
  sub    %edx,%eax
  cmovne %ecx,%eax
  jmp    L183
L182:
  mov    $0x1,%ebx
  jmp    L137
L14:
  mov    $0x2,%ebx
  jmp    L137
L88:
  mov    $0x3,%ebx
  jmp    L137
L59:
  mov    $0x4,%ebx
  jmp    L137
L163:
  mov    $0x5,%ebx
  jmp    L137
L192:
  mov    $0x6,%ebx
  jmp    L137
L89:
  mov    $0x7,%ebx
  jmp    L137
L156:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int ft_putnbr_fd(int n, int fd) {
  int ret;
  int i;
  int mod;
  char revstr[10];
  ret = 0;
  ret += (n < 0) ? ft_putchar_fd('-', fd) : 0;
  ret += (n == 0) ? ft_putchar_fd('0', fd) : 0;
  i = -1;
  while (++i >= 0 && n) {
    mod = n % 10;
    mod *= (mod < 0) ? -1 : 1;
    revstr[i] = mod;
    n /= 10;
  }
  while (--i != -1)
    ret += ft_putchar_fd(revstr[i] + '0', fd);
  return (ret);
}
```