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

```asm
<fnRecMaxMin>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    %rcx,-0x38(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x30(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  cmp    $0x1,%eax
  jne    L117
  mov    -0x2c(%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
  jle    L27
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L110
L27:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L110
L117:
  mov    -0x2c(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jne    L96
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L110
L96:
  mov    -0x2c(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jge    L110
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0xc(%rbp)
  lea    -0x14(%rbp),%rdi
  lea    -0x1c(%rbp),%rcx
  mov    -0xc(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <fnRecMaxMin>
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%esi
  lea    -0x10(%rbp),%rdi
  lea    -0x18(%rbp),%rcx
  mov    -0x30(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <fnRecMaxMin>
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  jle    L68
  mov    -0x1c(%rbp),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L50
L68:
  mov    -0x18(%rbp),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
L50:
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%eax
  cmp    %eax,%edx
  jge    L38
  mov    -0x14(%rbp),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L110
L38:
  mov    -0x10(%rbp),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
L110:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L21
  call   <__stack_chk_fail@plt>
L21:
  leave
  ret
```

assistant: ```c
void fnRecMaxMin(int a[], int low, int high, int *max, int *min) {
  int mid, max1, max2, min1, min2;
  if (high - low == 1) {
    if (a[low] > a[high]) {
      *max = a[low];
      *min = a[high];
    } else {
      *max = a[high];
      *min = a[low];
    }
  } else if (low == high) {
    *min = *max = a[low];
  } else if (low < high) {
    mid = (low + high) / 2;
    fnRecMaxMin(a, low, mid, &max1, &min1);
    fnRecMaxMin(a, mid + 1, high, &max2, &min2);
    if (max1 > max2)
      *max = max1;
    else
      *max = max2;
    if (min1 < min2)
      *min = min1;
    else
      *min = min2;
  }
}
```