user: Please show me the C implementation that matches the assembly code listed below:

```asm
<HsvToRgb>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %edx,-0x2c(%rbp)
  cmpl   $0x0,-0x28(%rbp)
  jne    L60
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x20(%rbp),%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  jmp    L23
L60:
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x2fa0be83,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x3,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  imul   $0xffffffd5,%eax,%edx
  mov    -0x24(%rbp),%eax
  add    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,-0x10(%rbp)
  mov    $0xff,%eax
  sub    -0x28(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  sar    $0x8,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x28(%rbp),%eax
  imul   -0x10(%rbp),%eax
  sar    $0x8,%eax
  mov    %eax,%edx
  mov    $0xff,%eax
  sub    %edx,%eax
  imul   -0x2c(%rbp),%eax
  sar    $0x8,%eax
  mov    %eax,-0x8(%rbp)
  mov    $0xff,%eax
  sub    -0x10(%rbp),%eax
  imul   -0x28(%rbp),%eax
  sar    $0x8,%eax
  mov    %eax,%edx
  mov    $0xff,%eax
  sub    %edx,%eax
  imul   -0x2c(%rbp),%eax
  sar    $0x8,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x4,-0x14(%rbp)
  ja     L7
  mov    -0x14(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D0(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D0(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L69
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L69
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L69
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L69
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L69
L7:
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  nop
L69:
  mov    -0x20(%rbp),%eax
  shl    $0x10,%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  shl    $0x8,%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
L23:
  pop    %rbp
  ret
```

assistant: ```c
uint32_t HsvToRgb(uint8_t h, uint8_t s, uint8_t v) {
  uint8_t r, g, b;
  uint8_t region, remainder, p, q, t;
  if (s == 0) {
    r = v;
    g = v;
    b = v;
    return r * 0x10000 + g * 0x100 + b;
  }
  region = h / 43;
  remainder = (h - (region * 43)) * 6;
  p = (v * (255 - s)) >> 8;
  q = (v * (255 - ((s * remainder) >> 8))) >> 8;
  t = (v * (255 - ((s * (255 - remainder)) >> 8))) >> 8;
  switch (region) {
  case 0:
    r = v;
    g = t;
    b = p;
    break;
  case 1:
    r = q;
    g = v;
    b = p;
    break;
  case 2:
    r = p;
    g = v;
    b = t;
    break;
  case 3:
    r = p;
    g = q;
    b = v;
    break;
  case 4:
    r = t;
    g = p;
    b = v;
    break;
  default:
    r = v;
    g = p;
    b = q;
    break;
  }
  return (r << 16) + (g << 8) + b;
}
```