user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  lea    D16(%rip),%rbx
  mov    %rbx,%rdi
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rsi
  call   <scanf@plt>
  lea    0x14(%rsp),%rax
  mov    %rax,(%rsp)
  mov    0x10(%rsp),%eax
  test   %eax,%eax
  jle    L76
  xchg   %ax,%ax
L81:
  mov    (%rsp),%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    0x14(%rsp),%eax
  lea    0x0(,%rax,4),%edi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    0x14(%rsp),%eax
  lea    0x0(,%rax,4),%edi
  call   <malloc@plt>
  mov    0x14(%rsp),%edx
  mov    %rax,%rbp
  test   %edx,%edx
  jle    L2
  mov    %r12,%r15
  xor    %r14d,%r14d
  nopl   0x0(%rax)
L159:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  add    $0x1,%r14d
  add    $0x4,%r15
  call   <scanf@plt>
  mov    0x14(%rsp),%edx
  cmp    %r14d,%edx
  jg     L159
  test   %edx,%edx
  jle    L2
  mov    %rbp,%r14
  xor    %r15d,%r15d
  nopw   0x0(%rax,%rax,1)
L4:
  mov    %r14,%rsi
  mov    %rbx,%rdi
  add    $0x1,%r15d
  add    $0x4,%r14
  call   <scanf@plt>
  mov    0x14(%rsp),%edx
  cmp    %r15d,%edx
  jg     L4
  test   %edx,%edx
  jle    L2
  mov    %r12,%r10
  mov    %rbp,%rcx
  mov    $0xffffffff,%edi
  xor    %r8d,%r8d
  sub    %rbp,%r10
  jmp    L39
  nop
L85:
  cmp    %esi,%eax
  cmovl  %esi,%eax
  cmp    %edi,%eax
  jl     L65
  add    $0x1,%r8d
  mov    %eax,%edi
  add    $0x4,%rcx
  cmp    %r8d,%edx
  je     L60
L39:
  mov    (%rcx),%eax
  mov    (%r10,%rcx,1),%esi
  cmp    %esi,%eax
  mov    %esi,%r9d
  cmovle %eax,%r9d
  cmp    %edi,%r9d
  jl     L85
  add    $0x1,%r8d
  mov    %r9d,%edi
  add    $0x4,%rcx
  cmp    %r8d,%edx
  jne    L39
L60:
  lea    D12(%rip),%rdi
  add    $0x1,%r13d
  call   <printf@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  cmp    0x10(%rsp),%r13d
  jl     L81
  nopl   0x0(%rax,%rax,1)
L76:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L65:
  lea    D17(%rip),%rdi
  mov    %r8d,0xc(%rsp)
  call   <printf@plt>
  mov    0x14(%rsp),%edx
  mov    0xc(%rsp),%r8d
L116:
  cmp    %edx,%r8d
  je     L60
  mov    %r12,%rdi
  add    $0x1,%r13d
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  cmp    %r13d,0x10(%rsp)
  jg     L81
  jmp    L76
L2:
  xor    %r8d,%r8d
  jmp    L116
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D16
data_type: string
name: extract_symbolic_data
arguments: data_label: D12
data_type: string
name: extract_symbolic_data
arguments: data_label: D17
data_type: string

tool: D16: %d

tool: D12: YES


tool: D17: NO


assistant: ```c
int main() {
  int i, j, T, N, A, B, min, max, last, *seqA, *seqB;
  scanf("%d", &T);
  for (i = 0; i < T; i++) {
    scanf("%d", &N);
    seqA = (int *)malloc(sizeof(int) * N);
    seqB = (int *)malloc(sizeof(int) * N);
    for (j = 0; j < N; j++)
      scanf("%d", &seqA[j]);
    for (j = 0; j < N; j++)
      scanf("%d", &seqB[j]);
    for (j = 0, last = -1; j < N; j++) {
      min = ((seqA[j]) < (seqB[j]) ? (seqA[j]) : (seqB[j]));
      max = ((seqA[j]) > (seqB[j]) ? (seqA[j]) : (seqB[j]));
      if (min >= last)
        last = min;
      else if (max >= last)
        last = max;
      else {
        printf("NO\n");
        break;
      }
    }
    if (j == N)
      printf("YES\n");
    free(seqA);
    free(seqB);
  }
  return 0;
}
```