user: Demonstrate the C code that generates the assembly output below:

```asm
<writeToFileFormat>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xf0,%rsp
  mov    %edi,-0xe4(%rbp)
  mov    %rsi,-0xf0(%rbp)
  mov    %rdx,-0xa0(%rbp)
  mov    %rcx,-0x98(%rbp)
  mov    %r8,-0x90(%rbp)
  mov    %r9,-0x88(%rbp)
  test   %al,%al
  je     L68
  movaps %xmm0,-0x80(%rbp)
  movaps %xmm1,-0x70(%rbp)
  movaps %xmm2,-0x60(%rbp)
  movaps %xmm3,-0x50(%rbp)
  movaps %xmm4,-0x40(%rbp)
  movaps %xmm5,-0x30(%rbp)
  movaps %xmm6,-0x20(%rbp)
  movaps %xmm7,-0x10(%rbp)
L68:
  cmpq   $0x0,-0xf0(%rbp)
  jne    L131
  mov    D60(%rip),%rax
  mov    (%rax),%edx
  mov    D30(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L46
L131:
  mov    -0xf0(%rbp),%rdx
  mov    -0xd8(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <va_start@plt>
  mov    -0xd8(%rbp),%edx
  mov    -0xd4(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <va_copy@plt>
  mov    -0xd4(%rbp),%edx
  mov    -0xf0(%rbp),%rax
  mov    %edx,%ecx
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <vsnprintf@plt>
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0xb8(%rbp)
  cmpq   $0x0,-0xb8(%rbp)
  jne    L127
  mov    -0xd8(%rbp),%eax
  mov    %eax,%edi
  call   <va_end@plt>
  mov    -0xd4(%rbp),%eax
  mov    %eax,%edi
  call   <va_end@plt>
  mov    D96(%rip),%rax
  mov    (%rax),%edx
  mov    D30(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L46
L127:
  mov    -0xd8(%rbp),%edx
  mov    -0xf0(%rbp),%rcx
  mov    -0xb8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <vsprintf@plt>
  mov    -0xd4(%rbp),%eax
  mov    %eax,%edi
  call   <va_end@plt>
  mov    -0xd8(%rbp),%eax
  mov    %eax,%edi
  call   <va_end@plt>
  mov    -0xb8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0xc8(%rbp)
  movl   $0x0,-0xd0(%rbp)
  movq   $0x0,-0xc0(%rbp)
  mov    D30(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0xcc(%rbp)
  mov    D30(%rip),%rax
  movl   $0x0,(%rax)
  jmp    L20
L54:
  cmpl   $0xffffffff,-0xd0(%rbp)
  jne    L136
  mov    D30(%rip),%rax
  mov    (%rax),%edx
  mov    D159(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  je     L92
  mov    D30(%rip),%rax
  mov    (%rax),%edx
  mov    D121(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  je     L92
  mov    D30(%rip),%rax
  mov    (%rax),%edx
  mov    D70(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  je     L92
  mov    D30(%rip),%rax
  mov    (%rax),%edx
  mov    D79(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L36
L92:
  mov    D30(%rip),%rax
  mov    -0xcc(%rbp),%edx
  mov    %edx,(%rax)
  jmp    L20
L36:
  mov    -0xb8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
  jmp    L46
L136:
  mov    -0xd0(%rbp),%eax
  cltq
  add    %rax,-0xc0(%rbp)
  mov    -0xd0(%rbp),%eax
  cltq
  sub    %rax,-0xc8(%rbp)
L20:
  mov    -0xb8(%rbp),%rdx
  mov    -0xc0(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0xc8(%rbp),%rdx
  mov    -0xe4(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  mov    %eax,-0xd0(%rbp)
  cmpl   $0x0,-0xd0(%rbp)
  jne    L54
  mov    -0xb8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    D30(%rip),%rax
  mov    -0xcc(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0xd0(%rbp),%eax
L46:
  leave
  ret
```

assistant: ```c
int writeToFileFormat(const int fd, const char *format, ...) {
  if (!format) {
    errno = EINVAL;
    return -1;
  }
  va_list ap, apn;
  va_start(ap, format);
  va_copy(apn, ap);
  char *buf = (char *)malloc(vsnprintf(NULL, 0, format, apn) + 1);
  if (!buf) {
    va_end(ap);
    va_end(apn);
    errno = ENOMEM;
    return -1;
  }
  vsprintf(buf, format, ap);
  va_end(apn);
  va_end(ap);
  size_t len = strlen(buf);
  ssize_t n = 0;
  size_t t = 0;
  int safe_errno = errno;
  errno = 0;
  while ((n = write(fd, buf + t, len))) {
    if (-1 == n) {
      if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK || errno == EPIPE) {
        errno = safe_errno;
        continue;
      }
      free(buf);
      return -1;
    }
    t += n;
    len -= n;
  }
  free(buf);
  errno = safe_errno;
  return n;
}
```