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

```asm
<hsv2rgb>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  movsd  %xmm0,-0x38(%rbp)
  movsd  %xmm1,-0x40(%rbp)
  movsd  %xmm2,-0x48(%rbp)
  mov    %rdi,-0x50(%rbp)
  mov    %rsi,-0x58(%rbp)
  mov    %rdx,-0x60(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movsd  D47(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  mov    %eax,%ecx
  movslq %ecx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  shr    $0x20,%rax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  mov    %eax,%edx
  sub    %esi,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movsd  D47(%rip),%xmm1
  divsd  %xmm1,%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  D9(%rip),%xmm0
  subsd  -0x40(%rbp),%xmm0
  movsd  -0x20(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x40(%rbp),%xmm1
  movsd  D9(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  -0x20(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  D9(%rip),%xmm0
  subsd  -0x28(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x40(%rbp),%xmm1
  movsd  D9(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  -0x20(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x30(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  test   %eax,%eax
  jne    L91
  mov    -0x50(%rbp),%rax
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x58(%rbp),%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L64
L91:
  movsd  -0x30(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  cmp    $0x1,%eax
  jne    L54
  mov    -0x50(%rbp),%rax
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x58(%rbp),%rax
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L64
L54:
  movsd  -0x30(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  cmp    $0x2,%eax
  jne    L72
  mov    -0x50(%rbp),%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x58(%rbp),%rax
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L64
L72:
  movsd  -0x30(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  cmp    $0x3,%eax
  jne    L47
  mov    -0x50(%rbp),%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x58(%rbp),%rax
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L64
L47:
  movsd  -0x30(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  cmp    $0x4,%eax
  jne    L14
  mov    -0x50(%rbp),%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x58(%rbp),%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L64
L14:
  movsd  -0x30(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  cmp    $0x5,%eax
  jne    L64
  mov    -0x50(%rbp),%rax
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x58(%rbp),%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L64:
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D47
type: f64
name: read_data
arguments: data_label: D9
type: byte[8]

tool: D47: 60

tool: {"D9": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

assistant: ```c
void hsv2rgb(double H, double S, double V, double *r, double *g, double *b) {
  double h_aux, f, p, q, t, v_aux;
  h_aux = ((int)fabs(H / 60.0)) % 6;
  f = (H / 60.0) - h_aux;
  v_aux = V;
  p = v_aux * (1 - S);
  q = v_aux * (1 - f * S);
  t = v_aux * (1 - (1 - f) * S);
  if (((int)h_aux) == 0) {
    *r = v_aux;
    *g = t;
    *b = p;
  } else if (((int)h_aux == 1)) {
    *r = q;
    *g = v_aux;
    *b = p;
  } else if (((int)h_aux == 2)) {
    *r = p;
    *g = v_aux;
    *b = t;
  } else if (((int)h_aux == 3)) {
    *r = p;
    *g = q;
    *b = v_aux;
  } else if (((int)h_aux == 4)) {
    *r = t;
    *g = p;
    *b = v_aux;
  } else if (((int)h_aux == 5)) {
    *r = v_aux;
    *g = p;
    *b = q;
  }
}
```