user: 请将以下的汇编代码转换成C语言代码：

```asm
<halveImage_float>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,%r12d
  mov    %esi,0x28(%rsp)
  mov    %edx,%r15d
  mov    %rcx,%rbp
  mov    %r8,%rbx
  mov    %r9d,%r13d
  cmp    $0x1,%esi
  je     L146
  cmp    $0x1,%edx
  je     L146
  mov    0x28(%rsp),%eax
  mov    %eax,%r14d
  shr    $0x1f,%r14d
  add    %eax,%r14d
  sar    %r14d
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,0x2c(%rsp)
  cmpl   $0x0,0x80(%rsp)
  je     L178
  cmp    $0x1,%edx
  jle    L168
  lea    -0x1(%rdi),%eax
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdi
  mov    %rdi,0x10(%rsp)
  movslq %r9d,%r9
  imul   %r9,%rax
  mov    %rax,0x8(%rsp)
  movl   $0x0,0x24(%rsp)
  movslq 0x78(%rsp),%r10
  movslq 0x70(%rsp),%rax
  mov    %rax,(%rsp)
  add    %r10,%rax
  mov    %rax,0x18(%rsp)
  jmp    L92
L146:
  mov    0x28(%rsp),%r14d
  cmp    $0x1,%r14d
  setne  %dil
  cmp    $0x1,%r15d
  setne  %al
  or     %eax,%edi
  movzbl %dil,%edi
  call   <assert@plt>
  sub    $0x8,%rsp
  mov    0x88(%rsp),%eax
  push   %rax
  mov    0x88(%rsp),%eax
  push   %rax
  mov    0x88(%rsp),%eax
  push   %rax
  mov    %r13d,%r9d
  mov    %rbx,%r8
  mov    %rbp,%rcx
  mov    %r15d,%edx
  mov    %r14d,%esi
  mov    %r12d,%edi
  call   <halve1Dimage_float@plt>
  add    $0x20,%rsp
L168:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L178:
  cmp    $0x1,%edx
  jle    L168
  lea    -0x1(%rdi),%r11d
  add    $0x1,%r11
  lea    0x0(,%r11,4),%r10
  movslq %r9d,%r8
  imul   %r8,%r11
  mov    0x80(%rsp),%r13d
  movslq 0x78(%rsp),%rcx
  movslq 0x70(%rsp),%rsi
  jmp    L37
L13:
  mov    (%rdx,%rcx,1),%eax
  add    (%rdx),%eax
  add    (%rdx,%rsi,1),%eax
  lea    (%rdx,%rcx,1),%r15
  add    (%r15,%rsi,1),%eax
  lea    0x3(%rax),%r15d
  cmovs  %r15d,%eax
  sar    $0x2,%eax
  mov    %eax,(%rbx)
  add    $0x4,%rbx
  add    %r8,%rdx
  cmp    %rdi,%rbx
  jne    L13
  add    %r11,%rbp
  mov    %rdi,%rbx
L152:
  add    %rcx,%rbp
  add    $0x1,%r9d
  cmp    %r9d,%r14d
  jle    L45
L184:
  lea    (%rbx,%r10,1),%rdi
  mov    %rbp,%rdx
  test   %r12d,%r12d
  jg     L13
  jmp    L152
L45:
  add    %rsi,%rbp
  add    $0x1,%r13d
  cmp    %r13d,0x2c(%rsp)
  jle    L168
L37:
  mov    0x80(%rsp),%r9d
  cmpl   $0x1,0x28(%rsp)
  jg     L184
  jmp    L45
L117:
  lea    0x0(%rbp,%r10,1),%r8
  mov    (%rsp),%rax
  lea    0x0(%rbp,%rax,1),%rdi
  mov    0x18(%rsp),%rax
  lea    0x0(%rbp,%rax,1),%rsi
  mov    0x10(%rsp),%rax
  lea    (%rbx,%rax,1),%r11
  mov    %rbp,%rcx
L95:
  mov    0xc(%rcx),%edx
  shl    $0x18,%edx
  mov    0x8(%rcx),%eax
  shl    $0x10,%eax
  or     %eax,%edx
  or     (%rcx),%edx
  mov    0x4(%rcx),%eax
  shl    $0x8,%eax
  or     %eax,%edx
  mov    %edx,(%rbx)
  mov    0xc(%r8),%eax
  shl    $0x18,%eax
  mov    0x8(%r8),%r15d
  shl    $0x10,%r15d
  or     %r15d,%eax
  or     (%r8),%eax
  mov    0x4(%r8),%r15d
  shl    $0x8,%r15d
  or     %r15d,%eax
  add    %edx,%eax
  mov    %eax,(%rbx)
  mov    0xc(%rdi),%edx
  shl    $0x18,%edx
  mov    0x8(%rdi),%r15d
  shl    $0x10,%r15d
  or     %r15d,%edx
  or     (%rdi),%edx
  mov    0x4(%rdi),%r15d
  shl    $0x8,%r15d
  or     %r15d,%edx
  add    %eax,%edx
  mov    %edx,(%rbx)
  mov    0xc(%rsi),%eax
  shl    $0x18,%eax
  mov    0x8(%rsi),%r15d
  shl    $0x10,%r15d
  or     %r15d,%eax
  or     (%rsi),%eax
  mov    0x4(%rsi),%r15d
  shl    $0x8,%r15d
  or     %r15d,%eax
  add    %edx,%eax
  lea    0x3(%rax),%edx
  cmovs  %edx,%eax
  sar    $0x2,%eax
  mov    %eax,(%rbx)
  add    $0x4,%rbx
  add    %r9,%rcx
  add    %r9,%r8
  add    %r9,%rdi
  add    %r9,%rsi
  cmp    %r11,%rbx
  jne    L95
  add    0x8(%rsp),%rbp
  mov    %r11,%rbx
L162:
  add    %r10,%rbp
  add    $0x1,%r13d
  cmp    %r13d,%r14d
  jle    L158
L196:
  test   %r12d,%r12d
  jg     L117
  jmp    L162
L158:
  add    (%rsp),%rbp
  addl   $0x1,0x24(%rsp)
  mov    0x24(%rsp),%eax
  cmp    %eax,0x2c(%rsp)
  jle    L168
L92:
  mov    $0x0,%r13d
  cmpl   $0x1,0x28(%rsp)
  jg     L196
  jmp    L158
```

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;
    }
}
```