user: Converte this assembly snippet into its equivalent C code:

```asm
<generate_uuid>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x28,%rsp
  mov    $0x10,%edi
  call   <generate_bytestream@plt>
  mov    %rax,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  add    $0x6,%rax
  movzbl (%rax),%eax
  and    $0xf,%eax
  or     $0x40,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    $0x6,%rax
  mov    %dl,(%rax)
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  movzbl (%rax),%eax
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  mov    %dl,(%rax)
  mov    $0x25,%edi
  call   <malloc@plt>
  mov    %rax,-0x38(%rbp)
  mov    -0x40(%rbp),%rax
  add    $0xf,%rax
  movzbl (%rax),%eax
  movzbl %al,%ecx
  mov    -0x40(%rbp),%rax
  add    $0xe,%rax
  movzbl (%rax),%eax
  movzbl %al,%esi
  mov    -0x40(%rbp),%rax
  add    $0xd,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x44(%rbp)
  mov    -0x40(%rbp),%rax
  add    $0xc,%rax
  movzbl (%rax),%eax
  movzbl %al,%r15d
  mov    -0x40(%rbp),%rax
  add    $0xb,%rax
  movzbl (%rax),%eax
  movzbl %al,%r14d
  mov    -0x40(%rbp),%rax
  add    $0xa,%rax
  movzbl (%rax),%eax
  movzbl %al,%r13d
  mov    -0x40(%rbp),%rax
  add    $0x9,%rax
  movzbl (%rax),%eax
  movzbl %al,%r12d
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  movzbl (%rax),%eax
  movzbl %al,%ebx
  mov    -0x40(%rbp),%rax
  add    $0x7,%rax
  movzbl (%rax),%eax
  movzbl %al,%r11d
  mov    -0x40(%rbp),%rax
  add    $0x6,%rax
  movzbl (%rax),%eax
  movzbl %al,%r10d
  mov    -0x40(%rbp),%rax
  add    $0x5,%rax
  movzbl (%rax),%eax
  movzbl %al,%r9d
  mov    -0x40(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movzbl %al,%r8d
  mov    -0x40(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movzbl %al,%edi
  mov    %edi,-0x48(%rbp)
  mov    -0x40(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    %edx,-0x4c(%rbp)
  mov    -0x40(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x38(%rbp),%rdi
  push   %rcx
  push   %rsi
  mov    -0x44(%rbp),%ecx
  push   %rcx
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  push   %r11
  push   %r10
  push   %r9
  push   %r8
  mov    -0x48(%rbp),%r9d
  mov    -0x4c(%rbp),%r8d
  mov    %edx,%ecx
  mov    %eax,%edx
  lea    D6(%rip),%rax
  mov    %rax,%rsi
  call   <sprintf@plt>
  add    $0x60,%rsp
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x38(%rbp),%rax
  add    $0x24,%rax
  movb   $0x0,(%rax)
  mov    -0x38(%rbp),%rax
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D6
datatype: string

tool: D6: %02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X

assistant: ```c
char *generate_uuid() {
  unsigned char *stream = generate_bytestream(16);
  stream[6] = 0x40 | (stream[6] & 0xf);
  stream[8] = 0x80 | (stream[8] & 0x3f);
  char *uuid = malloc(sizeof(char) * 37);
  sprintf(uuid, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", stream[0], stream[1], stream[2], stream[3], stream[4], stream[5], stream[6], stream[7], stream[8], stream[9], stream[10], stream[11], stream[12], stream[13], stream[14], stream[15]);
  free(stream);
  uuid[36] = '\0';
  return uuid;
}
```