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

```asm
<compress_DDS_color_block>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %edi,-0x74(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %rdx,-0x88(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x2c(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x24(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x60(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x58(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x2,-0x1c(%rbp)
  movl   $0x3,-0x18(%rbp)
  movl   $0x1,-0x14(%rbp)
  mov    -0x80(%rbp),%rcx
  mov    -0x74(%rbp),%edx
  lea    -0x6c(%rbp),%rsi
  lea    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <LSE_master_colors_max_min@plt>
  mov    -0x70(%rbp),%eax
  mov    %eax,%edx
  mov    -0x88(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x70(%rbp),%eax
  sar    $0x8,%eax
  mov    %eax,%edx
  mov    -0x88(%rbp),%rax
  add    $0x1,%rax
  mov    %dl,(%rax)
  mov    -0x6c(%rbp),%edx
  mov    -0x88(%rbp),%rax
  add    $0x2,%rax
  mov    %dl,(%rax)
  mov    -0x6c(%rbp),%eax
  sar    $0x8,%eax
  mov    %eax,%edx
  mov    -0x88(%rbp),%rax
  add    $0x3,%rax
  mov    %dl,(%rax)
  mov    -0x88(%rbp),%rax
  add    $0x4,%rax
  movb   $0x0,(%rax)
  mov    -0x88(%rbp),%rax
  add    $0x5,%rax
  movb   $0x0,(%rax)
  mov    -0x88(%rbp),%rax
  add    $0x6,%rax
  movb   $0x0,(%rax)
  mov    -0x88(%rbp),%rax
  add    $0x7,%rax
  movb   $0x0,(%rax)
  mov    -0x70(%rbp),%eax
  lea    -0x50(%rbp),%rdx
  lea    0x8(%rdx),%rcx
  lea    -0x50(%rbp),%rdx
  add    $0x4,%rdx
  lea    -0x50(%rbp),%rsi
  mov    %eax,%edi
  call   <rgb_888_from_565@plt>
  mov    -0x6c(%rbp),%eax
  lea    -0x40(%rbp),%rdx
  lea    0x8(%rdx),%rcx
  lea    -0x40(%rbp),%rdx
  add    $0x4,%rdx
  lea    -0x40(%rbp),%rsi
  mov    %eax,%edi
  call   <rgb_888_from_565@plt>
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x60(%rbp)
  movl   $0x0,-0x68(%rbp)
  jmp    L76
L3:
  mov    -0x68(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%edx
  mov    -0x68(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  sub    %eax,%edx
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  mov    -0x68(%rbp),%eax
  cltq
  movss  %xmm0,-0x30(%rbp,%rax,4)
  mov    -0x68(%rbp),%eax
  cltq
  movss  -0x30(%rbp,%rax,4),%xmm1
  mov    -0x68(%rbp),%eax
  cltq
  movss  -0x30(%rbp,%rax,4),%xmm0
  mulss  %xmm1,%xmm0
  movss  -0x60(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x60(%rbp)
  addl   $0x1,-0x68(%rbp)
L76:
  cmpl   $0x2,-0x68(%rbp)
  jle    L3
  movss  -0x60(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comiss %xmm1,%xmm0
  jbe    L19
  movss  D29(%rip),%xmm0
  divss  -0x60(%rbp),%xmm0
  movss  %xmm0,-0x60(%rbp)
L19:
  movss  -0x30(%rbp),%xmm0
  mulss  -0x60(%rbp),%xmm0
  movss  %xmm0,-0x30(%rbp)
  movss  -0x2c(%rbp),%xmm0
  mulss  -0x60(%rbp),%xmm0
  movss  %xmm0,-0x2c(%rbp)
  movss  -0x28(%rbp),%xmm0
  mulss  -0x60(%rbp),%xmm0
  movss  %xmm0,-0x28(%rbp)
  movss  -0x30(%rbp),%xmm1
  mov    -0x50(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  %xmm0,%xmm1
  movss  -0x2c(%rbp),%xmm2
  mov    -0x4c(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  movss  -0x28(%rbp),%xmm2
  mov    -0x48(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x58(%rbp)
  movl   $0x20,-0x64(%rbp)
  movl   $0x0,-0x68(%rbp)
  jmp    L4
L27:
  movl   $0x0,-0x5c(%rbp)
  movss  -0x30(%rbp),%xmm1
  mov    -0x68(%rbp),%eax
  imul   -0x74(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  %xmm0,%xmm1
  movss  -0x2c(%rbp),%xmm2
  mov    -0x68(%rbp),%eax
  imul   -0x74(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  movss  -0x28(%rbp),%xmm2
  mov    -0x68(%rbp),%eax
  imul   -0x74(%rbp),%eax
  cltq
  lea    0x2(%rax),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  subss  -0x58(%rbp),%xmm0
  movss  %xmm0,-0x54(%rbp)
  movss  -0x54(%rbp),%xmm1
  movss  D3(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movss  D15(%rip),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0x5c(%rbp)
  cmpl   $0x3,-0x5c(%rbp)
  jle    L82
  movl   $0x3,-0x5c(%rbp)
  jmp    L74
L82:
  cmpl   $0x0,-0x5c(%rbp)
  jns    L74
  movl   $0x0,-0x5c(%rbp)
L74:
  mov    -0x64(%rbp),%eax
  sar    $0x3,%eax
  movslq %eax,%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %eax,%esi
  mov    -0x5c(%rbp),%eax
  cltq
  mov    -0x20(%rbp,%rax,4),%edx
  mov    -0x64(%rbp),%eax
  and    $0x7,%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  or     %eax,%esi
  mov    %esi,%ecx
  mov    -0x64(%rbp),%eax
  sar    $0x3,%eax
  movslq %eax,%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x2,-0x64(%rbp)
  addl   $0x1,-0x68(%rbp)
L4:
  cmpl   $0xf,-0x68(%rbp)
  jle    L27
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L38
  call   <__stack_chk_fail@plt>
L38:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D29
datatype: f32
name: disassemble_data
arguments: label: D3
datatype: byte[4]
name: disassemble_data
arguments: label: D15
datatype: byte[4]

tool: D29: 1

tool: {"D3": [0x00,0x00,0x40,0x40]}

tool: {"D15": [0x00,0x00,0x00,0x3f]}

assistant: ```c
void compress_DDS_color_block(int channels, const unsigned char *const uncompressed, unsigned char compressed[8]) {
  int i;
  int next_bit;
  int enc_c0, enc_c1;
  int c0[4], c1[4];
  float color_line[] = {0.0f, 0.0f, 0.0f, 0.0f};
  float vec_len2 = 0.0f, dot_offset = 0.0f;
  int swizzle4[] = {0, 2, 3, 1};
  LSE_master_colors_max_min(&enc_c0, &enc_c1, channels, uncompressed);
  compressed[0] = (enc_c0 >> 0) & 255;
  compressed[1] = (enc_c0 >> 8) & 255;
  compressed[2] = (enc_c1 >> 0) & 255;
  compressed[3] = (enc_c1 >> 8) & 255;
  compressed[4] = 0;
  compressed[5] = 0;
  compressed[6] = 0;
  compressed[7] = 0;
  rgb_888_from_565(enc_c0, &c0[0], &c0[1], &c0[2]);
  rgb_888_from_565(enc_c1, &c1[0], &c1[1], &c1[2]);
  vec_len2 = 0.0f;
  for (i = 0; i < 3; ++i) {
    color_line[i] = (float)(c1[i] - c0[i]);
    vec_len2 += color_line[i] * color_line[i];
  }
  if (vec_len2 > 0.0f) {
    vec_len2 = 1.0f / vec_len2;
  }
  color_line[0] *= vec_len2;
  color_line[1] *= vec_len2;
  color_line[2] *= vec_len2;
  dot_offset = color_line[0] * c0[0] + color_line[1] * c0[1] + color_line[2] * c0[2];
  next_bit = 8 * 4;
  for (i = 0; i < 16; ++i) {
    int next_value = 0;
    float dot_product = color_line[0] * uncompressed[i * channels + 0] + color_line[1] * uncompressed[i * channels + 1] + color_line[2] * uncompressed[i * channels + 2] - dot_offset;
    next_value = (int)(dot_product * 3.0f + 0.5f);
    if (next_value > 3) {
      next_value = 3;
    } else if (next_value < 0) {
      next_value = 0;
    }
    compressed[next_bit >> 3] |= swizzle4[next_value] << (next_bit & 7);
    next_bit += 2;
  }
}
```