user: What would the C source look like for the assembly code provided here:

```asm
<dist1>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  test   %ecx,%ecx
  je     L46
  test   %r8d,%r8d
  jne    L70
  test   %r9d,%r9d
  jle    L0
  movslq %edx,%rdx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L113:
  movzbl 0x1(%rdi),%r10d
  movzbl (%rdi),%ecx
  movzbl (%rsi),%r11d
  lea    0x1(%r10,%rcx,1),%ecx
  shr    %ecx
  sub    %r11d,%ecx
  mov    %eax,%r11d
  sub    %ecx,%r11d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r11d,%eax
  movzbl 0x2(%rdi),%r11d
  lea    0x1(%r11,%r10,1),%ecx
  movzbl 0x1(%rsi),%r10d
  shr    %ecx
  sub    %r10d,%ecx
  mov    %eax,%r10d
  sub    %ecx,%r10d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r10d,%eax
  movzbl 0x3(%rdi),%r10d
  lea    0x1(%r10,%r11,1),%ecx
  movzbl 0x2(%rsi),%r11d
  shr    %ecx
  sub    %r11d,%ecx
  mov    %eax,%r11d
  sub    %ecx,%r11d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r11d,%eax
  movzbl 0x4(%rdi),%r11d
  lea    0x1(%r11,%r10,1),%ecx
  movzbl 0x3(%rsi),%r10d
  shr    %ecx
  sub    %r10d,%ecx
  mov    %eax,%r10d
  sub    %ecx,%r10d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r10d,%eax
  movzbl 0x5(%rdi),%r10d
  lea    0x1(%r10,%r11,1),%ecx
  movzbl 0x4(%rsi),%r11d
  shr    %ecx
  sub    %r11d,%ecx
  mov    %eax,%r11d
  sub    %ecx,%r11d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r11d,%eax
  movzbl 0x6(%rdi),%r11d
  lea    0x1(%r11,%r10,1),%ecx
  movzbl 0x5(%rsi),%r10d
  shr    %ecx
  sub    %r10d,%ecx
  mov    %eax,%r10d
  sub    %ecx,%r10d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r10d,%eax
  movzbl 0x7(%rdi),%r10d
  lea    0x1(%r10,%r11,1),%ecx
  movzbl 0x6(%rsi),%r11d
  shr    %ecx
  sub    %r11d,%ecx
  mov    %eax,%r11d
  sub    %ecx,%r11d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r11d,%eax
  movzbl 0x8(%rdi),%r11d
  lea    0x1(%r11,%r10,1),%ecx
  movzbl 0x7(%rsi),%r10d
  shr    %ecx
  sub    %r10d,%ecx
  mov    %eax,%r10d
  sub    %ecx,%r10d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r10d,%eax
  movzbl 0x9(%rdi),%r10d
  lea    0x1(%r10,%r11,1),%ecx
  movzbl 0x8(%rsi),%r11d
  shr    %ecx
  sub    %r11d,%ecx
  mov    %eax,%r11d
  sub    %ecx,%r11d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r11d,%eax
  movzbl 0xa(%rdi),%r11d
  lea    0x1(%r11,%r10,1),%ecx
  movzbl 0x9(%rsi),%r10d
  shr    %ecx
  sub    %r10d,%ecx
  mov    %eax,%r10d
  sub    %ecx,%r10d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r10d,%eax
  movzbl 0xb(%rdi),%r10d
  lea    0x1(%r10,%r11,1),%ecx
  movzbl 0xa(%rsi),%r11d
  shr    %ecx
  sub    %r11d,%ecx
  mov    %eax,%r11d
  sub    %ecx,%r11d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r11d,%eax
  movzbl 0xc(%rdi),%r11d
  lea    0x1(%r11,%r10,1),%ecx
  movzbl 0xb(%rsi),%r10d
  shr    %ecx
  sub    %r10d,%ecx
  mov    %eax,%r10d
  sub    %ecx,%r10d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r10d,%eax
  movzbl 0xd(%rdi),%r10d
  lea    0x1(%r10,%r11,1),%ecx
  movzbl 0xc(%rsi),%r11d
  shr    %ecx
  sub    %r11d,%ecx
  mov    %eax,%r11d
  sub    %ecx,%r11d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r11d,%eax
  movzbl 0xe(%rdi),%r11d
  lea    0x1(%r11,%r10,1),%ecx
  movzbl 0xd(%rsi),%r10d
  shr    %ecx
  sub    %r10d,%ecx
  mov    %eax,%r10d
  sub    %ecx,%r10d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r10d,%eax
  movzbl 0xf(%rdi),%r10d
  lea    0x1(%r10,%r11,1),%ecx
  movzbl 0xe(%rsi),%r11d
  shr    %ecx
  sub    %r11d,%ecx
  mov    %eax,%r11d
  sub    %ecx,%r11d
  add    %ecx,%eax
  test   %ecx,%ecx
  movzbl 0x10(%rdi),%ecx
  cmovs  %r11d,%eax
  lea    0x1(%r10,%rcx,1),%ecx
  movzbl 0xf(%rsi),%r10d
  shr    %ecx
  sub    %r10d,%ecx
  mov    %eax,%r10d
  sub    %ecx,%r10d
  add    %ecx,%eax
  test   %ecx,%ecx
  cmovs  %r10d,%eax
  add    $0x1,%r8d
  add    %rdx,%rdi
  add    %rdx,%rsi
  cmp    %r8d,%r9d
  jne    L113
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L46:
  test   %r8d,%r8d
  jne    L81
  test   %r9d,%r9d
  jle    L0
  pxor   %xmm0,%xmm0
  pxor   %xmm9,%xmm9
  pxor   %xmm4,%xmm4
  movslq %edx,%rax
  movaps %xmm0,-0x30(%rsp)
  xor    %edx,%edx
  movdqa %xmm0,%xmm8
  movaps %xmm0,-0x20(%rsp)
  movaps %xmm0,-0x10(%rsp)
  nopl   0x0(%rax,%rax,1)
L35:
  movdqu (%rdi,%rdx,1),%xmm1
  movdqu (%rsi,%rdx,1),%xmm3
  add    $0x1,%ecx
  add    %rax,%rdx
  movdqa %xmm1,%xmm2
  movdqa %xmm3,%xmm7
  punpckhbw %xmm9,%xmm3
  punpcklbw %xmm9,%xmm2
  punpcklbw %xmm9,%xmm7
  punpckhbw %xmm9,%xmm1
  movdqa %xmm2,%xmm14
  movdqa %xmm7,%xmm5
  movdqa %xmm3,%xmm15
  punpcklwd %xmm4,%xmm14
  punpckhwd %xmm4,%xmm3
  movdqa %xmm1,%xmm6
  punpcklwd %xmm4,%xmm5
  punpckhwd %xmm4,%xmm1
  movdqa %xmm3,%xmm10
  movdqa %xmm14,%xmm13
  psubd  %xmm1,%xmm10
  psubd  %xmm3,%xmm1
  psubd  %xmm5,%xmm13
  movdqa %xmm8,%xmm3
  punpckhwd %xmm4,%xmm7
  pcmpgtd %xmm13,%xmm3
  psubd  %xmm14,%xmm5
  punpckhwd %xmm4,%xmm2
  movdqa %xmm7,%xmm12
  punpcklwd %xmm4,%xmm15
  punpcklwd %xmm4,%xmm6
  psubd  %xmm2,%xmm12
  psubd  %xmm7,%xmm2
  movdqa %xmm15,%xmm11
  pand   %xmm3,%xmm5
  pandn  %xmm13,%xmm3
  psubd  %xmm6,%xmm11
  por    %xmm3,%xmm5
  movdqa %xmm8,%xmm3
  psubd  %xmm15,%xmm6
  pcmpgtd %xmm2,%xmm3
  paddd  -0x10(%rsp),%xmm5
  movaps %xmm5,-0x10(%rsp)
  pand   %xmm3,%xmm12
  pandn  %xmm2,%xmm3
  movdqa %xmm8,%xmm2
  pcmpgtd %xmm6,%xmm2
  por    %xmm3,%xmm12
  paddd  %xmm12,%xmm0
  pand   %xmm2,%xmm11
  pandn  %xmm6,%xmm2
  por    %xmm2,%xmm11
  movdqa %xmm8,%xmm2
  paddd  -0x20(%rsp),%xmm11
  pcmpgtd %xmm1,%xmm2
  movaps %xmm11,-0x20(%rsp)
  pand   %xmm2,%xmm10
  pandn  %xmm1,%xmm2
  por    %xmm10,%xmm2
  paddd  -0x30(%rsp),%xmm2
  movaps %xmm2,-0x30(%rsp)
  cmp    %ecx,%r9d
  jne    L35
  paddd  %xmm5,%xmm0
  paddd  %xmm11,%xmm0
  paddd  %xmm2,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x8,%xmm1
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
L11:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L70:
  movslq %edx,%rcx
  xor    %eax,%eax
  lea    (%rdi,%rcx,1),%rdx
  test   %r9d,%r9d
  jle    L11
  xor    %r8d,%r8d
  nopl   0x0(%rax,%rax,1)
L112:
  movzbl 0x1(%rdi),%ebx
  movzbl (%rdi),%r10d
  movzbl (%rdx),%r11d
  movzbl 0x1(%rdx),%ebp
  add    %ebx,%r10d
  movzbl 0x2(%rdx),%r12d
  add    %r11d,%r10d
  movzbl (%rsi),%r11d
  lea    0x2(%rbp,%r10,1),%r10d
  shr    $0x2,%r10d
  sub    %r11d,%r10d
  lea    (%r10,%rax,1),%r11d
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %r11d,%eax
  movzbl 0x2(%rdi),%r11d
  add    %r11d,%ebx
  add    %ebp,%ebx
  movzbl 0x3(%rdx),%ebp
  lea    0x2(%r12,%rbx,1),%r10d
  movzbl 0x1(%rsi),%ebx
  shr    $0x2,%r10d
  sub    %ebx,%r10d
  lea    (%rax,%r10,1),%ebx
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %ebx,%eax
  movzbl 0x3(%rdi),%ebx
  add    %ebx,%r11d
  add    %r12d,%r11d
  movzbl 0x4(%rdx),%r12d
  lea    0x2(%rbp,%r11,1),%r10d
  movzbl 0x2(%rsi),%r11d
  shr    $0x2,%r10d
  sub    %r11d,%r10d
  lea    (%rax,%r10,1),%r11d
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %r11d,%eax
  movzbl 0x4(%rdi),%r11d
  add    %r11d,%ebx
  add    %ebp,%ebx
  movzbl 0x5(%rdx),%ebp
  lea    0x2(%r12,%rbx,1),%r10d
  movzbl 0x3(%rsi),%ebx
  shr    $0x2,%r10d
  sub    %ebx,%r10d
  lea    (%r10,%rax,1),%ebx
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %ebx,%eax
  movzbl 0x5(%rdi),%ebx
  add    %ebx,%r11d
  add    %r12d,%r11d
  movzbl 0x6(%rdx),%r12d
  lea    0x2(%rbp,%r11,1),%r10d
  movzbl 0x4(%rsi),%r11d
  shr    $0x2,%r10d
  sub    %r11d,%r10d
  lea    (%rax,%r10,1),%r11d
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %r11d,%eax
  movzbl 0x6(%rdi),%r11d
  add    %r11d,%ebx
  add    %ebp,%ebx
  movzbl 0x7(%rdx),%ebp
  lea    0x2(%r12,%rbx,1),%r10d
  movzbl 0x5(%rsi),%ebx
  shr    $0x2,%r10d
  sub    %ebx,%r10d
  lea    (%rax,%r10,1),%ebx
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %ebx,%eax
  movzbl 0x7(%rdi),%ebx
  add    %ebx,%r11d
  add    %r12d,%r11d
  movzbl 0x8(%rdx),%r12d
  lea    0x2(%rbp,%r11,1),%r10d
  movzbl 0x6(%rsi),%r11d
  shr    $0x2,%r10d
  sub    %r11d,%r10d
  lea    (%rax,%r10,1),%r11d
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %r11d,%eax
  movzbl 0x8(%rdi),%r11d
  add    %r11d,%ebx
  add    %ebp,%ebx
  movzbl 0x9(%rdx),%ebp
  lea    0x2(%r12,%rbx,1),%r10d
  movzbl 0x7(%rsi),%ebx
  shr    $0x2,%r10d
  sub    %ebx,%r10d
  lea    (%rax,%r10,1),%ebx
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %ebx,%eax
  movzbl 0x9(%rdi),%ebx
  add    %ebx,%r11d
  add    %r12d,%r11d
  movzbl 0xa(%rdx),%r12d
  lea    0x2(%rbp,%r11,1),%r10d
  movzbl 0x8(%rsi),%r11d
  shr    $0x2,%r10d
  sub    %r11d,%r10d
  lea    (%r10,%rax,1),%r11d
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %r11d,%eax
  movzbl 0xa(%rdi),%r11d
  add    %r11d,%ebx
  add    %ebp,%ebx
  lea    0x2(%r12,%rbx,1),%r10d
  movzbl 0x9(%rsi),%ebx
  shr    $0x2,%r10d
  sub    %ebx,%r10d
  lea    (%rax,%r10,1),%ebx
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %ebx,%eax
  movzbl 0xb(%rdi),%ebx
  movzbl 0xb(%rdx),%ebp
  add    %ebx,%r11d
  add    %r12d,%r11d
  movzbl 0xc(%rdx),%r12d
  lea    0x2(%rbp,%r11,1),%r10d
  movzbl 0xa(%rsi),%r11d
  shr    $0x2,%r10d
  sub    %r11d,%r10d
  lea    (%rax,%r10,1),%r11d
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %r11d,%eax
  movzbl 0xc(%rdi),%r11d
  add    %r11d,%ebx
  add    %ebp,%ebx
  movzbl 0xd(%rdx),%ebp
  lea    0x2(%r12,%rbx,1),%r10d
  movzbl 0xb(%rsi),%ebx
  shr    $0x2,%r10d
  sub    %ebx,%r10d
  lea    (%rax,%r10,1),%ebx
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %ebx,%eax
  movzbl 0xd(%rdi),%ebx
  add    %ebx,%r11d
  add    %r12d,%r11d
  movzbl 0xe(%rdx),%r12d
  lea    0x2(%rbp,%r11,1),%r10d
  movzbl 0xc(%rsi),%r11d
  shr    $0x2,%r10d
  sub    %r11d,%r10d
  lea    (%rax,%r10,1),%r11d
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %r11d,%eax
  movzbl 0xe(%rdi),%r11d
  add    %r11d,%ebx
  add    %ebp,%ebx
  movzbl 0xf(%rdi),%ebp
  lea    0x2(%r12,%rbx,1),%r10d
  movzbl 0xd(%rsi),%ebx
  shr    $0x2,%r10d
  sub    %ebx,%r10d
  lea    (%rax,%r10,1),%ebx
  sub    %r10d,%eax
  test   %r10d,%r10d
  cmovns %ebx,%eax
  movzbl 0xf(%rdx),%ebx
  add    %ebp,%r11d
  add    %r12d,%r11d
  lea    0x2(%rbx,%r11,1),%r10d
  movzbl 0xe(%rsi),%r11d
  shr    $0x2,%r10d
  sub    %r11d,%r10d
  lea    (%rax,%r10,1),%r11d
  sub    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0x10(%rdi),%r10d
  cmovns %r11d,%eax
  movzbl 0x10(%rdx),%r11d
  add    %ebp,%r10d
  add    %ebx,%r10d
  lea    0x2(%r10,%r11,1),%r10d
  movzbl 0xf(%rsi),%r11d
  shr    $0x2,%r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  cmovs  %r11d,%eax
  add    $0x1,%r8d
  add    %rcx,%rdx
  add    %rcx,%rsi
  add    %rcx,%rdi
  cmp    %r9d,%r8d
  jne    L112
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L81:
  movslq %edx,%rdx
  xor    %eax,%eax
  lea    (%rdi,%rdx,1),%r8
  test   %r9d,%r9d
  jle    L11
  nopl   0x0(%rax)
L32:
  movzbl (%r8),%r11d
  movzbl (%rdi),%r10d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl (%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0x1(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0x1(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0x1(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0x2(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0x2(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0x2(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0x3(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0x3(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0x3(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0x4(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0x4(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0x4(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0x5(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0x5(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0x5(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0x6(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0x6(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0x6(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0x7(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0x7(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0x7(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0x8(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0x8(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0x8(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0x9(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0x9(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0x9(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0xa(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0xa(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0xa(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0xb(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0xb(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0xb(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0xc(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0xc(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0xc(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0xd(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0xd(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0xd(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0xe(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0xe(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0xe(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  movzbl 0xf(%rdi),%r10d
  cmovs  %r11d,%eax
  movzbl 0xf(%r8),%r11d
  lea    0x1(%r11,%r10,1),%r10d
  movzbl 0xf(%rsi),%r11d
  shr    %r10d
  sub    %r11d,%r10d
  mov    %eax,%r11d
  sub    %r10d,%r11d
  add    %r10d,%eax
  test   %r10d,%r10d
  cmovs  %r11d,%eax
  add    $0x1,%ecx
  add    %rdx,%r8
  add    %rdx,%rsi
  add    %rdx,%rdi
  cmp    %ecx,%r9d
  jne    L32
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L0:
  xor    %eax,%eax
  jmp    L11
```

