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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0x9000(%rsp),%r11
L107:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L107
  sub    $0xfa0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x9f94(%rbp),%rax
  mov    %rax,%rsi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  jmp    L6
L97:
  lea    -0x9f90(%rbp),%rax
  mov    %rax,%rsi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0x9f8c(%rbp)
  lea    -0x9f70(%rbp),%rax
  mov    $0x320,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  movl   $0x0,-0x9f88(%rbp)
  jmp    L35
L105:
  movl   $0x0,-0x9f84(%rbp)
  jmp    L130
L127:
  lea    -0x9c50(%rbp),%rcx
  mov    -0x9f84(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x9f88(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rsi,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    %rax,%rsi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x9f84(%rbp)
L130:
  mov    -0x9f84(%rbp),%eax
  cmp    -0x9f88(%rbp),%eax
  jle    L127
  addl   $0x1,-0x9f88(%rbp)
L35:
  mov    -0x9f90(%rbp),%eax
  cmp    %eax,-0x9f88(%rbp)
  jl     L105
  movl   $0x0,-0x9f8c(%rbp)
  mov    -0x9c50(%rbp),%edx
  mov    -0x9f8c(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  lea    0x0(,%rax,4),%rcx
  add    %rcx,%rax
  shl    $0x4,%rax
  add    %rbp,%rax
  sub    $0x9f70,%rax
  mov    %edx,(%rax)
  movl   $0x1,-0x9f80(%rbp)
  jmp    L101
L98:
  mov    -0x9f8c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x4,%rax
  add    %rbp,%rax
  sub    $0x9f70,%rax
  mov    (%rax),%ecx
  mov    -0x9f80(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x4,%rax
  add    %rbp,%rax
  sub    $0x9c50,%rax
  mov    (%rax),%edx
  mov    $0x1,%eax
  sub    -0x9f8c(%rbp),%eax
  add    %edx,%ecx
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x4,%rax
  add    %rbp,%rax
  sub    $0x9f70,%rax
  mov    %ecx,(%rax)
  movl   $0x1,-0x9f7c(%rbp)
  jmp    L62
L24:
  mov    -0x9f7c(%rbp),%eax
  sub    $0x1,%eax
  movslq %eax,%rcx
  mov    -0x9f8c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    -0x9f70(%rbp,%rax,4),%edx
  mov    -0x9f7c(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x9f8c(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  lea    0x0(,%rax,4),%rcx
  add    %rcx,%rax
  shl    $0x2,%rax
  add    %rsi,%rax
  mov    -0x9f70(%rbp,%rax,4),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <max@plt>
  mov    %eax,%ecx
  mov    -0x9f7c(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x9f80(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rsi,%rax
  mov    -0x9c50(%rbp,%rax,4),%edx
  mov    $0x1,%eax
  sub    -0x9f8c(%rbp),%eax
  add    %edx,%ecx
  mov    -0x9f7c(%rbp),%edx
  movslq %edx,%rsi
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rsi,%rax
  mov    %ecx,-0x9f70(%rbp,%rax,4)
  addl   $0x1,-0x9f7c(%rbp)
L62:
  mov    -0x9f7c(%rbp),%eax
  cmp    -0x9f80(%rbp),%eax
  jl     L24
  mov    -0x9f80(%rbp),%eax
  sub    $0x1,%eax
  movslq %eax,%rcx
  mov    -0x9f8c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    -0x9f70(%rbp,%rax,4),%ecx
  mov    -0x9f80(%rbp),%eax
  cltq
  imul   $0x194,%rax,%rax
  add    %rbp,%rax
  sub    $0x9c50,%rax
  mov    (%rax),%edx
  mov    $0x1,%eax
  sub    -0x9f8c(%rbp),%eax
  add    %edx,%ecx
  mov    -0x9f80(%rbp),%edx
  movslq %edx,%rsi
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rsi,%rax
  mov    %ecx,-0x9f70(%rbp,%rax,4)
  mov    $0x1,%eax
  sub    -0x9f8c(%rbp),%eax
  mov    %eax,-0x9f8c(%rbp)
  addl   $0x1,-0x9f80(%rbp)
L101:
  mov    -0x9f90(%rbp),%eax
  cmp    %eax,-0x9f80(%rbp)
  jl     L98
  mov    -0x9f8c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x4,%rax
  add    %rbp,%rax
  sub    $0x9f70,%rax
  mov    (%rax),%eax
  mov    %eax,-0x9f78(%rbp)
  movl   $0x1,-0x9f74(%rbp)
  jmp    L71
L11:
  mov    -0x9f74(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x9f8c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    -0x9f70(%rbp,%rax,4),%eax
  mov    -0x9f78(%rbp),%edx
  cmp    %eax,%edx
  cmovge %edx,%eax
  mov    %eax,-0x9f78(%rbp)
  addl   $0x1,-0x9f74(%rbp)
L71:
  mov    -0x9f90(%rbp),%eax
  cmp    %eax,-0x9f74(%rbp)
  jl     L11
  mov    -0x9f78(%rbp),%eax
  mov    %eax,%esi
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L6:
  mov    -0x9f94(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x9f94(%rbp)
  test   %eax,%eax
  jne    L97
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L64
  call   <__stack_chk_fail@plt>
L64:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D6
datatype: string
name: disassemble_data
arguments: data_tag: D12
datatype: string

tool: D6: %d

tool: D12: %d


assistant: ```c
int main() {
  int C;
  scanf("%d", &C);
  int n;
  int dp[2][100];
  int num[100][100];
  while (C--) {
    int N;
    scanf("%d", &N);
    int dpi = 0;
    memset(dp, 0, sizeof(dp));
    for (int i = 0; i < N; i++) {
      for (int j = 0; j <= i; j++) {
        scanf("%d", &num[i][j]);
      }
    }
    dpi = 0;
    dp[dpi][0] = num[0][0];
    for (int i = 1; i < N; i++) {
      dp[1 - dpi][0] = dp[dpi][0] + num[i][0];
      for (int j = 1; j < i; j++) {
        dp[1 - dpi][j] = max(dp[dpi][j], dp[dpi][j - 1]) + num[i][j];
      }
      dp[1 - dpi][i] = dp[dpi][i - 1] + num[i][i];
      dpi = 1 - dpi;
    }
    int ans = dp[dpi][0];
    for (int i = 1; i < N; i++) {
      ans = (ans < dp[dpi][i] ? dp[dpi][i] : ans);
    }
    printf("%d\n", ans);
  }
  return 0;
}
```