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

```asm
<int_sort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  cmp    $0x1,%esi
  je     L128
  mov    %rdi,%r12
  mov    %esi,%ebx
  cmp    $0x2,%esi
  je     L84
  cmp    $0x3,%esi
  jne    L174
  mov    0x4(%rdi),%eax
  cmp    %eax,(%rdi)
  jg     L224
  lea    0x4(%rdi),%r13
  cmp    0x8(%rdi),%eax
  jle    L128
L45:
  lea    0x8(%r12),%rsi
  mov    %r13,%rdi
  call   <swap@plt>
  mov    0x4(%r12),%eax
L152:
  cmp    %eax,(%r12)
  jle    L128
L222:
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <swap@plt>
  nopl   0x0(%rax,%rax,1)
L128:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L59
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L174:
  movslq %esi,%rax
  mov    %rsp,%rcx
  mov    %rsp,%r14
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  and    $0xfffffffffffffff0,%rdx
  sub    %rax,%rcx
L79:
  cmp    %rcx,%rsp
  je     L13
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L79
  nopl   0x0(%rax,%rax,1)
L84:
  mov    (%rdi),%eax
  cmp    %eax,0x4(%rdi)
  jge    L128
  lea    0x4(%rdi),%r13
  jmp    L222
L224:
  lea    0x4(%rdi),%r13
  mov    %r13,%rsi
  call   <swap@plt>
  mov    0x4(%r12),%eax
  cmp    0x8(%r12),%eax
  jle    L152
  jmp    L45
  nopl   0x0(%rax)
L13:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L167
L190:
  mov    %ebx,%r13d
  mov    %r12,%rdi
  mov    %rsp,%r15
  shr    $0x1f,%r13d
  add    %ebx,%r13d
  sar    %r13d
  mov    %r13d,%esi
  call   <int_sort>
  mov    %ebx,%esi
  movslq %r13d,%rax
  sub    %r13d,%esi
  lea    (%r12,%rax,4),%rdi
  call   <int_sort>
  test   %ebx,%ebx
  jle    L186
  mov    %ebx,%edx
  mov    %r15,%rax
  mov    %r13d,%ecx
  xor    %edi,%edi
  lea    (%r15,%rdx,4),%r8
  jmp    L9
  nopw   0x0(%rax,%rax,1)
L1:
  movslq %ecx,%rsi
  mov    (%r12,%rsi,4),%esi
  cmp    %edi,%r13d
  jle    L111
  movslq %edi,%r9
  mov    (%r12,%r9,4),%r9d
  cmp    %esi,%r9d
  jge    L111
  mov    %r9d,%esi
L237:
  mov    %esi,(%rax)
  add    $0x4,%rax
  add    $0x1,%edi
  cmp    %rax,%r8
  je     L0
L9:
  cmp    %ecx,%ebx
  jne    L1
  movslq %edi,%rsi
  mov    (%r12,%rsi,4),%esi
  jmp    L237
  cs nopw 0x0(%rax,%rax,1)
L111:
  mov    %esi,(%rax)
  add    $0x4,%rax
  add    $0x1,%ecx
  cmp    %rax,%r8
  jne    L9
L0:
  shl    $0x2,%rdx
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   <memcpy@plt>
L186:
  mov    %r14,%rsp
  jmp    L128
  nopl   (%rax)
L167:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L190
L59:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void int_sort(int *arr, int n) {
  if (n == 1) {
    return;
  } else if (n == 2) {
    if (arr[1] < arr[0]) {
      swap(&arr[0], &arr[1]);
    }
  } else if (n == 3) {
    if (arr[0] > arr[1])
      swap(&arr[0], &arr[1]);
    if (arr[1] > arr[2])
      swap(&arr[1], &arr[2]);
    if (arr[0] > arr[1])
      swap(&arr[0], &arr[1]);
  } else {
    int res[n];
    int_sort(arr, n / 2);
    int_sort(&arr[n / 2], n - n / 2);
    int i;
    int a = 0;
    int b = n / 2;
    for (i = 0; i < n; i++) {
      if (b == n || (a < n / 2 && arr[a] < arr[b])) {
        res[i] = arr[a];
        a++;
      } else {
        res[i] = arr[b];
        b++;
      }
    }
    for (i = 0; i < n; i++) {
      arr[i] = res[i];
    }
  }
}
```