user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<halveImage_float>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %edx,-0x3c(%rbp)
  mov    %rcx,-0x48(%rbp)
  mov    %r8,-0x50(%rbp)
  mov    %r9d,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x1,-0x38(%rbp)
  je     L203
  cmpl   $0x1,-0x3c(%rbp)
  jne    L200
L203:
  cmpl   $0x1,-0x38(%rbp)
  jne    L168
  cmpl   $0x1,-0x3c(%rbp)
  je     L111
L168:
  mov    $0x1,%eax
  jmp    L3
L111:
  mov    $0x0,%eax
L3:
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0x40(%rbp),%r9d
  mov    -0x50(%rbp),%r8
  mov    -0x48(%rbp),%rcx
  mov    -0x3c(%rbp),%edx
  mov    -0x38(%rbp),%esi
  mov    -0x34(%rbp),%eax
  sub    $0x8,%rsp
  mov    0x20(%rbp),%edi
  push   %rdi
  mov    0x18(%rbp),%edi
  push   %rdi
  mov    0x10(%rbp),%edi
  push   %rdi
  mov    %eax,%edi
  call   <halve1Dimage_float@plt>
  add    $0x20,%rsp
  jmp    L11
L200:
  mov    -0x38(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x20(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  cmpl   $0x0,0x20(%rbp)
  jne    L169
  movl   $0x0,-0x2c(%rbp)
  jmp    L192
L119:
  movl   $0x0,-0x28(%rbp)
  jmp    L201
L150:
  movl   $0x0,-0x24(%rbp)
  jmp    L73
L61:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%edx
  mov    0x18(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    %eax,%ecx
  mov    0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    0x18(%rbp),%eax
  cltq
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  addq   $0x4,-0x18(%rbp)
  mov    -0x40(%rbp),%eax
  cltq
  add    %rax,-0x10(%rbp)
  addl   $0x1,-0x24(%rbp)
L73:
  mov    -0x24(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L61
  mov    0x18(%rbp),%eax
  cltq
  add    %rax,-0x10(%rbp)
  addl   $0x1,-0x28(%rbp)
L201:
  mov    -0x28(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L150
  mov    0x10(%rbp),%eax
  cltq
  add    %rax,-0x10(%rbp)
  addl   $0x1,-0x2c(%rbp)
L192:
  mov    -0x2c(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L119
  jmp    L11
L169:
  movl   $0x0,-0x2c(%rbp)
  jmp    L143
L54:
  movl   $0x0,-0x28(%rbp)
  jmp    L74
L197:
  movl   $0x0,-0x24(%rbp)
  jmp    L207
L37:
  mov    -0x10(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  shl    $0x18,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  shl    $0x10,%eax
  or     %eax,%edx
  mov    -0x10(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  shl    $0x8,%eax
  or     %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  or     %edx,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x18(%rbp),%eax
  cltq
  lea    0xc(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  shl    $0x18,%eax
  mov    %eax,%edx
  mov    0x18(%rbp),%eax
  cltq
  lea    0x8(%rax),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  shl    $0x10,%eax
  or     %eax,%edx
  mov    0x18(%rbp),%eax
  cltq
  lea    0x4(%rax),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  shl    $0x8,%eax
  mov    %edx,%ecx
  or     %eax,%ecx
  mov    0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  or     %ecx,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  lea    -0x30(%rbp),%rax
  mov    (%rax),%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x10(%rbp),%eax
  cltq
  lea    0xc(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  shl    $0x18,%eax
  mov    %eax,%edx
  mov    0x10(%rbp),%eax
  cltq
  lea    0x8(%rax),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  shl    $0x10,%eax
  or     %eax,%edx
  mov    0x10(%rbp),%eax
  cltq
  lea    0x4(%rax),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  shl    $0x8,%eax
  mov    %edx,%ecx
  or     %eax,%ecx
  mov    0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  or     %ecx,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  lea    -0x30(%rbp),%rax
  mov    (%rax),%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    0x18(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0xc(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  shl    $0x18,%eax
  mov    %eax,%ecx
  mov    0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    0x18(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x8(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  shl    $0x10,%eax
  or     %eax,%ecx
  mov    0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    0x18(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x4(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  shl    $0x8,%eax
  or     %eax,%ecx
  mov    0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    0x18(%rbp),%eax
  cltq
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  or     %ecx,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  lea    -0x30(%rbp),%rax
  mov    (%rax),%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  addq   $0x4,-0x18(%rbp)
  mov    -0x40(%rbp),%eax
  cltq
  add    %rax,-0x10(%rbp)
  addl   $0x1,-0x24(%rbp)
L207:
  mov    -0x24(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L37
  mov    0x18(%rbp),%eax
  cltq
  add    %rax,-0x10(%rbp)
  addl   $0x1,-0x28(%rbp)
L74:
  mov    -0x28(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L197
  mov    0x10(%rbp),%eax
  cltq
  add    %rax,-0x10(%rbp)
  addl   $0x1,-0x2c(%rbp)
L143:
  mov    -0x2c(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L54
L11:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L142
  call   <__stack_chk_fail@plt>
L142:
  leave
  ret
```

assistant: ```c
void halveImage_float(GLint components, GLuint width, GLuint height, const GLfloat *datain, GLfloat *dataout, GLint element_size, GLint ysize, GLint group_size, GLint myswap_bytes) {
  int i, j, k;
  int newwidth, newheight;
  GLfloat *s;
  const char *t;
  if (width == 1 || height == 1) {
    assert(!(width == 1 && height == 1));
    halve1Dimage_float(components, width, height, datain, dataout, element_size, ysize, group_size, myswap_bytes);
    return;
  }
  newwidth = width / 2;
  newheight = height / 2;
  s = dataout;
  t = (const char *)datain;
  if (!myswap_bytes)
    for (i = 0; i < newheight; i++) {
      for (j = 0; j < newwidth; j++) {
        for (k = 0; k < components; k++) {
          s[0] = (*(const GLfloat *)t + *(const GLfloat *)(t + group_size) + *(const GLfloat *)(t + ysize) + *(const GLfloat *)(t + ysize + group_size)) / 4;
          s++;
          t += element_size;
        }
        t += group_size;
      }
      t += ysize;
    }
  else
    for (i = 0; i < newheight; i++) {
      for (j = 0; j < newwidth; j++) {
        for (k = 0; k < components; k++) {
          GLuint b;
          b = (GLuint)(((GLuint)((const GLubyte *)(t))[3]) << 24 | ((GLuint)((const GLubyte *)(t))[2]) << 16 | ((GLuint)((const GLubyte *)(t))[1]) << 8 | ((const GLubyte *)(t))[0]);
          s[0] = *(GLfloat *)&b;
          b = (GLuint)(((GLuint)((const GLubyte *)(t + group_size))[3]) << 24 | ((GLuint)((const GLubyte *)(t + group_size))[2]) << 16 | ((GLuint)((const GLubyte *)(t + group_size))[1]) << 8 | ((const GLubyte *)(t + group_size))[0]);
          s[0] += *(GLfloat *)&b;
          b = (GLuint)(((GLuint)((const GLubyte *)(t + ysize))[3]) << 24 | ((GLuint)((const GLubyte *)(t + ysize))[2]) << 16 | ((GLuint)((const GLubyte *)(t + ysize))[1]) << 8 | ((const GLubyte *)(t + ysize))[0]);
          s[0] += *(GLfloat *)&b;
          b = (GLuint)(((GLuint)((const GLubyte *)(t + ysize + group_size))[3]) << 24 | ((GLuint)((const GLubyte *)(t + ysize + group_size))[2]) << 16 | ((GLuint)((const GLubyte *)(t + ysize + group_size))[1]) << 8 | ((const GLubyte *)(t + ysize + group_size))[0]);
          s[0] += *(GLfloat *)&b;
          s[0] /= 4;
          s++;
          t += element_size;
        }
        t += group_size;
      }
      t += ysize;
    }
}
```