user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    D24(%rip),%rbx
  mov    %rbx,%rdi
  sub    $0xfd8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xfc8(%rsp)
  xor    %eax,%eax
  lea    0x18(%rsp),%rsi
  call   <scanf@plt>
  mov    0x18(%rsp),%eax
  sub    $0x1,%eax
  cmp    $0x77,%eax
  ja     L3
  movl   $0x0,0x8(%rsp)
  xor    %ebp,%ebp
  lea    0x1c(%rsp),%r13
  lea    0x20(%rsp),%r12
  movl   $0x0,0xc(%rsp)
  nopl   0x0(%rax,%rax,1)
L69:
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  sub    $0x1,%eax
  cmp    $0x3e7,%eax
  ja     L65
  mov    %r12,%r15
  xor    %r14d,%r14d
  nopl   0x0(%rax,%rax,1)
L16:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  add    $0x1,%r14d
  add    $0x4,%r15
  call   <scanf@plt>
  mov    0x1c(%rsp),%esi
  cmp    %r14d,%esi
  jg     L16
  mov    %r12,%rdi
  call   <solve2@plt>
  test   %eax,%eax
  je     L33
  lea    D69(%rip),%rdi
  call   <puts@plt>
  addl   $0x1,0xc(%rsp)
L17:
  add    $0x1,%ebp
  cmp    %ebp,0x18(%rsp)
  jg     L69
  mov    0xc(%rsp),%esi
  lea    D42(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%esi
  lea    D40(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
L21:
  mov    0xfc8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L52
  add    $0xfd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L65:
  lea    D48(%rip),%rdi
  call   <puts@plt>
  jmp    L17
  xchg   %ax,%ax
L33:
  lea    D64(%rip),%rdi
  call   <puts@plt>
  addl   $0x1,0x8(%rsp)
  jmp    L17
L3:
  lea    D43(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L21
L52:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D24
type_infered: string
name: parse_data
arguments: tag: D69
type_infered: string
name: parse_data
arguments: tag: D42
type_infered: string
name: parse_data
arguments: tag: D40
type_infered: string
name: parse_data
arguments: tag: D48
type_infered: string
name: parse_data
arguments: tag: D64
type_infered: string
name: parse_data
arguments: tag: D43
type_infered: string

tool: D24: %d

tool: D69: GOOD

tool: D42: GOOD: %d


tool: D40: BAD: %d


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

tool: D64: BAD

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

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