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

```asm
<mm_vprintf_box>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  mov    %esi,%r15d
  mov    %r8,%rsi
  push   %r14
  mov    %rdi,%r14
  mov    %rcx,%rdi
  push   %r13
  push   %r12
  push   %rbx
  mov    %edx,%ebx
  mov    %r9,%rdx
  mov    %ebx,%r8d
  sub    $0x48,%rsp
  mov    0x28(%rbp),%rax
  mov    0x10(%rbp),%rcx
  mov    0x18(%rbp),%r12
  mov    0x20(%rbp),%r13
  mov    %rax,-0x48(%rbp)
  mov    0x30(%rbp),%rax
  mov    %rax,-0x50(%rbp)
  mov    0x38(%rbp),%rax
  mov    %rax,-0x58(%rbp)
  mov    0x40(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,-0x70(%rbp)
  call   <mm_print_break@plt>
  xor    %r9d,%r9d
  mov    %r15d,%esi
  mov    %r9d,%edi
  mov    %r9d,-0x64(%rbp)
  call   <va_copy@plt>
  mov    -0x64(%rbp),%esi
  mov    %r14,%rdi
  call   <mm_vstrlenf@plt>
  test   %eax,%eax
  js     L79
  add    $0x1,%eax
  mov    %rsp,%rcx
  cltq
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L39
L16:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L16
L39:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L59
L9:
  xor    %r9d,%r9d
  mov    %rsp,%rdi
  mov    %r14,%rsi
  mov    %rsp,%r15
  mov    %r9d,%edx
  mov    %r9d,-0x64(%rbp)
  call   <vsprintf@plt>
  mov    -0x64(%rbp),%edi
  call   <va_end@plt>
  jmp    L10
  nopl   0x0(%rax)
L8:
  movb   $0x0,(%rax)
  mov    %r15,%rdi
  mov    %ebx,%ecx
  mov    %r13,%rdx
  mov    %r12,%rsi
  lea    0x1(%r14),%r15
  call   <mm_print_centered@plt>
L10:
  mov    $0xa,%esi
  mov    %r15,%rdi
  call   <strchr@plt>
  mov    %rax,%r14
  test   %rax,%rax
  jne    L8
  mov    %ebx,%ecx
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    %r15,%rdi
  call   <mm_print_centered@plt>
  mov    -0x60(%rbp),%rcx
  mov    -0x58(%rbp),%rdx
  mov    %ebx,%r8d
  mov    -0x50(%rbp),%rsi
  mov    -0x48(%rbp),%rdi
  call   <mm_print_break@plt>
  mov    -0x70(%rbp),%rsp
L83:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L44
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  cs nopw 0x0(%rax,%rax,1)
L79:
  xor    %edi,%edi
  call   <va_end@plt>
  mov    -0x60(%rbp),%rcx
  mov    -0x58(%rbp),%rdx
  mov    %ebx,%r8d
  mov    -0x50(%rbp),%rsi
  mov    -0x48(%rbp),%rdi
  call   <mm_print_break@plt>
  jmp    L83
  nopl   0x0(%rax)
L59:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L9
L44:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void mm_vprintf_box(const char *format, va_list ap, unsigned int pad, const char *tl, const char *tv, const char *tm, const char *tr, const char *ml, const char *mr, const char *bl, const char *bv, const char *bm, const char *br) {
  int len;
  va_list aq;
  mm_print_break(tl, tv, tm, tr, pad);
  va_copy(aq, ap);
  len = mm_vstrlenf(format, aq);
  if (len < 0) {
    va_end(aq);
    mm_print_break(bl, bv, bm, br, pad);
    return;
  }
  char str[len + 1];
  vsprintf(str, format, aq);
  va_end(aq);
  for (char *line = str, *lb = NULL;; line = lb + 1) {
    lb = strchr(line, '\n');
    if (lb != NULL)
      *lb = '\0';
    mm_print_centered(line, ml, mr, pad);
    if (lb == NULL)
      break;
  }
  mm_print_break(bl, bv, bm, br, pad);
}
```