user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  lea    D17(%rip),%r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    D27(%rip),%rbx
  sub    $0x3a0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x398(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%r12
  nopl   0x0(%rax)
L182:
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    0xc(%rsp),%ebp
  test   %ebp,%ebp
  je     L182
  cmp    $0xf,%ebp
  jg     L182
  test   $0x1,%bpl
  je     L182
  mov    %ebp,%r12d
  mov    %ebp,%ebx
  shr    $0x1f,%r12d
  imul   %ebp,%ebx
  add    %ebp,%r12d
  sar    %r12d
  add    $0x1,%r12d
  test   %ebp,%ebp
  jle    L176
  lea    -0x1(%rbp),%edx
  mov    %ebp,%r13d
  lea    0x50(%rsp),%rcx
  mov    %rdx,%rax
  shl    $0x2,%r13
  shl    $0x4,%rax
  sub    %rdx,%rax
  lea    0x8c(%rsp,%rax,4),%r14
  nopw   0x0(%rax,%rax,1)
L128:
  mov    %rcx,%rdi
  mov    %r13,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    %rax,%rcx
  add    $0x3c,%rcx
  cmp    %r14,%rcx
  jne    L128
  movslq %r12d,%rax
  lea    0x1(%rbp),%edi
  movl   $0x1,0x4c(%rsp,%rax,4)
  cmp    $0x1,%ebx
  je     L54
L58:
  mov    $0x2,%esi
  mov    $0x1,%r8d
  jmp    L93
  nopl   0x0(%rax)
L131:
  mov    %esi,0x10(%rsp,%rax,4)
  add    $0x1,%esi
  mov    %edx,%r12d
  mov    %ecx,%edi
  cmp    %ebx,%esi
  jg     L10
L93:
  lea    -0x1(%rdi),%ecx
  lea    0x1(%r12),%edx
  test   %ecx,%ecx
  jle    L143
  cmp    %ebp,%edx
  cmovg  %r8d,%edx
L134:
  movslq %ecx,%r9
  movslq %edx,%rdi
  mov    %r9,%rax
  shl    $0x4,%rax
  sub    %r9,%rax
  add    %rdi,%rax
  mov    0x10(%rsp,%rax,4),%edi
  test   %edi,%edi
  je     L131
  lea    0x2(%rcx),%edi
  lea    -0x1(%rdx),%r12d
  movslq %edi,%rdx
  movslq %r12d,%rcx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rcx,%rax
  mov    %esi,0x10(%rsp,%rax,4)
  add    $0x1,%esi
  cmp    %ebx,%esi
  jle    L93
L10:
  test   %ebp,%ebp
  jle    L116
L54:
  lea    0x4c(%rsp),%r12
  mov    $0x1,%r14d
  lea    D28(%rip),%r13
  nopl   0x0(%rax)
L43:
  mov    $0x1,%ebx
  test   %ebp,%ebp
  jle    L151
  nopl   0x0(%rax)
L127:
  mov    (%r12,%rbx,4),%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %ebx,0xc(%rsp)
  jge    L127
L151:
  mov    $0xa,%edi
  add    $0x1,%r14d
  add    $0x3c,%r12
  call   <putchar@plt>
  mov    0xc(%rsp),%ebp
  cmp    %r14d,%ebp
  jge    L43
L116:
  mov    0x398(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  add    $0x3a0,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L143:
  mov    %ebp,%ecx
  cmp    %ebp,%edx
  jle    L134
  lea    0x1(%rdi),%ecx
  mov    %r12d,%edx
  jmp    L134
L176:
  movslq %r12d,%rax
  mov    $0x1,%edi
  movl   $0x1,0x4c(%rsp,%rax,4)
  cmp    $0x1,%ebx
  jne    L58
  jmp    L116
L15:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D17
data_type: string
name: extract_symbolic_data
arguments: data_tag: D27
data_type: string
name: extract_symbolic_data
arguments: data_tag: D28
data_type: string

tool: D17: enter n(n=1~15):

tool: D27: %d

tool: D28: %5d

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