user: What is the c source code of the assembly code below?

```asm
<oauth2_generate_state>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movb   $0x0,(%rsp)
  mov    $0x4,%r12d
  lea    D6(%rip),%r13
L16:
  mov    $0x0,%eax
  call   <random@plt>
  mov    %eax,%ebx
  mov    %rsp,%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%ecx
  mov    %ebx,%eax
  sar    $0x1f,%eax
  shr    $0x18,%eax
  lea    (%rbx,%rax,1),%edx
  movzbl %dl,%edx
  sub    %eax,%edx
  movslq %ecx,%rax
  lea    0x0(%rbp,%rax,1),%rdi
  mov    %r13,%rsi
  call   <sprintf@plt>
  sub    $0x1,%r12d
  jne    L16
  mov    %rsp,%rbx
  mov    %rbp,%rdi
  call   <strlen@plt>
  movslq %eax,%rdi
  add    %rbp,%rdi
  mov    $0x2d,%edx
  lea    D20(%rip),%r12
  mov    %r12,%rsi
  call   <sprintf@plt>
  mov    $0x0,%eax
  call   <random@plt>
  mov    %eax,%ebp
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %ebp,%ecx
  sar    $0x1f,%ecx
  shr    $0x18,%ecx
  lea    0x0(%rbp,%rcx,1),%edx
  movzbl %dl,%edx
  sub    %ecx,%edx
  movslq %eax,%rdi
  add    %rbx,%rdi
  lea    D6(%rip),%r13
  mov    %r13,%rsi
  call   <sprintf@plt>
  mov    $0x0,%eax
  call   <random@plt>
  mov    %eax,%ebp
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %ebp,%ecx
  sar    $0x1f,%ecx
  shr    $0x18,%ecx
  lea    0x0(%rbp,%rcx,1),%edx
  movzbl %dl,%edx
  sub    %ecx,%edx
  movslq %eax,%rdi
  add    %rbx,%rdi
  mov    %r13,%rsi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  movslq %eax,%rdi
  add    %rbx,%rdi
  mov    $0x2d,%edx
  mov    %r12,%rsi
  call   <sprintf@plt>
  mov    $0x0,%eax
  call   <random@plt>
  mov    %eax,%ebp
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %ebp,%ecx
  sar    $0x1f,%ecx
  shr    $0x18,%ecx
  lea    0x0(%rbp,%rcx,1),%edx
  movzbl %dl,%edx
  sub    %ecx,%edx
  movslq %eax,%rdi
  add    %rbx,%rdi
  mov    %r13,%rsi
  call   <sprintf@plt>
  mov    $0x0,%eax
  call   <random@plt>
  mov    %eax,%ebp
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %ebp,%ecx
  sar    $0x1f,%ecx
  shr    $0x18,%ecx
  lea    0x0(%rbp,%rcx,1),%edx
  movzbl %dl,%edx
  sub    %ecx,%edx
  movslq %eax,%rdi
  add    %rbx,%rdi
  mov    %r13,%rsi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  movslq %eax,%rdi
  add    %rbx,%rdi
  mov    $0x2d,%edx
  mov    %r12,%rsi
  call   <sprintf@plt>
  mov    $0x0,%eax
  call   <random@plt>
  mov    %eax,%ebp
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %ebp,%ecx
  sar    $0x1f,%ecx
  shr    $0x18,%ecx
  lea    0x0(%rbp,%rcx,1),%edx
  movzbl %dl,%edx
  sub    %ecx,%edx
  movslq %eax,%rdi
  add    %rbx,%rdi
  mov    %r13,%rsi
  call   <sprintf@plt>
  mov    $0x0,%eax
  call   <random@plt>
  mov    %eax,%ebp
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %ebp,%ecx
  sar    $0x1f,%ecx
  shr    $0x18,%ecx
  lea    0x0(%rbp,%rcx,1),%edx
  movzbl %dl,%edx
  sub    %ecx,%edx
  movslq %eax,%rdi
  add    %rbx,%rdi
  mov    %r13,%rsi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  cltq
  lea    (%rbx,%rax,1),%rdi
  mov    $0x2d,%edx
  mov    %r12,%rsi
  call   <sprintf@plt>
  mov    $0x6,%r12d
L11:
  mov    $0x0,%eax
  call   <random@plt>
  mov    %eax,%ebx
  mov    %rsp,%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%ecx
  mov    %ebx,%eax
  sar    $0x1f,%eax
  shr    $0x18,%eax
  lea    (%rbx,%rax,1),%edx
  movzbl %dl,%edx
  sub    %eax,%edx
  movslq %ecx,%rax
  lea    0x0(%rbp,%rax,1),%rdi
  mov    %r13,%rsi
  call   <sprintf@plt>
  sub    $0x1,%r12d
  jne    L11
  movb   $0x0,0x24(%rsp)
  mov    %rsp,%rdi
  call   <cpystr@plt>
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L21
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L21:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D6
data_type: string
name: retrieve_data
arguments: data_tag: D20
data_type: string

tool: D6: %x

tool: D20: %c

assistant: ```c
char *oauth2_generate_state(void) {
  char rv[36];
  int i;
  rv[0] = '\0';
  for (i = 0; i < 4; i++)
    sprintf(rv + strlen(rv), "%x", random() % 256);
  sprintf(rv + strlen(rv), "%c", '-');
  for (i = 0; i < 2; i++)
    sprintf(rv + strlen(rv), "%x", random() % 256);
  sprintf(rv + strlen(rv), "%c", '-');
  for (i = 0; i < 2; i++)
    sprintf(rv + strlen(rv), "%x", random() % 256);
  sprintf(rv + strlen(rv), "%c", '-');
  for (i = 0; i < 2; i++)
    sprintf(rv + strlen(rv), "%x", random() % 256);
  sprintf(rv + strlen(rv), "%c", '-');
  for (i = 0; i < 6; i++)
    sprintf(rv + strlen(rv), "%x", random() % 256);
  rv[36] = '\0';
  return cpystr(rv);
}
```