user: Translate the below assembly code into C programming language:

```asm
<do_square>:
  endbr64
  push   %r15
  mov    %edx,%r9d
  mov    %esi,%r15d
  pxor   %xmm4,%xmm4
  push   %r14
  movslq %ecx,%r14
  push   %r13
  mov    %r14,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    %r8d,%ebx
  sub    $0x18,%rsp
  test   %ebx,%ebx
  jle    L142
L242:
  mov    %r9d,%eax
  movslq %r15d,%rcx
  mov    %ebx,%edi
  xor    %ebp,%ebp
  imul   %r13d,%eax
  lea    -0x1(%rbx),%r10d
  and    $0xfffffff0,%edi
  xor    %esi,%esi
  pxor   %xmm3,%xmm3
  lea    (%r15,%rax,1),%edx
  cltq
  add    %rax,%rcx
  mov    %ebx,%eax
  shr    $0x4,%eax
  add    %r12,%rcx
  lea    -0x1(%rax),%r8d
  add    $0x1,%r8
  shl    $0x4,%r8
  nopl   0x0(%rax,%rax,1)
L62:
  cmp    $0xe,%r10d
  jbe    L219
  lea    (%r8,%rcx,1),%r11
  mov    %rcx,%rax
  pxor   %xmm0,%xmm0
  nopl   (%rax)
L209:
  movdqu (%rax),%xmm1
  add    $0x10,%rax
  movdqa %xmm1,%xmm2
  punpckhbw %xmm4,%xmm1
  punpcklbw %xmm4,%xmm2
  movdqa %xmm2,%xmm5
  punpckhwd %xmm3,%xmm2
  punpcklwd %xmm3,%xmm5
  paddd  %xmm5,%xmm0
  paddd  %xmm2,%xmm0
  movdqa %xmm1,%xmm2
  punpckhwd %xmm3,%xmm1
  punpcklwd %xmm3,%xmm2
  paddd  %xmm2,%xmm0
  paddd  %xmm1,%xmm0
  cmp    %r11,%rax
  jne    L209
  movdqa %xmm0,%xmm1
  psrldq $0x8,%xmm1
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  add    %eax,%ebp
  cmp    %ebx,%edi
  je     L237
  mov    %edi,%eax
L54:
  lea    (%rdx,%rax,1),%r11d
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  lea    0x1(%rax),%r11d
  cmp    %r11d,%ebx
  jle    L237
  add    %edx,%r11d
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  lea    0x2(%rax),%r11d
  cmp    %r11d,%ebx
  jle    L237
  add    %edx,%r11d
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  lea    0x3(%rax),%r11d
  cmp    %r11d,%ebx
  jle    L237
  add    %edx,%r11d
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  lea    0x4(%rax),%r11d
  cmp    %r11d,%ebx
  jle    L237
  add    %edx,%r11d
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  lea    0x5(%rax),%r11d
  cmp    %r11d,%ebx
  jle    L237
  add    %edx,%r11d
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  lea    0x6(%rax),%r11d
  cmp    %r11d,%ebx
  jle    L237
  add    %edx,%r11d
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  lea    0x7(%rax),%r11d
  cmp    %r11d,%ebx
  jle    L237
  add    %edx,%r11d
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  lea    0x8(%rax),%r11d
  cmp    %r11d,%ebx
  jle    L237
  add    %edx,%r11d
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  lea    0x9(%rax),%r11d
  cmp    %r11d,%ebx
  jle    L237
  add    %edx,%r11d
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  lea    0xa(%rax),%r11d
  cmp    %r11d,%ebx
  jle    L237
  add    %edx,%r11d
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  lea    0xb(%rax),%r11d
  cmp    %r11d,%ebx
  jle    L237
  add    %edx,%r11d
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  lea    0xc(%rax),%r11d
  cmp    %r11d,%ebx
  jle    L237
  add    %edx,%r11d
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  lea    0xd(%rax),%r11d
  cmp    %r11d,%ebx
  jle    L237
  add    %edx,%r11d
  add    $0xe,%eax
  movslq %r11d,%r11
  movzbl (%r12,%r11,1),%r11d
  add    %r11d,%ebp
  cmp    %eax,%ebx
  jle    L237
  add    %edx,%eax
  cltq
  movzbl (%r12,%rax,1),%eax
  add    %eax,%ebp
  nop
L237:
  add    $0x1,%esi
  add    %r13d,%edx
  add    %r14,%rcx
  cmp    %esi,%ebx
  jne    L62
  test   %ebp,%ebp
  je     L33
  mov    %ebx,%eax
  imul   %ebx,%eax
  cmp    %ebp,%eax
  je     L189
  mov    %r9d,0xc(%rsp)
  cmp    $0x1,%ebx
  je     L147
  xor    %edi,%edi
  sar    %ebx
  call   <bit_output@plt>
  mov    0xc(%rsp),%edx
  mov    %r15d,%esi
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12,%rdi
  lea    (%rbx,%r15,1),%ebp
  call   <do_square>
  mov    0xc(%rsp),%edx
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %ebp,%esi
  mov    %r12,%rdi
  call   <do_square>
  mov    0xc(%rsp),%r9d
  mov    %r15d,%esi
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12,%rdi
  mov    %ebp,%r15d
  add    %ebx,%r9d
  mov    %r9d,%edx
  mov    %r9d,0xc(%rsp)
  call   <do_square>
  mov    0xc(%rsp),%r9d
  pxor   %xmm4,%xmm4
  test   %ebx,%ebx
  jg     L242
L142:
  xor    %ebp,%ebp
L213:
  mov    $0x1,%edi
  call   <bit_output@plt>
L156:
  add    $0x18,%rsp
  mov    %ebp,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <bit_output@plt>
L219:
  xor    %eax,%eax
  jmp    L54
L189:
  mov    $0x1,%ebp
L33:
  cmp    $0x1,%ebx
  je     L156
  jmp    L213
  nopl   0x0(%rax,%rax,1)
L147:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void do_square(unsigned char *image, int ox, int oy, int w, int size) {
  int x, y, t = 0;
  for (y = 0; y < size; y++)
    for (x = 0; x < size; x++)
      t += image[(oy + y) * w + ox + x];
  if (t == 0 || t == size * size) {
    if (size != 1)
      bit_output(1);
    bit_output(t ? 1 : 0);
    return;
  }
  if (size > 1) {
    bit_output(0);
    size >>= 1;
    do_square(image, ox, oy, w, size);
    do_square(image, ox + size, oy, w, size);
    do_square(image, ox, oy + size, w, size);
    do_square(image, ox + size, oy + size, w, size);
  }
}
```