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     L201
L60:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L60
L201:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L220
L55:
  mov    -0x58(%rbp),%ecx
  mov    %rsp,-0x70(%rbp)
  test   %ecx,%ecx
  jle    L1
  movl   $0x0,-0x54(%rbp)
  xor    %ebx,%ebx
  lea    -0x4c(%rbp),%r15
  lea    -0x47(%rbp),%r14
  movl   $0xffffffff,-0x68(%rbp)
  lea    -0x42(%rbp),%r13
  lea    D17(%rip),%r12
  movl   $0xffffffff,-0x60(%rbp)
  movl   $0x0,-0x64(%rbp)
  movl   $0xc351,-0x5c(%rbp)
  jmp    L64
  nopw   0x0(%rax,%rax,1)
L205:
  mov    -0x4c(%rbp),%edx
  cmp    $0x67,%al
  je     L238
  cmp    -0x60(%rbp),%edx
  jle    L97
  mov    -0x54(%rbp),%eax
  mov    %edx,-0x60(%rbp)
  mov    %eax,-0x68(%rbp)
L97:
  movslq -0x54(%rbp),%rax
  mov    -0x70(%rbp),%rdi
  mov    %edx,(%rdi,%rax,4)
  lea    0x1(%rax),%eax
  mov    %eax,-0x54(%rbp)
L56:
  add    $0x1,%ebx
  cmp    %ebx,-0x58(%rbp)
  je     L210
L64:
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  movzbl -0x42(%rbp),%eax
  cmp    $0x6c,%al
  jne    L205
  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    L64
L210:
  mov    -0x5c(%rbp),%eax
  cmp    $0xc351,%eax
  je     L1
  mov    -0x64(%rbp),%ebx
  lea    0x1(%rbx),%r12d
  cmp    %eax,%r12d
  jge    L138
  mov    -0x54(%rbp),%edx
  test   %edx,%edx
  jne    L123
  mov    %eax,%r13d
  lea    D24(%rip),%rbx
L35:
  mov    %r12d,%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%r12d
  call   <printf@plt>
  cmp    %r12d,%r13d
  jne    L35
  mov    $0xa,%edi
  call   <putchar@plt>
L174:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L104
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L238:
  mov    -0x64(%rbp),%eax
  cmp    %edx,%eax
  cmovge %eax,%edx
  mov    %edx,-0x64(%rbp)
  jmp    L56
  nopl   0x0(%rax,%rax,1)
L123:
  cmpl   $0x1,-0x54(%rbp)
  je     L236
  mov    -0x54(%rbp),%r12d
  mov    -0x68(%rbp),%eax
  sub    $0x1,%r12d
  cmp    %r12d,%eax
  jne    L14
L92:
  mov    -0x60(%rbp),%r8d
  mov    -0x70(%rbp),%rdx
  mov    %r12d,%ecx
  mov    -0x5c(%rbp),%esi
  mov    -0x64(%rbp),%edi
  call   <generate@plt>
  jmp    L174
  xchg   %ax,%ax
L138:
  lea    D8(%rip),%rdi
  call   <puts@plt>
  jmp    L174
  xchg   %ax,%ax
L1:
  lea    D23(%rip),%rdi
  call   <puts@plt>
  jmp    L174
  nopl   0x0(%rax)
L220:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L55
  nopl   0x0(%rax,%rax,1)
L14:
  mov    -0x70(%rbp),%rdx
  mov    %r12d,%esi
  mov    %eax,%edi
  call   <swap@plt>
  jmp    L92
L236:
  mov    -0x60(%rbp),%r8d
  mov    %eax,%esi
  mov    %ebx,%edi
  xor    %ecx,%ecx
  xor    %edx,%edx
  call   <generate@plt>
  jmp    L174
L104:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D17
type: string
name: retrieve_data
arguments: data_tag: D24
type: string
name: retrieve_data
arguments: data_tag: D8
type: string
name: retrieve_data
arguments: data_tag: D23
type: string

tool: D17: %s %s %d

tool: D24: %d 

tool: D8: none

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