user: Converte this assembly snippet into its equivalent C code:

```asm
<blur_RGB_565>:
  endbr64
  push   %r15
  movslq %esi,%r15
  push   %r14
  lea    -0x1(%r15),%eax
  mov    %edx,%r14d
  push   %r13
  mov    %ecx,%r13d
  push   %r12
  push   %rbp
  mov    %r15d,%ebp
  imul   %edx,%ebp
  push   %rbx
  lea    (%rcx,%rcx,1),%ebx
  sub    $0xb8,%rsp
  movslq %ebp,%rbp
  add    %rbp,%rbp
  mov    %eax,0x84(%rsp)
  lea    -0x1(%rdx),%eax
  mov    %rdi,0x28(%rsp)
  mov    %rbp,%rdi
  mov    %eax,0x38(%rsp)
  lea    0x1(%rbx),%eax
  mov    %ecx,0x4(%rsp)
  mov    %edx,0xa8(%rsp)
  mov    %r15d,0x80(%rsp)
  mov    %eax,0x20(%rsp)
  call   <malloc@plt>
  mov    %rbp,%rdi
  mov    %rax,0x30(%rsp)
  call   <malloc@plt>
  mov    %rbp,%rdi
  mov    %rax,0x10(%rsp)
  call   <malloc@plt>
  movslq %r14d,%rdi
  cmp    %edi,%r15d
  mov    %rax,0x18(%rsp)
  cmovge %r15,%rdi
  add    $0x2,%ebx
  sar    %ebx
  imul   %ebx,%ebx
  shl    $0x2,%rdi
  call   <malloc@plt>
  mov    %rax,0x40(%rsp)
  lea    0x1(%r13),%eax
  mov    %ebx,%ebp
  mov    %eax,0x24(%rsp)
  shl    $0x8,%ebp
  movslq %ebp,%rbp
  lea    0x0(%rbp,%rbp,1),%rdi
  call   <malloc@plt>
  xor    %ecx,%ecx
  mov    %rax,0x88(%rsp)
  mov    %rax,%rsi
  test   %ebx,%ebx
  je     L5
L45:
  mov    %ecx,%eax
  cltd
  idiv   %ebx
  mov    %ax,(%rsi,%rcx,2)
  add    $0x1,%rcx
  cmp    %rcx,%rbp
  jne    L45
L5:
  mov    0x20(%rsp),%eax
  lea    (%rax,%rax,2),%edi
  movslq %edi,%rdi
  shl    $0x2,%rdi
  call   <malloc@plt>
  mov    0xa8(%rsp),%r11d
  mov    %rax,0x8(%rsp)
  test   %r11d,%r11d
  jle    L194
  movslq 0x4(%rsp),%rdi
  movl   $0x0,0x70(%rsp)
  movl   $0x0,0x50(%rsp)
  mov    %edi,%eax
  mov    %rdi,%rsi
  mov    %rdi,0x90(%rsp)
  neg    %eax
  movl   $0x0,0x48(%rsp)
  mov    %eax,0x98(%rsp)
  cltq
  add    %rdi,%rax
  mov    0x8(%rsp),%rdi
  lea    (%rax,%rax,2),%rax
  lea    (%rdi,%rax,4),%rax
  mov    %rax,0xa0(%rsp)
  xor    %eax,%eax
  test   %esi,%esi
  cmovle %esi,%eax
  mov    0x84(%rsp),%esi
  mov    %eax,0x74(%rsp)
  xor    %eax,%eax
  test   %esi,%esi
  cmovle %esi,%eax
  mov    %eax,0xac(%rsp)
  mov    0x80(%rsp),%eax
  add    $0x1,%eax
  mov    %rax,0x78(%rsp)
  nopw   0x0(%rax,%rax,1)
L49:
  mov    0x4(%rsp),%esi
  mov    0x98(%rsp),%eax
  cmp    %eax,%esi
  jl     L176
  test   %esi,%esi
  js     L417
  mov    0xac(%rsp),%r13d
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  xor    %r14d,%r14d
  add    0x50(%rsp),%r13d
  mov    0x24(%rsp),%r15d
  xor    %r8d,%r8d
  xor    %edi,%edi
  mov    0xa0(%rsp),%r11
  xor    %esi,%esi
  movslq %r13d,%r13
  nopw   0x0(%rax,%rax,1)
L409:
  mov    0x28(%rsp),%rbx
  lea    (%r15,%rax,1),%r10d
  add    $0xc,%r11
  add    $0x1,%eax
  movswl (%rbx,%r13,2),%edx
  mov    %edx,%r9d
  mov    %edx,%ecx
  shl    $0x3,%edx
  shr    $0x8,%r9d
  shr    $0x3,%ecx
  movzbl %dl,%edx
  and    $0xf8,%r9d
  and    $0xfc,%ecx
  mov    %edx,-0x4(%r11)
  add    %edx,%ebp
  mov    %r9d,%ebx
  mov    %r9d,-0xc(%r11)
  add    %r9d,%r14d
  add    %ecx,%r12d
  imul   %r10d,%ebx
  mov    %ecx,-0x8(%r11)
  add    %ebx,%esi
  mov    %ecx,%ebx
  imul   %r10d,%ebx
  imul   %edx,%r10d
  add    %ebx,%edi
  add    %r10d,%r8d
  cmp    0x74(%rsp),%eax
  jle    L409
  cmp    %eax,0x4(%rsp)
  jl     L262
L247:
  mov    0x8(%rsp),%rbx
  movslq %eax,%rdx
  mov    %ebp,0x60(%rsp)
  xor    %ecx,%ecx
  mov    %r12d,0x3c(%rsp)
  mov    0x28(%rsp),%r15
  xor    %r13d,%r13d
  xor    %r11d,%r11d
  add    0x90(%rsp),%rdx
  mov    0x84(%rsp),%r12d
  mov    %r14d,0x58(%rsp)
  mov    %ecx,%r14d
  lea    (%rdx,%rdx,2),%rdx
  lea    (%rbx,%rdx,4),%rbx
  xchg   %ax,%ax
L425:
  xor    %edx,%edx
  test   %eax,%eax
  mov    %eax,%ebp
  mov    0x24(%rsp),%r10d
  cmovns %eax,%edx
  cmp    %r12d,%edx
  cmovg  %r12d,%edx
  add    0x50(%rsp),%edx
  movslq %edx,%rdx
  movswl (%r15,%rdx,2),%edx
  mov    %edx,%r9d
  mov    %edx,%ecx
  shl    $0x3,%edx
  shr    $0x8,%r9d
  shr    $0x3,%ecx
  movzbl %dl,%edx
  and    $0xf8,%r9d
  and    $0xfc,%ecx
  neg    %ebp
  mov    %edx,0x8(%rbx)
  cmovs  %eax,%ebp
  mov    %r9d,(%rbx)
  add    %r9d,%r11d
  add    %ecx,%r14d
  mov    %ecx,0x4(%rbx)
  add    %edx,%r13d
  add    $0x1,%eax
  add    $0xc,%rbx
  sub    %ebp,%r10d
  mov    %r10d,%ebp
  imul   %r9d,%ebp
  add    %ebp,%esi
  mov    %r10d,%ebp
  imul   %ecx,%ebp
  imul   %edx,%r10d
  add    %ebp,%edi
  add    %r10d,%r8d
  cmp    %eax,0x4(%rsp)
  jge    L425
  mov    0x3c(%rsp),%r12d
  mov    0x60(%rsp),%ebp
  mov    %r14d,0x3c(%rsp)
  mov    %r13d,%ecx
  mov    0x58(%rsp),%r14d
L370:
  mov    0x80(%rsp),%r9d
  test   %r9d,%r9d
  jle    L160
  movslq 0x50(%rsp),%rax
  mov    0x30(%rsp),%rbx
  mov    %r11d,%r10d
  mov    %ecx,%r11d
  mov    0x4(%rsp),%r9d
  mov    0x88(%rsp),%r15
  add    %rax,%rax
  add    %rax,%rbx
  mov    %r9d,%r13d
  mov    %rbx,0x60(%rsp)
  mov    0x10(%rsp),%rbx
  add    %rax,%rbx
  add    0x18(%rsp),%rax
  mov    %rbx,0x58(%rsp)
  mov    $0x1,%ebx
  mov    %rax,0x68(%rsp)
  jmp    L50
  nopw   0x0(%rax,%rax,1)
L321:
  mov    0x40(%rsp),%rcx
  mov    -0x4(%rcx,%rbx,4),%edx
L279:
  mov    0x28(%rsp),%rcx
  add    0x70(%rsp),%edx
  add    $0x1,%rbx
  movslq %edx,%rdx
  movswl (%rcx,%rdx,2),%ecx
  mov    %ecx,%edx
  mov    %ecx,%r9d
  shl    $0x3,%ecx
  shr    $0x8,%edx
  shr    $0x3,%r9d
  movzbl %cl,%ecx
  and    $0xf8,%edx
  and    $0xfc,%r9d
  mov    %ecx,0x8(%rax)
  add    %r11d,%ecx
  mov    %edx,(%rax)
  add    %edx,%r10d
  add    %ecx,%r8d
  mov    %r9d,0x4(%rax)
  lea    0x1(%r13),%eax
  add    0x3c(%rsp),%r9d
  add    %r10d,%esi
  cltd
  add    %r9d,%edi
  idivl  0x20(%rsp)
  movslq %edx,%rax
  mov    0x8(%rsp),%rdx
  mov    %rax,%r13
  lea    (%rax,%rax,2),%rax
  lea    (%rdx,%rax,4),%rax
  mov    0x4(%rax),%r11d
  mov    (%rax),%edx
  mov    0x8(%rax),%eax
  sub    %r11d,%r9d
  add    %r11d,%r12d
  add    %edx,%r14d
  sub    %edx,%r10d
  sub    %eax,%ecx
  mov    %r9d,0x3c(%rsp)
  add    %eax,%ebp
  mov    %ecx,%r11d
  cmp    0x78(%rsp),%rbx
  je     L421
L50:
  movslq %esi,%rax
  mov    0x60(%rsp),%rcx
  sub    %r14d,%esi
  movzwl (%r15,%rax,2),%eax
  mov    %ax,-0x2(%rcx,%rbx,2)
  movslq %edi,%rax
  mov    0x58(%rsp),%rcx
  sub    %r12d,%edi
  movzwl (%r15,%rax,2),%eax
  mov    %ax,-0x2(%rcx,%rbx,2)
  movslq %r8d,%rax
  mov    0x68(%rsp),%rcx
  sub    %ebp,%r8d
  movzwl (%r15,%rax,2),%eax
  mov    %ax,-0x2(%rcx,%rbx,2)
  mov    0x20(%rsp),%ecx
  mov    %r13d,%eax
  sub    0x4(%rsp),%eax
  add    %ecx,%eax
  cltd
  idiv   %ecx
  mov    0x8(%rsp),%rcx
  movslq %edx,%rdx
  lea    (%rdx,%rdx,2),%rax
  mov    0x48(%rsp),%edx
  lea    (%rcx,%rax,4),%rax
  sub    (%rax),%r14d
  sub    0x4(%rax),%r12d
  sub    0x8(%rax),%ebp
  test   %edx,%edx
  jne    L321
  mov    0x4(%rsp),%ecx
  lea    (%rcx,%rbx,1),%edx
  mov    0x84(%rsp),%ecx
  cmp    %ecx,%edx
  cmovg  %ecx,%edx
  mov    0x40(%rsp),%rcx
  mov    %edx,-0x4(%rcx,%rbx,4)
  jmp    L279
  nop
L421:
  mov    0x80(%rsp),%esi
  add    %esi,0x50(%rsp)
L160:
  addl   $0x1,0x48(%rsp)
  mov    0x80(%rsp),%esi
  mov    0x48(%rsp),%eax
  add    %esi,0x70(%rsp)
  cmp    %eax,0xa8(%rsp)
  jne    L49
L194:
  mov    0x80(%rsp),%r10d
  test   %r10d,%r10d
  jle    L404
  mov    0x4(%rsp),%eax
  neg    %eax
  mov    %eax,%r14d
  mov    %eax,0x78(%rsp)
  mov    0x80(%rsp),%eax
  imul   %eax,%r14d
  cmp    $0x1,%eax
  jne    L217
  mov    0x4(%rsp),%edi
  cmp    %r14d,%edi
  jl     L204
  test   %r14d,%r14d
  jg     L144
  movslq %edi,%rsi
  xor    %r12d,%r12d
  movslq %r14d,%rax
  test   %edi,%edi
  cmovle %edi,%r12d
  add    %rsi,%rax
  mov    0x8(%rsp),%rdi
  xor    %ebp,%ebp
  mov    %rsi,0x90(%rsp)
  xor    %r15d,%r15d
  xor    %r13d,%r13d
  xor    %ecx,%ecx
  lea    (%rax,%rax,2),%rax
  xor    %r8d,%r8d
  xor    %r9d,%r9d
  lea    (%rdi,%rax,4),%rsi
  mov    %r14d,%eax
  xchg   %ax,%ax
L378:
  xor    %edx,%edx
  test   %eax,%eax
  mov    0x30(%rsp),%rdi
  mov    0x24(%rsp),%ebx
  cmovns %eax,%edx
  movslq %edx,%rdx
  movswl (%rdi,%rdx,2),%r11d
  mov    0x10(%rsp),%rdi
  movswl (%rdi,%rdx,2),%r10d
  mov    0x18(%rsp),%rdi
  movd   %r11d,%xmm0
  add    %r11d,%r13d
  movswl (%rdi,%rdx,2),%edi
  lea    (%rbx,%r14,1),%edx
  movd   %r10d,%xmm1
  add    %r10d,%r15d
  mov    %edx,%ebx
  punpckldq %xmm1,%xmm0
  imul   %r11d,%ebx
  add    %edi,%ebp
  mov    %edi,0x8(%rsi)
  movq   %xmm0,(%rsi)
  add    %ebx,%r9d
  mov    %edx,%ebx
  imul   %r10d,%ebx
  imul   %edi,%edx
  add    %ebx,%r8d
  add    %edx,%ecx
  cmp    %r14d,0x38(%rsp)
  lea    0x1(%rax),%edx
  cmovg  %edx,%eax
  add    $0x1,%r14d
  add    $0xc,%rsi
  cmp    %r12d,%r14d
  jle    L378
  cmp    %r14d,0x4(%rsp)
  jl     L92
L47:
  mov    0x8(%rsp),%rdi
  movslq %r14d,%rdx
  mov    %ebp,0x3c(%rsp)
  xor    %r12d,%r12d
  add    0x90(%rsp),%rdx
  mov    %r15d,0x48(%rsp)
  xor    %ebx,%ebx
  lea    (%rdx,%rdx,2),%rdx
  mov    0x30(%rsp),%r15
  mov    %r13d,0x50(%rsp)
  lea    (%rdi,%rdx,4),%rsi
  xor    %edi,%edi
  mov    %edi,%r13d
  nopl   0x0(%rax,%rax,1)
L349:
  xor    %edx,%edx
  test   %eax,%eax
  mov    0x10(%rsp),%rdi
  mov    %r14d,%ebp
  cmovns %eax,%edx
  neg    %ebp
  cmovs  %r14d,%ebp
  movslq %edx,%rdx
  movswl (%rdi,%rdx,2),%r10d
  mov    0x18(%rsp),%rdi
  movswl (%r15,%rdx,2),%r11d
  movswl (%rdi,%rdx,2),%edi
  mov    0x24(%rsp),%edx
  movd   %r10d,%xmm2
  add    %r10d,%r12d
  movd   %r11d,%xmm0
  add    %r11d,%ebx
  sub    %ebp,%edx
  punpckldq %xmm2,%xmm0
  add    %edi,%r13d
  mov    %edi,0x8(%rsi)
  mov    %edx,%ebp
  movq   %xmm0,(%rsi)
  imul   %r11d,%ebp
  add    %ebp,%r9d
  mov    %edx,%ebp
  imul   %r10d,%ebp
  imul   %edi,%edx
  add    %ebp,%r8d
  add    %edx,%ecx
  cmp    0x38(%rsp),%r14d
  lea    0x1(%rax),%edx
  cmovl  %edx,%eax
  add    $0x1,%r14d
  add    $0xc,%rsi
  cmp    %r14d,0x4(%rsp)
  jge    L349
  mov    %r13d,0x24(%rsp)
  mov    0x3c(%rsp),%ebp
  mov    %r12d,%edx
  mov    0x48(%rsp),%r15d
  mov    0x50(%rsp),%r13d
L311:
  mov    0xa8(%rsp),%eax
  test   %eax,%eax
  jle    L404
  add    $0x1,%eax
  mov    0x4(%rsp),%esi
  mov    $0x1,%edi
  mov    %edx,%r10d
  mov    %rax,0x48(%rsp)
  mov    0x88(%rsp),%r14
  mov    %ebx,%r11d
  mov    %esi,%r12d
  nopw   0x0(%rax,%rax,1)
L295:
  movslq %r8d,%rax
  mov    0x28(%rsp),%rsi
  mov    0x20(%rsp),%ebx
  sub    %r15d,%r8d
  movzwl (%r14,%rax,2),%edx
  movslq %r9d,%rax
  sub    %r13d,%r9d
  movzwl (%r14,%rax,2),%eax
  sar    $0x2,%dx
  sar    $0x3,%ax
  shl    $0x5,%edx
  shl    $0xb,%eax
  or     %edx,%eax
  movslq %ecx,%rdx
  sub    %ebp,%ecx
  movzwl (%r14,%rdx,2),%edx
  mov    %ecx,0x3c(%rsp)
  mov    0x4(%rsp),%ecx
  sar    $0x3,%dx
  or     %edx,%eax
  mov    %ax,-0x2(%rsi,%rdi,2)
  mov    %r12d,%eax
  mov    0x8(%rsp),%rsi
  sub    %ecx,%eax
  add    %ebx,%eax
  cltd
  idiv   %ebx
  mov    0x10(%rsp),%rbx
  movslq %edx,%rdx
  lea    (%rdx,%rdx,2),%rax
  mov    0x38(%rsp),%edx
  lea    (%rsi,%rax,4),%rax
  lea    (%rcx,%rdi,1),%esi
  mov    0x18(%rsp),%rcx
  sub    (%rax),%r13d
  sub    0x4(%rax),%r15d
  sub    0x8(%rax),%ebp
  cmp    %edx,%esi
  cmovg  %edx,%esi
  mov    0x40(%rsp),%rdx
  mov    %esi,-0x4(%rdx,%rdi,4)
  mov    0x30(%rsp),%rdx
  movslq %esi,%rsi
  add    $0x1,%rdi
  movswl (%rbx,%rsi,2),%ebx
  movswl (%rdx,%rsi,2),%edx
  movswl (%rcx,%rsi,2),%esi
  movd   %ebx,%xmm3
  add    %ebx,%r10d
  mov    0x8(%rsp),%rbx
  mov    0x3c(%rsp),%ecx
  movd   %edx,%xmm0
  mov    %esi,0x8(%rax)
  add    %edx,%r11d
  add    0x24(%rsp),%esi
  punpckldq %xmm3,%xmm0
  add    %esi,%ecx
  add    %r11d,%r9d
  add    %r10d,%r8d
  movq   %xmm0,(%rax)
  lea    0x1(%r12),%eax
  cltd
  idivl  0x20(%rsp)
  movslq %edx,%rax
  mov    %rax,%r12
  lea    (%rax,%rax,2),%rax
  lea    (%rbx,%rax,4),%rax
  mov    (%rax),%edx
  mov    0x4(%rax),%ebx
  mov    0x8(%rax),%eax
  add    %edx,%r13d
  add    %ebx,%r15d
  sub    %edx,%r11d
  sub    %ebx,%r10d
  sub    %eax,%esi
  add    %eax,%ebp
  mov    %esi,0x24(%rsp)
  cmp    %rdi,0x48(%rsp)
  jne    L295
L404:
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rdi
  call   <free@plt>
  mov    0x40(%rsp),%rdi
  call   <free@plt>
  mov    0x88(%rsp),%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  mov    0x28(%rsp),%rax
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L417:
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  xor    %r14d,%r14d
  xor    %r8d,%r8d
  xor    %edi,%edi
  xor    %esi,%esi
  jmp    L247
  nopl   0x0(%rax)
L144:
  movslq 0x4(%rsp),%rdi
  mov    %r14d,%eax
  xor    %ebp,%ebp
  xor    %r15d,%r15d
  xor    %r13d,%r13d
  xor    %ecx,%ecx
  xor    %r8d,%r8d
  xor    %r9d,%r9d
  mov    %rdi,0x90(%rsp)
  jmp    L47
  nopl   (%rax)
L262:
  movl   $0x0,0x3c(%rsp)
  xor    %ecx,%ecx
  xor    %r11d,%r11d
  jmp    L370
  nopw   0x0(%rax,%rax,1)
L92:
  movl   $0x0,0x24(%rsp)
  xor    %edx,%edx
  xor    %ebx,%ebx
  jmp    L311
  nopl   0x0(%rax)
L176:
  movl   $0x0,0x3c(%rsp)
  xor    %ecx,%ecx
  xor    %r11d,%r11d
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  xor    %r14d,%r14d
  xor    %r8d,%r8d
  xor    %edi,%edi
  xor    %esi,%esi
  jmp    L370
L204:
  movl   $0x0,0x24(%rsp)
  xor    %edx,%edx
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  xor    %r15d,%r15d
  xor    %r13d,%r13d
  xor    %ecx,%ecx
  xor    %r8d,%r8d
  xor    %r9d,%r9d
  jmp    L311
L217:
  movslq 0x4(%rsp),%rbx
  movslq %eax,%rdi
  movslq 0x78(%rsp),%rax
  movq   $0x0,0x58(%rsp)
  mov    %rdi,0x90(%rsp)
  mov    %rbx,%rsi
  add    %rbx,%rax
  mov    %rbx,0xa0(%rsp)
  mov    0x8(%rsp),%rbx
  lea    (%rax,%rax,2),%rax
  mov    %r14d,0x84(%rsp)
  lea    (%rbx,%rax,4),%rax
  mov    %rax,0x98(%rsp)
  lea    (%rdi,%rdi,1),%rax
  mov    %rax,0x60(%rsp)
  xor    %eax,%eax
  test   %esi,%esi
  cmovle %esi,%eax
  mov    %eax,0x68(%rsp)
  mov    0x24(%rsp),%eax
  add    0xa8(%rsp),%eax
  mov    %eax,0x74(%rsp)
  xchg   %ax,%ax
L362:
  mov    0x58(%rsp),%eax
  mov    0x4(%rsp),%esi
  mov    %eax,0x3c(%rsp)
  mov    0x78(%rsp),%eax
  cmp    %esi,%eax
  jg     L133
  test   %esi,%esi
  js     L393
  mov    0x98(%rsp),%r9
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  xor    %r15d,%r15d
  mov    0x84(%rsp),%edx
  mov    0x24(%rsp),%r14d
  xor    %edi,%edi
  xor    %esi,%esi
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L303:
  xor    %r8d,%r8d
  test   %edx,%edx
  mov    0x30(%rsp),%rbx
  mov    0x10(%rsp),%r11
  cmovns %edx,%r8d
  add    0x3c(%rsp),%r8d
  mov    0x18(%rsp),%r10
  movslq %r8d,%r8
  movswl (%rbx,%r8,2),%ebx
  movswl (%r11,%r8,2),%r11d
  movswl (%r10,%r8,2),%r10d
  lea    (%r14,%rax,1),%r8d
  mov    %ebx,%r13d
  movd   %ebx,%xmm0
  add    %ebx,%r15d
  add    %r11d,%r12d
  imul   %r8d,%r13d
  movd   %r11d,%xmm4
  add    %r10d,%ebp
  mov    %r10d,0x8(%r9)
  mov    0x80(%rsp),%ebx
  punpckldq %xmm4,%xmm0
  movq   %xmm0,(%r9)
  add    %r13d,%ecx
  mov    %r11d,%r13d
  imul   %r8d,%r13d
  imul   %r10d,%r8d
  add    %r13d,%esi
  add    %r8d,%edi
  cmp    %eax,0x38(%rsp)
  lea    (%rbx,%rdx,1),%r8d
  cmovg  %r8d,%edx
  add    $0x1,%eax
  add    $0xc,%r9
  cmp    0x68(%rsp),%eax
  jle    L303
  cmp    %eax,0x4(%rsp)
  jl     L327
L109:
  mov    0x8(%rsp),%rbx
  movslq %eax,%r8
  mov    %r12d,0x50(%rsp)
  xor    %r13d,%r13d
  add    0xa0(%rsp),%r8
  mov    %ebp,0x70(%rsp)
  xor    %r14d,%r14d
  xor    %r11d,%r11d
  mov    %r15d,0x48(%rsp)
  lea    (%r8,%r8,2),%r8
  mov    0x80(%rsp),%r15d
  lea    (%rbx,%r8,4),%r9
  nopw   0x0(%rax,%rax,1)
L373:
  xor    %r8d,%r8d
  test   %edx,%edx
  mov    0x30(%rsp),%rbx
  mov    %eax,%r12d
  cmovns %edx,%r8d
  add    0x3c(%rsp),%r8d
  mov    0x18(%rsp),%r10
  neg    %r12d
  movslq %r8d,%r8
  cmovs  %eax,%r12d
  movswl (%rbx,%r8,2),%ebp
  mov    0x10(%rsp),%rbx
  movswl (%r10,%r8,2),%r10d
  movswl (%rbx,%r8,2),%ebx
  mov    0x24(%rsp),%r8d
  movd   %ebp,%xmm0
  add    %ebp,%r11d
  add    %r10d,%r13d
  mov    %r10d,0x8(%r9)
  sub    %r12d,%r8d
  movd   %ebx,%xmm5
  add    %ebx,%r14d
  mov    %r8d,%r12d
  punpckldq %xmm5,%xmm0
  imul   %ebp,%r12d
  movq   %xmm0,(%r9)
  add    %r12d,%ecx
  mov    %r8d,%r12d
  imul   %ebx,%r12d
  imul   %r10d,%r8d
  add    %r12d,%esi
  add    %r8d,%edi
  cmp    %eax,0x38(%rsp)
  lea    (%r15,%rdx,1),%r8d
  cmovg  %r8d,%edx
  add    $0x1,%eax
  add    $0xc,%r9
  cmp    %eax,0x4(%rsp)
  jge    L373
  mov    0x48(%rsp),%r15d
  mov    0x50(%rsp),%r12d
  mov    %r13d,0x48(%rsp)
  mov    %r14d,%edx
  mov    0x70(%rsp),%ebp
L428:
  mov    0xa8(%rsp),%eax
  test   %eax,%eax
  jle    L424
  mov    0x28(%rsp),%rax
  mov    0x58(%rsp),%rbx
  mov    %edx,%r9d
  mov    %r11d,%r10d
  mov    0x4(%rsp),%r13d
  lea    (%rax,%rbx,2),%r14
  mov    0x40(%rsp),%rax
  mov    0x24(%rsp),%ebx
  mov    %rax,0x50(%rsp)
  jmp    L257
  nopl   0x0(%rax,%rax,1)
L306:
  mov    0x50(%rsp),%rdx
  mov    (%rdx),%edx
L326:
  mov    0x30(%rsp),%r11
  add    0x3c(%rsp),%edx
  add    $0x1,%ebx
  movslq %edx,%rdx
  addq   $0x4,0x50(%rsp)
  add    0x60(%rsp),%r14
  movswl (%r11,%rdx,2),%r8d
  mov    0x10(%rsp),%r11
  mov    %r8d,0x70(%rsp)
  movswl (%r11,%rdx,2),%r11d
  movd   %r8d,%xmm0
  mov    0x18(%rsp),%r8
  add    0x70(%rsp),%r10d
  movd   %r11d,%xmm6
  add    %r11d,%r9d
  add    %r10d,%ecx
  movswl (%r8,%rdx,2),%r8d
  punpckldq %xmm6,%xmm0
  add    %r9d,%esi
  movq   %xmm0,(%rax)
  mov    %r8d,0x8(%rax)
  lea    0x1(%r13),%eax
  add    0x48(%rsp),%r8d
  cltd
  add    %r8d,%edi
  idivl  0x20(%rsp)
  movslq %edx,%rax
  mov    0x8(%rsp),%rdx
  mov    %rax,%r13
  lea    (%rax,%rax,2),%rax
  lea    (%rdx,%rax,4),%rax
  mov    (%rax),%edx
  mov    0x4(%rax),%r11d
  mov    0x8(%rax),%eax
  add    %edx,%r15d
  add    %r11d,%r12d
  sub    %edx,%r10d
  sub    %r11d,%r9d
  sub    %eax,%r8d
  add    %eax,%ebp
  mov    %r8d,0x48(%rsp)
  cmp    %ebx,0x74(%rsp)
  je     L424
L257:
  mov    0x88(%rsp),%r8
  movslq %ecx,%rax
  sub    %r15d,%ecx
  movzwl (%r8,%rax,2),%edx
  movslq %esi,%rax
  sub    %r12d,%esi
  movzwl (%r8,%rax,2),%eax
  sar    $0x3,%dx
  sar    $0x2,%ax
  shl    $0xb,%edx
  shl    $0x5,%eax
  or     %edx,%eax
  movslq %edi,%rdx
  sub    %ebp,%edi
  movzwl (%r8,%rdx,2),%edx
  sar    $0x3,%dx
  or     %edx,%eax
  mov    0x20(%rsp),%edx
  mov    %ax,(%r14)
  mov    %r13d,%eax
  sub    0x4(%rsp),%eax
  add    %edx,%eax
  mov    %edx,%r11d
  cltd
  idiv   %r11d
  movslq %edx,%rdx
  lea    (%rdx,%rdx,2),%rax
  mov    0x8(%rsp),%rdx
  lea    (%rdx,%rax,4),%rax
  sub    (%rax),%r15d
  sub    0x4(%rax),%r12d
  sub    0x8(%rax),%ebp
  cmpq   $0x0,0x58(%rsp)
  jne    L306
  mov    0x38(%rsp),%edx
  mov    0x50(%rsp),%r11
  cmp    %edx,%ebx
  cmovle %ebx,%edx
  imul   0x80(%rsp),%edx
  mov    %edx,(%r11)
  jmp    L326
  nopw   0x0(%rax,%rax,1)
L424:
  addq   $0x1,0x58(%rsp)
  mov    0x58(%rsp),%rax
  cmp    0x90(%rsp),%rax
  jne    L362
  jmp    L404
  xchg   %ax,%ax
L393:
  mov    0x84(%rsp),%edx
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  xor    %r15d,%r15d
  xor    %edi,%edi
  xor    %esi,%esi
  xor    %ecx,%ecx
  jmp    L109
L327:
  movl   $0x0,0x48(%rsp)
  xor    %edx,%edx
  xor    %r11d,%r11d
  jmp    L428
L133:
  movl   $0x0,0x48(%rsp)
  xor    %edx,%edx
  xor    %r11d,%r11d
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  xor    %r15d,%r15d
  xor    %edi,%edi
  xor    %esi,%esi
  xor    %ecx,%ecx
  jmp    L428
```

