void clamprow(short *iptr, short *optr, int n) {
  while (n >= 8) {
    *(optr + 0) = ((*(iptr + 0) < 0)     ? 0
                   : (*(iptr + 0) > 255) ? 255
                                         : *(iptr + 0));
    *(optr + 1) = ((*(iptr + 1) < 0)     ? 0
                   : (*(iptr + 1) > 255) ? 255
                                         : *(iptr + 1));
    *(optr + 2) = ((*(iptr + 2) < 0)     ? 0
                   : (*(iptr + 2) > 255) ? 255
                                         : *(iptr + 2));
    *(optr + 3) = ((*(iptr + 3) < 0)     ? 0
                   : (*(iptr + 3) > 255) ? 255
                                         : *(iptr + 3));
    *(optr + 4) = ((*(iptr + 4) < 0)     ? 0
                   : (*(iptr + 4) > 255) ? 255
                                         : *(iptr + 4));
    *(optr + 5) = ((*(iptr + 5) < 0)     ? 0
                   : (*(iptr + 5) > 255) ? 255
                                         : *(iptr + 5));
    *(optr + 6) = ((*(iptr + 6) < 0)     ? 0
                   : (*(iptr + 6) > 255) ? 255
                                         : *(iptr + 6));
    *(optr + 7) = ((*(iptr + 7) < 0)     ? 0
                   : (*(iptr + 7) > 255) ? 255
                                         : *(iptr + 7));
    iptr += 8;
    optr += 8;
    n -= 8;
  }
  while (n--) {
    *(optr) = ((*(iptr) < 0) ? 0 : (*(iptr) > 255) ? 255 : *(iptr));
    iptr++;
    optr++;
  }
}


