user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<GoRgbaToHsla>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %edx,-0x64(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x60(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x64(%rbp),%eax
  sar    $0x2,%eax
  mov    %eax,-0x48(%rbp)
  jmp    L11
L89:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  and    $0xff,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x34(%rbp),%eax
  shr    $0x8,%eax
  and    $0xff,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x34(%rbp),%eax
  shr    $0x10,%eax
  and    $0xff,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x34(%rbp),%eax
  and    $0xff000000,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jle    L36
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x44(%rbp)
L36:
  mov    -0x44(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jle    L127
  mov    -0x28(%rbp),%eax
  mov    %eax,-0x44(%rbp)
L127:
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x40(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jge    L91
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x40(%rbp)
L91:
  mov    -0x40(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jge    L103
  mov    -0x28(%rbp),%eax
  mov    %eax,-0x40(%rbp)
L103:
  mov    -0x44(%rbp),%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x40(%rbp),%eax
  sub    -0x44(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x20(%rbp),%eax
  sar    %eax
  mov    %eax,-0x18(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jne    L144
  movl   $0x0,-0x38(%rbp)
  movl   $0x0,-0x3c(%rbp)
  jmp    L142
L144:
  cmpl   $0x7f,-0x18(%rbp)
  jle    L31
  mov    -0x1c(%rbp),%edx
  mov    %edx,%eax
  shl    $0x8,%eax
  sub    %edx,%eax
  mov    $0x1fe,%edx
  mov    %edx,%ecx
  sub    -0x20(%rbp),%ecx
  cltd
  idiv   %ecx
  mov    %eax,-0x38(%rbp)
  jmp    L143
L31:
  mov    -0x1c(%rbp),%edx
  mov    %edx,%eax
  shl    $0x8,%eax
  sub    %edx,%eax
  cltd
  idivl  -0x20(%rbp)
  mov    %eax,-0x38(%rbp)
L143:
  mov    -0x40(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jne    L28
  mov    -0x2c(%rbp),%eax
  sub    -0x28(%rbp),%eax
  imul   $0x2a,%eax,%eax
  cltd
  idivl  -0x1c(%rbp)
  mov    %eax,-0x3c(%rbp)
  cmpl   $0x0,-0x3c(%rbp)
  jns    L142
  addl   $0x100,-0x3c(%rbp)
  jmp    L142
L28:
  mov    -0x40(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jne    L115
  mov    -0x28(%rbp),%eax
  sub    -0x30(%rbp),%eax
  imul   $0x2a,%eax,%eax
  cltd
  idivl  -0x1c(%rbp)
  add    $0x54,%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L142
L115:
  mov    -0x30(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  imul   $0x2a,%eax,%eax
  cltd
  idivl  -0x1c(%rbp)
  add    $0xa8,%eax
  mov    %eax,-0x3c(%rbp)
L142:
  mov    -0x38(%rbp),%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  or     %eax,%edx
  mov    -0x18(%rbp),%eax
  shl    $0x10,%eax
  or     %edx,%eax
  or     -0x24(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x8(%rbp),%rax
  mov    -0x14(%rbp),%edx
  mov    %edx,(%rax)
  subl   $0x1,-0x48(%rbp)
  addq   $0x4,-0x10(%rbp)
  addq   $0x4,-0x8(%rbp)
L11:
  cmpl   $0x0,-0x48(%rbp)
  jg     L89
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void GoRgbaToHsla(void *rgbaBytes, void *hslaBytes, int byteCount) {
  uint32_t *rgbaPixel = (uint32_t *)rgbaBytes;
  uint32_t *hslaPixel = (uint32_t *)hslaBytes;
  for (int i = (byteCount >> 2); i > 0; --i, ++rgbaPixel, ++hslaPixel) {
    unsigned rgba = *rgbaPixel;
    int r = rgba & 0xff;
    int g = (rgba >> 8) & 0xff;
    int b = (rgba >> 16) & 0xff;
    unsigned unshiftedA = rgba & 0xff000000;
    int min = r;
    if (min > g)
      min = g;
    if (min > b)
      min = b;
    int max = r;
    if (max < g)
      max = g;
    if (max < b)
      max = b;
    int sum = min + max;
    int diff = max - min;
    int l = sum >> 1;
    int h, s;
    if (diff == 0) {
      s = 0;
      h = 0;
    } else {
      if (l >= 128) {
        s = 255 * diff / (510 - sum);
      } else {
        s = 255 * diff / sum;
      }
      if (max == r) {
        h = 42 * (g - b) / diff;
        if (h < 0)
          h += 256;
      } else if (max == g) {
        h = 84 + 42 * (b - r) / diff;
      } else {
        h = 168 + 42 * (r - g) / diff;
      }
    }
    uint32_t hsla = (uint32_t)((unsigned)h | ((unsigned)s << 8) | ((unsigned)l << 16) | unshiftedA);
    *hslaPixel = hsla;
  }
}
```