int luminousarc(unsigned char *instream, int inLength, unsigned char *outstream,
                int decompressedSize) {
  int i, o = 0;
  int readBytes = 0;
  int bufferLength = 0xFFF + 5;
  unsigned char buffer[bufferLength];
  int bufferOffset = 0;
  int currentOutSize = 0;
  int flags = 0, mask = 3;
  while (currentOutSize < decompressedSize) {
    if (mask == 3) {
      if (readBytes >= inLength)
        return (-1);
      flags = instream[readBytes++];
      if (flags < 0)
        return (-1);
      mask = 0xC0;
    } else {
      mask >>= 2;
      flags >>= 2;
    }
    switch (flags & 0x3) {
    case 0: {
      if (readBytes + 1 >= inLength) {
        return (-1);
      }
      int byte1 = instream[readBytes++];
      int byte2 = instream[readBytes++];
      if (byte2 < 0)
        return (-1);
      int length = byte2 >> 4;
      length += 3;
      int disp = ((byte2 & 0x0F) << 8) | byte1;
      disp += 5;
      if (disp > currentOutSize)
        return (-1);
      int bufIdx = bufferOffset + bufferLength - disp;
      for (i = 0; i < length; i++) {
        unsigned char next = buffer[bufIdx % bufferLength];
        bufIdx++;
        outstream[o++] = next;
        buffer[bufferOffset] = next;
        bufferOffset = (bufferOffset + 1) % bufferLength;
      }
      currentOutSize += length;
      break;
    }
    case 1: {
      if (readBytes >= inLength) {
        return (-1);
      }
      int b = instream[readBytes++];
      if (b < 0)
        return (-1);
      int length = b >> 2;
      length += 2;
      int disp = (b & 0x03);
      disp += 1;
      if (disp > currentOutSize)
        return (-1);
      int bufIdx = bufferOffset + bufferLength - disp;
      for (i = 0; i < length; i++) {
        unsigned char next = buffer[bufIdx % bufferLength];
        bufIdx++;
        outstream[o++] = next;
        buffer[bufferOffset] = next;
        bufferOffset = (bufferOffset + 1) % bufferLength;
      }
      currentOutSize += length;
      break;
    }
    case 2: {
      if (readBytes >= inLength)
        return (-1);
      int next = instream[readBytes++];
      if (next < 0)
        return (-1);
      currentOutSize++;
      outstream[o++] = next;
      buffer[bufferOffset] = (unsigned char)next;
      bufferOffset = (bufferOffset + 1) % bufferLength;
      break;
    }
    case 3: {
      for (i = 0; i < 3; i++) {
        if (readBytes >= inLength)
          return (-1);
        int next = instream[readBytes++];
        if (next < 0)
          return (-1);
        currentOutSize++;
        outstream[o++] = next;
        buffer[bufferOffset] = (unsigned char)next;
        bufferOffset = (bufferOffset + 1) % bufferLength;
      }
      break;
    }
    default:
      return (-1);
    }
  }
  if (readBytes < inLength) {
    if ((readBytes ^ (readBytes & 3)) + 4 < inLength)
      return (-1);
  }
  return (o);
}


