user: Please show me the C implementation that matches the assembly code listed below:

```asm
<rgb_to_hsl_f>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x24(%rbp)
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x20(%rbp)
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x18(%rbp)
  movss  -0x18(%rbp),%xmm1
  movss  -0x1c(%rbp),%xmm0
  mov    -0x20(%rbp),%eax
  movaps %xmm1,%xmm2
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <max3@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x14(%rbp)
  movss  -0x18(%rbp),%xmm1
  movss  -0x1c(%rbp),%xmm0
  mov    -0x20(%rbp),%eax
  movaps %xmm1,%xmm2
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <min3@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x10(%rbp)
  movss  -0x14(%rbp),%xmm0
  addss  -0x10(%rbp),%xmm0
  movss  D28(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0xc(%rbp)
  movss  -0x14(%rbp),%xmm0
  subss  -0x10(%rbp),%xmm0
  movss  %xmm0,-0x8(%rbp)
  pxor   %xmm0,%xmm0
  ucomiss -0x8(%rbp),%xmm0
  jp     L58
  pxor   %xmm0,%xmm0
  ucomiss -0x8(%rbp),%xmm0
  jne    L58
  mov    -0x40(%rbp),%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x40(%rbp),%rax
  add    $0x4,%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  movss  -0xc(%rbp),%xmm0
  movss  %xmm0,(%rax)
  jmp    L49
L58:
  movss  -0x14(%rbp),%xmm0
  ucomiss -0x20(%rbp),%xmm0
  jp     L21
  movss  -0x14(%rbp),%xmm0
  ucomiss -0x20(%rbp),%xmm0
  jne    L21
  movss  -0x1c(%rbp),%xmm0
  subss  -0x18(%rbp),%xmm0
  movaps %xmm0,%xmm1
  divss  -0x8(%rbp),%xmm1
  movss  -0x18(%rbp),%xmm0
  comiss -0x1c(%rbp),%xmm0
  jbe    L99
  movss  D69(%rip),%xmm0
  jmp    L54
L99:
  pxor   %xmm0,%xmm0
L54:
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x24(%rbp)
  jmp    L96
L21:
  movss  -0x14(%rbp),%xmm0
  ucomiss -0x1c(%rbp),%xmm0
  jp     L10
  movss  -0x14(%rbp),%xmm0
  ucomiss -0x1c(%rbp),%xmm0
  jne    L10
  movss  -0x18(%rbp),%xmm0
  subss  -0x20(%rbp),%xmm0
  movaps %xmm0,%xmm1
  divss  -0x8(%rbp),%xmm1
  movss  D28(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x24(%rbp)
  jmp    L96
L10:
  movss  -0x14(%rbp),%xmm0
  ucomiss -0x18(%rbp),%xmm0
  jp     L96
  movss  -0x14(%rbp),%xmm0
  ucomiss -0x18(%rbp),%xmm0
  jne    L96
  movss  -0x20(%rbp),%xmm0
  subss  -0x1c(%rbp),%xmm0
  movaps %xmm0,%xmm1
  divss  -0x8(%rbp),%xmm1
  movss  D45(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x24(%rbp)
L96:
  movss  -0x24(%rbp),%xmm1
  movss  D0(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x24(%rbp)
  movss  -0xc(%rbp),%xmm0
  comiss D8(%rip),%xmm0
  jbe    L149
  movss  D28(%rip),%xmm0
  subss  -0x14(%rbp),%xmm0
  movaps %xmm0,%xmm1
  subss  -0x10(%rbp),%xmm1
  movss  -0x8(%rbp),%xmm0
  divss  %xmm1,%xmm0
  jmp    L106
L149:
  movss  -0x14(%rbp),%xmm0
  movaps %xmm0,%xmm1
  addss  -0x10(%rbp),%xmm1
  movss  -0x8(%rbp),%xmm0
  divss  %xmm1,%xmm0
L106:
  movss  %xmm0,-0x4(%rbp)
  mov    -0x40(%rbp),%rax
  movss  -0x24(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x40(%rbp),%rax
  add    $0x4,%rax
  movss  -0x4(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  movss  -0xc(%rbp),%xmm0
  movss  %xmm0,(%rax)
L49:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D28
data_type: byte[4]
name: unpack_data
arguments: tag: D69
data_type: byte[4]
name: unpack_data
arguments: tag: D45
data_type: byte[4]
name: unpack_data
arguments: tag: D0
data_type: byte[4]
name: unpack_data
arguments: tag: D8
data_type: f32

tool: {"D28": [0x00,0x00,0x00,0x40]}

tool: {"D69": [0x00,0x00,0xc0,0x40]}

tool: {"D45": [0x00,0x00,0x80,0x40]}

tool: {"D0": [0x00,0x00,0x70,0x42]}

tool: D8: 0.5

assistant: ```c
void rgb_to_hsl_f(const float rgb[3], float hsl[3]) {
  float h = 0, s, v, m, c, l;
  const float r = rgb[0], g = rgb[1], b = rgb[2];
  v = max3(r, g, b);
  m = min3(r, g, b);
  l = (v + m) / 2;
  c = v - m;
  if (c == 0) {
    hsl[0] = 0;
    hsl[1] = 0;
    hsl[2] = l;
    return;
  }
  if (v == r) {
    h = (g - b) / c + (g < b ? 6 : 0);
  } else if (v == g) {
    h = (b - r) / c + 2;
  } else if (v == b) {
    h = (r - g) / c + 4;
  }
  h *= 60;
  s = (l > 0.5) ? c / (2 - v - m) : c / (v + m);
  hsl[0] = h;
  hsl[1] = s;
  hsl[2] = l;
}
```