user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<knapsackDP>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x68,%rsp
  mov    %rsi,-0x78(%rbp)
  mov    %edx,%esi
  mov    %edx,-0x84(%rbp)
  mov    %ecx,%r15d
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    0x1(%rcx),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rax
  mov    %rax,-0x80(%rbp)
  lea    0x1(%rsi),%eax
  cltq
  imul   %rdx,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L87:
  cmp    %rdx,%rsp
  je     L107
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L87
L107:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L23
  orq    $0x0,-0x8(%rsp,%rax,1)
L23:
  mov    %rsp,%rax
  mov    %rax,-0x70(%rbp)
  cmpl   $0x0,-0x84(%rbp)
  jle    L138
  mov    -0x80(%rbp),%rdx
  mov    %rdx,%rcx
  shr    $0x2,%rcx
  mov    %rcx,-0x90(%rbp)
  mov    %rax,%r13
  mov    %rax,%rsi
  add    %rdx,%rsi
  mov    %rsi,-0x48(%rbp)
  mov    %rdi,%r14
  mov    %rsi,-0x50(%rbp)
  mov    %rax,-0x58(%rbp)
  mov    $0x1,%r12d
  jmp    L134
L106:
  mov    -0x50(%rbp),%rdi
  movl   $0x0,(%rdi,%rbx,4)
L17:
  mov    (%r14),%edx
  cmp    %ecx,%edx
  jle    L34
  mov    0x0(%r13,%rbx,4),%eax
  mov    -0x48(%rbp),%rsi
  mov    %eax,(%rsi,%rbx,4)
L30:
  add    $0x1,%rbx
  cmp    %ebx,%r15d
  jl     L52
L102:
  mov    %ebx,%eax
  mov    %ebx,%ecx
  test   %r12d,%r12d
  je     L106
  test   %ebx,%ebx
  jne    L17
  jmp    L106
L34:
  mov    -0x58(%rbp),%rcx
  mov    (%rcx,%rbx,4),%esi
  sub    %edx,%eax
  cltq
  add    -0x68(%rbp),%rax
  mov    -0x78(%rbp),%rdx
  mov    -0x4(%rdx,%r12,4),%edi
  mov    -0x70(%rbp),%rcx
  add    (%rcx,%rax,4),%edi
  call   <max@plt>
  mov    -0x60(%rbp),%rsi
  mov    %eax,(%rsi,%rbx,4)
  jmp    L30
L52:
  add    $0x1,%r12
  mov    -0x80(%rbp),%rax
  add    %rax,%r13
  add    %rax,-0x48(%rbp)
  add    %rax,-0x58(%rbp)
  add    $0x4,%r14
  add    %rax,-0x50(%rbp)
  cmp    %r12d,-0x84(%rbp)
  jl     L138
L134:
  mov    -0x80(%rbp),%rax
  add    -0x58(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  mov    $0x0,%ebx
  test   %r15d,%r15d
  js     L52
  lea    -0x1(%r12),%eax
  cltq
  imul   -0x90(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  jmp    L102
L138:
  movslq %r15d,%rax
  movslq -0x84(%rbp),%rcx
  mov    -0x80(%rbp),%rdx
  shr    $0x2,%rdx
  imul   %rcx,%rdx
  add    %rdx,%rax
  mov    -0x70(%rbp),%rdi
  mov    (%rdi,%rax,4),%eax
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L113
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L113:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int knapsackDP(int weight[], int profit[], int n, int knapSackWeight) {
  int table[n + 1][knapSackWeight + 1], i, j;
  for (i = 1; i < n + 1; ++i) {
    for (j = 0; j < knapSackWeight + 1; ++j) {
      if (i == 0 || j == 0)
        table[i][j] = 0;
      if (weight[i - 1] > j)
        table[i][j] = table[i - 1][j];
      else
        table[i][j] = max(profit[i - 1] + table[i - 1][j - weight[i - 1]], table[i - 1][j]);
    }
  }
  return table[n][knapSackWeight];
}
```