user: What is the c source code of the assembly code below:

```asm
<knapsack>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  push   %r14
  push   %r13
  push   %r12
  mov    %rcx,%r12
  mov    $0x32,%ecx
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  sub    $0x1d8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1c8(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%rdi
  movaps %xmm0,(%rsp)
  movq   $0x0,0x20(%rsp)
  movaps %xmm0,0x10(%rsp)
  rep stos %rax,%es:(%rdi)
  test   %ebp,%ebp
  jle    L296
  mov    %esi,%ebx
  movslq %ebp,%r13
  test   %esi,%esi
  jle    L65
  lea    0x34(%rsp),%rax
  lea    0x4(%rdx),%rcx
  movslq %ebp,%r13
  xor    %esi,%esi
  mov    $0x1,%r9d
  mov    $0x2,%r10d
  mov    $0x3,%r11d
  nopl   (%rax)
L21:
  mov    0x4(%r12,%rsi,4),%edx
  mov    %r9d,%r14d
  mov    (%rax),%r8d
  movslq %esi,%rdi
  sub    %edx,%r14d
  js     L17
  movslq %r14d,%r15
  movslq %esi,%r14
  lea    (%r14,%r14,4),%r14
  lea    (%r15,%r14,2),%r14
  mov    0x30(%rsp,%r14,4),%r14d
  add    (%rcx),%r14d
  cmp    %r14d,%r8d
  cmovl  %r14d,%r8d
L17:
  mov    %r8d,0x28(%rax)
  cmp    $0x1,%ebx
  je     L405
  mov    %r10d,%r14d
  mov    0x4(%rax),%r8d
  sub    %edx,%r14d
  js     L81
  movslq %r14d,%r15
  movslq %edi,%r14
  lea    (%r14,%r14,4),%r14
  lea    (%r15,%r14,2),%r14
  mov    0x30(%rsp,%r14,4),%r14d
  add    (%rcx),%r14d
  cmp    %r14d,%r8d
  cmovl  %r14d,%r8d
L81:
  mov    %r8d,0x2c(%rax)
  cmp    $0x2,%ebx
  je     L405
  mov    %r11d,%r14d
  mov    0x8(%rax),%r8d
  sub    %edx,%r14d
  js     L303
  movslq %r14d,%r15
  movslq %edi,%r14
  lea    (%r14,%r14,4),%r14
  lea    (%r15,%r14,2),%r14
  mov    0x30(%rsp,%r14,4),%r14d
  add    (%rcx),%r14d
  cmp    %r14d,%r8d
  cmovl  %r14d,%r8d
L303:
  mov    %r8d,0x30(%rax)
  cmp    $0x3,%ebx
  je     L405
  mov    $0x4,%r8d
  mov    0xc(%rax),%r14d
  sub    %edx,%r8d
  js     L364
  movslq %r8d,%r15
  movslq %edi,%r8
  lea    (%r8,%r8,4),%r8
  lea    (%r15,%r8,2),%r8
  mov    0x30(%rsp,%r8,4),%r8d
  add    (%rcx),%r8d
  cmp    %r8d,%r14d
  cmovl  %r8d,%r14d
L364:
  mov    %r14d,0x34(%rax)
  cmp    $0x4,%ebx
  je     L405
  mov    $0x5,%r8d
  mov    0x10(%rax),%r14d
  sub    %edx,%r8d
  js     L111
  movslq %r8d,%r15
  movslq %edi,%r8
  lea    (%r8,%r8,4),%r8
  lea    (%r15,%r8,2),%r8
  mov    0x30(%rsp,%r8,4),%r8d
  add    (%rcx),%r8d
  cmp    %r8d,%r14d
  cmovl  %r8d,%r14d
L111:
  mov    %r14d,0x38(%rax)
  cmp    $0x5,%ebx
  je     L405
  mov    $0x6,%r8d
  mov    0x14(%rax),%r14d
  sub    %edx,%r8d
  js     L205
  movslq %r8d,%r15
  movslq %edi,%r8
  lea    (%r8,%r8,4),%r8
  lea    (%r15,%r8,2),%r8
  mov    0x30(%rsp,%r8,4),%r8d
  add    (%rcx),%r8d
  cmp    %r8d,%r14d
  cmovl  %r8d,%r14d
L205:
  mov    %r14d,0x3c(%rax)
  cmp    $0x6,%ebx
  je     L405
  mov    $0x7,%r8d
  mov    0x18(%rax),%r14d
  sub    %edx,%r8d
  js     L125
  movslq %r8d,%r15
  movslq %edi,%r8
  lea    (%r8,%r8,4),%r8
  lea    (%r15,%r8,2),%r8
  mov    0x30(%rsp,%r8,4),%r8d
  add    (%rcx),%r8d
  cmp    %r8d,%r14d
  cmovl  %r8d,%r14d
L125:
  mov    %r14d,0x40(%rax)
  cmp    $0x7,%ebx
  je     L405
  mov    $0x8,%r8d
  mov    0x1c(%rax),%r14d
  sub    %edx,%r8d
  js     L393
  movslq %r8d,%r15
  movslq %edi,%r8
  lea    (%r8,%r8,4),%r8
  lea    (%r15,%r8,2),%r8
  mov    0x30(%rsp,%r8,4),%r8d
  add    (%rcx),%r8d
  cmp    %r8d,%r14d
  cmovl  %r8d,%r14d
L393:
  mov    %r14d,0x44(%rax)
  cmp    $0x8,%ebx
  je     L405
  mov    $0x9,%r14d
  mov    0x20(%rax),%r8d
  sub    %edx,%r14d
  js     L29
  movslq %r14d,%r14
  lea    (%rdi,%rdi,4),%rdx
  lea    (%r14,%rdx,2),%rdx
  mov    0x30(%rsp,%rdx,4),%edx
  add    (%rcx),%edx
  cmp    %edx,%r8d
  cmovl  %edx,%r8d
L29:
  mov    %r8d,0x48(%rax)
L405:
  add    $0x1,%rsi
  add    $0x28,%rax
  add    $0x4,%rcx
  cmp    %r13,%rsi
  jne    L21
L65:
  movslq %ebx,%r14
  lea    0x0(%r13,%r13,4),%rax
  lea    D34(%rip),%rdi
  lea    (%r14,%rax,2),%rax
  mov    0x30(%rsp,%rax,4),%r15d
  xor    %eax,%eax
  mov    %r15d,%esi
  call   <printf@plt>
  lea    D3(%rip),%rdi
  call   <puts@plt>
  lea    -0x1(%rbp),%edx
  movslq %edx,%rax
  lea    (%rax,%rax,4),%rcx
  lea    (%r14,%rcx,2),%rcx
  cmp    0x30(%rsp,%rcx,4),%r15d
  je     L119
  movl   $0x1,(%rsp,%r13,4)
  sub    (%r12,%r13,4),%ebx
L119:
  test   %edx,%edx
  je     L381
  lea    -0x2(%rbp),%esi
  movslq %ebx,%rcx
  lea    (%rax,%rax,4),%r8
  movslq %esi,%rdx
  lea    (%rdx,%rdx,4),%rdi
  lea    (%rcx,%rdi,2),%rdi
  lea    (%rcx,%r8,2),%rcx
  mov    0x30(%rsp,%rcx,4),%ecx
  cmp    %ecx,0x30(%rsp,%rdi,4)
  je     L113
  movl   $0x1,(%rsp,%rax,4)
  sub    (%r12,%rax,4),%ebx
L113:
  test   %esi,%esi
  je     L381
  movslq %ebx,%rcx
  lea    (%rdx,%rdx,4),%rax
  lea    -0x3(%rbp),%esi
  lea    (%rcx,%rax,2),%rdi
  movslq %esi,%rax
  lea    (%rax,%rax,4),%r8
  lea    (%rcx,%r8,2),%rcx
  mov    0x30(%rsp,%rcx,4),%ecx
  cmp    %ecx,0x30(%rsp,%rdi,4)
  je     L228
  movl   $0x1,(%rsp,%rdx,4)
  sub    (%r12,%rdx,4),%ebx
L228:
  test   %esi,%esi
  je     L381
  movslq %ebx,%rcx
  lea    (%rax,%rax,4),%rdx
  lea    -0x4(%rbp),%esi
  lea    (%rcx,%rdx,2),%rdi
  movslq %esi,%rdx
  lea    (%rdx,%rdx,4),%r8
  lea    (%rcx,%r8,2),%rcx
  mov    0x30(%rsp,%rcx,4),%ecx
  cmp    %ecx,0x30(%rsp,%rdi,4)
  je     L267
  movl   $0x1,(%rsp,%rax,4)
  sub    (%r12,%rax,4),%ebx
L267:
  test   %esi,%esi
  je     L381
  movslq %ebx,%rcx
  lea    (%rdx,%rdx,4),%rax
  lea    -0x5(%rbp),%esi
  lea    (%rcx,%rax,2),%rdi
  movslq %esi,%rax
  lea    (%rax,%rax,4),%r8
  lea    (%rcx,%r8,2),%rcx
  mov    0x30(%rsp,%rcx,4),%ecx
  cmp    %ecx,0x30(%rsp,%rdi,4)
  je     L345
  movl   $0x1,(%rsp,%rdx,4)
  sub    (%r12,%rdx,4),%ebx
L345:
  test   %esi,%esi
  je     L381
  movslq %ebx,%rcx
  lea    (%rax,%rax,4),%rdx
  lea    -0x6(%rbp),%esi
  lea    (%rcx,%rdx,2),%rdi
  movslq %esi,%rdx
  lea    (%rdx,%rdx,4),%r8
  lea    (%rcx,%r8,2),%rcx
  mov    0x30(%rsp,%rcx,4),%ecx
  cmp    %ecx,0x30(%rsp,%rdi,4)
  je     L293
  movl   $0x1,(%rsp,%rax,4)
  sub    (%r12,%rax,4),%ebx
L293:
  test   %esi,%esi
  je     L381
  movslq %ebx,%rcx
  lea    (%rdx,%rdx,4),%rax
  lea    -0x7(%rbp),%esi
  lea    (%rcx,%rax,2),%rdi
  movslq %esi,%rax
  lea    (%rax,%rax,4),%r8
  lea    (%rcx,%r8,2),%rcx
  mov    0x30(%rsp,%rcx,4),%ecx
  cmp    %ecx,0x30(%rsp,%rdi,4)
  je     L284
  movl   $0x1,(%rsp,%rdx,4)
  sub    (%r12,%rdx,4),%ebx
L284:
  test   %esi,%esi
  je     L381
  movslq %ebx,%rcx
  lea    (%rax,%rax,4),%rdx
  lea    -0x8(%rbp),%esi
  lea    (%rcx,%rdx,2),%rdi
  movslq %esi,%rdx
  lea    (%rdx,%rdx,4),%r8
  lea    (%rcx,%r8,2),%rcx
  mov    0x30(%rsp,%rcx,4),%ecx
  cmp    %ecx,0x30(%rsp,%rdi,4)
  je     L313
  movl   $0x1,(%rsp,%rax,4)
  sub    (%r12,%rax,4),%ebx
L313:
  test   %esi,%esi
  je     L381
  movslq %ebx,%rcx
  lea    (%rdx,%rdx,4),%rax
  lea    -0x9(%rbp),%esi
  lea    (%rcx,%rax,2),%rdi
  movslq %esi,%rax
  lea    (%rax,%rax,4),%r8
  lea    (%rcx,%r8,2),%rcx
  mov    0x30(%rsp,%rcx,4),%ecx
  cmp    %ecx,0x30(%rsp,%rdi,4)
  je     L337
  movl   $0x1,(%rsp,%rdx,4)
  sub    (%r12,%rdx,4),%ebx
L337:
  test   %esi,%esi
  je     L381
  movslq %ebx,%rbx
  lea    (%rax,%rax,4),%rdx
  lea    (%rbx,%rdx,2),%rcx
  lea    -0xa(%rbp),%edx
  movslq %edx,%rdx
  lea    (%rdx,%rdx,4),%rdx
  lea    (%rbx,%rdx,2),%rdx
  mov    0x30(%rsp,%rdx,4),%edi
  cmp    %edi,0x30(%rsp,%rcx,4)
  je     L381
  movl   $0x1,(%rsp,%rax,4)
L381:
  mov    $0x1,%ebx
  mov    %rsp,%r13
  lea    D37(%rip),%r12
  xchg   %ax,%ax
L242:
  mov    0x0(%r13,%rbx,4),%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %ebx,%ebp
  jge    L242
L99:
  mov    0x1c8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L48
  add    $0x1d8,%rsp
  mov    $0xa,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <putchar@plt>
L296:
  xor    %esi,%esi
  lea    D34(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D3(%rip),%rdi
  call   <puts@plt>
  jmp    L99
L48:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D34
datatype: string
name: unpack_data
arguments: tag: D3
datatype: string
name: unpack_data
arguments: tag: D37
datatype: string

tool: D34: Max profit : %d


tool: D3: Edges are : 

tool: D37: %d	

assistant: ```c
void knapsack(int no, int wt, int pt[10], int weight[10]) {
  int knap[10][10] = {0}, x[10] = {0}, i, j;
  for (i = 1; i <= no; i++)
    for (j = 1; j <= wt; j++) {
      if ((j - weight[i]) < 0)
        knap[i][j] = knap[i - 1][j];
      else
        knap[i][j] = (knap[i - 1][j] > pt[i] + knap[i - 1][j - weight[i]] ? knap[i - 1][j] : pt[i] + knap[i - 1][j - weight[i]]);
    }
  printf("Max profit : %d\n", knap[no][wt]);
  printf("Edges are : \n");
  for (i = no; i >= 1; i--)
    if (knap[i][wt] != knap[i - 1][wt]) {
      x[i] = 1;
      wt -= weight[i];
    }
  for (i = 1; i <= no; i++)
    printf("%d\t", x[i]);
  printf("\n");
}
```