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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xfe0,%rsp
  mov    %edi,-0xfd4(%rbp)
  mov    %rsi,-0xfe0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0xfc8(%rbp)
  movl   $0x1,-0xfc0(%rbp)
  lea    -0xfd0(%rbp),%rax
  mov    %rax,%rsi
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0xfd0(%rbp),%eax
  test   %eax,%eax
  jle    L53
  mov    -0xfd0(%rbp),%eax
  cmp    $0x78,%eax
  jle    L8
L53:
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L40
L8:
  movl   $0x0,-0xfb8(%rbp)
  mov    -0xfb8(%rbp),%eax
  mov    %eax,-0xfbc(%rbp)
  jmp    L78
L1:
  lea    -0xfcc(%rbp),%rax
  mov    %rax,%rsi
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0xfcc(%rbp),%eax
  test   %eax,%eax
  jle    L51
  mov    -0xfcc(%rbp),%eax
  cmp    $0x3e8,%eax
  jle    L122
L51:
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L78
L122:
  movl   $0x0,-0xfc4(%rbp)
  jmp    L19
L69:
  lea    -0xfb0(%rbp),%rdx
  mov    -0xfc4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0xfc4(%rbp)
L19:
  mov    -0xfcc(%rbp),%eax
  cmp    %eax,-0xfc4(%rbp)
  jl     L69
  mov    -0xfcc(%rbp),%edx
  lea    -0xfb0(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <solve2@plt>
  mov    %eax,-0xfb4(%rbp)
  cmpl   $0x0,-0xfb4(%rbp)
  je     L49
  lea    D84(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  addl   $0x1,-0xfbc(%rbp)
  jmp    L78
L49:
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  addl   $0x1,-0xfb8(%rbp)
L78:
  mov    -0xfc8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xfc8(%rbp)
  mov    -0xfd0(%rbp),%edx
  cmp    %edx,%eax
  jl     L1
  mov    -0xfbc(%rbp),%eax
  mov    %eax,%esi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xfb8(%rbp),%eax
  mov    %eax,%esi
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0xfc0(%rbp)
L40:
  mov    -0xfc0(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L114
  call   <__stack_chk_fail@plt>
L114:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D28
type_infered: string
name: disassemble_data
arguments: data_label: D6
type_infered: string
name: disassemble_data
arguments: data_label: D0
type_infered: string
name: disassemble_data
arguments: data_label: D84
type_infered: string
name: disassemble_data
arguments: data_label: D31
type_infered: string
name: disassemble_data
arguments: data_label: D37
type_infered: string
name: disassemble_data
arguments: data_label: D12
type_infered: string

tool: D28: %d

tool: D6: Illegal number of tests (1 <= T <= 120)

tool: D0: Illegal sequence size (1 <= N <= 1000)

tool: D84: GOOD

tool: D31: BAD

tool: D37: GOOD: %d


tool: D12: BAD: %d


assistant: ```c
int main(int argc, char **argv) {
  int num_tests, test = 0;
  int n, i, good;
  int seq[1000];
  int ret = 1;
  int total_good, total_bad;
  scanf("%d", &num_tests);
  if (num_tests < 1 || num_tests > 120) {
    printf("Illegal number of tests (1 <= T <= 120)\n");
    goto out;
  }
  total_good = total_bad = 0;
  while (test++ < num_tests) {
    scanf("%d", &n);
    if (n < 1 || n > 1000) {
      printf("Illegal sequence size (1 <= N <= 1000)\n");
      continue;
    }
    for (i = 0; i < n; i++)
      scanf("%d", &seq[i]);
    good = solve2(seq, n);
    if (good) {
      printf("GOOD\n");
      total_good++;
    } else {
      printf("BAD\n");
      total_bad++;
    }
  }
  printf("GOOD: %d\n", total_good);
  printf("BAD: %d\n", total_bad);
  ret = 0;
out:
  return ret;
}
```