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
  lea    -0x9000(%rsp),%r11
L178:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L178
  sub    $0xdf8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x9de8(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rdi
  mov    $0x32,%ecx
  rep stos %rax,%es:(%rdi)
  lea    0x8(%rsp),%rdx
  lea    0xc(%rsp),%rsi
  lea    D22(%rip),%rdi
  call   <scanf@plt>
  mov    0xc(%rsp),%r8d
  mov    $0x0,%r14d
  mov    $0x0,%r13d
  lea    0x1a0(%rsp),%r15
  lea    D1(%rip),%r12
  test   %r8d,%r8d
  jg     L231
  jmp    L121
L193:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  add    $0x1,%ebx
  add    $0x4,%rbp
  cmp    %ebx,0x8(%rsp)
  jg     L193
L34:
  lea    D2(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  add    $0x1,%r13d
  mov    0xc(%rsp),%r8d
  add    $0x64,%r14
  cmp    %r13d,%r8d
  jle    L112
L231:
  lea    (%r15,%r14,4),%rbp
  mov    $0x0,%ebx
  cmpl   $0x0,0x8(%rsp)
  jg     L193
  jmp    L34
L112:
  test   %r8d,%r8d
  jg     L134
L121:
  mov    0x8(%rsp),%esi
  lea    0x1a0(%rsp),%rcx
  mov    $0x0,%edi
  jmp    L82
L134:
  mov    0x8(%rsp),%r10d
  lea    0x10(%rsp),%rsi
  lea    -0x1(%r10),%eax
  lea    0x1a4(%rsp,%rax,4),%rcx
  lea    -0x1(%r8),%edx
  lea    0x14(%rsp,%rdx,4),%r11
  not    %rax
  lea    0x0(,%rax,4),%r9
  jmp    L115
L48:
  add    $0x1,%edi
  add    $0x190,%rcx
  cmp    $0x63,%edi
  jg     L83
  cmp    %edi,%r8d
  jg     L83
L82:
  mov    $0x1,%eax
  test   %esi,%esi
  jg     L48
L234:
  movl   $0x0,-0x4(%rcx,%rax,4)
  mov    %eax,%edx
  add    $0x1,%rax
  cmp    $0x63,%edx
  jg     L48
  cmp    %esi,%edx
  jge    L234
  jmp    L48
L93:
  mov    %rsi,%rdi
  mov    (%rsi),%edx
  lea    (%r9,%rcx,1),%rax
L104:
  add    (%rax),%edx
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L104
  mov    %edx,(%rdi)
L216:
  add    $0x4,%rsi
  add    $0x190,%rcx
  cmp    %r11,%rsi
  je     L83
L115:
  test   %r10d,%r10d
  jg     L93
  jmp    L216
L83:
  mov    %r8d,%esi
  mov    0x1a0(%rsp),%edi
  call   <max_sum@plt>
  mov    %eax,%ebp
  cmpl   $0x0,0xc(%rsp)
  jle    L79
  mov    $0x0,%ebx
  lea    D1(%rip),%r12
  jmp    L30
L69:
  add    $0x1,%rbx
  cmp    %ebx,0xc(%rsp)
  jle    L79
L30:
  mov    %ebx,%esi
  cmp    %ebp,0x10(%rsp,%rbx,4)
  jne    L69
  mov    %r12,%rdi
  call   <printf@plt>
  jmp    L69
L79:
  mov    0x9de8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L195
  mov    $0x0,%eax
  add    $0x9df8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L195:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D22
datatype: string
name: disassemble_data
arguments: data_tag: D1
datatype: string
name: disassemble_data
arguments: data_tag: D2
datatype: string

tool: D22: %d %d


tool: D1: %d 

tool: D2: 


assistant: ```c
int main() {
  int m, n, rsum[100] = {0}, max, mat[100][100];
  scanf("%d %d\n", &n, &m);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      scanf("%d ", &mat[i][j]);
    }
    scanf("\n");
  }
  for (int i = 0; (i >= n) && (i < 100); i++) {
    for (int j = 0; (j >= m) && (j < 100); j++) {
      mat[i][j] = 0;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      rsum[i] = rsum[i] + mat[i][j];
    }
  }
  max = max_sum(rsum[100], n);
  for (int k = 0; k < n; k++) {
    if (rsum[k] == max)
      printf("%d ", k);
  }
  return 0;
}
```