user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<encrypt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  mov    %rdi,%r15
  mov    %rsi,%rdi
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbx
  sub    $0x118,%rsp
  mov    %rdx,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <strlen@plt>
  mov    %r15,%rdi
  mov    %rax,%rbx
  call   <strlen@plt>
  xor    %edx,%edx
  mov    -0x48(%rbp),%r8
  lea    (%rbx,%rax,1),%rsi
  mov    %rax,%r14
  mov    %rax,%rcx
  div    %rbx
  sub    %rdx,%rsi
  lea    0xf(%rsi),%rax
  mov    %rsp,%rsi
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rsi,%rsp
  je     L82
L192:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L192
L82:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L81
L165:
  mov    %rsp,%r13
  test   %r14,%r14
  je     L14
  mov    %r8,-0x50(%rbp)
  lea    (%r15,%r14,1),%rax
  xor    %r14d,%r14d
  mov    %r12,-0x48(%rbp)
  mov    %r14,%r12
  mov    %r15,%r14
  mov    %rbx,-0x58(%rbp)
  mov    %rax,%rbx
  nopl   (%rax)
L215:
  movsbl (%r14),%edi
  cmp    $0x20,%dil
  je     L34
  call   <toupper@plt>
  lea    0x1(%r12),%r15
  mov    %al,0x0(%r13,%r12,1)
  mov    %r15,%r12
L34:
  add    $0x1,%r14
  cmp    %rbx,%r14
  jne    L215
  mov    %r12,%r14
  mov    -0x58(%rbp),%rbx
  xor    %edx,%edx
  mov    -0x48(%rbp),%r12
  mov    %r14,%rax
  mov    -0x50(%rbp),%r8
  div    %rbx
  test   %rdx,%rdx
  je     L344
  xor    %esi,%esi
  lea    0x1(%r14),%r10
  lea    0x0(%r13,%r14,1),%r9
  cmp    %rbx,%rdx
  je     L142
  nopl   0x0(%rax)
L358:
  lea    (%r10,%rsi,1),%rcx
  xor    %edx,%edx
  mov    %rbx,%rdi
  movb   $0x51,(%r9,%rsi,1)
  mov    %rcx,%rax
  add    $0x1,%rsi
  div    %rbx
  sub    %rdx,%rdi
  cmp    %rsi,%rdi
  ja     L358
  mov    %rax,-0x48(%rbp)
L9:
  movb   $0x0,0x0(%r13,%rcx,1)
  cmp    %rbx,%rcx
  jb     L232
  test   %rbx,%rbx
  je     L232
L15:
  mov    %rbx,%r10
  mov    %r8,%rsi
  mov    %r13,%rdi
  xor    %r9d,%r9d
  and    $0xfffffffffffffff0,%r10
  movdqa D28(%rip),%xmm1
  xor    %r15d,%r15d
  pxor   %xmm2,%xmm2
  lea    (%r12,%r10,1),%rax
  mov    %r10,%r14
  mov    %rax,-0x60(%rbp)
  lea    0x1(%r10),%rax
  mov    %rax,-0x68(%rbp)
  add    %r12,%rax
  mov    %rax,-0x70(%rbp)
  lea    0x2(%r10),%rax
  mov    %rax,-0x78(%rbp)
  add    %r12,%rax
  mov    %rax,-0x80(%rbp)
  lea    0x3(%r10),%rax
  mov    %rax,-0x88(%rbp)
  add    %r12,%rax
  mov    %rax,-0x90(%rbp)
  lea    0x4(%r10),%rax
  mov    %rax,-0x98(%rbp)
  add    %r12,%rax
  mov    %rax,-0xa0(%rbp)
  lea    0x5(%r10),%rax
  mov    %rax,-0xa8(%rbp)
  add    %r12,%rax
  mov    %rax,-0xb0(%rbp)
  lea    0x6(%r10),%rax
  mov    %rax,-0xb8(%rbp)
  add    %r12,%rax
  mov    %rax,-0xc0(%rbp)
  lea    0x7(%r10),%rax
  mov    %rax,-0xc8(%rbp)
  add    %r12,%rax
  mov    %rax,-0xd0(%rbp)
  lea    0x8(%r10),%rax
  mov    %rax,-0xd8(%rbp)
  add    %r12,%rax
  mov    %rax,-0xe0(%rbp)
  lea    0x9(%r10),%rax
  mov    %rax,-0xe8(%rbp)
  add    %r12,%rax
  mov    %rax,-0xf0(%rbp)
  lea    0xa(%r10),%rax
  mov    %rax,-0xf8(%rbp)
  add    %r12,%rax
  mov    %rax,-0x100(%rbp)
  lea    0xb(%r10),%rax
  mov    %rax,-0x108(%rbp)
  add    %r12,%rax
  mov    %rax,-0x110(%rbp)
  lea    0xc(%r10),%rax
  mov    %rax,-0x118(%rbp)
  add    %r12,%rax
  mov    %rax,-0x120(%rbp)
  lea    0xd(%r10),%rax
  mov    %rax,-0x128(%rbp)
  add    %r12,%rax
  mov    %rax,-0x130(%rbp)
  lea    0xe(%r10),%rax
  mov    %rax,-0x138(%rbp)
  add    %r12,%rax
  mov    %rax,-0x140(%rbp)
  lea    0x1(%r12),%rax
  mov    %rax,-0x50(%rbp)
  lea    -0x1(%rbx),%rax
  mov    %rax,-0x58(%rbp)
  movdqa D14(%rip),%xmm4
  movdqa D20(%rip),%xmm3
  movdqa D37(%rip),%xmm5
  nopl   0x0(%rax)
