user: Please show me the C implementation that matches the assembly code listed below:

```asm
<zlmb_utils_asprintf>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xe0,%rsp
  mov    %rdi,-0xd8(%rbp)
  mov    %rsi,-0xe0(%rbp)
  mov    %rdx,-0xa0(%rbp)
  mov    %rcx,-0x98(%rbp)
  mov    %r8,-0x90(%rbp)
  mov    %r9,-0x88(%rbp)
  test   %al,%al
  je     L105
  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)
L105:
  movl   $0x80,-0xcc(%rbp)
  movq   $0x0,-0xc0(%rbp)
  movq   $0x0,-0xb8(%rbp)
  mov    -0xcc(%rbp),%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0xc0(%rbp)
  cmpq   $0x0,-0xc0(%rbp)
  jne    L50
  mov    $0xffffffff,%eax
  jmp    L0
L50:
  mov    -0xe0(%rbp),%rdx
  mov    -0xc8(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <va_start@plt>
  mov    -0xc8(%rbp),%edx
  mov    -0xc4(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <va_copy@plt>
  mov    -0xc8(%rbp),%ecx
  mov    -0xe0(%rbp),%rdx
  mov    -0xcc(%rbp),%esi
  mov    -0xc0(%rbp),%rax
  mov    %rax,%rdi
  call   <vsnprintf@plt>
  mov    %eax,-0xd0(%rbp)
  mov    -0xd0(%rbp),%eax
  cmp    -0xcc(%rbp),%eax
  jl     L102
  mov    -0xd0(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0xcc(%rbp)
  mov    -0xcc(%rbp),%edx
  mov    -0xc0(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0xb8(%rbp)
  cmpq   $0x0,-0xb8(%rbp)
  jne    L96
  mov    -0xc0(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0xc8(%rbp),%eax
  mov    %eax,%edi
  call   <va_end@plt>
  mov    -0xc4(%rbp),%eax
  mov    %eax,%edi
  call   <va_end@plt>
  mov    $0xffffffff,%eax
  jmp    L0
L96:
  mov    -0xb8(%rbp),%rax
  mov    %rax,-0xc0(%rbp)
  mov    -0xc4(%rbp),%ecx
  mov    -0xe0(%rbp),%rdx
  mov    -0xcc(%rbp),%esi
  mov    -0xc0(%rbp),%rax
  mov    %rax,%rdi
  call   <vsnprintf@plt>
  mov    %eax,-0xd0(%rbp)
  cmpl   $0x0,-0xd0(%rbp)
  js     L81
  mov    -0xd8(%rbp),%rax
  mov    -0xc0(%rbp),%rdx
  mov    %rdx,(%rax)
  jmp    L74
L81:
  mov    -0xc0(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  jmp    L74
L102:
  cmpl   $0x0,-0xd0(%rbp)
  js     L32
  mov    -0xd8(%rbp),%rax
  mov    -0xc0(%rbp),%rdx
  mov    %rdx,(%rax)
  jmp    L74
L32:
  mov    -0xc0(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L74:
  mov    -0xc8(%rbp),%eax
  mov    %eax,%edi
  call   <va_end@plt>
  mov    -0xc4(%rbp),%eax
  mov    %eax,%edi
  call   <va_end@plt>
  mov    -0xd0(%rbp),%eax
L0:
  leave
  ret
```

assistant: ```c
int zlmb_utils_asprintf(char **str, const char *format, ...) {
  int ret, size = 128;
  char *string = NULL;
  va_list arg, ap;
  void *tmp = NULL;
  string = (char *)malloc(size);
  if (!string) {
    return -1;
  }
  va_start(arg, format);
  va_copy(ap, arg);
  ret = vsnprintf(string, size, format, arg);
  if (ret >= size) {
    size = ret + 1;
    tmp = realloc(string, size);
    if (!tmp) {
      free(string);
      va_end(arg);
      va_end(ap);
      return -1;
    }
    string = (char *)tmp;
    ret = vsnprintf(string, size, format, ap);
    if (ret >= 0) {
      *str = string;
    } else {
      free(string);
    }
  } else if (ret >= 0) {
    *str = string;
  } else {
    free(string);
  }
  va_end(arg);
  va_end(ap);
  return ret;
}
```