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

```asm
<cgi_parse_string>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  test   %rdi,%rdi
  je     L4
  mov    %rdi,%r14
  mov    $0x1,%ebx
  jmp    L50
  nopl   (%rax)
L129:
  add    $0x1,%ebx
  lea    0x1(%rax),%rdi
L50:
  mov    $0x26,%esi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L129
  lea    0x1(%rbx,%rbx,1),%edi
  mov    $0x8,%esi
  xor    %r12d,%r12d
  movabs $0xdfffffbffffffffe,%rbp
  call   <calloc@plt>
  mov    %rax,0x8(%rsp)
  xchg   %ax,%ax
L5:
  movzbl (%r14),%eax
  cmp    $0x26,%al
  jne    L171
  movzbl 0x1(%r14),%eax
  add    $0x1,%r14
L171:
  mov    %r14,%rbx
  cmp    $0x3d,%al
  ja     L0
  bt     %rax,%rbp
  jae    L21
L0:
  mov    $0x1,%edx
  sub    %r14d,%edx
  nopw   0x0(%rax,%rax,1)
L68:
  lea    (%rdx,%rbx,1),%esi
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  cmp    $0x3d,%al
  ja     L68
  bt     %rax,%rbp
  jb     L68
  movslq %esi,%rax
  mov    %rax,(%rsp)
L67:
  mov    0x8(%rsp),%rax
  movslq %r12d,%rdx
  mov    %r14,%rdi
  lea    0x0(,%rdx,8),%r13
  lea    (%rax,%r13,1),%r15
  call   <hex_to_asc@plt>
  mov    %rax,(%r15)
  cmpb   $0x26,(%rbx)
  lea    0x1(%r12),%eax
  je     L16
  mov    (%rsp),%rax
  mov    0x8(%rsp),%rdi
  lea    0x1(%r14,%rax,1),%r14
  lea    0x8(%rdi,%r13,1),%rbx
  movzbl (%r14),%eax
  test   %al,%al
  je     L169
  cmp    $0x26,%al
  je     L169
  mov    $0x1,%ecx
  mov    %r14,%rax
  sub    %r14d,%ecx
  nopl   0x0(%rax,%rax,1)
L125:
  lea    (%rcx,%rax,1),%esi
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  cmp    $0x26,%dl
  je     L20
  test   %dl,%dl
  jne    L125
L20:
  mov    %r14,%rdi
  add    $0x1,%r14
  call   <hex_to_asc@plt>
L146:
  mov    %rax,(%rbx)
  add    $0x2,%r12d
L78:
  mov    %r14,%rdi
  mov    $0x26,%esi
  call   <strchr@plt>
  mov    %rax,%r14
  test   %rax,%rax
  jne    L5
L130:
  mov    0x8(%rsp),%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L16:
  add    (%rsp),%r14
  mov    %eax,%r12d
  jmp    L78
  nopl   0x0(%rax)
L21:
  movq   $0x0,(%rsp)
  xor    %esi,%esi
  jmp    L67
L169:
  xor    %esi,%esi
  mov    %r14,%rdi
  call   <hex_to_asc@plt>
  jmp    L146
L4:
  movq   $0x0,0x8(%rsp)
  jmp    L130
```

assistant: ```c
char **cgi_parse_string(const char *str) {
  char **kv = NULL;
  const char *p, *end;
  int num = 1, i;
  int len;
  if (!str)
    return (NULL);
  p = str;
  while ((p = strchr(p, '&')) != NULL) {
    num++;
    p++;
  }
  kv = (char **)calloc((num * 2 + 1), sizeof(char **));
  p = str;
  i = 0;
  do {
    len = 0;
    if (*p == '&') {
      p++;
    }
    end = p;
    while ((*end != '=') && (*end != '\0') && (*end != '&')) {
      len++;
      end++;
    }
    kv[i] = hex_to_asc(p, len);
    if (*end == '&') {
      p += len;
      i++;
      continue;
    }
    p += len + 1;
    end = p;
    i++;
    len = 0;
    while ((*end != '&') && (*end != '\0')) {
      len++;
      end++;
    }
    kv[i] = hex_to_asc(p, len);
    if (len > 0)
      p++;
    i++;
  } while ((p = strchr(p, '&')) != NULL);
  return (kv);
}
```