user: Translate the below assembly code into C programming language:

```asm
<f_preformat>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  movsd  %xmm0,0x8(%rsp)
  mov    %rdi,%rbx
  mov    %esi,%r13d
  mov    0xc(%rdi),%r12d
  test   %r12d,%r12d
  jne    L229
L473:
  mov    $0x0,%ebp
L120:
  add    %r12d,%ebp
  mov    0x10(%rbx),%r12d
  test   %r12d,%r12d
  jne    L94
  mov    0x4(%rbx),%edx
  test   %edx,%edx
  setg   %al
  movzbl %al,%eax
  add    %r13d,%eax
  add    %edx,%eax
  cmp    (%rbx),%eax
  jge    L94
  movsd  0x8(%rsp),%xmm1
  ucomisd %xmm1,%xmm1
  jp     L246
L450:
  mov    %r12d,%r14d
  cmpl   $0x0,0x14(%rbx)
  jne    L169
  cmpl   $0x1,0x18(%rbx)
  sbb    %r14d,%r14d
L169:
  mov    0x8(%rbx),%eax
  test   %eax,%eax
  je     L282
  mov    %r12d,%eax
  cmpl   $0x0,0x4(%rbx)
  je     L340
L282:
  lea    0x1(%rax,%r14,1),%r12d
  mov    0x4(%rbx),%edx
  mov    (%rbx),%eax
  sub    %r13d,%eax
  test   %edx,%edx
  setg   %cl
  movzbl %cl,%ecx
  sub    %ecx,%eax
  sub    %edx,%eax
  cmp    %eax,%r12d
  jl     L425
L94:
  movsd  0x8(%rsp),%xmm0
  call   <is_neg@plt>
  movsd  0x8(%rsp),%xmm0
  ucomisd %xmm0,%xmm0
  setnp  %r13b
  test   %rax,%rax
  je     L478
  test   %r13b,%r13b
  jne    L353
L478:
  mov    $0x0,%eax
L49:
  add    %eax,%ebp
  movsd  0x8(%rsp),%xmm0
  call   <is_neg@plt>
  test   %rax,%rax
  jne    L54
  test   %r13b,%r13b
  jne    L172
L54:
  mov    $0x0,%eax
L294:
  lea    (%rax,%rbp,1),%r12d
  movsd  0x8(%rsp),%xmm0
  call   <is_neg@plt>
  test   %rax,%rax
  jne    L207
  test   %r13b,%r13b
  jne    L93
L207:
  mov    $0x0,%ebp
L0:
  lea    0x0(%rbp,%r12,1),%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L229:
  call   <is_neg@plt>
  mov    $0x0,%r12d
  test   %rax,%rax
  jne    L499
L464:
  cmpl   $0x0,0xc(%rbx)
  je     L473
  cmpl   $0x0,0x14(%rbx)
  jne    L434
  mov    0x18(%rbx),%ebp
  test   %ebp,%ebp
  je     L120
L277:
  movsd  0x8(%rsp),%xmm0
  call   <is_neg@plt>
  mov    $0x0,%ebp
  test   %rax,%rax
  jne    L120
  movsd  0x8(%rsp),%xmm0
  call   <is_in@plt>
  test   %rax,%rax
  jne    L120
  mov    $0x20,%edi
  call   <ft_putchar@plt>
  mov    %eax,%ebp
  jmp    L120
L499:
  movsd  0x8(%rsp),%xmm0
  call   <is_in@plt>
  test   %rax,%rax
  jne    L464
  mov    $0x2d,%edi
  call   <ft_putchar@plt>
  mov    %eax,%r12d
  jmp    L464
L434:
  movsd  0x8(%rsp),%xmm0
  call   <is_neg@plt>
  mov    $0x0,%ecx
  test   %rax,%rax
  je     L231
L162:
  add    %ecx,%r12d
  mov    0xc(%rbx),%ebp
  test   %ebp,%ebp
  je     L120
  mov    0x18(%rbx),%ebp
  test   %ebp,%ebp
  je     L120
  cmpl   $0x0,0x14(%rbx)
  je     L277
  mov    $0x0,%ebp
  jmp    L120
L231:
  movsd  0x8(%rsp),%xmm0
  call   <is_in@plt>
  mov    $0x0,%ecx
  test   %rax,%rax
  jne    L162
  mov    $0x2b,%edi
  call   <ft_putchar@plt>
  mov    %eax,%ecx
  jmp    L162
L246:
  movapd %xmm1,%xmm0
  call   <is_neg@plt>
  mov    %r12d,%r14d
  test   %rax,%rax
  jne    L169
  jmp    L450
L340:
  movsd  0x8(%rsp),%xmm0
  call   <is_in@plt>
  test   %rax,%rax
  sete   %al
  movzbl %al,%eax
  jmp    L282
L104:
  mov    $0x20,%edi
  call   <ft_putchar@plt>
L64:
  add    %eax,%ebp
  add    $0x1,%r12d
  mov    0x4(%rbx),%edx
  mov    (%rbx),%eax
  sub    %r13d,%eax
  test   %edx,%edx
  setg   %cl
  movzbl %cl,%ecx
  sub    %ecx,%eax
  sub    %edx,%eax
  cmp    %r12d,%eax
  jle    L94
L425:
  movsd  0x8(%rsp),%xmm0
  call   <is_in@plt>
  test   %rax,%rax
  jne    L104
  cmpl   $0x0,0xc(%rbx)
  je     L104
  mov    $0x30,%edi
  call   <ft_putchar@plt>
  jmp    L64
L353:
  cmpl   $0x0,0xc(%rbx)
  je     L227
  call   <is_in@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L49
L227:
  mov    $0x2d,%edi
  call   <ft_putchar@plt>
  jmp    L49
L172:
  mov    0x14(%rbx),%eax
  test   %eax,%eax
  je     L294
  cmpl   $0x0,0xc(%rbx)
  je     L488
  movsd  0x8(%rsp),%xmm0
  call   <is_in@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L294
L488:
  mov    $0x2b,%edi
  call   <ft_putchar@plt>
  jmp    L294
L93:
  mov    0x18(%rbx),%ebp
  test   %ebp,%ebp
  je     L0
  mov    0x14(%rbx),%ebp
  test   %ebp,%ebp
  jne    L453
  cmpl   $0x0,0xc(%rbx)
  je     L46
  movsd  0x8(%rsp),%xmm0
  call   <is_in@plt>
  test   %rax,%rax
  je     L0
L46:
  mov    $0x20,%edi
  call   <ft_putchar@plt>
  mov    %eax,%ebp
  jmp    L0
L453:
  mov    $0x0,%ebp
  jmp    L0
```

