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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  mov    $0x1,%ebx
  lea    D8(%rip),%r12
  jmp    L289
L172:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L132
L300:
  mov    $0x20,%edi
  call   <putchar@plt>
  mov    0x0(%rbp),%esi
  mov    %r12,%rdi
  call   <printf@plt>
  cmp    $0x5,%ebx
  jg     L245
L106:
  add    $0x1,%ebx
  add    $0x4,%rbp
L184:
  cmp    $0x1,%ebx
  jne    L300
  mov    0x0(%rbp),%esi
  mov    %r12,%rdi
  call   <printf@plt>
  jmp    L106
L245:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x3c(%rsp),%eax
  add    $0x1,%r13
  cmp    %r13d,%eax
  jle    L120
L294:
  mov    0x60(%rsp,%r13,4),%eax
  mov    %eax,0x54(%rsp)
  lea    0x40(%rsp),%rbp
  mov    $0x1,%ebx
  jmp    L184
L120:
  add    $0x1,%r14
  lea    -0x1(%r14),%edx
  cmp    %edx,%eax
  jle    L137
L240:
  mov    0x5c(%rsp,%r14,4),%eax
  mov    %eax,0x50(%rsp)
  cmp    %r14d,0x3c(%rsp)
  jle    L137
  mov    %r14,%r13
  jmp    L294
L137:
  add    $0x1,%r15
  mov    0x8(%rsp),%eax
  cmp    %eax,0x3c(%rsp)
  jle    L37
L27:
  mov    0x58(%rsp,%r15,4),%eax
  mov    %eax,0x4c(%rsp)
  addl   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%eax
  cmp    0x3c(%rsp),%eax
  jge    L37
  mov    %r15,%r14
  jmp    L240
L37:
  addq   $0x1,0x18(%rsp)
  mov    0x14(%rsp),%eax
  cmp    %eax,0x3c(%rsp)
  jle    L288
L160:
  mov    0x18(%rsp),%r15
  mov    0x54(%rsp,%r15,4),%eax
  mov    %eax,0x48(%rsp)
  addl   $0x1,0x14(%rsp)
  mov    0x14(%rsp),%eax
  cmp    0x3c(%rsp),%eax
  jge    L288
  mov    %eax,0x8(%rsp)
  jmp    L27
L288:
  addq   $0x1,0x20(%rsp)
  mov    0x10(%rsp),%eax
  cmp    %eax,0x3c(%rsp)
  jle    L213
L158:
  mov    0x20(%rsp),%rcx
  mov    0x50(%rsp,%rcx,4),%eax
  mov    %eax,0x44(%rsp)
  addl   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%eax
  cmp    0x3c(%rsp),%eax
  jge    L213
  mov    %rcx,0x18(%rsp)
  mov    %eax,0x14(%rsp)
  jmp    L160
L213:
  addq   $0x1,0x28(%rsp)
  mov    0xc(%rsp),%eax
  cmp    %eax,0x3c(%rsp)
  jle    L196
L233:
  mov    0x28(%rsp),%rcx
  mov    0x4c(%rsp,%rcx,4),%eax
  mov    %eax,0x40(%rsp)
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  cmp    0x3c(%rsp),%eax
  jge    L196
  mov    %rcx,0x20(%rsp)
  mov    %eax,0x10(%rsp)
  jmp    L158
L285:
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  mov    $0x0,%eax
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L121:
  test   %ebx,%ebx
  je     L172
L196:
  mov    $0x0,%ebx
L289:
  lea    0x3c(%rsp),%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  test   %rax,%rax
  je     L285
  mov    0x3c(%rsp),%eax
  test   %eax,%eax
  je     L285
  lea    0x60(%rsp),%r13
  mov    $0x0,%ebp
  jle    L121
L280:
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  add    $0x1,%ebp
  add    $0x4,%r13
  cmp    %ebp,0x3c(%rsp)
  jg     L280
  test   %ebx,%ebx
  je     L172
L132:
  cmpl   $0x0,0x3c(%rsp)
  jle    L196
  movq   $0x5,0x28(%rsp)
  movl   $0x0,0xc(%rsp)
  jmp    L233
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D8
data_type: string

tool: D8: %d

assistant: ```c
int main() {
  int i, n, arr[14], res[7], j, k, l, m, o, x, per = 1;
  while (scanf("%d", &n) && n) {
    for (i = 0; i < n; i++)
      scanf("%d", &arr[i]);
    if (per)
      per = 0;
    else
      putchar('\n');
    for (i = 0; i < n; i++) {
      res[0] = arr[i];
      for (j = i + 1; j < n; j++) {
        res[1] = arr[j];
        for (k = j + 1; k < n; k++) {
          res[2] = arr[k];
          for (l = k + 1; l < n; l++) {
            res[3] = arr[l];
            for (m = l + 1; m < n; m++) {
              res[4] = arr[m];
              for (o = m + 1; o < n; o++) {
                res[5] = arr[o];
                for (x = 0; x < 6; x++) {
                  if (x)
                    putchar(' ');
                  printf("%d", res[x]);
                }
                putchar('\n');
              }
            }
          }
        }
      }
    }
  }
  return 0;
}
```