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

```asm
<test_case>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %edi,-0x58(%rbp)
  mov    %rsp,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %edi,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L231
L227:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L227
L231:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L180
L178:
  mov    -0x58(%rbp),%edx
  mov    %rsp,-0x70(%rbp)
  test   %edx,%edx
  jle    L201
  movl   $0x0,-0x54(%rbp)
  xor    %ebx,%ebx
  lea    -0x4c(%rbp),%r15
  lea    -0x47(%rbp),%r14
  movl   $0xffffffff,-0x68(%rbp)
  lea    -0x42(%rbp),%r13
  lea    D6(%rip),%r12
  movl   $0xffffffff,-0x60(%rbp)
  movl   $0x0,-0x64(%rbp)
  movl   $0xc351,-0x5c(%rbp)
  jmp    L19
  nopw   0x0(%rax,%rax,1)
L42:
  mov    -0x4c(%rbp),%edx
  cmp    $0x67,%al
  je     L213
  cmp    -0x60(%rbp),%edx
  jle    L101
  mov    -0x54(%rbp),%eax
  mov    %edx,-0x60(%rbp)
  mov    %eax,-0x68(%rbp)
L101:
  movslq -0x54(%rbp),%rax
  mov    -0x70(%rbp),%rdi
  mov    %edx,(%rdi,%rax,4)
  lea    0x1(%rax),%eax
  mov    %eax,-0x54(%rbp)
L70:
  add    $0x1,%ebx
  cmp    %ebx,-0x58(%rbp)
  je     L223
L19:
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  movzbl -0x42(%rbp),%eax
  cmp    $0x6c,%al
  jne    L42
  mov    -0x5c(%rbp),%ecx
  mov    -0x4c(%rbp),%eax
  cmp    %eax,%ecx
  cmovle %ecx,%eax
  add    $0x1,%ebx
  mov    %eax,-0x5c(%rbp)
  cmp    %ebx,-0x58(%rbp)
  jne    L19
L223:
  mov    -0x5c(%rbp),%eax
  cmp    $0xc351,%eax
  je     L201
  mov    -0x64(%rbp),%ebx
  lea    0x1(%rbx),%r12d
  cmp    %eax,%r12d
  jge    L206
  mov    -0x54(%rbp),%eax
  test   %eax,%eax
  jne    L108
  mov    -0x5c(%rbp),%r13d
  lea    D18(%rip),%rbx
  nopl   0x0(%rax)
L186:
  mov    %r12d,%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%r12d
  call   <printf@plt>
  cmp    %r12d,%r13d
  jne    L186
  mov    $0xa,%edi
  call   <putchar@plt>
L172:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L66
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L213:
  mov    -0x64(%rbp),%eax
  cmp    %edx,%eax
  cmovge %eax,%edx
  mov    %edx,-0x64(%rbp)
  jmp    L70
L108:
  cmpl   $0x1,-0x54(%rbp)
  je     L166
  mov    -0x54(%rbp),%r12d
  mov    -0x68(%rbp),%eax
  sub    $0x1,%r12d
  cmp    %r12d,%eax
  jne    L220
L228:
  mov    -0x60(%rbp),%r8d
  mov    -0x70(%rbp),%rdx
  mov    %r12d,%ecx
  mov    -0x5c(%rbp),%esi
  mov    -0x64(%rbp),%edi
  call   <generate@plt>
  jmp    L172
  xchg   %ax,%ax
L206:
  lea    D32(%rip),%rdi
  call   <puts@plt>
  jmp    L172
  xchg   %ax,%ax
L201:
  lea    D37(%rip),%rdi
  call   <puts@plt>
  jmp    L172
  nopl   0x0(%rax)
L180:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L178
  nopl   0x0(%rax,%rax,1)
L220:
  mov    -0x70(%rbp),%rdx
  mov    %r12d,%esi
  mov    %eax,%edi
  call   <swap@plt>
  jmp    L228
L166:
  mov    -0x60(%rbp),%r8d
  mov    -0x5c(%rbp),%esi
  xor    %ecx,%ecx
  xor    %edx,%edx
  mov    -0x64(%rbp),%edi
  call   <generate@plt>
  jmp    L172
L66:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D6
data_type: string
name: retrieve_data
arguments: data_label: D18
data_type: string
name: retrieve_data
arguments: data_label: D32
data_type: string
name: retrieve_data
arguments: data_label: D37
data_type: string

tool: D6: %s %s %d

tool: D18: %d 

tool: D32: none

tool: D37: infinite

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);
  }
}
```