user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x50(%rbp)
  movq   $0x0,-0x60(%rbp)
  movq   $0x0,-0x58(%rbp)
  lea    -0x80(%rbp),%rax
  mov    %rax,%rsi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movq   $0x0,-0x70(%rbp)
  jmp    L45
L87:
  mov    %rsp,%rax
  mov    %rax,%rbx
  lea    -0x78(%rbp),%rax
  mov    %rax,%rsi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x78(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x48(%rbp)
  mov    %rax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  mov    %rax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%ecx
  mov    $0x0,%edx
  div    %rcx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L122:
  cmp    %rdx,%rsp
  je     L55
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L122
L55:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L76
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L76:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x40(%rbp)
  movq   $0x0,-0x68(%rbp)
  jmp    L8
L33:
  mov    -0x68(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addq   $0x1,-0x68(%rbp)
L8:
  mov    -0x78(%rbp),%rax
  cmp    %rax,-0x68(%rbp)
  jl     L33
  mov    -0x40(%rbp),%rax
  mov    0x8(%rax),%rdx
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <gcd@plt>
  mov    %rax,-0x58(%rbp)
  movq   $0x0,-0x68(%rbp)
  jmp    L138
L16:
  cmpq   $0x1,-0x58(%rbp)
  jne    L127
  movq   $0x1,-0x60(%rbp)
  jmp    L22
L127:
  mov    -0x40(%rbp),%rax
  mov    -0x68(%rbp),%rdx
  mov    (%rax,%rdx,8),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <gcd@plt>
  mov    %rax,-0x58(%rbp)
  addq   $0x1,-0x68(%rbp)
L138:
  mov    -0x78(%rbp),%rax
  sub    $0x1,%rax
  cmp    %rax,-0x68(%rbp)
  jl     L16
L22:
  cmpq   $0x1,-0x60(%rbp)
  jne    L97
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L32
L97:
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L32:
  movq   $0x0,-0x60(%rbp)
  movq   $0x1,-0x58(%rbp)
  mov    %rbx,%rsp
  addq   $0x1,-0x70(%rbp)
L45:
  mov    -0x80(%rbp),%rax
  cmp    %rax,-0x70(%rbp)
  jl     L87
  mov    $0x0,%eax
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L114
  call   <__stack_chk_fail@plt>
L114:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: label: D25
type_infered: string
name: unpack_data
arguments: label: D28
type_infered: string
name: unpack_data
arguments: label: D2
type_infered: string

tool: D25: %ld

tool: D28: YES


tool: D2: NO


assistant: ```c
int main() {
  long int t, i, j, k, n, count = 0, flag = 0, ss = 0;
  ;
  scanf("%ld", &t);
  for (i = 0; i < t; i++) {
    scanf("%ld", &n);
    long int a[n];
    for (j = 0; j < n; j++) {
      scanf("%ld", &a[j]);
    }
    ss = gcd(a[0], a[1]);
    for (j = 0; j < n - 1; j++) {
      if (ss == 1) {
        flag = 1;
        break;
      }
      ss = gcd(ss, a[j]);
    }
    if (flag == 1)
      printf("YES\n");
    else
      printf("NO\n");
    flag = 0;
    ss = 1;
  }
  return 0;
}
```