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

```asm
<generate_random_address>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  movq   $0x0,-0x18(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L65
L61:
  mov    $0x0,%eax
  call   <random@plt>
  movslq %eax,%rdx
  imul   $0xffffffffd20d20d3,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x5,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x27,%edx,%ecx
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x18(%rbp)
  mov    -0x28(%rbp),%rcx
  add    %rax,%rcx
  movslq %edx,%rax
  lea    D0(%rip),%rdx
  movzbl (%rax,%rdx,1),%eax
  mov    %al,(%rcx)
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jae    L101
  cmpq   $0x1,-0x10(%rbp)
  jbe    L101
  mov    -0x18(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L101
  mov    $0x0,%eax
  call   <random@plt>
  and    $0xf,%eax
  test   %eax,%eax
  jne    L101
  mov    -0x18(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2e,(%rax)
L101:
  subq   $0x1,-0x10(%rbp)
L65:
  cmpq   $0x0,-0x10(%rbp)
  jne    L61
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    -0x28(%rbp),%rdx
  add    %rdx,%rax
  movb   $0x40,(%rax)
  jmp    L3
L85:
  mov    $0x0,%eax
  call   <random@plt>
  movslq %eax,%rdx
  imul   $0x4ec4ec4f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x3,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x1a,%edx,%ecx
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  lea    0x61(%rax),%ecx
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    -0x28(%rbp),%rdx
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jae    L88
  cmpq   $0x1,-0x8(%rbp)
  jbe    L88
  mov    -0x18(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L88
  mov    $0x0,%eax
  call   <random@plt>
  and    $0xf,%eax
  test   %eax,%eax
  jne    L88
  mov    -0x18(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2e,(%rax)
L88:
  subq   $0x1,-0x8(%rbp)
L3:
  cmpq   $0x0,-0x8(%rbp)
  jne    L85
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    -0x28(%rbp),%rdx
  add    %rdx,%rax
  movb   $0x0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D0
type_infered: string

tool: D0: abcdefghijklmnopqrstuvwxyz0123456789-+=

assistant: ```c
void generate_random_address(char *buf, size_t len1, size_t len2) {
  static const char chars[] = "abcdefghijklmnopqrstuvwxyz0123456789-+=";
  size_t i = 0, l1 = len1, l2 = len2;
  while (l1 > 0) {
    buf[i++] = chars[random() % 39];
    if (l1 < len1 && l1 > 1 && buf[i - 1] != '.' && (random() % 16 == 0))
      buf[i - 1] = '.';
    --l1;
  }
  buf[i++] = '@';
  while (l2 > 0) {
    buf[i++] = 'a' + random() % 26;
    if (l2 < len2 && l2 > 1 && buf[i - 1] != '.' && (random() % 16 == 0))
      buf[i - 1] = '.';
    --l2;
  }
  buf[i++] = 0;
}
```