user: 下面的汇编指令对应的C源代码是什么:

```asm
<knapSack>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x1,%rax
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x38(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x1,%rax
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  jmp    L77
L70:
  movq   $0x0,-0x20(%rbp)
  jmp    L10
L88:
  cmpq   $0x0,-0x28(%rbp)
  je     L2
  cmpq   $0x0,-0x20(%rbp)
  jne    L11
L2:
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  jmp    L12
L11:
  mov    -0x28(%rbp),%rax
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  cmp    %rax,-0x20(%rbp)
  jl     L40
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x28(%rbp),%rdx
  shl    $0x2,%rdx
  lea    -0x4(%rdx),%rcx
  mov    -0x60(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%ecx
  mov    -0x28(%rbp),%rdx
  shl    $0x2,%rdx
  lea    -0x4(%rdx),%rsi
  mov    -0x58(%rbp),%rdx
  add    %rsi,%rdx
  mov    (%rdx),%edx
  movslq %edx,%rsi
  mov    -0x20(%rbp),%rdx
  sub    %rsi,%rdx
  lea    0x0(,%rdx,4),%rsi
  mov    -0x30(%rbp),%rdx
  add    %rsi,%rdx
  mov    (%rdx),%edx
  add    %ecx,%edx
  mov    -0x20(%rbp),%rcx
  lea    0x0(,%rcx,4),%rsi
  mov    -0x38(%rbp),%rcx
  lea    (%rsi,%rcx,1),%rbx
  mov    %eax,%esi
  mov    %edx,%edi
  call   <max@plt>
  mov    %eax,(%rbx)
  jmp    L12
L40:
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x38(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
L12:
  addq   $0x1,-0x20(%rbp)
L10:
  mov    -0x20(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jle    L88
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  addq   $0x1,-0x28(%rbp)
L77:
  mov    -0x28(%rbp),%rax
  cmp    -0x50(%rbp),%rax
  jle    L70
  mov    -0x48(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x3c(%rbp),%eax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int knapSack(long int W, long int N, int wt[], int val[]) {
  int *K = (int *)malloc((W + 1) * sizeof(int));
  int *Kp = (int *)malloc((W + 1) * sizeof(int));
  long int i, w;
  for (i = 0; i <= N; i++) {
    for (w = 0; w <= W; w++) {
      if (i == 0 || w == 0)
        K[w] = 0;
      else if (wt[i - 1] <= w)
        K[w] = max(val[i - 1] + Kp[w - wt[i - 1]], Kp[w]);
      else
        K[w] = Kp[w];
    }
    int *tmp = Kp;
    Kp = K;
    K = tmp;
  }
  int result = K[W];
  free(K);
  free(Kp);
  return result;
}
```