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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rsi
  lea    D57(%rip),%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%eax
  sub    $0x1,%eax
  mov    $0x1,%ebx
  lea    D9(%rip),%rbp
  lea    D88(%rip),%r12
  lea    D20(%rip),%r13
  lea    D85(%rip),%r14
  cmp    $0x63,%eax
  jbe    L116
  lea    D29(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L10
L115:
  lea    D52(%rip),%rdi
  call   <puts@plt>
  jmp    L112
L0:
  lea    D11(%rip),%rdi
  call   <puts@plt>
  jmp    L112
L119:
  lea    D42(%rip),%rdi
  call   <puts@plt>
L112:
  lea    0x1(%rbx),%eax
  cmp    %ebx,0x8(%rsp)
  jle    L12
  mov    %eax,%ebx
L116:
  lea    0x14(%rsp),%rcx
  lea    0x10(%rsp),%rdx
  lea    0xc(%rsp),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0xc(%rsp),%edi
  lea    -0x1(%rdi),%eax
  cmp    $0x3e7,%eax
  ja     L115
  mov    0x10(%rsp),%esi
  lea    -0x1(%rsi),%eax
  cmp    $0x3e7,%eax
  ja     L0
  mov    0x14(%rsp),%edx
  lea    -0x1(%rdx),%eax
  cmp    $0x3e7,%eax
  ja     L119
  call   <solve@plt>
  mov    %eax,%r15d
  mov    %ebx,%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %r15d,%r15d
  js     L25
  mov    %r15d,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L112
L25:
  mov    %r14,%rdi
  call   <puts@plt>
  jmp    L112
L12:
  mov    $0x0,%eax
L10:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L113
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L113:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D57
data_type: string
name: disassemble_data
arguments: tag: D9
data_type: string
name: disassemble_data
arguments: tag: D88
data_type: string
name: disassemble_data
arguments: tag: D20
data_type: string
name: disassemble_data
arguments: tag: D85
data_type: string
name: disassemble_data
arguments: tag: D29
data_type: string
name: disassemble_data
arguments: tag: D52
data_type: string
name: disassemble_data
arguments: tag: D11
data_type: string
name: disassemble_data
arguments: tag: D42
data_type: string

tool: D57: %d

tool: D9: %d %d %d

tool: D88: Case #%d: 

tool: D20: %d


tool: D85: ERROR

tool: D29: Illegal number of tests (1 <= T <= 100)

tool: D52: 1 <= a <= 1000

tool: D11: 1 <= b <= 1000

tool: D42: 1 <= k <= 1000

assistant: ```c
int main(int argc, char **argv) {
  int num_tests, test = 0, ret = 1;
  int round;
  unsigned int a, b, k;
  scanf("%d", &num_tests);
  if (num_tests < 1 || num_tests > 100) {
    printf("Illegal number of tests (1 <= T <= 100)\n");
    goto out;
  }
  while (test++ < num_tests) {
    scanf("%d %d %d", &a, &b, &k);
    if (a < 1 || a > 1000) {
      printf("1 <= a <= 1000\n");
      continue;
    }
    if (b < 1 || b > 1000) {
      printf("1 <= b <= 1000\n");
      continue;
    }
    if (k < 1 || k > 1000) {
      printf("1 <= k <= 1000\n");
      continue;
    }
    round = solve(a, b, k);
    printf("Case #%d: ", test);
    if (round < 0)
      printf("ERROR\n");
    else
      printf("%d\n", round);
  }
  ret = 0;
out:
  return ret;
}
```