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

```asm
<DecompressBlockDXT1Internal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %edx,-0x64(%rbp)
  mov    %rcx,-0x70(%rbp)
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x58(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x38(%rbp),%eax
  sar    $0xb,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x8,%eax
  sub    %edx,%eax
  add    $0x10,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x38(%rbp),%eax
  sar    $0x5,%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x8,%eax
  sub    %edx,%eax
  add    $0x20,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  lea    0x3f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x6,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  lea    0x3f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x6,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x38(%rbp),%eax
  and    $0x1f,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x8,%eax
  sub    %edx,%eax
  add    $0x10,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x34(%rbp),%eax
  sar    $0xb,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x8,%eax
  sub    %edx,%eax
  add    $0x10,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x34(%rbp),%eax
  sar    $0x5,%eax
  and    $0x3f,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x8,%eax
  sub    %edx,%eax
  add    $0x20,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  lea    0x3f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x6,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  lea    0x3f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x6,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x34(%rbp),%eax
  and    $0x1f,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x8,%eax
  sub    %edx,%eax
  add    $0x10,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x58(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x38(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L122
  movl   $0x0,-0x44(%rbp)
  jmp    L208
L34:
  movl   $0x0,-0x48(%rbp)
  jmp    L11
L1:
  mov    -0x44(%rbp),%eax
  lea    0x0(,%rax,4),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  movl   $0x0,-0x40(%rbp)
  mov    -0x44(%rbp),%eax
  lea    0x0(,%rax,4),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    -0x14(%rbp),%edx
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  and    $0x3,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x3,-0x4(%rbp)
  je     L248
  cmpl   $0x3,-0x4(%rbp)
  jg     L240
  cmpl   $0x2,-0x4(%rbp)
  je     L193
  cmpl   $0x2,-0x4(%rbp)
  jg     L240
  cmpl   $0x0,-0x4(%rbp)
  je     L89
  cmpl   $0x1,-0x4(%rbp)
  je     L128
  jmp    L240
L89:
  mov    -0x8(%rbp),%ecx
  mov    -0x24(%rbp),%edx
  mov    -0x28(%rbp),%esi
  mov    -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <PackRGBA@plt>
  mov    %eax,-0x40(%rbp)
  jmp    L240
L128:
  mov    -0x8(%rbp),%ecx
  mov    -0x18(%rbp),%edx
  mov    -0x1c(%rbp),%esi
  mov    -0x20(%rbp),%eax
  mov    %eax,%edi
  call   <PackRGBA@plt>
  mov    %eax,-0x40(%rbp)
  jmp    L240
L193:
  mov    -0x24(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  sub    %eax,%edx
  mov    -0x28(%rbp),%eax
  lea    (%rax,%rax,1),%ecx
  mov    -0x1c(%rbp),%eax
  add    %ecx,%eax
  movslq %eax,%rcx
  imul   $0x55555556,%rcx,%rcx
  shr    $0x20,%rcx
  sar    $0x1f,%eax
  mov    %ecx,%esi
  sub    %eax,%esi
  mov    -0x2c(%rbp),%eax
  lea    (%rax,%rax,1),%ecx
  mov    -0x20(%rbp),%eax
  add    %ecx,%eax
  movslq %eax,%rcx
  imul   $0x55555556,%rcx,%rcx
  shr    $0x20,%rcx
  sar    $0x1f,%eax
  mov    %ecx,%edi
  sub    %eax,%edi
  mov    -0x8(%rbp),%eax
  mov    %eax,%ecx
  call   <PackRGBA@plt>
  mov    %eax,-0x40(%rbp)
  jmp    L240
L248:
  mov    -0x18(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  sub    %eax,%edx
  mov    -0x1c(%rbp),%eax
  lea    (%rax,%rax,1),%ecx
  mov    -0x28(%rbp),%eax
  add    %ecx,%eax
  movslq %eax,%rcx
  imul   $0x55555556,%rcx,%rcx
  shr    $0x20,%rcx
  sar    $0x1f,%eax
  mov    %ecx,%esi
  sub    %eax,%esi
  mov    -0x20(%rbp),%eax
  lea    (%rax,%rax,1),%ecx
  mov    -0x2c(%rbp),%eax
  add    %ecx,%eax
  movslq %eax,%rcx
  imul   $0x55555556,%rcx,%rcx
  shr    $0x20,%rcx
  sar    $0x1f,%eax
  mov    %ecx,%edi
  sub    %eax,%edi
  mov    -0x8(%rbp),%eax
  mov    %eax,%ecx
  call   <PackRGBA@plt>
  mov    %eax,-0x40(%rbp)
  nop
L240:
  mov    -0x44(%rbp),%eax
  imul   -0x64(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rax,%rdx
  mov    -0x40(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x48(%rbp)
L11:
  cmpl   $0x3,-0x48(%rbp)
  jle    L1
  addl   $0x1,-0x44(%rbp)
L208:
  cmpl   $0x3,-0x44(%rbp)
  jle    L34
  jmp    L39
L122:
  movl   $0x0,-0x44(%rbp)
  jmp    L21
L194:
  movl   $0x0,-0x48(%rbp)
  jmp    L2
L280:
  mov    -0x44(%rbp),%eax
  lea    0x0(,%rax,4),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x10(%rbp)
  movl   $0x0,-0x3c(%rbp)
  mov    -0x44(%rbp),%eax
  lea    0x0(,%rax,4),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    -0x14(%rbp),%edx
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  and    $0x3,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x3,-0xc(%rbp)
  je     L269
  cmpl   $0x3,-0xc(%rbp)
  jg     L220
  cmpl   $0x2,-0xc(%rbp)
  je     L61
  cmpl   $0x2,-0xc(%rbp)
  jg     L220
  cmpl   $0x0,-0xc(%rbp)
  je     L75
  cmpl   $0x1,-0xc(%rbp)
  je     L51
  jmp    L220
L75:
  mov    -0x10(%rbp),%ecx
  mov    -0x24(%rbp),%edx
  mov    -0x28(%rbp),%esi
  mov    -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <PackRGBA@plt>
  mov    %eax,-0x3c(%rbp)
  jmp    L220
L51:
  mov    -0x10(%rbp),%ecx
  mov    -0x18(%rbp),%edx
  mov    -0x1c(%rbp),%esi
  mov    -0x20(%rbp),%eax
  mov    %eax,%edi
  call   <PackRGBA@plt>
  mov    %eax,-0x3c(%rbp)
  jmp    L220
L61:
  mov    -0x24(%rbp),%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%ecx
  mov    -0x1c(%rbp),%eax
  add    %ecx,%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  sar    %eax
  mov    %eax,%esi
  mov    -0x2c(%rbp),%ecx
  mov    -0x20(%rbp),%eax
  add    %ecx,%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  sar    %eax
  mov    %eax,%edi
  mov    -0x10(%rbp),%eax
  mov    %eax,%ecx
  call   <PackRGBA@plt>
  mov    %eax,-0x3c(%rbp)
  jmp    L220
L269:
  mov    -0x10(%rbp),%eax
  mov    %eax,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <PackRGBA@plt>
  mov    %eax,-0x3c(%rbp)
  nop
L220:
  mov    -0x44(%rbp),%eax
  imul   -0x64(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rax,%rdx
  mov    -0x3c(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x48(%rbp)
L2:
  cmpl   $0x3,-0x48(%rbp)
  jle    L280
  addl   $0x1,-0x44(%rbp)
L21:
  cmpl   $0x3,-0x44(%rbp)
  jle    L194
L39:
  nop
  leave
  ret
```

