user: 下面的汇编指令对应的C源代码是什么：

```asm
<convert_image_to_DXT5>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xb0,%rsp
  mov    %rdi,-0x98(%rbp)
  mov    %esi,-0x9c(%rbp)
  mov    %edx,-0xa0(%rbp)
  mov    %ecx,-0xa4(%rbp)
  mov    %r8,-0xb0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x7c(%rbp)
  movl   $0x1,-0x78(%rbp)
  movl   $0x0,-0x74(%rbp)
  mov    -0xb0(%rbp),%rax
  movl   $0x0,(%rax)
  cmpl   $0x0,-0x9c(%rbp)
  jle    L274
  cmpl   $0x0,-0xa0(%rbp)
  jle    L274
  cmpq   $0x0,-0x98(%rbp)
  je     L274
  cmpl   $0x0,-0xa4(%rbp)
  jle    L274
  cmpl   $0x4,-0xa4(%rbp)
  jle    L140
L274:
  mov    $0x0,%eax
  jmp    L230
L140:
  cmpl   $0x2,-0xa4(%rbp)
  jg     L131
  movl   $0x0,-0x78(%rbp)
L131:
  mov    -0xa4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x64(%rbp)
  mov    -0x9c(%rbp),%eax
  add    $0x3,%eax
  sar    $0x2,%eax
  mov    %eax,%edx
  mov    -0xa0(%rbp),%eax
  add    $0x3,%eax
  sar    $0x2,%eax
  imul   %edx,%eax
  shl    $0x4,%eax
  mov    %eax,%edx
  mov    -0xb0(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x60(%rbp)
  movl   $0x0,-0x88(%rbp)
  jmp    L60
L273:
  movl   $0x0,-0x8c(%rbp)
  jmp    L198
L181:
  movl   $0x0,-0x70(%rbp)
  movl   $0x4,-0x6c(%rbp)
  movl   $0x4,-0x68(%rbp)
  mov    -0x88(%rbp),%eax
  add    $0x4,%eax
  cmp    %eax,-0xa0(%rbp)
  jg     L190
  mov    -0xa0(%rbp),%eax
  sub    -0x88(%rbp),%eax
  mov    %eax,-0x68(%rbp)
L190:
  mov    -0x8c(%rbp),%eax
  add    $0x4,%eax
  cmp    %eax,-0x9c(%rbp)
  jg     L265
  mov    -0x9c(%rbp),%eax
  sub    -0x8c(%rbp),%eax
  mov    %eax,-0x6c(%rbp)
L265:
  movl   $0x0,-0x80(%rbp)
  jmp    L256
L17:
  movl   $0x0,-0x84(%rbp)
  jmp    L163
L220:
  mov    -0x88(%rbp),%edx
  mov    -0x80(%rbp),%eax
  add    %edx,%eax
  imul   -0x9c(%rbp),%eax
  imul   -0xa4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8c(%rbp),%ecx
  mov    -0x84(%rbp),%eax
  add    %ecx,%eax
  imul   -0xa4(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x98(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x70(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x70(%rbp)
  movzbl (%rcx),%edx
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  mov    -0x88(%rbp),%edx
  mov    -0x80(%rbp),%eax
  add    %edx,%eax
  imul   -0x9c(%rbp),%eax
  imul   -0xa4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8c(%rbp),%ecx
  mov    -0x84(%rbp),%eax
  add    %ecx,%eax
  imul   -0xa4(%rbp),%eax
  add    %eax,%edx
  mov    -0x78(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x98(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x70(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x70(%rbp)
  movzbl (%rcx),%edx
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  mov    -0x88(%rbp),%edx
  mov    -0x80(%rbp),%eax
  add    %edx,%eax
  imul   -0x9c(%rbp),%eax
  imul   -0xa4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8c(%rbp),%ecx
  mov    -0x84(%rbp),%eax
  add    %ecx,%eax
  imul   -0xa4(%rbp),%eax
  add    %eax,%edx
  mov    -0x78(%rbp),%eax
  add    %eax,%edx
  mov    -0x78(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x98(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x70(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x70(%rbp)
  movzbl (%rcx),%edx
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  mov    -0x88(%rbp),%edx
  mov    -0x80(%rbp),%eax
  add    %edx,%eax
  imul   -0x9c(%rbp),%eax
  imul   -0xa4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8c(%rbp),%ecx
  mov    -0x84(%rbp),%eax
  add    %ecx,%eax
  imul   -0xa4(%rbp),%eax
  add    %eax,%edx
  mov    -0xa4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    -0x64(%rbp),%edx
  imul   %edx,%eax
  mov    %eax,%ecx
  mov    $0x1,%eax
  sub    -0x64(%rbp),%eax
  mov    %eax,%esi
  mov    -0x70(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x70(%rbp)
  sub    %esi,%ecx
  mov    %ecx,%edx
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  addl   $0x1,-0x84(%rbp)
L163:
  mov    -0x84(%rbp),%eax
  cmp    -0x6c(%rbp),%eax
  jl     L220
  mov    -0x6c(%rbp),%eax
  mov    %eax,-0x84(%rbp)
  jmp    L252
L14:
  mov    -0x70(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x70(%rbp)
  movzbl -0x50(%rbp),%edx
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  mov    -0x70(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x70(%rbp)
  movzbl -0x4f(%rbp),%edx
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  mov    -0x70(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x70(%rbp)
  movzbl -0x4e(%rbp),%edx
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  mov    -0x70(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x70(%rbp)
  movzbl -0x4d(%rbp),%edx
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  addl   $0x1,-0x84(%rbp)
L252:
  cmpl   $0x3,-0x84(%rbp)
  jle    L14
  addl   $0x1,-0x80(%rbp)
L256:
  mov    -0x80(%rbp),%eax
  cmp    -0x68(%rbp),%eax
  jl     L17
  mov    -0x68(%rbp),%eax
  mov    %eax,-0x80(%rbp)
  jmp    L33
L189:
  movl   $0x0,-0x84(%rbp)
  jmp    L259
L69:
  mov    -0x70(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x70(%rbp)
  movzbl -0x50(%rbp),%edx
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  mov    -0x70(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x70(%rbp)
  movzbl -0x4f(%rbp),%edx
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  mov    -0x70(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x70(%rbp)
  movzbl -0x4e(%rbp),%edx
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  mov    -0x70(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x70(%rbp)
  movzbl -0x4d(%rbp),%edx
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  addl   $0x1,-0x84(%rbp)
L259:
  cmpl   $0x3,-0x84(%rbp)
  jle    L69
  addl   $0x1,-0x80(%rbp)
L33:
  cmpl   $0x3,-0x80(%rbp)
  jle    L189
  lea    -0x58(%rbp),%rdx
  lea    -0x50(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <compress_DDS_alpha_block@plt>
  movl   $0x0,-0x84(%rbp)
  jmp    L266
L205:
  mov    -0x7c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x7c(%rbp)
  movslq %eax,%rdx
  mov    -0x60(%rbp),%rax
  add    %rax,%rdx
  mov    -0x84(%rbp),%eax
  cltq
  movzbl -0x58(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x84(%rbp)
L266:
  cmpl   $0x7,-0x84(%rbp)
  jle    L205
  addl   $0x1,-0x74(%rbp)
  lea    -0x58(%rbp),%rdx
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x4,%edi
  call   <compress_DDS_color_block@plt>
  movl   $0x0,-0x84(%rbp)
  jmp    L184
L223:
  mov    -0x7c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x7c(%rbp)
  movslq %eax,%rdx
  mov    -0x60(%rbp),%rax
  add    %rax,%rdx
  mov    -0x84(%rbp),%eax
  cltq
  movzbl -0x58(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x84(%rbp)
L184:
  cmpl   $0x7,-0x84(%rbp)
  jle    L223
  addl   $0x4,-0x8c(%rbp)
L198:
  mov    -0x8c(%rbp),%eax
  cmp    -0x9c(%rbp),%eax
  jl     L181
  addl   $0x4,-0x88(%rbp)
L60:
  mov    -0x88(%rbp),%eax
  cmp    -0xa0(%rbp),%eax
  jl     L273
  mov    -0x60(%rbp),%rax
L230:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L239
  call   <__stack_chk_fail@plt>
L239:
  leave
  ret
```

