user: Translate the below assembly code into C programming language:

```asm
<findMedianSortedArrays>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %esi,0xc(%rsp)
  mov    %rdx,0x10(%rsp)
  mov    %ecx,0x24(%rsp)
  cmp    %ecx,%esi
  jl     L142
  mov    %ecx,0xc(%rsp)
  mov    %esi,0x24(%rsp)
  mov    %rdx,0x18(%rsp)
  mov    %rdi,0x10(%rsp)
L142:
  mov    0x24(%rsp),%eax
  mov    0xc(%rsp),%ebx
  lea    0x1(%rbx,%rax,1),%edx
  mov    %ebx,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  shr    $0x1f,%eax
  mov    %ecx,0x28(%rsp)
  add    %edx,%eax
  sar    %eax
  mov    %eax,0x2c(%rsp)
  mov    %eax,%edx
  sub    $0x1,%ebx
  js     L13
  lea    0x1(%rcx),%edx
  xor    %ebp,%ebp
  lea    D28(%rip),%r13
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,0x20(%rsp)
  jmp    L85
  nopl   0x0(%rax)
L21:
  mov    0x18(%rsp),%rcx
  movslq %r14d,%rax
  movslq %r12d,%rdx
  xor    %r10d,%r10d
  lea    0x0(,%rdx,4),%rdi
  mov    -0x4(%rcx,%rax,4),%r15d
  mov    0x10(%rsp),%rcx
  mov    (%rcx,%rdx,4),%r12d
  cmp    %r12d,%r15d
  setle  %r10b
  test   %sil,%sil
  je     L158
L40:
  mov    $0x1,%edx
  mov    %r10d,%esi
  mov    %r13,%rdi
  call   <printf@plt>
  cmp    %r12d,%r15d
  jle    L107
L54:
  lea    -0x1(%r14),%ebx
  cmp    %ebx,%ebp
  jg     L145
L85:
  mov    %ebx,%edx
  lea    D50(%rip),%rdi
  lea    0x0(%rbp,%rbx,1),%r15d
  mov    %ebp,%esi
  call   <printf@plt>
  mov    %r15d,%r14d
  mov    0x20(%rsp),%r12d
  lea    D23(%rip),%rdi
  sar    %r14d
  sub    %r14d,%r12d
  mov    %r14d,%esi
  mov    %r12d,%edx
  call   <printf@plt>
  test   %r12d,%r12d
  setle  %sil
  cmp    %r14d,0xc(%rsp)
  setle  %al
  or     %eax,%esi
  cmp    $0x1,%r15d
  jle    L225
  cmp    %r12d,0x24(%rsp)
  jg     L21
L225:
  test   %sil,%sil
  jne    L80
  mov    0x10(%rsp),%rdi
  mov    0x18(%rsp),%rcx
  movslq %r12d,%rdx
  movslq %r14d,%rax
  mov    -0x4(%rdi,%rdx,4),%edi
  cmp    %edi,(%rcx,%rax,4)
  jge    L80
  xor    %edx,%edx
  mov    $0x1,%esi
  mov    %r13,%rdi
  call   <printf@plt>
L24:
  lea    0x1(%r14),%ebp
  cmp    %ebx,%ebp
  jle    L85
L145:
  mov    0x2c(%rsp),%edx
  sub    %ebp,%edx
  test   %ebp,%ebp
  je     L13
L62:
  mov    0x18(%rsp),%rcx
  movslq %ebp,%rax
  shl    $0x2,%rax
  mov    -0x4(%rcx,%rax,1),%r13d
  test   %edx,%edx
  jle    L53
  mov    0x10(%rsp),%rbx
  movslq %edx,%rcx
  mov    -0x4(%rbx,%rcx,4),%ecx
  cmp    %ecx,%r13d
  cmovl  %ecx,%r13d
L53:
  cmp    %ebp,0xc(%rsp)
  jg     L28
  mov    0x10(%rsp),%rcx
  movslq %edx,%rax
  mov    (%rcx,%rax,4),%ebx
L27:
  mov    %ebp,%esi
  lea    D54(%rip),%rdi
  call   <printf@plt>
  mov    %ebx,%edx
  mov    %r13d,%esi
  lea    D25(%rip),%rdi
  call   <printf@plt>
  testb  $0x1,0x28(%rsp)
  je     L4
  add    $0x38,%rsp
  pxor   %xmm0,%xmm0
  pop    %rbx
  cvtsi2sd %r13d,%xmm0
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L28:
  mov    0x18(%rsp),%rbx
  mov    (%rbx,%rax,1),%ebx
  cmp    %edx,0x24(%rsp)
  jle    L27
  mov    0x10(%rsp),%rcx
  movslq %edx,%rax
  mov    (%rcx,%rax,4),%eax
  cmp    %eax,%ebx
  cmovg  %eax,%ebx
  jmp    L27
L4:
  add    %ebx,%r13d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13d,%xmm0
  mulsd  D11(%rip),%xmm0
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L80:
  mov    $0x1,%edx
  mov    $0x1,%esi
  mov    %r13,%rdi
  mov    %r14d,%ebp
  call   <printf@plt>
  mov    0x2c(%rsp),%edx
  sub    %ebp,%edx
  test   %ebp,%ebp
  jne    L62
L13:
  mov    0x10(%rsp),%rbx
  movslq %edx,%rax
  xor    %ebp,%ebp
  mov    -0x4(%rbx,%rax,4),%r13d
  xor    %eax,%eax
  jmp    L53
  nopl   0x0(%rax)
L158:
  mov    0x18(%rsp),%rdx
  mov    (%rdx,%rax,4),%eax
  cmp    %eax,-0x4(%rcx,%rdi,1)
  jle    L40
  xor    %edx,%edx
  mov    %r10d,%esi
  mov    %r13,%rdi
  call   <printf@plt>
  cmp    %r12d,%r15d
  jg     L54
  jmp    L24
L107:
  mov    %r14d,%ebp
  jmp    L145
```

tool_calls: name: unpack_data
arguments: label: D28
datatype: string
name: unpack_data
arguments: label: D50
datatype: string
name: unpack_data
arguments: label: D23
datatype: string
name: unpack_data
arguments: label: D54
datatype: string
name: unpack_data
arguments: label: D25
datatype: string
name: unpack_data
arguments: label: D11
datatype: byte[8]

tool: D28: f1: %d, f2: %d


tool: D50: lo: %d, hi: %d


tool: D23: i: %d, j: %d


tool: D54: fi: %d, fj: %d


tool: D25: maxL: %d, minR: %d


tool: {"D11": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

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;
  }
}
```