assistant: ```c
int dist1(unsigned char *blk1, unsigned char *blk2, int lx, int hx, int hy, int h, int distlim) {
  unsigned char *p1;
  unsigned char *p1a;
  unsigned char *p2;
  int i;
  int j;
  int s;
  int v;
  int sa;
  int tmp;
  {
    sa = 0;
    if (!hx) {
      if (!hy) {
        s = 0;
        p1 = blk1;
        p2 = blk2;
        j = 0;
        while (j < h) {
          i = 0;
          while (i < 16) {
            v = (int)*(p1 + i) - (int)*(p2 + i);
            if (v >= 0) {
              tmp = v;
            } else {
              tmp = -v;
            }
            s += tmp;
            i++;
          }
          p1 += lx;
          p2 += lx;
          j++;
        }
      } else {
        goto _L___1;
      }
    } else
    _L___1:
      if (hx) {
        if (!hy) {
          s = 0;
          p1 = blk1;
          p2 = blk2;
          j = 0;
          while (j < h) {
            i = 0;
            while (i < 16) {
              v = (int)(((unsigned int)(((int)*(p1 + i) + (int)*(p1 + (i + 1))) + 1) >> 1) - (unsigned int)*(p2 + i));
              if (v >= 0) {
                s += v;
              } else {
                s -= v;
              }
              i++;
            }
            p1 += lx;
            p2 += lx;
            j++;
          }
        } else {
          goto _L___0;
        }
      } else
      _L___0:
        if (!hx) {
          if (hy) {
            s = 0;
            p1 = blk1;
            p2 = blk2;
            p1a = p1 + lx;
            j = 0;
            while (j < h) {
              i = 0;
              while (i < 16) {
                v = (int)(((unsigned int)(((int)*(p1 + i) + (int)*(p1a + i)) + 1) >> 1) - (unsigned int)*(p2 + i));
                if (v >= 0) {
                  s += v;
                } else {
                  s -= v;
                }
                i++;
              }
              p1 = p1a;
              p1a += lx;
              p2 += lx;
              j++;
            }
          } else {
            goto _L;
          }
        } else {
        _L:
          s = 0;
          p1 = blk1;
          p2 = blk2;
          p1a = p1 + lx;
          j = 0;
          while (j < h) {
            i = 0;
            while (i < 16) {
              v = (int)(((unsigned int)(((((int)*(p1 + i) + (int)*(p1 + (i + 1))) + (int)*(p1a + i)) + (int)*(p1a + (i + 1))) + 2) >> 2) - (unsigned int)*(p2 + i));
              if (v >= 0) {
                s += v;
              } else {
                s -= v;
              }
              i++;
            }
            p1 = p1a;
            p1a += lx;
            p2 += lx;
            j++;
          }
        }
    return (s);
  }
}
```