user: What would the C source look like for the assembly code provided here?

```asm
<convert_hex_long>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %edx,-0x64(%rbp)
  mov    %ecx,%eax
  mov    %r8,-0x70(%rbp)
  mov    %r9,-0x78(%rbp)
  mov    %al,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  cmpl   $0x0,-0x64(%rbp)
  jg     L40
  movl   $0x1,-0x64(%rbp)
L40:
  cmpq   $0x0,-0x60(%rbp)
  jne    L120
  movl   $0x0,-0x48(%rbp)
  jmp    L11
L81:
  mov    -0x48(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x68(%rbp),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x48(%rbp)
L11:
  mov    -0x64(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x48(%rbp)
  jl     L81
  mov    -0x64(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movb   $0x30,(%rax)
  mov    -0x64(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x78(%rbp),%rax
  mov    -0x64(%rbp),%edx
  mov    %edx,(%rax)
  mov    %rbx,%rsp
  jmp    L86
L120:
  mov    -0x64(%rbp),%eax
  add    $0x16,%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x40(%rbp),%eax
  cltq
  sub    $0x1,%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x40(%rbp),%eax
  cltq
  mov    %rax,%r12
  mov    $0x0,%r13d
  mov    -0x40(%rbp),%eax
  cltq
  mov    %rax,%r10
  mov    $0x0,%r11d
  mov    -0x40(%rbp),%eax
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L36:
  cmp    %rdx,%rsp
  je     L4
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L36
L4:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L122
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L122:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x40(%rbp),%eax
  sub    $0x1,%eax
  mov    -0x30(%rbp),%rdx
  cltq
  movb   $0x0,(%rdx,%rax,1)
  mov    -0x40(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x44(%rbp)
  jmp    L88
L26:
  mov    -0x60(%rbp),%rax
  and    $0xf,%eax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  subl   $0x1,-0x44(%rbp)
  movzbl (%rax),%ecx
  mov    -0x30(%rbp),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  mov    %cl,(%rdx,%rax,1)
  shrq   $0x4,-0x60(%rbp)
L88:
  cmpq   $0x0,-0x60(%rbp)
  jne    L26
  jmp    L75
L74:
  subl   $0x1,-0x44(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  movzbl -0x68(%rbp),%ecx
  mov    %cl,(%rdx,%rax,1)
L75:
  mov    -0x40(%rbp),%eax
  sub    -0x44(%rbp),%eax
  cmp    %eax,-0x64(%rbp)
  jge    L74
  mov    -0x40(%rbp),%eax
  sub    -0x44(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x44(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x3c(%rbp),%edx
  mov    -0x58(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x3c(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x78(%rbp),%rax
  mov    %edx,(%rax)
  mov    %rbx,%rsp
L86:
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L52
  call   <__stack_chk_fail@plt>
L52:
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

assistant: ```c
void convert_hex_long(char *buf, unsigned long long val, int width, char pad, const char *digits, int *count_p) {
  if (width < 1)
    width = 1;
  if (val == 0) {
    for (int i = 0; i < width - 1; i++)
      buf[i] = pad;
    buf[width - 1] = '0';
    buf[width] = '\0';
    *count_p = width;
    return;
  }
  const int tmplen = width + 22;
  char tmp[tmplen];
  tmp[tmplen - 1] = '\0';
  int pos = tmplen - 1;
  while (val > 0) {
    tmp[--pos] = digits[val & 15];
    val >>= 4;
  }
  while (tmplen - pos - 1 < width)
    tmp[--pos] = pad;
  int count = tmplen - pos;
  memcpy(buf, &tmp[pos], count);
  *count_p = count - 1;
}
```