user: Demonstrate the C code that generates the assembly output below:

```asm
<partition2>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  mov    %esi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %edx,0x68(%rsp)
  test   %edx,%edx
  je     L73
  jle    L299
  movslq %esi,%rax
  lea    0x8(%r14),%r13d
  lea    0x1(%rsi),%esi
  shl    $0x2,%rax
  mov    %esi,0x70(%rsp)
  mov    %r13d,%r15d
  lea    (%rdi,%rax,1),%rdx
  lea    0x4(%rdi,%rax,1),%rax
  mov    %rax,0x90(%rsp)
  lea    0x2(%r14),%eax
  mov    %eax,0x74(%rsp)
  cltq
  lea    (%rdi,%rax,4),%rax
  mov    %rdx,0x88(%rsp)
  mov    %rax,0x98(%rsp)
  lea    0x3(%r14),%eax
  mov    %eax,0x78(%rsp)
  cltq
  lea    (%rdi,%rax,4),%rax
  mov    %rax,0x40(%rsp)
  lea    0x4(%r14),%eax
  mov    %eax,0x7c(%rsp)
  cltq
  lea    (%rdi,%rax,4),%rax
  mov    %rax,0x28(%rsp)
  lea    0x5(%r14),%eax
  mov    %eax,0x54(%rsp)
  cltq
  lea    (%rdi,%rax,4),%rax
  mov    %rax,0x58(%rsp)
  lea    0x6(%r14),%eax
  mov    %eax,0x3c(%rsp)
  cltq
  lea    (%rdi,%rax,4),%rax
  mov    %rax,0x60(%rsp)
  lea    0x7(%r14),%eax
  mov    %eax,0x24(%rsp)
  cltq
  lea    (%rdi,%rax,4),%rax
  mov    %rax,0x18(%rsp)
  movslq %r13d,%rax
  lea    (%rdi,%rax,4),%rax
  mov    %rax,0x8(%rsp)
  mov    0x68(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x50(%rsp)
  lea    0x9(%r14),%eax
  mov    %rdi,%r14
  mov    %eax,0x14(%rsp)
L119:
  mov    0x50(%rsp),%esi
  mov    0x68(%rsp),%eax
  mov    0x88(%rsp),%rdx
  lea    -0x1(%rsi),%edi
  sub    %esi,%eax
  mov    %eax,(%rdx)
  mov    %edi,0x6c(%rsp)
  mov    %edi,0x4c(%rsp)
  test   %esi,%esi
  je     L409
L316:
  mov    0x50(%rsp),%eax
  mov    0x4c(%rsp),%esi
  mov    0x90(%rsp),%rdi
  sub    %esi,%eax
  mov    %eax,(%rdi)
  test   %esi,%esi
  je     L437
  lea    -0x1(%rsi),%ecx
  mov    %r15d,%r13d
  mov    %ecx,0x80(%rsp)
  mov    %ecx,0x38(%rsp)
  jle    L176
L168:
  mov    0x4c(%rsp),%eax
  mov    0x38(%rsp),%ecx
  mov    0x98(%rsp),%rsi
  sub    %ecx,%eax
  mov    %eax,(%rsi)
  test   %ecx,%ecx
  je     L422
  lea    -0x1(%rcx),%esi
  mov    %esi,0x84(%rsp)
  mov    %esi,0x10(%rsp)
  jle    L207
  mov    %r14,%rax
  mov    %r13d,%r14d
  mov    %rax,%r13
L297:
  mov    0x38(%rsp),%eax
  mov    0x10(%rsp),%esi
  mov    0x40(%rsp),%rdi
  sub    %esi,%eax
  mov    %eax,(%rdi)
  test   %esi,%esi
  je     L351
  lea    -0x1(%rsi),%edi
  mov    %edi,0x48(%rsp)
  mov    %edi,%ebp
  jle    L124
L217:
  mov    0x10(%rsp),%eax
  mov    0x28(%rsp),%rcx
  sub    %ebp,%eax
  mov    %eax,(%rcx)
  test   %ebp,%ebp
  je     L133
  lea    -0x1(%rbp),%eax
  mov    %eax,0x30(%rsp)
  jle    L345
  mov    %eax,0x20(%rsp)
  lea    -0x2(%rbp),%eax
  mov    %eax,(%rsp)
  lea    -0x3(%rbp),%eax
  mov    %eax,0x4(%rsp)
  mov    %ebp,0x34(%rsp)
L62:
  mov    0x34(%rsp),%eax
  mov    0x20(%rsp),%ecx
  mov    0x58(%rsp),%rsi
  sub    %ecx,%eax
  mov    %eax,(%rsi)
  test   %ecx,%ecx
  je     L131
  mov    0x4(%rsp),%r12d
  mov    (%rsp),%ebx
  jle    L12
L31:
  mov    0x20(%rsp),%eax
  mov    0x60(%rsp),%rsi
  sub    %ebx,%eax
  mov    %eax,(%rsi)
  test   %ebx,%ebx
  je     L218
  mov    %r12d,%ebp
  jle    L58
L14:
  mov    0x18(%rsp),%rcx
  mov    %ebx,%eax
  sub    %ebp,%eax
  mov    %eax,(%rcx)
  test   %ebp,%ebp
  je     L429
  mov    $0x1,%r15d
  jle    L100
  mov    %r13,%rax
  mov    %r12d,%r13d
  mov    %ebx,%r12d
  mov    %rax,%rbx
L306:
  mov    0x8(%rsp),%rax
  mov    0x14(%rsp),%esi
  mov    %ebp,%edx
  mov    %rbx,%rdi
  sub    %r15d,%edx
  mov    %r15d,(%rax)
  add    $0x1,%r15d
  call   <partition2>
  cmp    %ebp,%r15d
  jle    L306
  mov    %rbx,%rax
  mov    %r12d,%ebx
  mov    %r13d,%r12d
  mov    %rax,%r13
L100:
  sub    $0x1,%ebp
  mov    %ebx,%eax
  sub    %ebp,%eax
  cmp    %eax,%ebx
  jge    L14
L58:
  mov    0x20(%rsp),%esi
  sub    $0x1,%ebx
  sub    $0x1,%r12d
  mov    %esi,%eax
  sub    %ebx,%eax
  cmp    %esi,%eax
  jle    L31
L12:
  mov    0x34(%rsp),%ecx
  subl   $0x1,0x20(%rsp)
  mov    0x20(%rsp),%edi
  subl   $0x1,(%rsp)
  mov    %ecx,%eax
  subl   $0x1,0x4(%rsp)
  sub    %edi,%eax
  cmp    %eax,%ecx
  jge    L62
L345:
  mov    0x10(%rsp),%ecx
  mov    0x30(%rsp),%ebp
  mov    %ecx,%eax
  sub    %ebp,%eax
  cmp    %ecx,%eax
  jle    L217
L124:
  mov    0x38(%rsp),%edi
  mov    0x48(%rsp),%esi
  mov    %edi,%eax
  mov    %esi,0x10(%rsp)
  sub    %esi,%eax
  cmp    %eax,%edi
  jge    L297
  mov    %r13,%rax
  mov    %r14d,%r13d
  mov    %rax,%r14
L207:
  mov    0x4c(%rsp),%ecx
  mov    0x84(%rsp),%edx
  mov    %ecx,%eax
  mov    %edx,0x38(%rsp)
  sub    %edx,%eax
  cmp    %ecx,%eax
  jle    L168
  mov    %r13d,%r15d
L176:
  mov    0x50(%rsp),%esi
  mov    0x80(%rsp),%edi
  mov    %esi,%eax
  mov    %edi,0x4c(%rsp)
  sub    %edi,%eax
  cmp    %eax,%esi
  jge    L316
L272:
  mov    0x68(%rsp),%edx
  mov    0x6c(%rsp),%ecx
  mov    %edx,%eax
  mov    %ecx,0x50(%rsp)
  sub    %ecx,%eax
  cmp    %eax,%edx
  jge    L119
L299:
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L429:
  mov    %r14d,%esi
  mov    %r13,%rdi
  call   <isValid@plt>
  cmp    $0x1,%eax
  jne    L100
  mov    %r14d,%esi
  mov    %r13,%rdi
  call   <printPartition@plt>
  jmp    L100
  nopl   0x0(%rax)
L218:
  mov    0x24(%rsp),%esi
  mov    %r13,%rdi
  call   <isValid@plt>
  cmp    $0x1,%eax
  jne    L58
  mov    0x24(%rsp),%esi
  mov    %r13,%rdi
  call   <printPartition@plt>
  jmp    L58
L131:
  mov    0x3c(%rsp),%esi
  mov    %r13,%rdi
  call   <isValid@plt>
  cmp    $0x1,%eax
  jne    L12
  mov    0x3c(%rsp),%esi
  mov    %r13,%rdi
  call   <printPartition@plt>
  jmp    L12
L133:
  mov    0x54(%rsp),%esi
  mov    %r13,%rdi
  call   <isValid@plt>
  movl   $0xffffffff,0x30(%rsp)
  cmp    $0x1,%eax
  jne    L345
  mov    0x54(%rsp),%esi
  mov    %r13,%rdi
  call   <printPartition@plt>
  mov    0x10(%rsp),%ecx
  mov    0x30(%rsp),%ebp
  mov    %ecx,%eax
  sub    %ebp,%eax
  cmp    %ecx,%eax
  jle    L217
  jmp    L124
L351:
  mov    0x7c(%rsp),%esi
  mov    %r13,%rdi
  call   <isValid@plt>
  movl   $0xffffffff,0x48(%rsp)
  cmp    $0x1,%eax
  jne    L124
  mov    0x7c(%rsp),%esi
  mov    %r13,%rdi
  call   <printPartition@plt>
  jmp    L124
L422:
  mov    0x78(%rsp),%esi
  mov    %r14,%rdi
  call   <isValid@plt>
  movl   $0xffffffff,0x84(%rsp)
  cmp    $0x1,%eax
  jne    L207
  mov    0x78(%rsp),%esi
  mov    %r14,%rdi
  call   <printPartition@plt>
  jmp    L207
L437:
  mov    0x74(%rsp),%esi
  mov    %r14,%rdi
  call   <isValid@plt>
  movl   $0xffffffff,0x80(%rsp)
  cmp    $0x1,%eax
  jne    L176
  mov    0x74(%rsp),%esi
  mov    %r14,%rdi
  call   <printPartition@plt>
  jmp    L176
L409:
  mov    0x70(%rsp),%esi
  mov    %r14,%rdi
  call   <isValid@plt>
  cmp    $0x1,%eax
  je     L23
  movl   $0xffffffff,0x6c(%rsp)
  jmp    L272
L73:
  call   <isValid@plt>
  cmp    $0x1,%eax
  jne    L299
  add    $0xa8,%rsp
  mov    %r14d,%esi
  mov    %r15,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <printPartition@plt>
L23:
  mov    0x70(%rsp),%esi
  mov    %r14,%rdi
  call   <printPartition@plt>
  movl   $0xffffffff,0x6c(%rsp)
  jmp    L272
```

assistant: ```c
void partition2(int *arr, int ind, int left) {
  int val;
  if (left == 0) {
    if (isValid(arr, ind) == 1) {
      printPartition(arr, ind);
    }
    return;
  }
  for (val = 1; val <= left; val++) {
    arr[ind] = val;
    partition2(arr, ind + 1, left - val);
  }
}
```