assistant: ```c
void DecompressBlockDXT1Internal(const uint8_t *block, uint32_t *output, uint32_t outputStride, const uint8_t *alphaValues) {
  uint32_t temp, code;
  uint16_t color0, color1;
  uint8_t r0, g0, b0, r1, g1, b1;
  int i, j;
  color0 = *(const uint16_t *)(block);
  color1 = *(const uint16_t *)(block + 2);
  temp = (color0 >> 11) * 255 + 16;
  r0 = (uint8_t)((temp / 32 + temp) / 32);
  temp = ((color0 & 0x07E0) >> 5) * 255 + 32;
  g0 = (uint8_t)((temp / 64 + temp) / 64);
  temp = (color0 & 0x001F) * 255 + 16;
  b0 = (uint8_t)((temp / 32 + temp) / 32);
  temp = (color1 >> 11) * 255 + 16;
  r1 = (uint8_t)((temp / 32 + temp) / 32);
  temp = ((color1 & 0x07E0) >> 5) * 255 + 32;
  g1 = (uint8_t)((temp / 64 + temp) / 64);
  temp = (color1 & 0x001F) * 255 + 16;
  b1 = (uint8_t)((temp / 32 + temp) / 32);
  code = *(const uint32_t *)(block + 4);
  if (color0 > color1) {
    for (j = 0; j < 4; ++j) {
      for (i = 0; i < 4; ++i) {
        uint32_t finalColor, positionCode;
        uint8_t alpha;
        alpha = alphaValues[j * 4 + i];
        finalColor = 0;
        positionCode = (code >> 2 * (4 * j + i)) & 0x03;
        switch (positionCode) {
        case 0:
          finalColor = PackRGBA(r0, g0, b0, alpha);
          break;
        case 1:
          finalColor = PackRGBA(r1, g1, b1, alpha);
          break;
        case 2:
          finalColor = PackRGBA((2 * r0 + r1) / 3, (2 * g0 + g1) / 3, (2 * b0 + b1) / 3, alpha);
          break;
        case 3:
          finalColor = PackRGBA((r0 + 2 * r1) / 3, (g0 + 2 * g1) / 3, (b0 + 2 * b1) / 3, alpha);
          break;
        }
        output[j * outputStride + i] = finalColor;
      }
    }
  } else {
    for (j = 0; j < 4; ++j) {
      for (i = 0; i < 4; ++i) {
        uint32_t finalColor, positionCode;
        uint8_t alpha;
        alpha = alphaValues[j * 4 + i];
        finalColor = 0;
        positionCode = (code >> 2 * (4 * j + i)) & 0x03;
        switch (positionCode) {
        case 0:
          finalColor = PackRGBA(r0, g0, b0, alpha);
          break;
        case 1:
          finalColor = PackRGBA(r1, g1, b1, alpha);
          break;
        case 2:
          finalColor = PackRGBA((r0 + r1) / 2, (g0 + g1) / 2, (b0 + b1) / 2, alpha);
          break;
        case 3:
          finalColor = PackRGBA(0, 0, 0, alpha);
          break;
        }
        output[j * outputStride + i] = finalColor;
      }
    }
  }
}
```