int main(int argc, char **argv) {
  int largo, prefijo, aciertos = 0, i = 0, l_racha = -1;
  char tipo[10];
  unsigned char resto[2] = {0x00, 0x00}, resto_bit, racha[6], racha_byte = 0x00;
  int J[32] = {0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2,  2,  3,  3,  3,  3,
               4, 4, 5, 5, 6, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 15};
  printf(">> Largo de la racha: ");
  scanf("%d", &largo);
  printf(">> Interrumpida por: [P]ixel distinto / [F]in de fila : ");
  scanf("%s", tipo);
  printf("\n");
  if (largo > 32768) {
    printf("Are you kidding me?\n");
    exit(255);
  }
  for (int k = 0; k < 6; k++)
    racha[i] = 0x00;
  if (!largo) {
    l_racha = 0;
    printf(">> Racha de largo nulo.\n");
  }
  while ((largo > 0) & (i < 32)) {
    largo -= (1 << J[i]);
    i++;
    printf(">> i = %02d - kr = %05d - resto = %03d\n", i, 1 << J[i], largo);
  }
  if (l_racha == -1) {
    if (largo)
      l_racha = i + 1 + J[i];
    else
      l_racha = i;
  }
  for (int k = 0; k < i; k++) {
    racha_byte = racha_byte | (1 << (7 - (k % 8)));
    racha[k / 8] = racha_byte;
    if (!((k + 1) % 8))
      racha_byte = 0x00;
  }
  if (largo < 0) {
    prefijo = (!strncmp(tipo, "P", 1) ? 0 : 1);
    printf(">> prefijo = %d\n", prefijo);
    largo *= -1;
    printf(">> resto = %d = "
           "%c%c%c%c%c%c%c%c"
           " "
           "%c%c%c%c%c%c%c%c"
           "b representado con %d bits = ",
           largo, ((unsigned char)(largo / 256) & 0x80 ? '1' : '0'),
           ((unsigned char)(largo / 256) & 0x40 ? '1' : '0'),
           ((unsigned char)(largo / 256) & 0x20 ? '1' : '0'),
           ((unsigned char)(largo / 256) & 0x10 ? '1' : '0'),
           ((unsigned char)(largo / 256) & 0x08 ? '1' : '0'),
           ((unsigned char)(largo / 256) & 0x04 ? '1' : '0'),
           ((unsigned char)(largo / 256) & 0x02 ? '1' : '0'),
           ((unsigned char)(largo / 256) & 0x01 ? '1' : '0'),
           ((unsigned char)(largo)&0x80 ? '1' : '0'),
           ((unsigned char)(largo)&0x40 ? '1' : '0'),
           ((unsigned char)(largo)&0x20 ? '1' : '0'),
           ((unsigned char)(largo)&0x10 ? '1' : '0'),
           ((unsigned char)(largo)&0x08 ? '1' : '0'),
           ((unsigned char)(largo)&0x04 ? '1' : '0'),
           ((unsigned char)(largo)&0x02 ? '1' : '0'),
           ((unsigned char)(largo)&0x01 ? '1' : '0'), J[i]);
    resto[0] = (unsigned char)(largo / 256);
    resto[1] = (unsigned char)(largo % 256);
    if (J[i] > 8) {
      for (int k = 16 - J[i]; k < 8; k++) {
        resto_bit = ((resto[0] & (1 << (7 - k))) >> (7 - k)) & 0x01;
        printf("%c", resto_bit == 0x01 ? '1' : '0');
      }
      for (int k = 0; k < 8; k++) {
        resto_bit = ((resto[1] & (1 << (7 - k))) >> (7 - k)) & 0x01;
        printf("%c", resto_bit == 0x01 ? '1' : '0');
      }
    } else {
      for (int k = 8 - J[i]; k < 8; k++) {
        resto_bit = ((resto[1] & (1 << (7 - k))) >> (7 - k)) & 0x01;
        printf("%c", resto_bit == 0x01 ? '1' : '0');
      }
    }
    printf("b\n\n");
    racha[i / 8] = racha[i / 8] | (prefijo << (7 - i % 8));
    if (J[i] > 8) {
      for (int k = i + 1; k < i + J[i] - 7; k++)
        ((racha)[(k) / 8] = (racha)[(k) / 8] |
                            ((((resto[0]) & (1 << (7 - (15 - J[i] + k - i)))) >>
                              (7 - (15 - J[i] + k - i)))
                             << (7 - (k) % 8)));
      for (int k = i + J[i] - 7; k < i + J[i] + 1; k++)
        ((racha)[(k) / 8] = (racha)[(k) / 8] |
                            ((((resto[1]) & (1 << (7 - (7 - J[i] + k - i)))) >>
                              (7 - (7 - J[i] + k - i)))
                             << (7 - (k) % 8)));
    } else {
      for (int k = i + 1; k < i + J[i] + 1; k++)
        ((racha)[(k) / 8] = (racha)[(k) / 8] |
                            ((((resto[1]) & (1 << (7 - (7 - J[i] + k - i)))) >>
                              (7 - (7 - J[i] + k - i)))
                             << (7 - (k) % 8)));
    }
  }
  printf(">> Tira de bits: ");
  for (int k = 0; k < 6; k++)
    printf("%c%c%c%c%c%c%c%c", (racha[k] & 0x80 ? '1' : '0'),
           (racha[k] & 0x40 ? '1' : '0'), (racha[k] & 0x20 ? '1' : '0'),
           (racha[k] & 0x10 ? '1' : '0'), (racha[k] & 0x08 ? '1' : '0'),
           (racha[k] & 0x04 ? '1' : '0'), (racha[k] & 0x02 ? '1' : '0'),
           (racha[k] & 0x01 ? '1' : '0'));
  printf("b - Largo: %d\n", l_racha);
  printf("                  ");
  for (int k = 2; k < i; k++)
    printf(" ");
  if (l_racha > i) {
    printf(" ^^");
    for (int k = i + 3; k < l_racha; k++)
      printf(" ");
    if (J[i] > 1)
      printf("^");
  } else {
    printf("^");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x198,%rsp
movl   $0x0,-0x2c(%rbp)
mov    %edi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0xffffffff,-0x4c(%rbp)
lea    -0x58(%rbp),%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1050 <memset@plt>
movb   $0x0,-0x60(%rbp)
lea    -0xe0(%rbp),%rdi
lea    0xe47(%rip),%rsi
mov    $0x80,%edx
call   1060 <memcpy@plt>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x3c(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x56(%rbp),%rsi
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    0xf86(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x8000,-0x3c(%rbp)
jle    1236 <main+0xd6>
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xff,%edi
call   1080 <exit@plt>
movl   $0x0,-0xe4(%rbp)
cmpl   $0x6,-0xe4(%rbp)
jge    126a <main+0x10a>
movslq -0x48(%rbp),%rax
movb   $0x0,-0x5f(%rbp,%rax,1)
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    1240 <main+0xe0>
cmpl   $0x0,-0x3c(%rbp)
jne    1289 <main+0x129>
movl   $0x0,-0x4c(%rbp)
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128e <main+0x12e>
cmpl   $0x0,-0x3c(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x20,-0x48(%rbp)
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1302 <main+0x1a2>
movslq -0x48(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%esi
movslq -0x48(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x3c(%rbp),%ecx
lea    0xe0e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128e <main+0x12e>
cmpl   $0xffffffff,-0x4c(%rbp)
jne    133a <main+0x1da>
cmpl   $0x0,-0x3c(%rbp)
je     132f <main+0x1cf>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
movslq -0x48(%rbp),%rcx
add    -0xe0(%rbp,%rcx,4),%eax
mov    %eax,-0x4c(%rbp)
jmp    1335 <main+0x1d5>
mov    -0x48(%rbp),%eax
mov    %eax,-0x4c(%rbp)
jmp    133a <main+0x1da>
movl   $0x0,-0xe8(%rbp)
mov    -0xe8(%rbp),%eax
cmp    -0x48(%rbp),%eax
jge    13d4 <main+0x274>
movzbl -0x60(%rbp),%eax
mov    %eax,-0x110(%rbp)
mov    -0xe8(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x110(%rbp),%eax
mov    $0x7,%ecx
sub    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %al,-0x60(%rbp)
mov    -0x60(%rbp),%cl
mov    -0xe8(%rbp),%eax
mov    $0x8,%esi
cltd
idiv   %esi
cltq
mov    %cl,-0x5f(%rbp,%rax,1)
mov    -0xe8(%rbp),%eax
add    $0x1,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    13bb <main+0x25b>
movb   $0x0,-0x60(%rbp)
jmp    13c0 <main+0x260>
mov    -0xe8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe8(%rbp)
jmp    1344 <main+0x1e4>
cmpl   $0x0,-0x3c(%rbp)
jge    1bdd <main+0xa7d>
lea    -0x56(%rbp),%rdi
lea    0xd43(%rip),%rsi
mov    $0x1,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %dl
xor    $0xff,%dl
mov    $0x1,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%esi
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
imul   $0xffffffff,-0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%esi
mov    -0x3c(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
movzbl %al,%edx
and    $0x80,%edx
mov    $0x30,%eax
mov    $0x31,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x12c(%rbp)
mov    -0x3c(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
movzbl %al,%edx
and    $0x40,%edx
mov    $0x30,%ecx
mov    $0x31,%eax
cmp    $0x0,%edx
cmovne %eax,%ecx
mov    -0x3c(%rbp),%eax
mov    $0x100,%edi
cltd
idiv   %edi
movzbl %al,%edx
and    $0x20,%edx
mov    $0x30,%r8d
mov    $0x31,%eax
cmp    $0x0,%edx
cmovne %eax,%r8d
mov    -0x3c(%rbp),%eax
mov    $0x100,%edi
cltd
idiv   %edi
movzbl %al,%edx
and    $0x10,%edx
mov    $0x30,%r9d
mov    $0x31,%eax
cmp    $0x0,%edx
cmovne %eax,%r9d
mov    -0x3c(%rbp),%eax
mov    $0x100,%edi
cltd
idiv   %edi
movzbl %al,%edi
and    $0x8,%edi
mov    $0x30,%eax
mov    $0x31,%edx
cmp    $0x0,%edi
cmovne %edx,%eax
mov    %eax,-0x128(%rbp)
mov    -0x3c(%rbp),%eax
mov    $0x100,%edi
cltd
idiv   %edi
movzbl %al,%edi
and    $0x4,%edi
mov    $0x30,%eax
mov    $0x31,%edx
cmp    $0x0,%edi
cmovne %edx,%eax
mov    %eax,-0x124(%rbp)
mov    -0x3c(%rbp),%eax
mov    $0x100,%edi
cltd
idiv   %edi
movzbl %al,%edi
and    $0x2,%edi
mov    $0x30,%eax
mov    $0x31,%edx
cmp    $0x0,%edi
cmovne %edx,%eax
mov    %eax,-0x120(%rbp)
mov    -0x3c(%rbp),%eax
mov    $0x100,%edi
cltd
idiv   %edi
mov    -0x12c(%rbp),%edx
movzbl %al,%r10d
and    $0x1,%r10d
mov    $0x30,%eax
mov    $0x31,%edi
cmp    $0x0,%r10d
cmovne %edi,%eax
mov    %eax,-0x11c(%rbp)
mov    -0x3c(%rbp),%eax
movzbl %al,%r10d
and    $0x80,%r10d
mov    $0x30,%eax
mov    $0x31,%edi
cmp    $0x0,%r10d
cmovne %edi,%eax
mov    %eax,-0x118(%rbp)
mov    -0x3c(%rbp),%eax
movzbl %al,%edi
and    $0x40,%edi
mov    $0x30,%r13d
mov    $0x31,%eax
cmp    $0x0,%edi
cmovne %eax,%r13d
mov    -0x3c(%rbp),%eax
movzbl %al,%edi
and    $0x20,%edi
mov    $0x30,%r12d
mov    $0x31,%eax
cmp    $0x0,%edi
cmovne %eax,%r12d
mov    -0x3c(%rbp),%eax
movzbl %al,%edi
and    $0x10,%edi
mov    $0x30,%r15d
mov    $0x31,%eax
cmp    $0x0,%edi
cmovne %eax,%r15d
mov    -0x3c(%rbp),%eax
movzbl %al,%edi
and    $0x8,%edi
mov    $0x30,%r14d
mov    $0x31,%eax
cmp    $0x0,%edi
cmovne %eax,%r14d
mov    -0x3c(%rbp),%eax
movzbl %al,%edi
and    $0x4,%edi
mov    $0x30,%ebx
mov    $0x31,%eax
cmp    $0x0,%edi
cmovne %eax,%ebx
mov    -0x3c(%rbp),%eax
movzbl %al,%edi
and    $0x2,%edi
mov    $0x30,%r11d
mov    $0x31,%eax
cmp    $0x0,%edi
cmovne %eax,%r11d
mov    -0x3c(%rbp),%eax
movzbl %al,%eax
and    $0x1,%eax
mov    $0x30,%r10d
mov    $0x31,%edi
cmp    $0x0,%eax
mov    -0x128(%rbp),%eax
cmovne %edi,%r10d
movslq -0x48(%rbp),%rdi
mov    -0xe0(%rbp,%rdi,4),%edi
mov    %edi,-0x114(%rbp)
lea    0xae4(%rip),%rdi
mov    %eax,(%rsp)
mov    -0x124(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0x120(%rbp),%eax
mov    %eax,0x10(%rsp)
mov    -0x11c(%rbp),%eax
mov    %eax,0x18(%rsp)
mov    -0x118(%rbp),%eax
mov    %eax,0x20(%rsp)
mov    -0x114(%rbp),%eax
mov    %r13d,0x28(%rsp)
mov    %r12d,0x30(%rsp)
mov    %r15d,0x38(%rsp)
mov    %r14d,0x40(%rsp)
mov    %ebx,0x48(%rsp)
mov    %r11d,0x50(%rsp)
mov    %r10d,0x58(%rsp)
mov    %eax,0x60(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x3c(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %al,-0x58(%rbp)
mov    -0x3c(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %dl,%al
mov    %al,-0x57(%rbp)
movslq -0x48(%rbp),%rax
cmpl   $0x8,-0xe0(%rbp,%rax,4)
08
jle    17ee <main+0x68e>
movslq -0x48(%rbp),%rcx
mov    $0x10,%eax
sub    -0xe0(%rbp,%rcx,4),%eax
mov    %eax,-0xec(%rbp)
cmpl   $0x8,-0xec(%rbp)
jge    176f <main+0x60f>
movzbl -0x58(%rbp),%eax
mov    $0x7,%ecx
sub    -0xec(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
mov    $0x7,%ecx
sub    -0xec(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    %al,-0x59(%rbp)
movzbl -0x59(%rbp),%ecx
mov    $0x30,%esi
mov    $0x31,%eax
cmp    $0x1,%ecx
cmove  %eax,%esi
lea    0xa5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    16ff <main+0x59f>
movl   $0x0,-0xf0(%rbp)
cmpl   $0x8,-0xf0(%rbp)
jge    17e9 <main+0x689>
movzbl -0x57(%rbp),%eax
mov    $0x7,%ecx
sub    -0xf0(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
mov    $0x7,%ecx
sub    -0xf0(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    %al,-0x59(%rbp)
movzbl -0x59(%rbp),%ecx
mov    $0x30,%esi
mov    $0x31,%eax
cmp    $0x1,%ecx
cmove  %eax,%esi
lea    0x9e4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    1779 <main+0x619>
jmp    1879 <main+0x719>
movslq -0x48(%rbp),%rcx
mov    $0x8,%eax
sub    -0xe0(%rbp,%rcx,4),%eax
mov    %eax,-0xf4(%rbp)
cmpl   $0x8,-0xf4(%rbp)
jge    1874 <main+0x714>
movzbl -0x57(%rbp),%eax
mov    $0x7,%ecx
sub    -0xf4(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
mov    $0x7,%ecx
sub    -0xf4(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    %al,-0x59(%rbp)
movzbl -0x59(%rbp),%ecx
mov    $0x30,%esi
mov    $0x31,%eax
cmp    $0x1,%ecx
cmove  %eax,%esi
lea    0x959(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    1804 <main+0x6a4>
jmp    1879 <main+0x719>
lea    0x90e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cltq
movzbl -0x5f(%rbp,%rax,1),%eax
mov    %eax,-0x134(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0x130(%rbp)
mov    -0x48(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x134(%rbp),%eax
mov    %edx,%esi
mov    -0x130(%rbp),%edx
mov    $0x7,%ecx
sub    %esi,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x48(%rbp),%eax
mov    $0x8,%esi
cltd
idiv   %esi
cltq
mov    %cl,-0x5f(%rbp,%rax,1)
movslq -0x48(%rbp),%rax
cmpl   $0x8,-0xe0(%rbp,%rax,4)
08
jle    1ae3 <main+0x983>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf8(%rbp)
mov    -0xf8(%rbp),%eax
mov    -0x48(%rbp),%ecx
movslq -0x48(%rbp),%rdx
add    -0xe0(%rbp,%rdx,4),%ecx
sub    $0x7,%ecx
cmp    %ecx,%eax
jge    19e3 <main+0x883>
mov    -0xf8(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cltq
movzbl -0x5f(%rbp,%rax,1),%eax
mov    %eax,-0x13c(%rbp)
movzbl -0x58(%rbp),%eax
movslq -0x48(%rbp),%rcx
mov    $0xf,%edx
sub    -0xe0(%rbp,%rcx,4),%edx
add    -0xf8(%rbp),%edx
sub    -0x48(%rbp),%edx
mov    $0x7,%ecx
sub    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
movslq -0x48(%rbp),%rcx
mov    $0xf,%edx
sub    -0xe0(%rbp,%rcx,4),%edx
add    -0xf8(%rbp),%edx
sub    -0x48(%rbp),%edx
mov    $0x7,%ecx
sub    %edx,%ecx
sar    %cl,%eax
mov    %eax,-0x138(%rbp)
mov    -0xf8(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x13c(%rbp),%eax
mov    %edx,%esi
mov    -0x138(%rbp),%edx
mov    $0x7,%ecx
sub    %esi,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0xf8(%rbp),%eax
mov    $0x8,%esi
cltd
idiv   %esi
cltq
mov    %cl,-0x5f(%rbp,%rax,1)
mov    -0xf8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf8(%rbp)
jmp    18ff <main+0x79f>
mov    -0x48(%rbp),%eax
movslq -0x48(%rbp),%rcx
add    -0xe0(%rbp,%rcx,4),%eax
sub    $0x7,%eax
mov    %eax,-0xfc(%rbp)
mov    -0xfc(%rbp),%eax
mov    -0x48(%rbp),%ecx
movslq -0x48(%rbp),%rdx
add    -0xe0(%rbp,%rdx,4),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1ade <main+0x97e>
mov    -0xfc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cltq
movzbl -0x5f(%rbp,%rax,1),%eax
mov    %eax,-0x144(%rbp)
movzbl -0x57(%rbp),%eax
movslq -0x48(%rbp),%rcx
mov    $0x7,%edx
sub    -0xe0(%rbp,%rcx,4),%edx
add    -0xfc(%rbp),%edx
sub    -0x48(%rbp),%edx
mov    $0x7,%ecx
sub    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
movslq -0x48(%rbp),%rcx
mov    $0x7,%edx
sub    -0xe0(%rbp,%rcx,4),%edx
add    -0xfc(%rbp),%edx
sub    -0x48(%rbp),%edx
mov    $0x7,%ecx
sub    %edx,%ecx
sar    %cl,%eax
mov    %eax,-0x140(%rbp)
mov    -0xfc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x144(%rbp),%eax
mov    %edx,%esi
mov    -0x140(%rbp),%edx
mov    $0x7,%ecx
sub    %esi,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0xfc(%rbp),%eax
mov    $0x8,%esi
cltd
idiv   %esi
cltq
mov    %cl,-0x5f(%rbp,%rax,1)
mov    -0xfc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfc(%rbp)
jmp    19fa <main+0x89a>
jmp    1bd8 <main+0xa78>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100(%rbp)
mov    -0x100(%rbp),%eax
mov    -0x48(%rbp),%ecx
movslq -0x48(%rbp),%rdx
add    -0xe0(%rbp,%rdx,4),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1bd3 <main+0xa73>
mov    -0x100(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cltq
movzbl -0x5f(%rbp,%rax,1),%eax
mov    %eax,-0x14c(%rbp)
movzbl -0x57(%rbp),%eax
movslq -0x48(%rbp),%rcx
mov    $0x7,%edx
sub    -0xe0(%rbp,%rcx,4),%edx
add    -0x100(%rbp),%edx
sub    -0x48(%rbp),%edx
mov    $0x7,%ecx
sub    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
movslq -0x48(%rbp),%rcx
mov    $0x7,%edx
sub    -0xe0(%rbp,%rcx,4),%edx
add    -0x100(%rbp),%edx
sub    -0x48(%rbp),%edx
mov    $0x7,%ecx
sub    %edx,%ecx
sar    %cl,%eax
mov    %eax,-0x148(%rbp)
mov    -0x100(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x14c(%rbp),%eax
mov    %edx,%esi
mov    -0x148(%rbp),%edx
mov    $0x7,%ecx
sub    %esi,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x100(%rbp),%eax
mov    $0x8,%esi
cltd
idiv   %esi
cltq
mov    %cl,-0x5f(%rbp,%rax,1)
mov    -0x100(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100(%rbp)
jmp    1aef <main+0x98f>
jmp    1bd8 <main+0xa78>
jmp    1bdd <main+0xa7d>
lea    0x5ae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x104(%rbp)
cmpl   $0x6,-0x104(%rbp)
jge    1d34 <main+0xbd4>
movslq -0x104(%rbp),%rax
movzbl -0x5f(%rbp,%rax,1),%ecx
and    $0x80,%ecx
mov    $0x30,%esi
mov    $0x31,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
movslq -0x104(%rbp),%rax
movzbl -0x5f(%rbp,%rax,1),%ecx
and    $0x40,%ecx
mov    $0x30,%edx
mov    $0x31,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
movslq -0x104(%rbp),%rax
movzbl -0x5f(%rbp,%rax,1),%edi
and    $0x20,%edi
mov    $0x30,%ecx
mov    $0x31,%eax
cmp    $0x0,%edi
cmovne %eax,%ecx
movslq -0x104(%rbp),%rax
movzbl -0x5f(%rbp,%rax,1),%edi
and    $0x10,%edi
mov    $0x30,%r8d
mov    $0x31,%eax
cmp    $0x0,%edi
cmovne %eax,%r8d
movslq -0x104(%rbp),%rax
movzbl -0x5f(%rbp,%rax,1),%edi
and    $0x8,%edi
mov    $0x30,%r9d
mov    $0x31,%eax
cmp    $0x0,%edi
cmovne %eax,%r9d
movslq -0x104(%rbp),%rax
movzbl -0x5f(%rbp,%rax,1),%edi
and    $0x4,%edi
mov    $0x30,%r11d
mov    $0x31,%eax
cmp    $0x0,%edi
cmovne %eax,%r11d
movslq -0x104(%rbp),%rax
movzbl -0x5f(%rbp,%rax,1),%edi
and    $0x2,%edi
mov    $0x30,%r10d
mov    $0x31,%eax
cmp    $0x0,%edi
cmovne %eax,%r10d
movslq -0x104(%rbp),%rax
movzbl -0x5f(%rbp,%rax,1),%ebx
and    $0x1,%ebx
mov    $0x30,%eax
mov    $0x31,%edi
cmp    $0x0,%ebx
cmovne %edi,%eax
lea    0x498(%rip),%rdi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
jmp    1bf5 <main+0xa95>
mov    -0x4c(%rbp),%esi
lea    0x477(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x478(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x2,-0x108(%rbp)
mov    -0x108(%rbp),%eax
cmp    -0x48(%rbp),%eax
jge    1d8e <main+0xc2e>
lea    0x462(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    1d5d <main+0xbfd>
mov    -0x4c(%rbp),%eax
cmp    -0x48(%rbp),%eax
jle    1e0a <main+0xcaa>
lea    0x436(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x10c(%rbp)
mov    -0x10c(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    1de5 <main+0xc85>
lea    0x40b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
jmp    1db4 <main+0xc54>
movslq -0x48(%rbp),%rax
cmpl   $0x1,-0xe0(%rbp,%rax,4)
01
jle    1e05 <main+0xca5>
lea    0x3db(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1e18 <main+0xcb8>
lea    0x3c8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x371(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x198,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
lea    0xf1b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf24(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xf14(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf3f(%rip),%rdi
lea    0x5e(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x14(%rsp),%r14d
cmp    $0x8000,%r14d
jg     1a70 <main+0x920>
movb   $0x0,0xe(%rsp)
mov    %r14d,%edx
test   %r14d,%r14d
jne    11d9 <main+0x89>
lea    0xfd7(%rip),%rdi
call   1040 <puts@plt>
mov    0x14(%rsp),%edx
xor    %eax,%eax
test   %edx,%edx
jle    124a <main+0xfa>
lea    0xe1a(%rip),%r15
lea    0xee9(%rip),%r12
xor    %ebx,%ebx
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rbp
mov    $0xffffffff,%eax
mov    %ebx,%ecx
shl    %cl,%eax
add    %edx,%eax
mov    %eax,0x14(%rsp)
add    $0x1,%r13
mov    0x4(%r15,%rbp,4),%ebx
mov    $0x1,%edx
mov    %ebx,%ecx
shl    %cl,%edx
mov    %r12,%rdi
mov    %r13d,%esi
mov    %eax,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%rsp),%edx
cmp    $0x1e,%rbp
ja     1241 <main+0xf1>
test   %edx,%edx
jg     1200 <main+0xb0>
xor    %eax,%eax
test   %r14d,%r14d
jne    1252 <main+0x102>
jmp    126c <main+0x11c>
xor    %r13d,%r13d
test   %r14d,%r14d
je     126c <main+0x11c>
mov    %r13d,%eax
test   %edx,%edx
je     126c <main+0x11c>
mov    %r13d,%eax
lea    0xd9d(%rip),%rcx
mov    (%rcx,%rax,4),%eax
add    %r13d,%eax
add    $0x1,%eax
mov    %eax,0x2c(%rsp)
test   %r13d,%r13d
je     12d9 <main+0x189>
xor    %ebp,%ebp
mov    $0x0,%esi
cmp    $0x1,%r13d
je     12be <main+0x16e>
mov    %r13d,%ecx
and    $0xfffffffe,%ecx
xor    %ebp,%ebp
xor    %edi,%edi
nopl   0x0(%rax)
mov    %ebp,%eax
and    $0x6,%al
mov    %eax,%esi
xor    $0x7,%sil
bts    %esi,%edi
mov    %ebp,%esi
shr    $0x3,%rsi
xor    $0x6,%al
bts    %eax,%edi
mov    %dil,0xe(%rsp,%rsi,1)
add    $0x2,%ebp
mov    %ebp,%esi
and    $0x6,%esi
cmovne %edi,%esi
mov    %esi,%edi
cmp    %ebp,%ecx
jne    1290 <main+0x140>
test   $0x1,%r13b
je     12d9 <main+0x189>
mov    %ebp,%ecx
not    %cl
and    $0x7,%cl
bts    %ecx,%esi
mov    %ebp,%eax
shr    $0x3,%rax
mov    %sil,0xe(%rsp,%rax,1)
test   %edx,%edx
js     1451 <main+0x301>
lea    0xe76(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe7a(%rip),%r14
xor    %r15d,%r15d
nopl   0x0(%rax)
movzbl 0xe(%rsp,%r15,1),%ebp
mov    %ebp,%eax
and    $0xffffff80,%eax
cmp    $0x1,%eax
mov    $0x31,%esi
sbb    $0x0,%esi
mov    %ebp,%eax
and    $0x40,%eax
cmp    $0x1,%eax
mov    $0x31,%edx
sbb    $0x0,%edx
mov    %ebp,%eax
and    $0x20,%eax
cmp    $0x1,%eax
mov    $0x31,%ecx
sbb    $0x0,%ecx
mov    %ebp,%eax
and    $0x10,%eax
cmp    $0x1,%eax
mov    $0x31,%r8d
sbb    $0x0,%r8d
mov    %ebp,%eax
and    $0x8,%eax
cmp    $0x1,%eax
mov    $0x31,%r9d
sbb    $0x0,%r9d
mov    %ebp,%eax
and    $0x4,%eax
cmp    $0x1,%eax
mov    $0x31,%r10d
sbb    $0x0,%r10d
mov    %ebp,%eax
and    $0x2,%eax
cmp    $0x1,%eax
mov    $0x31,%ebx
sbb    $0x0,%ebx
and    $0x1,%ebp
or     $0x30,%ebp
sub    $0x8,%rsp
mov    %r14,%rdi
xor    %eax,%eax
push   %rbp
push   %rbx
push   %r10
call   1050 <printf@plt>
add    $0x20,%rsp
add    $0x1,%r15
cmp    $0x6,%r15
jne    1300 <main+0x1b0>
lea    0xdd4(%rip),%rdi
mov    0x2c(%rsp),%ebp
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdcf(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0x3,%r13d
jb     13ef <main+0x29f>
lea    -0x2(%r13),%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    13e0 <main+0x290>
mov    %ebp,%ebx
sub    %r13d,%ebx
jle    142c <main+0x2dc>
lea    0xda6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x3(%r13),%eax
cmp    %ebp,%eax
jge    141f <main+0x2cf>
add    $0xfffffffd,%ebx
nop
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1410 <main+0x2c0>
mov    %r13d,%eax
add    $0xfffffffffffffff8,%rax
cmp    $0x18,%rax
jae    1436 <main+0x2e6>
mov    $0x5e,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %esi,%esi
cmpb   $0x50,0x5e(%rsp)
setne  %sil
lea    0xc9b(%rip),%rdi
mov    %esi,0x28(%rsp)
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%rsp),%eax
mov    %eax,%esi
neg    %esi
lea    0xff(%rax),%ebx
test   %eax,%eax
cmovns %eax,%ebx
sar    $0x8,%ebx
neg    %ebx
mov    %ebx,%eax
and    $0x80,%eax
cmp    $0x1,%eax
mov    $0x31,%edx
sbb    $0x0,%edx
mov    %ebx,%eax
and    $0x40,%eax
cmp    $0x1,%eax
mov    $0x31,%ecx
sbb    $0x0,%ecx
mov    %ebx,%eax
and    $0x20,%eax
cmp    $0x1,%eax
mov    $0x31,%r8d
sbb    $0x0,%r8d
mov    %ebx,%eax
and    $0x10,%eax
cmp    $0x1,%eax
mov    $0x31,%r9d
sbb    $0x0,%r9d
mov    %ebx,%eax
and    $0x8,%eax
cmp    $0x1,%eax
mov    $0x31,%eax
sbb    $0x0,%eax
mov    %rax,0x18(%rsp)
mov    %ebx,%eax
and    $0x4,%eax
cmp    $0x1,%eax
mov    $0x31,%eax
sbb    $0x0,%eax
mov    %rax,0x20(%rsp)
mov    %ebx,%eax
and    $0x2,%eax
cmp    $0x1,%eax
mov    $0x31,%eax
sbb    $0x0,%eax
mov    %rax,0x50(%rsp)
and    $0x1,%ebx
or     $0x30,%ebx
mov    %esi,%eax
and    $0x80,%eax
cmp    $0x1,%eax
mov    $0x31,%eax
sbb    $0x0,%eax
mov    %rax,0x48(%rsp)
mov    %esi,%eax
and    $0x40,%eax
cmp    $0x1,%eax
mov    $0x31,%eax
sbb    $0x0,%eax
mov    %rax,0x40(%rsp)
mov    %esi,%eax
and    $0x20,%eax
cmp    $0x1,%eax
mov    $0x31,%eax
sbb    $0x0,%eax
mov    %rax,0x38(%rsp)
mov    %esi,%eax
and    $0x10,%eax
cmp    $0x1,%eax
mov    $0x31,%ebp
sbb    $0x0,%ebp
mov    %esi,%eax
and    $0x8,%eax
cmp    $0x1,%eax
mov    $0x31,%r14d
sbb    $0x0,%r14d
mov    %esi,%eax
and    $0x4,%eax
cmp    $0x1,%eax
mov    $0x31,%r15d
sbb    $0x0,%r15d
mov    %esi,%eax
and    $0x2,%eax
cmp    $0x1,%eax
mov    %esi,0x14(%rsp)
mov    $0x31,%r11d
sbb    $0x0,%r11d
mov    %esi,%r10d
and    $0x1,%r10d
or     $0x30,%r10d
mov    %r13d,%edi
mov    %rdi,0x30(%rsp)
lea    0xa4a(%rip),%rax
mov    (%rax,%rdi,4),%r12d
sub    $0x8,%rsp
lea    0xb4a(%rip),%rdi
xor    %eax,%eax
push   %r12
push   %r10
push   %r11
push   %r15
push   %r14
push   %rbp
push   0x70(%rsp)
push   0x80(%rsp)
push   0x90(%rsp)
push   %rbx
push   0xa8(%rsp)
push   0x80(%rsp)
push   0x80(%rsp)
call   1050 <printf@plt>
mov    0xa0(%rsp),%rcx
add    $0x70,%rsp
mov    0x14(%rsp),%eax
lea    0xff(%rax),%r14d
test   %eax,%eax
mov    %rax,0x18(%rsp)
cmovns %eax,%r14d
sar    $0x8,%r14d
lea    -0x19(%rcx),%rax
mov    %rax,0x20(%rsp)
cmp    $0x6,%rax
ja     172b <main+0x5db>
mov    $0x10,%eax
sub    %r12d,%eax
movzbl %r14b,%ebx
cmp    $0x8,%eax
mov    $0x7,%ebp
cmovge %eax,%ebp
neg    %ebp
lea    -0xf(%r12),%r15d
cs nopw 0x0(%rax,%rax,1)
lea    0x6(%r15),%eax
movzbl %al,%eax
bt     %eax,%ebx
mov    $0x31,%edi
adc    $0xffffffff,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r15d
cmp    %r15d,%ebp
jne    1660 <main+0x510>
mov    0x18(%rsp),%rbp
mov    %ebp,%eax
and    $0x80,%eax
cmp    $0x1,%eax
mov    $0x31,%ebx
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
mov    %ebp,%eax
and    $0x40,%eax
cmp    $0x1,%eax
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
mov    %ebp,%eax
and    $0x20,%eax
cmp    $0x1,%eax
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
mov    %ebp,%eax
and    $0x10,%eax
cmp    $0x1,%eax
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
mov    %ebp,%eax
and    $0x8,%eax
cmp    $0x1,%eax
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
mov    %ebp,%eax
and    $0x4,%eax
cmp    $0x1,%eax
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
mov    %ebp,%eax
and    $0x2,%eax
cmp    $0x1,%eax
sbb    $0x0,%ebx
mov    %ebx,%edi
call   1030 <putchar@plt>
mov    %ebp,%edi
and    $0x1,%edi
or     $0x30,%edi
call   1030 <putchar@plt>
jmp    1783 <main+0x633>
lea    -0x4(%rcx),%rax
cmp    $0x1b,%rax
ja     1783 <main+0x633>
mov    $0x8,%eax
sub    %r12d,%eax
movzbl 0x18(%rsp),%r15d
cmp    $0x8,%eax
mov    $0x7,%ebp
cmovge %eax,%ebp
add    $0xfffffff9,%ebp
lea    -0x1(%r12),%ebx
cs nopw 0x0(%rax,%rax,1)
bt     %ebx,%r15d
mov    $0x31,%edi
adc    $0xffffffff,%edi
call   1030 <putchar@plt>
lea    (%rbx,%rbp,1),%eax
add    $0xffffffff,%eax
mov    %ebx,%ecx
add    $0xffffffff,%ecx
mov    %ecx,%ebx
cmp    $0xffffffff,%eax
jne    1760 <main+0x610>
lea    0xa35(%rip),%rdi
call   1040 <puts@plt>
mov    0x30(%rsp),%rsi
mov    %rsi,%rax
mov    %r13d,%ecx
not    %cl
and    $0x7,%cl
mov    0x28(%rsp),%edx
shl    %cl,%edx
shr    $0x3,%rax
or     %dl,0xe(%rsp,%rax,1)
lea    (%r12,%r13,1),%r8d
cmpq   $0x7,0x20(%rsp)
jae    1814 <main+0x6c4>
lea    -0x7(%r8),%r9d
lea    0x1(%r13),%edx
cmp    %r9d,%edx
jge    18d3 <main+0x783>
movzbl %r14b,%edi
lea    -0x9(%r8),%r10d
mov    $0x55330f0f,%eax
bt     %rsi,%rax
jb     1860 <main+0x710>
mov    %edx,%eax
shr    $0x3,%rax
mov    %r10d,%ecx
sub    %r13d,%ecx
mov    $0x1,%ebx
shl    %cl,%ebx
and    %edi,%ebx
shr    %cl,%ebx
mov    %edx,%ecx
not    %cl
and    $0x7,%cl
shl    %cl,%ebx
or     %bl,0xe(%rsp,%rax,1)
lea    0x2(%r13),%ebx
cmp    $0x19,%r13d
jne    186b <main+0x71b>
jmp    18d3 <main+0x783>
cmp    %r8d,%r13d
jge    12e1 <main+0x191>
movzbl 0x18(%rsp),%eax
add    $0xffffffff,%r12d
lea    0x1(%r13),%edx
nopw   0x0(%rax,%rax,1)
mov    %edx,%esi
mov    $0x1,%edi
mov    %r12d,%ecx
shl    %cl,%edi
and    %eax,%edi
shr    %cl,%edi
mov    %edx,%ecx
not    %cl
and    $0x7,%cl
shl    %cl,%edi
shr    $0x3,%rsi
or     %dil,0xe(%rsp,%rsi,1)
add    $0x1,%edx
add    $0xffffffff,%r12d
jb     1830 <main+0x6e0>
jmp    12e1 <main+0x191>
mov    %edx,%ebx
mov    %r13d,%edx
cmp    $0x19,%r13d
je     18d3 <main+0x783>
mov    %r8d,%eax
sub    %ebx,%eax
add    $0xfffffff7,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%esi
mov    %r10d,%ecx
sub    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
and    %edi,%edx
shr    %cl,%edx
mov    %ebx,%ecx
not    %cl
and    $0x7,%cl
shl    %cl,%edx
shr    $0x3,%rsi
or     %dl,0xe(%rsp,%rsi,1)
lea    0x1(%rbx),%edx
mov    %rdx,%rsi
mov    $0x1,%ebp
mov    %eax,%ecx
shl    %cl,%ebp
and    %edi,%ebp
shr    %cl,%ebp
mov    %edx,%ecx
not    %cl
and    $0x7,%cl
shl    %cl,%ebp
shr    $0x3,%rsi
or     %bpl,0xe(%rsp,%rsi,1)
add    $0x2,%ebx
add    $0xfffffffe,%eax
cmp    $0xfffffffe,%eax
jne    1880 <main+0x730>
lea    0x7(%r9),%eax
test   %r9d,%r9d
cmovns %r9d,%eax
mov    %eax,%ecx
sar    $0x3,%ecx
movslq %ecx,%rdx
mov    0x18(%rsp),%rcx
mov    %ecx,%edi
shr    $0x7,%edi
and    $0x1,%edi
and    $0xfffffff8,%eax
sub    %eax,%r9d
mov    $0x7,%al
mov    $0x7,%cl
sub    %r9b,%cl
shl    %cl,%edi
or     %dil,0xe(%rsp,%rdx,1)
cmp    $0x80000006,%r8d
jle    12e1 <main+0x191>
lea    -0x6(%r8),%edx
lea    0x7(%rdx),%ecx
test   %edx,%edx
cmovns %edx,%ecx
mov    %ecx,%esi
sar    $0x3,%esi
movslq %esi,%rsi
mov    0x18(%rsp),%rbp
mov    %ebp,%edi
shr    $0x6,%edi
and    $0x1,%edi
and    $0xfffffff8,%ecx
sub    %ecx,%edx
mov    $0x7,%cl
sub    %dl,%cl
shl    %cl,%edi
or     %dil,0xe(%rsp,%rsi,1)
lea    -0x5(%r8),%ecx
lea    0x2(%r8),%edx
test   %ecx,%ecx
cmovns %ecx,%edx
mov    %edx,%ecx
sar    $0x3,%ecx
movslq %ecx,%rsi
mov    %ebp,%edi
shr    $0x5,%edi
and    $0x1,%edi
and    $0xfffffff8,%edx
neg    %edx
add    %r8d,%edx
add    $0xfffffffb,%edx
mov    $0x7,%cl
sub    %dl,%cl
shl    %cl,%edi
or     %dil,0xe(%rsp,%rsi,1)
lea    -0x4(%r8),%ecx
lea    0x3(%r8),%edx
test   %ecx,%ecx
cmovns %ecx,%edx
mov    %edx,%ecx
sar    $0x3,%ecx
movslq %ecx,%rsi
mov    %ebp,%edi
shr    $0x4,%edi
and    $0x1,%edi
and    $0xfffffff8,%edx
neg    %edx
add    %r8d,%edx
add    $0xfffffffc,%edx
mov    $0x7,%cl
sub    %dl,%cl
shl    %cl,%edi
or     %dil,0xe(%rsp,%rsi,1)
lea    -0x3(%r8),%ecx
lea    0x4(%r8),%edx
test   %ecx,%ecx
cmovns %ecx,%edx
mov    %edx,%ecx
sar    $0x3,%ecx
movslq %ecx,%rsi
mov    %ebp,%edi
shr    $0x3,%edi
and    $0x1,%edi
and    $0xfffffff8,%edx
neg    %edx
add    %r8d,%edx
add    $0xfffffffd,%edx
mov    $0x7,%cl
sub    %dl,%cl
shl    %cl,%edi
or     %dil,0xe(%rsp,%rsi,1)
lea    -0x2(%r8),%ecx
lea    0x5(%r8),%edx
test   %ecx,%ecx
cmovns %ecx,%edx
mov    %edx,%ecx
sar    $0x3,%ecx
movslq %ecx,%rsi
mov    %ebp,%edi
shr    $0x2,%edi
and    $0x1,%edi
and    $0xfffffff8,%edx
neg    %edx
add    %r8d,%edx
add    $0xfffffffe,%edx
mov    $0x7,%cl
sub    %dl,%cl
shl    %cl,%edi
or     %dil,0xe(%rsp,%rsi,1)
lea    -0x1(%r8),%ecx
lea    0x6(%r8),%edx
test   %ecx,%ecx
cmovns %ecx,%edx
mov    %edx,%esi
sar    $0x3,%esi
mov    %ebp,%edi
shr    %edi
and    $0x1,%edi
and    $0xfffffff8,%edx
neg    %edx
add    %r8d,%edx
add    $0xffffffff,%edx
mov    $0x7,%cl
sub    %dl,%cl
shl    %cl,%edi
movslq %esi,%rcx
or     %dil,0xe(%rsp,%rcx,1)
lea    0x7(%r8),%ecx
test   %r8d,%r8d
cmovns %r8d,%ecx
mov    %ecx,%edx
sar    $0x3,%edx
and    $0x1,%ebp
and    $0xfffffff8,%ecx
sub    %ecx,%r8d
sub    %r8b,%al
mov    %eax,%ecx
shl    %cl,%ebp
movslq %edx,%rax
or     %bpl,0xe(%rsp,%rax,1)
jmp    12e1 <main+0x191>
lea    0x74b(%rip),%rdi
call   1040 <puts@plt>
mov    $0xff,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@__const.main.J = [32 x i32] [i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1, i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3, i32 4, i32 4, i32 5, i32 5, i32 6, i32 6, i32 7, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15]
@.str = [23 x i8] c">> Largo de la racha: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [57 x i8] c">> Interrumpida por: [P]ixel distinto / [F]in de fila : \00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [21 x i8] c"Are you kidding me?\0A\00"
@.str.6 = [25 x i8] c">> Racha de largo nulo.\0A\00"
@.str.7 = [40 x i8] c">> i = %02d - kr = %05d - resto = %03d\0A\00"
@.str.8 = [2 x i8] c"P\00"
@.str.9 = [17 x i8] c">> prefijo = %d\0A\00"
@.str.10 = [79 x i8] c">> resto = %d = %c%c%c%c%c%c%c%c %c%c%c%c%c%c%c%cb representado con %d bits = \00"
@.str.11 = [3 x i8] c"%c\00"
@.str.12 = [4 x i8] c"b\0A\0A\00"
@.str.13 = [18 x i8] c">> Tira de bits: \00"
@.str.14 = [17 x i8] c"%c%c%c%c%c%c%c%c\00"
@.str.15 = [15 x i8] c"b - Largo: %d\0A\00"
@.str.16 = [19 x i8] c" \00"
@.str.17 = [2 x i8] c" \00"
@.str.18 = [4 x i8] c" ^^\00"
@.str.19 = [2 x i8] c"^\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [10 x i8]
%12 = alloca [2 x i8]
%13 = alloca i8
%14 = alloca [6 x i8]
%15 = alloca i8
%16 = alloca [32 x 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 i32
%27 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
store i32 0, i32* %9
store i32 -1, i32* %10
%28 = bitcast [2 x i8]* %12 to i8*
store i8 0, i8* %15
%29 = bitcast [32 x i32]* %16 to i8*
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%31 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%33 = getelementptr inbounds [10 x i8], [10 x i8]* %11, i64 0, i64 0
%34 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%36 = load i32, i32* %6
%37 = icmp sgt i32 %36, 32768
br i1 %37, label %38, label %40
38: ; preds = %2
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
unreachable
40: ; preds = %2
store i32 0, i32* %17
br label %41
41: ; preds = %48, %40
%42 = load i32, i32* %17
%43 = icmp slt i32 %42, 6
br i1 %43, label %44, label %51
44: ; preds = %41
%45 = load i32, i32* %9
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %46
store i8 0, i8* %47
br label %48
48: ; preds = %44
%49 = load i32, i32* %17
%50 = add nsw i32 %49, 1
store i32 %50, i32* %17
br label %41
51: ; preds = %41
%52 = load i32, i32* %6
%53 = icmp ne i32 %52, 0
br i1 %53, label %56, label %54
54: ; preds = %51
store i32 0, i32* %10
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
br label %56
56: ; preds = %54, %51
br label %57
57: ; preds = %66, %56
%58 = load i32, i32* %6
%59 = icmp sgt i32 %58, 0
%60 = zext i1 %59 to i32
%61 = load i32, i32* %9
%62 = icmp slt i32 %61, 32
%63 = zext i1 %62 to i32
%64 = and i32 %60, %63
%65 = icmp ne i32 %64, 0
br i1 %65, label %66, label %84
66: ; preds = %57
%67 = load i32, i32* %9
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %68
%70 = load i32, i32* %69
%71 = shl i32 1, %70
%72 = load i32, i32* %6
%73 = sub nsw i32 %72, %71
store i32 %73, i32* %6
%74 = load i32, i32* %9
%75 = add nsw i32 %74, 1
store i32 %75, i32* %9
%76 = load i32, i32* %9
%77 = load i32, i32* %9
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %78
%80 = load i32, i32* %79
%81 = shl i32 1, %80
%82 = load i32, i32* %6
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0), i32 %76, i32 %81, i32 %82)
br label %57
84: ; preds = %57
%85 = load i32, i32* %10
%86 = icmp eq i32 %85, -1
br i1 %86, label %87, label %101
87: ; preds = %84
%88 = load i32, i32* %6
%89 = icmp ne i32 %88, 0
br i1 %89, label %90, label %98
90: ; preds = %87
%91 = load i32, i32* %9
%92 = add nsw i32 %91, 1
%93 = load i32, i32* %9
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %94
%96 = load i32, i32* %95
%97 = add nsw i32 %92, %96
store i32 %97, i32* %10
br label %100
98: ; preds = %87
%99 = load i32, i32* %9
store i32 %99, i32* %10
br label %100
100: ; preds = %98, %90
br label %101
101: ; preds = %100, %84
store i32 0, i32* %18
br label %102
102: ; preds = %126, %101
%103 = load i32, i32* %18
%104 = load i32, i32* %9
%105 = icmp slt i32 %103, %104
br i1 %105, label %106, label %129
106: ; preds = %102
%107 = load i8, i8* %15
%108 = zext i8 %107 to i32
%109 = load i32, i32* %18
%110 = srem i32 %109, 8
%111 = sub nsw i32 7, %110
%112 = shl i32 1, %111
%113 = or i32 %108, %112
%114 = trunc i32 %113 to i8
store i8 %114, i8* %15
%115 = load i8, i8* %15
%116 = load i32, i32* %18
%117 = sdiv i32 %116, 8
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %118
store i8 %115, i8* %119
%120 = load i32, i32* %18
%121 = add nsw i32 %120, 1
%122 = srem i32 %121, 8
%123 = icmp ne i32 %122, 0
br i1 %123, label %125, label %124
124: ; preds = %106
store i8 0, i8* %15
br label %125
125: ; preds = %124, %106
br label %126
126: ; preds = %125
%127 = load i32, i32* %18
%128 = add nsw i32 %127, 1
store i32 %128, i32* %18
br label %102
129: ; preds = %102
%130 = load i32, i32* %6
%131 = icmp slt i32 %130, 0
br i1 %131, label %132, label %581
132: ; preds = %129
%133 = getelementptr inbounds [10 x i8], [10 x i8]* %11, i64 0, i64 0
%134 = call i32 @strncmp(i8* %133, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i64 1)
%135 = icmp ne i32 %134, 0
%136 = xor i1 %135, true
%137 = zext i1 %136 to i64
%138 = select i1 %136, i32 0, i32 1
store i32 %138, i32* %7
%139 = load i32, i32* %7
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i32 %139)
%141 = load i32, i32* %6
%142 = mul nsw i32 %141, -1
store i32 %142, i32* %6
%143 = load i32, i32* %6
%144 = load i32, i32* %6
%145 = sdiv i32 %144, 256
%146 = trunc i32 %145 to i8
%147 = zext i8 %146 to i32
%148 = and i32 %147, 128
%149 = icmp ne i32 %148, 0
%150 = zext i1 %149 to i64
%151 = select i1 %149, i32 49, i32 48
%152 = load i32, i32* %6
%153 = sdiv i32 %152, 256
%154 = trunc i32 %153 to i8
%155 = zext i8 %154 to i32
%156 = and i32 %155, 64
%157 = icmp ne i32 %156, 0
%158 = zext i1 %157 to i64
%159 = select i1 %157, i32 49, i32 48
%160 = load i32, i32* %6
%161 = sdiv i32 %160, 256
%162 = trunc i32 %161 to i8
%163 = zext i8 %162 to i32
%164 = and i32 %163, 32
%165 = icmp ne i32 %164, 0
%166 = zext i1 %165 to i64
%167 = select i1 %165, i32 49, i32 48
%168 = load i32, i32* %6
%169 = sdiv i32 %168, 256
%170 = trunc i32 %169 to i8
%171 = zext i8 %170 to i32
%172 = and i32 %171, 16
%173 = icmp ne i32 %172, 0
%174 = zext i1 %173 to i64
%175 = select i1 %173, i32 49, i32 48
%176 = load i32, i32* %6
%177 = sdiv i32 %176, 256
%178 = trunc i32 %177 to i8
%179 = zext i8 %178 to i32
%180 = and i32 %179, 8
%181 = icmp ne i32 %180, 0
%182 = zext i1 %181 to i64
%183 = select i1 %181, i32 49, i32 48
%184 = load i32, i32* %6
%185 = sdiv i32 %184, 256
%186 = trunc i32 %185 to i8
%187 = zext i8 %186 to i32
%188 = and i32 %187, 4
%189 = icmp ne i32 %188, 0
%190 = zext i1 %189 to i64
%191 = select i1 %189, i32 49, i32 48
%192 = load i32, i32* %6
%193 = sdiv i32 %192, 256
%194 = trunc i32 %193 to i8
%195 = zext i8 %194 to i32
%196 = and i32 %195, 2
%197 = icmp ne i32 %196, 0
%198 = zext i1 %197 to i64
%199 = select i1 %197, i32 49, i32 48
%200 = load i32, i32* %6
%201 = sdiv i32 %200, 256
%202 = trunc i32 %201 to i8
%203 = zext i8 %202 to i32
%204 = and i32 %203, 1
%205 = icmp ne i32 %204, 0
%206 = zext i1 %205 to i64
%207 = select i1 %205, i32 49, i32 48
%208 = load i32, i32* %6
%209 = trunc i32 %208 to i8
%210 = zext i8 %209 to i32
%211 = and i32 %210, 128
%212 = icmp ne i32 %211, 0
%213 = zext i1 %212 to i64
%214 = select i1 %212, i32 49, i32 48
%215 = load i32, i32* %6
%216 = trunc i32 %215 to i8
%217 = zext i8 %216 to i32
%218 = and i32 %217, 64
%219 = icmp ne i32 %218, 0
%220 = zext i1 %219 to i64
%221 = select i1 %219, i32 49, i32 48
%222 = load i32, i32* %6
%223 = trunc i32 %222 to i8
%224 = zext i8 %223 to i32
%225 = and i32 %224, 32
%226 = icmp ne i32 %225, 0
%227 = zext i1 %226 to i64
%228 = select i1 %226, i32 49, i32 48
%229 = load i32, i32* %6
%230 = trunc i32 %229 to i8
%231 = zext i8 %230 to i32
%232 = and i32 %231, 16
%233 = icmp ne i32 %232, 0
%234 = zext i1 %233 to i64
%235 = select i1 %233, i32 49, i32 48
%236 = load i32, i32* %6
%237 = trunc i32 %236 to i8
%238 = zext i8 %237 to i32
%239 = and i32 %238, 8
%240 = icmp ne i32 %239, 0
%241 = zext i1 %240 to i64
%242 = select i1 %240, i32 49, i32 48
%243 = load i32, i32* %6
%244 = trunc i32 %243 to i8
%245 = zext i8 %244 to i32
%246 = and i32 %245, 4
%247 = icmp ne i32 %246, 0
%248 = zext i1 %247 to i64
%249 = select i1 %247, i32 49, i32 48
%250 = load i32, i32* %6
%251 = trunc i32 %250 to i8
%252 = zext i8 %251 to i32
%253 = and i32 %252, 2
%254 = icmp ne i32 %253, 0
%255 = zext i1 %254 to i64
%256 = select i1 %254, i32 49, i32 48
%257 = load i32, i32* %6
%258 = trunc i32 %257 to i8
%259 = zext i8 %258 to i32
%260 = and i32 %259, 1
%261 = icmp ne i32 %260, 0
%262 = zext i1 %261 to i64
%263 = select i1 %261, i32 49, i32 48
%264 = load i32, i32* %9
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %265
%267 = load i32, i32* %266
%268 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.10, i64 0, i64 0), i32 %143, i32 %151, i32 %159, i32 %167, i32 %175, i32 %183, i32 %191, i32 %199, i32 %207, i32 %214, i32 %221, i32 %228, i32 %235, i32 %242, i32 %249, i32 %256, i32 %263, i32 %267)
%269 = load i32, i32* %6
%270 = sdiv i32 %269, 256
%271 = trunc i32 %270 to i8
%272 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 0
store i8 %271, i8* %272
%273 = load i32, i32* %6
%274 = srem i32 %273, 256
%275 = trunc i32 %274 to i8
%276 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 1
store i8 %275, i8* %276
%277 = load i32, i32* %9
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %278
%280 = load i32, i32* %279
%281 = icmp sgt i32 %280, 8
br i1 %281, label %282, label %340
282: ; preds = %132
%283 = load i32, i32* %9
%284 = sext i32 %283 to i64
%285 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %284
%286 = load i32, i32* %285
%287 = sub nsw i32 16, %286
store i32 %287, i32* %19
br label %288
288: ; preds = %310, %282
%289 = load i32, i32* %19
%290 = icmp slt i32 %289, 8
br i1 %290, label %291, label %313
291: ; preds = %288
%292 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 0
%293 = load i8, i8* %292
%294 = zext i8 %293 to i32
%295 = load i32, i32* %19
%296 = sub nsw i32 7, %295
%297 = shl i32 1, %296
%298 = and i32 %294, %297
%299 = load i32, i32* %19
%300 = sub nsw i32 7, %299
%301 = ashr i32 %298, %300
%302 = and i32 %301, 1
%303 = trunc i32 %302 to i8
store i8 %303, i8* %13
%304 = load i8, i8* %13
%305 = zext i8 %304 to i32
%306 = icmp eq i32 %305, 1
%307 = zext i1 %306 to i64
%308 = select i1 %306, i32 49, i32 48
%309 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32 %308)
br label %310
310: ; preds = %291
%311 = load i32, i32* %19
%312 = add nsw i32 %311, 1
store i32 %312, i32* %19
br label %288
313: ; preds = %288
store i32 0, i32* %20
br label %314
314: ; preds = %336, %313
%315 = load i32, i32* %20
%316 = icmp slt i32 %315, 8
br i1 %316, label %317, label %339
317: ; preds = %314
%318 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 1
%319 = load i8, i8* %318
%320 = zext i8 %319 to i32
%321 = load i32, i32* %20
%322 = sub nsw i32 7, %321
%323 = shl i32 1, %322
%324 = and i32 %320, %323
%325 = load i32, i32* %20
%326 = sub nsw i32 7, %325
%327 = ashr i32 %324, %326
%328 = and i32 %327, 1
%329 = trunc i32 %328 to i8
store i8 %329, i8* %13
%330 = load i8, i8* %13
%331 = zext i8 %330 to i32
%332 = icmp eq i32 %331, 1
%333 = zext i1 %332 to i64
%334 = select i1 %332, i32 49, i32 48
%335 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32 %334)
br label %336
336: ; preds = %317
%337 = load i32, i32* %20
%338 = add nsw i32 %337, 1
store i32 %338, i32* %20
br label %314
339: ; preds = %314
br label %372
340: ; preds = %132
%341 = load i32, i32* %9
%342 = sext i32 %341 to i64
%343 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %342
%344 = load i32, i32* %343
%345 = sub nsw i32 8, %344
store i32 %345, i32* %21
br label %346
346: ; preds = %368, %340
%347 = load i32, i32* %21
%348 = icmp slt i32 %347, 8
br i1 %348, label %349, label %371
349: ; preds = %346
%350 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 1
%351 = load i8, i8* %350
%352 = zext i8 %351 to i32
%353 = load i32, i32* %21
%354 = sub nsw i32 7, %353
%355 = shl i32 1, %354
%356 = and i32 %352, %355
%357 = load i32, i32* %21
%358 = sub nsw i32 7, %357
%359 = ashr i32 %356, %358
%360 = and i32 %359, 1
%361 = trunc i32 %360 to i8
store i8 %361, i8* %13
%362 = load i8, i8* %13
%363 = zext i8 %362 to i32
%364 = icmp eq i32 %363, 1
%365 = zext i1 %364 to i64
%366 = select i1 %364, i32 49, i32 48
%367 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32 %366)
br label %368
368: ; preds = %349
%369 = load i32, i32* %21
%370 = add nsw i32 %369, 1
store i32 %370, i32* %21
br label %346
371: ; preds = %346
br label %372
372: ; preds = %371, %339
%373 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%374 = load i32, i32* %9
%375 = sdiv i32 %374, 8
%376 = sext i32 %375 to i64
%377 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %376
%378 = load i8, i8* %377
%379 = zext i8 %378 to i32
%380 = load i32, i32* %7
%381 = load i32, i32* %9
%382 = srem i32 %381, 8
%383 = sub nsw i32 7, %382
%384 = shl i32 %380, %383
%385 = or i32 %379, %384
%386 = trunc i32 %385 to i8
%387 = load i32, i32* %9
%388 = sdiv i32 %387, 8
%389 = sext i32 %388 to i64
%390 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %389
store i8 %386, i8* %390
%391 = load i32, i32* %9
%392 = sext i32 %391 to i64
%393 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %392
%394 = load i32, i32* %393
%395 = icmp sgt i32 %394, 8
br i1 %395, label %396, label %520
396: ; preds = %372
%397 = load i32, i32* %9
%398 = add nsw i32 %397, 1
store i32 %398, i32* %22
br label %399
399: ; preds = %452, %396
%400 = load i32, i32* %22
%401 = load i32, i32* %9
%402 = load i32, i32* %9
%403 = sext i32 %402 to i64
%404 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %403
%405 = load i32, i32* %404
%406 = add nsw i32 %401, %405
%407 = sub nsw i32 %406, 7
%408 = icmp slt i32 %400, %407
br i1 %408, label %409, label %455
409: ; preds = %399
%410 = load i32, i32* %22
%411 = sdiv i32 %410, 8
%412 = sext i32 %411 to i64
%413 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %412
%414 = load i8, i8* %413
%415 = zext i8 %414 to i32
%416 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 0
%417 = load i8, i8* %416
%418 = zext i8 %417 to i32
%419 = load i32, i32* %9
%420 = sext i32 %419 to i64
%421 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %420
%422 = load i32, i32* %421
%423 = sub nsw i32 15, %422
%424 = load i32, i32* %22
%425 = add nsw i32 %423, %424
%426 = load i32, i32* %9
%427 = sub nsw i32 %425, %426
%428 = sub nsw i32 7, %427
%429 = shl i32 1, %428
%430 = and i32 %418, %429
%431 = load i32, i32* %9
%432 = sext i32 %431 to i64
%433 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %432
%434 = load i32, i32* %433
%435 = sub nsw i32 15, %434
%436 = load i32, i32* %22
%437 = add nsw i32 %435, %436
%438 = load i32, i32* %9
%439 = sub nsw i32 %437, %438
%440 = sub nsw i32 7, %439
%441 = ashr i32 %430, %440
%442 = load i32, i32* %22
%443 = srem i32 %442, 8
%444 = sub nsw i32 7, %443
%445 = shl i32 %441, %444
%446 = or i32 %415, %445
%447 = trunc i32 %446 to i8
%448 = load i32, i32* %22
%449 = sdiv i32 %448, 8
%450 = sext i32 %449 to i64
%451 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %450
store i8 %447, i8* %451
br label %452
452: ; preds = %409
%453 = load i32, i32* %22
%454 = add nsw i32 %453, 1
store i32 %454, i32* %22
br label %399
455: ; preds = %399
%456 = load i32, i32* %9
%457 = load i32, i32* %9
%458 = sext i32 %457 to i64
%459 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %458
%460 = load i32, i32* %459
%461 = add nsw i32 %456, %460
%462 = sub nsw i32 %461, 7
store i32 %462, i32* %23
br label %463
463: ; preds = %516, %455
%464 = load i32, i32* %23
%465 = load i32, i32* %9
%466 = load i32, i32* %9
%467 = sext i32 %466 to i64
%468 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %467
%469 = load i32, i32* %468
%470 = add nsw i32 %465, %469
%471 = add nsw i32 %470, 1
%472 = icmp slt i32 %464, %471
br i1 %472, label %473, label %519
473: ; preds = %463
%474 = load i32, i32* %23
%475 = sdiv i32 %474, 8
%476 = sext i32 %475 to i64
%477 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %476
%478 = load i8, i8* %477
%479 = zext i8 %478 to i32
%480 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 1
%481 = load i8, i8* %480
%482 = zext i8 %481 to i32
%483 = load i32, i32* %9
%484 = sext i32 %483 to i64
%485 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %484
%486 = load i32, i32* %485
%487 = sub nsw i32 7, %486
%488 = load i32, i32* %23
%489 = add nsw i32 %487, %488
%490 = load i32, i32* %9
%491 = sub nsw i32 %489, %490
%492 = sub nsw i32 7, %491
%493 = shl i32 1, %492
%494 = and i32 %482, %493
%495 = load i32, i32* %9
%496 = sext i32 %495 to i64
%497 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %496
%498 = load i32, i32* %497
%499 = sub nsw i32 7, %498
%500 = load i32, i32* %23
%501 = add nsw i32 %499, %500
%502 = load i32, i32* %9
%503 = sub nsw i32 %501, %502
%504 = sub nsw i32 7, %503
%505 = ashr i32 %494, %504
%506 = load i32, i32* %23
%507 = srem i32 %506, 8
%508 = sub nsw i32 7, %507
%509 = shl i32 %505, %508
%510 = or i32 %479, %509
%511 = trunc i32 %510 to i8
%512 = load i32, i32* %23
%513 = sdiv i32 %512, 8
%514 = sext i32 %513 to i64
%515 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %514
store i8 %511, i8* %515
br label %516
516: ; preds = %473
%517 = load i32, i32* %23
%518 = add nsw i32 %517, 1
store i32 %518, i32* %23
br label %463
519: ; preds = %463
br label %580
520: ; preds = %372
%521 = load i32, i32* %9
%522 = add nsw i32 %521, 1
store i32 %522, i32* %24
br label %523
523: ; preds = %576, %520
%524 = load i32, i32* %24
%525 = load i32, i32* %9
%526 = load i32, i32* %9
%527 = sext i32 %526 to i64
%528 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %527
%529 = load i32, i32* %528
%530 = add nsw i32 %525, %529
%531 = add nsw i32 %530, 1
%532 = icmp slt i32 %524, %531
br i1 %532, label %533, label %579
533: ; preds = %523
%534 = load i32, i32* %24
%535 = sdiv i32 %534, 8
%536 = sext i32 %535 to i64
%537 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %536
%538 = load i8, i8* %537
%539 = zext i8 %538 to i32
%540 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 1
%541 = load i8, i8* %540
%542 = zext i8 %541 to i32
%543 = load i32, i32* %9
%544 = sext i32 %543 to i64
%545 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %544
%546 = load i32, i32* %545
%547 = sub nsw i32 7, %546
%548 = load i32, i32* %24
%549 = add nsw i32 %547, %548
%550 = load i32, i32* %9
%551 = sub nsw i32 %549, %550
%552 = sub nsw i32 7, %551
%553 = shl i32 1, %552
%554 = and i32 %542, %553
%555 = load i32, i32* %9
%556 = sext i32 %555 to i64
%557 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %556
%558 = load i32, i32* %557
%559 = sub nsw i32 7, %558
%560 = load i32, i32* %24
%561 = add nsw i32 %559, %560
%562 = load i32, i32* %9
%563 = sub nsw i32 %561, %562
%564 = sub nsw i32 7, %563
%565 = ashr i32 %554, %564
%566 = load i32, i32* %24
%567 = srem i32 %566, 8
%568 = sub nsw i32 7, %567
%569 = shl i32 %565, %568
%570 = or i32 %539, %569
%571 = trunc i32 %570 to i8
%572 = load i32, i32* %24
%573 = sdiv i32 %572, 8
%574 = sext i32 %573 to i64
%575 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %574
store i8 %571, i8* %575
br label %576
576: ; preds = %533
%577 = load i32, i32* %24
%578 = add nsw i32 %577, 1
store i32 %578, i32* %24
br label %523
579: ; preds = %523
br label %580
580: ; preds = %579, %519
br label %581
581: ; preds = %580, %129
%582 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %25
br label %583
583: ; preds = %660, %581
%584 = load i32, i32* %25
%585 = icmp slt i32 %584, 6
br i1 %585, label %586, label %663
586: ; preds = %583
%587 = load i32, i32* %25
%588 = sext i32 %587 to i64
%589 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %588
%590 = load i8, i8* %589
%591 = zext i8 %590 to i32
%592 = and i32 %591, 128
%593 = icmp ne i32 %592, 0
%594 = zext i1 %593 to i64
%595 = select i1 %593, i32 49, i32 48
%596 = load i32, i32* %25
%597 = sext i32 %596 to i64
%598 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %597
%599 = load i8, i8* %598
%600 = zext i8 %599 to i32
%601 = and i32 %600, 64
%602 = icmp ne i32 %601, 0
%603 = zext i1 %602 to i64
%604 = select i1 %602, i32 49, i32 48
%605 = load i32, i32* %25
%606 = sext i32 %605 to i64
%607 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %606
%608 = load i8, i8* %607
%609 = zext i8 %608 to i32
%610 = and i32 %609, 32
%611 = icmp ne i32 %610, 0
%612 = zext i1 %611 to i64
%613 = select i1 %611, i32 49, i32 48
%614 = load i32, i32* %25
%615 = sext i32 %614 to i64
%616 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %615
%617 = load i8, i8* %616
%618 = zext i8 %617 to i32
%619 = and i32 %618, 16
%620 = icmp ne i32 %619, 0
%621 = zext i1 %620 to i64
%622 = select i1 %620, i32 49, i32 48
%623 = load i32, i32* %25
%624 = sext i32 %623 to i64
%625 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %624
%626 = load i8, i8* %625
%627 = zext i8 %626 to i32
%628 = and i32 %627, 8
%629 = icmp ne i32 %628, 0
%630 = zext i1 %629 to i64
%631 = select i1 %629, i32 49, i32 48
%632 = load i32, i32* %25
%633 = sext i32 %632 to i64
%634 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %633
%635 = load i8, i8* %634
%636 = zext i8 %635 to i32
%637 = and i32 %636, 4
%638 = icmp ne i32 %637, 0
%639 = zext i1 %638 to i64
%640 = select i1 %638, i32 49, i32 48
%641 = load i32, i32* %25
%642 = sext i32 %641 to i64
%643 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %642
%644 = load i8, i8* %643
%645 = zext i8 %644 to i32
%646 = and i32 %645, 2
%647 = icmp ne i32 %646, 0
%648 = zext i1 %647 to i64
%649 = select i1 %647, i32 49, i32 48
%650 = load i32, i32* %25
%651 = sext i32 %650 to i64
%652 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 %651
%653 = load i8, i8* %652
%654 = zext i8 %653 to i32
%655 = and i32 %654, 1
%656 = icmp ne i32 %655, 0
%657 = zext i1 %656 to i64
%658 = select i1 %656, i32 49, i32 48
%659 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0), i32 %595, i32 %604, i32 %613, i32 %622, i32 %631, i32 %640, i32 %649, i32 %658)
br label %660
660: ; preds = %586
%661 = load i32, i32* %25
%662 = add nsw i32 %661, 1
store i32 %662, i32* %25
br label %583
663: ; preds = %583
%664 = load i32, i32* %10
%665 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), i32 %664)
%666 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0))
store i32 2, i32* %26
br label %667
667: ; preds = %673, %663
%668 = load i32, i32* %26
%669 = load i32, i32* %9
%670 = icmp slt i32 %668, %669
br i1 %670, label %671, label %676
671: ; preds = %667
%672 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
br label %673
673: ; preds = %671
%674 = load i32, i32* %26
%675 = add nsw i32 %674, 1
store i32 %675, i32* %26
br label %667
676: ; preds = %667
%677 = load i32, i32* %10
%678 = load i32, i32* %9
%679 = icmp sgt i32 %677, %678
br i1 %679, label %680, label %702
680: ; preds = %676
%681 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0))
%682 = load i32, i32* %9
%683 = add nsw i32 %682, 3
store i32 %683, i32* %27
br label %684
684: ; preds = %690, %680
%685 = load i32, i32* %27
%686 = load i32, i32* %10
%687 = icmp slt i32 %685, %686
br i1 %687, label %688, label %693
688: ; preds = %684
%689 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
br label %690
690: ; preds = %688
%691 = load i32, i32* %27
%692 = add nsw i32 %691, 1
store i32 %692, i32* %27
br label %684
693: ; preds = %684
%694 = load i32, i32* %9
%695 = sext i32 %694 to i64
%696 = getelementptr inbounds [32 x i32], [32 x i32]* %16, i64 0, i64 %695
%697 = load i32, i32* %696
%698 = icmp sgt i32 %697, 1
br i1 %698, label %699, label %701
699: ; preds = %693
%700 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0))
br label %701
701: ; preds = %699, %693
br label %704
702: ; preds = %676
%703 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0))
br label %704
704: ; preds = %702, %701
%705 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%706 = load i32, i32* %3
ret i32 %706
}

LLVM IR (-O2):
@__const.main.J = [32 x i32] [i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1, i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3, i32 4, i32 4, i32 5, i32 5, i32 6, i32 6, i32 7, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15]
@.str = [23 x i8] c">> Largo de la racha: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [57 x i8] c">> Interrumpida por: [P]ixel distinto / [F]in de fila : \00"
@.str.3 = [3 x i8] c"%s\00"
@.str.7 = [40 x i8] c">> i = %02d - kr = %05d - resto = %03d\0A\00"
@.str.9 = [17 x i8] c">> prefijo = %d\0A\00"
@.str.10 = [79 x i8] c">> resto = %d = %c%c%c%c%c%c%c%c %c%c%c%c%c%c%c%cb representado con %d bits = \00"
@.str.13 = [18 x i8] c">> Tira de bits: \00"
@.str.14 = [17 x i8] c"%c%c%c%c%c%c%c%c\00"
@.str.15 = [15 x i8] c"b - Largo: %d\0A\00"
@.str.16 = [19 x i8] c" \00"
@.str.18 = [4 x i8] c" ^^\00"
@str = [24 x i8] c">> Racha de largo nulo.\00"
@str.20 = [3 x i8] c"b\0A\00"
@str.21 = [20 x i8] c"Are you kidding me?\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca [10 x i8]
%5 = alloca [6 x i8]
%6 = bitcast i32* %3 to i8*
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 0
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%13 = call i32 @putchar(i32 10)
%14 = load i32, i32* %3
%15 = icmp sgt i32 %14, 32768
br i1 %15, label %18, label %16
16: ; preds = %2
store i8 0, i8* %8
%17 = icmp eq i32 %14, 0
br i1 %17, label %20, label %23
18: ; preds = %2
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.21, i64 0, i64 0))
unreachable
20: ; preds = %16
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%22 = load i32, i32* %3
br label %23
23: ; preds = %20, %16
%24 = phi i32 [ %22, %20 ], [ %14, %16 ]
%25 = icmp sgt i32 %24, 0
br i1 %25, label %26, label %44
26: ; preds = %23, %26
%27 = phi i32 [ %34, %26 ], [ 0, %23 ]
%28 = phi i64 [ %32, %26 ], [ 0, %23 ]
%29 = phi i32 [ %38, %26 ], [ %24, %23 ]
%30 = shl nsw i32 -1, %27
%31 = add i32 %30, %29
store i32 %31, i32* %3
%32 = add nuw nsw i64 %28, 1
%33 = getelementptr inbounds [32 x i32], [32 x i32]* @__const.main.J, i64 0, i64 %32
%34 = load i32, i32* %33
%35 = shl nuw i32 1, %34
%36 = trunc i64 %32 to i32
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0), i32 %36, i32 %35, i32 %31)
%38 = load i32, i32* %3
%39 = icmp sgt i32 %38, 0
%40 = icmp ult i64 %28, 31
%41 = and i1 %40, %39
br i1 %41, label %26, label %42
42: ; preds = %26
%43 = trunc i64 %32 to i32
br label %44
44: ; preds = %42, %23
%45 = phi i32 [ 0, %23 ], [ %43, %42 ]
%46 = phi i32 [ %24, %23 ], [ %38, %42 ]
br i1 %17, label %55, label %47
47: ; preds = %44
%48 = icmp eq i32 %46, 0
br i1 %48, label %55, label %49
49: ; preds = %47
%50 = add nuw nsw i32 %45, 1
%51 = zext i32 %45 to i64
%52 = getelementptr inbounds [32 x i32], [32 x i32]* @__const.main.J, i64 0, i64 %51
%53 = load i32, i32* %52
%54 = add nsw i32 %50, %53
br label %55
55: ; preds = %47, %49, %44
%56 = phi i32 [ %54, %49 ], [ 0, %44 ], [ %45, %47 ]
%57 = icmp eq i32 %45, 0
br i1 %57, label %76, label %58
58: ; preds = %55
%59 = and i32 %45, 1
%60 = icmp eq i32 %45, 1
br i1 %60, label %63, label %61
61: ; preds = %58
%62 = and i32 %45, -2
br label %78
63: ; preds = %78, %58
%64 = phi i32 [ 0, %58 ], [ %98, %78 ]
%65 = phi i32 [ 0, %58 ], [ %101, %78 ]
%66 = icmp eq i32 %59, 0
br i1 %66, label %76, label %67
67: ; preds = %63
%68 = and i32 %64, 7
%69 = xor i32 %68, 7
%70 = shl nuw i32 1, %69
%71 = or i32 %70, %65
%72 = trunc i32 %71 to i8
%73 = lshr i32 %64, 3
%74 = zext i32 %73 to i64
%75 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %74
store i8 %72, i8* %75
br label %76
76: ; preds = %67, %63, %55
%77 = icmp slt i32 %46, 0
br i1 %77, label %104, label %420
78: ; preds = %78, %61
%79 = phi i32 [ 0, %61 ], [ %98, %78 ]
%80 = phi i32 [ 0, %61 ], [ %101, %78 ]
%81 = phi i32 [ 0, %61 ], [ %102, %78 ]
%82 = and i32 %79, 6
%83 = xor i32 %82, 7
%84 = shl nuw i32 1, %83
%85 = or i32 %84, %80
%86 = trunc i32 %85 to i8
%87 = lshr i32 %79, 3
%88 = zext i32 %87 to i64
%89 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %88
store i8 %86, i8* %89
%90 = and i32 %79, 6
%91 = xor i32 %90, 6
%92 = shl nuw i32 1, %91
%93 = or i32 %92, %85
%94 = trunc i32 %93 to i8
%95 = lshr i32 %79, 3
%96 = zext i32 %95 to i64
%97 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %96
store i8 %94, i8* %97
%98 = add nuw nsw i32 %79, 2
%99 = and i32 %98, 6
%100 = icmp eq i32 %99, 0
%101 = select i1 %100, i32 0, i32 %93
%102 = add i32 %81, 2
%103 = icmp eq i32 %102, %62
br i1 %103, label %63, label %78
104: ; preds = %76
%105 = load i8, i8* %7
%106 = icmp ne i8 %105, 80
%107 = zext i1 %106 to i32
%108 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i32 %107)
%109 = load i32, i32* %3
%110 = sub nsw i32 0, %109
store i32 %110, i32* %3
%111 = sdiv i32 %109, -256
%112 = and i32 %111, 128
%113 = icmp eq i32 %112, 0
%114 = select i1 %113, i32 48, i32 49
%115 = and i32 %111, 64
%116 = icmp eq i32 %115, 0
%117 = select i1 %116, i32 48, i32 49
%118 = and i32 %111, 32
%119 = icmp eq i32 %118, 0
%120 = select i1 %119, i32 48, i32 49
%121 = and i32 %111, 16
%122 = icmp eq i32 %121, 0
%123 = select i1 %122, i32 48, i32 49
%124 = and i32 %111, 8
%125 = icmp eq i32 %124, 0
%126 = select i1 %125, i32 48, i32 49
%127 = and i32 %111, 4
%128 = icmp eq i32 %127, 0
%129 = select i1 %128, i32 48, i32 49
%130 = and i32 %111, 2
%131 = icmp eq i32 %130, 0
%132 = select i1 %131, i32 48, i32 49
%133 = and i32 %111, 1
%134 = or i32 %133, 48
%135 = and i32 %110, 128
%136 = icmp eq i32 %135, 0
%137 = select i1 %136, i32 48, i32 49
%138 = and i32 %110, 64
%139 = icmp eq i32 %138, 0
%140 = select i1 %139, i32 48, i32 49
%141 = and i32 %110, 32
%142 = icmp eq i32 %141, 0
%143 = select i1 %142, i32 48, i32 49
%144 = and i32 %110, 16
%145 = icmp eq i32 %144, 0
%146 = select i1 %145, i32 48, i32 49
%147 = and i32 %110, 8
%148 = icmp eq i32 %147, 0
%149 = select i1 %148, i32 48, i32 49
%150 = and i32 %110, 4
%151 = icmp eq i32 %150, 0
%152 = select i1 %151, i32 48, i32 49
%153 = and i32 %110, 2
%154 = icmp eq i32 %153, 0
%155 = select i1 %154, i32 48, i32 49
%156 = and i32 %110, 1
%157 = or i32 %156, 48
%158 = zext i32 %45 to i64
%159 = getelementptr inbounds [32 x i32], [32 x i32]* @__const.main.J, i64 0, i64 %158
%160 = load i32, i32* %159
%161 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @.str.10, i64 0, i64 0), i32 %110, i32 %114, i32 %117, i32 %120, i32 %123, i32 %126, i32 %129, i32 %132, i32 %134, i32 %137, i32 %140, i32 %143, i32 %146, i32 %149, i32 %152, i32 %155, i32 %157, i32 %160)
%162 = load i32, i32* %3
%163 = sdiv i32 %162, 256
%164 = add nsw i64 %158, -25
%165 = icmp ult i64 %164, 7
br i1 %165, label %166, label %212
166: ; preds = %104
%167 = sub i32 16, %160
%168 = and i32 %163, 255
%169 = call i32 @llvm.smax.i32(i32 %167, i32 7)
br label %202
170: ; preds = %202
%171 = and i32 %162, 128
%172 = icmp eq i32 %171, 0
%173 = select i1 %172, i32 48, i32 49
%174 = call i32 @putchar(i32 %173)
%175 = and i32 %162, 64
%176 = icmp eq i32 %175, 0
%177 = select i1 %176, i32 48, i32 49
%178 = call i32 @putchar(i32 %177)
%179 = and i32 %162, 32
%180 = icmp eq i32 %179, 0
%181 = select i1 %180, i32 48, i32 49
%182 = call i32 @putchar(i32 %181)
%183 = and i32 %162, 16
%184 = icmp eq i32 %183, 0
%185 = select i1 %184, i32 48, i32 49
%186 = call i32 @putchar(i32 %185)
%187 = and i32 %162, 8
%188 = icmp eq i32 %187, 0
%189 = select i1 %188, i32 48, i32 49
%190 = call i32 @putchar(i32 %189)
%191 = and i32 %162, 4
%192 = icmp eq i32 %191, 0
%193 = select i1 %192, i32 48, i32 49
%194 = call i32 @putchar(i32 %193)
%195 = and i32 %162, 2
%196 = icmp eq i32 %195, 0
%197 = select i1 %196, i32 48, i32 49
%198 = call i32 @putchar(i32 %197)
%199 = and i32 %162, 1
%200 = or i32 %199, 48
%201 = call i32 @putchar(i32 %200)
br label %229
202: ; preds = %166, %202
%203 = phi i32 [ %167, %166 ], [ %210, %202 ]
%204 = sub nsw i32 7, %203
%205 = shl nuw i32 1, %204
%206 = and i32 %168, %205
%207 = icmp eq i32 %206, 0
%208 = select i1 %207, i32 48, i32 49
%209 = call i32 @putchar(i32 %208)
%210 = add i32 %203, 1
%211 = icmp eq i32 %203, %169
br i1 %211, label %170, label %202
212: ; preds = %104
%213 = add nsw i64 %158, -4
%214 = icmp ult i64 %213, 28
br i1 %214, label %215, label %229
215: ; preds = %212
%216 = sub i32 8, %160
%217 = and i32 %162, 255
%218 = call i32 @llvm.smax.i32(i32 %216, i32 7)
br label %219
219: ; preds = %215, %219
%220 = phi i32 [ %216, %215 ], [ %227, %219 ]
%221 = sub nsw i32 7, %220
%222 = shl nuw i32 1, %221
%223 = and i32 %217, %222
%224 = icmp eq i32 %223, 0
%225 = select i1 %224, i32 48, i32 49
%226 = call i32 @putchar(i32 %225)
%227 = add i32 %220, 1
%228 = icmp eq i32 %220, %218
br i1 %228, label %229, label %219
229: ; preds = %219, %170, %212
%230 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.20, i64 0, i64 0))
%231 = lshr i32 %45, 3
%232 = zext i32 %231 to i64
%233 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %232
%234 = load i8, i8* %233
%235 = and i32 %45, 7
%236 = xor i32 %235, 7
%237 = shl i32 %107, %236
%238 = trunc i32 %237 to i8
%239 = or i8 %234, %238
store i8 %239, i8* %233
%240 = add i32 %160, %45
br i1 %165, label %245, label %241
241: ; preds = %229
%242 = icmp slt i32 %45, %240
br i1 %242, label %243, label %420
243: ; preds = %241
%244 = and i32 %162, 255
br label %402
245: ; preds = %229
%246 = add i32 %240, -7
%247 = add nuw nsw i32 %45, 1
%248 = icmp slt i32 %247, %246
br i1 %248, label %249, label %274
249: ; preds = %245
%250 = and i32 %163, 255
%251 = add i32 %240, -9
%252 = lshr i64 1429409551, %158
%253 = and i64 %252, 1
%254 = icmp eq i64 %253, 0
br i1 %254, label %255, label %270
255: ; preds = %249
%256 = lshr i32 %247, 3
%257 = zext i32 %256 to i64
%258 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %257
%259 = load i8, i8* %258
%260 = sub i32 %251, %45
%261 = shl nuw i32 1, %260
%262 = and i32 %250, %261
%263 = lshr i32 %262, %260
%264 = and i32 %247, 7
%265 = xor i32 %264, 7
%266 = shl i32 %263, %265
%267 = trunc i32 %266 to i8
%268 = or i8 %259, %267
store i8 %268, i8* %258
%269 = add nuw nsw i32 %45, 2
br label %270
270: ; preds = %255, %249
%271 = phi i32 [ %247, %249 ], [ %269, %255 ]
%272 = phi i32 [ %45, %249 ], [ %247, %255 ]
%273 = icmp eq i32 %45, 25
br i1 %273, label %274, label %288
274: ; preds = %270, %288, %245
%275 = sdiv i32 %246, 8
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %276
%278 = load i8, i8* %277
%279 = lshr i32 %162, 7
%280 = and i32 %279, 1
%281 = srem i32 %246, 8
%282 = sub nsw i32 7, %281
%283 = shl nuw nsw i32 %280, %282
%284 = trunc i32 %283 to i8
%285 = or i8 %278, %284
store i8 %285, i8* %277
%286 = add i32 %240, -6
%287 = icmp sgt i32 %240, -2147483642
br i1 %287, label %320, label %420
288: ; preds = %270, %288
%289 = phi i32 [ %318, %288 ], [ %271, %270 ]
%290 = phi i32 [ %304, %288 ], [ %272, %270 ]
%291 = lshr i32 %289, 3
%292 = zext i32 %291 to i64
%293 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %292
%294 = load i8, i8* %293
%295 = sub i32 %251, %290
%296 = shl nuw i32 1, %295
%297 = and i32 %250, %296
%298 = lshr i32 %297, %295
%299 = and i32 %289, 7
%300 = xor i32 %299, 7
%301 = shl i32 %298, %300
%302 = trunc i32 %301 to i8
%303 = or i8 %294, %302
store i8 %303, i8* %293
%304 = add nuw nsw i32 %289, 1
%305 = lshr i32 %304, 3
%306 = zext i32 %305 to i64
%307 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %306
%308 = load i8, i8* %307
%309 = sub i32 %251, %289
%310 = shl nuw i32 1, %309
%311 = and i32 %250, %310
%312 = lshr i32 %311, %309
%313 = and i32 %304, 7
%314 = xor i32 %313, 7
%315 = shl i32 %312, %314
%316 = trunc i32 %315 to i8
%317 = or i8 %308, %316
store i8 %317, i8* %307
%318 = add nuw nsw i32 %289, 2
%319 = icmp eq i32 %318, %246
br i1 %319, label %274, label %288
320: ; preds = %274
%321 = sdiv i32 %286, 8
%322 = sext i32 %321 to i64
%323 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %322
%324 = load i8, i8* %323
%325 = lshr i32 %162, 6
%326 = and i32 %325, 1
%327 = srem i32 %286, 8
%328 = sub nsw i32 7, %327
%329 = shl nuw nsw i32 %326, %328
%330 = trunc i32 %329 to i8
%331 = or i8 %324, %330
store i8 %331, i8* %323
%332 = add nsw i32 %240, -5
%333 = sdiv i32 %332, 8
%334 = sext i32 %333 to i64
%335 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %334
%336 = load i8, i8* %335
%337 = lshr i32 %162, 5
%338 = and i32 %337, 1
%339 = srem i32 %332, 8
%340 = sub nsw i32 7, %339
%341 = shl nuw nsw i32 %338, %340
%342 = trunc i32 %341 to i8
%343 = or i8 %336, %342
store i8 %343, i8* %335
%344 = add nsw i32 %240, -4
%345 = sdiv i32 %344, 8
%346 = sext i32 %345 to i64
%347 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %346
%348 = load i8, i8* %347
%349 = lshr i32 %162, 4
%350 = and i32 %349, 1
%351 = srem i32 %344, 8
%352 = sub nsw i32 7, %351
%353 = shl nuw nsw i32 %350, %352
%354 = trunc i32 %353 to i8
%355 = or i8 %348, %354
store i8 %355, i8* %347
%356 = add nsw i32 %240, -3
%357 = sdiv i32 %356, 8
%358 = sext i32 %357 to i64
%359 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %358
%360 = load i8, i8* %359
%361 = lshr i32 %162, 3
%362 = and i32 %361, 1
%363 = srem i32 %356, 8
%364 = sub nsw i32 7, %363
%365 = shl nuw nsw i32 %362, %364
%366 = trunc i32 %365 to i8
%367 = or i8 %360, %366
store i8 %367, i8* %359
%368 = add nsw i32 %240, -2
%369 = sdiv i32 %368, 8
%370 = sext i32 %369 to i64
%371 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %370
%372 = load i8, i8* %371
%373 = lshr i32 %162, 2
%374 = and i32 %373, 1
%375 = srem i32 %368, 8
%376 = sub nsw i32 7, %375
%377 = shl nuw nsw i32 %374, %376
%378 = trunc i32 %377 to i8
%379 = or i8 %372, %378
store i8 %379, i8* %371
%380 = add nsw i32 %240, -1
%381 = sdiv i32 %380, 8
%382 = sext i32 %381 to i64
%383 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %382
%384 = load i8, i8* %383
%385 = lshr i32 %162, 1
%386 = and i32 %385, 1
%387 = srem i32 %380, 8
%388 = sub nsw i32 7, %387
%389 = shl nuw nsw i32 %386, %388
%390 = trunc i32 %389 to i8
%391 = or i8 %384, %390
store i8 %391, i8* %383
%392 = sdiv i32 %240, 8
%393 = sext i32 %392 to i64
%394 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %393
%395 = load i8, i8* %394
%396 = and i32 %162, 1
%397 = srem i32 %240, 8
%398 = sub nsw i32 7, %397
%399 = shl nuw nsw i32 %396, %398
%400 = trunc i32 %399 to i8
%401 = or i8 %395, %400
store i8 %401, i8* %394
br label %420
402: ; preds = %243, %402
%403 = phi i32 [ %45, %243 ], [ %404, %402 ]
%404 = add nuw nsw i32 %403, 1
%405 = lshr i32 %404, 3
%406 = zext i32 %405 to i64
%407 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %406
%408 = load i8, i8* %407
%409 = xor i32 %403, -1
%410 = add i32 %240, %409
%411 = shl nuw i32 1, %410
%412 = and i32 %244, %411
%413 = lshr i32 %412, %410
%414 = and i32 %404, 7
%415 = xor i32 %414, 7
%416 = shl i32 %413, %415
%417 = trunc i32 %416 to i8
%418 = or i8 %408, %417
store i8 %418, i8* %407
%419 = icmp eq i32 %404, %240
br i1 %419, label %420, label %402
420: ; preds = %402, %274, %320, %241, %76
%421 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0))
br label %426
422: ; preds = %426
%423 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), i32 %56)
%424 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0))
%425 = icmp ugt i32 %45, 2
br i1 %425, label %459, label %457
426: ; preds = %420, %426
%427 = phi i64 [ 0, %420 ], [ %455, %426 ]
%428 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 %427
%429 = load i8, i8* %428
%430 = zext i8 %429 to i32
%431 = and i32 %430, 128
%432 = icmp eq i32 %431, 0
%433 = select i1 %432, i32 48, i32 49
%434 = and i32 %430, 64
%435 = icmp eq i32 %434, 0
%436 = select i1 %435, i32 48, i32 49
%437 = and i32 %430, 32
%438 = icmp eq i32 %437, 0
%439 = select i1 %438, i32 48, i32 49
%440 = and i32 %430, 16
%441 = icmp eq i32 %440, 0
%442 = select i1 %441, i32 48, i32 49
%443 = and i32 %430, 8
%444 = icmp eq i32 %443, 0
%445 = select i1 %444, i32 48, i32 49
%446 = and i32 %430, 4
%447 = icmp eq i32 %446, 0
%448 = select i1 %447, i32 48, i32 49
%449 = and i32 %430, 2
%450 = icmp eq i32 %449, 0
%451 = select i1 %450, i32 48, i32 49
%452 = and i32 %430, 1
%453 = or i32 %452, 48
%454 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0), i32 %433, i32 %436, i32 %439, i32 %442, i32 %445, i32 %448, i32 %451, i32 %453)
%455 = add nuw nsw i64 %427, 1
%456 = icmp eq i64 %455, 6
br i1 %456, label %422, label %426
457: ; preds = %459, %422
%458 = icmp sgt i32 %56, %45
br i1 %458, label %464, label %477
459: ; preds = %422, %459
%460 = phi i32 [ %462, %459 ], [ 2, %422 ]
%461 = call i32 @putchar(i32 32)
%462 = add nuw nsw i32 %460, 1
%463 = icmp eq i32 %462, %45
br i1 %463, label %457, label %459
464: ; preds = %457
%465 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0))
%466 = add nuw nsw i32 %45, 3
%467 = icmp slt i32 %466, %56
br i1 %467, label %472, label %468
468: ; preds = %472, %464
%469 = zext i32 %45 to i64
%470 = add nsw i64 %469, -8
%471 = icmp ult i64 %470, 24
br i1 %471, label %477, label %479
472: ; preds = %464, %472
%473 = phi i32 [ %475, %472 ], [ %466, %464 ]
%474 = call i32 @putchar(i32 32)
%475 = add nuw i32 %473, 1
%476 = icmp eq i32 %475, %56
br i1 %476, label %468, label %472
477: ; preds = %457, %468
%478 = call i32 @putchar(i32 94)
br label %479
479: ; preds = %477, %468
%480 = call i32 @putchar(i32 10)
ret i32 0
}