user: Converte this assembly snippet into its equivalent C code:

```asm
<stbi_decode_DXT_color_block>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x48,%rsp
  movzbl 0x3(%rsi),%r14d
  mov    %rdi,0x8(%rsp)
  movzbl 0x1(%rsi),%edi
  lea    0x20(%rsp),%r15
  lea    0x28(%rsp),%rcx
  shl    $0x8,%r14d
  lea    0x24(%rsp),%rdx
  shl    $0x8,%edi
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movzbl 0x2(%rsi),%eax
  mov    %rcx,0x18(%rsp)
  mov    %rdx,0x10(%rsp)
  add    %eax,%r14d
  movzbl (%rsi),%eax
  mov    %r15,%rsi
  add    %eax,%edi
  call   <stbi_rgb_888_from_565@plt>
  mov    0x20(%rsp),%ebp
  mov    0x24(%rsp),%r13d
  mov    %r15,%rsi
  mov    0x28(%rsp),%r12d
  mov    0x18(%rsp),%rcx
  mov    %r14d,%edi
  mov    0x10(%rsp),%rdx
  mov    %bpl,0x2c(%rsp)
  mov    %r13b,0x2d(%rsp)
  mov    %r12b,0x2e(%rsp)
  call   <stbi_rgb_888_from_565@plt>
  mov    0x20(%rsp),%r10d
  movzbl %bpl,%r9d
  mov    $0xaaaaaaab,%edx
  mov    0x24(%rsp),%r8d
  movzbl %r13b,%edi
  mov    0x28(%rsp),%esi
  movzbl %r12b,%ecx
  mov    %r10b,0x2f(%rsp)
  movzbl %r10b,%r10d
  lea    (%r10,%r9,2),%eax
  mov    %r8b,0x30(%rsp)
  movzbl %r8b,%r8d
  imul   %rdx,%rax
  mov    %sil,0x31(%rsp)
  movzbl %sil,%esi
  shr    $0x21,%rax
  mov    %al,0x32(%rsp)
  lea    (%r8,%rdi,2),%eax
  imul   %rdx,%rax
  shr    $0x21,%rax
  mov    %al,0x33(%rsp)
  lea    (%rsi,%rcx,2),%eax
  imul   %rdx,%rax
  shr    $0x21,%rax
  mov    %al,0x34(%rsp)
  lea    (%r9,%r10,2),%eax
  imul   %rdx,%rax
  shr    $0x21,%rax
  mov    %al,0x35(%rsp)
  lea    (%rdi,%r8,2),%eax
  imul   %rdx,%rax
  shr    $0x21,%rax
  mov    %al,0x36(%rsp)
  lea    (%rcx,%rsi,2),%eax
  mov    $0x20,%esi
  imul   %rdx,%rax
  mov    0x8(%rsp),%rdx
  shr    $0x21,%rax
  mov    %al,0x37(%rsp)
  nopl   0x0(%rax,%rax,1)
L12:
  mov    %esi,%eax
  mov    %esi,%ecx
  add    $0x2,%esi
  add    $0x4,%rdx
  sar    $0x3,%eax
  and    $0x7,%ecx
  cltq
  movzbl (%rbx,%rax,1),%eax
  sar    %cl,%eax
  and    $0x3,%eax
  lea    (%rax,%rax,2),%eax
  movslq %eax,%rcx
  movzbl 0x2c(%rsp,%rcx,1),%ecx
  mov    %cl,-0x4(%rdx)
  lea    0x1(%rax),%ecx
  add    $0x2,%eax
  movslq %ecx,%rcx
  cltq
  movzbl 0x2c(%rsp,%rcx,1),%ecx
  movzbl 0x2c(%rsp,%rax,1),%eax
  mov    %cl,-0x3(%rdx)
  mov    %al,-0x2(%rdx)
  cmp    $0x40,%esi
  jne    L12
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L5
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L5:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void stbi_decode_DXT_color_block(unsigned char uncompressed[16 * 4], unsigned char compressed[8]) {
  int next_bit = 4 * 8;
  int i, r, g, b;
  int c0, c1;
  unsigned char decode_colors[4 * 3];
  c0 = compressed[0] + (compressed[1] << 8);
  c1 = compressed[2] + (compressed[3] << 8);
  stbi_rgb_888_from_565(c0, &r, &g, &b);
  decode_colors[0] = r;
  decode_colors[1] = g;
  decode_colors[2] = b;
  stbi_rgb_888_from_565(c1, &r, &g, &b);
  decode_colors[3] = r;
  decode_colors[4] = g;
  decode_colors[5] = b;
  decode_colors[6] = (2 * decode_colors[0] + decode_colors[3]) / 3;
  decode_colors[7] = (2 * decode_colors[1] + decode_colors[4]) / 3;
  decode_colors[8] = (2 * decode_colors[2] + decode_colors[5]) / 3;
  decode_colors[9] = (decode_colors[0] + 2 * decode_colors[3]) / 3;
  decode_colors[10] = (decode_colors[1] + 2 * decode_colors[4]) / 3;
  decode_colors[11] = (decode_colors[2] + 2 * decode_colors[5]) / 3;
  for (i = 0; i < 16 * 4; i += 4) {
    int idx = ((compressed[next_bit >> 3] >> (next_bit & 7)) & 3) * 3;
    next_bit += 2;
    uncompressed[i + 0] = decode_colors[idx + 0];
    uncompressed[i + 1] = decode_colors[idx + 1];
    uncompressed[i + 2] = decode_colors[idx + 2];
  }
}
```