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

```asm
<getcase>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movsd  %xmm0,-0x18(%rbp)
  movsd  %xmm1,-0x20(%rbp)
  movsd  %xmm2,-0x28(%rbp)
  movsd  %xmm3,-0x30(%rbp)
  movsd  -0x30(%rbp),%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L283
  movsd  -0x30(%rbp),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L269
  movsd  -0x30(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L252
  movl   $0xffffffff,-0x4(%rbp)
  jmp    L343
L252:
  movl   $0x2,-0x4(%rbp)
  jmp    L343
L269:
  movsd  -0x20(%rbp),%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jp     L68
  movsd  -0x20(%rbp),%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jne    L68
  movsd  -0x30(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L243
  movl   $0x1,-0x4(%rbp)
  jmp    L343
L243:
  movl   $0x0,-0x4(%rbp)
  jmp    L343
L68:
  movsd  -0x30(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L164
  movl   $0x1,-0x4(%rbp)
  jmp    L343
L164:
  movl   $0x0,-0x4(%rbp)
  jmp    L343
L283:
  movsd  -0x18(%rbp),%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jp     L344
  movsd  -0x18(%rbp),%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jne    L344
  movsd  -0x30(%rbp),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L373
  movsd  -0x30(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L64
  movl   $0x0,-0x4(%rbp)
  jmp    L343
L64:
  movl   $0x1,-0x4(%rbp)
  jmp    L343
L373:
  movsd  -0x20(%rbp),%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jp     L16
  movsd  -0x20(%rbp),%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jne    L16
  movsd  -0x28(%rbp),%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jp     L54
  movsd  -0x28(%rbp),%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jne    L54
  movl   $0xffffffff,-0x4(%rbp)
  jmp    L343
L54:
  movl   $0x2,-0x4(%rbp)
  jmp    L343
L16:
  movsd  -0x28(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  jbe    L216
  movl   $0x0,-0x4(%rbp)
  jmp    L343
L216:
  movl   $0x1,-0x4(%rbp)
  jmp    L343
L344:
  movsd  -0x30(%rbp),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L23
  movsd  -0x30(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L223
  movl   $0x0,-0x4(%rbp)
  jmp    L343
L223:
  movl   $0x1,-0x4(%rbp)
  jmp    L343
L23:
  movsd  -0x20(%rbp),%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jp     L14
  movsd  -0x20(%rbp),%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jne    L14
  movsd  -0x28(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  jbe    L294
  movl   $0x1,-0x4(%rbp)
  jmp    L343
L294:
  movl   $0x0,-0x4(%rbp)
  jmp    L343
L14:
  movsd  -0x28(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  jbe    L159
  movl   $0xffffffff,-0x4(%rbp)
  jmp    L343
L159:
  movl   $0x2,-0x4(%rbp)
L343:
  mov    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
getcase(s0, s1, s2, c) double s0, s1, s2, c;
{
  int instance;
  if (s0 < c)
    if (s1 < c)
      if (s2 < c)
        instance = -1;
      else
        instance = 2;
    else if (s1 == c)
      if (s2 < c)
        instance = 1;
      else
        instance = 0;
    else if (s2 < c)
      instance = 1;
    else
      instance = 0;
  else if (s0 == c)
    if (s1 < c)
      if (s2 < c)
        instance = 0;
      else
        instance = 1;
    else if (s1 == c)
      if (s2 == c)
        instance = -1;
      else
        instance = 2;
    else if (s2 > c)
      instance = 0;
    else
      instance = 1;
  else if (s1 < c)
    if (s2 < c)
      instance = 0;
    else
      instance = 1;
  else if (s1 == c)
    if (s2 > c)
      instance = 1;
    else
      instance = 0;
  else if (s2 > c)
    instance = -1;
  else
    instance = 2;
  return (instance);
}
```