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

```asm
<_tw2_get_decode_key>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    D0(%rip),%rbx
  sub    $0xd8,%rsp
  movdqa D48(%rip),%xmm0
  mov    %rsi,0x10(%rsp)
  mov    %rdx,0x18(%rsp)
  mov    %r8d,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  mov    D67(%rip),%rax
  movaps %xmm0,0x40(%rsp)
  movdqa D35(%rip),%xmm0
  movl   $0x7,0x68(%rsp)
  mov    %rax,0x60(%rsp)
  lea    D56(%rip),%rax
  movq   %rax,%xmm1
  movaps %xmm0,0x50(%rsp)
  movq   %rbx,%xmm0
  lea    D50(%rip),%rax
  punpcklqdq %xmm1,%xmm0
  lea    D9(%rip),%rbx
  movq   %rax,%xmm2
  movaps %xmm0,0x20(%rsp)
  movq   %rbx,%xmm0
  punpcklqdq %xmm2,%xmm0
  movaps %xmm0,0x30(%rsp)
  test   %ecx,%ecx
  je     L148
  lea    -0x1(%rcx),%r12d
  mov    %rdi,%r15
  lea    0x70(%rsp),%r14
  mov    $0xba2e8ba3,%ebp
  movslq %r12d,%rax
  lea    0xbe(%rsp),%rbx
  mov    %rax,(%rsp)
  nop
L67:
  movzbl (%r15),%edx
  mov    %r14,%rax
  cmp    $0x13,%dl
  jne    L73
  jmp    L80
  xchg   %ax,%ax
L45:
  cmp    %rbx,%rax
  je     L80
L73:
  add    $0x1,%r15
  mov    %dl,(%rax)
  add    $0x1,%rax
  movzbl (%r15),%edx
  cmp    $0x13,%dl
  jne    L45
L80:
  movb   $0x0,(%rax)
  mov    %r14,%rdi
  mov    %r14,%r12
  xor    %r13d,%r13d
  call   <str_reverse@plt>
  jmp    L93
  nopl   0x0(%rax,%rax,1)
L145:
  mov    %r13d,%eax
  add    $0x1,%r12
  imul   %rbp,%rax
  shr    $0x23,%rax
  lea    (%rax,%rax,4),%esi
  lea    (%rax,%rsi,2),%esi
  mov    %r13d,%eax
  sub    %esi,%eax
  lea    0xb(%r13),%esi
  add    $0x1,%r13d
  cltq
  imul   0x40(%rsp,%rax,4),%esi
  movslq %esi,%rax
  mov    %esi,%edi
  imul   $0x3e0f83e1,%rax,%rax
  sar    $0x1f,%edi
  sar    $0x23,%rax
  sub    %edi,%eax
  mov    %eax,%edi
  shl    $0x5,%edi
  add    %edi,%eax
  sub    %eax,%esi
  movzbl -0x1(%r12),%eax
  lea    -0x14(%rax,%rsi,1),%eax
  mov    %al,-0x1(%r12)
L93:
  mov    %r14,%rdi
  call   <str_len@plt>
  cmp    %eax,%r13d
  jl     L145
  mov    0xc(%rsp),%edx
  test   %edx,%edx
  jne    L98
  mov    (%rsp),%eax
  test   %eax,%eax
  je     L9
L121:
  cmpl   $0x3,(%rsp)
  je     L108
L44:
  cmp    $0x3b,%r13d
  jg     L63
  mov    $0x3c,%eax
  mov    $0x1,%edx
  sub    %r13d,%eax
  cmp    $0x3b,%r13d
  cmovg  %rdx,%rax
  add    %rax,%r15
L63:
  subq   $0x1,(%rsp)
  jmp    L67
L98:
  mov    (%rsp),%rax
  mov    %r14,%rdx
  lea    D32(%rip),%rdi
  mov    0x20(%rsp,%rax,8),%rsi
  call   <printf@plt>
  mov    (%rsp),%eax
  test   %eax,%eax
  jne    L121
L9:
  mov    0x10(%rsp),%rdi
  mov    %r14,%rsi
  call   <str_copy@plt>
L148:
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L131
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L108:
  mov    0x18(%rsp),%rdi
  mov    %r14,%rsi
  call   <str_copy@plt>
  jmp    L44
L131:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D0
type_guessed: string
name: parse_data
arguments: label: D48
type_guessed: byte[16]
name: parse_data
arguments: label: D67
type_guessed: byte[8]
name: parse_data
arguments: label: D35
type_guessed: byte[16]
name: parse_data
arguments: label: D56
type_guessed: string
name: parse_data
arguments: label: D50
type_guessed: string
name: parse_data
arguments: label: D9
type_guessed: string
name: parse_data
arguments: label: D32
type_guessed: string

tool: D0: key  

tool: {"D48": [0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00]}

tool: {"D67": [0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D35": [0x05,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00]}

tool: D56: phone

tool: D50: time 

tool: D9: email

tool: D32: %s: %s


assistant: ```c
void _tw2_get_decode_key(char *skey, char *out_key, char *out_key_time, int cnt, int flag) {
  char akey[80], *pkey;
  register int i, j;
  const int length = 60;
  const int codec[] = {0, 1, 0, 2, 5, 2, 0, 3, 3, 0, 7};
  int k, asize = sizeof(codec) / sizeof(codec[0]);
  char *str[] = {"key  ", "phone", "email", "time "};
  while (cnt--) {
    pkey = akey;
    i = 0;
    while (*skey != 19 && i++ < 80 - 2)
      *pkey++ = *skey++;
    *pkey = '\0';
    str_reverse(akey);
    for (i = 0; i < (int)str_len(akey); i++) {
      k = i + asize;
      akey[i] += (k * (codec[i % asize])) % 33;
      akey[i] -= 20;
    }
    if (flag)
      printf("%s: %s\n", str[cnt], akey);
    if (cnt == 0)
      str_copy(out_key, akey);
    if (cnt == 3)
      str_copy(out_key_time, akey);
    for (j = i; j < length; j++)
      *skey++;
  }
}
```