assistant: ```c
int f_preformat(double n, int fl[8], int len) {
  int index;
  int ret;
  ret = 0;
  ret += (fl[3] && is_neg(n) && !is_in(n)) ? ft_putchar('-') : 0;
  ret += (fl[3] && fl[5] && !is_neg(n) && !is_in(n)) ? ft_putchar('+') : 0;
  ret += (fl[3] && fl[6] && !fl[5] && !is_neg(n) && !is_in(n)) ? ft_putchar(' ') : 0;
  if (!fl[4] && len + (fl[1] > 0) + fl[1] < fl[0]) {
    index = ((n != n && is_neg(n)) || fl[5] || fl[6]) ? 0 : -1;
    index += (fl[2] && !fl[1] && !is_in(n)) ? 1 : 0;
    while (++index < fl[0] - len - (fl[1] > 0) - fl[1])
      ret += (!is_in(n) && fl[3]) ? ft_putchar('0') : ft_putchar(' ');
  }
  ret += (is_neg(n) && n == n && (!fl[3] || is_in(n))) ? ft_putchar('-') : 0;
  ret += (!is_neg(n) && n == n && fl[5] && (!fl[3] || is_in(n))) ? ft_putchar('+') : 0;
  ret += (!is_neg(n) && n == n && fl[6] && !fl[5] && (!fl[3] || is_in(n))) ? ft_putchar(' ') : 0;
  return (ret);
}
```