x86 assembly (clang, -O0):
<clamprow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jl     140b <clamprow+0x30b>
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
cmp    $0x0,%eax
jge    1133 <clamprow+0x33>
xor    %eax,%eax
mov    %eax,-0x18(%rbp)
jmp    1162 <clamprow+0x62>
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
cmp    $0xff,%eax
jle    1152 <clamprow+0x52>
mov    $0xff,%eax
mov    %eax,-0x1c(%rbp)
jmp    115c <clamprow+0x5c>
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
mov    -0x8(%rbp),%rax
movswl 0x2(%rax),%eax
cmp    $0x0,%eax
jge    118a <clamprow+0x8a>
xor    %eax,%eax
mov    %eax,-0x20(%rbp)
jmp    11bb <clamprow+0xbb>
mov    -0x8(%rbp),%rax
movswl 0x2(%rax),%eax
cmp    $0xff,%eax
jle    11aa <clamprow+0xaa>
mov    $0xff,%eax
mov    %eax,-0x24(%rbp)
jmp    11b5 <clamprow+0xb5>
mov    -0x8(%rbp),%rax
movswl 0x2(%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,0x2(%rax)
mov    -0x8(%rbp),%rax
movswl 0x4(%rax),%eax
cmp    $0x0,%eax
jge    11e4 <clamprow+0xe4>
xor    %eax,%eax
mov    %eax,-0x28(%rbp)
jmp    1215 <clamprow+0x115>
mov    -0x8(%rbp),%rax
movswl 0x4(%rax),%eax
cmp    $0xff,%eax
jle    1204 <clamprow+0x104>
mov    $0xff,%eax
mov    %eax,-0x2c(%rbp)
jmp    120f <clamprow+0x10f>
mov    -0x8(%rbp),%rax
movswl 0x4(%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,0x4(%rax)
mov    -0x8(%rbp),%rax
movswl 0x6(%rax),%eax
cmp    $0x0,%eax
jge    123e <clamprow+0x13e>
xor    %eax,%eax
mov    %eax,-0x30(%rbp)
jmp    126f <clamprow+0x16f>
mov    -0x8(%rbp),%rax
movswl 0x6(%rax),%eax
cmp    $0xff,%eax
jle    125e <clamprow+0x15e>
mov    $0xff,%eax
mov    %eax,-0x34(%rbp)
jmp    1269 <clamprow+0x169>
mov    -0x8(%rbp),%rax
movswl 0x6(%rax),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,0x6(%rax)
mov    -0x8(%rbp),%rax
movswl 0x8(%rax),%eax
cmp    $0x0,%eax
jge    1298 <clamprow+0x198>
xor    %eax,%eax
mov    %eax,-0x38(%rbp)
jmp    12c9 <clamprow+0x1c9>
mov    -0x8(%rbp),%rax
movswl 0x8(%rax),%eax
cmp    $0xff,%eax
jle    12b8 <clamprow+0x1b8>
mov    $0xff,%eax
mov    %eax,-0x3c(%rbp)
jmp    12c3 <clamprow+0x1c3>
mov    -0x8(%rbp),%rax
movswl 0x8(%rax),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,0x8(%rax)
mov    -0x8(%rbp),%rax
movswl 0xa(%rax),%eax
cmp    $0x0,%eax
jge    12f2 <clamprow+0x1f2>
xor    %eax,%eax
mov    %eax,-0x40(%rbp)
jmp    1323 <clamprow+0x223>
mov    -0x8(%rbp),%rax
movswl 0xa(%rax),%eax
cmp    $0xff,%eax
jle    1312 <clamprow+0x212>
mov    $0xff,%eax
mov    %eax,-0x44(%rbp)
jmp    131d <clamprow+0x21d>
mov    -0x8(%rbp),%rax
movswl 0xa(%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,0xa(%rax)
mov    -0x8(%rbp),%rax
movswl 0xc(%rax),%eax
cmp    $0x0,%eax
jge    134c <clamprow+0x24c>
xor    %eax,%eax
mov    %eax,-0x48(%rbp)
jmp    137d <clamprow+0x27d>
mov    -0x8(%rbp),%rax
movswl 0xc(%rax),%eax
cmp    $0xff,%eax
jle    136c <clamprow+0x26c>
mov    $0xff,%eax
mov    %eax,-0x4c(%rbp)
jmp    1377 <clamprow+0x277>
mov    -0x8(%rbp),%rax
movswl 0xc(%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,0xc(%rax)
mov    -0x8(%rbp),%rax
movswl 0xe(%rax),%eax
cmp    $0x0,%eax
jge    13a6 <clamprow+0x2a6>
xor    %eax,%eax
mov    %eax,-0x50(%rbp)
jmp    13d7 <clamprow+0x2d7>
mov    -0x8(%rbp),%rax
movswl 0xe(%rax),%eax
cmp    $0xff,%eax
jle    13c6 <clamprow+0x2c6>
mov    $0xff,%eax
mov    %eax,-0x54(%rbp)
jmp    13d1 <clamprow+0x2d1>
mov    -0x8(%rbp),%rax
movswl 0xe(%rax),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,0xe(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x8,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <clamprow+0xf>
jmp    1410 <clamprow+0x310>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     1497 <clamprow+0x397>
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
cmp    $0x0,%eax
jge    143e <clamprow+0x33e>
xor    %eax,%eax
mov    %eax,-0x58(%rbp)
jmp    146d <clamprow+0x36d>
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
cmp    $0xff,%eax
jle    145d <clamprow+0x35d>
mov    $0xff,%eax
mov    %eax,-0x5c(%rbp)
jmp    1467 <clamprow+0x367>
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
jmp    1410 <clamprow+0x310>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamprow>:
push   %rbx
cmp    $0x8,%edx
jl     1236 <clamprow+0x136>
xor    %r8d,%r8d
mov    %edx,%r9d
sub    $0xf,%r9d
cmovb  %r8d,%r9d
add    $0x7,%r9d
cmp    $0x38,%r9d
jb     1153 <clamprow+0x53>
mov    %edx,%eax
sub    $0xf,%eax
cmovb  %r8d,%eax
add    $0x7,%eax
and    $0xfffffff8,%eax
lea    (%rdi,%rax,2),%rcx
add    $0x10,%rcx
cmp    %rsi,%rcx
jbe    13eb <clamprow+0x2eb>
lea    (%rsi,%rax,2),%rax
add    $0x10,%rax
cmp    %rdi,%rax
jbe    13eb <clamprow+0x2eb>
mov    %rsi,%rcx
mov    %rdi,%rax
mov    $0xff,%esi
xchg   %ax,%ax
mov    %edx,%edi
movswl (%rax),%edx
cmp    $0xff,%edx
cmovge %esi,%edx
test   %dx,%dx
cmovs  %r8d,%edx
mov    %dx,(%rcx)
movswl 0x2(%rax),%edx
cmp    $0xff,%edx
cmovge %esi,%edx
test   %dx,%dx
cmovs  %r8d,%edx
mov    %dx,0x2(%rcx)
movswl 0x4(%rax),%edx
cmp    $0xff,%edx
cmovge %esi,%edx
test   %dx,%dx
cmovs  %r8d,%edx
mov    %dx,0x4(%rcx)
movswl 0x6(%rax),%edx
cmp    $0xff,%edx
cmovge %esi,%edx
test   %dx,%dx
cmovs  %r8d,%edx
mov    %dx,0x6(%rcx)
movswl 0x8(%rax),%edx
cmp    $0xff,%edx
cmovge %esi,%edx
test   %dx,%dx
cmovs  %r8d,%edx
mov    %dx,0x8(%rcx)
movswl 0xa(%rax),%edx
cmp    $0xff,%edx
cmovge %esi,%edx
test   %dx,%dx
cmovs  %r8d,%edx
mov    %dx,0xa(%rcx)
movswl 0xc(%rax),%edx
cmp    $0xff,%edx
cmovge %esi,%edx
test   %dx,%dx
cmovs  %r8d,%edx
mov    %dx,0xc(%rcx)
movswl 0xe(%rax),%edx
cmp    $0xff,%edx
cmovge %esi,%edx
test   %dx,%dx
cmovs  %r8d,%edx
mov    %dx,0xe(%rcx)
add    $0x10,%rax
add    $0x10,%rcx
lea    -0x8(%rdi),%edx
cmp    $0xf,%edi
ja     1160 <clamprow+0x60>
jmp    123c <clamprow+0x13c>
mov    %rdi,%rax
mov    %rsi,%rcx
test   %edx,%edx
je     13e9 <clamprow+0x2e9>
lea    -0x1(%rdx),%esi
cmp    $0xf,%esi
jb     1266 <clamprow+0x166>
lea    (%rax,%rsi,2),%rdi
add    $0x2,%rdi
cmp    %rdi,%rcx
jae    127f <clamprow+0x17f>
lea    (%rcx,%rsi,2),%rdi
add    $0x2,%rdi
cmp    %rdi,%rax
jae    127f <clamprow+0x17f>
test   $0x1,%dl
jne    136d <clamprow+0x26d>
mov    %edx,%esi
cmp    $0x1,%edx
jne    1399 <clamprow+0x299>
jmp    13e9 <clamprow+0x2e9>
add    $0x1,%rsi
mov    %rsi,%r8
and    $0xfffffffffffffff0,%r8
lea    -0x10(%r8),%rdi
mov    %rdi,%r9
shr    $0x4,%r9
add    $0x1,%r9
test   %rdi,%rdi
je     1723 <clamprow+0x623>
mov    %r9,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %ebx,%ebx
movdqa 0xd4d(%rip),%xmm0
xorps  %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
movdqu (%rax,%rbx,2),%xmm2
movdqu 0x10(%rax,%rbx,2),%xmm3
pminsw %xmm0,%xmm2
pminsw %xmm0,%xmm3
pmaxsw %xmm1,%xmm2
pmaxsw %xmm1,%xmm3
movdqu %xmm2,(%rcx,%rbx,2)
movdqu %xmm3,0x10(%rcx,%rbx,2)
movdqu 0x20(%rax,%rbx,2),%xmm2
movdqu 0x30(%rax,%rbx,2),%xmm3
pminsw %xmm0,%xmm2
pminsw %xmm0,%xmm3
pmaxsw %xmm1,%xmm2
pmaxsw %xmm1,%xmm3
movdqu %xmm2,0x20(%rcx,%rbx,2)
movdqu %xmm3,0x30(%rcx,%rbx,2)
add    $0x20,%rbx
add    $0xfffffffffffffffe,%rdi
jne    12c0 <clamprow+0x1c0>
test   $0x1,%r9b
je     1350 <clamprow+0x250>
movdqu (%rax,%rbx,2),%xmm0
movdqu 0x10(%rax,%rbx,2),%xmm1
movdqa 0xccf(%rip),%xmm2
pminsw %xmm2,%xmm0
pminsw %xmm2,%xmm1
pxor   %xmm2,%xmm2
pmaxsw %xmm2,%xmm0
pmaxsw %xmm2,%xmm1
movdqu %xmm0,(%rcx,%rbx,2)
movdqu %xmm1,0x10(%rcx,%rbx,2)
cmp    %r8,%rsi
je     13e9 <clamprow+0x2e9>
sub    %r8d,%edx
lea    (%rcx,%r8,2),%rcx
lea    (%rax,%r8,2),%rax
test   $0x1,%dl
je     126f <clamprow+0x16f>
movswl (%rax),%esi
cmp    $0xff,%esi
mov    $0xff,%edi
cmovl  %esi,%edi
xor    %ebx,%ebx
test   %di,%di
cmovns %edi,%ebx
lea    -0x1(%rdx),%esi
mov    %bx,(%rcx)
add    $0x2,%rax
add    $0x2,%rcx
cmp    $0x1,%edx
je     13e9 <clamprow+0x2e9>
mov    %esi,%r8d
xor    %esi,%esi
mov    $0xff,%edi
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movswl (%rax,%rbx,2),%edx
cmp    $0xff,%edx
cmovge %edi,%edx
test   %dx,%dx
cmovs  %esi,%edx
mov    %dx,(%rcx,%rbx,2)
movswl 0x2(%rax,%rbx,2),%edx
cmp    $0xff,%edx
cmovge %edi,%edx
test   %dx,%dx
cmovs  %esi,%edx
mov    %dx,0x2(%rcx,%rbx,2)
add    $0x2,%rbx
cmp    %ebx,%r8d
jne    13b0 <clamprow+0x2b0>
pop    %rbx
ret
shr    $0x3,%r9d
add    $0x1,%r9d
mov    %r9d,%r10d
and    $0xfffffff8,%r10d
lea    0x0(,%r10,8),%eax
sub    %eax,%edx
mov    %r10,%rax
shl    $0x4,%rax
lea    (%rsi,%rax,1),%rcx
add    %rdi,%rax
xor    %r11d,%r11d
mov    %r10,%rbx
nopl   0x0(%rax,%rax,1)
movdqu (%rdi,%r11,1),%xmm3
movdqu 0x10(%rdi,%r11,1),%xmm0
movdqa %xmm0,-0x10(%rsp)
movdqu 0x20(%rdi,%r11,1),%xmm8
movdqu 0x30(%rdi,%r11,1),%xmm13
movdqu 0x50(%rdi,%r11,1),%xmm6
movdqu 0x40(%rdi,%r11,1),%xmm7
movdqu 0x70(%rdi,%r11,1),%xmm1
movdqu 0x60(%rdi,%r11,1),%xmm14
movdqa %xmm14,%xmm2
punpcklwd %xmm1,%xmm2
pshufd $0x0,%xmm2,%xmm4
movdqa %xmm7,%xmm5
punpcklwd %xmm6,%xmm5
pshufd $0x0,%xmm5,%xmm10
punpckhdq %xmm4,%xmm10
movdqa %xmm8,%xmm12
punpcklwd %xmm13,%xmm12
movdqa %xmm3,%xmm4
punpcklwd %xmm0,%xmm4
movdqa %xmm4,%xmm15
punpckldq %xmm12,%xmm15
shufps $0xe4,%xmm10,%xmm15
movdqa %xmm5,%xmm11
punpckldq %xmm2,%xmm11
pshufd $0x55,%xmm12,%xmm9
pshufd $0x55,%xmm4,%xmm10
punpckldq %xmm9,%xmm10
shufps $0xe4,%xmm11,%xmm10
pshufd $0xaa,%xmm2,%xmm9
pshufd $0xaa,%xmm5,%xmm0
punpckhdq %xmm9,%xmm0
pshufd $0xff,%xmm4,%xmm11
punpckhdq %xmm12,%xmm4
shufps $0xe4,%xmm0,%xmm4
punpckhdq %xmm2,%xmm5
pshufd $0xff,%xmm12,%xmm0
punpckldq %xmm0,%xmm11
shufps $0xe4,%xmm5,%xmm11
punpckhwd %xmm1,%xmm14
pshufd $0x0,%xmm14,%xmm0
punpckhwd %xmm6,%xmm7
pshufd $0x0,%xmm7,%xmm1
punpckhdq %xmm0,%xmm1
punpckhwd %xmm13,%xmm8
punpckhwd -0x10(%rsp),%xmm3
movdqa %xmm3,%xmm5
punpckldq %xmm8,%xmm5
shufps $0xe4,%xmm1,%xmm5
movdqa %xmm7,%xmm1
punpckldq %xmm14,%xmm1
pshufd $0x55,%xmm8,%xmm2
pshufd $0x55,%xmm3,%xmm9
punpckldq %xmm2,%xmm9
shufps $0xe4,%xmm1,%xmm9
pshufd $0xaa,%xmm14,%xmm1
pshufd $0xaa,%xmm7,%xmm2
punpckhdq %xmm1,%xmm2
pshufd $0xff,%xmm3,%xmm1
punpckhdq %xmm8,%xmm3
shufps $0xe4,%xmm2,%xmm3
punpckhdq %xmm14,%xmm7
pshufd $0xff,%xmm8,%xmm2
punpckldq %xmm2,%xmm1
shufps $0xe4,%xmm7,%xmm1
movdqa 0xa87(%rip),%xmm0
pminsw %xmm0,%xmm15
pxor   %xmm2,%xmm2
pmaxsw %xmm2,%xmm15
pminsw %xmm0,%xmm10
pmaxsw %xmm2,%xmm10
pminsw %xmm0,%xmm4
pmaxsw %xmm2,%xmm4
pminsw %xmm0,%xmm11
pmaxsw %xmm2,%xmm11
pminsw %xmm0,%xmm5
pmaxsw %xmm2,%xmm5
pminsw %xmm0,%xmm9
pmaxsw %xmm2,%xmm9
pminsw %xmm0,%xmm3
pmaxsw %xmm2,%xmm3
pminsw %xmm0,%xmm1
pmaxsw %xmm2,%xmm1
movdqa %xmm3,%xmm2
punpcklwd %xmm1,%xmm2
movdqa %xmm5,%xmm6
punpcklwd %xmm9,%xmm6
movdqa %xmm6,%xmm13
punpckldq %xmm2,%xmm13
movdqa %xmm4,%xmm0
punpcklwd %xmm11,%xmm0
pshufd $0x55,%xmm0,%xmm8
movdqa %xmm15,%xmm7
punpcklwd %xmm10,%xmm7
pshufd $0x55,%xmm7,%xmm12
punpckldq %xmm8,%xmm12
shufps $0xe4,%xmm13,%xmm12
movdqa %xmm7,%xmm8
punpckldq %xmm0,%xmm8
pshufd $0x0,%xmm2,%xmm14
pshufd $0x0,%xmm6,%xmm13
punpckhdq %xmm14,%xmm13
movsd  %xmm8,%xmm13
pshufd $0xff,%xmm0,%xmm14
pshufd $0xff,%xmm7,%xmm8
punpckldq %xmm14,%xmm8
pshufd $0xaa,%xmm6,%xmm14
punpckhdq %xmm2,%xmm6
shufps $0xe4,%xmm6,%xmm8
punpckhdq %xmm0,%xmm7
pshufd $0xaa,%xmm2,%xmm0
punpckhdq %xmm0,%xmm14
movsd  %xmm7,%xmm14
punpckhwd %xmm1,%xmm3
punpckhwd %xmm9,%xmm5
movdqa %xmm5,%xmm0
punpckldq %xmm3,%xmm0
punpckhwd %xmm11,%xmm4
pshufd $0x55,%xmm4,%xmm1
punpckhwd %xmm10,%xmm15
pshufd $0x55,%xmm15,%xmm2
punpckldq %xmm1,%xmm2
shufps $0xe4,%xmm0,%xmm2
movdqa %xmm15,%xmm0
punpckldq %xmm4,%xmm0
pshufd $0x0,%xmm3,%xmm1
pshufd $0x0,%xmm5,%xmm6
punpckhdq %xmm1,%xmm6
movsd  %xmm0,%xmm6
pshufd $0xff,%xmm4,%xmm0
pshufd $0xff,%xmm15,%xmm1
punpckldq %xmm0,%xmm1
pshufd $0xaa,%xmm5,%xmm0
punpckhdq %xmm3,%xmm5
shufps $0xe4,%xmm5,%xmm1
punpckhdq %xmm4,%xmm15
pshufd $0xaa,%xmm3,%xmm3
punpckhdq %xmm3,%xmm0
movsd  %xmm15,%xmm0
movupd %xmm0,0x60(%rsi,%r11,1)
movups %xmm1,0x70(%rsi,%r11,1)
movupd %xmm6,0x40(%rsi,%r11,1)
movups %xmm2,0x50(%rsi,%r11,1)
movupd %xmm14,0x20(%rsi,%r11,1)
movups %xmm8,0x30(%rsi,%r11,1)
movupd %xmm13,(%rsi,%r11,1)
movups %xmm12,0x10(%rsi,%r11,1)
sub    $0xffffffffffffff80,%r11
add    $0xfffffffffffffff8,%rbx
jne    1420 <clamprow+0x320>
cmp    %r9,%r10
jne    1159 <clamprow+0x59>
jmp    123c <clamprow+0x13c>
xor    %ebx,%ebx
test   $0x1,%r9b
jne    131e <clamprow+0x21e>
jmp    1350 <clamprow+0x250>

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

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