user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  lea    D12(%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    L72
  xchg   %ax,%ax
L79:
  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    L96
  mov    %r12,%r15
  xor    %r14d,%r14d
  nopl   0x0(%rax)
L128:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  add    $0x1,%r14d
  add    $0x4,%r15
  call   <scanf@plt>
  mov    0x14(%rsp),%edx
  cmp    %r14d,%edx
  jg     L128
  test   %edx,%edx
  jle    L96
  mov    %rbp,%r14
  xor    %r15d,%r15d
  nopw   0x0(%rax,%rax,1)
L91:
  mov    %r14,%rsi
  mov    %rbx,%rdi
  add    $0x1,%r15d
  add    $0x4,%r14
  call   <scanf@plt>
  mov    0x14(%rsp),%edx
  cmp    %r15d,%edx
  jg     L91
  test   %edx,%edx
  jle    L96
  mov    %r12,%r10
  mov    %rbp,%rcx
  mov    $0xffffffff,%edi
  xor    %r8d,%r8d
  sub    %rbp,%r10
  jmp    L29
  nop
L148:
  cmp    %esi,%eax
  cmovl  %esi,%eax
  cmp    %edi,%eax
  jl     L131
  add    $0x1,%r8d
  mov    %eax,%edi
  add    $0x4,%rcx
  cmp    %r8d,%edx
  je     L157
L29:
  mov    (%rcx),%eax
  mov    (%r10,%rcx,1),%esi
  cmp    %esi,%eax
  mov    %esi,%r9d
  cmovle %eax,%r9d
  cmp    %edi,%r9d
  jl     L148
  add    $0x1,%r8d
  mov    %r9d,%edi
  add    $0x4,%rcx
  cmp    %r8d,%edx
  jne    L29
L157:
  lea    D10(%rip),%rdi
  call   <printf@plt>
  jmp    L156
  nopw   0x0(%rax,%rax,1)
L131:
  lea    D0(%rip),%rdi
  mov    %r8d,0xc(%rsp)
  call   <printf@plt>
  mov    0x14(%rsp),%edx
  mov    0xc(%rsp),%r8d
L83:
  cmp    %r8d,%edx
  je     L157
L156:
  mov    %r12,%rdi
  add    $0x1,%r13d
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  cmp    %r13d,0x10(%rsp)
  jg     L79
L72:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L97
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L96:
  xor    %r8d,%r8d
  jmp    L83
L97:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D12
datatype: string
name: extract_symbolic_data
arguments: data_label: D10
datatype: string
name: extract_symbolic_data
arguments: data_label: D0
datatype: string

tool: D12: %d

tool: D10: YES


tool: D0: 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;
}
```