user: 请从给定的汇编指令推导出C源代码：

```asm
<rgb_to_hsl_int>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x28(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jbe    L293
  mov    -0x20(%rbp),%edx
  mov    -0x28(%rbp),%eax
  cmp    %eax,%edx
  cmovae %edx,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x24(%rbp),%eax
  cmp    %eax,%edx
  cmovbe %edx,%eax
  mov    %eax,-0x30(%rbp)
  jmp    L261
L293:
  mov    -0x20(%rbp),%edx
  mov    -0x24(%rbp),%eax
  cmp    %eax,%edx
  cmovae %edx,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x28(%rbp),%eax
  cmp    %eax,%edx
  cmovbe %edx,%eax
  mov    %eax,-0x30(%rbp)
L261:
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  test   %rax,%rax
  js     L290
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L230
L290:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L230:
  movsd  D93(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x2c(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jne    L265
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L77
L265:
  mov    -0x2c(%rbp),%eax
  sub    -0x30(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  movsd  D116(%rip),%xmm0
  comisd -0x8(%rbp),%xmm0
  jbe    L241
  mov    -0x1c(%rbp),%eax
  test   %rax,%rax
  js     L212
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L304
L212:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L304:
  movsd  D43(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  test   %rax,%rax
  js     L318
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L302
L318:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L302:
  divsd  %xmm0,%xmm1
  movsd  %xmm1,-0x10(%rbp)
  jmp    L272
L241:
  mov    -0x1c(%rbp),%eax
  test   %rax,%rax
  js     L340
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L345
L340:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L345:
  movsd  D43(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %eax,%edx
  mov    $0x1ff,%eax
  sub    %edx,%eax
  mov    %eax,%eax
  test   %rax,%rax
  js     L311
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L294
L311:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L294:
  divsd  %xmm0,%xmm1
  movsd  %xmm1,-0x10(%rbp)
L272:
  mov    -0x28(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jne    L169
  mov    -0x24(%rbp),%eax
  sub    -0x20(%rbp),%eax
  mov    %eax,%eax
  test   %rax,%rax
  js     L65
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L70
L65:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L70:
  mov    -0x1c(%rbp),%eax
  test   %rax,%rax
  js     L166
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  jmp    L66
L166:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm1,%xmm1
  cvtsi2sd %rdx,%xmm1
  addsd  %xmm1,%xmm1
L66:
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L110
L169:
  mov    -0x24(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jne    L56
  mov    -0x20(%rbp),%eax
  sub    -0x28(%rbp),%eax
  mov    %eax,%eax
  test   %rax,%rax
  js     L71
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L173
L71:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L173:
  mov    -0x1c(%rbp),%eax
  test   %rax,%rax
  js     L201
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  jmp    L161
L201:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm1,%xmm1
  cvtsi2sd %rdx,%xmm1
  addsd  %xmm1,%xmm1
L161:
  movapd %xmm0,%xmm2
  divsd  %xmm1,%xmm2
  movsd  D93(%rip),%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L110
L56:
  mov    -0x28(%rbp),%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,%eax
  test   %rax,%rax
  js     L195
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L4
L195:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L4:
  mov    -0x1c(%rbp),%eax
  test   %rax,%rax
  js     L256
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  jmp    L189
L256:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm1,%xmm1
  cvtsi2sd %rdx,%xmm1
  addsd  %xmm1,%xmm1
L189:
  movapd %xmm0,%xmm2
  divsd  %xmm1,%xmm2
  movsd  D71(%rip),%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L110:
  movsd  -0x18(%rbp),%xmm1
  movsd  D57(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L280
  movsd  -0x18(%rbp),%xmm1
  movsd  D43(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L77
L280:
  movsd  -0x18(%rbp),%xmm0
  comisd D43(%rip),%xmm0
  jbe    L77
  movsd  -0x18(%rbp),%xmm0
  movsd  D43(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L77:
  movsd  -0x18(%rbp),%xmm1
  movsd  D18(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
  movsd  -0x10(%rbp),%xmm1
  movsd  D18(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  movsd  -0x8(%rbp),%xmm1
  movsd  D18(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %eax,%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,(%rax)
  nop
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D93
type_infered: f64
name: unpack_data
arguments: data_tag: D116
type_infered: f32[2]
name: unpack_data
arguments: data_tag: D43
type_infered: f32[4]
name: unpack_data
arguments: data_tag: D71
type_infered: f32[2]
name: unpack_data
arguments: data_tag: D57
type_infered: f64
name: unpack_data
arguments: data_tag: D18
type_infered: f64

tool: D93: 2

tool: {"D116": [0.0,3.5]}

tool: {"D43": [0.0,3.748046875,0.0,2.25]}

tool: {"D71": [0.0,2.25]}

tool: D57: 42.5

tool: D18: 0.5

assistant: ```c
void rgb_to_hsl_int(unsigned int *red, unsigned int *green, unsigned int *blue) {
  unsigned int r, g, b;
  double h, s, l;
  unsigned int min, max;
  unsigned int delta;
  r = *red;
  g = *green;
  b = *blue;
  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) {
    s = 0.0;
    h = 0.0;
  } else {
    delta = (max - min);
    if (l < 128)
      s = 255 * (double)delta / (double)(max + min);
    else
      s = 255 * (double)delta / (double)(511 - max - min);
    if (r == max)
      h = (g - b) / (double)delta;
    else if (g == max)
      h = 2 + (b - r) / (double)delta;
    else
      h = 4 + (r - g) / (double)delta;
    h = h * 42.5;
    if (h < 0)
      h += 255;
    else if (h > 255)
      h -= 255;
  }
  *red = ((int32_t)((h) + 0.5));
  *green = ((int32_t)((s) + 0.5));
  *blue = ((int32_t)((l) + 0.5));
}
```