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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x430,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x1,-0x414(%rbp)
  jmp    L178
L134:
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x424(%rbp),%rax
  mov    %rax,%rsi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x424(%rbp),%eax
  test   %eax,%eax
  jle    L178
  mov    -0x424(%rbp),%eax
  cmp    $0xf,%eax
  jg     L178
  mov    -0x424(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L178
  movl   $0x0,-0x414(%rbp)
L178:
  cmpl   $0x1,-0x414(%rbp)
  je     L134
  movl   $0x0,-0x420(%rbp)
  jmp    L23
L225:
  movl   $0x0,-0x41c(%rbp)
  jmp    L57
L59:
  mov    -0x41c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x420(%rbp),%eax
  cltq
  shl    $0x4,%rax
  add    %rdx,%rax
  movl   $0x0,-0x410(%rbp,%rax,4)
  addl   $0x1,-0x41c(%rbp)
L57:
  mov    -0x424(%rbp),%eax
  cmp    %eax,-0x41c(%rbp)
  jl     L59
  addl   $0x1,-0x420(%rbp)
L23:
  mov    -0x424(%rbp),%eax
  cmp    %eax,-0x420(%rbp)
  jl     L225
  mov    -0x424(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x41c(%rbp)
  mov    -0x41c(%rbp),%eax
  cltq
  movl   $0x1,-0x410(%rbp,%rax,4)
  movl   $0x1,-0x418(%rbp)
  jmp    L212
L104:
  subl   $0x1,-0x420(%rbp)
  addl   $0x1,-0x41c(%rbp)
  cmpl   $0x0,-0x420(%rbp)
  jns    L82
  mov    -0x424(%rbp),%eax
  cmp    %eax,-0x41c(%rbp)
  jl     L82
  addl   $0x2,-0x420(%rbp)
  subl   $0x1,-0x41c(%rbp)
  jmp    L44
L82:
  cmpl   $0x0,-0x420(%rbp)
  jns    L131
  mov    -0x424(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x420(%rbp)
L131:
  mov    -0x424(%rbp),%eax
  cmp    %eax,-0x41c(%rbp)
  jl     L44
  movl   $0x0,-0x41c(%rbp)
L44:
  mov    -0x41c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x420(%rbp),%eax
  cltq
  shl    $0x4,%rax
  add    %rdx,%rax
  mov    -0x410(%rbp,%rax,4),%eax
  test   %eax,%eax
  jne    L81
  mov    -0x41c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x420(%rbp),%eax
  cltq
  shl    $0x4,%rax
  add    %rax,%rdx
  mov    -0x418(%rbp),%eax
  mov    %eax,-0x410(%rbp,%rdx,4)
  jmp    L87
L81:
  addl   $0x2,-0x420(%rbp)
  subl   $0x1,-0x41c(%rbp)
  mov    -0x41c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x420(%rbp),%eax
  cltq
  shl    $0x4,%rax
  add    %rax,%rdx
  mov    -0x418(%rbp),%eax
  mov    %eax,-0x410(%rbp,%rdx,4)
L87:
  addl   $0x1,-0x418(%rbp)
L212:
  mov    -0x424(%rbp),%edx
  mov    -0x424(%rbp),%eax
  imul   %edx,%eax
  cmp    %eax,-0x418(%rbp)
  jl     L104
  movl   $0x0,-0x420(%rbp)
  jmp    L20
L86:
  movl   $0x0,-0x41c(%rbp)
  jmp    L109
L163:
  mov    -0x41c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x420(%rbp),%eax
  cltq
  shl    $0x4,%rax
  add    %rdx,%rax
  mov    -0x410(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x41c(%rbp)
L109:
  mov    -0x424(%rbp),%eax
  cmp    %eax,-0x41c(%rbp)
  jl     L163
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0x420(%rbp)
L20:
  mov    -0x424(%rbp),%eax
  cmp    %eax,-0x420(%rbp)
  jl     L86
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L13
  call   <__stack_chk_fail@plt>
L13:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D6
data_type: string
name: parse_data
arguments: data_label: D17
data_type: string
name: parse_data
arguments: data_label: D29
data_type: string

tool: D6: enter n(n=1 to 15):

tool: D17: %d

tool: D29: %4d

assistant: ```c
void main() {
  int a[16][16], i, j, k, n, p;
  p = 1;
  while (p == 1) {
    printf("enter n(n=1 to 15):");
    scanf("%d", &n);
    if ((n > 0) && (n < 16) && (n % 2 != 0))
      p = 0;
  }
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++)
      a[i][j] = 0;
  j = n / 2;
  a[0][j] = 1;
  for (k = 1; k < n * n; k++) {
    i = i - 1;
    j = j + 1;
    if ((i < 0) && (j > n - 1)) {
      i = i + 2;
      j = j - 1;
    } else {
      if (i < 0)
        i = n - 1;
      if (j > n - 1)
        j = 0;
    }
    if (a[i][j] == 0)
      a[i][j] = k;
    else {
      i = i + 2;
      j = j - 1;
      a[i][j] = k;
    }
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++)
      printf("%4d", a[i][j]);
    printf("\n");
  }
}
```