L277:
  mov    %rsi,%rax
  sub    -0x50(%rbp),%rax
  cmp    $0xe,%rax
  jbe    L123
  xor    %eax,%eax
  cmpq   $0xe,-0x58(%rbp)
  jbe    L123
  cs nopw 0x0(%rax,%rax,1)
L268:
  movdqu (%r12,%rax,1),%xmm8
  movdqu (%rdi,%rax,1),%xmm6
  movdqa %xmm2,%xmm10
  movdqa %xmm2,%xmm0
  pcmpgtb %xmm8,%xmm0
  pcmpgtb %xmm6,%xmm10
  movdqa %xmm6,%xmm7
  movdqa %xmm8,%xmm9
  punpcklbw %xmm0,%xmm9
  punpcklbw %xmm10,%xmm7
  punpckhbw %xmm0,%xmm8
  paddw  %xmm1,%xmm7
  paddw  %xmm1,%xmm9
  punpckhbw %xmm10,%xmm6
  paddw  %xmm9,%xmm7
  paddw  %xmm1,%xmm8
  paddw  %xmm1,%xmm6
  movdqa %xmm7,%xmm0
  paddw  %xmm8,%xmm6
  psraw  $0xf,%xmm0
  movdqa %xmm7,%xmm8
  pmulhw %xmm4,%xmm8
  psraw  $0x3,%xmm8
  psubw  %xmm0,%xmm8
  movdqa %xmm8,%xmm0
  psllw  $0x1,%xmm0
  paddw  %xmm8,%xmm0
  psllw  $0x2,%xmm0
  paddw  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  pmulhw %xmm4,%xmm8
  psllw  $0x1,%xmm0
  psubw  %xmm0,%xmm7
  movdqa %xmm6,%xmm0
  psraw  $0xf,%xmm0
  pand   %xmm3,%xmm7
  psraw  $0x3,%xmm8
  psubw  %xmm0,%xmm8
  movdqa %xmm8,%xmm0
  psllw  $0x1,%xmm0
  paddw  %xmm8,%xmm0
  psllw  $0x2,%xmm0
  paddw  %xmm8,%xmm0
  psllw  $0x1,%xmm0
  psubw  %xmm0,%xmm6
  movdqa %xmm7,%xmm0
  pand   %xmm3,%xmm6
  packuswb %xmm6,%xmm0
  paddb  %xmm5,%xmm0
  movups %xmm0,(%rsi,%rax,1)
  add    $0x10,%rax
  cmp    %r10,%rax
  jne    L268
  cmp    %r14,%rbx
  je     L95
  mov    -0x60(%rbp),%rax
  lea    (%r14,%r9,1),%rcx
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0x68(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%rax,%r9,1),%rcx
  mov    -0x70(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0x78(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%rax,%r9,1),%rcx
  mov    -0x80(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0x88(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%rax,%r9,1),%rcx
  mov    -0x90(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0x98(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%rax,%r9,1),%rcx
  mov    -0xa0(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0xa8(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%rax,%r9,1),%rcx
  mov    -0xb0(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0xb8(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%r9,%rax,1),%rcx
  mov    -0xc0(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0xc8(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%r9,%rax,1),%rcx
  mov    -0xd0(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0xd8(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%r9,%rax,1),%rcx
  mov    -0xe0(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0xe8(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%r9,%rax,1),%rcx
  mov    -0xf0(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0xf8(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%r9,%rax,1),%rcx
  mov    -0x100(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0x108(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%r9,%rax,1),%rcx
  mov    -0x110(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0x118(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%r9,%rax,1),%rcx
  mov    -0x120(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0x128(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%r9,%rax,1),%rcx
  mov    -0x130(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  mov    -0x138(%rbp),%rax
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rbx
  jbe    L95
  lea    (%r9,%rax,1),%rcx
  mov    -0x140(%rbp),%rax
  movsbl 0x0(%r13,%rcx,1),%edx
  movsbl (%rax),%eax
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  add    $0x41,%edx
  mov    %dl,(%r8,%rcx,1)
  nopl   0x0(%rax,%rax,1)
L95:
  add    $0x1,%r15
  add    %rbx,%rsi
  add    %rbx,%r9
  add    %rbx,%rdi
  cmp    -0x48(%rbp),%r15
  jb     L277
L232:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L18
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   0x0(%rax)
L123:
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L124:
  movsbl (%r12,%rcx,1),%eax
  movsbl (%rdi,%rcx,1),%edx
  lea    -0x82(%rdx,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%r11d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r11d
  sar    $0x23,%rax
  sub    %r11d,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  add    $0x41,%edx
  mov    %dl,(%rsi,%rcx,1)
  add    $0x1,%rcx
  cmp    %rcx,%rbx
  jne    L124
  jmp    L95
L344:
  mov    %rax,-0x48(%rbp)
  mov    %r14,%rcx
  jmp    L9
L81:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L165
L14:
  movq   $0x0,-0x48(%rbp)
  jmp    L9
L142:
  mov    %rax,-0x48(%rbp)
  movb   $0x0,0x0(%r13,%r14,1)
  cmp    %rbx,%r14
  jae    L15
  jmp    L232
L18:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D28
type: byte[16]
name: unpack_data
arguments: data_tag: D14
type: byte[16]
name: unpack_data
arguments: data_tag: D20
type: byte[16]
name: unpack_data
arguments: data_tag: D37
type: byte[16]

tool: {"D28": [0xbf,0xff,0xbf,0xff,0xbf,0xff,0xbf,0xff,0xbf,0xff,0xbf,0xff,0xbf,0xff,0xbf,0xff]}

tool: {"D14": [0xc5,0x4e,0xc5,0x4e,0xc5,0x4e,0xc5,0x4e,0xc5,0x4e,0xc5,0x4e,0xc5,0x4e,0xc5,0x4e]}

tool: {"D20": [0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00]}

tool: {"D37": [0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41]}

assistant: ```c
void encrypt(const char *p, const char *key, char *c) {
  size_t klen = strlen(key);
  size_t plen = strlen(p);
  size_t pplen = strlen(p) + (strlen(key) - strlen(p) % strlen(key));
  char pp[pplen];
  pplen = 0;
  for (size_t i = 0; i < plen; i++) {
    if (p[i] == ' ')
      continue;
    pp[pplen++] = toupper(p[i]);
  }
  if (pplen % klen != 0)
    for (size_t i = 0; i < klen - (pplen % klen); i++)
      pp[pplen++] = 'Q';
  pp[pplen] = '\0';
  for (size_t i = 0; i < pplen / klen; i++)
    for (size_t j = 0; j < klen; j++) {
      c[i * klen + j] = (pp[i * klen + j] - 'A' + (key[j] - 'A')) % 26 + 'A';
    }
}
```