assistant: ```c
unsigned char *convert_image_to_DXT5(const unsigned char *const uncompressed, int width, int height, int channels, int *out_size) {
  unsigned char *compressed;
  int i, j, x, y;
  unsigned char ublock[16 * 4];
  unsigned char cblock[8];
  int index = 0, chan_step = 1;
  int block_count = 0, has_alpha;
  *out_size = 0;
  if ((width < 1) || (height < 1) || (NULL == uncompressed) || (channels < 1) || (channels > 4)) {
    return NULL;
  }
  if (channels < 3) {
    chan_step = 0;
  }
  has_alpha = 1 - (channels & 1);
  *out_size = ((width + 3) >> 2) * ((height + 3) >> 2) * 16;
  compressed = (unsigned char *)malloc(*out_size);
  for (j = 0; j < height; j += 4) {
    for (i = 0; i < width; i += 4) {
      int idx = 0;
      int mx = 4, my = 4;
      if (j + 4 >= height) {
        my = height - j;
      }
      if (i + 4 >= width) {
        mx = width - i;
      }
      for (y = 0; y < my; ++y) {
        for (x = 0; x < mx; ++x) {
          ublock[idx++] = uncompressed[(j + y) * width * channels + (i + x) * channels];
          ublock[idx++] = uncompressed[(j + y) * width * channels + (i + x) * channels + chan_step];
          ublock[idx++] = uncompressed[(j + y) * width * channels + (i + x) * channels + chan_step + chan_step];
          ublock[idx++] = has_alpha * uncompressed[(j + y) * width * channels + (i + x) * channels + channels - 1] + (1 - has_alpha) * 255;
        }
        for (x = mx; x < 4; ++x) {
          ublock[idx++] = ublock[0];
          ublock[idx++] = ublock[1];
          ublock[idx++] = ublock[2];
          ublock[idx++] = ublock[3];
        }
      }
      for (y = my; y < 4; ++y) {
        for (x = 0; x < 4; ++x) {
          ublock[idx++] = ublock[0];
          ublock[idx++] = ublock[1];
          ublock[idx++] = ublock[2];
          ublock[idx++] = ublock[3];
        }
      }
      compress_DDS_alpha_block(ublock, cblock);
      for (x = 0; x < 8; ++x) {
        compressed[index++] = cblock[x];
      }
      ++block_count;
      compress_DDS_color_block(4, ublock, cblock);
      for (x = 0; x < 8; ++x) {
        compressed[index++] = cblock[x];
      }
    }
  }
  return compressed;
}
```