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

```asm
<test_case>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %edi,-0x64(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  movl   $0xc351,-0x54(%rbp)
  movl   $0x0,-0x50(%rbp)
  movl   $0xffffffff,-0x4c(%rbp)
  movl   $0xffffffff,-0x48(%rbp)
  movl   $0x0,-0x44(%rbp)
  mov    -0x64(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x38(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L89:
  cmp    %rdx,%rsp
  je     L69
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L89
L69:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L20
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L20:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x30(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L65
L17:
  lea    -0x58(%rbp),%rcx
  lea    -0x27(%rbp),%rdx
  lea    -0x22(%rbp),%rax
  mov    %rax,%rsi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movzbl -0x22(%rbp),%eax
  cmp    $0x6c,%al
  jne    L189
  mov    -0x58(%rbp),%eax
  cmp    %eax,-0x54(%rbp)
  jle    L149
  mov    -0x58(%rbp),%eax
  mov    %eax,-0x54(%rbp)
  jmp    L149
L189:
  movzbl -0x22(%rbp),%eax
  cmp    $0x67,%al
  jne    L87
  mov    -0x58(%rbp),%eax
  cmp    %eax,-0x50(%rbp)
  jge    L149
  mov    -0x58(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  jmp    L149
L87:
  mov    -0x58(%rbp),%eax
  cmp    %eax,-0x4c(%rbp)
  jge    L19
  mov    -0x58(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x48(%rbp)
L19:
  mov    -0x44(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x44(%rbp)
  mov    -0x58(%rbp),%ecx
  mov    -0x30(%rbp),%rdx
  cltq
  mov    %ecx,(%rdx,%rax,4)
L149:
  addl   $0x1,-0x40(%rbp)
L65:
  mov    -0x40(%rbp),%eax
  cmp    -0x64(%rbp),%eax
  jl     L17
  cmpl   $0xc351,-0x54(%rbp)
  jne    L83
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L147
L83:
  mov    -0x50(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x54(%rbp)
  jg     L97
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L147
L97:
  cmpl   $0x0,-0x44(%rbp)
  jne    L121
  mov    -0x50(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L181
L75:
  mov    -0x3c(%rbp),%eax
  mov    %eax,%esi
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x3c(%rbp)
L181:
  mov    -0x3c(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L75
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L147
L121:
  cmpl   $0x1,-0x44(%rbp)
  jne    L202
  mov    -0x4c(%rbp),%edx
  mov    -0x54(%rbp),%esi
  mov    -0x50(%rbp),%eax
  mov    %edx,%r8d
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    %eax,%edi
  call   <generate@plt>
  jmp    L147
L202:
  subl   $0x1,-0x44(%rbp)
  mov    -0x48(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  je     L190
  mov    -0x30(%rbp),%rdx
  mov    -0x44(%rbp),%ecx
  mov    -0x48(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <swap@plt>
L190:
  mov    -0x4c(%rbp),%edi
  mov    -0x44(%rbp),%ecx
  mov    -0x30(%rbp),%rdx
  mov    -0x54(%rbp),%esi
  mov    -0x50(%rbp),%eax
  mov    %edi,%r8d
  mov    %eax,%edi
  call   <generate@plt>
L147:
  mov    %rbx,%rsp
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L123
  call   <__stack_chk_fail@plt>
L123:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D4
type_guessed: string
name: extract_symbolic_data
arguments: label: D33
type_guessed: string
name: extract_symbolic_data
arguments: label: D28
type_guessed: string
name: extract_symbolic_data
arguments: label: D12
type_guessed: string

tool: D4: %s %s %d

tool: D33: infinite

tool: D28: none

tool: D12: %d 

assistant: ```c
void test_case(int n) {
  int value, upper_bound = 50001, lower_bound = 0, max_div = -1, max_div_index = -1, curr_index = 0;
  int divs[n];
  char cmd[10], dmp[5];
  for (int i = 0; i < n; i++) {
    scanf("%s %s %d", cmd, dmp, &value);
    if (cmd[0] == 'l') {
      if (value < upper_bound)
        upper_bound = value;
    } else if (cmd[0] == 'g') {
      if (value > lower_bound)
        lower_bound = value;
    } else {
      if (max_div < value) {
        max_div = value;
        max_div_index = curr_index;
      }
      divs[curr_index++] = value;
    }
  }
  if (upper_bound == 50001)
    printf("infinite\n");
  else if (upper_bound <= lower_bound + 1)
    printf("none\n");
  else if (curr_index == 0) {
    for (int i = lower_bound + 1; i < upper_bound; i++)
      printf("%d ", i);
    printf("\n");
  } else if (curr_index == 1) {
    generate(lower_bound, upper_bound, NULL, 0, max_div);
  } else {
    curr_index--;
    if (max_div_index != curr_index)
      swap(max_div_index, curr_index, divs);
    generate(lower_bound, upper_bound, divs, curr_index, max_div);
  }
}
```