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

```asm
<findK>:
  endbr64
  mov    %rdi,%r9
  mov    %esi,%eax
  mov    %rdx,%rdi
  test   %esi,%esi
  je     L133
  push   %r14
  push   %rbx
  sub    $0x8,%rsp
  mov    %ecx,%esi
  movslq %eax,%rdx
  mov    (%rdi),%ebx
  cmp    %ebx,-0x4(%r9,%rdx,4)
  jle    L20
  mov    (%r9),%edx
  movslq %ecx,%rcx
  cmp    %edx,-0x4(%rdi,%rcx,4)
  jle    L38
  cmp    $0x1,%eax
  je     L176
  cmp    $0x1,%esi
  je     L140
  mov    %eax,%r10d
  shr    $0x1f,%r10d
  add    %eax,%r10d
  sar    %r10d
  mov    %esi,%edx
  shr    $0x1f,%edx
  add    %esi,%edx
  sar    %edx
  mov    %edx,%r11d
  movslq %edx,%rcx
  lea    (%rdi,%rcx,4),%rbx
  movslq %r10d,%rcx
  mov    (%rbx),%r14d
  cmp    %r14d,(%r9,%rcx,4)
  jl     L206
  lea    (%r10,%rdx,1),%ecx
  cmp    %r8d,%ecx
  jge    L63
  lea    0x1(%rdx),%ecx
  test   $0x1,%sil
  cmovne %ecx,%r11d
  sub    %edx,%r8d
  mov    %eax,%ecx
  mov    %r9,%rdx
  mov    %r11d,%esi
  mov    %rbx,%rdi
  call   <findK>
  jmp    L41
L133:
  movslq %r8d,%r8
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x4(%rdx,%r8,4),%xmm0
  ret
L20:
  cmp    %r8d,%eax
  jge    L205
  sub    %eax,%r8d
  movslq %r8d,%r8
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x4(%rdi,%r8,4),%xmm0
L41:
  add    $0x8,%rsp
  pop    %rbx
  pop    %r14
  ret
L205:
  movslq %r8d,%r8
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x4(%r9,%r8,4),%xmm0
  jmp    L41
L38:
  cmp    %r8d,%esi
  jge    L50
  sub    %esi,%r8d
  movslq %r8d,%r8
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x4(%r9,%r8,4),%xmm0
  jmp    L41
L50:
  movslq %r8d,%r8
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x4(%rdi,%r8,4),%xmm0
  jmp    L41
L176:
  mov    %esi,%eax
  shr    $0x1f,%eax
  add    %esi,%eax
  sar    %eax
  mov    %eax,%r11d
  movslq %eax,%rcx
  lea    (%rdi,%rcx,4),%r10
  cmp    (%r10),%edx
  jge    L149
  lea    0x1(%rax),%r11d
  cmp    %r8d,%r11d
  jge    L43
  test   $0x1,%sil
  cmove  %eax,%r11d
  sub    %eax,%r8d
  mov    $0x1,%ecx
  mov    %r9,%rdx
  mov    %r11d,%esi
  mov    %r10,%rdi
  call   <findK>
  jmp    L41
L43:
  mov    $0x1,%ecx
  mov    %r9,%rdx
  mov    %eax,%esi
  call   <findK>
  jmp    L41
L149:
  cmp    %r8d,%eax
  jge    L196
  lea    0x1(%rax),%edx
  test   $0x1,%sil
  cmovne %edx,%r11d
  sub    %eax,%r8d
  mov    %r11d,%ecx
  mov    %r10,%rdx
  mov    $0x1,%esi
  mov    %r9,%rdi
  call   <findK>
  jmp    L41
L196:
  mov    %eax,%ecx
  mov    %rdi,%rdx
  mov    $0x0,%esi
  mov    %r9,%rdi
  call   <findK>
  jmp    L41
L140:
  mov    %eax,%ecx
  mov    %r9,%rdx
  call   <findK>
  jmp    L41
L63:
  mov    %esi,%ecx
  mov    %rdi,%rdx
  mov    %r10d,%esi
  mov    %r9,%rdi
  call   <findK>
  jmp    L41
L206:
  mov    %eax,%ecx
  mov    %r9,%rdx
  call   <findK>
  jmp    L41
```

assistant: ```c
double findK(int *n1, int s1, int *n2, int s2, int k) {
  if (s1 == 0)
    return n2[k - 1];
  if (n1[s1 - 1] <= n2[0])
    return (double)(k > s1 ? n2[k - s1 - 1] : n1[k - 1]);
  if (n2[s2 - 1] <= n1[0])
    return (double)(k > s2 ? n1[k - s2 - 1] : n2[k - 1]);
  if (s1 == 1) {
    if (n1[0] < n2[s2 / 2]) {
      if (k <= s2 / 2 + 1)
        return findK(n2, s2 / 2, n1, s1, k);
      else
        return findK(&(n2[s2 / 2]), (s2 % 2 ? s2 / 2 + 1 : s2 / 2), n1, s1, k - s2 / 2);
    } else {
      if (k <= s2 / 2)
        return findK(n1, 0, n2, s2 / 2, k);
      else
        return findK(n1, s1, &(n2[s2 / 2]), (s2 % 2 ? s2 / 2 + 1 : s2 / 2), k - s2 / 2);
    }
  }
  if (s2 == 1) {
    return findK(n2, s2, n1, s1, k);
  }
  if (n1[s1 / 2] >= n2[s2 / 2]) {
    if (k <= s1 / 2 + s2 / 2)
      return findK(n1, s1 / 2, n2, s2, k);
    else
      return findK(&(n2[s2 / 2]), (s2 % 2 ? s2 / 2 + 1 : s2 / 2), n1, s1, k - s2 / 2);
  } else
    return findK(n2, s2, n1, s1, k);
}
```