user: What is the c source code of the assembly code below:

```asm
<vfmsg>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %r8d,%r13d
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  test   %rsi,%rsi
  je     L52
  mov    %rsi,%rdi
  call   <strlen@plt>
  mov    %eax,0x8(%rsp)
  lea    (%rax,%rax,1),%edx
L118:
  xor    %ebx,%ebx
  test   %r12,%r12
  je     L49
  mov    %r12,%rdi
  mov    %edx,0x14(%rsp)
  call   <strlen@plt>
  mov    0x14(%rsp),%edx
  movslq %eax,%rbx
  add    %ebx,%edx
L49:
  test   %r14,%r14
  je     L98
  mov    %r14,%rdi
  mov    %edx,0x18(%rsp)
  call   <strlen@plt>
  mov    0x18(%rsp),%edx
  mov    %eax,0x14(%rsp)
  add    %eax,%eax
L29:
  lea    0x4(%rdx,%rax,1),%edi
  call   <malloc@plt>
  mov    %rax,%r8
  test   %rax,%rax
  je     L149
  mov    0x8(%rsp),%r9d
  mov    %rax,%rdx
  test   %r9d,%r9d
  je     L48
L39:
  movzbl (%r15),%eax
  test   %al,%al
  je     L48
L130:
  mov    %al,(%rdx)
  add    $0x1,%r15
  cmp    $0x25,%al
  je     L71
  movzbl (%r15),%eax
  add    $0x1,%rdx
  test   %al,%al
  jne    L130
L48:
  test   %ebx,%ebx
  jne    L2
L109:
  mov    0x14(%rsp),%edi
  test   %edi,%edi
  je     L8
  mov    $0x203a,%esi
  lea    0x2(%rdx),%rcx
  mov    %si,(%rdx)
  movzbl (%r14),%eax
  mov    %rcx,%rdx
  test   %al,%al
  jne    L132
  jmp    L8
  nopl   0x0(%rax)
L142:
  movzbl (%r14),%eax
  add    $0x1,%rdx
  test   %al,%al
  je     L8
L132:
  mov    %al,(%rdx)
  add    $0x1,%r14
  cmp    $0x25,%al
  jne    L142
  movb   $0x25,0x1(%rdx)
  movzbl (%r14),%eax
  add    $0x2,%rdx
  test   %al,%al
  jne    L132
L8:
  mov    $0xa,%eax
  mov    %rbp,%rdi
  mov    %r8,%rsi
  mov    %r8,0x8(%rsp)
  mov    %ax,(%rdx)
  mov    %r13d,%edx
  call   <vfprintf@plt>
  mov    %rbp,%rdi
  call   <fflush@plt>
  mov    0x8(%rsp),%rdi
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10a0 <free@plt>
  nopl   0x0(%rax)
L71:
  movb   $0x25,0x1(%rdx)
  add    $0x2,%rdx
  jmp    L39
  nopl   (%rax)
L98:
  movl   $0x0,0x14(%rsp)
  xor    %eax,%eax
  jmp    L29
  nop
L52:
  movl   $0x0,0x8(%rsp)
  xor    %edx,%edx
  jmp    L118
  nop
L2:
  mov    %rdx,%rdi
  mov    %r12,%rsi
  mov    %r8,0x18(%rsp)
  mov    %rdx,0x8(%rsp)
  call   <strcpy@plt>
  mov    0x8(%rsp),%rdx
  mov    0x18(%rsp),%r8
  add    %rbx,%rdx
  jmp    L109
  nopw   0x0(%rax,%rax,1)
L149:
  mov    %rbp,%rdi
  mov    %r13d,%edx
  mov    %r12,%rsi
  call   <vfprintf@plt>
  add    $0x28,%rsp
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10e0 <fflush@plt>
```

assistant: ```c
void vfmsg(FILE *f, const char *pre, const char *suf, const char *fmt, va_list ap) {
  int prelen = 0, fmtlen = 0, suflen = 0;
  if (pre)
    prelen = strlen(pre);
  if (fmt)
    fmtlen = strlen(fmt);
  if (suf)
    suflen = strlen(suf);
  char *newfmt = malloc(prelen * 2 + fmtlen + 2 + suflen * 2 + 2);
  if (!newfmt)
    goto finish;
  char *newfmt_end = newfmt;
  if (prelen)
    while (*pre)
      if ((*newfmt_end++ = *pre++) == '%')
        *newfmt_end++ = '%';
  if (fmtlen) {
    strcpy(newfmt_end, fmt);
    newfmt_end += fmtlen;
  }
  if (suflen) {
    *newfmt_end++ = ':';
    *newfmt_end++ = ' ';
    while (*suf)
      if ((*newfmt_end++ = *suf++) == '%')
        *newfmt_end++ = '%';
  }
  *newfmt_end++ = '\n';
  *newfmt_end++ = '\0';
  fmt = newfmt;
finish:
  vfprintf(f, fmt, ap);
  fflush(f);
  if (newfmt)
    free(newfmt);
}
```