user: What is the c source code of the assembly code below?

```asm
<xcflRGBToHSLInt>:
  endbr64
  mov    (%rdi),%eax
  mov    (%rsi),%ecx
  mov    %rdx,%r8
  mov    (%rdx),%edx
  cmp    %ecx,%eax
  jle    L20
  cmp    %edx,%eax
  mov    %edx,%r9d
  mov    %edx,%r10d
  cmovge %eax,%r9d
  cmp    %edx,%ecx
  cmovle %ecx,%r10d
L87:
  lea    (%r10,%r9,1),%r11d
  pxor   %xmm4,%xmm4
  movsd  D43(%rip),%xmm2
  cvtsi2sd %r11d,%xmm4
  movapd %xmm4,%xmm1
  mulsd  %xmm2,%xmm1
  cmp    %r9d,%r10d
  je     L108
  mov    %r9d,%r11d
  pxor   %xmm6,%xmm6
  movsd  D16(%rip),%xmm0
  movsd  D8(%rip),%xmm5
  sub    %r10d,%r11d
  cvtsi2sd %r11d,%xmm6
  comisd %xmm1,%xmm0
  movapd %xmm6,%xmm3
  mulsd  %xmm5,%xmm3
  jbe    L59
  divsd  %xmm4,%xmm3
  cmp    %eax,%r9d
  je     L26
L82:
  cmp    %ecx,%r9d
  je     L18
  sub    %ecx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  divsd  %xmm6,%xmm0
  addsd  D6(%rip),%xmm0
L66:
  mulsd  D27(%rip),%xmm0
  pxor   %xmm4,%xmm4
  comisd %xmm0,%xmm4
  ja     L48
  comisd %xmm5,%xmm0
  ja     L25
L1:
  addsd  %xmm2,%xmm0
  addsd  %xmm2,%xmm3
  addsd  %xmm2,%xmm1
  cvttsd2si %xmm3,%eax
  cvttsd2si %xmm0,%edx
  mov    %edx,(%rdi)
  mov    %eax,(%rsi)
  cvttsd2si %xmm1,%eax
  mov    %eax,(%r8)
  ret
  cs nopw 0x0(%rax,%rax,1)
L59:
  mov    $0x1ff,%r11d
  pxor   %xmm4,%xmm4
  sub    %r9d,%r11d
  sub    %r10d,%r11d
  cvtsi2sd %r11d,%xmm4
  divsd  %xmm4,%xmm3
  cmp    %eax,%r9d
  jne    L82
L26:
  sub    %edx,%ecx
  pxor   %xmm0,%xmm0
  cvtsi2sd %ecx,%xmm0
  divsd  %xmm6,%xmm0
  jmp    L66
  nopw   0x0(%rax,%rax,1)
L20:
  cmp    %edx,%ecx
  mov    %edx,%r9d
  mov    %edx,%r10d
  cmovge %ecx,%r9d
  cmp    %edx,%eax
  cmovle %eax,%r10d
  jmp    L87
  nop
L108:
  addsd  %xmm2,%xmm1
  xor    %eax,%eax
  xor    %edx,%edx
  mov    %edx,(%rdi)
  mov    %eax,(%rsi)
  cvttsd2si %xmm1,%eax
  mov    %eax,(%r8)
  ret
  nopl   0x0(%rax)
L48:
  addsd  %xmm5,%xmm0
  jmp    L1
  nopl   0x0(%rax)
L25:
  subsd  %xmm5,%xmm0
  jmp    L1
  nopl   0x0(%rax)
L18:
  sub    %eax,%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  divsd  %xmm6,%xmm0
  addsd  D25(%rip),%xmm0
  jmp    L66
```

tool_calls: name: extract_symbolic_data
arguments: tag: D43
data_type: f64
name: extract_symbolic_data
arguments: tag: D16
data_type: f64
name: extract_symbolic_data
arguments: tag: D8
data_type: f64
name: extract_symbolic_data
arguments: tag: D6
data_type: f64
name: extract_symbolic_data
arguments: tag: D27
data_type: f64
name: extract_symbolic_data
arguments: tag: D25
data_type: f64

tool: D43: 0.5

tool: D16: 128

tool: D8: 255

tool: D6: 4

tool: D27: 42.5

tool: D25: 2

assistant: ```c
void xcflRGBToHSLInt(int *pRed, int *pGreen, int *pBlue) {
  int r, g, b;
  double h, s, l;
  int Min, Max, Delta;
  r = *pRed;
  g = *pGreen;
  b = *pBlue;
  if (r > g) {
    Max = ((r) > (b) ? (r) : (b));
    Min = ((g) < (b) ? (g) : (b));
  } else {
    Max = ((g) > (b) ? (g) : (b));
    Min = ((r) < (b) ? (r) : (b));
  }
  l = (Max + Min) / 2.0;
  if (Max == Min) {
    *pRed = 0;
    *pGreen = 0;
  } else {
    Delta = Max - Min;
    if (l < 128.0)
      s = 255.0 * (double)Delta / (double)(Max + Min);
    else
      s = 255.0 * (double)Delta / (double)(511 - Max - Min);
    if (r == Max)
      h = (double)(g - b) / (double)Delta;
    else if (g == Max)
      h = 2.0 + (double)(b - r) / (double)Delta;
    else
      h = 4.0 + (double)(r - g) / (double)Delta;
    h *= 42.5;
    if (h < 0.0)
      h += 255.0;
    else if (h > 255.0)
      h -= 255.0;
    *pRed = ((int)((h) + 0.5));
    *pGreen = ((int)((s) + 0.5));
  }
  *pBlue = ((int)((l) + 0.5));
}
```