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

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x730,%rsp
  lea    D18(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x2728(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rsi
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L2
  lea    0x10(%rsp),%r13
  xor    %r14d,%r14d
  lea    D20(%rip),%r12
  mov    %r13,%rbp
  nopl   0x0(%rax)
L16:
  xor    %ebx,%ebx
  nopw   0x0(%rax,%rax,1)
L5:
  lea    (%rbx,%rbp,1),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  cmp    %ebx,%eax
  jg     L5
  add    $0x1,%r14d
  cmp    %r14d,%eax
  jle    L56
  add    $0x64,%rbp
  jmp    L16
L2:
  xor    %esi,%esi
  nopl   0x0(%rax,%rax,1)
L83:
  lea    D2(%rip),%rdi
  call   <printf@plt>
  mov    0x2728(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L136
  add    $0x2730,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L136:
  call   <__stack_chk_fail@plt>
L56:
  test   %eax,%eax
  jle    L2
  sub    $0x1,%eax
  lea    0x74(%rsp),%r8
  xor    %esi,%esi
  xor    %r9d,%r9d
  mov    %rax,%rdi
  lea    0x1(%r13,%rax,1),%r10
  shr    %eax
  lea    (%rax,%rax,4),%rax
  movslq %edi,%rdi
  lea    (%rax,%rax,4),%rax
  lea    0x12c(%r13,%rax,8),%r11
  xor    %eax,%eax
  xchg   %ax,%ax
L122:
  lea    -0x64(%r8),%rdx
  jmp    L118
  cs nopw 0x0(%rax,%rax,1)
L148:
  cmp    $0x41,%cl
  cmove  %r9d,%eax
  cmp    %eax,%esi
  cmovl  %eax,%esi
  add    $0x1,%rdx
  cmp    %r10,%rdx
  je     L78
L118:
  movzbl (%rdx),%ecx
  cmp    $0x6f,%cl
  jne    L148
  add    $0x1,%eax
  cmp    %eax,%esi
  cmovl  %eax,%esi
  add    $0x1,%rdx
  cmp    %r10,%rdx
  jne    L118
L78:
  mov    %rdi,%rdx
  jmp    L74
  nopl   0x0(%rax,%rax,1)
L132:
  cmp    $0x41,%cl
  cmove  %r9d,%eax
  cmp    %eax,%esi
  cmovl  %eax,%esi
  sub    $0x1,%rdx
  cmp    $0xffffffff,%edx
  je     L43
L74:
  movzbl (%r8,%rdx,1),%ecx
  cmp    $0x6f,%cl
  jne    L132
  add    $0x1,%eax
  cmp    %eax,%esi
  cmovl  %eax,%esi
  sub    $0x1,%rdx
  cmp    $0xffffffff,%edx
  jne    L74
L43:
  add    $0xc8,%r8
  add    $0xc8,%r10
  cmp    %r11,%r8
  jne    L122
  jmp    L83
```

tool_calls: name: read_data
arguments: tag: D18
type: string
name: read_data
arguments: tag: D20
type: string
name: read_data
arguments: tag: D2
type: string

tool: D18:  %d

tool: D20:  %c

tool: D2: %d


assistant: ```c
int main(int argc, char const *argv[]) {
  int size, i, j, maior = 0;
  char arr[100][100];
  int value = 0;
  char buff;
  scanf(" %d", &size);
  for (i = 0; i < size; ++i) {
    for (j = 0; j < size; ++j) {
      scanf(" %c", &arr[i][j]);
    }
  }
  for (i = 0; i < size; i++) {
    for (j = 0; j < size; ++j) {
      if (arr[i][j] == 'o')
        value++;
      else if (arr[i][j] == 'A')
        value = 0;
      if (value > maior)
        maior = value;
    }
    i++;
    for (j = size - 1; j >= 0; --j) {
      if (arr[i][j] == 'o')
        value++;
      else if (arr[i][j] == 'A')
        value = 0;
      if (value > maior)
        maior = value;
    }
  }
  printf("%d\n", maior);
  return 0;
}
```