user: 请从给定的汇编指令推导出C源代码:

```asm
<zoundx_encode>:
  endbr64
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <strlen@plt>
  mov    $0x1,%esi
  movslq %eax,%rdi
  mov    %rax,%rbx
  mov    %eax,%r12d
  call   <calloc@plt>
  mov    %rax,(%rsp)
  mov    %rax,%rbp
  test   %ebx,%ebx
  jle    L234
  lea    -0x1(%rbx),%r14d
  xor    %ebx,%ebx
  jmp    L583
  nopw   0x0(%rax,%rax,1)
L342:
  mov    %rax,%rbx
L583:
  movsbl 0x0(%r13,%rbx,1),%edi
  call   <tolower@plt>
  mov    %al,0x0(%rbp,%rbx,1)
  lea    0x1(%rbx),%rax
  mov    (%rsp),%rbp
  cmp    %rbx,%r14
  jne    L342
  mov    $0x1,%eax
  xor    %edx,%edx
  mov    $0xa14191,%r9d
  mov    $0x14283,%r10d
  mov    $0xffffffffffefbfee,%r8
  nopl   0x0(%rax)
L225:
  mov    %eax,%ecx
  cmp    $0x1,%edx
  jle    L212
  cmp    %eax,%r12d
  jle    L212
  movzbl 0x0(%rbp,%rdx,1),%edi
  lea    -0x62(%rdi),%ecx
  cmp    $0x14,%cl
  jbe    L36
L186:
  lea    -0x63(%rdi),%ecx
  cmp    $0x17,%cl
  ja     L351
  bt     %rcx,%r9
  jb     L791
L351:
  mov    %edi,%ecx
  and    $0xffffffef,%ecx
  cmp    $0x64,%cl
  jne    L296
  lea    0x0(%rbp,%rax,1),%rsi
  movzbl (%rsi),%ecx
  and    $0xffffffef,%ecx
  cmp    $0x64,%cl
  je     L745
L296:
  cmp    $0x6c,%dil
  je     L646
  lea    -0x6d(%rdi),%ecx
  cmp    $0x1,%cl
  ja     L436
  lea    0x0(%rbp,%rax,1),%rsi
  movzbl (%rsi),%ebx
  lea    -0x6d(%rbx),%ecx
  cmp    $0x1,%cl
  ja     L432
  jmp    L745
  nopl   (%rax)
L212:
  cmp    %r12d,%ecx
  jge    L234
L432:
  add    $0x1,%rdx
  add    $0x1,%rax
  jmp    L225
  nopw   0x0(%rax,%rax,1)
L36:
  bt     %rcx,%r8
  jb     L186
  lea    0x0(%rbp,%rax,1),%rsi
  movzbl (%rsi),%ebx
  lea    -0x62(%rbx),%ecx
  cmp    $0x14,%cl
  ja     L186
  bt     %rcx,%r8
  jb     L186
L745:
  movb   $0x20,(%rsi)
  mov    (%rsp),%rbp
  jmp    L432
  nopl   (%rax)
L234:
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    %rsp,%rbp
  call   <shift_whitespaces@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <trim@plt>
  mov    (%rsp),%rdi
  mov    %eax,%ecx
  test   %eax,%eax
  jle    L469
  mov    $0x1,%eax
  xor    %edx,%edx
  mov    $0xa14191,%r11d
  mov    $0x14283,%ebx
  mov    $0xffffffffffefbfee,%r10
  jmp    L412
  xchg   %ax,%ax
L187:
  cmp    $0x1,%edx
  jle    L86
  movzbl (%rdi,%rdx,1),%esi
  cmp    $0x68,%sil
  je     L641
  cmp    $0x77,%sil
  je     L641
L444:
  add    $0x1,%rdx
  add    $0x1,%rax
L412:
  mov    %eax,%esi
  cmp    %eax,%ecx
  jg     L187
L86:
  cmp    %ecx,%esi
  jl     L444
L469:
  xor    %eax,%eax
  call   <shift_whitespaces@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <trim@plt>
  mov    (%rsp),%r8
  cmp    $0x1,%eax
  jle    L127
  cltq
  mov    $0x1,%edx
  mov    $0x2a083,%r9d
  jmp    L473
  nopw   0x0(%rax,%rax,1)
L511:
  sub    $0x68,%ecx
  cmp    $0x11,%cl
  ja     L564
  bt     %rcx,%r9
  jb     L93
L564:
  add    $0x1,%rdx
  cmp    %rdx,%rax
  je     L127
L473:
  lea    (%r8,%rdx,1),%rsi
  movzbl (%rsi),%ecx
  mov    %ecx,%edi
  and    $0xfffffffb,%edi
  cmp    $0x61,%dil
  jne    L511
L93:
  add    $0x1,%rdx
  movb   $0x20,(%rsi)
  mov    (%rsp),%r8
  cmp    %rdx,%rax
  jne    L473
L127:
  mov    %r8,%rdi
  xor    %eax,%eax
  call   <shift_whitespaces@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <trim@plt>
  mov    (%rsp),%rbp
  mov    %eax,%ebx
  cmp    $0x1,%eax
  jle    L261
  movslq %eax,%rdi
  mov    $0x1,%edx
  lea    D5(%rip),%r8
  nopl   (%rax)
L15:
  lea    0x0(%rbp,%rdx,1),%rcx
  movzbl (%rcx),%eax
  mov    %eax,%esi
  and    $0xfffffffb,%esi
  cmp    $0x62,%sil
  je     L592
  sub    $0x63,%eax
  cmp    $0x17,%al
  ja     L689
  movzbl %al,%eax
  movslq (%r8,%rax,4),%rax
  add    %r8,%rax
  notrack jmp *%rax
  nop
L641:
  movzbl -0x1(%rdi,%rdx,1),%r9d
  lea    -0x62(%r9),%esi
  cmp    $0x14,%sil
  jbe    L240
L620:
  lea    -0x63(%r9),%esi
  cmp    $0x17,%sil
  ja     L637
  bt     %rsi,%r11
  jb     L588
L637:
  mov    %r9d,%esi
  and    $0xffffffef,%esi
  cmp    $0x64,%sil
  jne    L586
  lea    (%rdi,%rax,1),%r8
  movzbl (%r8),%esi
  and    $0xffffffef,%esi
  cmp    $0x64,%sil
  je     L151
L586:
  cmp    $0x6c,%r9b
  je     L391
  lea    -0x6d(%r9),%esi
  cmp    $0x1,%sil
  ja     L362
  lea    (%rdi,%rax,1),%r8
  movzbl (%r8),%esi
  sub    $0x6d,%esi
  cmp    $0x1,%sil
  ja     L444
  jmp    L151
  nopl   0x0(%rax,%rax,1)
  mov    $0x32,%eax
  nopl   (%rax)
L228:
  mov    %al,(%rcx)
  mov    (%rsp),%rbp
L689:
  add    $0x1,%rdx
  cmp    %rdx,%rdi
  jne    L15
  cmp    $0x4,%ebx
  jg     L452
L261:
  lea    -0x1(%rbx),%eax
  cmp    $0x2,%eax
  jbe    L402
L685:
  movsbl 0x0(%rbp),%edi
  call   <toupper@plt>
  mov    %al,0x0(%rbp)
  mov    (%rsp),%rax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L676
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L592:
  mov    $0x31,%eax
  jmp    L228
  nop
L240:
  bt     %rsi,%r10
  jb     L620
  lea    (%rdi,%rax,1),%r8
  movzbl (%r8),%esi
  sub    $0x62,%esi
  cmp    $0x14,%sil
  ja     L620
  bt     %rsi,%r10
  jb     L620
L151:
  movb   $0x20,(%r8)
  mov    (%rsp),%rsi
  movb   $0x20,(%rsi,%rdx,1)
  mov    (%rsp),%rdi
  jmp    L444
  xchg   %ax,%ax
L791:
  lea    0x0(%rbp,%rax,1),%rsi
  movzbl (%rsi),%ecx
  mov    %ecx,%r11d
  and    $0xfffffffb,%r11d
  cmp    $0x63,%r11b
  je     L745
  sub    $0x6a,%ecx
  cmp    $0x10,%cl
  ja     L351
  bt     %rcx,%r10
  jae    L351
  jmp    L745
  nopl   0x0(%rax)
  mov    $0x35,%eax
  jmp    L228
  nopw   0x0(%rax,%rax,1)
  mov    $0x33,%eax
  jmp    L228
  nopw   0x0(%rax,%rax,1)
L646:
  lea    0x0(%rbp,%rax,1),%rsi
  cmpb   $0x6c,(%rsi)
  jne    L432
  jmp    L745
  nopl   0x0(%rax,%rax,1)
L402:
  mov    $0x1,%esi
  mov    $0x4,%edi
  call   <calloc@plt>
  mov    %rax,%r12
  xor    %eax,%eax
L276:
  movzbl 0x0(%rbp,%rax,1),%edx
  mov    %dl,(%r12,%rax,1)
  add    $0x1,%rax
  cmp    %eax,%ebx
  jg     L276
  mov    %rbp,%rdi
  call   <free@plt>
  mov    $0x3,%eax
  movslq %ebx,%rdx
  mov    %r12,(%rsp)
  sub    %ebx,%eax
  add    %rdx,%rax
  jmp    L96
L669:
  mov    (%rsp),%r12
  add    $0x1,%rdx
L96:
  movb   $0x30,(%r12,%rdx,1)
  cmp    %rax,%rdx
  jne    L669
  mov    (%rsp),%rbp
  jmp    L685
  nopl   0x0(%rax,%rax,1)
L588:
  lea    (%rdi,%rax,1),%r8
  movzbl (%r8),%esi
  mov    %esi,%r12d
  and    $0xfffffffb,%r12d
  cmp    $0x63,%r12b
  je     L151
  sub    $0x6a,%esi
  cmp    $0x10,%sil
  ja     L637
  bt     %rsi,%rbx
  jae    L637
  jmp    L151
  nopl   (%rax)
  mov    $0x34,%eax
  jmp    L228
  nopw   0x0(%rax,%rax,1)
  mov    $0x36,%eax
  jmp    L228
  nopw   0x0(%rax,%rax,1)
L452:
  mov    $0x1,%esi
  mov    $0x4,%edi
  call   <calloc@plt>
  xor    %edx,%edx
  mov    %rax,%rbx
L737:
  movzbl 0x0(%rbp,%rdx,1),%eax
  mov    %al,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    $0x4,%rdx
  jne    L737
  mov    %rbp,%rdi
  mov    %rbx,%rbp
  call   <free@plt>
  mov    %rbx,(%rsp)
  jmp    L685
  nopw   0x0(%rax,%rax,1)
L436:
  cmp    $0x72,%dil
  jne    L432
  lea    0x0(%rbp,%rax,1),%rsi
  cmpb   $0x72,(%rsi)
  jne    L432
  jmp    L745
  nopl   (%rax)
L362:
  cmp    $0x72,%r9b
  jne    L444
  lea    (%rdi,%rax,1),%r8
  cmpb   $0x72,(%r8)
  jne    L444
  jmp    L151
  nopl   (%rax)
L391:
  lea    (%rdi,%rax,1),%r8
  cmpb   $0x6c,(%r8)
  jne    L444
  jmp    L151
L676:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *zoundx_encode(const char *query) {
  char *buffer;
  char *lower;
  int i, j, l, val;
  l = strlen(query);
  lower = calloc(l, sizeof(char));
  for (i = 0; i < l; ++i) {
    lower[i] = tolower(query[i]);
  }
  for (i = 0; i < l; ++i) {
    if ((i + 1) < l && i > 1 && (((lower[i] == 'b' || lower[i] == 'f' || lower[i] == 'p' || lower[i] == 'v') && (lower[i + 1] == 'b' || lower[i + 1] == 'f' || lower[i + 1] == 'p' || lower[i + 1] == 'v')) || ((lower[i] == 'c' || lower[i] == 'g' || lower[i] == 'j' || lower[i] == 'k' || lower[i] == 'q' || lower[i] == 's' || lower[i] == 'x' || lower[i] == 'z') && (lower[i + 1] == 'c' || lower[i + 1] == 'g' || lower[i + 1] == 'j' || lower[i + 1] == 'k' || lower[i + 1] == 'q' || lower[i + 1] == 's' || lower[i + 1] == 'x' || lower[i + 1] == 'z')) || ((lower[i] == 'd' || lower[i] == 't') && (lower[i + 1] == 'd' || lower[i + 1] == 't')) || ((lower[i] == 'l') && (lower[i + 1] == 'l')) || ((lower[i] == 'm' || lower[i] == 'n') && (lower[i + 1] == 'm' || lower[i + 1] == 'n')) || ((lower[i] == 'r') && (lower[i + 1] == 'r')))) {
      lower[i + 1] = ' ';
    }
  }
  l = trim(&lower, shift_whitespaces(lower));
  for (i = 0; i < l; ++i) {
    if ((i + 1) < l && i > 1 && (lower[i] == 'h' || lower[i] == 'w') && (((lower[i - 1] == 'b' || lower[i - 1] == 'f' || lower[i - 1] == 'p' || lower[i - 1] == 'v') && (lower[i + 1] == 'b' || lower[i + 1] == 'f' || lower[i + 1] == 'p' || lower[i + 1] == 'v')) || ((lower[i - 1] == 'c' || lower[i - 1] == 'g' || lower[i - 1] == 'j' || lower[i - 1] == 'k' || lower[i - 1] == 'q' || lower[i - 1] == 's' || lower[i - 1] == 'x' || lower[i - 1] == 'z') && (lower[i + 1] == 'c' || lower[i + 1] == 'g' || lower[i + 1] == 'j' || lower[i + 1] == 'k' || lower[i + 1] == 'q' || lower[i + 1] == 's' || lower[i + 1] == 'x' || lower[i + 1] == 'z')) || ((lower[i - 1] == 'd' || lower[i - 1] == 't') && (lower[i + 1] == 'd' || lower[i + 1] == 't')) || ((lower[i - 1] == 'l') && (lower[i + 1] == 'l')) || ((lower[i - 1] == 'm' || lower[i - 1] == 'n') && (lower[i + 1] == 'm' || lower[i + 1] == 'n')) || ((lower[i - 1] == 'r') && (lower[i + 1] == 'r')))) {
      lower[i] = lower[i + 1] = ' ';
    }
  }
  l = trim(&lower, shift_whitespaces(lower));
  for (i = 1; i < l; ++i) {
    if ((lower[i] == 'a' || lower[i] == 'e' || lower[i] == 'i' || lower[i] == 'o' || lower[i] == 'u' || lower[i] == 'y' || lower[i] == 'h' || lower[i] == 'w')) {
      lower[i] = ' ';
    }
  }
  l = trim(&lower, shift_whitespaces(lower));
  for (i = 1; i < l; ++i) {
    if (((lower[i] == 'b' || lower[i] == 'f' || lower[i] == 'p' || lower[i] == 'v') && (val = 1)) || ((lower[i] == 'c' || lower[i] == 'g' || lower[i] == 'j' || lower[i] == 'k' || lower[i] == 'q' || lower[i] == 's' || lower[i] == 'x' || lower[i] == 'z') && (val = 2)) || ((lower[i] == 'd' || lower[i] == 't') && (val = 3)) || ((lower[i] == 'l') && (val = 4)) || ((lower[i] == 'm' || lower[i] == 'n') && (val = 5)) || ((lower[i] == 'r') && (val = 6))) {
      lower[i] = '0' + (char)val;
    }
  }
  if (l > 4) {
    buffer = calloc(4, sizeof(char));
    for (i = 0; i < 4; ++i) {
      buffer[i] = lower[i];
    }
    free(lower);
    lower = buffer;
  } else if (l < 4 && l > 0) {
    buffer = calloc(4, sizeof(char));
    for (i = 0; i < l; ++i) {
      buffer[i] = lower[i];
    }
    free(lower);
    lower = buffer;
    for (i = l; i < 4; ++i) {
      lower[i] = '0';
    }
  }
  lower[0] = toupper(lower[0]);
  return lower;
}
```