user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    -0x3c(%rbp),%rsi
  lea    D15(%rip),%rdi
  call   <scanf@plt>
  movzwl -0x3c(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %dx,-0x3c(%rbp)
  test   %ax,%ax
  je     L269
  lea    D15(%rip),%r15
  jmp    L44
L1:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L172
  orq    $0x0,-0x8(%rsp,%rdx,1)
L172:
  mov    %rsp,%r12
  lea    0xf(%r14),%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  shl    $0x4,%rax
  mov    %rax,%rsi
  and    $0xfffffffffffff000,%rsi
  mov    %rsp,%rdx
  sub    %rsi,%rdx
L18:
  cmp    %rdx,%rsp
  je     L24
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L18
L24:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L216
  orq    $0x0,-0x8(%rsp,%rdx,1)
L216:
  mov    %rsp,-0x50(%rbp)
  test   %cx,%cx
  jle    L144
  mov    %r14,%r13
  shr    %r13
  mov    $0x0,%ebx
  jmp    L175
L265:
  movswq %bx,%rsi
  imul   %r14,%rsi
  add    %r12,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  add    $0x1,%bx
  jns    L265
L170:
  lea    0x1(%rbx),%eax
  mov    %eax,%ebx
  movzwl -0x3a(%rbp),%r9d
  cmp    %ax,%r9w
  jle    L3
L175:
  test   %bx,%bx
  jns    L265
  jmp    L170
L3:
  test   %r9w,%r9w
  jle    L144
  mov    $0x1,%r14d
  mov    $0x0,%r11d
  movw   $0x0,-0x42(%rbp)
  jmp    L239
L10:
  movslq %ecx,%rax
  imul   %r13,%rax
  add    %r8,%rax
  movzwl (%r12,%rax,2),%esi
L192:
  add    %esi,%edi
  add    $0x1,%edx
  add    $0x1,%ecx
  cmp    %dx,%r9w
  je     L46
L73:
  cmp    %dx,%r10w
  je     L10
  movslq %ecx,%rax
  imul   %r13,%rax
  lea    (%rbx,%rax,1),%rsi
  movzwl (%r12,%rsi,2),%esi
  add    %r8,%rax
  cmp    %si,(%r12,%rax,2)
  jl     L192
  jmp    L10
L244:
  movzwl -0x42(%rbp),%ecx
  movswq %cx,%rax
  mov    -0x50(%rbp),%rbx
  mov    %di,(%rbx,%rax,2)
  add    $0x1,%ecx
  mov    %cx,-0x42(%rbp)
  mov    %di,-0x44(%rbp)
L83:
  add    $0x1,%r11d
  add    $0x1,%r14
  cmp    %r11w,%r9w
  jle    L144
L239:
  mov    %r11d,%edx
  mov    %r11d,%r10d
  mov    %r11d,%ecx
  mov    $0x0,%edi
  movslq %r11d,%r8
  movslq %r14d,%rbx
  cmp    %r11w,%r9w
  jg     L73
L46:
  test   %r10w,%r10w
  je     L244
  movswl -0x42(%rbp),%edx
  lea    -0x1(%rdx),%eax
  cltq
  mov    -0x50(%rbp),%rcx
  cmp    %di,(%rcx,%rax,2)
  jge    L83
  movslq %edx,%rdx
  mov    -0x50(%rbp),%rax
  mov    %di,(%rax,%rdx,2)
  addw   $0x1,-0x42(%rbp)
  mov    %di,-0x44(%rbp)
  jmp    L83
L144:
  mov    $0xa,%edi
  call   <putchar@plt>
  movswl -0x44(%rbp),%esi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x58(%rbp),%rsp
  movzwl -0x3c(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %dx,-0x3c(%rbp)
  test   %ax,%ax
  je     L269
L44:
  mov    %rsp,-0x58(%rbp)
  lea    -0x3a(%rbp),%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movzwl -0x3a(%rbp),%ecx
  movswq %cx,%rax
  lea    (%rax,%rax,1),%r14
  imul   %rax,%rax
  lea    0xf(%rax,%rax,1),%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  shl    $0x4,%rax
  mov    %rax,%rsi
  and    $0xfffffffffffff000,%rsi
  mov    %rsp,%rdx
  sub    %rsi,%rdx
L225:
  cmp    %rdx,%rsp
  je     L1
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L225
L269:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L48
  mov    $0x0,%eax
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L48:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D15
type_guessed: string

tool: D15: %sd

assistant: ```c
main() {
  short int i, n, m, k, l, x, s = 0, y, z = 0;
  scanf("%sd", &n);
  while (n--) {
    scanf("%sd", &m);
    short int a[m][m];
    short int b[m];
    for (k = 0; k < m; k++) {
      for (l = 0; l <= k; k++) {
        scanf("%sd", &a[k][l]);
      }
    }
    for (k = 0; k < m; k++) {
      for (l = k; l < m; l++) {
        if (l != k && a[l][k] < a[l][k + 1])
          x = a[l][k + 1];
        else
          x = a[l][k];
        s = s + x;
      }
      if (k == 0) {
        b[z] = s;
        y = b[z];
        z++;
      }
      if (k != 0 && s > b[z - 1]) {
        b[z] = s;
        y = b[z];
        z++;
      }
      s = 0;
    }
    printf("\n");
    printf("%sd", y);
    z = 0;
  }
  return 0;
}
```