user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<textureResample>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9d,-0x4c(%rbp)
  movq   $0x0,-0x18(%rbp)
  cmpq   $0x0,-0x48(%rbp)
  je     L10
  cmpq   $0x0,-0x28(%rbp)
  jne    L169
L10:
  mov    $0x0,%eax
  jmp    L195
L169:
  cmpq   $0x20,-0x40(%rbp)
  je     L74
  mov    $0x0,%eax
  jmp    L195
L74:
  cmpq   $0x20,-0x48(%rbp)
  je     L8
  cmpq   $0x18,-0x48(%rbp)
  je     L8
  mov    $0x0,%eax
  jmp    L195
L8:
  mov    -0x40(%rbp),%rax
  lea    0x7(%rax),%rdx
  test   %rax,%rax
  cmovs  %rdx,%rax
  sar    $0x3,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x48(%rbp),%rax
  lea    0x7(%rax),%rdx
  test   %rax,%rax
  cmovs  %rdx,%rax
  sar    $0x3,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x30(%rbp),%rax
  imul   -0x38(%rbp),%rax
  imul   -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x20,-0x40(%rbp)
  jne    L109
  cmpq   $0x18,-0x48(%rbp)
  jne    L109
  cmpl   $0x0,-0x4c(%rbp)
  jne    L109
  mov    -0x30(%rbp),%rax
  imul   -0x38(%rbp),%rax
  imul   -0x10(%rbp),%rax
  mov    %rax,%rcx
  mov    -0x30(%rbp),%rax
  imul   -0x38(%rbp),%rax
  imul   -0x8(%rbp),%rax
  mov    %rax,%rsi
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <textureRemoveAlphaChannel@plt>
  jmp    L93
L109:
  cmpq   $0x20,-0x40(%rbp)
  jne    L124
  cmpq   $0x18,-0x48(%rbp)
  jne    L124
  cmpl   $0x0,-0x4c(%rbp)
  je     L124
  mov    -0x30(%rbp),%rax
  imul   -0x38(%rbp),%rax
  imul   -0x10(%rbp),%rax
  mov    %rax,%rcx
  mov    -0x30(%rbp),%rax
  imul   -0x38(%rbp),%rax
  imul   -0x8(%rbp),%rax
  mov    %rax,%rsi
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <textureInvertRBAndRemoveAlphaChannel@plt>
  jmp    L93
L124:
  cmpq   $0x20,-0x40(%rbp)
  jne    L26
  cmpq   $0x20,-0x48(%rbp)
  jne    L26
  cmpl   $0x0,-0x4c(%rbp)
  je     L26
  mov    -0x30(%rbp),%rax
  imul   -0x38(%rbp),%rax
  imul   -0x8(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x30(%rbp),%rax
  imul   -0x38(%rbp),%rax
  imul   -0x8(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <textureInvertRBInPlace@plt>
  jmp    L93
L26:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movq   $0x0,-0x18(%rbp)
L93:
  mov    -0x18(%rbp),%rax
L195:
  leave
  ret
```

assistant: ```c
char *textureResample(char *srcBuf, long width, long height, long inBitsPerPixel, long outBitsPerPixel, int bgrOutput) {
  char *resampledData = NULL;
  long inBytesPerPixel, outBytesPerPixel;
  if (outBitsPerPixel == 0 || srcBuf == NULL)
    return NULL;
  if (inBitsPerPixel != 32)
    return NULL;
  if (outBitsPerPixel != 32 && outBitsPerPixel != 24)
    return NULL;
  inBytesPerPixel = inBitsPerPixel / 8;
  outBytesPerPixel = outBitsPerPixel / 8;
  resampledData = (char *)malloc(width * height * outBytesPerPixel);
  if (inBitsPerPixel == 32 && outBitsPerPixel == 24 && !bgrOutput) {
    textureRemoveAlphaChannel(resampledData, width * height * outBytesPerPixel, srcBuf, width * height * inBytesPerPixel);
  } else if (inBitsPerPixel == 32 && outBitsPerPixel == 24 && bgrOutput) {
    textureInvertRBAndRemoveAlphaChannel(resampledData, width * height * outBytesPerPixel, srcBuf, width * height * inBytesPerPixel);
  } else if (inBitsPerPixel == 32 && outBitsPerPixel == 32 && bgrOutput) {
    memcpy(resampledData, srcBuf, width * height * outBytesPerPixel);
    textureInvertRBInPlace(resampledData, width * height * outBytesPerPixel);
  } else {
    free(resampledData);
    resampledData = NULL;
  }
  return resampledData;
}
```