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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0x48(%rbp)
  jmp    L44
L73:
  lea    -0x30(%rbp),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    $0x4,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x4c(%rbp),%rax
  mov    %rax,%rsi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x38(%rbp)
  movl   $0x0,-0x44(%rbp)
  jmp    L128
L39:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x44(%rbp)
L128:
  mov    -0x4c(%rbp),%eax
  cmp    %eax,-0x44(%rbp)
  jl     L39
  movl   $0x0,-0x40(%rbp)
  jmp    L23
L35:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x40(%rbp)
  je     L106
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x40(%rbp),%edx
  add    $0x1,%edx
  cmp    %edx,%eax
  je     L106
  cmpl   $0x0,-0x40(%rbp)
  jle    L146
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x40(%rbp),%edx
  sub    $0x1,%edx
  cmp    %edx,%eax
  jne    L146
L106:
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x40(%rbp)
  jne    L6
  lea    -0x30(%rbp),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    D54(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L6
L146:
  lea    -0x30(%rbp),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    D17(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L53
L6:
  addl   $0x1,-0x40(%rbp)
L23:
  mov    -0x4c(%rbp),%eax
  cmp    %eax,-0x40(%rbp)
  jl     L35
L53:
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  addl   $0x1,-0x48(%rbp)
L44:
  mov    -0x50(%rbp),%eax
  cmp    %eax,-0x48(%rbp)
  jl     L73
  movl   $0x0,-0x3c(%rbp)
  jmp    L149
L98:
  lea    -0x30(%rbp),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D48(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  addl   $0x1,-0x3c(%rbp)
L149:
  mov    -0x50(%rbp),%eax
  cmp    %eax,-0x3c(%rbp)
  jl     L98
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L50
  call   <__stack_chk_fail@plt>
L50:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D45
datatype: string
name: extract_symbolic_data
arguments: tag: D54
datatype: string
name: extract_symbolic_data
arguments: tag: D17
datatype: string
name: extract_symbolic_data
arguments: tag: D48
datatype: string

tool: D45: %d

tool: D54: Yes

tool: D17: No

tool: D48: %s


assistant: ```c
int main() {
  int q;
  scanf("%d", &q);
  char output[10][4];
  for (int a0 = 0; a0 < q; a0++) {
    memset(output[a0], 0, 4);
    int n;
    scanf("%d", &n);
    int *a = malloc(sizeof(int) * n);
    for (int a_i = 0; a_i < n; a_i++) {
      scanf("%d", &a[a_i]);
    }
    for (int a_i = 0; a_i < n; a_i++) {
      if (a[a_i] == a_i || (a[a_i] == (a_i + 1) || (0 <= (a_i - 1) && a[a_i] == (a_i - 1)))) {
        if (a_i == n - 1) {
          strcpy(output[a0], "Yes");
        }
      } else {
        strcpy(output[a0], "No");
        break;
      }
    }
    free(a);
  }
  for (int a0 = 0; a0 < q; a0++) {
    printf("%s\n", output[a0]);
  }
  return 0;
}
```