user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<int_sort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  cmpl   $0x1,-0x4c(%rbp)
  je     L34
  cmpl   $0x2,-0x4c(%rbp)
  jne    L69
  mov    -0x48(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L179
  mov    -0x48(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <swap@plt>
  jmp    L179
L69:
  cmpl   $0x3,-0x4c(%rbp)
  jne    L30
  mov    -0x48(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x48(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L26
  mov    -0x48(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <swap@plt>
L26:
  mov    -0x48(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x48(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L18
  mov    -0x48(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x48(%rbp),%rax
  add    $0x4,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <swap@plt>
L18:
  mov    -0x48(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x48(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L179
  mov    -0x48(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <swap@plt>
  jmp    L179
L30:
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x28(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L199:
  cmp    %rdx,%rsp
  je     L10
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L199
L10:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L79
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L79:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <int_sort>
  mov    -0x4c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  neg    %eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  add    %eax,%edx
  mov    -0x4c(%rbp),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  sar    %eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <int_sort>
  movl   $0x0,-0x30(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x2c(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L40
L126:
  mov    -0x2c(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  je     L216
  mov    -0x4c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0x30(%rbp)
  jge    L72
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L72
L216:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x20(%rbp),%rax
  mov    -0x34(%rbp),%edx
  movslq %edx,%rdx
  mov    %ecx,(%rax,%rdx,4)
  addl   $0x1,-0x30(%rbp)
  jmp    L167
L72:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x20(%rbp),%rax
  mov    -0x34(%rbp),%edx
  movslq %edx,%rdx
  mov    %ecx,(%rax,%rdx,4)
  addl   $0x1,-0x2c(%rbp)
L167:
  addl   $0x1,-0x34(%rbp)
L40:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L126
  movl   $0x0,-0x34(%rbp)
  jmp    L205
L122:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x20(%rbp),%rax
  mov    -0x34(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,(%rcx)
  addl   $0x1,-0x34(%rbp)
L205:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L122
  mov    %rbx,%rsp
  jmp    L179
L34:
  nop
L179:
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L200
  call   <__stack_chk_fail@plt>
L200:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

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];
    }
  }
}
```