user: What is the c source code of the assembly code below:

```asm
<halveImage_byte>:
  endbr64
  push   %r15
  mov    %r9d,%r15d
  push   %r14
  mov    %edx,%r14d
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  sub    $0x28,%rsp
  movslq 0x60(%rsp),%r10
  mov    0x68(%rsp),%ebx
  mov    %esi,0x18(%rsp)
  cmp    $0x1,%esi
  je     L74
  cmp    $0x1,%edx
  je     L74
  mov    0x18(%rsp),%eax
  mov    %eax,%edi
  shr    $0x1f,%edi
  mov    %edi,%r13d
  mov    %eax,%edi
  add    %eax,%r13d
  imul   %ebx,%edi
  mov    %edx,%eax
  shr    $0x1f,%eax
  sar    %r13d
  add    %edx,%eax
  sar    %eax
  mov    %eax,0x1c(%rsp)
  mov    %r10d,%eax
  sub    %edi,%eax
  cmp    $0x1,%r14d
  jle    L24
  cltq
  lea    -0x1(%rbp),%r15d
  movslq %r9d,%r9
  movslq %ebx,%rsi
  add    $0x1,%r15
  add    %r10,%rax
  movl   $0x0,0x8(%rsp)
  lea    (%r10,%rsi,1),%r11
  lea    0x0(,%r15,4),%r14
  mov    %rax,0x10(%rsp)
  imul   %r9,%r15
  nop
L25:
  cmpl   $0x1,0x18(%rsp)
  jle    L61
  xor    %ebx,%ebx
  nopl   0x0(%rax)
L47:
  lea    (%r8,%r14,1),%rdi
  mov    %r12,%rdx
  test   %ebp,%ebp
  jle    L48
  nopl   0x0(%rax,%rax,1)
L55:
  mov    (%rdx,%rsi,1),%eax
  add    (%rdx),%eax
  add    (%rdx,%r10,1),%eax
  add    (%rdx,%r11,1),%eax
  lea    0x5(%rax),%ecx
  add    $0x2,%eax
  cmovns %eax,%ecx
  add    $0x4,%r8
  add    %r9,%rdx
  sar    $0x2,%ecx
  mov    %ecx,-0x4(%r8)
  cmp    %r8,%rdi
  jne    L55
  add    %r15,%r12
L48:
  add    $0x1,%ebx
  add    %rsi,%r12
  cmp    %ebx,%r13d
  jg     L47
L61:
  addl   $0x1,0x8(%rsp)
  add    0x10(%rsp),%r12
  mov    0x8(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  jg     L25
L24:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L74:
  mov    0x18(%rsp),%r13d
  mov    %r10d,0x10(%rsp)
  mov    %r8,0x8(%rsp)
  cmp    $0x1,%r13d
  setne  %dil
  cmp    $0x1,%r14d
  setne  %al
  or     %eax,%edi
  movzbl %dil,%edi
  call   <assert@plt>
  mov    0x10(%rsp),%r10d
  mov    %ebx,0x68(%rsp)
  mov    %ebp,%edi
  mov    0x8(%rsp),%r8
  mov    %r15d,%r9d
  mov    %r12,%rcx
  mov    %r14d,%edx
  mov    %r10d,0x60(%rsp)
  add    $0x28,%rsp
  mov    %r13d,%esi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <halve1Dimage_byte@plt>
```

assistant: ```c
void halveImage_byte(GLint components, GLuint width, GLuint height, const GLbyte *datain, GLbyte *dataout, GLint element_size, GLint ysize, GLint group_size) {
  int i, j, k;
  int newwidth, newheight;
  int padBytes;
  GLbyte *s;
  const char *t;
  if (width == 1 || height == 1) {
    assert(!(width == 1 && height == 1));
    halve1Dimage_byte(components, width, height, datain, dataout, element_size, ysize, group_size);
    return;
  }
  newwidth = width / 2;
  newheight = height / 2;
  padBytes = ysize - (width * group_size);
  s = dataout;
  t = (const char *)datain;
  for (i = 0; i < newheight; i++) {
    for (j = 0; j < newwidth; j++) {
      for (k = 0; k < components; k++) {
        s[0] = (*(const GLbyte *)t + *(const GLbyte *)(t + group_size) + *(const GLbyte *)(t + ysize) + *(const GLbyte *)(t + ysize + group_size) + 2) / 4;
        s++;
        t += element_size;
      }
      t += group_size;
    }
    t += padBytes;
    t += ysize;
  }
}
```