user: What would the C source look like for the assembly code provided here?

```asm
<HLStoRGB>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %edx,-0x2c(%rbp)
  movl   $0xff,-0xc(%rbp)
  movl   $0x64,-0x8(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  jne    L2
  mov    -0x28(%rbp),%eax
  imul   -0xc(%rbp),%eax
  cltd
  idivl  -0x8(%rbp)
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L23
L2:
  mov    -0x8(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0x28(%rbp)
  jg     L29
  mov    -0x8(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  imul   -0x28(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  sar    %eax
  add    %edx,%eax
  cltd
  idivl  -0x8(%rbp)
  mov    %eax,-0x10(%rbp)
  jmp    L10
L29:
  mov    -0x28(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x28(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  mov    %eax,%esi
  shr    $0x1f,%esi
  add    %esi,%eax
  sar    %eax
  add    %edx,%eax
  cltd
  idivl  -0x8(%rbp)
  mov    %eax,%edx
  mov    %ecx,%eax
  sub    %edx,%eax
  mov    %eax,-0x10(%rbp)
L10:
  mov    -0x28(%rbp),%eax
  add    %eax,%eax
  sub    -0x10(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  sub    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%ecx
  mov    -0x4(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <HueToRGB@plt>
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  sar    %eax
  add    %edx,%eax
  cltd
  idivl  -0x8(%rbp)
  mov    %eax,-0x1c(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0x10(%rbp),%ecx
  mov    -0x4(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <HueToRGB@plt>
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  sar    %eax
  add    %edx,%eax
  cltd
  idivl  -0x8(%rbp)
  mov    %eax,-0x18(%rbp)
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  mov    %rdx,%rcx
  shr    $0x20,%rcx
  sar    $0x1f,%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%ecx
  mov    -0x4(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <HueToRGB@plt>
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  sar    %eax
  add    %edx,%eax
  cltd
  idivl  -0x8(%rbp)
  mov    %eax,-0x14(%rbp)
L23:
  mov    -0x1c(%rbp),%eax
  shl    $0x10,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  shl    $0x8,%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  leave
  ret
```

assistant: ```c
int HLStoRGB(int hue, int lum, int sat) {
  int R, G, B;
  int Magic1, Magic2;
  const int RGBMAX = 255;
  const int HLSMAX = 100;
  if (sat == 0) {
    R = G = B = (lum * RGBMAX) / HLSMAX;
  } else {
    if (lum <= (HLSMAX / 2)) {
      Magic2 = (lum * (HLSMAX + sat) + (HLSMAX / 2)) / HLSMAX;
    } else {
      Magic2 = lum + sat - ((lum * sat) + (HLSMAX / 2)) / HLSMAX;
    }
    Magic1 = 2 * lum - Magic2;
    R = (HueToRGB(Magic1, Magic2, hue + (HLSMAX / 3)) * RGBMAX + (HLSMAX / 2)) / HLSMAX;
    G = (HueToRGB(Magic1, Magic2, hue) * RGBMAX + (HLSMAX / 2)) / HLSMAX;
    B = (HueToRGB(Magic1, Magic2, hue - (HLSMAX / 3)) * RGBMAX + (HLSMAX / 2)) / HLSMAX;
  }
  return (((R) << 16) + ((G) << 8) + (B));
}
```