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

```asm
<gen_random_global_name>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdi,%r12
  mov    $0x4,%edi
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  movb   $0x0,(%rsi)
  call   <xrandom@plt>
  test   %eax,%eax
  je     L77
  cmp    $0x1,%eax
  je     L158
  xor    %eax,%eax
  call   <random_computer_word@plt>
  mov    %rbp,%rdi
  mov    %rax,%rsi
  call   <strcat@plt>
L149:
  test   %r12,%r12
  je     L202
  lea    D12(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
L202:
  mov    $0x5,%edi
  call   <xrandom@plt>
  cmp    $0x1,%eax
  je     L225
  cmp    $0x2,%eax
  je     L181
  lea    D12(%rip),%rsi
  mov    %rbp,%rdi
  test   %eax,%eax
  je     L144
  call   <strcat@plt>
  xor    %eax,%eax
  call   <random_computer_word@plt>
  mov    %rbp,%rdi
  mov    %rax,%rsi
  call   <strcat@plt>
L117:
  mov    $0x5,%edi
  call   <xrandom@plt>
  test   %eax,%eax
  je     L70
L173:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L17
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L77:
  mov    $0x1a,%edi
  call   <xrandom@plt>
  movb   $0x0,0x1(%rbp)
  add    $0x61,%eax
  mov    %al,0x0(%rbp)
  jmp    L149
  nopl   0x0(%rax)
L158:
  mov    $0x2710,%edi
  call   <xrandom@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  jle    L207
  xor    %r13d,%r13d
  jmp    L50
  nopl   0x0(%rax)
L110:
  mov    %eax,%ebx
L50:
  mov    $0x6,%edi
  call   <xrandom@plt>
  mov    %eax,%r8d
  mov    %r13d,%eax
  test   %r8d,%r8d
  jne    L75
  movslq %r13d,%r13
  add    $0x1,%eax
  movb   $0x5f,0x0(%rbp,%r13,1)
L75:
  movslq %eax,%rdx
  lea    0x1(%rax),%r13d
  mov    %ebx,%eax
  mov    %ebx,%ecx
  imul   $0x4ec4ec4f,%rax,%rax
  shr    $0x23,%rax
  imul   $0x1a,%eax,%esi
  sub    %esi,%ecx
  add    $0x61,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  cmp    $0x19,%ebx
  jg     L110
  movslq %r13d,%r13
  add    %rbp,%r13
L19:
  movb   $0x0,0x0(%r13)
  jmp    L149
  nopw   0x0(%rax,%rax,1)
L70:
  lea    D12(%rip),%rsi
  mov    %rbp,%rdi
  mov    %rsp,%r12
  call   <strcat@plt>
  mov    $0x2710,%edi
  call   <xrandom@plt>
  mov    %r12,%rdi
  lea    D38(%rip),%rsi
  mov    %eax,%edx
  call   <sprintf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L173
  nopl   (%rax)
L144:
  call   <strcat@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    $0x1a,%edi
  mov    %eax,%ebx
  call   <xrandom@plt>
  movslq %ebx,%rdx
  add    $0x61,%eax
  movb   $0x0,0x1(%rbp,%rdx,1)
  mov    %al,0x0(%rbp,%rdx,1)
  jmp    L117
  nopl   (%rax)
L181:
  mov    $0x2710,%edi
  call   <xrandom@plt>
  mov    %rbp,%rdi
  mov    %eax,%ebx
  call   <strlen@plt>
  mov    %eax,%r12d
  test   %ebx,%ebx
  jg     L25
  jmp    L6
  nopl   (%rax)
L115:
  mov    %eax,%ebx
L25:
  mov    $0x6,%edi
  call   <xrandom@plt>
  mov    %r12d,%edx
  test   %eax,%eax
  jne    L122
  movslq %r12d,%r12
  add    $0x1,%edx
  movb   $0x5f,0x0(%rbp,%r12,1)
L122:
  mov    %ebx,%eax
  mov    %ebx,%ecx
  lea    0x1(%rdx),%r12d
  movslq %edx,%rdx
  imul   $0x4ec4ec4f,%rax,%rax
  shr    $0x23,%rax
  imul   $0x1a,%eax,%esi
  sub    %esi,%ecx
  add    $0x61,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  cmp    $0x19,%ebx
  jg     L115
L6:
  movslq %r12d,%r12
  movb   $0x0,0x0(%rbp,%r12,1)
  jmp    L117
  nopl   0x0(%rax)
L225:
  lea    D12(%rip),%rsi
  mov    %rbp,%rdi
  mov    %rsp,%r12
  call   <strcat@plt>
  mov    $0x2710,%edi
  call   <xrandom@plt>
  mov    %r12,%rdi
  lea    D38(%rip),%rsi
  mov    %eax,%edx
  call   <sprintf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L117
  nopl   (%rax)
L207:
  mov    %rbp,%r13
  jmp    L19
L17:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D12
type_guessed: string
name: read_data
arguments: data_tag: D38
type_guessed: string

tool: D12: _

tool: D38: %d

assistant: ```c
void gen_random_global_name(char *root, char *namebuf) {
  char smallbuf[100];
  int n, i, len;
  namebuf[0] = '\0';
  switch (xrandom(4)) {
  case 0:
    namebuf[0] = 'a' + xrandom(26);
    namebuf[1] = '\0';
    break;
  case 1:
    n = xrandom(10000);
    i = 0;
    while (n > 0) {
      if (xrandom(6) == 0)
        namebuf[i++] = '_';
      namebuf[i++] = 'a' + (n % 26);
      n /= 26;
    }
    namebuf[i] = '\0';
    break;
  default:
    strcat(namebuf, random_computer_word());
    break;
  }
  if (root != NULL) {
    strcat(namebuf, "_");
    strcat(namebuf, root);
  }
  switch (xrandom(5)) {
  case 0:
    strcat(namebuf, "_");
    len = strlen(namebuf);
    namebuf[len] = 'a' + xrandom(26);
    namebuf[len + 1] = '\0';
    break;
  case 1:
    strcat(namebuf, "_");
    sprintf(smallbuf, "%d", xrandom(10000));
    strcat(namebuf, smallbuf);
    break;
  case 2:
    n = xrandom(10000);
    len = strlen(namebuf);
    i = len;
    while (n > 0) {
      if (xrandom(6) == 0)
        namebuf[i++] = '_';
      namebuf[i++] = 'a' + (n % 26);
      n /= 26;
    }
    namebuf[i] = '\0';
    break;
  default:
    strcat(namebuf, "_");
    strcat(namebuf, random_computer_word());
    break;
  }
  if (xrandom(5) == 0) {
    strcat(namebuf, "_");
    sprintf(smallbuf, "%d", xrandom(10000));
    strcat(namebuf, smallbuf);
  }
}
```