x86 assembly (clang, -O0):
<luminousarc>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x1004,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x98(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x3,-0x58(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1635 <luminousarc+0x535>
cmpl   $0x3,-0x58(%rbp)
jne    11ea <luminousarc+0xea>
mov    -0x30(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     11a8 <luminousarc+0xa8>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x30(%rbp)
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x54(%rbp)
cmpl   $0x0,-0x54(%rbp)
jge    11de <luminousarc+0xde>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
movl   $0xc0,-0x58(%rbp)
jmp    11fc <luminousarc+0xfc>
mov    -0x58(%rbp),%eax
sar    $0x2,%eax
mov    %eax,-0x58(%rbp)
mov    -0x54(%rbp),%eax
sar    $0x2,%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
and    $0x3,%eax
mov    %rax,-0xa0(%rbp)
sub    $0x3,%eax
ja     161d <luminousarc+0x51d>
mov    -0xa0(%rbp),%rax
lea    0xde0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x30(%rbp),%eax
add    $0x1,%eax
cmp    -0x14(%rbp),%eax
jl     124b <luminousarc+0x14b>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x30(%rbp)
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x30(%rbp)
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x64(%rbp)
cmpl   $0x0,-0x64(%rbp)
jge    129a <luminousarc+0x19a>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
mov    -0x64(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x68(%rbp)
mov    -0x64(%rbp),%eax
and    $0xf,%eax
shl    $0x8,%eax
or     -0x60(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x50(%rbp),%eax
jle    12e3 <luminousarc+0x1e3>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
mov    -0x4c(%rbp),%eax
add    -0x34(%rbp),%eax
sub    -0x6c(%rbp),%eax
mov    %eax,-0x70(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x68(%rbp),%eax
jge    1361 <luminousarc+0x261>
mov    -0x70(%rbp),%eax
cltd
idivl  -0x34(%rbp)
mov    -0x98(%rbp),%rax
movslq %edx,%rcx
mov    (%rax,%rcx,1),%cl
mov    %cl,-0x71(%rbp)
mov    -0x70(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x70(%rbp)
mov    -0x71(%rbp),%sil
mov    -0x20(%rbp),%rcx
mov    -0x2c(%rbp),%edx
mov    %edx,%edi
add    $0x1,%edi
mov    %edi,-0x2c(%rbp)
movslq %edx,%rdx
mov    %sil,(%rcx,%rdx,1)
mov    -0x71(%rbp),%dl
movslq -0x4c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x34(%rbp)
mov    %edx,-0x4c(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12f6 <luminousarc+0x1f6>
mov    -0x68(%rbp),%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x50(%rbp)
jmp    1630 <luminousarc+0x530>
mov    -0x30(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     138e <luminousarc+0x28e>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x30(%rbp)
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x78(%rbp)
cmpl   $0x0,-0x78(%rbp)
jge    13c4 <luminousarc+0x2c4>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
mov    -0x78(%rbp),%eax
sar    $0x2,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x78(%rbp),%eax
and    $0x3,%eax
mov    %eax,-0x80(%rbp)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x50(%rbp),%eax
jle    1407 <luminousarc+0x307>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
mov    -0x4c(%rbp),%eax
add    -0x34(%rbp),%eax
sub    -0x80(%rbp),%eax
mov    %eax,-0x84(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jge    149a <luminousarc+0x39a>
mov    -0x84(%rbp),%eax
cltd
idivl  -0x34(%rbp)
mov    -0x98(%rbp),%rax
movslq %edx,%rcx
mov    (%rax,%rcx,1),%cl
mov    %cl,-0x85(%rbp)
mov    -0x84(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x84(%rbp)
mov    -0x85(%rbp),%sil
mov    -0x20(%rbp),%rcx
mov    -0x2c(%rbp),%edx
mov    %edx,%edi
add    $0x1,%edi
mov    %edi,-0x2c(%rbp)
movslq %edx,%rdx
mov    %sil,(%rcx,%rdx,1)
mov    -0x85(%rbp),%dl
movslq -0x4c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x34(%rbp)
mov    %edx,-0x4c(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    141d <luminousarc+0x31d>
mov    -0x7c(%rbp),%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x50(%rbp)
jmp    1630 <luminousarc+0x530>
mov    -0x30(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     14c7 <luminousarc+0x3c7>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x30(%rbp)
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x8c(%rbp)
cmpl   $0x0,-0x8c(%rbp)
jge    1503 <luminousarc+0x403>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
mov    -0x98(%rbp),%rax
mov    -0x50(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x50(%rbp)
mov    -0x8c(%rbp),%ecx
mov    %cl,%sil
mov    -0x20(%rbp),%rcx
mov    -0x2c(%rbp),%edx
mov    %edx,%edi
add    $0x1,%edi
mov    %edi,-0x2c(%rbp)
movslq %edx,%rdx
mov    %sil,(%rcx,%rdx,1)
mov    -0x8c(%rbp),%ecx
mov    %cl,%dl
movslq -0x4c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x34(%rbp)
mov    %edx,-0x4c(%rbp)
jmp    1630 <luminousarc+0x530>
movl   $0x0,-0x28(%rbp)
cmpl   $0x3,-0x28(%rbp)
jge    1618 <luminousarc+0x518>
mov    -0x30(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     1583 <luminousarc+0x483>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x30(%rbp)
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x90(%rbp)
cmpl   $0x0,-0x90(%rbp)
jge    15bf <luminousarc+0x4bf>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
mov    -0x98(%rbp),%rax
mov    -0x50(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x50(%rbp)
mov    -0x90(%rbp),%ecx
mov    %cl,%sil
mov    -0x20(%rbp),%rcx
mov    -0x2c(%rbp),%edx
mov    %edx,%edi
add    $0x1,%edi
mov    %edi,-0x2c(%rbp)
movslq %edx,%rdx
mov    %sil,(%rcx,%rdx,1)
mov    -0x90(%rbp),%ecx
mov    %cl,%dl
movslq -0x4c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x34(%rbp)
mov    %edx,-0x4c(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    155a <luminousarc+0x45a>
jmp    1630 <luminousarc+0x530>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
jmp    1173 <luminousarc+0x73>
mov    -0x30(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1670 <luminousarc+0x570>
mov    -0x30(%rbp),%eax
mov    -0x30(%rbp),%ecx
and    $0x3,%ecx
xor    %ecx,%eax
add    $0x4,%eax
cmp    -0x14(%rbp),%eax
jge    166b <luminousarc+0x56b>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
jmp    167d <luminousarc+0x57d>
jmp    1670 <luminousarc+0x570>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x5c(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luminousarc>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xfa8,%rsp
mov    %ecx,-0x6c(%rsp)
test   %ecx,%ecx
jle    1515 <luminousarc+0x415>
mov    $0x3,%r13d
xor    %r15d,%r15d
xor    %r8d,%r8d
xor    %ebp,%ebp
xor    %r12d,%r12d
xor    %r14d,%r14d
mov    %esi,-0x7c(%rsp)
mov    %rdx,-0x78(%rsp)
mov    %rdi,-0x68(%rsp)
jmp    115b <luminousarc+0x5b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    -0x6c(%rsp),%r12d
jge    151b <luminousarc+0x41b>
cmp    $0x3,%r13d
jne    11a0 <luminousarc+0xa0>
cmp    %esi,%r8d
jge    1537 <luminousarc+0x437>
movslq %r8d,%rax
movzbl (%rdi,%rax,1),%r14d
add    $0x1,%r8d
mov    $0xc0,%r13d
mov    %r14d,%eax
and    $0x3,%eax
lea    0xe77(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
sar    $0x2,%r13d
sar    $0x2,%r14d
mov    %r14d,%eax
and    $0x3,%eax
lea    0xe4b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movslq %r8d,%r9
lea    0x1(%r9),%rbx
mov    $0xffffffff,%eax
cmp    %esi,%ebx
jge    153c <luminousarc+0x43c>
mov    %r14d,-0x70(%rsp)
mov    %r13d,%r14d
movzbl (%rdi,%rbx,1),%r11d
movzbl (%rdi,%r9,1),%r9d
mov    %r11d,%r13d
and    $0xf,%r13d
shl    $0x8,%r13d
lea    (%r9,%r13,1),%ebx
add    $0x5,%ebx
cmp    %r12d,%ebx
jg     153c <luminousarc+0x43c>
mov    %r12d,%r10d
add    $0x2,%r8d
mov    %r11d,%r12d
shr    $0x4,%r12d
add    $0x3,%r12d
or     %r9d,%r13d
mov    %ebp,%eax
sub    %r13d,%eax
add    $0xfff,%eax
movslq %r15d,%rbx
add    -0x78(%rsp),%rbx
shr    $0x4,%r11
add    $0x3,%r11
xor    %r9d,%r9d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    (%rax,%r9,1),%rcx
movslq %ecx,%rcx
imul   $0x7fe007ff,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x2b,%rdx
add    %esi,%edx
mov    %edx,%esi
shl    $0xc,%esi
lea    (%rsi,%rdx,4),%edx
sub    %edx,%ecx
movslq %ecx,%rcx
movzbl -0x60(%rsp,%rcx,1),%ecx
mov    %cl,(%rbx,%r9,1)
movslq %ebp,%rdx
mov    %cl,-0x60(%rsp,%rdx,1)
lea    0x1(%rdx),%ecx
movslq %ecx,%rcx
imul   $0x7fe007ff,%rcx,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
sar    $0x2b,%rcx
add    %esi,%ecx
mov    %ecx,%esi
shl    $0xc,%esi
lea    (%rsi,%rcx,4),%ecx
neg    %ecx
lea    (%rdx,%rcx,1),%ebp
add    $0x1,%ebp
add    $0x1,%r9
cmp    %r9d,%r11d
jne    1240 <luminousarc+0x140>
add    %r9d,%r15d
add    %r12d,%r10d
mov    %r10d,%r12d
mov    -0x7c(%rsp),%esi
mov    -0x78(%rsp),%rdx
mov    %r14d,%r13d
mov    -0x70(%rsp),%r14d
jmp    1150 <luminousarc+0x50>
nopw   0x0(%rax,%rax,1)
mov    $0xffffffff,%eax
cmp    %esi,%r8d
jge    153c <luminousarc+0x43c>
movslq %r8d,%rcx
movzbl (%rdi,%rcx,1),%r9d
mov    %r9d,%ebx
and    $0x3,%ebx
cmp    %r12d,%ebx
jge    153c <luminousarc+0x43c>
mov    %r13d,%r11d
mov    %r12d,%r10d
add    $0x1,%r8d
mov    %r9d,%r12d
shr    $0x2,%r12d
add    $0x2,%r12d
not    %ebx
lea    (%rbx,%rbp,1),%r13d
add    $0x1004,%r13d
movslq %r15d,%rax
mov    -0x78(%rsp),%rdx
add    %rdx,%rax
shr    $0x2,%r9
add    $0x2,%r9
xor    %ebx,%ebx
nopl   0x0(%rax)
lea    (%rbx,%r13,1),%rcx
movslq %ecx,%rcx
imul   $0x7fe007ff,%rcx,%rdi
mov    %rdi,%rsi
shr    $0x3f,%rsi
sar    $0x2b,%rdi
add    %esi,%edi
mov    %edi,%esi
shl    $0xc,%esi
lea    (%rsi,%rdi,4),%esi
sub    %esi,%ecx
movslq %ecx,%rcx
movzbl -0x60(%rsp,%rcx,1),%ecx
mov    %cl,(%rax,%rbx,1)
movslq %ebp,%rdi
mov    %cl,-0x60(%rsp,%rdi,1)
lea    0x1(%rdi),%ecx
movslq %ecx,%rcx
imul   $0x7fe007ff,%rcx,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
sar    $0x2b,%rcx
add    %esi,%ecx
mov    %ecx,%esi
shl    $0xc,%esi
lea    (%rsi,%rcx,4),%ecx
neg    %ecx
lea    (%rdi,%rcx,1),%ebp
add    $0x1,%ebp
add    $0x1,%rbx
cmp    %ebx,%r9d
jne    1330 <luminousarc+0x230>
add    %ebx,%r15d
add    %r12d,%r10d
mov    %r10d,%r12d
mov    -0x7c(%rsp),%esi
mov    -0x68(%rsp),%rdi
mov    %r11d,%r13d
jmp    1150 <luminousarc+0x50>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    %esi,%r8d
jge    1537 <luminousarc+0x437>
movslq %r8d,%rax
add    $0x1,%r8d
mov    (%rdi,%rax,1),%al
movslq %r15d,%rcx
mov    %al,(%rdx,%rcx,1)
movslq %ebp,%rcx
mov    %al,-0x60(%rsp,%rcx,1)
lea    0x1(%rbp),%eax
cltq
imul   $0x7fe007ff,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x2b,%rax
add    %ecx,%eax
mov    %eax,%ecx
shl    $0xc,%ecx
lea    (%rcx,%rax,4),%eax
neg    %eax
add    %eax,%ebp
add    $0x1,%ebp
add    $0x1,%r15d
add    $0x1,%r12d
jmp    1150 <luminousarc+0x50>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %esi,%r8d
mov    %esi,%ebx
cmovg  %r8d,%ebx
mov    $0xffffffff,%eax
sub    %r8d,%ebx
je     153c <luminousarc+0x43c>
mov    %r12d,%r10d
movslq %r15d,%r12
movslq %r8d,%r9
mov    (%rdi,%r9,1),%cl
mov    %cl,(%rdx,%r12,1)
mov    %rdi,%r11
movslq %ebp,%rdi
mov    %cl,-0x60(%rsp,%rdi,1)
cmp    $0x1,%ebx
je     153c <luminousarc+0x43c>
lea    0x1(%rbp),%ecx
movslq %ecx,%rcx
imul   $0x7fe007ff,%rcx,%rcx
mov    %rcx,%rdi
shr    $0x3f,%rdi
sar    $0x2b,%rcx
add    %edi,%ecx
mov    %ecx,%edi
shl    $0xc,%edi
lea    (%rdi,%rcx,4),%ecx
neg    %ecx
add    %ecx,%ebp
add    $0x1,%ebp
mov    0x1(%r9,%r11,1),%cl
mov    %cl,0x1(%r12,%rdx,1)
movslq %ebp,%rdx
mov    %cl,-0x60(%rsp,%rdx,1)
cmp    $0x2,%ebx
je     153c <luminousarc+0x43c>
lea    0x1(%rbp),%eax
cwtl
imul   $0x7fe1,%eax,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x1b,%eax
add    %ecx,%eax
mov    %eax,%ecx
shl    $0xc,%ecx
lea    (%rcx,%rax,4),%eax
neg    %eax
add    %ebp,%eax
add    $0x1,%eax
add    $0x3,%r8d
mov    0x2(%r9,%r11,1),%cl
add    $0x3,%r10d
lea    0x3(%r12),%r15d
mov    -0x78(%rsp),%rdx
mov    %cl,0x2(%r12,%rdx,1)
mov    %r10d,%r12d
movswq %ax,%rdi
mov    %cl,-0x60(%rsp,%rdi,1)
add    $0x1,%eax
movswl %ax,%ecx
imul   $0x7fe1,%ecx,%ecx
mov    %ecx,%edi
shr    $0x1f,%edi
sar    $0x1b,%ecx
add    %edi,%ecx
mov    %ecx,%edi
shl    $0xc,%edi
lea    (%rdi,%rcx,4),%ecx
mov    -0x68(%rsp),%rdi
sub    %ecx,%eax
movswl %ax,%ebp
jmp    1150 <luminousarc+0x50>
xor    %r8d,%r8d
xor    %r15d,%r15d
cmp    %esi,%r8d
jge    1532 <luminousarc+0x432>
add    $0x4,%r8d
and    $0xfffffffc,%r8d
mov    $0xffffffff,%eax
cmp    %esi,%r8d
jl     153c <luminousarc+0x43c>
mov    %r15d,%eax
jmp    153c <luminousarc+0x43c>
mov    $0xffffffff,%eax
add    $0xfa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @luminousarc(i8* nocapture %0, i32 %1, i8* nocapture writeonly %2, i32 %3) {
%5 = alloca [4100 x i8]
%6 = icmp sgt i32 %3, 0
br i1 %6, label %7, label %177
7: ; preds = %4, %171
%8 = phi i32 [ %175, %171 ], [ 0, %4 ]
%9 = phi i32 [ %174, %171 ], [ 0, %4 ]
%10 = phi i32 [ %173, %171 ], [ 0, %4 ]
%11 = phi i32 [ %172, %171 ], [ 0, %4 ]
%12 = phi i32 [ %28, %171 ], [ 0, %4 ]
%13 = phi i32 [ %27, %171 ], [ 3, %4 ]
%14 = icmp eq i32 %13, 3
br i1 %14, label %15, label %23
15: ; preds = %7
%16 = icmp slt i32 %9, %1
br i1 %16, label %17, label %186
17: ; preds = %15
%18 = sext i32 %9 to i64
%19 = getelementptr inbounds i8, i8* %0, i64 %18
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = add nsw i32 %9, 1
br label %26
23: ; preds = %7
%24 = ashr i32 %13, 2
%25 = ashr i32 %12, 2
br label %26
26: ; preds = %23, %17
%27 = phi i32 [ 192, %17 ], [ %24, %23 ]
%28 = phi i32 [ %21, %17 ], [ %25, %23 ]
%29 = phi i32 [ %22, %17 ], [ %9, %23 ]
%30 = and i32 %28, 3
switch i32 %30, label %170 [
i32 0, label %37
i32 1, label %82
i32 2, label %120
i32 3, label %31
]
31: ; preds = %26
%32 = sext i32 %8 to i64
%33 = sext i32 %29 to i64
%34 = call i32 @llvm.smax.i32(i32 %29, i32 %1)
%35 = sub i32 %34, %29
%36 = icmp eq i32 %35, 0
br i1 %36, label %186, label %135
37: ; preds = %26
%38 = add nsw i32 %29, 1
%39 = icmp slt i32 %38, %1
br i1 %39, label %40, label %186
40: ; preds = %37
%41 = add nsw i32 %29, 2
%42 = sext i32 %38 to i64
%43 = getelementptr inbounds i8, i8* %0, i64 %42
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = sext i32 %29 to i64
%47 = getelementptr inbounds i8, i8* %0, i64 %46
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = lshr i32 %45, 4
%51 = add nuw nsw i32 %50, 3
%52 = shl nuw nsw i32 %45, 8
%53 = and i32 %52, 3840
%54 = or i32 %53, %49
%55 = add nuw nsw i32 %54, 5
%56 = icmp sgt i32 %55, %11
br i1 %56, label %186, label %57
57: ; preds = %40
%58 = sub nsw i32 %10, %54
%59 = add nsw i32 %58, 4095
%60 = sext i32 %8 to i64
br label %61
61: ; preds = %57, %61
%62 = phi i64 [ %60, %57 ], [ %71, %61 ]
%63 = phi i32 [ 0, %57 ], [ %77, %61 ]
%64 = phi i32 [ %10, %57 ], [ %76, %61 ]
%65 = phi i32 [ %59, %57 ], [ %70, %61 ]
%66 = srem i32 %65, 4100
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [4100 x i8], [4100 x i8]* %5, i64 0, i64 %67
%69 = load i8, i8* %68
%70 = add nsw i32 %65, 1
%71 = add nsw i64 %62, 1
%72 = getelementptr inbounds i8, i8* %2, i64 %62
store i8 %69, i8* %72
%73 = sext i32 %64 to i64
%74 = getelementptr inbounds [4100 x i8], [4100 x i8]* %5, i64 0, i64 %73
store i8 %69, i8* %74
%75 = add nsw i32 %64, 1
%76 = srem i32 %75, 4100
%77 = add nuw nsw i32 %63, 1
%78 = icmp eq i32 %77, %51
br i1 %78, label %79, label %61
79: ; preds = %61
%80 = trunc i64 %71 to i32
%81 = add nsw i32 %51, %11
br label %171
82: ; preds = %26
%83 = icmp slt i32 %29, %1
br i1 %83, label %84, label %186
84: ; preds = %82
%85 = add nsw i32 %29, 1
%86 = sext i32 %29 to i64
%87 = getelementptr inbounds i8, i8* %0, i64 %86
%88 = load i8, i8* %87
%89 = zext i8 %88 to i32
%90 = lshr i32 %89, 2
%91 = add nuw nsw i32 %90, 2
%92 = and i32 %89, 3
%93 = icmp slt i32 %92, %11
br i1 %93, label %94, label %186
94: ; preds = %84
%95 = xor i32 %92, -1
%96 = add nsw i32 %10, 4100
%97 = add nsw i32 %96, %95
%98 = sext i32 %8 to i64
br label %99
99: ; preds = %94, %99
%100 = phi i64 [ %98, %94 ], [ %109, %99 ]
%101 = phi i32 [ 0, %94 ], [ %115, %99 ]
%102 = phi i32 [ %97, %94 ], [ %108, %99 ]
%103 = phi i32 [ %10, %94 ], [ %114, %99 ]
%104 = srem i32 %102, 4100
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [4100 x i8], [4100 x i8]* %5, i64 0, i64 %105
%107 = load i8, i8* %106
%108 = add nsw i32 %102, 1
%109 = add nsw i64 %100, 1
%110 = getelementptr inbounds i8, i8* %2, i64 %100
store i8 %107, i8* %110
%111 = sext i32 %103 to i64
%112 = getelementptr inbounds [4100 x i8], [4100 x i8]* %5, i64 0, i64 %111
store i8 %107, i8* %112
%113 = add nsw i32 %103, 1
%114 = srem i32 %113, 4100
%115 = add nuw nsw i32 %101, 1
%116 = icmp eq i32 %115, %91
br i1 %116, label %117, label %99
117: ; preds = %99
%118 = trunc i64 %109 to i32
%119 = add nsw i32 %91, %11
br label %171
120: ; preds = %26
%121 = icmp slt i32 %29, %1
br i1 %121, label %122, label %186
122: ; preds = %120
%123 = add nsw i32 %29, 1
%124 = sext i32 %29 to i64
%125 = getelementptr inbounds i8, i8* %0, i64 %124
%126 = load i8, i8* %125
%127 = sext i32 %8 to i64
%128 = getelementptr inbounds i8, i8* %2, i64 %127
store i8 %126, i8* %128
%129 = sext i32 %10 to i64
%130 = getelementptr inbounds [4100 x i8], [4100 x i8]* %5, i64 0, i64 %129
store i8 %126, i8* %130
%131 = add nsw i32 %10, 1
%132 = srem i32 %131, 4100
%133 = add nsw i32 %8, 1
%134 = add nsw i32 %11, 1
br label %171
135: ; preds = %31
%136 = getelementptr inbounds i8, i8* %0, i64 %33
%137 = load i8, i8* %136
%138 = getelementptr inbounds i8, i8* %2, i64 %32
store i8 %137, i8* %138
%139 = sext i32 %10 to i64
%140 = getelementptr inbounds [4100 x i8], [4100 x i8]* %5, i64 0, i64 %139
store i8 %137, i8* %140
%141 = add nsw i32 %10, 1
%142 = srem i32 %141, 4100
%143 = icmp eq i32 %35, 1
br i1 %143, label %186, label %144
144: ; preds = %135
%145 = add nsw i64 %32, 1
%146 = add nsw i64 %33, 1
%147 = getelementptr inbounds i8, i8* %0, i64 %146
%148 = load i8, i8* %147
%149 = getelementptr inbounds i8, i8* %2, i64 %145
store i8 %148, i8* %149
%150 = sext i32 %142 to i64
%151 = getelementptr inbounds [4100 x i8], [4100 x i8]* %5, i64 0, i64 %150
store i8 %148, i8* %151
%152 = trunc i32 %142 to i16
%153 = add i16 %152, 1
%154 = srem i16 %153, 4100
%155 = icmp eq i32 %35, 2
br i1 %155, label %186, label %156
156: ; preds = %144
%157 = add nsw i64 %32, 2
%158 = add nsw i64 %33, 2
%159 = add i32 %29, 3
%160 = getelementptr inbounds i8, i8* %0, i64 %158
%161 = load i8, i8* %160
%162 = add nsw i32 %11, 3
%163 = add i32 %8, 3
%164 = getelementptr inbounds i8, i8* %2, i64 %157
store i8 %161, i8* %164
%165 = sext i16 %154 to i64
%166 = getelementptr inbounds [4100 x i8], [4100 x i8]* %5, i64 0, i64 %165
store i8 %161, i8* %166
%167 = add nsw i16 %154, 1
%168 = srem i16 %167, 4100
%169 = sext i16 %168 to i32
br label %171
170: ; preds = %26
unreachable
171: ; preds = %117, %79, %156, %122
%172 = phi i32 [ %134, %122 ], [ %119, %117 ], [ %81, %79 ], [ %162, %156 ]
%173 = phi i32 [ %132, %122 ], [ %114, %117 ], [ %76, %79 ], [ %169, %156 ]
%174 = phi i32 [ %123, %122 ], [ %85, %117 ], [ %41, %79 ], [ %159, %156 ]
%175 = phi i32 [ %133, %122 ], [ %118, %117 ], [ %80, %79 ], [ %163, %156 ]
%176 = icmp slt i32 %172, %3
br i1 %176, label %7, label %177
177: ; preds = %171, %4
%178 = phi i32 [ 0, %4 ], [ %174, %171 ]
%179 = phi i32 [ 0, %4 ], [ %175, %171 ]
%180 = icmp slt i32 %178, %1
br i1 %180, label %181, label %185
181: ; preds = %177
%182 = add i32 %178, 4
%183 = and i32 %182, -4
%184 = icmp slt i32 %183, %1
br i1 %184, label %186, label %185
185: ; preds = %181, %177
br label %186
186: ; preds = %84, %40, %120, %82, %37, %15, %31, %135, %144, %181, %185
%187 = phi i32 [ %179, %185 ], [ -1, %181 ], [ -1, %144 ], [ -1, %135 ], [ -1, %31 ], [ -1, %15 ], [ -1, %37 ], [ -1, %82 ], [ -1, %120 ], [ -1, %40 ], [ -1, %84 ]
ret i32 %187
}