user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x18000(%rsp),%r11
L211:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L211
  sub    $0x6d8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x186c8(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rsi
  lea    D29(%rip),%rdi
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,0x1c(%rsp)
  test   %eax,%eax
  jle    L55
  lea    0x20(%rsp),%r15
  jmp    L74
L111:
  addl   $0x1,0xc(%rsp)
  mov    0x8(%rsp),%ebp
  mov    $0x0,%r12d
L114:
  cmp    %ebx,%r14d
  jge    L168
L41:
  cmp    %ebp,%r12d
  jg     L111
  movslq %r12d,%rax
  movzbl 0x20(%rsp,%rax,1),%eax
  cmp    $0x63,%al
  je     L122
  movslq %ebp,%rdx
  movzbl 0x20(%rsp,%rdx,1),%edx
  cmp    $0x63,%dl
  je     L5
  cmp    %dl,%al
  je     L47
  mov    %ebx,%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <next_right@plt>
  mov    %eax,%r13d
  cmp    %ebx,%eax
  jge    L140
  cltq
  movslq %ebp,%rdx
  movzbl 0x20(%rsp,%rdx,1),%ecx
  cmp    %cl,0x20(%rsp,%rax,1)
  je     L115
  mov    %ebx,%edx
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   <next_left@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  js     L114
  movslq %r12d,%rdx
  cltq
  movzbl 0x20(%rsp,%rax,1),%eax
  cmp    %al,0x20(%rsp,%rdx,1)
  cmovne %r13d,%r12d
  jmp    L114
L122:
  mov    %ebx,%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <next_right@plt>
  mov    %eax,%r12d
  jmp    L114
L5:
  mov    %ebx,%edx
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   <next_left@plt>
  mov    %eax,%ebp
  jmp    L114
L47:
  movslq %r12d,%rax
  movb   $0x63,0x20(%rsp,%rax,1)
  movslq %ebp,%rax
  movb   $0x63,0x20(%rsp,%rax,1)
  mov    %ebx,%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <next_right@plt>
  mov    %eax,%r12d
  mov    %ebx,%edx
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   <next_left@plt>
  mov    %eax,%ebp
  mov    %r14d,%eax
  cmp    %ebp,%r12d
  setne  %r14b
  movzbl %r14b,%r14d
  lea    0x1(%r14,%rax,1),%r14d
  jmp    L114
L140:
  mov    %eax,%r12d
  jmp    L114
L115:
  mov    %r13d,%r12d
  jmp    L114
L184:
  movl   $0x1,0xc(%rsp)
L168:
  mov    0xc(%rsp),%esi
  lea    D10(%rip),%rdi
  call   <printf@plt>
  mov    0x1c(%rsp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,0x1c(%rsp)
  test   %eax,%eax
  jle    L55
L74:
  mov    %r15,%rsi
  lea    D23(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  cmpb   $0x0,0x20(%rsp)
  je     L184
  lea    0x21(%rsp),%rax
  mov    $0x0,%ebx
L136:
  mov    %ebx,0x8(%rsp)
  add    $0x1,%ebx
  add    $0x1,%rax
  cmpb   $0x0,-0x1(%rax)
  jne    L136
  test   %ebx,%ebx
  jle    L199
  mov    0x8(%rsp),%ebp
  movl   $0x1,0xc(%rsp)
  mov    $0x0,%r14d
  mov    $0x0,%r12d
  jmp    L41
L199:
  movl   $0x1,0xc(%rsp)
  jmp    L168
L55:
  mov    0x186c8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L57
  mov    $0x0,%eax
  add    $0x186d8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L57:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D29
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D10
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D23
type_guessed: string

tool: D29: %d

tool: D10: %d


tool: D23: %s

assistant: ```c
int main() {
  int t, i, j, len, count, ans, ni, nj;
  char H[100001];
  scanf("%d", &t);
  while (t-- > 0) {
    scanf("%s", H);
    for (i = 0; H[i] != '\0'; i++)
      ;
    len = i;
    count = 0;
    ans = 1;
    for (i = 0, j = len - 1; count < len;) {
      if (i > j) {
        ans++;
        i = 0;
        j = len - 1;
        continue;
      }
      if (H[i] == 'c') {
        i = next_right(H, i, len);
        continue;
      }
      if (H[j] == 'c') {
        j = next_left(H, j, len);
        continue;
      }
      if (H[i] == H[j]) {
        H[i] = 'c';
        H[j] = 'c';
        i = next_right(H, i, len);
        j = next_left(H, j, len);
        count++;
        if (i != j)
          count++;
        continue;
      }
      ni = next_right(H, i, len);
      if (ni >= len) {
        i = ni;
        continue;
      }
      if (H[ni] == H[j]) {
        i = ni;
        continue;
      }
      nj = next_left(H, j, len);
      if (nj < 0) {
        j = nj;
        continue;
      }
      if (H[i] == H[nj]) {
        j = nj;
        continue;
      }
      i = ni;
      j = nj;
    }
    printf("%d\n", ans);
  }
  return 0;
}
```