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

```asm
<main>:
  endbr64
  push   %r15
  lea    D25(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rsp,%rsi
  lea    D20(%rip),%rdi
  call   <scanf@plt>
  cmpb   $0x0,-0x1(%rsp)
  je     L79
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L241:
  movsbq %al,%rcx
  add    $0x1,%eax
  cmpb   $0x0,(%rsp,%rcx,1)
  jne    L241
  test   $0x1,%cl
  je     L8
  mov    %ecx,%r13d
  shr    $0x7,%r13b
  add    %ecx,%r13d
  sar    %r13b
  add    $0x1,%r13d
  test   %r13b,%r13b
  jle    L90
L147:
  movsbl %r13b,%r14d
  mov    $0x1,%ebp
  nopl   0x0(%rax)
L167:
  movsbl %bpl,%r12d
  mov    %r14d,%eax
  mov    $0x1,%r15d
  mov    $0x1,%edx
  sub    %r12d,%eax
  sub    $0x1,%r12d
  lea    0x1(%rax,%rax,1),%ebx
  test   %ebx,%ebx
  jg     L103
  jmp    L183
  nopl   0x0(%rax,%rax,1)
L94:
  cmp    $0x1,%r15b
  je     L202
  mov    $0x20,%edi
  add    $0x1,%r15d
  call   <putchar@plt>
  movsbl %r15b,%edx
  cmp    %ebx,%edx
  jg     L183
L103:
  lea    -0x1(%r15),%eax
  cmp    %edx,%ebx
  jne    L94
L202:
  movsbl %al,%eax
  add    $0x1,%r15d
  add    %r12d,%eax
  cltq
  movsbl (%rsp,%rax,1),%edi
  call   <putchar@plt>
  movsbl %r15b,%edx
  cmp    %ebx,%edx
  jle    L103
L183:
  mov    $0xa,%edi
  add    $0x1,%ebp
  call   <putchar@plt>
  cmp    %bpl,%r13b
  jl     L0
  mov    $0x1,%ebx
L9:
  mov    $0x20,%edi
  add    $0x1,%ebx
  call   <putchar@plt>
  cmp    %bpl,%bl
  jne    L9
  jmp    L167
  nopw   0x0(%rax,%rax,1)
L138:
  mov    $0xa,%edi
  sub    $0x1,%ebx
  add    $0x2,%ebp
  add    $0x2,%r12d
  call   <putchar@plt>
  mov    %r13d,%eax
  sub    %ebx,%eax
  cmp    %r13b,%al
  jle    L134
L90:
  xor    %eax,%eax
L218:
  mov    0x68(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L249
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L0:
  cmp    $0x1,%r13b
  jle    L90
  lea    -0x2(%r13),%ebx
  mov    $0x3,%r12d
  mov    $0x4,%ebp
  movsbl %bl,%ebx
L134:
  mov    $0x1,%r14d
  test   %ebx,%ebx
  jle    L153
  nopw   0x0(%rax,%rax,1)
L229:
  mov    $0x20,%edi
  add    $0x1,%r14d
  call   <putchar@plt>
  movsbl %r14b,%eax
  cmp    %ebx,%eax
  jle    L229
L153:
  mov    $0x1,%r14d
  mov    $0x1,%edx
  jmp    L71
  nopl   0x0(%rax,%rax,1)
L81:
  mov    $0x20,%edi
  call   <putchar@plt>
L236:
  add    $0x1,%r14d
  movsbl %r14b,%edx
  cmp    %edx,%ebp
  jle    L138
L71:
  lea    -0x1(%r14),%eax
  cmp    $0x1,%r14b
  je     L38
  cmp    %edx,%r12d
  jne    L81
L38:
  movsbl %al,%eax
  add    %ebx,%eax
  cltq
  movsbl (%rsp,%rax,1),%edi
  call   <putchar@plt>
  jmp    L236
L8:
  lea    D28(%rip),%rdi
  call   <puts@plt>
  jmp    L218
L79:
  mov    $0x1,%r13d
  jmp    L147
L249:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D25
type: string
name: disassemble_data
arguments: data_tag: D20
type: string
name: disassemble_data
arguments: data_tag: D28
type: string

tool: D25: Enter the string : 

tool: D20: %s

tool: D28: 

String length is even


assistant: ```c
int main(void) {
  char str[100], i, j, k, n;
  printf("Enter the string : ");
  scanf("%s", str);
  for (n = -1; str[n]; n++)
    ;
  if (n % 2 == 0) {
    printf("\n\nString length is even\n\n");
    return;
  }
  n = n / 2 + 1;
  for (i = 1; i <= n; i++) {
    k = 0;
    for (j = 1; j < i; j++)
      printf(" ");
    for (j = 1; j <= 2 * (n - i) + 1; j++) {
      if (j == 1 || j == 2 * (n - i) + 1)
        printf("%c", str[i - 1 + k]);
      else
        printf(" ");
      k++;
    }
    printf("\n");
  }
  for (i = 2; i <= n; i++) {
    k = 0;
    for (j = 1; j <= n - i; j++)
      printf(" ");
    for (j = 1; j <= 2 * i - 1; j++) {
      if (j == 1 || j == 2 * i - 1)
        printf("%c", str[n - i + k]);
      else
        printf(" ");
      k++;
    }
    printf("\n");
  }
}
```