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

```asm
<hsva_to_rgba>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%rbp
  mov    (%rsi),%r12d
  movss  0x4(%rsi),%xmm1
  mov    0x8(%rsi),%ebx
  movss  0xc(%rsi),%xmm0
  movss  %xmm0,0xc(%rdi)
  pxor   %xmm0,%xmm0
  call   <fmaxf@plt>
  mov    %eax,%edi
  movss  D19(%rip),%xmm0
  call   <fminf@plt>
  movss  %xmm0,0x8(%rsp)
  movd   %ebx,%xmm1
  pxor   %xmm0,%xmm0
  call   <fmaxf@plt>
  mov    %eax,%edi
  movss  D19(%rip),%xmm0
  call   <fminf@plt>
  movd   %xmm0,%ebx
  movd   %r12d,%xmm4
  addss  D73(%rip),%xmm4
  movaps %xmm4,%xmm0
  mov    $0x168,%edi
  call   <fmodf@plt>
  movss  0x8(%rsp),%xmm3
  pxor   %xmm7,%xmm7
  ucomiss %xmm7,%xmm3
  jp     L61
  jne    L61
  mov    %ebx,0x8(%rbp)
  mov    %ebx,0x4(%rbp)
  mov    %ebx,0x0(%rbp)
L19:
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L61:
  pxor   %xmm5,%xmm5
  cvtsd2ss %xmm0,%xmm5
  movd   %ebx,%xmm6
  mulss  0x8(%rsp),%xmm6
  movss  %xmm6,0xc(%rsp)
  movss  %xmm5,0x8(%rsp)
  movaps %xmm5,%xmm0
  divss  D128(%rip),%xmm0
  mov    $0x2,%edi
  call   <fmodf@plt>
  subsd  D60(%rip),%xmm0
  call   <fabsf@plt>
  movaps %xmm0,%xmm1
  movss  D19(%rip),%xmm0
  subss  %xmm1,%xmm0
  movaps %xmm0,%xmm1
  movss  0xc(%rsp),%xmm6
  mulss  %xmm6,%xmm1
  movd   %ebx,%xmm7
  subss  %xmm6,%xmm7
  movaps %xmm7,%xmm0
  movss  0x8(%rsp),%xmm5
  comiss D60(%rip),%xmm5
  jb     L140
  movss  D128(%rip),%xmm2
  comiss %xmm5,%xmm2
  jbe    L140
  movaps %xmm6,%xmm2
  addss  %xmm7,%xmm2
  movss  %xmm2,0x0(%rbp)
  addss  %xmm7,%xmm1
  movss  %xmm1,0x4(%rbp)
  movss  %xmm7,0x8(%rbp)
  jmp    L19
L140:
  movss  0x8(%rsp),%xmm4
  comiss D128(%rip),%xmm4
  jb     L10
  movss  D39(%rip),%xmm2
  comiss %xmm4,%xmm2
  jbe    L10
  addss  %xmm0,%xmm1
  movss  %xmm1,0x0(%rbp)
  movss  0xc(%rsp),%xmm1
  addss  %xmm0,%xmm1
  movss  %xmm1,0x4(%rbp)
  movss  %xmm0,0x8(%rbp)
  jmp    L19
L10:
  movss  0x8(%rsp),%xmm7
  comiss D39(%rip),%xmm7
  jb     L159
  movss  D15(%rip),%xmm2
  comiss %xmm7,%xmm2
  jbe    L159
  movss  %xmm0,0x0(%rbp)
  movss  0xc(%rsp),%xmm2
  addss  %xmm0,%xmm2
  movss  %xmm2,0x4(%rbp)
  addss  %xmm1,%xmm0
  movss  %xmm0,0x8(%rbp)
  jmp    L19
L159:
  movss  0x8(%rsp),%xmm7
  comiss D15(%rip),%xmm7
  jb     L169
  movss  D171(%rip),%xmm2
  comiss %xmm7,%xmm2
  jbe    L169
  movss  %xmm0,0x0(%rbp)
  addss  %xmm0,%xmm1
  movss  %xmm1,0x4(%rbp)
  addss  0xc(%rsp),%xmm0
  movss  %xmm0,0x8(%rbp)
  jmp    L19
L169:
  movss  0x8(%rsp),%xmm4
  comiss D171(%rip),%xmm4
  jb     L197
  movss  D57(%rip),%xmm2
  comiss %xmm4,%xmm2
  jbe    L197
  addss  %xmm0,%xmm1
  movss  %xmm1,0x0(%rbp)
  movss  %xmm0,0x4(%rbp)
  addss  0xc(%rsp),%xmm0
  movss  %xmm0,0x8(%rbp)
  jmp    L19
L197:
  movss  0x8(%rsp),%xmm5
  comiss D57(%rip),%xmm5
  jb     L182
  movss  D73(%rip),%xmm2
  comiss %xmm5,%xmm2
  jbe    L182
  movss  0xc(%rsp),%xmm2
  addss  %xmm0,%xmm2
  movss  %xmm2,0x0(%rbp)
  movss  %xmm0,0x4(%rbp)
  addss  %xmm1,%xmm0
  movss  %xmm0,0x8(%rbp)
  jmp    L19
L182:
  movss  %xmm0,0x0(%rbp)
  movss  %xmm0,0x4(%rbp)
  movss  %xmm0,0x8(%rbp)
  jmp    L19
```

