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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  lea    D19(%rip),%r15
  push   %r14
  lea    -0x44(%rbp),%rsi
  mov    %r15,%rdi
  push   %r13
  push   %r12
  push   %rbx
  lea    -0x40(%rbp),%rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <scanf@plt>
  mov    -0x44(%rbp),%eax
  mov    %rbx,-0x78(%rbp)
  lea    -0x3c(%rbp),%rbx
  mov    %rbx,-0x80(%rbp)
  lea    -0x1(%rax),%edx
  mov    %edx,-0x44(%rbp)
  test   %eax,%eax
  je     L96
L149:
  mov    -0x78(%rbp),%rsi
  mov    %r15,%rdi
  mov    %rsp,-0x70(%rbp)
  call   <scanf@plt>
  mov    -0x40(%rbp),%eax
  mov    %rsp,%rsi
  add    $0x1,%eax
  movslq %eax,%rdx
  lea    0x0(,%rdx,4),%r14
  imul   %rdx,%rdx
  lea    0xf(,%rdx,4),%rcx
  mov    %rcx,%rdx
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rsi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rsi,%rsp
  je     L239
L6:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L6
L239:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L206
  orq    $0x0,-0x8(%rsp,%rdx,1)
L206:
  imul   %eax,%eax
  mov    %rsp,%rbx
  xor    %esi,%esi
  mov    %rbx,%rdi
  lea    0x0(,%rax,4),%edx
  call   <memset@plt>
  mov    -0x40(%rbp),%r13d
  test   %r13d,%r13d
  jle    L142
  mov    %r14,%rax
  mov    %r14,-0x68(%rbp)
  xor    %r13d,%r13d
  xor    %r12d,%r12d
  shr    $0x2,%rax
  mov    %rbx,-0x58(%rbp)
  mov    %rax,-0x60(%rbp)
L248:
  mov    -0x58(%rbp),%rax
  xor    %r14d,%r14d
  lea    (%rax,%r13,4),%rbx
  nopl   0x0(%rax,%rax,1)
L8:
  mov    %rbx,%rsi
  mov    %r15,%rdi
  add    $0x1,%r14d
  add    $0x4,%rbx
  call   <scanf@plt>
  mov    -0x40(%rbp),%eax
  cmp    %r14d,%eax
  jg     L8
  add    $0x1,%r12d
  add    -0x60(%rbp),%r13
  cmp    %r12d,%eax
  jle    L179
  test   %eax,%eax
  jg     L248
L179:
  mov    -0x68(%rbp),%r14
  mov    -0x58(%rbp),%rbx
L142:
  mov    -0x80(%rbp),%rsi
  mov    %r15,%rdi
  call   <scanf@plt>
  mov    -0x40(%rbp),%esi
  mov    $0x1,%r10d
  lea    -0x1(%rsi),%eax
  imul   %esi,%eax
  add    $0x1,%eax
  cmp    $0x2,%eax
  jbe    L131
  movslq %r10d,%rcx
  mov    %r10d,%r8d
  cmp    %esi,%r10d
  jg     L232
L34:
  movslq %esi,%rax
  mov    %rsp,%rdi
  mov    %rsp,%r11
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rdi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rdi,%rsp
  je     L246
L76:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdi,%rsp
  jne    L76
L246:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L80
  orq    $0x0,-0x8(%rsp,%rdx,1)
L80:
  lea    -0x1(%rsi),%r9d
  lea    0x3(%rsp),%rdi
  imul   %esi,%r9d
  mov    %rdi,%rax
  and    $0xfffffffffffffffc,%rdi
  shr    $0x2,%rax
  mov    %ecx,0x0(,%rax,4)
  sar    %r9d
  je     L65
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L229:
  imul   %r14,%rcx
  sub    $0x1,%r9d
  sub    $0x1,%edx
  mov    %r10,%rax
  add    %rbx,%rcx
  nopl   0x0(%rax)
L152:
  mov    (%rcx,%rax,4),%r12d
  test   %r12d,%r12d
  je     L28
  cmp    %eax,%r8d
  je     L65
  add    $0x1,%edx
  movslq %edx,%r12
  mov    %eax,(%rdi,%r12,4)
L28:
  add    $0x1,%rax
  cmp    %eax,%esi
  jge    L152
  test   %edx,%edx
  js     L77
  test   %r9d,%r9d
  je     L77
  movslq %edx,%rax
  movslq (%rdi,%rax,4),%rcx
  jmp    L229
L77:
  add    $0x1,%r10
  mov    %r11,%rsp
  test   %r9d,%r9d
  je     L131
  mov    -0x40(%rbp),%esi
  movslq %r10d,%rcx
  mov    %r10d,%r8d
  cmp    %esi,%r10d
  jle    L34
L232:
  lea    D29(%rip),%rdi
  call   <printf@plt>
  jmp    L237
  xchg   %ax,%ax
L65:
  mov    %r11,%rsp
L131:
  lea    D6(%rip),%rdi
  call   <printf@plt>
L237:
  mov    -0x44(%rbp),%eax
  mov    -0x70(%rbp),%rsp
  lea    -0x1(%rax),%edx
  mov    %edx,-0x44(%rbp)
  test   %eax,%eax
  jne    L149
L96:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L207
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L207:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D19
data_type: string
name: parse_data
arguments: tag: D29
data_type: string
name: parse_data
arguments: tag: D6
data_type: string

tool: D19: %d

tool: D29: No


tool: D6: Yes


assistant: ```c
int main() {
  int cases;
  scanf("%d", &cases);
  while (cases--) {
    int nodes;
    scanf("%d", &nodes);
    int Map[nodes + 1][nodes + 1];
    memset(Map, 0, sizeof(Map));
    for (int x = 0; x < nodes; x++) {
      for (int y = 0; y < nodes; y++) {
        scanf("%d", &Map[x][y]);
      }
    }
    int ignore;
    scanf("%d", &ignore);
    int no = 1;
    int cnt = nodes * (nodes - 1) / 2;
    for (int x = 1; cnt && no && x <= nodes; x++) {
      int stack[nodes], sidx = 0;
      stack[0] = x;
      cnt = nodes * (nodes - 1) / 2;
      while (sidx >= 0 && cnt && no) {
        --cnt;
        int curnode = stack[sidx];
        --sidx;
        for (int y = x; no && y <= nodes; y++) {
          if (Map[curnode][y]) {
            if (y == x) {
              no = 0;
              break;
            }
            stack[++sidx] = y;
          }
        }
      }
    }
    if (no && cnt)
      printf("No\n");
    else
      printf("Yes\n");
  }
  return 0;
}
```