assistant: ```c
short *blur_RGB_565(short *pix, int w, int h, int radius) {
  int wm = w - 1;
  int hm = h - 1;
  int wh = w * h;
  int div = radius + radius + 1;
  short *r = (short *)malloc(wh * sizeof(short));
  short *g = (short *)malloc(wh * sizeof(short));
  short *b = (short *)malloc(wh * sizeof(short));
  int rsum, gsum, bsum, x, y, p, i, yp, yi, yw;
  int *vmin = (int *)malloc(((w) > (h) ? (w) : (h)) * sizeof(int));
  int divsum = (div + 1) >> 1;
  divsum *= divsum;
  short *dv = (short *)malloc(256 * divsum * sizeof(short));
  for (i = 0; i < 256 * divsum; i++) {
    dv[i] = (short)(i / divsum);
  }
  yw = yi = 0;
  int(*stack)[3] = (int(*)[3])malloc(div * 3 * sizeof(int));
  int stackpointer;
  int stackstart;
  int *sir;
  int rbs;
  int r1 = radius + 1;
  int routsum, goutsum, boutsum;
  int rinsum, ginsum, binsum;
  for (y = 0; y < h; y++) {
    rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0;
    for (i = -radius; i <= radius; i++) {
      p = pix[yi + (((wm) < (((i) > (0) ? (i) : (0))) ? (wm) : (((i) > (0) ? (i) : (0)))))];
      sir = stack[i + radius];
      sir[0] = (((p)&0xF800) >> 11) << 3;
      sir[1] = (((p)&0x7E0) >> 5) << 2;
      sir[2] = ((p)&0x1F) << 3;
      rbs = r1 - ((i) < (0) ? (-i) : (i));
      rsum += sir[0] * rbs;
      gsum += sir[1] * rbs;
      bsum += sir[2] * rbs;
      if (i > 0) {
        rinsum += sir[0];
        ginsum += sir[1];
        binsum += sir[2];
      } else {
        routsum += sir[0];
        goutsum += sir[1];
        boutsum += sir[2];
      }
    }
    stackpointer = radius;
    for (x = 0; x < w; x++) {
      r[yi] = dv[rsum];
      g[yi] = dv[gsum];
      b[yi] = dv[bsum];
      rsum -= routsum;
      gsum -= goutsum;
      bsum -= boutsum;
      stackstart = stackpointer - radius + div;
      sir = stack[stackstart % div];
      routsum -= sir[0];
      goutsum -= sir[1];
      boutsum -= sir[2];
      if (y == 0) {
        vmin[x] = ((x + radius + 1) < (wm) ? (x + radius + 1) : (wm));
      }
      p = pix[yw + vmin[x]];
      sir[0] = (((p)&0xF800) >> 11) << 3;
      sir[1] = (((p)&0x7E0) >> 5) << 2;
      sir[2] = ((p)&0x1F) << 3;
      rinsum += sir[0];
      ginsum += sir[1];
      binsum += sir[2];
      rsum += rinsum;
      gsum += ginsum;
      bsum += binsum;
      stackpointer = (stackpointer + 1) % div;
      sir = stack[(stackpointer) % div];
      routsum += sir[0];
      goutsum += sir[1];
      boutsum += sir[2];
      rinsum -= sir[0];
      ginsum -= sir[1];
      binsum -= sir[2];
      yi++;
    }
    yw += w;
  }
  for (x = 0; x < w; x++) {
    rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0;
    yp = -radius * w;
    for (i = -radius; i <= radius; i++) {
      yi = ((0) > (yp) ? (0) : (yp)) + x;
      sir = stack[i + radius];
      sir[0] = r[yi];
      sir[1] = g[yi];
      sir[2] = b[yi];
      rbs = r1 - ((i) < (0) ? (-i) : (i));
      rsum += r[yi] * rbs;
      gsum += g[yi] * rbs;
      bsum += b[yi] * rbs;
      if (i > 0) {
        rinsum += sir[0];
        ginsum += sir[1];
        binsum += sir[2];
      } else {
        routsum += sir[0];
        goutsum += sir[1];
        boutsum += sir[2];
      }
      if (i < hm) {
        yp += w;
      }
    }
    yi = x;
    stackpointer = radius;
    for (y = 0; y < h; y++) {
      pix[yi] = ((((dv[rsum]) >> 3) << 11) | (((dv[gsum]) >> 2) << 5) | ((dv[bsum]) >> 3));
      rsum -= routsum;
      gsum -= goutsum;
      bsum -= boutsum;
      stackstart = stackpointer - radius + div;
      sir = stack[stackstart % div];
      routsum -= sir[0];
      goutsum -= sir[1];
      boutsum -= sir[2];
      if (x == 0) {
        vmin[y] = ((y + r1) < (hm) ? (y + r1) : (hm)) * w;
      }
      p = x + vmin[y];
      sir[0] = r[p];
      sir[1] = g[p];
      sir[2] = b[p];
      rinsum += sir[0];
      ginsum += sir[1];
      binsum += sir[2];
      rsum += rinsum;
      gsum += ginsum;
      bsum += binsum;
      stackpointer = (stackpointer + 1) % div;
      sir = stack[stackpointer];
      routsum += sir[0];
      goutsum += sir[1];
      boutsum += sir[2];
      rinsum -= sir[0];
      ginsum -= sir[1];
      binsum -= sir[2];
      yi += w;
    }
  }
  free(r);
  free(g);
  free(b);
  free(vmin);
  free(dv);
  free(stack);
  return (pix);
}
```