tool_calls: name: retrieve_data
arguments: tag: D19
data_type: f32
name: retrieve_data
arguments: tag: D73
data_type: f32
name: retrieve_data
arguments: tag: D128
data_type: f32
name: retrieve_data
arguments: tag: D60
data_type: f32[2]
name: retrieve_data
arguments: tag: D39
data_type: f32
name: retrieve_data
arguments: tag: D15
data_type: f32
name: retrieve_data
arguments: tag: D171
data_type: f32
name: retrieve_data
arguments: tag: D57
data_type: f32

tool: D19: 1

tool: D73: 360

tool: D128: 60

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

tool: D39: 120

tool: D15: 180

tool: D171: 240

tool: D57: 300

assistant: ```c
void hsva_to_rgba(float *rgba, float *hsva) {
  float h = hsva[0];
  float s = hsva[1];
  float v = hsva[2];
  rgba[3] = hsva[3];
  s = fminf(1.f, fmaxf(0.f, s));
  v = fminf(1.f, fmaxf(0.f, v));
  h = fmodf(h + 360.f, 360.f);
  if (s == 0) {
    rgba[0] = rgba[1] = rgba[2] = v;
    return;
  }
  float c = v * s;
  float x = c * (1.f - fabsf(fmodf(h / 60.f, 2) - 1.0));
  float m = v - c;
  if (h >= 0.0 && h < 60.0) {
    rgba[0] = c + m;
    rgba[1] = x + m;
    rgba[2] = m;
    ;
  } else if (h >= 60.0 && h < 120.0) {
    rgba[0] = x + m;
    rgba[1] = c + m;
    rgba[2] = m;
    ;
  } else if (h >= 120.0 && h < 180.0) {
    rgba[0] = m;
    rgba[1] = c + m;
    rgba[2] = x + m;
    ;
  } else if (h >= 180.0 && h < 240.0) {
    rgba[0] = m;
    rgba[1] = x + m;
    rgba[2] = c + m;
    ;
  } else if (h >= 240.0 && h < 300.0) {
    rgba[0] = x + m;
    rgba[1] = m;
    rgba[2] = c + m;
    ;
  } else if (h >= 300.0 && h < 360.0) {
    rgba[0] = c + m;
    rgba[1] = m;
    rgba[2] = x + m;
    ;
  } else {
    rgba[0] = m;
    rgba[1] = m;
    rgba[2] = m;
    ;
  }
}
```