user: 请将以下的汇编代码转换成C语言代码：

```asm
<partition>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x108,%rsp
  mov    %esi,0xdc(%rsp)
  mov    %edx,0xc0(%rsp)
  test   %edx,%edx
  je     L536
  jle    L132
  movslq %esi,%rax
  shl    $0x2,%rax
  lea    -0x4(%rdi,%rax,1),%rdi
  add    %r14,%rax
  mov    %rax,0xf8(%rsp)
  lea    0x1(%rsi),%eax
  mov    %eax,0xd8(%rsp)
  cltq
  shl    $0x2,%rax
  mov    %rdi,0xf0(%rsp)
  lea    -0x4(%r14,%rax,1),%rbx
  add    %r14,%rax
  mov    %rax,0xe8(%rsp)
  lea    0x2(%rsi),%eax
  mov    %eax,0xac(%rsp)
  cltq
  shl    $0x2,%rax
  mov    %rbx,0xe0(%rsp)
  lea    -0x4(%r14,%rax,1),%rdi
  add    %r14,%rax
  mov    %rax,0xd0(%rsp)
  lea    0x3(%rsi),%eax
  mov    %eax,0xa0(%rsp)
  cltq
  shl    $0x2,%rax
  mov    %rdi,0xc8(%rsp)
  lea    -0x4(%r14,%rax,1),%rbx
  add    %r14,%rax
  mov    %rax,0xb8(%rsp)
  lea    0x4(%rsi),%eax
  mov    %eax,0x60(%rsp)
  cltq
  shl    $0x2,%rax
  mov    %rbx,0xb0(%rsp)
  lea    -0x4(%r14,%rax,1),%rdi
  add    %r14,%rax
  mov    %rax,0x90(%rsp)
  lea    0x5(%rsi),%eax
  mov    %eax,0x34(%rsp)
  cltq
  shl    $0x2,%rax
  mov    %rdi,0x88(%rsp)
  lea    -0x4(%r14,%rax,1),%rbx
  add    %r14,%rax
  mov    %rax,0x68(%rsp)
  lea    0x6(%rsi),%eax
  mov    %eax,0x18(%rsp)
  cltq
  shl    $0x2,%rax
  mov    %rbx,0x58(%rsp)
  lea    -0x4(%r14,%rax,1),%rdi
  add    %r14,%rax
  mov    %rax,0x48(%rsp)
  lea    0x7(%rsi),%eax
  mov    %eax,0xc(%rsp)
  cltq
  shl    $0x2,%rax
  mov    %rdi,0x40(%rsp)
  lea    -0x4(%r14,%rax,1),%r12
  add    %r14,%rax
  mov    %rax,0x20(%rsp)
  lea    0x8(%rsi),%eax
  mov    %eax,0x30(%rsp)
  cltq
  shl    $0x2,%rax
  mov    %r12,0x70(%rsp)
  mov    %r14,%r12
  lea    -0x4(%r14,%rax,1),%r13
  add    %r14,%rax
  mov    %rax,0x98(%rsp)
  mov    0xc0(%rsp),%eax
  mov    %r13,%r14
  sub    $0x1,%eax
  mov    %eax,0x64(%rsp)
  lea    0x9(%rsi),%eax
  mov    %eax,0xa4(%rsp)
L418:
  mov    0xc0(%rsp),%edx
  mov    0x64(%rsp),%edi
  mov    0xdc(%rsp),%ebx
  sub    %edi,%edx
  test   %ebx,%ebx
  je     L438
  mov    0xf0(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  and    $0x1,%eax
  sub    %ecx,%eax
  mov    %edx,%ecx
  and    $0x1,%ecx
  cmp    %ecx,%eax
  jne    L438
  lea    -0x1(%rdi),%eax
  mov    %eax,0xc4(%rsp)
L342:
  mov    0xc0(%rsp),%ebx
  mov    0xc4(%rsp),%esi
  mov    %ebx,%eax
  mov    %esi,0x64(%rsp)
  sub    %esi,%eax
  cmp    %eax,%ebx
  jge    L418
L132:
  add    $0x108,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L438:
  mov    0xf8(%rsp),%rax
  mov    0x64(%rsp),%edi
  mov    %r14,%r15
  mov    %edx,(%rax)
  lea    -0x1(%rdi),%eax
  mov    %eax,0xc4(%rsp)
  mov    %eax,0x50(%rsp)
  test   %edi,%edi
  je     L241
L373:
  mov    0x64(%rsp),%edx
  mov    0x50(%rsp),%edi
  mov    0xd8(%rsp),%r11d
  sub    %edi,%edx
  test   %r11d,%r11d
  je     L278
  mov    0xe0(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  and    $0x1,%eax
  sub    %ecx,%eax
  mov    %edx,%ecx
  and    $0x1,%ecx
  cmp    %ecx,%eax
  jne    L278
  lea    -0x1(%rdi),%eax
  mov    %eax,0xa8(%rsp)
L23:
  mov    0x64(%rsp),%ebx
  mov    0xa8(%rsp),%esi
  mov    %ebx,%eax
  mov    %esi,0x50(%rsp)
  sub    %esi,%eax
  cmp    %eax,%ebx
  jge    L373
  mov    %r15,%r14
  jmp    L342
  xchg   %ax,%ax
L278:
  mov    0xe8(%rsp),%rax
  mov    %edx,(%rax)
  mov    0x50(%rsp),%eax
  test   %eax,%eax
  je     L429
  lea    -0x1(%rax),%ebx
  mov    %r15,%r13
  mov    %ebx,0xa8(%rsp)
  mov    %ebx,0x1c(%rsp)
  jle    L23
L398:
  mov    0x50(%rsp),%edx
  mov    0x1c(%rsp),%edi
  mov    0xac(%rsp),%r10d
  sub    %edi,%edx
  test   %r10d,%r10d
  je     L69
  mov    0xc8(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  and    $0x1,%eax
  sub    %ecx,%eax
  mov    %edx,%ecx
  and    $0x1,%ecx
  cmp    %ecx,%eax
  jne    L69
  lea    -0x1(%rdi),%eax
  mov    %eax,0x84(%rsp)
L336:
  mov    0x50(%rsp),%ebx
  mov    0x84(%rsp),%edi
  mov    %ebx,%eax
  mov    %edi,0x1c(%rsp)
  sub    %edi,%eax
  cmp    %ebx,%eax
  jle    L398
  mov    %r13,%r15
  jmp    L23
  nopl   0x0(%rax,%rax,1)
L69:
  mov    0xd0(%rsp),%rax
  mov    %edx,(%rax)
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  je     L516
  lea    -0x1(%rax),%ebx
  mov    %r13,%r14
  mov    %ebx,0x84(%rsp)
  mov    %ebx,%ebp
  jle    L336
L59:
  mov    0x1c(%rsp),%edx
  mov    0xa0(%rsp),%r9d
  sub    %ebp,%edx
  test   %r9d,%r9d
  je     L312
  mov    0xb0(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  and    $0x1,%eax
  sub    %ecx,%eax
  mov    %edx,%ecx
  and    $0x1,%ecx
  cmp    %ecx,%eax
  jne    L312
  lea    -0x1(%rbp),%eax
  mov    %eax,0x54(%rsp)
L276:
  mov    0x1c(%rsp),%edi
  mov    0x54(%rsp),%ebp
  mov    %edi,%eax
  sub    %ebp,%eax
  cmp    %eax,%edi
  jge    L59
  mov    %r14,%r13
  jmp    L336
  nopl   0x0(%rax,%rax,1)
L312:
  mov    0xb8(%rsp),%rax
  mov    %edx,(%rax)
  test   %ebp,%ebp
  je     L474
  lea    -0x1(%rbp),%eax
  mov    %eax,0x54(%rsp)
  jle    L276
  mov    %ebp,0x28(%rsp)
  mov    %r14,%r13
  mov    %eax,%ebp
L628:
  mov    0x28(%rsp),%edx
  mov    0x60(%rsp),%r8d
  sub    %ebp,%edx
  test   %r8d,%r8d
  je     L573
  mov    0x88(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  and    $0x1,%eax
  sub    %ecx,%eax
  mov    %edx,%ecx
  and    $0x1,%ecx
  cmp    %ecx,%eax
  jne    L573
  lea    -0x1(%rbp),%eax
  mov    %eax,0x2c(%rsp)
L538:
  mov    0x28(%rsp),%edi
  mov    0x2c(%rsp),%ebp
  mov    %edi,%eax
  sub    %ebp,%eax
  cmp    %edi,%eax
  jle    L628
  mov    %r13,%r14
  jmp    L276
  nopw   0x0(%rax,%rax,1)
L573:
  mov    0x90(%rsp),%rax
  mov    %edx,(%rax)
  test   %ebp,%ebp
  je     L348
  lea    -0x1(%rbp),%eax
  mov    %eax,0x2c(%rsp)
  jle    L538
  mov    %ebp,0x10(%rsp)
  mov    0x34(%rsp),%edi
  mov    %eax,%r14d
  mov    0x10(%rsp),%edx
  sub    %r14d,%edx
  test   %edi,%edi
  je     L518
L622:
  mov    0x58(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  and    $0x1,%eax
  sub    %ecx,%eax
  mov    %edx,%ecx
  and    $0x1,%ecx
  cmp    %ecx,%eax
  jne    L518
  lea    -0x1(%r14),%eax
  mov    %eax,0x14(%rsp)
L455:
  mov    0x10(%rsp),%edi
  mov    0x14(%rsp),%r14d
  mov    %edi,%eax
  sub    %r14d,%eax
  cmp    %eax,%edi
  jl     L538
  mov    0x10(%rsp),%edx
  mov    0x34(%rsp),%edi
  sub    %r14d,%edx
  test   %edi,%edi
  jne    L622
L518:
  mov    0x68(%rsp),%rax
  mov    %edx,(%rax)
  test   %r14d,%r14d
  je     L32
  lea    -0x1(%r14),%eax
  mov    %eax,0x14(%rsp)
  jle    L455
  mov    %r12,%r15
  mov    %r14d,%r12d
  mov    %eax,%r14d
L601:
  mov    0x18(%rsp),%esi
  mov    %r12d,%edx
  sub    %r14d,%edx
  test   %esi,%esi
  je     L18
  mov    0x40(%rsp),%rax
  lea    -0x1(%r14),%ebx
  mov    (%rax),%eax
  mov    %eax,%esi
  shr    $0x1f,%esi
  add    %esi,%eax
  and    $0x1,%eax
  sub    %esi,%eax
  mov    %edx,%esi
  and    $0x1,%esi
  cmp    %esi,%eax
  jne    L18
L371:
  mov    %r12d,%eax
  mov    %ebx,%r14d
  sub    %ebx,%eax
  cmp    %r12d,%eax
  jle    L601
  mov    %r15,%r12
  jmp    L455
  nopl   0x0(%rax,%rax,1)
L18:
  mov    0x48(%rsp),%rax
  mov    %edx,(%rax)
  test   %r14d,%r14d
  je     L344
  lea    -0x1(%r14),%ebx
  mov    %ebx,%ebp
  jle    L371
  mov    %r12d,0x38(%rsp)
  mov    %r14d,%r12d
  mov    0x70(%rsp),%r14
  mov    %ebx,0x3c(%rsp)
  mov    %r15,%rbx
  mov    %ebp,%r15d
L383:
  mov    0xc(%rsp),%ecx
  mov    %r12d,%edx
  sub    %r15d,%edx
  test   %ecx,%ecx
  je     L210
  mov    (%r14),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  and    $0x1,%eax
  sub    %ecx,%eax
  mov    %edx,%ecx
  and    $0x1,%ecx
  cmp    %ecx,%eax
  jne    L210
L13:
  sub    $0x1,%r15d
  mov    %r12d,%eax
  sub    %r15d,%eax
  cmp    %r12d,%eax
  jle    L383
  mov    %rbx,%r15
  mov    0x38(%rsp),%r12d
  mov    0x3c(%rsp),%ebx
  jmp    L371
  nopl   (%rax)
L210:
  mov    0x20(%rsp),%rax
  mov    %edx,(%rax)
  test   %r15d,%r15d
  je     L239
  jle    L13
  mov    0x30(%rsp),%eax
  mov    $0x1,%ebp
  test   %eax,%eax
  je     L322
L532:
  mov    0x0(%r13),%eax
  mov    %ebp,%ecx
  and    $0x1,%ecx
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  and    $0x1,%eax
  sub    %edx,%eax
  cmp    %eax,%ecx
  jne    L525
L372:
  add    $0x1,%ebp
  cmp    %ebp,%r15d
  jge    L532
  jmp    L13
  xchg   %ax,%ax
L322:
  mov    %r13,%rax
  mov    %r12d,0x80(%rsp)
  mov    0xa4(%rsp),%r12d
  mov    %r15d,%r13d
  mov    %r14,0x78(%rsp)
  mov    %rbx,%r14
  mov    0x98(%rsp),%rbx
  mov    %rax,%r15
L76:
  mov    %ebp,(%rbx)
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    %r14,%rdi
  sub    %ebp,%edx
  add    $0x1,%ebp
  call   <partition>
  cmp    %ebp,%r13d
  jge    L76
  mov    %r15,%rax
  mov    %r14,%rbx
  mov    %r13d,%r15d
  mov    0x78(%rsp),%r14
  mov    0x80(%rsp),%r12d
  mov    %rax,%r13
  jmp    L13
  nopl   0x0(%rax)
L239:
  mov    0x30(%rsp),%esi
  mov    %rbx,%rdi
  call   <printPartition@plt>
  jmp    L13
  nopl   0x0(%rax)
L344:
  mov    0xc(%rsp),%esi
  mov    %r15,%rdi
  mov    $0xffffffff,%ebx
  call   <printPartition@plt>
  jmp    L371
  cs nopw 0x0(%rax,%rax,1)
L32:
  mov    0x18(%rsp),%esi
  mov    %r12,%rdi
  call   <printPartition@plt>
  movl   $0xffffffff,0x14(%rsp)
  jmp    L455
  nopl   0x0(%rax)
L348:
  mov    0x34(%rsp),%esi
  mov    %r12,%rdi
  call   <printPartition@plt>
  movl   $0xffffffff,0x2c(%rsp)
  jmp    L538
L474:
  mov    0x60(%rsp),%esi
  mov    %r12,%rdi
  call   <printPartition@plt>
  movl   $0xffffffff,0x54(%rsp)
  jmp    L276
L516:
  mov    0xa0(%rsp),%esi
  mov    %r12,%rdi
  call   <printPartition@plt>
  movl   $0xffffffff,0x84(%rsp)
  jmp    L336
  nopl   0x0(%rax)
L525:
  mov    0x98(%rsp),%rax
  mov    %r15d,%edx
  mov    0xa4(%rsp),%esi
  mov    %rbx,%rdi
  sub    %ebp,%edx
  mov    %ebp,(%rax)
  call   <partition>
  jmp    L372
L429:
  mov    0xac(%rsp),%esi
  mov    %r12,%rdi
  call   <printPartition@plt>
  movl   $0xffffffff,0xa8(%rsp)
  jmp    L23
L241:
  mov    0xd8(%rsp),%esi
  mov    %r12,%rdi
  call   <printPartition@plt>
  movl   $0xffffffff,0xc4(%rsp)
  jmp    L342
L536:
  add    $0x108,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <printPartition@plt>
```

assistant: ```c
void partition(int *arr, int ind, int left) {
  int val;
  if (left == 0) {
    printPartition(arr, ind);
    return;
  }
  for (val = 1; val <= left; val++) {
    int valid = 0;
    if (ind == 0) {
      valid = 1;
    } else {
      valid = (arr[ind - 1] % 2) != (val % 2);
    }
    if (valid == 1) {
      arr[ind] = val;
      partition(arr, ind + 1, left - val);
    }
  }
}
```