user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x50(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x38(%rbp)
  mov    -0x50(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x30(%rbp)
  movl   $0x0,-0x48(%rbp)
  jmp    L95
L66:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x48(%rbp)
L95:
  mov    -0x50(%rbp),%eax
  cmp    %eax,-0x48(%rbp)
  jl     L66
  movl   $0x0,-0x48(%rbp)
  jmp    L69
L10:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x48(%rbp)
L69:
  mov    -0x50(%rbp),%eax
  cmp    %eax,-0x48(%rbp)
  jl     L10
  lea    -0x4c(%rbp),%rax
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x50(%rbp),%eax
  mov    -0x4c(%rbp),%edx
  add    $0x1,%edx
  mov    %eax,%esi
  mov    %edx,%edi
  call   <build_matrix@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x50(%rbp),%eax
  mov    -0x4c(%rbp),%edx
  add    $0x1,%edx
  mov    %eax,%esi
  mov    %edx,%edi
  call   <build_matrix@plt>
  mov    %rax,-0x20(%rbp)
  movl   $0x0,-0x48(%rbp)
  jmp    L57
L126:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x48(%rbp)
L57:
  mov    -0x50(%rbp),%eax
  cmp    %eax,-0x48(%rbp)
  jl     L126
  movl   $0x1,-0x48(%rbp)
  jmp    L33
L65:
  movl   $0x0,-0x44(%rbp)
  jmp    L62
L26:
  cmpl   $0x0,-0x44(%rbp)
  jle    L128
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%rax
  sub    $0x4,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  jmp    L63
L128:
  mov    $0x0,%eax
L63:
  mov    %eax,-0x40(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x48(%rbp),%eax
  sub    %edx,%eax
  test   %eax,%eax
  js     L79
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%ecx
  mov    -0x48(%rbp),%eax
  sub    %ecx,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%rax
  sub    $0x4,%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  jmp    L21
L79:
  mov    $0x0,%eax
L21:
  mov    %eax,-0x3c(%rbp)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    (%rcx,%rax,1),%rbx
  mov    -0x3c(%rbp),%ecx
  mov    -0x40(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <max@plt>
  mov    %eax,(%rbx)
  addl   $0x1,-0x44(%rbp)
L62:
  mov    -0x50(%rbp),%eax
  cmp    %eax,-0x44(%rbp)
  jl     L26
  addl   $0x1,-0x48(%rbp)
L33:
  mov    -0x4c(%rbp),%eax
  cmp    %eax,-0x48(%rbp)
  jle    L65
  mov    -0x50(%rbp),%eax
  mov    -0x4c(%rbp),%edx
  lea    0x1(%rdx),%ecx
  mov    -0x20(%rbp),%rdx
  mov    %eax,%esi
  mov    %ecx,%edi
  call   <print_matrix@plt>
  lea    D57(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x50(%rbp),%eax
  mov    -0x4c(%rbp),%edx
  lea    0x1(%rdx),%ecx
  mov    -0x28(%rbp),%rdx
  mov    %eax,%esi
  mov    %ecx,%edi
  call   <print_matrix@plt>
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x4c(%rbp),%esi
  mov    -0x50(%rbp),%eax
  mov    -0x28(%rbp),%rdi
  mov    -0x20(%rbp),%rcx
  mov    -0x30(%rbp),%rdx
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <print_picked@plt>
  lea    D57(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L131
  call   <__stack_chk_fail@plt>
L131:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: read_data
arguments: tag: D16
type_infered: string
name: read_data
arguments: tag: D57
type_infered: string
name: read_data
arguments: tag: D15
type_infered: string

tool: D16: %d

tool: 

tool: D15: 
Picked: 

assistant: ```c
int main() {
  int i, j, x, y;
  int n, b;
  int *vs;
  int *ws;
  int **ps;
  int **zs;
  scanf("%d", &n);
  vs = (int *)malloc(sizeof(int) * n);
  ws = (int *)malloc(sizeof(int) * n);
  for (i = 0; i < n; i++)
    scanf("%d", &vs[i]);
  for (i = 0; i < n; i++)
    scanf("%d", &ws[i]);
  scanf("%d", &b);
  ps = build_matrix(b + 1, n);
  zs = build_matrix(b + 1, n);
  for (i = 0; i < n; i++)
    zs[0][i] = 0;
  for (i = 1; i <= b; i++)
    for (j = 0; j < n; j++) {
      x = (j - 1 < 0) ? 0 : zs[i][j - 1];
      y = (i - ws[j] < 0) ? 0 : vs[j] + zs[i - ws[j]][j - 1];
      zs[i][j] = max(x, y, &ps[i][j]);
    }
  print_matrix(b + 1, n, zs);
  puts("");
  print_matrix(b + 1, n, ps);
  printf("\nPicked: ");
  print_picked(n, b, ws, zs, ps);
  puts("");
}
```