user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<findMedianSortedArraysWithin4>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  cmpl   $0x2,-0xc(%rbp)
  jne    L65
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D27(%rip),%xmm1
  divsd  %xmm1,%xmm0
  jmp    L217
L65:
  cmpl   $0x3,-0xc(%rbp)
  jne    L130
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L7
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L7
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  jmp    L217
L7:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L245
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L245
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  jmp    L217
L245:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  jmp    L217
L130:
  cmpl   $0x4,-0xc(%rbp)
  jne    L156
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L198
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jl     L133
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L133
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jl     L133
L198:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D27(%rip),%xmm1
  divsd  %xmm1,%xmm0
  jmp    L217
L133:
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L237
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jl     L233
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L233
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L233
L237:
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D27(%rip),%xmm1
  divsd  %xmm1,%xmm0
  jmp    L217
L233:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L276
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jl     L276
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D27(%rip),%xmm1
  divsd  %xmm1,%xmm0
  jmp    L217
L276:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jl     L156
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L156
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D27(%rip),%xmm1
  divsd  %xmm1,%xmm0
  jmp    L217
L156:
  jmp    L119
L217:
  movq   %xmm0,%rax
L119:
  movq   %rax,%xmm0
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D27
type: f64

tool: D27: 2

assistant: ```c
double findMedianSortedArraysWithin4(int *nums, int numsSize) {
  if (numsSize == 2) {
    return (nums[0] + nums[1]) / 2.0;
  }
  if (numsSize == 3) {
    if (nums[0] < nums[1] && nums[1] < nums[2]) {
      return nums[1];
    }
    if (nums[0] < nums[2] && nums[2] < nums[1]) {
      return nums[2];
    }
    return nums[0];
  }
  if (numsSize == 4) {
    if (nums[3] <= nums[0] || (nums[0] >= nums[2] && nums[0] <= nums[3] && nums[1] >= nums[3]))
      return (nums[0] + nums[3]) / 2.0;
    if (nums[1] <= nums[2] || (nums[1] >= nums[2] && nums[0] <= nums[2] && nums[1] <= nums[3]))
      return (nums[1] + nums[2]) / 2.0;
    if (nums[0] <= nums[2] && nums[1] >= nums[3])
      return (nums[2] + nums[3]) / 2.0;
    if (nums[0] >= nums[2] && nums[1] <= nums[3])
      return (nums[0] + nums[1]) / 2.0;
  }
}
```