user: Translate the below assembly code into C programming language:

```asm
<QuickSort2>:
  endbr64
  push   %r15
  mov    %rdi,%r9
  push   %r14
  mov    %esi,%r14d
  mov    %edx,%esi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %edx,0x38(%rsp)
L535:
  movslq %r14d,%rbx
  mov    (%r9,%rbx,4),%edx
  mov    %ebx,%ecx
L833:
  cmp    %esi,%ecx
  jg     L935
L610:
  movslq %ecx,%rax
  movslq %esi,%rbp
  shl    $0x2,%rax
  lea    (%r9,%rbp,4),%r11
  lea    (%r9,%rax,1),%r8
  mov    (%r11),%edi
  lea    0x4(%r9,%rax,1),%rax
  mov    (%r8),%r10d
  cmp    %edx,%r10d
  jge    L425
  nopl   (%rax)
L1026:
  mov    %rax,%r8
  mov    (%rax),%r10d
  lea    0x4(%rax),%rax
  add    $0x1,%ecx
  cmp    %edx,%r10d
  jl     L1026
  cmp    %edi,%edx
  jge    L785
L892:
  lea    -0x4(%r9,%rbp,4),%rax
  nopl   0x0(%rax,%rax,1)
L770:
  mov    %rax,%r11
  mov    (%rax),%edi
  sub    $0x4,%rax
  sub    $0x1,%esi
  cmp    %edx,%edi
  jg     L770
L785:
  cmp    %ecx,%esi
  jl     L833
  mov    %edi,(%r8)
  add    $0x1,%ecx
  sub    $0x1,%esi
  mov    %r10d,(%r11)
L525:
  cmp    %esi,%ecx
  jle    L610
L935:
  mov    %ecx,0x10(%rsp)
  mov    %esi,0x18(%rsp)
  cmp    %r14d,%esi
  jg     L756
L261:
  mov    0x38(%rsp),%ebx
  cmp    %ebx,0x10(%rsp)
  jge    L429
  mov    0x10(%rsp),%r14d
  mov    %ebx,%esi
  jmp    L535
L425:
  cmp    %edi,%edx
  jl     L892
  mov    %edi,(%r8)
  add    $0x1,%ecx
  sub    $0x1,%esi
  mov    %r10d,(%r11)
  jmp    L525
L196:
  mov    %ecx,0x1c(%rsp)
  mov    %esi,0x20(%rsp)
  cmp    %ecx,%r14d
  jl     L576
L411:
  mov    0x20(%rsp),%ebx
  cmp    %ebx,0x18(%rsp)
  jle    L261
  movslq %ebx,%rbx
  mov    %ebx,%r14d
L756:
  mov    (%r9,%rbx,4),%edx
  mov    0x18(%rsp),%ecx
  mov    %r14d,%esi
L810:
  cmp    %ecx,%esi
  jg     L196
  movslq %esi,%rax
  movslq %ecx,%rbp
  shl    $0x2,%rax
  lea    (%r9,%rbp,4),%r11
  lea    (%r9,%rax,1),%r8
  mov    (%r11),%edi
  lea    0x4(%r9,%rax,1),%rax
  mov    (%r8),%r10d
  cmp    %r10d,%edx
  jle    L0
  nop
L23:
  mov    %rax,%r8
  mov    (%rax),%r10d
  lea    0x4(%rax),%rax
  add    $0x1,%esi
  cmp    %r10d,%edx
  jg     L23
  cmp    %edi,%edx
  jge    L287
L409:
  lea    -0x4(%r9,%rbp,4),%rax
  nopl   0x0(%rax,%rax,1)
L950:
  mov    %rax,%r11
  mov    (%rax),%edi
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edi,%edx
  jl     L950
L287:
  cmp    %esi,%ecx
  jl     L810
  mov    %edi,(%r8)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r10d,(%r11)
  jmp    L810
L0:
  cmp    %edi,%edx
  jl     L409
  mov    %edi,(%r8)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r10d,(%r11)
  jmp    L810
L486:
  mov    %ecx,0x24(%rsp)
  mov    %esi,0x28(%rsp)
  cmp    %ecx,%r14d
  jl     L125
L689:
  mov    0x28(%rsp),%ebx
  cmp    %ebx,0x1c(%rsp)
  jle    L411
  movslq %ebx,%rbx
  mov    %ebx,%r14d
L576:
  mov    (%r9,%rbx,4),%edx
  mov    0x1c(%rsp),%ecx
  mov    %r14d,%esi
  nopl   0x0(%rax)
L659:
  cmp    %ecx,%esi
  jg     L486
  movslq %esi,%rax
  movslq %ecx,%rbp
  shl    $0x2,%rax
  lea    (%r9,%rbp,4),%r11
  lea    (%r9,%rax,1),%r8
  mov    (%r11),%edi
  lea    0x4(%r9,%rax,1),%rax
  mov    (%r8),%r10d
  cmp    %r10d,%edx
  jle    L172
  xchg   %ax,%ax
L302:
  mov    %rax,%r8
  mov    (%rax),%r10d
  lea    0x4(%rax),%rax
  add    $0x1,%esi
  cmp    %r10d,%edx
  jg     L302
  cmp    %edi,%edx
  jge    L301
L802:
  lea    -0x4(%r9,%rbp,4),%rax
  nopl   0x0(%rax,%rax,1)
L679:
  mov    %rax,%r11
  mov    (%rax),%edi
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edi,%edx
  jl     L679
L301:
  cmp    %esi,%ecx
  jl     L659
  mov    %edi,(%r8)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r10d,(%r11)
  jmp    L659
L172:
  cmp    %edi,%edx
  jl     L802
  mov    %edi,(%r8)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r10d,(%r11)
  jmp    L659
L569:
  mov    %edx,0x2c(%rsp)
  mov    %ecx,0x30(%rsp)
  cmp    %edx,%r14d
  jl     L848
L438:
  mov    0x30(%rsp),%ebx
  cmp    %ebx,0x24(%rsp)
  jle    L689
  movslq %ebx,%rbx
  mov    %ebx,%r14d
L125:
  mov    (%r9,%rbx,4),%esi
  mov    0x24(%rsp),%edx
  mov    %r14d,%ecx
  nopl   0x0(%rax)
L310:
  cmp    %edx,%ecx
  jg     L569
  movslq %ecx,%rax
  movslq %edx,%rbp
  shl    $0x2,%rax
  lea    (%r9,%rbp,4),%r11
  lea    (%r9,%rax,1),%rdi
  mov    (%r11),%r10d
  lea    0x4(%r9,%rax,1),%rax
  mov    (%rdi),%r8d
  cmp    %r8d,%esi
  jle    L339
  xchg   %ax,%ax
L581:
  mov    %rax,%rdi
  mov    (%rax),%r8d
  lea    0x4(%rax),%rax
  add    $0x1,%ecx
  cmp    %r8d,%esi
  jg     L581
  cmp    %r10d,%esi
  jge    L603
L716:
  lea    -0x4(%r9,%rbp,4),%rax
  nopl   0x0(%rax)
L186:
  mov    %rax,%r11
  mov    (%rax),%r10d
  sub    $0x4,%rax
  sub    $0x1,%edx
  cmp    %r10d,%esi
  jl     L186
L603:
  cmp    %ecx,%edx
  jl     L310
  mov    %r10d,(%rdi)
  add    $0x1,%ecx
  sub    $0x1,%edx
  mov    %r8d,(%r11)
  jmp    L310
L339:
  cmp    %r10d,%esi
  jl     L716
  mov    %r10d,(%rdi)
  add    $0x1,%ecx
  sub    $0x1,%edx
  mov    %r8d,(%r11)
  jmp    L310
L848:
  mov    %r9,%r11
L333:
  mov    (%r11,%rbx,4),%edx
  mov    0x2c(%rsp),%ecx
  mov    %r14d,%esi
L24:
  cmp    %ecx,%esi
  jg     L1038
  movslq %esi,%rax
  movslq %ecx,%rbp
  shl    $0x2,%rax
  lea    (%r11,%rbp,4),%r10
  lea    (%r11,%rax,1),%r9
  mov    (%r10),%edi
  lea    0x4(%r11,%rax,1),%rax
  mov    (%r9),%r8d
  cmp    %r8d,%edx
  jle    L128
  nop
L200:
  mov    %rax,%r9
  mov    (%rax),%r8d
  lea    0x4(%rax),%rax
  add    $0x1,%esi
  cmp    %r8d,%edx
  jg     L200
  cmp    %edi,%edx
  jge    L889
L420:
  lea    -0x4(%r11,%rbp,4),%rax
  nopl   0x0(%rax,%rax,1)
L839:
  mov    %rax,%r10
  mov    (%rax),%edi
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edi,%edx
  jl     L839
L889:
  cmp    %ecx,%esi
  jle    L356
L1038:
  mov    %ecx,0x14(%rsp)
  mov    %esi,0x34(%rsp)
  cmp    %ecx,%r14d
  jl     L16
L283:
  mov    0x34(%rsp),%ebx
  cmp    %ebx,0x2c(%rsp)
  jle    L313
  movslq %ebx,%rbx
  mov    %ebx,%r14d
  jmp    L333
L967:
  cmp    %r15d,%r14d
  jl     L478
L626:
  cmp    %r10d,0x14(%rsp)
  jle    L283
  movslq %r10d,%rbx
  mov    %ebx,%r14d
L16:
  mov    (%r11,%rbx,4),%edx
  mov    0x14(%rsp),%r15d
  mov    %r14d,%r10d
L466:
  cmp    %r15d,%r10d
  jg     L967
  movslq %r10d,%rax
  movslq %r15d,%r9
  shl    $0x2,%rax
  lea    (%r11,%r9,4),%r8
  lea    (%r11,%rax,1),%rdi
  mov    (%r8),%ecx
  lea    0x4(%r11,%rax,1),%rax
  mov    (%rdi),%esi
  cmp    %edx,%esi
  jge    L649
  nopl   (%rax)
L667:
  mov    %rax,%rdi
  mov    (%rax),%esi
  lea    0x4(%rax),%rax
  add    $0x1,%r10d
  cmp    %esi,%edx
  jg     L667
  cmp    %ecx,%edx
  jge    L134
L520:
  lea    -0x4(%r11,%r9,4),%rax
  nopw   0x0(%rax,%rax,1)
L176:
  mov    %rax,%r8
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%r15d
  cmp    %ecx,%edx
  jl     L176
L134:
  cmp    %r10d,%r15d
  jl     L466
  mov    %ecx,(%rdi)
  add    $0x1,%r10d
  sub    $0x1,%r15d
  mov    %esi,(%r8)
  jmp    L466
L649:
  cmp    %ecx,%edx
  jl     L520
  mov    %ecx,(%rdi)
  add    $0x1,%r10d
  sub    $0x1,%r15d
  mov    %esi,(%r8)
  jmp    L466
L128:
  cmp    %edi,%edx
  jl     L420
L356:
  mov    %edi,(%r9)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r8d,(%r10)
  jmp    L24
L478:
  mov    %r15d,0xc(%rsp)
  mov    %r11,%r15
  mov    %r10d,0x3c(%rsp)
  mov    %r14d,%r10d
L190:
  mov    (%r15,%rbx,4),%edx
  mov    0xc(%rsp),%r13d
  mov    %r10d,%r14d
  nopl   (%rax)
L59:
  cmp    %r13d,%r14d
  jg     L360
L426:
  movslq %r14d,%rax
  movslq %r13d,%r9
  shl    $0x2,%rax
  lea    (%r15,%r9,4),%r8
  lea    (%r15,%rax,1),%rdi
  mov    (%r8),%ecx
  lea    0x4(%r15,%rax,1),%rax
  mov    (%rdi),%esi
  cmp    %edx,%esi
  jge    L908
  nopl   (%rax)
L978:
  mov    %rax,%rdi
  mov    (%rax),%esi
  lea    0x4(%rax),%rax
  add    $0x1,%r14d
  cmp    %esi,%edx
  jg     L978
  cmp    %ecx,%edx
  jge    L888
L115:
  lea    -0x4(%r15,%r9,4),%rax
  nopw   0x0(%rax,%rax,1)
L431:
  mov    %rax,%r8
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%r13d
  cmp    %ecx,%edx
  jl     L431
L888:
  cmp    %r14d,%r13d
  jl     L59
  mov    %ecx,(%rdi)
  add    $0x1,%r14d
  sub    $0x1,%r13d
  mov    %esi,(%r8)
L912:
  cmp    %r13d,%r14d
  jle    L426
L360:
  cmp    %r13d,%r10d
  jl     L789
L412:
  cmp    %r14d,0xc(%rsp)
  jle    L767
  movslq %r14d,%rbx
  mov    %rbx,%r10
  jmp    L190
L908:
  cmp    %ecx,%edx
  jl     L115
  mov    %ecx,(%rdi)
  add    $0x1,%r14d
  sub    $0x1,%r13d
  mov    %esi,(%r8)
  jmp    L912
L387:
  cmp    %ebp,%r10d
  jl     L913
L719:
  cmp    %r12d,%r13d
  jle    L412
  movslq %r12d,%rbx
  mov    %rbx,%r10
L789:
  mov    (%r15,%rbx,4),%edx
  mov    %r13d,%ebp
  mov    %r10d,%r12d
  nopl   0x0(%rax)
L296:
  cmp    %ebp,%r12d
  jg     L387
  movslq %r12d,%rax
  movslq %ebp,%r9
  shl    $0x2,%rax
  lea    (%r15,%r9,4),%r8
  lea    (%r15,%rax,1),%rdi
  mov    (%r8),%ecx
  lea    0x4(%r15,%rax,1),%rax
  mov    (%rdi),%esi
  cmp    %edx,%esi
  jge    L552
  nopl   (%rax)
L336:
  mov    %rax,%rdi
  mov    (%rax),%esi
  lea    0x4(%rax),%rax
  add    $0x1,%r12d
  cmp    %esi,%edx
  jg     L336
  cmp    %ecx,%edx
  jge    L1023
L500:
  lea    -0x4(%r15,%r9,4),%rax
  nopw   0x0(%rax,%rax,1)
L884:
  mov    %rax,%r8
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%ebp
  cmp    %ecx,%edx
  jl     L884
L1023:
  cmp    %r12d,%ebp
  jl     L296
  mov    %ecx,(%rdi)
  add    $0x1,%r12d
  sub    $0x1,%ebp
  mov    %esi,(%r8)
  jmp    L296
L552:
  cmp    %ecx,%edx
  jl     L500
  mov    %ecx,(%rdi)
  add    $0x1,%r12d
  sub    $0x1,%ebp
  mov    %esi,(%r8)
  jmp    L296
L651:
  cmp    %edx,%r10d
  jl     L435
L80:
  cmp    %ebx,%ebp
  jle    L719
  movslq %ebx,%rbx
  mov    %rbx,%r10
L913:
  mov    (%r15,%rbx,4),%edi
  mov    %ebp,%edx
  mov    %r10d,%ebx
  nopl   (%rax)
L586:
  cmp    %edx,%ebx
  jg     L651
  movslq %ebx,%rax
  movslq %edx,%r11
  shl    $0x2,%rax
  lea    (%r15,%r11,4),%r9
  lea    (%r15,%rax,1),%rsi
  mov    (%r9),%r8d
  lea    0x4(%r15,%rax,1),%rax
  mov    (%rsi),%ecx
  cmp    %edi,%ecx
  jge    L1008
  nopl   0x0(%rax)
L300:
  mov    %rax,%rsi
  mov    (%rax),%ecx
  lea    0x4(%rax),%rax
  add    $0x1,%ebx
  cmp    %ecx,%edi
  jg     L300
  cmp    %r8d,%edi
  jge    L914
L826:
  lea    -0x4(%r15,%r11,4),%rax
  nopw   0x0(%rax,%rax,1)
L177:
  mov    %rax,%r9
  mov    (%rax),%r8d
  sub    $0x4,%rax
  sub    $0x1,%edx
  cmp    %r8d,%edi
  jl     L177
L914:
  cmp    %ebx,%edx
  jl     L586
  mov    %r8d,(%rsi)
  add    $0x1,%ebx
  sub    $0x1,%edx
  mov    %ecx,(%r9)
  jmp    L586
  nopl   0x0(%rax)
L1008:
  cmp    %r8d,%edi
  jl     L826
  mov    %r8d,(%rsi)
  add    $0x1,%ebx
  sub    $0x1,%edx
  mov    %ecx,(%r9)
  jmp    L586
L767:
  mov    0x3c(%rsp),%r10d
  mov    %r15,%r11
  jmp    L626
L313:
  mov    %r11,%r9
  jmp    L438
L429:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L435:
  mov    %r10d,%esi
  mov    %r15,%rdi
  call   <QuickSort2>
  jmp    L80
```

assistant: ```c
void QuickSort2(int arr[], int left, int right) {
  int i = left, j = right;
  int tmp;
  int pivot = arr[left];
  while (i <= j) {
    while (arr[i] < pivot)
      i++;
    while (arr[j] > pivot)
      j--;
    if (i <= j) {
      tmp = arr[i];
      arr[i] = arr[j];
      arr[j] = tmp;
      i++;
      j--;
    }
  };
  if (left < j)
    QuickSort2(arr, left, j);
  if (i < right)
    QuickSort2(arr, i, right);
}
```