user: What would the C source look like for the assembly code provided here:

```asm
<reorder_array>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L125
  movl   $0x0,-0x14(%rbp)
  jmp    L56
L125:
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L97
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L56
L97:
  movl   $0x1,-0x14(%rbp)
  jmp    L94
L7:
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L59
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jl     L59
  mov    -0x14(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jne    L105
L59:
  addl   $0x1,-0x14(%rbp)
L94:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L7
  jmp    L56
L105:
  nop
L56:
  mov    -0x14(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jge    L22
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x30(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L133
L146:
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x14(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  subl   $0x1,-0x14(%rbp)
L133:
  mov    -0x14(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jg     L146
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  jmp    L134
L22:
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L23
L104:
  mov    -0x14(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x14(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
L23:
  mov    -0x14(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L104
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  mov    %eax,(%rdx)
L134:
  nop
  pop    %rbp
  ret
```

assistant: ```c
void reorder_array(int *array, int arraySize, int pos) {
  int j;
  int k;
  if (array[0] > array[pos])
    k = 0;
  else if (array[arraySize - 1] < array[pos])
    k = arraySize;
  else
    for (k = 1; k < arraySize; k++) {
      if (array[k - 1] <= array[pos] && array[k] >= array[pos] && k != pos)
        break;
    }
  int from, to;
  if (k < pos) {
    from = k;
    to = pos;
    int tmp = array[to];
    for (k = to; k > from; k--)
      array[k] = array[k - 1];
    array[from] = tmp;
  } else {
    from = pos;
    to = k - 1;
    int tmp = array[from];
    for (k = from; k < to; k++)
      array[k] = array[k + 1];
    array[to] = tmp;
  }
}
```