user: Translate the below assembly code into C programming language:

```asm
<HlsToRgb>:
  endbr64
  sub    $0x28,%rsp
  mov    %rdi,%rcx
  mov    %rdx,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movl   $0x0,0xc(%rsp)
  movl   $0x0,0x10(%rsp)
  movl   $0x0,0x14(%rsp)
  movaps %xmm1,%xmm8
  mulss  %xmm2,%xmm8
  subss  %xmm8,%xmm2
  lea    0xc(%rsp),%rdx
  mov    $0x1,%eax
  movsd  D111(%rip),%xmm7
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm0,%xmm3
  pxor   %xmm6,%xmm6
  movss  D16(%rip),%xmm10
  movaps %xmm10,%xmm11
  movsd  D171(%rip),%xmm5
  movsd  D18(%rip),%xmm4
  movapd %xmm4,%xmm9
  jmp    L168
L10:
  addss  %xmm11,%xmm0
L75:
  pxor   %xmm12,%xmm12
  cvtss2sd %xmm0,%xmm12
  movapd %xmm12,%xmm13
  mulsd  %xmm5,%xmm13
  comisd %xmm13,%xmm4
  ja     L29
  movapd %xmm12,%xmm13
  addsd  %xmm12,%xmm13
  comisd %xmm13,%xmm9
  ja     L54
  mulsd  D140(%rip),%xmm12
  movsd  D48(%rip),%xmm13
  comisd %xmm12,%xmm13
  jbe    L35
  movss  D6(%rip),%xmm12
  comiss %xmm1,%xmm12
  jb     L38
  mulss  D142(%rip),%xmm0
  subss  D125(%rip),%xmm0
  movaps %xmm0,%xmm13
  movss  D116(%rip),%xmm12
  movaps %xmm12,%xmm0
  subss  %xmm13,%xmm0
  mulss  %xmm8,%xmm0
  addss  %xmm1,%xmm0
  jmp    L197
L29:
  movss  D6(%rip),%xmm12
  comiss %xmm1,%xmm12
  jb     L199
  mulss  D142(%rip),%xmm0
  subss  D16(%rip),%xmm0
  mulss  %xmm8,%xmm0
  addss  %xmm1,%xmm0
L197:
  movss  %xmm0,(%rdx)
  sub    $0x1,%eax
  add    $0x4,%rdx
  cmp    $0xfffffffe,%eax
  je     L90
L168:
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm7,%xmm0
  addsd  %xmm3,%xmm0
  cvtsd2ss %xmm0,%xmm0
  comiss %xmm0,%xmm6
  ja     L10
  comiss %xmm10,%xmm0
  jbe    L75
  subss  D16(%rip),%xmm0
  jmp    L75
L199:
  mulss  D142(%rip),%xmm0
  subss  D125(%rip),%xmm0
  addss  D116(%rip),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  jmp    L197
L54:
  movss  D6(%rip),%xmm0
  comiss %xmm1,%xmm0
  jb     L159
  movaps %xmm1,%xmm0
  addss  %xmm8,%xmm0
  jmp    L197
L159:
  movaps %xmm1,%xmm0
  addss  %xmm2,%xmm0
  jmp    L197
L38:
  mulss  D142(%rip),%xmm0
  subss  D125(%rip),%xmm0
  movss  D116(%rip),%xmm12
  subss  %xmm0,%xmm12
  movaps %xmm12,%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  jmp    L197
L35:
  movss  D6(%rip),%xmm0
  comiss %xmm1,%xmm0
  jb     L120
  movaps %xmm1,%xmm0
  subss  %xmm8,%xmm0
  jmp    L197
L120:
  movaps %xmm1,%xmm0
  subss  %xmm2,%xmm0
  jmp    L197
L90:
  movss  D72(%rip),%xmm0
  movaps %xmm0,%xmm1
  mulss  0xc(%rsp),%xmm1
  cvttss2si %xmm1,%eax
  mov    %eax,(%rcx)
  movaps %xmm0,%xmm1
  mulss  0x10(%rsp),%xmm1
  cvttss2si %xmm1,%eax
  mov    %eax,(%rsi)
  mulss  0x14(%rsp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,(%rdi)
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L131
  add    $0x28,%rsp
  ret
L131:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D111
type: f64
name: extract_symbolic_data
arguments: data_tag: D16
type: f32
name: extract_symbolic_data
arguments: data_tag: D171
type: f64
name: extract_symbolic_data
arguments: data_tag: D18
type: f32[2]
name: extract_symbolic_data
arguments: data_tag: D140
type: f64
name: extract_symbolic_data
arguments: data_tag: D48
type: f64
name: extract_symbolic_data
arguments: data_tag: D6
type: f32
name: extract_symbolic_data
arguments: data_tag: D142
type: byte[4]
name: extract_symbolic_data
arguments: data_tag: D125
type: byte[4]
name: extract_symbolic_data
arguments: data_tag: D116
type: byte[4]
name: extract_symbolic_data
arguments: data_tag: D72
type: byte[4]

tool: D111: 0.3333

tool: D16: 1

tool: D171: 6

tool: {"D18": [0.0,1.875]}

tool: D140: 3

tool: D48: 2

tool: D6: 0.5

tool: {"D142": [0x00,0x00,0x40,0x41]}

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

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

tool: {"D72": [0x00,0x00,0x7f,0x43]}

assistant: ```c
void HlsToRgb(float hue, float luminance, float saturation, int *red, int *green, int *blue) {
  float rgb[3] = {0, 0, 0};
  float ls = luminance * saturation;
  float sls = saturation - ls;
  for (int channel = 0; channel < 3; channel++) {
    float Hue = hue + 0.3333 * (1 - channel);
    if (Hue < 0.0)
      Hue += 1.0;
    else if (Hue > 1.0)
      Hue -= 1.0;
    if ((6.0 * Hue) < 1.0) {
      if (luminance <= 0.5)
        rgb[channel] = luminance + ls * (Hue * 12 - 1);
      else
        rgb[channel] = luminance + sls * (3 + (Hue * 12 - 4));
    } else if ((2.0 * Hue) < 1.0) {
      if (luminance <= 0.5)
        rgb[channel] = luminance + ls;
      else
        rgb[channel] = luminance + sls;
    } else if ((3.0 * Hue) < 2.0) {
      if (luminance <= 0.5)
        rgb[channel] = luminance + ls * (3 - (Hue * 12 - 4));
      else
        rgb[channel] = luminance + sls * (3 - (Hue * 12 - 4));
    } else {
      if (luminance <= 0.5)
        rgb[channel] = luminance - ls;
      else
        rgb[channel] = luminance - sls;
    }
  }
  *red = 255 * rgb[0];
  *green = 255 * rgb[1];
  *blue = 255 * rgb[2];
}
```