user: What would the C source look like for the assembly code provided here?

```asm
<knapSack>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  mov    %edi,%r15d
  push   %r14
  push   %r13
  mov    %rdx,%r13
  lea    0x1(%rdi),%edx
  push   %r12
  movslq %edx,%rdx
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x58,%rsp
  mov    %ecx,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    0x0(,%rdx,4),%rax
  mov    %rax,-0x68(%rbp)
  lea    0x1(%rcx),%eax
  mov    %rsp,%rcx
  cltq
  imul   %rdx,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L43
L3:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L3
L43:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L54
L104:
  mov    -0x68(%rbp),%rax
  mov    %rsp,-0x60(%rbp)
  shr    $0x2,%rax
  mov    %rax,-0x70(%rbp)
  movslq %r15d,%rax
  mov    %rax,-0x78(%rbp)
  test   %r15d,%r15d
  js     L128
  mov    -0x60(%rbp),%rdi
  lea    0x4(,%rax,4),%rdx
  xor    %esi,%esi
  call   <memset@plt>
L128:
  mov    -0x50(%rbp),%eax
  test   %eax,%eax
  jle    L125
  mov    -0x60(%rbp),%r12
  mov    -0x68(%rbp),%r10
  xor    %r14d,%r14d
  mov    %r15d,%ecx
  mov    %r13,%r11
  mov    %r14,%r15
  mov    %rbx,%r13
  add    %r12,%r10
  mov    %r12,%rdx
  mov    %r10,%r14
  nopl   0x0(%rax)
L113:
  xor    %ebx,%ebx
  test   %ecx,%ecx
  js     L85
  movslq %r15d,%r12
  imul   -0x70(%rbp),%r12
  mov    %r12,-0x58(%rbp)
  mov    %r15,%r12
  mov    %r13,%r15
  mov    %rdx,%r13
  jmp    L60
  nopl   (%rax)
L109:
  mov    %edi,(%r14,%rbx,4)
  add    $0x1,%rbx
  cmp    %ebx,%ecx
  jl     L35
L60:
  mov    (%r15),%eax
  mov    0x0(%r13,%rbx,4),%edi
  cmp    %ebx,%eax
  jg     L109
  mov    %ebx,%esi
  mov    -0x60(%rbp),%rdx
  mov    %ecx,-0x4c(%rbp)
  sub    %eax,%esi
  mov    %r11,-0x48(%rbp)
  movslq %esi,%rax
  add    -0x58(%rbp),%rax
  mov    (%r11,%r12,4),%esi
  add    (%rdx,%rax,4),%esi
  call   <max@plt>
  mov    -0x4c(%rbp),%ecx
  mov    -0x48(%rbp),%r11
  mov    %eax,%edi
  mov    %edi,(%r14,%rbx,4)
  add    $0x1,%rbx
  cmp    %ebx,%ecx
  jge    L60
L35:
  mov    %r13,%rdx
  mov    %r15,%r13
  mov    %r12,%r15
L85:
  mov    -0x68(%rbp),%rax
  add    $0x1,%r15
  add    $0x4,%r13
  add    %rax,%r14
  add    %rax,%rdx
  lea    0x1(%r15),%eax
  cmp    %eax,-0x50(%rbp)
  jge    L113
L125:
  movslq -0x50(%rbp),%r15
  imul   -0x70(%rbp),%r15
  mov    -0x78(%rbp),%rax
  mov    -0x60(%rbp),%rdx
  add    %r15,%rax
  mov    (%rdx,%rax,4),%eax
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L91
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L54:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L104
L91:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int knapSack(int W, int wt[], int v[], int n) {
  int i, j;
  int T[n + 1][W + 1];
  for (j = 0; j <= W; j++)
    T[0][j] = 0;
  for (i = 1; i <= n; i++) {
    for (j = 0; j <= W; j++) {
      if (j >= wt[i - 1]) {
        T[i][j] = max(T[i - 1][j], T[i - 1][j - wt[i - 1]] + v[i - 1]);
      } else {
        T[i][j] = T[i - 1][j];
      }
    }
  }
  return T[n][W];
}
```