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

```asm
<cut_rod>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xb8,%rsp
  movl   $0x0,0x88(%rsp)
  test   %esi,%esi
  je     L101
  mov    D6(%rip),%rdx
  mov    %rdi,%r15
  mov    (%rdx),%edi
  mov    %edi,0xc(%rsp)
  mov    %edi,0x88(%rsp)
  jle    L101
  mov    %esi,0xa8(%rsp)
  mov    %r15,%r14
  mov    %r15,0xa0(%rsp)
L6:
  mov    0xa0(%rsp),%rax
  mov    %r14,0x90(%rsp)
  mov    %r14,%r15
  mov    (%rax),%eax
  mov    %eax,0xac(%rsp)
  mov    0xa8(%rsp),%eax
  mov    %eax,0x8c(%rsp)
  mov    0xc(%rsp),%eax
  mov    %eax,0x9c(%rsp)
L62:
  mov    0x90(%rsp),%rax
  mov    %r15,0x78(%rsp)
  mov    %r15,%r14
  mov    (%rax),%eax
  mov    %eax,0x98(%rsp)
  mov    0x8c(%rsp),%eax
  mov    %eax,0x74(%rsp)
  mov    0xc(%rsp),%eax
  mov    %eax,0x84(%rsp)
L40:
  mov    0x78(%rsp),%rax
  mov    %r14,0x60(%rsp)
  mov    (%rax),%eax
  mov    %eax,0x80(%rsp)
  mov    0x74(%rsp),%eax
  mov    %eax,0x68(%rsp)
  mov    0xc(%rsp),%eax
  mov    %eax,0x70(%rsp)
L96:
  mov    0x60(%rsp),%rax
  mov    %r14,0x50(%rsp)
  mov    (%rax),%eax
  mov    %eax,0x6c(%rsp)
  mov    0x68(%rsp),%eax
  mov    %eax,0x4c(%rsp)
  mov    0xc(%rsp),%eax
  mov    %eax,0x5c(%rsp)
L21:
  mov    0x50(%rsp),%rax
  mov    %r14,%r15
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  mov    0x4c(%rsp),%eax
  mov    %eax,0x18(%rsp)
  mov    0xc(%rsp),%eax
  mov    %eax,0x30(%rsp)
L98:
  mov    (%r14),%eax
  mov    0x18(%rsp),%r8d
  mov    %r14,0x20(%rsp)
  mov    %r15,%r13
  mov    0xc(%rsp),%edx
  mov    %r15,%rdi
  mov    %eax,0x1c(%rsp)
  mov    %r8d,%r14d
  mov    %edx,%r15d
L13:
  mov    0x0(%r13),%eax
  mov    0xc(%rsp),%r11d
  mov    %rdi,0x28(%rsp)
  mov    %r14d,0x48(%rsp)
  mov    %eax,0x38(%rsp)
  mov    %r15d,0x3c(%rsp)
  mov    %rdi,%r15
  mov    %r13,0x40(%rsp)
  mov    %r11d,%r13d
L61:
  mov    0x28(%rsp),%rax
  mov    0xc(%rsp),%ebp
  xor    %r12d,%r12d
  mov    (%rax),%eax
  mov    %eax,0x34(%rsp)
  mov    %r14d,%eax
  mov    %rax,0x10(%rsp)
L22:
  mov    %r14d,%esi
  mov    (%r15,%r12,4),%ebx
  mov    %r15,%rdi
  sub    %r12d,%esi
  call   <cut_rod>
  add    %ebx,%eax
  cmp    %eax,%ebp
  cmovl  %eax,%ebp
  add    $0x1,%r12
  cmp    %r12,0x10(%rsp)
  jne    L22
  add    0x34(%rsp),%ebp
  cmp    %ebp,%r13d
  cmovl  %ebp,%r13d
  addq   $0x4,0x28(%rsp)
  sub    $0x1,%r14d
  jne    L61
  mov    0x38(%rsp),%eax
  mov    %r13d,%r11d
  mov    %r15,%rdi
  mov    0x3c(%rsp),%r15d
  mov    0x40(%rsp),%r13
  mov    0x48(%rsp),%r14d
  add    %r11d,%eax
  cmp    %eax,%r15d
  cmovl  %eax,%r15d
  add    $0x4,%r13
  sub    $0x1,%r14d
  jne    L13
  mov    0x1c(%rsp),%eax
  mov    0x30(%rsp),%ecx
  mov    %r15d,%edx
  mov    %rdi,%r15
  mov    0x20(%rsp),%r14
  add    %edx,%eax
  cmp    %eax,%ecx
  cmovge %ecx,%eax
  add    $0x4,%r14
  subl   $0x1,0x18(%rsp)
  mov    %eax,0x30(%rsp)
  mov    %eax,%ecx
  jne    L98
  mov    0x58(%rsp),%eax
  mov    0x5c(%rsp),%ebx
  mov    %rdi,%r14
  add    %ecx,%eax
  cmp    %eax,%ebx
  cmovge %ebx,%eax
  addq   $0x4,0x50(%rsp)
  subl   $0x1,0x4c(%rsp)
  mov    %eax,0x5c(%rsp)
  mov    %eax,%ebx
  jne    L21
  mov    0x6c(%rsp),%eax
  mov    0x70(%rsp),%edx
  add    %ebx,%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  addq   $0x4,0x60(%rsp)
  subl   $0x1,0x68(%rsp)
  mov    %eax,0x70(%rsp)
  mov    %eax,%edx
  jne    L96
  mov    0x80(%rsp),%eax
  add    %edx,%eax
  mov    0x84(%rsp),%edx
  cmp    %eax,%edx
  cmovge %edx,%eax
  addq   $0x4,0x78(%rsp)
  subl   $0x1,0x74(%rsp)
  mov    %eax,0x84(%rsp)
  mov    %eax,%edx
  jne    L40
  mov    0x98(%rsp),%eax
  mov    0x9c(%rsp),%edi
  add    %edx,%eax
  cmp    %eax,%edi
  cmovge %edi,%eax
  addq   $0x4,0x90(%rsp)
  subl   $0x1,0x8c(%rsp)
  mov    %eax,0x9c(%rsp)
  mov    %eax,%edi
  jne    L62
  mov    0xac(%rsp),%eax
  mov    0x88(%rsp),%edx
  add    %edi,%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  addq   $0x4,0xa0(%rsp)
  subl   $0x1,0xa8(%rsp)
  mov    %eax,0x88(%rsp)
  jne    L6
L101:
  mov    0x88(%rsp),%eax
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int cut_rod(int price_table[], int n) {
  if (n == 0) {
    return 0;
  }
  int max = INT_MIN;
  for (int i = 0; i < n; i++) {
    int p = price_table[i] + cut_rod(price_table, n - i);
    if (p > max) {
      max = p;
    }
  }
  return max;
}
```