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

```asm
<findMedianSortedArrays>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %ecx,-0x50(%rbp)
  mov    -0x4c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L162
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x50(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x50(%rbp)
L162:
  movl   $0x0,-0x38(%rbp)
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  movl   $0xffffffff,-0x30(%rbp)
  jmp    L51
L126:
  mov    -0x34(%rbp),%edx
  mov    -0x38(%rbp),%eax
  mov    %eax,%esi
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x38(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x20(%rbp)
  mov    -0x4c(%rbp),%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  add    $0x1,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  sub    -0x20(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  cmpl   $0x0,-0x20(%rbp)
  jle    L83
  mov    -0x1c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jge    L83
  mov    -0x20(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L213
L83:
  mov    $0x1,%eax
  jmp    L259
L213:
  mov    $0x0,%eax
L259:
  mov    %eax,-0x18(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jle    L129
  mov    -0x20(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jge    L129
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L73
L129:
  mov    $0x1,%eax
  jmp    L133
L73:
  mov    $0x0,%eax
L133:
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  cmpl   $0x0,-0x18(%rbp)
  je     L77
  cmpl   $0x0,-0x14(%rbp)
  je     L77
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  jmp    L180
L77:
  cmpl   $0x0,-0x18(%rbp)
  jne    L57
  mov    -0x20(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  jmp    L51
L57:
  cmpl   $0x0,-0x14(%rbp)
  jne    L51
  mov    -0x20(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x38(%rbp)
L51:
  mov    -0x38(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L126
L180:
  cmpl   $0xffffffff,-0x30(%rbp)
  jne    L139
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x30(%rbp)
L139:
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x4c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  sub    -0x10(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0x10(%rbp)
  jg     L235
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L153
L235:
  cmpl   $0x0,-0xc(%rbp)
  jg     L254
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L153
L254:
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  mov    %eax,-0x2c(%rbp)
L153:
  mov    -0x10(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L174
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x28(%rbp)
  jmp    L104
L174:
  mov    -0xc(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L216
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x28(%rbp)
  jmp    L104
L216:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
  mov    %eax,-0x28(%rbp)
L104:
  mov    -0xc(%rbp),%edx
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D58(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x28(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x4c(%rbp),%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L251
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x2c(%rbp),%xmm0
  jmp    L11
L251:
  mov    -0x2c(%rbp),%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D7(%rip),%xmm1
  divsd  %xmm1,%xmm0
L11:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D9
type_infered: string
name: retrieve_data
arguments: label: D55
type_infered: string
name: retrieve_data
arguments: label: D1
type_infered: string
name: retrieve_data
arguments: label: D58
type_infered: string
name: retrieve_data
arguments: label: D43
type_infered: string
name: retrieve_data
arguments: label: D7
type_infered: f64

tool: D9: lo: %d, hi: %d


tool: D55: i: %d, j: %d


tool: D1: f1: %d, f2: %d


tool: D58: fi: %d, fj: %d


tool: D43: maxL: %d, minR: %d


tool: D7: 2

assistant: ```c
double findMedianSortedArrays(int *nums1, int nums1Size, int *nums2, int nums2Size) {
  int lo, hi;
  if (nums1Size >= nums2Size) {
    int *p = nums1;
    nums1 = nums2;
    nums2 = p;
    int t = nums1Size;
    nums1Size = nums2Size;
    nums2Size = t;
  }
  lo = 0;
  hi = nums1Size - 1;
  int aidx = -1;
  while (lo <= hi) {
    printf("lo: %d, hi: %d\n", lo, hi);
    int i = (lo + hi) / 2;
    int j = (nums1Size + nums2Size + 1) / 2 - i;
    printf("i: %d, j: %d\n", i, j);
    int f1, f2;
    f1 = i - 1 < 0 || j >= nums2Size || nums1[i - 1] <= nums2[j];
    f2 = j - 1 < 0 || i >= nums1Size || nums2[j - 1] <= nums1[i];
    printf("f1: %d, f2: %d\n", f1, f2);
    if (f1 && f2) {
      aidx = i;
      break;
    }
    if (!f1) {
      hi = i - 1;
    } else if (!f2) {
      lo = i + 1;
    }
  }
  if (aidx == -1)
    aidx = lo;
  int i = aidx;
  int j = (1 + nums1Size + nums2Size) / 2 - i;
  int maxL, minR;
  if (i < 1)
    maxL = nums2[j - 1];
  else if (j < 1)
    maxL = nums1[i - 1];
  else
    maxL = ((nums1[i - 1]) > (nums2[j - 1]) ? (nums1[i - 1]) : (nums2[j - 1]));
  if (i >= nums1Size)
    minR = nums2[j];
  else if (j >= nums2Size)
    minR = nums1[i];
  else
    minR = ((nums1[i]) < (nums2[j]) ? (nums1[i]) : (nums2[j]));
  printf("fi: %d, fj: %d\n", i, j);
  printf("maxL: %d, minR: %d\n", maxL, minR);
  if ((nums1Size + nums2Size) & 1) {
    return maxL;
  } else {
    return (maxL + minR) / 2.0;
  }
}
```