user: Converte this assembly snippet into its equivalent C code:

```asm
<even_old_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
  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
L45:
  cmp    %rdx,%rsp
  je     L110
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L45
L110:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L61
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L61:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x4c(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <select_sort@plt>
  movl   $0x0,-0x34(%rbp)
  jmp    L43
L16:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L100
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  addq   $0x4,-0x30(%rbp)
L100:
  addl   $0x1,-0x34(%rbp)
L43:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L16
  movl   $0x0,-0x34(%rbp)
  jmp    L108
L69:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L50
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  addq   $0x4,-0x30(%rbp)
L50:
  addl   $0x1,-0x34(%rbp)
L108:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L69
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L7
L33:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    -0x34(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x34(%rbp)
L7:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L33
  mov    %rbx,%rsp
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L92
  call   <__stack_chk_fail@plt>
L92:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void even_old_sort(int *p, int size) {
  int temp[size];
  int *q = temp;
  int i;
  select_sort(p, size);
  for (i = 0; i < size; i++) {
    if (p[i] % 2 != 0) {
      *q = p[i];
      q++;
    }
  }
  for (i = 0; i < size; i++) {
    if (p[i] % 2 == 0) {
      *q = p[i];
      q++;
    }
  }
  q = temp;
  for (i = 0; i < size; i++) {
    p[i] = q[i];
  }
}
```