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

```asm
<reorderLevel>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  mov    %edi,0x94(%rsp)
  mov    %rsi,0xf8(%rsp)
  mov    %rdx,0xb0(%rsp)
  mov    %ecx,0xa0(%rsp)
  test   %r8b,%r8b
  je     L129
  movl   $0x1,0xf4(%rsp)
  test   %ecx,%ecx
  jle    L539
L33:
  mov    0x94(%rsp),%ecx
  mov    0xf4(%rsp),%r14d
  movl   $0x0,0x18(%rsp)
  lea    0x1(%rcx),%eax
  mov    %eax,%edx
  mov    %eax,0xa4(%rsp)
  mov    $0x1,%eax
  and    $0x1,%edx
  test   %r14d,%r14d
  cmovne %eax,%edx
  mov    %edx,%edi
  mov    %edx,0x104(%rsp)
  lea    0x2(%rcx),%edx
  mov    %edx,0x88(%rsp)
  mov    %ecx,%edx
  and    $0x1,%edx
  test   %edi,%edi
  cmovne %eax,%edx
  mov    %edx,%ebx
  mov    %edx,0x100(%rsp)
  lea    0x3(%rcx),%edx
  mov    %edx,0x6c(%rsp)
  and    $0x1,%edx
  test   %ebx,%ebx
  mov    %edx,%edi
  lea    0x4(%rcx),%edx
  cmovne %eax,%edi
  mov    %edx,0x60(%rsp)
  mov    %ecx,%edx
  and    $0x1,%edx
  mov    %edx,%ebx
  test   %edi,%edi
  lea    0x5(%rcx),%edx
  mov    %edi,0xf0(%rsp)
  cmovne %eax,%ebx
  mov    %edx,0x40(%rsp)
  and    $0x1,%edx
  mov    %edx,%edi
  mov    %ecx,%edx
  test   %ebx,%ebx
  mov    %ebx,0xe4(%rsp)
  lea    0x6(%rcx),%ebx
  cmovne %eax,%edi
  and    $0x1,%edx
  mov    %ebx,0x24(%rsp)
  mov    %edx,%ebx
  lea    0x7(%rcx),%edx
  test   %edi,%edi
  mov    %edx,0xc(%rsp)
  cmovne %eax,%ebx
  and    $0x1,%edx
  mov    %edi,0xe0(%rsp)
  mov    %edx,%edi
  lea    0x8(%rcx),%edx
  test   %ebx,%ebx
  mov    %edx,0x90(%rsp)
  mov    %ecx,%edx
  cmovne %eax,%edi
  and    $0x1,%edx
  mov    %ebx,0xc4(%rsp)
  test   %edi,%edi
  mov    %edi,0xac(%rsp)
  cmove  %edx,%eax
  mov    %eax,0x80(%rsp)
  lea    0x9(%rcx),%eax
  mov    %eax,0x10c(%rsp)
L288:
  movslq 0x18(%rsp),%rdx
  mov    0xb0(%rsp),%rax
  lea    (%rax,%rdx,4),%rax
  mov    %rax,0x58(%rsp)
  mov    (%rax),%eax
  cmp    0x94(%rsp),%eax
  jl     L189
  jg     L287
L427:
  addl   $0x1,0x18(%rsp)
  mov    0x18(%rsp),%eax
  cmp    %eax,0xa0(%rsp)
  jg     L288
L189:
  mov    0xf4(%rsp),%eax
  test   %eax,%eax
  jne    L286
L211:
  mov    0x18(%rsp),%eax
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L287:
  mov    0xa0(%rsp),%edi
  add    0xf8(%rsp),%rdx
  movl   $0x0,0x30(%rsp)
  sub    0x18(%rsp),%edi
  mov    %rdx,0xe8(%rsp)
  mov    %edi,0x8c(%rsp)
  cmp    %eax,0xa4(%rsp)
  jg     L280
L150:
  jl     L275
L73:
  mov    0x30(%rsp),%eax
  lea    0x1(%rax),%esi
  cmp    %esi,0x8c(%rsp)
  jle    L231
  mov    0x58(%rsp),%rcx
  movslq %esi,%rax
  mov    %esi,0x30(%rsp)
  mov    (%rcx,%rax,4),%eax
  cmp    %eax,0xa4(%rsp)
  jle    L150
L280:
  mov    0x30(%rsp),%eax
  mov    %eax,%esi
  sub    $0x1,%eax
  mov    %eax,0x30(%rsp)
L231:
  mov    0x104(%rsp),%edx
  test   %edx,%edx
  jne    L391
L583:
  mov    0x30(%rsp),%ecx
  add    %ecx,0x18(%rsp)
  jmp    L427
  xchg   %ax,%ax
L275:
  movslq 0x30(%rsp),%rdx
  mov    0x58(%rsp),%rbx
  movl   $0x0,0x1c(%rsp)
  mov    0x8c(%rsp),%edi
  lea    (%rbx,%rdx,4),%rbx
  sub    %edx,%edi
  add    0xe8(%rsp),%rdx
  mov    %rbx,0x70(%rsp)
  mov    %edi,0x68(%rsp)
  mov    %rdx,0xd8(%rsp)
  cmp    %eax,0x88(%rsp)
  jg     L12
L207:
  jl     L460
L572:
  mov    0x1c(%rsp),%eax
  lea    0x1(%rax),%esi
  cmp    %esi,0x68(%rsp)
  jle    L379
  mov    0x70(%rsp),%rbx
  movslq %esi,%rax
  mov    %esi,0x1c(%rsp)
  mov    (%rbx,%rax,4),%eax
  cmp    %eax,0x88(%rsp)
  jle    L207
L12:
  mov    0x1c(%rsp),%eax
  mov    %eax,%esi
  sub    $0x1,%eax
  mov    %eax,0x1c(%rsp)
L379:
  mov    0x100(%rsp),%ecx
  test   %ecx,%ecx
  jne    L193
L153:
  mov    0x1c(%rsp),%ecx
  add    %ecx,0x30(%rsp)
  jmp    L73
  nopl   0x0(%rax)
L460:
  movslq 0x1c(%rsp),%rdx
  mov    0x70(%rsp),%rbx
  xor    %r15d,%r15d
  lea    (%rbx,%rdx,4),%rbx
  mov    %rbx,0x48(%rsp)
  mov    0x68(%rsp),%ebx
  sub    %edx,%ebx
  add    0xd8(%rsp),%rdx
  mov    %ebx,0x44(%rsp)
  mov    %rdx,0xb8(%rsp)
  cmp    %eax,0x6c(%rsp)
  jg     L227
L230:
  jl     L383
L259:
  lea    0x1(%r15),%esi
  cmp    %esi,0x44(%rsp)
  jle    L5
  mov    0x48(%rsp),%rdi
  movslq %esi,%rax
  mov    %esi,%r15d
  mov    (%rdi,%rax,4),%eax
  cmp    %eax,0x6c(%rsp)
  jle    L230
L227:
  mov    %r15d,%esi
  sub    $0x1,%r15d
L5:
  mov    0xf0(%rsp),%edi
  test   %edi,%edi
  jne    L212
L500:
  add    %r15d,0x1c(%rsp)
  jmp    L572
  xchg   %ax,%ax
L383:
  mov    0x48(%rsp),%rcx
  mov    0x44(%rsp),%edi
  movslq %r15d,%rdx
  xor    %r14d,%r14d
  mov    %r15d,0xc0(%rsp)
  mov    %r14d,%r10d
  lea    (%rcx,%rdx,4),%rbx
  sub    %r15d,%edi
  add    0xb8(%rsp),%rdx
  mov    %rbx,0x38(%rsp)
  mov    %edi,0x34(%rsp)
  mov    %rdx,0x98(%rsp)
  cmp    %eax,0x60(%rsp)
  jg     L413
L28:
  jl     L109
  lea    0x1(%r10),%esi
  cmp    %esi,0x34(%rsp)
  jle    L644
L678:
  mov    0x38(%rsp),%rdx
  movslq %esi,%rax
  mov    %esi,%r10d
  mov    (%rdx,%rax,4),%eax
  cmp    %eax,0x60(%rsp)
  jle    L28
L413:
  mov    0xe4(%rsp),%r8d
  mov    %r10d,%r14d
  mov    0xc0(%rsp),%r15d
  mov    %r10d,%esi
  sub    $0x1,%r14d
  test   %r8d,%r8d
  jne    L654
L116:
  add    %r14d,%r15d
  jmp    L259
  nop
L109:
  mov    0x38(%rsp),%rbx
  mov    0x34(%rsp),%edi
  movslq %r10d,%rdx
  xor    %r14d,%r14d
  mov    %r10d,0xa8(%rsp)
  lea    (%rbx,%rdx,4),%rcx
  sub    %r10d,%edi
  add    0x98(%rsp),%rdx
  mov    %rcx,0x28(%rsp)
  mov    %edi,0x20(%rsp)
  mov    %rdx,0x78(%rsp)
  cmp    %eax,0x40(%rsp)
  jg     L461
L293:
  jl     L632
  lea    0x1(%r14),%esi
  cmp    %esi,0x20(%rsp)
  jle    L352
L628:
  mov    0x28(%rsp),%rdi
  movslq %esi,%rax
  mov    %esi,%r14d
  mov    (%rdi,%rax,4),%eax
  cmp    %eax,0x40(%rsp)
  jle    L293
L461:
  mov    0xe0(%rsp),%r9d
  mov    %r14d,%esi
  mov    0xa8(%rsp),%r10d
  sub    $0x1,%r14d
  test   %r9d,%r9d
  jne    L694
L322:
  add    %r14d,%r10d
  lea    0x1(%r10),%esi
  cmp    %esi,0x34(%rsp)
  jg     L678
L644:
  mov    0xe4(%rsp),%r8d
  mov    0xc0(%rsp),%r15d
  mov    %r10d,%r14d
  test   %r8d,%r8d
  je     L116
L654:
  mov    0x98(%rsp),%rdi
  call   <reverse@plt>
  jmp    L116
  nopl   0x0(%rax)
L632:
  mov    0x28(%rsp),%rdi
  movslq %r14d,%rdx
  mov    %r14d,0x84(%rsp)
  xor    %r12d,%r12d
  lea    (%rdi,%rdx,4),%rbx
  add    0x78(%rsp),%rdx
  mov    %rbx,0x10(%rsp)
  mov    0x20(%rsp),%ebx
  mov    %rdx,0x50(%rsp)
  sub    %r14d,%ebx
  mov    %ebx,0x8(%rsp)
  cmp    %eax,0x24(%rsp)
  jg     L135
L258:
  jl     L355
  lea    0x1(%r12),%esi
  cmp    %esi,0x8(%rsp)
  jle    L700
L578:
  mov    0x10(%rsp),%rcx
  movslq %esi,%rax
  mov    %esi,%r12d
  mov    (%rcx,%rax,4),%eax
  cmp    %eax,0x24(%rsp)
  jle    L258
L135:
  mov    0xc4(%rsp),%r10d
  mov    %r12d,%esi
  mov    0x84(%rsp),%r14d
  sub    $0x1,%r12d
  test   %r10d,%r10d
  jne    L636
L72:
  add    %r12d,%r14d
  lea    0x1(%r14),%esi
  cmp    %esi,0x20(%rsp)
  jg     L628
L352:
  mov    0xe0(%rsp),%r9d
  mov    0xa8(%rsp),%r10d
  test   %r9d,%r9d
  je     L322
L694:
  mov    0x78(%rsp),%rdi
  mov    %r10d,0x8(%rsp)
  call   <reverse@plt>
  mov    0x8(%rsp),%r10d
  jmp    L322
  nopl   0x0(%rax,%rax,1)
L355:
  mov    0x8(%rsp),%r14d
  mov    0x10(%rsp),%rdx
  movslq %r12d,%r9
  xor    %ebx,%ebx
  mov    %r12d,0x64(%rsp)
  sub    %r12d,%r14d
  lea    (%rdx,%r9,4),%r11
  add    0x50(%rsp),%r9
  mov    %r14d,%r12d
  cmp    %eax,0xc(%rsp)
  jg     L453
L368:
  jl     L512
  lea    0x1(%rbx),%esi
  cmp    %esi,%r12d
  jle    L668
L130:
  movslq %esi,%rax
  mov    %esi,%ebx
  mov    (%r11,%rax,4),%eax
  cmp    %eax,0xc(%rsp)
  jle    L368
L453:
  mov    0xac(%rsp),%r11d
  mov    %ebx,%esi
  mov    0x64(%rsp),%r12d
  sub    $0x1,%ebx
  test   %r11d,%r11d
  jne    L110
L458:
  add    %ebx,%r12d
  lea    0x1(%r12),%esi
  cmp    %esi,0x8(%rsp)
  jg     L578
L700:
  mov    0xc4(%rsp),%r10d
  mov    0x84(%rsp),%r14d
  test   %r10d,%r10d
  je     L72
L636:
  mov    0x50(%rsp),%rdi
  call   <reverse@plt>
  jmp    L72
  nopl   0x0(%rax,%rax,1)
L512:
  mov    0x90(%rsp),%r10d
  movslq %ebx,%r15
  mov    %r12d,%r13d
  xor    %ebp,%ebp
  lea    (%r11,%r15,4),%r14
  sub    %ebx,%r13d
  add    %r9,%r15
  cmp    %eax,%r10d
  jg     L596
L426:
  jl     L69
  lea    0x1(%rbp),%esi
  cmp    %esi,%r13d
  jle    L62
L424:
  movslq %esi,%rax
  mov    %esi,%ebp
  mov    (%r14,%rax,4),%eax
  cmp    %eax,%r10d
  jle    L426
L596:
  mov    %ebp,%esi
  sub    $0x1,%ebp
L62:
  mov    0x80(%rsp),%r13d
  test   %r13d,%r13d
  jne    L22
  add    %ebp,%ebx
L559:
  lea    0x1(%rbx),%esi
  cmp    %esi,%r12d
  jg     L130
L668:
  mov    0xac(%rsp),%r11d
  mov    0x64(%rsp),%r12d
  test   %r11d,%r11d
  je     L458
L110:
  mov    %r9,%rdi
  call   <reverse@plt>
  jmp    L458
  xchg   %ax,%ax
L22:
  mov    %r15,%rdi
  mov    %r9,0xd0(%rsp)
  add    %ebp,%ebx
  mov    %r11,0xc8(%rsp)
  call   <reverse@plt>
  mov    0xd0(%rsp),%r9
  mov    0xc8(%rsp),%r11
  jmp    L559
  nopl   0x0(%rax)
L69:
  movslq %ebp,%rsi
  mov    0x80(%rsp),%r8d
  mov    %r13d,%ecx
  mov    0x10c(%rsp),%edi
  sub    %ebp,%ecx
  lea    (%r14,%rsi,4),%rdx
  add    %r15,%rsi
  mov    %r10d,0x108(%rsp)
  mov    %r9,0xd0(%rsp)
  mov    %r11,0xc8(%rsp)
  call   <reorderLevel>
  mov    0xc8(%rsp),%r11
  mov    0xd0(%rsp),%r9
  lea    -0x1(%rbp,%rax,1),%ebp
  mov    0x108(%rsp),%r10d
  lea    0x1(%rbp),%esi
  cmp    %esi,%r13d
  jg     L424
  jmp    L62
  nopl   0x0(%rax,%rax,1)
L212:
  mov    0xb8(%rsp),%rdi
  call   <reverse@plt>
  jmp    L500
  nopw   0x0(%rax,%rax,1)
L193:
  mov    0xd8(%rsp),%rdi
  call   <reverse@plt>
  jmp    L153
  nopw   0x0(%rax,%rax,1)
L129:
  mov    %edi,%eax
  mov    0xa0(%rsp),%r15d
  and    $0x1,%eax
  mov    %eax,0xf4(%rsp)
  test   %r15d,%r15d
  jg     L33
  movl   $0x0,0x18(%rsp)
  jmp    L189
  nopw   0x0(%rax,%rax,1)
L391:
  mov    0xe8(%rsp),%rdi
  call   <reverse@plt>
  jmp    L583
L539:
  movl   $0x0,0x18(%rsp)
  nopw   0x0(%rax,%rax,1)
L286:
  mov    0x18(%rsp),%esi
  mov    0xf8(%rsp),%rdi
  call   <reverse@plt>
  jmp    L211
```

assistant: ```c
int reorderLevel(int level, char *pszText, const int *plevel, int cch, char fReverse) {
  int ich;
  fReverse = fReverse || ((level)&1);
  for (ich = 0; ich < cch; ich++) {
    if (plevel[ich] < level) {
      break;
    } else if (plevel[ich] > level) {
      ich += reorderLevel(level + 1, pszText + ich, plevel + ich, cch - ich, fReverse) - 1;
    }
  }
  if (fReverse) {
    reverse(pszText, ich);
  }
  return ich;
}
```