signed int dist1(unsigned char *blk1, unsigned char *blk2, signed int lx,
                 signed int hx, signed int hy, signed int h,
                 signed int distlim) {
  unsigned char *p1;
  unsigned char *p1a;
  unsigned char *p2;
  signed int i;
  signed int j;
  signed int s;
  signed int v;
  signed int sa = 0;
  if (hx == 0) {
    if (hy != 0)
      goto __CPROVER_DUMP_L5;
    s = 0;
    p1 = blk1;
    p2 = blk2;
    j = 0;
    while (!(j >= h)) {
      i = 0;
      while (i < 16) {
        v = (signed int)p1[(signed long int)i] -
            (signed int)p2[(signed long int)i];
        s = s + (v >= 0 ? v : -v);
        i = i + 1;
      }
      p1 = p1 + (signed long int)lx;
      p2 = p2 + (signed long int)lx;
      j = j + 1;
    }
  } else {
  __CPROVER_DUMP_L5:;
    if (!(hx == 0)) {
      if (hy != 0)
        goto __CPROVER_DUMP_L12;
      s = 0;
      p1 = blk1;
      p2 = blk2;
      j = 0;
      while (!(j >= h)) {
        i = 0;
        while (i < 16) {
          v = (signed int)(((unsigned int)((signed int)p1[(signed long int)i] +
                                           (signed int)
                                               p1[(signed long int)(i + 1)] +
                                           1) >>
                            1) -
                           (unsigned int)p2[(signed long int)i]);
          if (v >= 0)
            s = s + v;
          else
            s = s - v;
          i = i + 1;
        }
        p1 = p1 + (signed long int)lx;
        p2 = p2 + (signed long int)lx;
        j = j + 1;
      }
    } else {
    __CPROVER_DUMP_L12:;
      if (hx == 0) {
        if (hy == 0)
          goto __CPROVER_DUMP_L19;
        s = 0;
        p1 = blk1;
        p2 = blk2;
        p1a = p1 + (signed long int)lx;
        j = 0;
        while (!(j >= h)) {
          i = 0;
          while (i < 16) {
            v = (signed int)(((unsigned int)((signed int)
                                                 p1[(signed long int)i] +
                                             (signed int)
                                                 p1a[(signed long int)i] +
                                             1) >>
                              1) -
                             (unsigned int)p2[(signed long int)i]);
            if (v >= 0)
              s = s + v;
            else
              s = s - v;
            i = i + 1;
          }
          p1 = p1a;
          p1a = p1a + (signed long int)lx;
          p2 = p2 + (signed long int)lx;
          j = j + 1;
        }
      } else {
      __CPROVER_DUMP_L19:;
        s = 0;
        p1 = blk1;
        p2 = blk2;
        p1a = p1 + (signed long int)lx;
        j = 0;
        while (!(j >= h)) {
          i = 0;
          while (i < 16) {
            v = (signed int)(((unsigned int)((signed int)
                                                 p1[(signed long int)i] +
                                             (signed int)
                                                 p1[(signed long int)(i + 1)] +
                                             (signed int)
                                                 p1a[(signed long int)i] +
                                             (signed int)
                                                 p1a[(signed long int)(i + 1)] +
                                             2) >>
                              2) -
                             (unsigned int)p2[(signed long int)i]);
            if (v >= 0)
              s = s + v;
            else
              s = s - v;
            i = i + 1;
          }
          p1 = p1a;
          p1a = p1a + (signed long int)lx;
          p2 = p2 + (signed long int)lx;
          j = j + 1;
        }
      }
    }
  }
  return s;
}


