user: Converte this assembly snippet into its equivalent C code:

```asm
<fisTriangleMf>:
  endbr64
  sub    $0x28,%rsp
  movsd  0x8(%rdi),%xmm1
  movsd  0x10(%rdi),%xmm2
  mov    $0x0,%edx
  movsd  (%rdi),%xmm4
  movapd %xmm0,%xmm3
  ucomisd %xmm2,%xmm1
  setnp  %al
  cmovne %edx,%eax
  comisd %xmm1,%xmm4
  ja     L142
  comisd %xmm2,%xmm1
  ja     L190
  ucomisd %xmm1,%xmm4
  setnp  %cl
  cmove  %ecx,%edx
  test   %dl,%dl
  je     L166
  test   %al,%al
  je     L166
  ucomisd %xmm0,%xmm4
  jp     L229
  movsd  D37(%rip),%xmm0
  jne    L229
L185:
  add    $0x28,%rsp
  ret
  nopl   0x0(%rax)
L142:
  lea    D31(%rip),%rdi
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm4,(%rsp)
  movsd  %xmm0,0x18(%rsp)
  call   <fisError@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm4
  movsd  0x10(%rsp),%xmm2
  movsd  0x18(%rsp),%xmm3
  comisd %xmm2,%xmm1
  jbe    L12
L190:
  lea    D59(%rip),%rdi
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm4,(%rsp)
  call   <fisError@plt>
  movsd  (%rsp),%xmm4
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  movsd  0x18(%rsp),%xmm3
  ucomisd %xmm1,%xmm4
  jp     L12
L221:
  jne    L12
  movapd %xmm2,%xmm4
  comisd %xmm1,%xmm3
  movapd %xmm2,%xmm0
  subsd  %xmm1,%xmm4
  subsd  %xmm3,%xmm0
  divsd  %xmm4,%xmm0
  jb     L120
  comisd %xmm3,%xmm2
  jae    L185
L144:
  mulsd  D51(%rip),%xmm0
  add    $0x28,%rsp
  ret
  nopl   0x0(%rax,%rax,1)
L166:
  ucomisd %xmm1,%xmm4
  jnp    L221
  cs nopw 0x0(%rax,%rax,1)
L12:
  movapd %xmm1,%xmm5
  ucomisd %xmm2,%xmm1
  movapd %xmm3,%xmm0
  subsd  %xmm4,%xmm5
  subsd  %xmm4,%xmm0
  divsd  %xmm5,%xmm0
  jp     L106
  je     L36
L106:
  movapd %xmm2,%xmm4
  subsd  %xmm1,%xmm2
  subsd  %xmm3,%xmm4
  divsd  %xmm2,%xmm4
  pxor   %xmm2,%xmm2
  comisd %xmm0,%xmm4
  jbe    L220
  comisd %xmm2,%xmm0
  ja     L185
L108:
  movapd %xmm2,%xmm0
L196:
  add    $0x28,%rsp
  ret
  nopl   0x0(%rax)
L229:
  pxor   %xmm2,%xmm2
  movapd %xmm2,%xmm0
  jmp    L196
  nopw   0x0(%rax,%rax,1)
L220:
  movapd %xmm4,%xmm0
  comisd %xmm2,%xmm0
  jbe    L108
  jmp    L185
  nop
L120:
  mulsd  D51(%rip),%xmm0
  comisd %xmm3,%xmm2
  jae    L185
  jmp    L144
  nopw   0x0(%rax,%rax,1)
L36:
  comisd %xmm4,%xmm3
  jae    L121
  mulsd  D51(%rip),%xmm0
L121:
  comisd %xmm3,%xmm1
  jae    L185
  jmp    L144
```

tool_calls: name: unpack_data
arguments: tag: D37
type: f64
name: unpack_data
arguments: tag: D31
type: string
name: unpack_data
arguments: tag: D59
type: string
name: unpack_data
arguments: tag: D51
type: f64

tool: D37: 1

tool: D31: Illegal parameters in fisTriangleMf() --> a > b

tool: D59: Illegal parameters in fisTriangleMf() --> b > c

tool: D51: 0

assistant: ```c
double fisTriangleMf(double x, double *params) {
  double a = params[0], b = params[1], c = params[2];
  if (a > b)
    fisError("Illegal parameters in fisTriangleMf() --> a > b");
  if (b > c)
    fisError("Illegal parameters in fisTriangleMf() --> b > c");
  if (a == b && b == c)
    return (x == a);
  if (a == b)
    return ((c - x) / (c - b) * (b <= x) * (x <= c));
  if (b == c)
    return ((x - a) / (b - a) * (a <= x) * (x <= b));
  return ((((((x - a) / (b - a)) < ((c - x) / (c - b)) ? ((x - a) / (b - a)) : ((c - x) / (c - b)))) > (0) ? ((((x - a) / (b - a)) < ((c - x) / (c - b)) ? ((x - a) / (b - a)) : ((c - x) / (c - b)))) : (0)));
}
```