user: 请将以下的汇编代码转换成C语言代码:

```asm
<HlsToRgb>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  movss  %xmm0,-0x34(%rbp)
  movss  %xmm1,-0x38(%rbp)
  movss  %xmm2,-0x3c(%rbp)
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x14(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xc(%rbp)
  movss  -0x38(%rbp),%xmm0
  mulss  -0x3c(%rbp),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movss  -0x3c(%rbp),%xmm0
  subss  -0x1c(%rbp),%xmm0
  movss  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L79
L15:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x34(%rbp),%xmm1
  mov    $0x1,%eax
  sub    -0x24(%rbp),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movsd  D81(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  comiss -0x20(%rbp),%xmm0
  jbe    L2
  movss  -0x20(%rbp),%xmm1
  movss  D140(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x20(%rbp)
  jmp    L184
L2:
  movss  -0x20(%rbp),%xmm0
  movss  D140(%rip),%xmm1
  comiss %xmm1,%xmm0
  jbe    L184
  movss  -0x20(%rbp),%xmm0
  movss  D140(%rip),%xmm1
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x20(%rbp)
L184:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x20(%rbp),%xmm1
  movsd  D98(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D265(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L38
  movss  D220(%rip),%xmm0
  comiss -0x38(%rbp),%xmm0
  jb     L129
  movss  -0x20(%rbp),%xmm1
  movss  D221(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  D140(%rip),%xmm1
  subss  %xmm1,%xmm0
  mulss  -0x1c(%rbp),%xmm0
  addss  -0x38(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  movss  %xmm0,-0x14(%rbp,%rax,4)
  jmp    L169
L129:
  movss  -0x20(%rbp),%xmm1
  movss  D221(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  D23(%rip),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D54(%rip),%xmm0
  addss  %xmm1,%xmm0
  mulss  -0x18(%rbp),%xmm0
  addss  -0x38(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  movss  %xmm0,-0x14(%rbp,%rax,4)
  jmp    L169
L38:
  pxor   %xmm0,%xmm0
  cvtss2sd -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  movsd  D265(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L12
  movss  D220(%rip),%xmm0
  comiss -0x38(%rbp),%xmm0
  jb     L156
  movss  -0x38(%rbp),%xmm0
  addss  -0x1c(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  movss  %xmm0,-0x14(%rbp,%rax,4)
  jmp    L169
L156:
  movss  -0x38(%rbp),%xmm0
  addss  -0x18(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  movss  %xmm0,-0x14(%rbp,%rax,4)
  jmp    L169
L12:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x20(%rbp),%xmm1
  movsd  D8(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D158(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L48
  movss  D220(%rip),%xmm0
  comiss -0x38(%rbp),%xmm0
  jb     L146
  movss  -0x20(%rbp),%xmm1
  movss  D221(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  D23(%rip),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D54(%rip),%xmm0
  subss  %xmm1,%xmm0
  mulss  -0x1c(%rbp),%xmm0
  addss  -0x38(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  movss  %xmm0,-0x14(%rbp,%rax,4)
  jmp    L169
L146:
  movss  -0x20(%rbp),%xmm1
  movss  D221(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  D23(%rip),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  D54(%rip),%xmm0
  subss  %xmm1,%xmm0
  mulss  -0x18(%rbp),%xmm0
  addss  -0x38(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  movss  %xmm0,-0x14(%rbp,%rax,4)
  jmp    L169
L48:
  movss  D220(%rip),%xmm0
  comiss -0x38(%rbp),%xmm0
  jb     L59
  movss  -0x38(%rbp),%xmm0
  subss  -0x1c(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  movss  %xmm0,-0x14(%rbp,%rax,4)
  jmp    L169
L59:
  movss  -0x38(%rbp),%xmm0
  subss  -0x18(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  movss  %xmm0,-0x14(%rbp,%rax,4)
L169:
  addl   $0x1,-0x24(%rbp)
L79:
  cmpl   $0x2,-0x24(%rbp)
  jle    L15
  movss  -0x14(%rbp),%xmm1
  movss  D99(%rip),%xmm0
  mulss  %xmm1,%xmm0
  cvttss2si %xmm0,%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,(%rax)
  movss  -0x10(%rbp),%xmm1
  movss  D99(%rip),%xmm0
  mulss  %xmm1,%xmm0
  cvttss2si %xmm0,%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,(%rax)
  movss  -0xc(%rbp),%xmm1
  movss  D99(%rip),%xmm0
  mulss  %xmm1,%xmm0
  cvttss2si %xmm0,%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,(%rax)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L114
  call   <__stack_chk_fail@plt>
L114:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D81
datatype: f64
name: extract_symbolic_data
arguments: tag: D140
datatype: f32
name: extract_symbolic_data
arguments: tag: D98
datatype: f64
name: extract_symbolic_data
arguments: tag: D265
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D220
datatype: f32
name: extract_symbolic_data
arguments: tag: D221
datatype: byte[4]
name: extract_symbolic_data
arguments: tag: D23
datatype: byte[4]
name: extract_symbolic_data
arguments: tag: D54
datatype: f32
name: extract_symbolic_data
arguments: tag: D8
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D158
datatype: f64
name: extract_symbolic_data
arguments: tag: D99
datatype: byte[4]

tool: D81: 0.3333

tool: D140: 1

tool: D98: 6

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

tool: D220: 0.5

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

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

tool: D54: 3

tool: {"D8": [0.0,2.125]}

tool: D158: 2

tool: {"D99": [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];
}
```