user: 请从给定的汇编指令推导出C源代码：

```asm
<stbi_decode_DXT1_block>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x58,%rsp
  movzbl 0x1(%rsi),%r13d
  movzbl 0x3(%rsi),%ebp
  mov    %rdi,(%rsp)
  lea    0x2c(%rsp),%rcx
  lea    0x28(%rsp),%rdx
  shl    $0x8,%r13d
  shl    $0x8,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  movzbl (%rsi),%eax
  mov    %rcx,0x18(%rsp)
  mov    %rdx,0x10(%rsp)
  add    %eax,%r13d
  movzbl 0x2(%rsi),%eax
  lea    0x24(%rsp),%rsi
  mov    %r13d,%edi
  mov    %rsi,0x8(%rsp)
  add    %eax,%ebp
  call   <stbi_rgb_888_from_565@plt>
  mov    0x24(%rsp),%r12d
  mov    0x28(%rsp),%r15d
  mov    %ebp,%edi
  mov    0x2c(%rsp),%r14d
  mov    0x18(%rsp),%rcx
  movb   $0xff,0x33(%rsp)
  mov    0x10(%rsp),%rdx
  mov    0x8(%rsp),%rsi
  mov    %r12b,0x30(%rsp)
  mov    %r15b,0x31(%rsp)
  mov    %r14b,0x32(%rsp)
  call   <stbi_rgb_888_from_565@plt>
  mov    0x24(%rsp),%eax
  mov    0x28(%rsp),%ecx
  mov    0x2c(%rsp),%r8d
  mov    %al,0x34(%rsp)
  mov    %cl,0x35(%rsp)
  cmp    %ebp,%r13d
  jle    L14
  movzbl %al,%edx
  movzbl %r12b,%r9d
  movzbl %r15b,%r15d
  movzbl %cl,%edi
  movzbl %r14b,%r14d
  lea    (%rdx,%r9,2),%esi
  lea    (%rdi,%r15,2),%ecx
  movzbl %r8b,%r11d
  mov    $0xaaaaaaab,%r10d
  lea    (%r9,%rdx,2),%r9d
  lea    (%r11,%r14,2),%eax
  lea    (%r15,%rdi,2),%edi
  lea    (%r14,%r11,2),%edx
  imul   %r10,%rsi
  imul   %r10,%rcx
  imul   %r10,%rax
  imul   %r10,%r9
  shr    $0x21,%rsi
  imul   %r10,%rdi
  shr    $0x21,%rcx
  imul   %r10,%rdx
  shr    $0x21,%rax
  mov    $0xffffffff,%r10d
  shr    $0x21,%r9
  shr    $0x21,%rdi
  shr    $0x21,%rdx
L7:
  mov    %r8b,0x36(%rsp)
  movb   $0xff,0x37(%rsp)
  mov    %cl,0x39(%rsp)
  mov    %al,0x3a(%rsp)
  movb   $0xff,0x3b(%rsp)
  mov    %r9b,0x3c(%rsp)
  mov    %dil,0x3d(%rsp)
  mov    %r10b,0x3f(%rsp)
  mov    %dl,0x3e(%rsp)
  mov    (%rsp),%rdx
  mov    %sil,0x38(%rsp)
  mov    $0x20,%esi
  nopl   0x0(%rax)
L11:
  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
  shl    $0x2,%eax
  movslq %eax,%rcx
  movzbl 0x30(%rsp,%rcx,1),%ecx
  mov    %cl,-0x4(%rdx)
  lea    0x1(%rax),%ecx
  movslq %ecx,%rcx
  movzbl 0x30(%rsp,%rcx,1),%ecx
  mov    %cl,-0x3(%rdx)
  lea    0x2(%rax),%ecx
  add    $0x3,%eax
  movslq %ecx,%rcx
  cltq
  movzbl 0x30(%rsp,%rcx,1),%ecx
  movzbl 0x30(%rsp,%rax,1),%eax
  mov    %cl,-0x2(%rdx)
  mov    %al,-0x1(%rdx)
  cmp    $0x40,%esi
  jne    L11
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L14:
  movzbl %al,%eax
  movzbl %r12b,%edx
  movzbl %r15b,%r15d
  movzbl %r14b,%r14d
  lea    (%rax,%rdx,1),%esi
  movzbl %cl,%eax
  xor    %r9d,%r9d
  xor    %edi,%edi
  lea    (%r15,%rax,1),%ecx
  movzbl %r8b,%eax
  shr    %esi
  xor    %edx,%edx
  add    %r14d,%eax
  shr    %ecx
  xor    %r10d,%r10d
  shr    %eax
  jmp    L7
L8:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void stbi_decode_DXT1_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 * 4];
  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;
  decode_colors[3] = 255;
  stbi_rgb_888_from_565(c1, &r, &g, &b);
  decode_colors[4] = r;
  decode_colors[5] = g;
  decode_colors[6] = b;
  decode_colors[7] = 255;
  if (c0 > c1) {
    decode_colors[8] = (2 * decode_colors[0] + decode_colors[4]) / 3;
    decode_colors[9] = (2 * decode_colors[1] + decode_colors[5]) / 3;
    decode_colors[10] = (2 * decode_colors[2] + decode_colors[6]) / 3;
    decode_colors[11] = 255;
    decode_colors[12] = (decode_colors[0] + 2 * decode_colors[4]) / 3;
    decode_colors[13] = (decode_colors[1] + 2 * decode_colors[5]) / 3;
    decode_colors[14] = (decode_colors[2] + 2 * decode_colors[6]) / 3;
    decode_colors[15] = 255;
  } else {
    decode_colors[8] = (decode_colors[0] + decode_colors[4]) / 2;
    decode_colors[9] = (decode_colors[1] + decode_colors[5]) / 2;
    decode_colors[10] = (decode_colors[2] + decode_colors[6]) / 2;
    decode_colors[11] = 255;
    decode_colors[12] = 0;
    decode_colors[13] = 0;
    decode_colors[14] = 0;
    decode_colors[15] = 0;
  }
  for (i = 0; i < 16 * 4; i += 4) {
    int idx = ((compressed[next_bit >> 3] >> (next_bit & 7)) & 3) * 4;
    next_bit += 2;
    uncompressed[i + 0] = decode_colors[idx + 0];
    uncompressed[i + 1] = decode_colors[idx + 1];
    uncompressed[i + 2] = decode_colors[idx + 2];
    uncompressed[i + 3] = decode_colors[idx + 3];
  }
}
```