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

```asm
<median_select>:
  endbr64
  lea    -0x1(%rsi),%r11d
  push   %rbx
  mov    %edi,%r9d
  mov    %rdx,%rcx
  xor    %r10d,%r10d
  cmp    $0x1,%r11d
  jbe    L33
  mov    $0x1,%edi
  nopl   0x0(%rax)
L114:
  lea    (%r10,%r11,1),%eax
  shr    %eax
  lea    (%rcx,%rax,4),%rdx
  mov    %edi,%eax
  lea    (%rcx,%rax,4),%rax
  movss  (%rdx),%xmm1
  movss  (%rax),%xmm0
  movss  %xmm0,(%rdx)
  mov    %r11d,%edx
  lea    (%rcx,%rdx,4),%rdx
  movss  %xmm1,(%rax)
  movss  (%rdx),%xmm0
  comiss %xmm0,%xmm1
  jbe    L91
  movss  %xmm0,(%rax)
  movaps %xmm1,%xmm0
  movss  %xmm1,(%rdx)
L91:
  mov    %r10d,%esi
  lea    (%rcx,%rsi,4),%rbx
  movss  (%rbx),%xmm1
  comiss %xmm0,%xmm1
  jbe    L23
  movss  %xmm0,(%rbx)
  movss  %xmm1,(%rdx)
  movss  (%rbx),%xmm1
L23:
  movss  (%rax),%xmm0
  comiss %xmm1,%xmm0
  jbe    L25
  movss  %xmm1,(%rax)
  movaps %xmm0,%xmm1
  movss  %xmm0,(%rbx)
L25:
  mov    %r11d,%eax
  cs nopw 0x0(%rax,%rax,1)
L18:
  add    $0x1,%edi
  mov    %edi,%edx
  lea    (%rcx,%rdx,4),%r8
  movss  (%r8),%xmm2
  comiss %xmm2,%xmm1
  ja     L18
  nopl   0x0(%rax,%rax,1)
L59:
  lea    -0x1(%rax),%edx
  mov    %eax,%esi
  mov    %rdx,%rax
  lea    (%rcx,%rdx,4),%rdx
  movss  (%rdx),%xmm0
  comiss %xmm1,%xmm0
  ja     L59
  cmp    %eax,%edi
  ja     L48
  movss  %xmm0,(%r8)
  movss  %xmm2,(%rdx)
  jmp    L18
  nopl   0x0(%rax)
L48:
  movss  %xmm0,(%rbx)
  movss  %xmm1,(%rdx)
  cmp    %r9d,%eax
  jb     L102
  cmove  %rdi,%r10
  lea    -0x2(%rsi),%r11d
L71:
  lea    0x1(%r10),%edi
  cmp    %r11d,%edi
  jb     L114
L85:
  cmp    %r11d,%edi
  je     L95
L56:
  mov    %r9d,%r9d
  pop    %rbx
  movss  (%rcx,%r9,4),%xmm0
  ret
L102:
  mov    %edi,%r10d
  jmp    L71
L95:
  lea    (%rcx,%rdi,4),%rax
  lea    (%rcx,%r10,4),%rdx
  movss  (%rax),%xmm1
  movss  (%rdx),%xmm0
  comiss %xmm1,%xmm0
  jbe    L56
  mov    %r9d,%r9d
  movss  %xmm1,(%rdx)
  movss  %xmm0,(%rax)
  movss  (%rcx,%r9,4),%xmm0
  pop    %rbx
  ret
L33:
  mov    $0x1,%edi
  jmp    L85
```

assistant: ```c
float median_select(k, n, arr)
float arr[];
unsigned int k, n;
{
  unsigned int i, ir, j, l, mid;
  float a, temp;
  l = 0;
  ir = n - 1;
  for (;;) {
    if (ir <= l + 1) {
      if (ir == l + 1 && arr[ir] < arr[l]) {
        temp = (arr[l]);
        (arr[l]) = (arr[ir]);
        (arr[ir]) = temp;
      }
      return arr[k];
    } else {
      mid = (l + ir) >> 1;
      temp = (arr[mid]);
      (arr[mid]) = (arr[l + 1]);
      (arr[l + 1]) = temp;
      if (arr[l + 1] > arr[ir]) {
        temp = (arr[l + 1]);
        (arr[l + 1]) = (arr[ir]);
        (arr[ir]) = temp;
      }
      if (arr[l] > arr[ir]) {
        temp = (arr[l]);
        (arr[l]) = (arr[ir]);
        (arr[ir]) = temp;
      }
      if (arr[l + 1] > arr[l]) {
        temp = (arr[l + 1]);
        (arr[l + 1]) = (arr[l]);
        (arr[l]) = temp;
      }
      i = l + 1;
      j = ir;
      a = arr[l];
      for (;;) {
        do
          i++;
        while (arr[i] < a);
        do
          j--;
        while (arr[j] > a);
        if (j < i)
          break;
        temp = (arr[i]);
        (arr[i]) = (arr[j]);
        (arr[j]) = temp;
      }
      arr[l] = arr[j];
      arr[j] = a;
      if (j >= k)
        ir = j - 1;
      if (j <= k)
        l = i;
    }
  }
}
```