x86 assembly (clang, -O0):
<dist1>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
movl   $0x0,-0x4c(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    120e <dist1+0x10e>
cmpl   $0x0,-0x1c(%rbp)
je     113d <dist1+0x3d>
jmp    1213 <dist1+0x113>
movl   $0x0,-0x44(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x20(%rbp),%eax
setge  %al
xor    $0xff,%al
test   $0x1,%al
jne    1173 <dist1+0x73>
jmp    1209 <dist1+0x109>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x10,-0x3c(%rbp)
jge    11dd <dist1+0xdd>
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x38(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
sub    %ecx,%eax
mov    %eax,-0x48(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x50(%rbp)
cmpl   $0x0,-0x48(%rbp)
jl     11bc <dist1+0xbc>
mov    -0x48(%rbp),%eax
mov    %eax,-0x54(%rbp)
jmp    11c4 <dist1+0xc4>
xor    %eax,%eax
sub    -0x48(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x50(%rbp),%eax
mov    -0x54(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    117a <dist1+0x7a>
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    115b <dist1+0x5b>
jmp    153a <dist1+0x43a>
jmp    1213 <dist1+0x113>
cmpl   $0x0,-0x18(%rbp)
je     1309 <dist1+0x209>
cmpl   $0x0,-0x1c(%rbp)
je     122c <dist1+0x12c>
jmp    130e <dist1+0x20e>
movl   $0x0,-0x44(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x20(%rbp),%eax
setge  %al
xor    $0xff,%al
test   $0x1,%al
jne    1262 <dist1+0x162>
jmp    1304 <dist1+0x204>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x10,-0x3c(%rbp)
jge    12d8 <dist1+0x1d8>
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x28(%rbp),%rcx
mov    -0x3c(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
add    $0x1,%eax
shr    $0x1,%eax
mov    -0x38(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
sub    %ecx,%eax
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
jl     12c1 <dist1+0x1c1>
mov    -0x44(%rbp),%eax
add    -0x48(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    12ca <dist1+0x1ca>
mov    -0x44(%rbp),%eax
sub    -0x48(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1269 <dist1+0x169>
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    124a <dist1+0x14a>
jmp    1535 <dist1+0x435>
jmp    130e <dist1+0x20e>
cmpl   $0x0,-0x18(%rbp)
jne    1416 <dist1+0x316>
cmpl   $0x0,-0x1c(%rbp)
jne    1327 <dist1+0x227>
jmp    141b <dist1+0x31b>
movl   $0x0,-0x44(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x20(%rbp),%eax
setge  %al
xor    $0xff,%al
test   $0x1,%al
jne    136c <dist1+0x26c>
jmp    1411 <dist1+0x311>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x10,-0x3c(%rbp)
jge    13dd <dist1+0x2dd>
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x30(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
add    $0x1,%eax
shr    $0x1,%eax
mov    -0x38(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
sub    %ecx,%eax
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
jl     13c6 <dist1+0x2c6>
mov    -0x44(%rbp),%eax
add    -0x48(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    13cf <dist1+0x2cf>
mov    -0x44(%rbp),%eax
sub    -0x48(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1373 <dist1+0x273>
mov    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1354 <dist1+0x254>
jmp    1530 <dist1+0x430>
jmp    141b <dist1+0x31b>
movl   $0x0,-0x44(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x20(%rbp),%eax
setge  %al
xor    $0xff,%al
test   $0x1,%al
jne    1460 <dist1+0x360>
jmp    152b <dist1+0x42b>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x10,-0x3c(%rbp)
jge    14f7 <dist1+0x3f7>
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x28(%rbp),%rcx
mov    -0x3c(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%rcx
mov    -0x3c(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
add    $0x2,%eax
shr    $0x2,%eax
mov    -0x38(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
sub    %ecx,%eax
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
jl     14e0 <dist1+0x3e0>
mov    -0x44(%rbp),%eax
add    -0x48(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    14e9 <dist1+0x3e9>
mov    -0x44(%rbp),%eax
sub    -0x48(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1467 <dist1+0x367>
mov    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1448 <dist1+0x348>
jmp    1530 <dist1+0x430>
jmp    1535 <dist1+0x435>
jmp    153a <dist1+0x43a>
mov    -0x44(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist1>:
mov    %r8d,%eax
or     %ecx,%eax
je     1342 <dist1+0x242>
test   %ecx,%ecx
je     138b <dist1+0x28b>
test   %r8d,%r8d
jne    138b <dist1+0x28b>
test   %r9d,%r9d
jle    187f <dist1+0x77f>
movslq %edx,%r8
xor    %edx,%edx
movaps 0xece(%rip),%xmm8
pxor   %xmm13,%xmm13
pcmpeqd %xmm9,%xmm9
xor    %eax,%eax
xchg   %ax,%ax
movzbl (%rdi,%rdx,1),%ecx
movd   %ecx,%xmm0
pslld  $0x18,%xmm0
movss  0x1(%rdi,%rdx,1),%xmm10
xorps  %xmm12,%xmm12
movss  %xmm0,%xmm12
movaps %xmm10,%xmm14
movaps %xmm10,%xmm3
movss  0x5(%rdi,%rdx,1),%xmm11
movaps %xmm11,%xmm15
movaps %xmm11,%xmm7
movss  0x9(%rdi,%rdx,1),%xmm1
movaps %xmm1,%xmm2
movaps %xmm1,%xmm4
movss  0xd(%rdi,%rdx,1),%xmm5
movaps %xmm5,%xmm6
andps  %xmm8,%xmm6
orps   %xmm1,%xmm6
andps  %xmm8,%xmm1
orps   %xmm11,%xmm1
andps  %xmm8,%xmm11
orps   %xmm10,%xmm11
andps  %xmm8,%xmm10
orps   %xmm10,%xmm12
psrld  $0x18,%xmm12
pslld  $0x8,%xmm14
por    %xmm12,%xmm14
punpcklbw %xmm13,%xmm14
punpcklwd %xmm13,%xmm14
punpcklbw %xmm13,%xmm3
punpcklwd %xmm13,%xmm3
paddd  %xmm14,%xmm3
psubd  %xmm9,%xmm3
psrld  $0x1,%xmm3
movd   (%rsi,%rdx,1),%xmm0
punpcklbw %xmm13,%xmm0
punpcklwd %xmm13,%xmm0
psubd  %xmm0,%xmm3
movdqa %xmm3,%xmm0
psrad  $0x1f,%xmm0
paddd  %xmm0,%xmm3
pxor   %xmm0,%xmm3
psrld  $0x18,%xmm11
pslld  $0x8,%xmm15
por    %xmm11,%xmm15
punpcklbw %xmm13,%xmm15
punpcklwd %xmm13,%xmm15
punpcklbw %xmm13,%xmm7
punpcklwd %xmm13,%xmm7
paddd  %xmm15,%xmm7
psubd  %xmm9,%xmm7
psrld  $0x1,%xmm7
movd   0x4(%rsi,%rdx,1),%xmm0
punpcklbw %xmm13,%xmm0
punpcklwd %xmm13,%xmm0
psubd  %xmm0,%xmm7
movdqa %xmm7,%xmm0
psrad  $0x1f,%xmm0
paddd  %xmm0,%xmm7
pxor   %xmm0,%xmm7
movd   %eax,%xmm0
paddd  %xmm0,%xmm7
paddd  %xmm3,%xmm7
psrld  $0x18,%xmm1
pslld  $0x8,%xmm2
por    %xmm1,%xmm2
punpcklbw %xmm13,%xmm2
punpcklwd %xmm13,%xmm2
punpcklbw %xmm13,%xmm4
punpcklwd %xmm13,%xmm4
paddd  %xmm2,%xmm4
psubd  %xmm9,%xmm4
psrld  $0x1,%xmm4
movd   0x8(%rsi,%rdx,1),%xmm0
punpcklbw %xmm13,%xmm0
punpcklwd %xmm13,%xmm0
psubd  %xmm0,%xmm4
movdqa %xmm4,%xmm0
psrad  $0x1f,%xmm0
paddd  %xmm0,%xmm4
pxor   %xmm0,%xmm4
psrld  $0x18,%xmm6
movaps %xmm5,%xmm0
pslld  $0x8,%xmm0
por    %xmm6,%xmm0
punpcklbw %xmm13,%xmm0
punpcklwd %xmm13,%xmm0
punpcklbw %xmm13,%xmm5
punpcklwd %xmm13,%xmm5
paddd  %xmm0,%xmm5
psubd  %xmm9,%xmm5
psrld  $0x1,%xmm5
movd   0xc(%rsi,%rdx,1),%xmm0
punpcklbw %xmm13,%xmm0
punpcklwd %xmm13,%xmm0
psubd  %xmm0,%xmm5
movdqa %xmm5,%xmm0
psrad  $0x1f,%xmm0
paddd  %xmm0,%xmm5
pxor   %xmm0,%xmm5
paddd  %xmm4,%xmm5
paddd  %xmm7,%xmm5
pshufd $0xee,%xmm5,%xmm0
paddd  %xmm5,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%eax
add    %r8,%rdx
add    $0xffffffff,%r9d
jne    1140 <dist1+0x40>
jmp    187e <dist1+0x77e>
test   %r9d,%r9d
jle    187f <dist1+0x77f>
movslq %edx,%r8
xor    %edx,%edx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movdqu (%rdi,%rdx,1),%xmm0
movdqu (%rsi,%rdx,1),%xmm1
psadbw %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
paddq  %xmm1,%xmm0
movd   %xmm0,%ecx
add    %ecx,%eax
add    %r8,%rdx
add    $0xffffffff,%r9d
jne    1360 <dist1+0x260>
jmp    187e <dist1+0x77e>
movslq %edx,%r10
test   %ecx,%ecx
jne    1529 <dist1+0x429>
test   %r8d,%r8d
je     1529 <dist1+0x429>
test   %r9d,%r9d
jle    187f <dist1+0x77f>
add    $0xc,%rdi
add    $0xc,%rsi
xor    %eax,%eax
pxor   %xmm0,%xmm0
pcmpeqd %xmm1,%xmm1
nopw   0x0(%rax,%rax,1)
movd   %eax,%xmm3
movd   -0xc(%rdi),%xmm4
punpcklbw %xmm0,%xmm4
punpcklwd %xmm0,%xmm4
movd   -0xc(%rdi,%r10,1),%xmm2
punpcklbw %xmm0,%xmm2
punpcklwd %xmm0,%xmm2
paddd  %xmm4,%xmm2
psubd  %xmm1,%xmm2
psrld  $0x1,%xmm2
movd   -0xc(%rsi),%xmm4
punpcklbw %xmm0,%xmm4
punpcklwd %xmm0,%xmm4
psubd  %xmm4,%xmm2
movdqa %xmm2,%xmm4
psrad  $0x1f,%xmm4
paddd  %xmm4,%xmm2
pxor   %xmm4,%xmm2
paddd  %xmm3,%xmm2
movd   -0x8(%rdi),%xmm3
punpcklbw %xmm0,%xmm3
punpcklwd %xmm0,%xmm3
movd   -0x8(%rdi,%r10,1),%xmm4
punpcklbw %xmm0,%xmm4
punpcklwd %xmm0,%xmm4
paddd  %xmm3,%xmm4
psubd  %xmm1,%xmm4
psrld  $0x1,%xmm4
movd   -0x8(%rsi),%xmm3
punpcklbw %xmm0,%xmm3
punpcklwd %xmm0,%xmm3
psubd  %xmm3,%xmm4
movdqa %xmm4,%xmm3
psrad  $0x1f,%xmm3
paddd  %xmm3,%xmm4
pxor   %xmm3,%xmm4
movd   -0x4(%rdi),%xmm5
punpcklbw %xmm0,%xmm5
punpcklwd %xmm0,%xmm5
movd   -0x4(%rdi,%r10,1),%xmm3
punpcklbw %xmm0,%xmm3
punpcklwd %xmm0,%xmm3
paddd  %xmm5,%xmm3
psubd  %xmm1,%xmm3
psrld  $0x1,%xmm3
movd   -0x4(%rsi),%xmm5
punpcklbw %xmm0,%xmm5
punpcklwd %xmm0,%xmm5
psubd  %xmm5,%xmm3
movdqa %xmm3,%xmm5
psrad  $0x1f,%xmm5
paddd  %xmm5,%xmm3
pxor   %xmm5,%xmm3
paddd  %xmm4,%xmm3
movd   (%rdi),%xmm4
movd   (%rdi,%r10,1),%xmm5
lea    (%rdi,%r10,1),%rdi
paddd  %xmm2,%xmm3
punpcklbw %xmm0,%xmm4
punpcklwd %xmm0,%xmm4
punpcklbw %xmm0,%xmm5
punpcklwd %xmm0,%xmm5
paddd  %xmm4,%xmm5
psubd  %xmm1,%xmm5
psrld  $0x1,%xmm5
movd   (%rsi),%xmm2
punpcklbw %xmm0,%xmm2
punpcklwd %xmm0,%xmm2
psubd  %xmm2,%xmm5
movdqa %xmm5,%xmm2
psrad  $0x1f,%xmm2
paddd  %xmm2,%xmm5
pxor   %xmm2,%xmm5
paddd  %xmm3,%xmm5
pshufd $0xee,%xmm5,%xmm2
paddd  %xmm5,%xmm2
pshufd $0x55,%xmm2,%xmm3
paddd  %xmm2,%xmm3
movd   %xmm3,%eax
add    %r10,%rsi
add    $0xffffffff,%r9d
jne    13c0 <dist1+0x2c0>
jmp    187e <dist1+0x77e>
test   %r9d,%r9d
jle    187f <dist1+0x77f>
mov    (%rdi),%cl
lea    (%rdi,%r10,1),%r11
xor    %edx,%edx
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
movd   %ecx,%xmm11
movzbl (%r11,%rdx,1),%r8d
pslld  $0x18,%xmm11
movd   %r8d,%xmm3
pslld  $0x18,%xmm3
movss  0x1(%rdi,%rdx,1),%xmm0
movaps %xmm0,%xmm2
movaps %xmm0,%xmm6
movss  0x5(%rdi,%rdx,1),%xmm5
movaps %xmm5,-0x18(%rsp)
movaps %xmm5,-0x38(%rsp)
movss  0x9(%rdi,%rdx,1),%xmm15
movaps %xmm15,%xmm10
movaps %xmm15,%xmm4
movaps 0xa70(%rip),%xmm14
andps  %xmm14,%xmm4
orps   %xmm5,%xmm4
movaps %xmm4,-0x28(%rsp)
andps  %xmm14,%xmm5
orps   %xmm0,%xmm5
andps  %xmm14,%xmm0
xorps  %xmm1,%xmm1
movss  %xmm11,%xmm1
orps   %xmm0,%xmm1
psrld  $0x18,%xmm1
pslld  $0x8,%xmm2
por    %xmm1,%xmm2
xorps  %xmm4,%xmm4
punpcklbw %xmm4,%xmm2
punpcklwd %xmm4,%xmm2
punpcklbw %xmm4,%xmm6
punpcklwd %xmm4,%xmm6
paddd  %xmm2,%xmm6
movss  0x1(%r11,%rdx,1),%xmm8
pxor   %xmm1,%xmm1
movss  %xmm3,%xmm1
movaps %xmm8,%xmm9
movaps %xmm8,%xmm0
movss  0x5(%r11,%rdx,1),%xmm3
movaps %xmm3,%xmm7
movaps %xmm3,%xmm2
movss  0x9(%r11,%rdx,1),%xmm11
movaps %xmm11,%xmm13
andps  %xmm14,%xmm13
orps   %xmm3,%xmm13
andps  %xmm14,%xmm3
orps   %xmm8,%xmm3
andps  %xmm14,%xmm8
orps   %xmm8,%xmm1
psrld  $0x18,%xmm1
pslld  $0x8,%xmm9
por    %xmm1,%xmm9
movss  0xd(%rdi,%rdx,1),%xmm1
movaps %xmm1,%xmm8
andps  %xmm14,%xmm8
orps   %xmm15,%xmm8
punpcklbw %xmm4,%xmm9
punpcklwd %xmm4,%xmm9
paddd  %xmm6,%xmm9
movaps %xmm11,%xmm12
punpcklbw %xmm4,%xmm0
punpcklwd %xmm4,%xmm0
movdqa 0x9ad(%rip),%xmm6
paddd  %xmm6,%xmm0
paddd  %xmm9,%xmm0
psrld  $0x2,%xmm0
movd   (%rsi,%rdx,1),%xmm6
punpcklbw %xmm4,%xmm6
punpcklwd %xmm4,%xmm6
psubd  %xmm6,%xmm0
movdqa %xmm0,%xmm6
psrad  $0x1f,%xmm6
paddd  %xmm6,%xmm0
pxor   %xmm6,%xmm0
movd   %eax,%xmm6
paddd  %xmm6,%xmm0
psrld  $0x18,%xmm5
movdqa -0x18(%rsp),%xmm6
pslld  $0x8,%xmm6
por    %xmm5,%xmm6
movss  0xd(%r11,%rdx,1),%xmm5
movaps %xmm5,%xmm9
andps  %xmm14,%xmm9
orps   %xmm11,%xmm9
punpcklbw %xmm4,%xmm6
punpcklwd %xmm4,%xmm6
movdqa -0x38(%rsp),%xmm14
punpcklbw %xmm4,%xmm14
punpcklwd %xmm4,%xmm14
paddd  %xmm6,%xmm14
psrld  $0x18,%xmm3
pslld  $0x8,%xmm7
por    %xmm3,%xmm7
punpcklbw %xmm4,%xmm7
punpcklwd %xmm4,%xmm7
punpcklbw %xmm4,%xmm2
punpcklwd %xmm4,%xmm2
paddd  %xmm7,%xmm2
paddd  %xmm14,%xmm2
movdqa 0x901(%rip),%xmm6
paddd  %xmm6,%xmm2
psrld  $0x2,%xmm2
movd   0x4(%rsi,%rdx,1),%xmm3
punpcklbw %xmm4,%xmm3
punpcklwd %xmm4,%xmm3
psubd  %xmm3,%xmm2
movdqa %xmm2,%xmm3
psrad  $0x1f,%xmm3
paddd  %xmm3,%xmm2
pxor   %xmm3,%xmm2
movdqa -0x28(%rsp),%xmm3
psrld  $0x18,%xmm3
pslld  $0x8,%xmm10
por    %xmm3,%xmm10
punpcklbw %xmm4,%xmm10
punpcklwd %xmm4,%xmm10
punpcklbw %xmm4,%xmm15
punpcklwd %xmm4,%xmm15
paddd  %xmm10,%xmm15
psrld  $0x18,%xmm13
pslld  $0x8,%xmm12
por    %xmm13,%xmm12
punpcklbw %xmm4,%xmm12
punpcklwd %xmm4,%xmm12
punpcklbw %xmm4,%xmm11
punpcklwd %xmm4,%xmm11
paddd  %xmm12,%xmm11
paddd  %xmm15,%xmm11
paddd  %xmm6,%xmm11
psrld  $0x2,%xmm11
movd   0x8(%rsi,%rdx,1),%xmm3
punpcklbw %xmm4,%xmm3
punpcklwd %xmm4,%xmm3
psubd  %xmm3,%xmm11
movdqa %xmm11,%xmm3
psrad  $0x1f,%xmm3
paddd  %xmm3,%xmm11
pxor   %xmm3,%xmm11
paddd  %xmm2,%xmm11
paddd  %xmm0,%xmm11
psrld  $0x18,%xmm8
movaps %xmm1,%xmm0
pslld  $0x8,%xmm0
por    %xmm8,%xmm0
punpcklbw %xmm4,%xmm0
punpcklwd %xmm4,%xmm0
punpcklbw %xmm4,%xmm1
punpcklwd %xmm4,%xmm1
paddd  %xmm0,%xmm1
psrld  $0x18,%xmm9
movaps %xmm5,%xmm0
pslld  $0x8,%xmm0
por    %xmm9,%xmm0
punpcklbw %xmm4,%xmm0
punpcklwd %xmm4,%xmm0
punpcklbw %xmm4,%xmm5
punpcklwd %xmm4,%xmm5
paddd  %xmm0,%xmm5
paddd  %xmm1,%xmm5
paddd  %xmm6,%xmm5
psrld  $0x2,%xmm5
movd   0xc(%rsi,%rdx,1),%xmm0
punpcklbw %xmm4,%xmm0
punpcklwd %xmm4,%xmm0
psubd  %xmm0,%xmm5
movdqa %xmm5,%xmm0
psrad  $0x1f,%xmm0
paddd  %xmm0,%xmm5
pxor   %xmm0,%xmm5
paddd  %xmm11,%xmm5
pshufd $0xee,%xmm5,%xmm0
paddd  %xmm5,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%eax
add    %r10,%rdx
mov    %r8d,%ecx
add    $0xffffffff,%r9d
jne    1540 <dist1+0x440>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @dist1(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
store i32 0, i32* %22
%23 = load i32, i32* %11
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %80
25: ; preds = %7
%26 = load i32, i32* %12
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %25
br label %81
29: ; preds = %25
store i32 0, i32* %20
%30 = load i8*, i8** %8
store i8* %30, i8** %15
%31 = load i8*, i8** %9
store i8* %31, i8** %17
store i32 0, i32* %19
br label %32
32: ; preds = %68, %29
%33 = load i32, i32* %19
%34 = load i32, i32* %13
%35 = icmp sge i32 %33, %34
%36 = xor i1 %35, true
br i1 %36, label %37, label %79
37: ; preds = %32
store i32 0, i32* %18
br label %38
38: ; preds = %63, %37
%39 = load i32, i32* %18
%40 = icmp slt i32 %39, 16
br i1 %40, label %41, label %68
41: ; preds = %38
%42 = load i8*, i8** %15
%43 = load i32, i32* %18
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8, i8* %42, i64 %44
%46 = load i8, i8* %45
%47 = zext i8 %46 to i32
%48 = load i8*, i8** %17
%49 = load i32, i32* %18
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8, i8* %48, i64 %50
%52 = load i8, i8* %51
%53 = zext i8 %52 to i32
%54 = sub nsw i32 %47, %53
store i32 %54, i32* %21
%55 = load i32, i32* %20
%56 = load i32, i32* %21
%57 = icmp sge i32 %56, 0
br i1 %57, label %58, label %60
58: ; preds = %41
%59 = load i32, i32* %21
br label %63
60: ; preds = %41
%61 = load i32, i32* %21
%62 = sub nsw i32 0, %61
br label %63
63: ; preds = %60, %58
%64 = phi i32 [ %59, %58 ], [ %62, %60 ]
%65 = add nsw i32 %55, %64
store i32 %65, i32* %20
%66 = load i32, i32* %18
%67 = add nsw i32 %66, 1
store i32 %67, i32* %18
br label %38
68: ; preds = %38
%69 = load i8*, i8** %15
%70 = load i32, i32* %10
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i8, i8* %69, i64 %71
store i8* %72, i8** %15
%73 = load i8*, i8** %17
%74 = load i32, i32* %10
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i8, i8* %73, i64 %75
store i8* %76, i8** %17
%77 = load i32, i32* %19
%78 = add nsw i32 %77, 1
store i32 %78, i32* %19
br label %32
79: ; preds = %32
br label %306
80: ; preds = %7
br label %81
81: ; preds = %80, %28
%82 = load i32, i32* %11
%83 = icmp eq i32 %82, 0
br i1 %83, label %149, label %84
84: ; preds = %81
%85 = load i32, i32* %12
%86 = icmp ne i32 %85, 0
br i1 %86, label %87, label %88
87: ; preds = %84
br label %150
88: ; preds = %84
store i32 0, i32* %20
%89 = load i8*, i8** %8
store i8* %89, i8** %15
%90 = load i8*, i8** %9
store i8* %90, i8** %17
store i32 0, i32* %19
br label %91
91: ; preds = %137, %88
%92 = load i32, i32* %19
%93 = load i32, i32* %13
%94 = icmp sge i32 %92, %93
%95 = xor i1 %94, true
br i1 %95, label %96, label %148
96: ; preds = %91
store i32 0, i32* %18
br label %97
97: ; preds = %134, %96
%98 = load i32, i32* %18
%99 = icmp slt i32 %98, 16
br i1 %99, label %100, label %137
100: ; preds = %97
%101 = load i8*, i8** %15
%102 = load i32, i32* %18
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds i8, i8* %101, i64 %103
%105 = load i8, i8* %104
%106 = zext i8 %105 to i32
%107 = load i8*, i8** %15
%108 = load i32, i32* %18
%109 = add nsw i32 %108, 1
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds i8, i8* %107, i64 %110
%112 = load i8, i8* %111
%113 = zext i8 %112 to i32
%114 = add nsw i32 %106, %113
%115 = add nsw i32 %114, 1
%116 = lshr i32 %115, 1
%117 = load i8*, i8** %17
%118 = load i32, i32* %18
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds i8, i8* %117, i64 %119
%121 = load i8, i8* %120
%122 = zext i8 %121 to i32
%123 = sub i32 %116, %122
store i32 %123, i32* %21
%124 = load i32, i32* %21
%125 = icmp sge i32 %124, 0
br i1 %125, label %126, label %130
126: ; preds = %100
%127 = load i32, i32* %20
%128 = load i32, i32* %21
%129 = add nsw i32 %127, %128
store i32 %129, i32* %20
br label %134
130: ; preds = %100
%131 = load i32, i32* %20
%132 = load i32, i32* %21
%133 = sub nsw i32 %131, %132
store i32 %133, i32* %20
br label %134
134: ; preds = %130, %126
%135 = load i32, i32* %18
%136 = add nsw i32 %135, 1
store i32 %136, i32* %18
br label %97
137: ; preds = %97
%138 = load i8*, i8** %15
%139 = load i32, i32* %10
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds i8, i8* %138, i64 %140
store i8* %141, i8** %15
%142 = load i8*, i8** %17
%143 = load i32, i32* %10
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds i8, i8* %142, i64 %144
store i8* %145, i8** %17
%146 = load i32, i32* %19
%147 = add nsw i32 %146, 1
store i32 %147, i32* %19
br label %91
148: ; preds = %91
br label %305
149: ; preds = %81
br label %150
150: ; preds = %149, %87
%151 = load i32, i32* %11
%152 = icmp eq i32 %151, 0
br i1 %152, label %153, label %222
153: ; preds = %150
%154 = load i32, i32* %12
%155 = icmp eq i32 %154, 0
br i1 %155, label %156, label %157
156: ; preds = %153
br label %223
157: ; preds = %153
store i32 0, i32* %20
%158 = load i8*, i8** %8
store i8* %158, i8** %15
%159 = load i8*, i8** %9
store i8* %159, i8** %17
%160 = load i8*, i8** %15
%161 = load i32, i32* %10
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds i8, i8* %160, i64 %162
store i8* %163, i8** %16
store i32 0, i32* %19
br label %164
164: ; preds = %209, %157
%165 = load i32, i32* %19
%166 = load i32, i32* %13
%167 = icmp sge i32 %165, %166
%168 = xor i1 %167, true
br i1 %168, label %169, label %221
169: ; preds = %164
store i32 0, i32* %18
br label %170
170: ; preds = %206, %169
%171 = load i32, i32* %18
%172 = icmp slt i32 %171, 16
br i1 %172, label %173, label %209
173: ; preds = %170
%174 = load i8*, i8** %15
%175 = load i32, i32* %18
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds i8, i8* %174, i64 %176
%178 = load i8, i8* %177
%179 = zext i8 %178 to i32
%180 = load i8*, i8** %16
%181 = load i32, i32* %18
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds i8, i8* %180, i64 %182
%184 = load i8, i8* %183
%185 = zext i8 %184 to i32
%186 = add nsw i32 %179, %185
%187 = add nsw i32 %186, 1
%188 = lshr i32 %187, 1
%189 = load i8*, i8** %17
%190 = load i32, i32* %18
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds i8, i8* %189, i64 %191
%193 = load i8, i8* %192
%194 = zext i8 %193 to i32
%195 = sub i32 %188, %194
store i32 %195, i32* %21
%196 = load i32, i32* %21
%197 = icmp sge i32 %196, 0
br i1 %197, label %198, label %202
198: ; preds = %173
%199 = load i32, i32* %20
%200 = load i32, i32* %21
%201 = add nsw i32 %199, %200
store i32 %201, i32* %20
br label %206
202: ; preds = %173
%203 = load i32, i32* %20
%204 = load i32, i32* %21
%205 = sub nsw i32 %203, %204
store i32 %205, i32* %20
br label %206
206: ; preds = %202, %198
%207 = load i32, i32* %18
%208 = add nsw i32 %207, 1
store i32 %208, i32* %18
br label %170
209: ; preds = %170
%210 = load i8*, i8** %16
store i8* %210, i8** %15
%211 = load i8*, i8** %16
%212 = load i32, i32* %10
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds i8, i8* %211, i64 %213
store i8* %214, i8** %16
%215 = load i8*, i8** %17
%216 = load i32, i32* %10
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds i8, i8* %215, i64 %217
store i8* %218, i8** %17
%219 = load i32, i32* %19
%220 = add nsw i32 %219, 1
store i32 %220, i32* %19
br label %164
221: ; preds = %164
br label %304
222: ; preds = %150
br label %223
223: ; preds = %222, %156
store i32 0, i32* %20
%224 = load i8*, i8** %8
store i8* %224, i8** %15
%225 = load i8*, i8** %9
store i8* %225, i8** %17
%226 = load i8*, i8** %15
%227 = load i32, i32* %10
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds i8, i8* %226, i64 %228
store i8* %229, i8** %16
store i32 0, i32* %19
br label %230
230: ; preds = %291, %223
%231 = load i32, i32* %19
%232 = load i32, i32* %13
%233 = icmp sge i32 %231, %232
%234 = xor i1 %233, true
br i1 %234, label %235, label %303
235: ; preds = %230
store i32 0, i32* %18
br label %236
236: ; preds = %288, %235
%237 = load i32, i32* %18
%238 = icmp slt i32 %237, 16
br i1 %238, label %239, label %291
239: ; preds = %236
%240 = load i8*, i8** %15
%241 = load i32, i32* %18
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds i8, i8* %240, i64 %242
%244 = load i8, i8* %243
%245 = zext i8 %244 to i32
%246 = load i8*, i8** %15
%247 = load i32, i32* %18
%248 = add nsw i32 %247, 1
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds i8, i8* %246, i64 %249
%251 = load i8, i8* %250
%252 = zext i8 %251 to i32
%253 = add nsw i32 %245, %252
%254 = load i8*, i8** %16
%255 = load i32, i32* %18
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds i8, i8* %254, i64 %256
%258 = load i8, i8* %257
%259 = zext i8 %258 to i32
%260 = add nsw i32 %253, %259
%261 = load i8*, i8** %16
%262 = load i32, i32* %18
%263 = add nsw i32 %262, 1
%264 = sext i32 %263 to i64
%265 = getelementptr inbounds i8, i8* %261, i64 %264
%266 = load i8, i8* %265
%267 = zext i8 %266 to i32
%268 = add nsw i32 %260, %267
%269 = add nsw i32 %268, 2
%270 = lshr i32 %269, 2
%271 = load i8*, i8** %17
%272 = load i32, i32* %18
%273 = sext i32 %272 to i64
%274 = getelementptr inbounds i8, i8* %271, i64 %273
%275 = load i8, i8* %274
%276 = zext i8 %275 to i32
%277 = sub i32 %270, %276
store i32 %277, i32* %21
%278 = load i32, i32* %21
%279 = icmp sge i32 %278, 0
br i1 %279, label %280, label %284
280: ; preds = %239
%281 = load i32, i32* %20
%282 = load i32, i32* %21
%283 = add nsw i32 %281, %282
store i32 %283, i32* %20
br label %288
284: ; preds = %239
%285 = load i32, i32* %20
%286 = load i32, i32* %21
%287 = sub nsw i32 %285, %286
store i32 %287, i32* %20
br label %288
288: ; preds = %284, %280
%289 = load i32, i32* %18
%290 = add nsw i32 %289, 1
store i32 %290, i32* %18
br label %236
291: ; preds = %236
%292 = load i8*, i8** %16
store i8* %292, i8** %15
%293 = load i8*, i8** %16
%294 = load i32, i32* %10
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds i8, i8* %293, i64 %295
store i8* %296, i8** %16
%297 = load i8*, i8** %17
%298 = load i32, i32* %10
%299 = sext i32 %298 to i64
%300 = getelementptr inbounds i8, i8* %297, i64 %299
store i8* %300, i8** %17
%301 = load i32, i32* %19
%302 = add nsw i32 %301, 1
store i32 %302, i32* %19
br label %230
303: ; preds = %230
br label %304
304: ; preds = %303, %221
br label %305
305: ; preds = %304, %148
br label %306
306: ; preds = %305, %79
%307 = load i32, i32* %20
ret i32 %307
}

LLVM IR (-O2):
define i32 @dist1(i8* nocapture %0, i8* nocapture %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = icmp ne i32 %3, 0
%9 = or i32 %4, %3
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %34
11: ; preds = %7
%12 = icmp sgt i32 %5, 0
br i1 %12, label %13, label %317
13: ; preds = %11
%14 = sext i32 %2 to i64
br label %15
15: ; preds = %13, %15
%16 = phi i8* [ %0, %13 ], [ %30, %15 ]
%17 = phi i32 [ 0, %13 ], [ %29, %15 ]
%18 = phi i32 [ 0, %13 ], [ %32, %15 ]
%19 = phi i8* [ %1, %13 ], [ %31, %15 ]
%20 = bitcast i8* %16 to <16 x i8>*
%21 = load <16 x i8>, <16 x i8>* %20
%22 = zext <16 x i8> %21 to <16 x i32>
%23 = bitcast i8* %19 to <16 x i8>*
%24 = load <16 x i8>, <16 x i8>* %23
%25 = zext <16 x i8> %24 to <16 x i32>
%26 = sub nsw <16 x i32> %22, %25
%27 = call <16 x i32> @llvm.abs.v16i32(<16 x i32> %26, i1 true)
%28 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %27)
%29 = add nsw i32 %28, %17
%30 = getelementptr inbounds i8, i8* %16, i64 %14
%31 = getelementptr inbounds i8, i8* %19, i64 %14
%32 = add nuw nsw i32 %18, 1
%33 = icmp eq i32 %32, %5
br i1 %33, label %317, label %15
34: ; preds = %7
%35 = icmp ne i32 %4, 0
%36 = icmp eq i32 %3, 0
%37 = or i1 %36, %35
br i1 %37, label %118, label %38
38: ; preds = %34
%39 = icmp sgt i32 %5, 0
br i1 %39, label %40, label %317
40: ; preds = %38
%41 = sext i32 %2 to i64
br label %42
42: ; preds = %42, %40
%43 = phi i8* [ %0, %40 ], [ %114, %42 ]
%44 = phi i32 [ 0, %40 ], [ %113, %42 ]
%45 = phi i32 [ 0, %40 ], [ %116, %42 ]
%46 = phi i8* [ %1, %40 ], [ %115, %42 ]
%47 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %44, i64 0
%48 = load i8, i8* %43
%49 = insertelement <4 x i8> poison, i8 %48, i64 3
%50 = getelementptr inbounds i8, i8* %43, i64 1
%51 = bitcast i8* %50 to <4 x i8>*
%52 = load <4 x i8>, <4 x i8>* %51
%53 = shufflevector <4 x i8> %49, <4 x i8> %52, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%54 = zext <4 x i8> %53 to <4 x i32>
%55 = zext <4 x i8> %52 to <4 x i32>
%56 = add nuw nsw <4 x i32> %54, <i32 1, i32 1, i32 1, i32 1>
%57 = add nuw nsw <4 x i32> %56, %55
%58 = lshr <4 x i32> %57, <i32 1, i32 1, i32 1, i32 1>
%59 = bitcast i8* %46 to <4 x i8>*
%60 = load <4 x i8>, <4 x i8>* %59
%61 = zext <4 x i8> %60 to <4 x i32>
%62 = sub nsw <4 x i32> %58, %61
%63 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %62, i1 true)
%64 = add <4 x i32> %63, %47
%65 = getelementptr inbounds i8, i8* %43, i64 5
%66 = bitcast i8* %65 to <4 x i8>*
%67 = load <4 x i8>, <4 x i8>* %66
%68 = shufflevector <4 x i8> %52, <4 x i8> %67, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%69 = zext <4 x i8> %68 to <4 x i32>
%70 = zext <4 x i8> %67 to <4 x i32>
%71 = add nuw nsw <4 x i32> %69, <i32 1, i32 1, i32 1, i32 1>
%72 = add nuw nsw <4 x i32> %71, %70
%73 = lshr <4 x i32> %72, <i32 1, i32 1, i32 1, i32 1>
%74 = getelementptr inbounds i8, i8* %46, i64 4
%75 = bitcast i8* %74 to <4 x i8>*
%76 = load <4 x i8>, <4 x i8>* %75
%77 = zext <4 x i8> %76 to <4 x i32>
%78 = sub nsw <4 x i32> %73, %77
%79 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %78, i1 true)
%80 = add <4 x i32> %79, %64
%81 = getelementptr inbounds i8, i8* %43, i64 9
%82 = bitcast i8* %81 to <4 x i8>*
%83 = load <4 x i8>, <4 x i8>* %82
%84 = shufflevector <4 x i8> %67, <4 x i8> %83, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%85 = zext <4 x i8> %84 to <4 x i32>
%86 = zext <4 x i8> %83 to <4 x i32>
%87 = add nuw nsw <4 x i32> %85, <i32 1, i32 1, i32 1, i32 1>
%88 = add nuw nsw <4 x i32> %87, %86
%89 = lshr <4 x i32> %88, <i32 1, i32 1, i32 1, i32 1>
%90 = getelementptr inbounds i8, i8* %46, i64 8
%91 = bitcast i8* %90 to <4 x i8>*
%92 = load <4 x i8>, <4 x i8>* %91
%93 = zext <4 x i8> %92 to <4 x i32>
%94 = sub nsw <4 x i32> %89, %93
%95 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %94, i1 true)
%96 = add <4 x i32> %95, %80
%97 = getelementptr inbounds i8, i8* %43, i64 13
%98 = bitcast i8* %97 to <4 x i8>*
%99 = load <4 x i8>, <4 x i8>* %98
%100 = shufflevector <4 x i8> %83, <4 x i8> %99, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%101 = zext <4 x i8> %100 to <4 x i32>
%102 = zext <4 x i8> %99 to <4 x i32>
%103 = add nuw nsw <4 x i32> %101, <i32 1, i32 1, i32 1, i32 1>
%104 = add nuw nsw <4 x i32> %103, %102
%105 = lshr <4 x i32> %104, <i32 1, i32 1, i32 1, i32 1>
%106 = getelementptr inbounds i8, i8* %46, i64 12
%107 = bitcast i8* %106 to <4 x i8>*
%108 = load <4 x i8>, <4 x i8>* %107
%109 = zext <4 x i8> %108 to <4 x i32>
%110 = sub nsw <4 x i32> %105, %109
%111 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %110, i1 true)
%112 = add <4 x i32> %111, %96
%113 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %112)
%114 = getelementptr inbounds i8, i8* %43, i64 %41
%115 = getelementptr inbounds i8, i8* %46, i64 %41
%116 = add nuw nsw i32 %45, 1
%117 = icmp eq i32 %116, %5
br i1 %117, label %317, label %42
118: ; preds = %34
%119 = icmp eq i32 %4, 0
%120 = or i1 %8, %119
%121 = sext i32 %2 to i64
%122 = icmp sgt i32 %5, 0
br i1 %120, label %204, label %123
123: ; preds = %118
br i1 %122, label %124, label %317
124: ; preds = %123, %124
%125 = phi i8* [ %129, %124 ], [ %0, %123 ]
%126 = phi i32 [ %200, %124 ], [ 0, %123 ]
%127 = phi i32 [ %202, %124 ], [ 0, %123 ]
%128 = phi i8* [ %201, %124 ], [ %1, %123 ]
%129 = getelementptr inbounds i8, i8* %125, i64 %121
%130 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %126, i64 0
%131 = bitcast i8* %125 to <4 x i8>*
%132 = load <4 x i8>, <4 x i8>* %131
%133 = zext <4 x i8> %132 to <4 x i32>
%134 = bitcast i8* %129 to <4 x i8>*
%135 = load <4 x i8>, <4 x i8>* %134
%136 = zext <4 x i8> %135 to <4 x i32>
%137 = add nuw nsw <4 x i32> %133, <i32 1, i32 1, i32 1, i32 1>
%138 = add nuw nsw <4 x i32> %137, %136
%139 = lshr <4 x i32> %138, <i32 1, i32 1, i32 1, i32 1>
%140 = bitcast i8* %128 to <4 x i8>*
%141 = load <4 x i8>, <4 x i8>* %140
%142 = zext <4 x i8> %141 to <4 x i32>
%143 = sub nsw <4 x i32> %139, %142
%144 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %143, i1 true)
%145 = add <4 x i32> %144, %130
%146 = getelementptr inbounds i8, i8* %125, i64 4
%147 = bitcast i8* %146 to <4 x i8>*
%148 = load <4 x i8>, <4 x i8>* %147
%149 = zext <4 x i8> %148 to <4 x i32>
%150 = getelementptr inbounds i8, i8* %129, i64 4
%151 = bitcast i8* %150 to <4 x i8>*
%152 = load <4 x i8>, <4 x i8>* %151
%153 = zext <4 x i8> %152 to <4 x i32>
%154 = add nuw nsw <4 x i32> %149, <i32 1, i32 1, i32 1, i32 1>
%155 = add nuw nsw <4 x i32> %154, %153
%156 = lshr <4 x i32> %155, <i32 1, i32 1, i32 1, i32 1>
%157 = getelementptr inbounds i8, i8* %128, i64 4
%158 = bitcast i8* %157 to <4 x i8>*
%159 = load <4 x i8>, <4 x i8>* %158
%160 = zext <4 x i8> %159 to <4 x i32>
%161 = sub nsw <4 x i32> %156, %160
%162 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %161, i1 true)
%163 = add <4 x i32> %162, %145
%164 = getelementptr inbounds i8, i8* %125, i64 8
%165 = bitcast i8* %164 to <4 x i8>*
%166 = load <4 x i8>, <4 x i8>* %165
%167 = zext <4 x i8> %166 to <4 x i32>
%168 = getelementptr inbounds i8, i8* %129, i64 8
%169 = bitcast i8* %168 to <4 x i8>*
%170 = load <4 x i8>, <4 x i8>* %169
%171 = zext <4 x i8> %170 to <4 x i32>
%172 = add nuw nsw <4 x i32> %167, <i32 1, i32 1, i32 1, i32 1>
%173 = add nuw nsw <4 x i32> %172, %171
%174 = lshr <4 x i32> %173, <i32 1, i32 1, i32 1, i32 1>
%175 = getelementptr inbounds i8, i8* %128, i64 8
%176 = bitcast i8* %175 to <4 x i8>*
%177 = load <4 x i8>, <4 x i8>* %176
%178 = zext <4 x i8> %177 to <4 x i32>
%179 = sub nsw <4 x i32> %174, %178
%180 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %179, i1 true)
%181 = add <4 x i32> %180, %163
%182 = getelementptr inbounds i8, i8* %125, i64 12
%183 = bitcast i8* %182 to <4 x i8>*
%184 = load <4 x i8>, <4 x i8>* %183
%185 = zext <4 x i8> %184 to <4 x i32>
%186 = getelementptr inbounds i8, i8* %129, i64 12
%187 = bitcast i8* %186 to <4 x i8>*
%188 = load <4 x i8>, <4 x i8>* %187
%189 = zext <4 x i8> %188 to <4 x i32>
%190 = add nuw nsw <4 x i32> %185, <i32 1, i32 1, i32 1, i32 1>
%191 = add nuw nsw <4 x i32> %190, %189
%192 = lshr <4 x i32> %191, <i32 1, i32 1, i32 1, i32 1>
%193 = getelementptr inbounds i8, i8* %128, i64 12
%194 = bitcast i8* %193 to <4 x i8>*
%195 = load <4 x i8>, <4 x i8>* %194
%196 = zext <4 x i8> %195 to <4 x i32>
%197 = sub nsw <4 x i32> %192, %196
%198 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %197, i1 true)
%199 = add <4 x i32> %198, %181
%200 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %199)
%201 = getelementptr inbounds i8, i8* %128, i64 %121
%202 = add nuw nsw i32 %127, 1
%203 = icmp eq i32 %202, %5
br i1 %203, label %317, label %124
204: ; preds = %118
br i1 %122, label %205, label %317
205: ; preds = %204
%206 = load i8, i8* %0
br label %207
207: ; preds = %205, %207
%208 = phi i8 [ %214, %207 ], [ %206, %205 ]
%209 = phi i8* [ %213, %207 ], [ %0, %205 ]
%210 = phi i32 [ %313, %207 ], [ 0, %205 ]
%211 = phi i32 [ %315, %207 ], [ 0, %205 ]
%212 = phi i8* [ %314, %207 ], [ %1, %205 ]
%213 = getelementptr inbounds i8, i8* %209, i64 %121
%214 = load i8, i8* %213
%215 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %210, i64 0
%216 = insertelement <4 x i8> poison, i8 %208, i64 3
%217 = insertelement <4 x i8> poison, i8 %214, i64 3
%218 = getelementptr inbounds i8, i8* %209, i64 1
%219 = bitcast i8* %218 to <4 x i8>*
%220 = load <4 x i8>, <4 x i8>* %219
%221 = shufflevector <4 x i8> %216, <4 x i8> %220, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%222 = zext <4 x i8> %221 to <4 x i32>
%223 = zext <4 x i8> %220 to <4 x i32>
%224 = getelementptr inbounds i8, i8* %213, i64 1
%225 = bitcast i8* %224 to <4 x i8>*
%226 = load <4 x i8>, <4 x i8>* %225
%227 = shufflevector <4 x i8> %217, <4 x i8> %226, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%228 = zext <4 x i8> %227 to <4 x i32>
%229 = zext <4 x i8> %226 to <4 x i32>
%230 = add nuw nsw <4 x i32> %222, <i32 2, i32 2, i32 2, i32 2>
%231 = add nuw nsw <4 x i32> %230, %223
%232 = add nuw nsw <4 x i32> %231, %228
%233 = add nuw nsw <4 x i32> %232, %229
%234 = lshr <4 x i32> %233, <i32 2, i32 2, i32 2, i32 2>
%235 = bitcast i8* %212 to <4 x i8>*
%236 = load <4 x i8>, <4 x i8>* %235
%237 = zext <4 x i8> %236 to <4 x i32>
%238 = sub nsw <4 x i32> %234, %237
%239 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %238, i1 true)
%240 = add <4 x i32> %239, %215
%241 = getelementptr inbounds i8, i8* %209, i64 5
%242 = bitcast i8* %241 to <4 x i8>*
%243 = load <4 x i8>, <4 x i8>* %242
%244 = shufflevector <4 x i8> %220, <4 x i8> %243, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%245 = zext <4 x i8> %244 to <4 x i32>
%246 = zext <4 x i8> %243 to <4 x i32>
%247 = getelementptr inbounds i8, i8* %213, i64 5
%248 = bitcast i8* %247 to <4 x i8>*
%249 = load <4 x i8>, <4 x i8>* %248
%250 = shufflevector <4 x i8> %226, <4 x i8> %249, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%251 = zext <4 x i8> %250 to <4 x i32>
%252 = zext <4 x i8> %249 to <4 x i32>
%253 = add nuw nsw <4 x i32> %245, <i32 2, i32 2, i32 2, i32 2>
%254 = add nuw nsw <4 x i32> %253, %246
%255 = add nuw nsw <4 x i32> %254, %251
%256 = add nuw nsw <4 x i32> %255, %252
%257 = lshr <4 x i32> %256, <i32 2, i32 2, i32 2, i32 2>
%258 = getelementptr inbounds i8, i8* %212, i64 4
%259 = bitcast i8* %258 to <4 x i8>*
%260 = load <4 x i8>, <4 x i8>* %259
%261 = zext <4 x i8> %260 to <4 x i32>
%262 = sub nsw <4 x i32> %257, %261
%263 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %262, i1 true)
%264 = add <4 x i32> %263, %240
%265 = getelementptr inbounds i8, i8* %209, i64 9
%266 = bitcast i8* %265 to <4 x i8>*
%267 = load <4 x i8>, <4 x i8>* %266
%268 = shufflevector <4 x i8> %243, <4 x i8> %267, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%269 = zext <4 x i8> %268 to <4 x i32>
%270 = zext <4 x i8> %267 to <4 x i32>
%271 = getelementptr inbounds i8, i8* %213, i64 9
%272 = bitcast i8* %271 to <4 x i8>*
%273 = load <4 x i8>, <4 x i8>* %272
%274 = shufflevector <4 x i8> %249, <4 x i8> %273, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%275 = zext <4 x i8> %274 to <4 x i32>
%276 = zext <4 x i8> %273 to <4 x i32>
%277 = add nuw nsw <4 x i32> %269, <i32 2, i32 2, i32 2, i32 2>
%278 = add nuw nsw <4 x i32> %277, %270
%279 = add nuw nsw <4 x i32> %278, %275
%280 = add nuw nsw <4 x i32> %279, %276
%281 = lshr <4 x i32> %280, <i32 2, i32 2, i32 2, i32 2>
%282 = getelementptr inbounds i8, i8* %212, i64 8
%283 = bitcast i8* %282 to <4 x i8>*
%284 = load <4 x i8>, <4 x i8>* %283
%285 = zext <4 x i8> %284 to <4 x i32>
%286 = sub nsw <4 x i32> %281, %285
%287 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %286, i1 true)
%288 = add <4 x i32> %287, %264
%289 = getelementptr inbounds i8, i8* %209, i64 13
%290 = bitcast i8* %289 to <4 x i8>*
%291 = load <4 x i8>, <4 x i8>* %290
%292 = shufflevector <4 x i8> %267, <4 x i8> %291, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%293 = zext <4 x i8> %292 to <4 x i32>
%294 = zext <4 x i8> %291 to <4 x i32>
%295 = getelementptr inbounds i8, i8* %213, i64 13
%296 = bitcast i8* %295 to <4 x i8>*
%297 = load <4 x i8>, <4 x i8>* %296
%298 = shufflevector <4 x i8> %273, <4 x i8> %297, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%299 = zext <4 x i8> %298 to <4 x i32>
%300 = zext <4 x i8> %297 to <4 x i32>
%301 = add nuw nsw <4 x i32> %293, <i32 2, i32 2, i32 2, i32 2>
%302 = add nuw nsw <4 x i32> %301, %294
%303 = add nuw nsw <4 x i32> %302, %299
%304 = add nuw nsw <4 x i32> %303, %300
%305 = lshr <4 x i32> %304, <i32 2, i32 2, i32 2, i32 2>
%306 = getelementptr inbounds i8, i8* %212, i64 12
%307 = bitcast i8* %306 to <4 x i8>*
%308 = load <4 x i8>, <4 x i8>* %307
%309 = zext <4 x i8> %308 to <4 x i32>
%310 = sub nsw <4 x i32> %305, %309
%311 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %310, i1 true)
%312 = add <4 x i32> %311, %288
%313 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %312)
%314 = getelementptr inbounds i8, i8* %212, i64 %121
%315 = add nuw nsw i32 %211, 1
%316 = icmp eq i32 %315, %5
br i1 %316, label %317, label %207
317: ; preds = %42, %124, %207, %15, %38, %123, %204, %11
%318 = phi i32 [ 0, %11 ], [ 0, %204 ], [ 0, %123 ], [ 0, %38 ], [ %29, %15 ], [ %313, %207 ], [ %200, %124 ], [ %113, %42 ]
ret i32 %318
}