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

```asm
<f1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  movslq %edi,%rbx
  sub    $0x18,%rsp
  test   %esi,%esi
  jne    L8
  mov    (%rdx,%rbx,4),%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L8:
  mov    %esi,%edx
  shr    $0x1f,%edx
  add    %esi,%edx
  sar    %edx
  jne    L33
  mov    (%r12,%rbx,4),%ebp
  mov    0x4(%r12,%rbx,4),%eax
L7:
  cmp    %ebp,%eax
  cmovl  %ebp,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L33:
  test   %esi,%esi
  lea    0x3(%rsi),%ecx
  lea    0x1(%rbx,%rdx,1),%r8d
  cmovns %esi,%ecx
  sar    $0x2,%ecx
  mov    %ecx,%r13d
  jne    L38
  mov    (%r12,%rbx,4),%eax
  mov    0x4(%r12,%rbx,4),%ebp
  movslq %r8d,%r8
  mov    (%r12,%r8,4),%ecx
  cmp    %eax,%ebp
  cmovl  %eax,%ebp
  mov    0x4(%r12,%r8,4),%eax
L66:
  cmp    %ecx,%eax
  cmovl  %ecx,%eax
  jmp    L7
  cs nopw 0x0(%rax,%rax,1)
L38:
  test   %esi,%esi
  lea    0x7(%rsi),%r14d
  lea    0x1(%rbx,%rcx,1),%ebp
  cmovns %esi,%r14d
  sar    $0x3,%r14d
  jne    L17
  mov    (%r12,%rbx,4),%edx
  movslq %ebp,%rax
  mov    0x4(%r12,%rbx,4),%ebp
  cmp    %edx,%ebp
  cmovl  %edx,%ebp
  mov    0x4(%r12,%rax,4),%edx
  mov    (%r12,%rax,4),%eax
  cmp    %edx,%ebp
  cmovl  %edx,%ebp
  cmp    %eax,%ebp
  cmovl  %eax,%ebp
  movslq %r8d,%rax
  mov    0x4(%r12,%rax,4),%ecx
  mov    (%r12,%rax,4),%eax
  cmp    %eax,%ecx
  cmovl  %eax,%ecx
  lea    0x1(%r8,%r13,1),%eax
  cltq
  mov    (%r12,%rax,4),%r13d
  mov    0x4(%r12,%rax,4),%eax
L18:
  cmp    %r13d,%eax
  cmovl  %r13d,%eax
  jmp    L66
  nopw   0x0(%rax,%rax,1)
L17:
  test   %esi,%esi
  lea    0xf(%rsi),%r15d
  mov    %ebx,%edi
  mov    %r12,%rdx
  cmovns %esi,%r15d
  mov    %r8d,0xc(%rsp)
  sar    $0x4,%r15d
  mov    %r15d,%esi
  call   <f1>
  lea    0x1(%rbx,%r15,1),%edi
  mov    %r12,%rdx
  mov    %r15d,%esi
  mov    %eax,0x4(%rsp)
  call   <f1>
  mov    0x4(%rsp),%ecx
  mov    %r12,%rdx
  mov    %r15d,%esi
  lea    0x1(%rbx,%r14,1),%edi
  cmp    %eax,%ecx
  mov    %edi,0x4(%rsp)
  cmovl  %eax,%ecx
  mov    %ecx,0x8(%rsp)
  call   <f1>
  mov    0x4(%rsp),%edi
  mov    %r12,%rdx
  mov    %r15d,%esi
  mov    %eax,%ebx
  lea    0x1(%rdi,%r15,1),%edi
  call   <f1>
  mov    0x8(%rsp),%ecx
  mov    %ebp,%edi
  mov    %r12,%rdx
  mov    %r15d,%esi
  cmp    %ecx,%ebx
  cmovl  %ecx,%ebx
  cmp    %eax,%ebx
  cmovge %ebx,%eax
  mov    %eax,0x8(%rsp)
  call   <f1>
  lea    0x1(%rbp,%r15,1),%edi
  mov    %r12,%rdx
  mov    %r15d,%esi
  mov    %eax,%ebx
  lea    0x1(%rbp,%r14,1),%ebp
  call   <f1>
  mov    %ebp,%edi
  mov    %r12,%rdx
  mov    %r15d,%esi
  cmp    %eax,%ebx
  cmovge %ebx,%eax
  mov    %eax,0x4(%rsp)
  call   <f1>
  lea    0x1(%rbp,%r15,1),%edi
  mov    %r12,%rdx
  mov    %r15d,%esi
  mov    %eax,%ebx
  call   <f1>
  mov    0x8(%rsp),%r9d
  mov    %r12,%rdx
  mov    %r15d,%esi
  cmp    %eax,%ebx
  mov    0x4(%rsp),%ecx
  mov    0xc(%rsp),%r8d
  cmovge %ebx,%eax
  mov    %r8d,%edi
  lea    0x1(%r8,%r13,1),%ebx
  mov    %r8d,0x4(%rsp)
  cmp    %r9d,%eax
  mov    %eax,%ebp
  cmovl  %r9d,%ebp
  cmp    %ecx,%ebp
  cmovl  %ecx,%ebp
  call   <f1>
  mov    0x4(%rsp),%r8d
  mov    %r12,%rdx
  mov    %r15d,%esi
  mov    %eax,%r13d
  lea    0x1(%r8,%r15,1),%edi
  call   <f1>
  mov    0x4(%rsp),%r8d
  mov    %r12,%rdx
  mov    %r15d,%esi
  cmp    %eax,%r13d
  cmovge %r13d,%eax
  lea    0x1(%r8,%r14,1),%edi
  lea    0x1(%rbx,%r14,1),%r14d
  mov    %edi,0x4(%rsp)
  mov    %eax,0x8(%rsp)
  call   <f1>
  mov    0x4(%rsp),%edi
  mov    %r12,%rdx
  mov    %r15d,%esi
  mov    %eax,%r13d
  lea    0x1(%rdi,%r15,1),%edi
  call   <f1>
  mov    0x8(%rsp),%ecx
  mov    %ebx,%edi
  mov    %r12,%rdx
  mov    %r15d,%esi
  cmp    %ecx,%r13d
  cmovge %r13d,%ecx
  cmp    %eax,%ecx
  cmovl  %eax,%ecx
  mov    %ecx,0x4(%rsp)
  call   <f1>
  lea    0x1(%rbx,%r15,1),%edi
  mov    %r12,%rdx
  mov    %r15d,%esi
  mov    %eax,%r13d
  call   <f1>
  mov    %r12,%rdx
  mov    %r15d,%esi
  mov    %r14d,%edi
  cmp    %eax,%r13d
  cmovl  %eax,%r13d
  call   <f1>
  lea    0x1(%r14,%r15,1),%edi
  mov    %r12,%rdx
  mov    %r15d,%esi
  mov    %eax,%ebx
  call   <f1>
  mov    0x4(%rsp),%ecx
  cmp    %eax,%ebx
  cmovge %ebx,%eax
  jmp    L18
```

assistant: ```c
int f1(int p, int q, int a[25]) {
  int m1, m2;
  if (q == 0)
    return (a[p]);
  else {
    m1 = f1(p, q / 2, a);
    m2 = f1(p + q / 2 + 1, q / 2, a);
    if (m1 < m2)
      return (m2);
    else
      return (m1);
  }
}
```