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

```asm
<gen_random_global_name>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,%r13
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  movb   $0x0,(%rsi)
  mov    $0x4,%edi
  call   <xrandom@plt>
  test   %eax,%eax
  je     L45
  cmp    $0x1,%eax
  je     L61
  mov    $0x0,%eax
  call   <random_computer_word@plt>
  mov    %rax,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  jmp    L30
L45:
  mov    $0x1a,%edi
  call   <xrandom@plt>
  add    $0x61,%eax
  mov    %al,(%rbx)
  movb   $0x0,0x1(%rbx)
L30:
  test   %r13,%r13
  je     L82
  lea    D48(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
L82:
  mov    $0x5,%edi
  call   <xrandom@plt>
  cmp    $0x1,%eax
  je     L27
  cmp    $0x2,%eax
  je     L181
  test   %eax,%eax
  je     L166
  lea    D48(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    $0x0,%eax
  call   <random_computer_word@plt>
  mov    %rax,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  jmp    L85
L61:
  mov    $0x2710,%edi
  call   <xrandom@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  jle    L174
  mov    $0x0,%r12d
  jmp    L152
L161:
  lea    0x1(%rax),%r12d
  movslq %eax,%rdx
  movslq %ebp,%rax
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x23,%rax
  mov    %ebp,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  imul   $0x1a,%eax,%esi
  mov    %ebp,%ecx
  sub    %esi,%ecx
  add    $0x61,%ecx
  mov    %cl,(%rbx,%rdx,1)
  cmp    $0x19,%ebp
  jle    L80
  mov    %eax,%ebp
L152:
  mov    $0x6,%edi
  call   <xrandom@plt>
  mov    %eax,%edx
  mov    %r12d,%eax
  test   %edx,%edx
  jne    L161
  lea    0x1(%r12),%eax
  movslq %r12d,%r12
  movb   $0x5f,(%rbx,%r12,1)
  jmp    L161
L174:
  mov    $0x0,%r12d
L80:
  movslq %r12d,%r12
  movb   $0x0,(%rbx,%r12,1)
  jmp    L30
L166:
  lea    D48(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%ebp
  mov    $0x1a,%edi
  call   <xrandom@plt>
  movslq %ebp,%rdx
  add    $0x61,%eax
  mov    %al,(%rbx,%rdx,1)
  movb   $0x0,0x1(%rbx,%rdx,1)
L85:
  mov    $0x5,%edi
  call   <xrandom@plt>
  test   %eax,%eax
  je     L145
L106:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L27:
  lea    D48(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    $0x2710,%edi
  call   <xrandom@plt>
  mov    %eax,%edx
  mov    %rsp,%rbp
  lea    D62(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  jmp    L85
L181:
  mov    $0x2710,%edi
  call   <xrandom@plt>
  mov    %eax,%ebp
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%r12d
  test   %ebp,%ebp
  jg     L165
L155:
  movslq %r12d,%r12
  movb   $0x0,(%rbx,%r12,1)
  jmp    L85
L146:
  lea    0x1(%rax),%r12d
  movslq %eax,%rdx
  movslq %ebp,%rax
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x23,%rax
  mov    %ebp,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  imul   $0x1a,%eax,%esi
  mov    %ebp,%ecx
  sub    %esi,%ecx
  add    $0x61,%ecx
  mov    %cl,(%rbx,%rdx,1)
  cmp    $0x19,%ebp
  jle    L155
  mov    %eax,%ebp
L165:
  mov    $0x6,%edi
  call   <xrandom@plt>
  mov    %eax,%edx
  mov    %r12d,%eax
  test   %edx,%edx
  jne    L146
  lea    0x1(%r12),%eax
  movslq %r12d,%r12
  movb   $0x5f,(%rbx,%r12,1)
  jmp    L146
L145:
  lea    D48(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    $0x2710,%edi
  call   <xrandom@plt>
  mov    %eax,%edx
  mov    %rsp,%rbp
  lea    D62(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  jmp    L106
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D48
type: string
name: read_data
arguments: tag: D62
type: string

tool: D48: _

tool: D62: %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);
  }
}
```