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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0x271000(%rsp),%r11
L29:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L29
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x138810(%rbp),%rax
  mov    $0x138800,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x271034(%rbp),%rax
  mov    %rax,%rsi
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  jmp    L136
L62:
  lea    -0x271030(%rbp),%rax
  mov    %rax,%rsi
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movl   $0x0,-0x27102c(%rbp)
  jmp    L151
L157:
  mov    -0x27102c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    -0x271010(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  addl   $0x1,-0x27102c(%rbp)
L151:
  mov    -0x271030(%rbp),%eax
  cmp    %eax,-0x27102c(%rbp)
  jl     L157
  movl   $0x1,-0x27102c(%rbp)
  jmp    L149
L97:
  movl   $0x0,-0x271028(%rbp)
  jmp    L71
L100:
  mov    -0x27102c(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x271028(%rbp),%eax
  movslq %eax,%rcx
  movslq %edx,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x4,%rax
  add    %rcx,%rax
  mov    -0x138810(%rbp,%rax,8),%rdx
  mov    -0x271028(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x27102c(%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    %rsi,%rax
  mov    %rdx,-0x138810(%rbp,%rax,8)
  movl   $0x1,-0x271024(%rbp)
  jmp    L38
L137:
  mov    -0x271024(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x271028(%rbp),%eax
  movslq %eax,%rcx
  movslq %edx,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x4,%rax
  add    %rcx,%rax
  mov    -0x138810(%rbp,%rax,8),%rdi
  mov    -0x27102c(%rbp),%eax
  sub    -0x271024(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x271028(%rbp),%edx
  mov    -0x271024(%rbp),%eax
  add    %edx,%eax
  mov    -0x271030(%rbp),%esi
  cltd
  idiv   %esi
  mov    %edx,%eax
  movslq %eax,%rsi
  movslq %ecx,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x4,%rax
  add    %rsi,%rax
  mov    -0x138810(%rbp,%rax,8),%rax
  add    %rdi,%rax
  mov    %rax,-0x271020(%rbp)
  mov    -0x271028(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x27102c(%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    %rcx,%rax
  mov    -0x138810(%rbp,%rax,8),%rax
  cmp    %rax,-0x271020(%rbp)
  jge    L90
  mov    -0x271028(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x27102c(%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
  lea    (%rax,%rcx,1),%rdx
  mov    -0x271020(%rbp),%rax
  mov    %rax,-0x138810(%rbp,%rdx,8)
L90:
  addl   $0x1,-0x271024(%rbp)
L38:
  mov    -0x271024(%rbp),%eax
  cmp    -0x27102c(%rbp),%eax
  jl     L137
  mov    -0x27102c(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x271028(%rbp),%eax
  movslq %eax,%rcx
  movslq %edx,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x4,%rax
  add    %rcx,%rax
  mov    -0x271010(%rbp,%rax,8),%rsi
  mov    -0x27102c(%rbp),%edx
  mov    -0x271028(%rbp),%eax
  add    %edx,%eax
  mov    -0x271030(%rbp),%ecx
  cltd
  idiv   %ecx
  mov    %edx,%eax
  cltq
  mov    -0x271010(%rbp,%rax,8),%rax
  lea    (%rsi,%rax,1),%rcx
  mov    -0x271028(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x27102c(%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    %rsi,%rax
  mov    %rcx,-0x271010(%rbp,%rax,8)
  mov    -0x271028(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x27102c(%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    %rcx,%rax
  mov    -0x271010(%rbp,%rax,8),%rcx
  mov    -0x271028(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x27102c(%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    %rsi,%rax
  mov    -0x138810(%rbp,%rax,8),%rax
  add    %rax,%rcx
  mov    -0x271028(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x27102c(%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    %rsi,%rax
  mov    %rcx,-0x138810(%rbp,%rax,8)
  addl   $0x1,-0x271028(%rbp)
L71:
  mov    -0x271030(%rbp),%eax
  cmp    %eax,-0x271028(%rbp)
  jl     L100
  addl   $0x1,-0x27102c(%rbp)
L149:
  mov    -0x271030(%rbp),%eax
  cmp    %eax,-0x27102c(%rbp)
  jl     L97
  mov    -0x271030(%rbp),%eax
  sub    $0x1,%eax
  lea    -0x138810(%rbp),%rcx
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x7,%rax
  add    %rcx,%rax
  mov    %rax,-0x271018(%rbp)
  mov    -0x271018(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x271020(%rbp)
  movl   $0x1,-0x27102c(%rbp)
  jmp    L80
L142:
  mov    -0x27102c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x271018(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  cmp    %rax,-0x271020(%rbp)
  jle    L15
  mov    -0x27102c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x271018(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x271020(%rbp)
L15:
  addl   $0x1,-0x27102c(%rbp)
L80:
  mov    -0x271030(%rbp),%eax
  cmp    %eax,-0x27102c(%rbp)
  jl     L142
  mov    -0x271020(%rbp),%rax
  mov    %rax,%rsi
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L136:
  mov    -0x271034(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x271034(%rbp)
  test   %eax,%eax
  jne    L62
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L131
  call   <__stack_chk_fail@plt>
L131:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D14
type_guessed: string
name: read_data
arguments: label: D7
type_guessed: string
name: read_data
arguments: label: D26
type_guessed: string

tool: D14: %d

tool: D7: %lld

tool: D26: %lld


assistant: ```c
int main() {
  int t, n, i, j, k;
  long long tmp, a[400][400], p[400][400] = {};
  for (scanf("%d", &t); t--; printf("%lld\n", tmp)) {
    scanf("%d", &n);
    for (i = 0; i < n; ++i)
      scanf("%lld", *a + i);
    for (i = 1; i < n; ++i)
      for (j = 0; j < n; ++j) {
        p[i][j] = p[i - 1][j];
        for (k = 1; k < i; ++k) {
          tmp = p[k - 1][j] + p[i - k][(j + k) % n];
          if (tmp < p[i][j])
            p[i][j] = tmp;
        }
        p[i][j] += a[i][j] = a[i - 1][j] + a[0][(i + j) % n];
      }
    long long *m = p[n - 1];
    tmp = *m;
    for (i = 1; i < n; ++i)
      if (m[i] < tmp)
        tmp = m[i];
  }
  return 0;
}
```