#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int print_sel_bits(FILE *out, unsigned mask, unsigned val) {
  int nv, rv;
  int i, iv, vv;
  unsigned m;
  for (i = 0, nv = 0, m = 1; i < (8 + 3); ++i, m <<= 1) {
    if (mask & m) {
      ++nv;
      iv = i;
      vv = (val & m) ? 1 : 0;
    }
  }
  if (nv == 1) {
    fprintf(out, "%sL[%i]", vv ? "" : "!", iv);
    return 1;
  }
  fprintf(out, "({");
  for (i = 0, rv = 0, m = 1; i < (8 + 3); ++i, m <<= 1) {
    if (mask & m) {
      if (rv)
        fprintf(out, ",");
      fprintf(out, "L[%i]", i);
      ++rv;
    }
  }
  fprintf(out, "} == %i'b", nv);
  for (i = 0, m = 1; i < (8 + 3); ++i, m <<= 1) {
    if (mask & m) {
      fprintf(out, "%c", (val & m) ? '1' : '0');
    }
  }
  fprintf(out, ")");
  return nv;
}


x86 assembly (clang, -O0):
<print_sel_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x30(%rbp)
cmpl   $0xb,-0x24(%rbp)
jge    1191 <print_sel_bits+0x81>
mov    -0x14(%rbp),%eax
and    -0x30(%rbp),%eax
cmp    $0x0,%eax
je     1175 <print_sel_bits+0x65>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%edx
and    -0x30(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x2c(%rbp)
jmp    117a <print_sel_bits+0x6a>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1137 <print_sel_bits+0x27>
cmpl   $0x1,-0x1c(%rbp)
jne    11d4 <print_sel_bits+0xc4>
mov    -0x10(%rbp),%rdi
mov    -0x2c(%rbp),%ecx
lea    0xe5f(%rip),%rdx
lea    0xe59(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0x28(%rbp),%ecx
lea    0xe3f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1302 <print_sel_bits+0x1f2>
mov    -0x10(%rbp),%rdi
lea    0xe2b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x1,-0x30(%rbp)
cmpl   $0xb,-0x24(%rbp)
jge    126a <print_sel_bits+0x15a>
mov    -0x14(%rbp),%eax
and    -0x30(%rbp),%eax
cmp    $0x0,%eax
je     124e <print_sel_bits+0x13e>
cmpl   $0x0,-0x20(%rbp)
je     1230 <print_sel_bits+0x120>
mov    -0x10(%rbp),%rdi
lea    0xde4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%edx
lea    0xdc4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1253 <print_sel_bits+0x143>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11fb <print_sel_bits+0xeb>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xd97(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
movl   $0x1,-0x30(%rbp)
cmpl   $0xb,-0x24(%rbp)
jge    12ea <print_sel_bits+0x1da>
mov    -0x14(%rbp),%eax
and    -0x30(%rbp),%eax
cmp    $0x0,%eax
je     12ce <print_sel_bits+0x1be>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%ecx
and    -0x30(%rbp),%ecx
mov    $0x30,%edx
mov    $0x31,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
lea    0xd52(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    12d3 <print_sel_bits+0x1c3>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    128d <print_sel_bits+0x17d>
mov    -0x10(%rbp),%rdi
lea    0xd27(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_sel_bits>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %esi,%ebp
mov    %rdi,%r13
mov    %edx,%r14d
and    $0x1,%r14d
mov    %edx,%esi
and    $0x2,%esi
movd   %ebp,%xmm0
pshufd $0x0,%xmm0,%xmm2
movdqa 0xea0(%rip),%xmm0
movdqa %xmm2,%xmm3
pand   %xmm0,%xmm3
movdqa 0xea0(%rip),%xmm1
pand   %xmm1,%xmm2
mov    %edx,%edi
and    $0x4,%edi
mov    %edx,%r12d
and    $0x8,%r12d
mov    %edx,%r15d
and    $0x10,%r15d
mov    %edx,%r10d
and    $0x20,%r10d
mov    %edx,%r9d
and    $0x40,%r9d
mov    %edx,%r8d
and    $0x80,%r8d
mov    %ebp,%eax
shr    $0x8,%eax
and    $0x1,%eax
pcmpeqd %xmm2,%xmm1
pcmpeqd %xmm3,%xmm0
packssdw %xmm1,%xmm0
packsswb %xmm0,%xmm0
pmovmskb %xmm0,%ecx
mov    %ecx,%ebx
shr    %bl
and    $0x55,%bl
sub    %bl,%cl
mov    %ecx,%ebx
and    $0x33,%bl
shr    $0x2,%cl
and    $0x33,%cl
add    %bl,%cl
mov    %ecx,%ebx
shr    $0x4,%bl
add    %cl,%bl
mov    %edx,%r11d
and    $0x100,%r11d
and    $0xf,%bl
movzbl %bl,%ecx
add    %eax,%ecx
mov    %ebp,%eax
shr    $0x9,%eax
and    $0x1,%eax
add    %eax,%ecx
mov    %ebp,%eax
shr    $0xa,%eax
and    $0x1,%eax
add    %eax,%ecx
mov    %edx,%ebx
and    $0x200,%ebx
and    $0x400,%edx
cmp    $0x1,%ecx
mov    %ecx,(%rsp)
jne    130f <print_sel_bits+0x1df>
pxor   %xmm0,%xmm0
pcmpeqd %xmm0,%xmm3
pcmpeqd %xmm0,%xmm2
packssdw %xmm2,%xmm3
packsswb %xmm3,%xmm3
pmovmskb %xmm3,%eax
shr    %esi
xor    %ecx,%ecx
test   $0x2,%al
sete   %cl
cmovne %r14d,%esi
shr    $0x2,%edi
shr    $0x3,%r12d
shr    $0x4,%r15d
shr    $0x5,%r10d
shr    $0x6,%r9d
shr    $0x7,%r8d
shr    $0x8,%r11d
shr    $0x9,%ebx
shr    $0xa,%edx
test   $0x4,%al
cmovne %esi,%edi
mov    $0x2,%esi
cmovne %ecx,%esi
test   $0x8,%al
cmove  %r12d,%edi
mov    $0x3,%ecx
cmovne %esi,%ecx
test   $0x10,%al
cmove  %r15d,%edi
mov    $0x4,%esi
cmovne %ecx,%esi
test   $0x20,%al
cmove  %r10d,%edi
mov    $0x5,%ecx
cmovne %esi,%ecx
test   $0x40,%al
cmove  %r9d,%edi
mov    $0x6,%esi
cmovne %ecx,%esi
test   $0x80,%al
cmove  %r8d,%edi
mov    $0x7,%eax
cmovne %esi,%eax
test   $0x100,%ebp
cmovne %r11d,%edi
mov    $0x8,%ecx
cmove  %eax,%ecx
test   $0x200,%ebp
cmovne %ebx,%edi
mov    $0x9,%eax
cmove  %ecx,%eax
test   $0x400,%ebp
cmovne %edx,%edi
mov    $0xa,%ecx
cmove  %eax,%ecx
test   %edi,%edi
lea    0xd3a(%rip),%rax
lea    0xd34(%rip),%rdx
cmove  %rax,%rdx
lea    0xd20(%rip),%rsi
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    156e <print_sel_bits+0x43e>
mov    %r14d,0x4(%rsp)
mov    %esi,0x8(%rsp)
mov    %r12d,0x28(%rsp)
mov    %r15d,0x2c(%rsp)
mov    %edi,0xc(%rsp)
movdqa %xmm2,0x30(%rsp)
mov    %r10d,0x10(%rsp)
mov    %r11d,0x14(%rsp)
mov    %r9d,0x18(%rsp)
mov    %ebx,0x1c(%rsp)
mov    %r8d,0x20(%rsp)
mov    %edx,0x24(%rsp)
lea    0xcdb(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r13,%rcx
movdqa %xmm3,0x40(%rsp)
call   1050 <fwrite@plt>
movdqa 0x40(%rsp),%xmm0
mov    $0x1,%r15d
lea    0xca8(%rip),%rbx
xor    %r12d,%r12d
xor    %r14d,%r14d
jmp    13b7 <print_sel_bits+0x287>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
add    $0x1,%r14d
movdqa 0x40(%rsp),%xmm0
add    $0x1,%r12d
add    %r15d,%r15d
cmp    $0xb,%r12d
je     13d0 <print_sel_bits+0x2a0>
test   %ebp,%r15d
je     13aa <print_sel_bits+0x27a>
test   %r14d,%r14d
je     1390 <print_sel_bits+0x260>
mov    $0x2c,%edi
mov    %r13,%rsi
call   1030 <fputc@plt>
jmp    1390 <print_sel_bits+0x260>
pxor   %xmm1,%xmm1
pcmpeqd %xmm0,%xmm1
movdqa %xmm1,0x50(%rsp)
lea    0xc48(%rip),%rsi
mov    %r13,%rdi
mov    (%rsp),%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
movdqa 0x50(%rsp),%xmm0
movd   %xmm0,%eax
test   $0x1,%al
jne    140f <print_sel_bits+0x2df>
mov    0x4(%rsp),%edi
or     $0x30,%edi
mov    %r13,%rsi
call   1030 <fputc@plt>
movdqa 0x50(%rsp),%xmm0
psrlq  $0x10,%xmm0
movd   %xmm0,%eax
shr    $0x10,%eax
test   $0x1,%al
mov    0x2c(%rsp),%r15d
mov    0x28(%rsp),%ebx
jne    1443 <print_sel_bits+0x313>
cmpl   $0x1,0x8(%rsp)
mov    $0x31,%edi
sbb    $0x0,%edi
mov    %r13,%rsi
call   1030 <fputc@plt>
pxor   %xmm0,%xmm0
movdqa 0x40(%rsp),%xmm1
pcmpeqd %xmm0,%xmm1
pextrw $0x4,%xmm1,%eax
test   $0x1,%al
jne    147b <print_sel_bits+0x34b>
cmpl   $0x1,0xc(%rsp)
mov    $0x31,%edi
sbb    $0x0,%edi
mov    %r13,%rsi
movdqa %xmm1,0x40(%rsp)
call   1030 <fputc@plt>
movdqa 0x40(%rsp),%xmm1
pextrw $0x6,%xmm1,%eax
test   $0x1,%al
jne    1497 <print_sel_bits+0x367>
cmp    $0x1,%ebx
mov    $0x31,%edi
sbb    $0x0,%edi
mov    %r13,%rsi
call   1030 <fputc@plt>
movdqa 0x30(%rsp),%xmm1
pshufd $0x44,%xmm1,%xmm0
pxor   %xmm2,%xmm2
pcmpeqd %xmm2,%xmm0
pextrw $0x4,%xmm0,%eax
test   $0x1,%al
jne    14d1 <print_sel_bits+0x3a1>
cmp    $0x1,%r15d
mov    $0x31,%edi
sbb    $0x0,%edi
mov    %r13,%rsi
call   1030 <fputc@plt>
pxor   %xmm2,%xmm2
movdqa 0x30(%rsp),%xmm1
pcmpeqd %xmm1,%xmm2
pextrw $0x2,%xmm2,%eax
test   $0x1,%al
jne    14f9 <print_sel_bits+0x3c9>
cmpl   $0x1,0x10(%rsp)
mov    $0x31,%edi
sbb    $0x0,%edi
mov    %r13,%rsi
call   1030 <fputc@plt>
movdqa 0x30(%rsp),%xmm1
pxor   %xmm0,%xmm0
pcmpeqd %xmm0,%xmm1
pextrw $0x4,%xmm1,%eax
test   $0x1,%al
jne    152b <print_sel_bits+0x3fb>
cmpl   $0x1,0x18(%rsp)
mov    $0x31,%edi
sbb    $0x0,%edi
mov    %r13,%rsi
movdqa %xmm1,0x30(%rsp)
call   1030 <fputc@plt>
movdqa 0x30(%rsp),%xmm1
pextrw $0x7,%xmm1,%eax
test   $0x1,%al
je     1580 <print_sel_bits+0x450>
test   $0x100,%ebp
jne    159d <print_sel_bits+0x46d>
test   $0x200,%ebp
jne    15ba <print_sel_bits+0x48a>
test   $0x400,%ebp
je     1561 <print_sel_bits+0x431>
cmpl   $0x1,0x24(%rsp)
mov    $0x31,%edi
sbb    $0x0,%edi
mov    %r13,%rsi
call   1030 <fputc@plt>
mov    $0x29,%edi
mov    %r13,%rsi
call   1030 <fputc@plt>
mov    (%rsp),%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmpl   $0x1,0x20(%rsp)
mov    $0x31,%edi
sbb    $0x0,%edi
mov    %r13,%rsi
call   1030 <fputc@plt>
test   $0x100,%ebp
je     153c <print_sel_bits+0x40c>
cmpl   $0x1,0x14(%rsp)
mov    $0x31,%edi
sbb    $0x0,%edi
mov    %r13,%rsi
call   1030 <fputc@plt>
test   $0x200,%ebp
je     1544 <print_sel_bits+0x414>
cmpl   $0x1,0x1c(%rsp)
mov    $0x31,%edi
sbb    $0x0,%edi
mov    %r13,%rsi
call   1030 <fputc@plt>
test   $0x400,%ebp
jne    154c <print_sel_bits+0x41c>
jmp    1561 <print_sel_bits+0x431>

LLVM IR (-O0):
@.str = [8 x i8] c"%sL[%i]\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [2 x i8] c"!\00"
@.str.3 = [3 x i8] c"({\00"
@.str.4 = [2 x i8] c",\00"
@.str.5 = [6 x i8] c"L[%i]\00"
@.str.6 = [10 x i8] c"} == %i'b\00"
@.str.7 = [3 x i8] c"%c\00"
@.str.8 = [2 x i8] c")\00"
define i32 @print_sel_bits(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 0, i32* %10
store i32 0, i32* %8
store i32 1, i32* %13
br label %14
14: ; preds = %33, %3
%15 = load i32, i32* %10
%16 = icmp slt i32 %15, 11
br i1 %16, label %17, label %38
17: ; preds = %14
%18 = load i32, i32* %6
%19 = load i32, i32* %13
%20 = and i32 %18, %19
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %32
22: ; preds = %17
%23 = load i32, i32* %8
%24 = add nsw i32 %23, 1
store i32 %24, i32* %8
%25 = load i32, i32* %10
store i32 %25, i32* %11
%26 = load i32, i32* %7
%27 = load i32, i32* %13
%28 = and i32 %26, %27
%29 = icmp ne i32 %28, 0
%30 = zext i1 %29 to i64
%31 = select i1 %29, i32 1, i32 0
store i32 %31, i32* %12
br label %32
32: ; preds = %22, %17
br label %33
33: ; preds = %32
%34 = load i32, i32* %10
%35 = add nsw i32 %34, 1
store i32 %35, i32* %10
%36 = load i32, i32* %13
%37 = shl i32 %36, 1
store i32 %37, i32* %13
br label %14
38: ; preds = %14
%39 = load i32, i32* %8
%40 = icmp eq i32 %39, 1
br i1 %40, label %41, label %49
41: ; preds = %38
%42 = load i32*, i32** %5
%43 = load i32, i32* %12
%44 = icmp ne i32 %43, 0
%45 = zext i1 %44 to i64
%46 = select i1 %44, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%47 = load i32, i32* %11
%48 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %46, i32 %47)
store i32 1, i32* %4
br label %109
49: ; preds = %38
%50 = load i32*, i32** %5
%51 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %10
store i32 0, i32* %9
store i32 1, i32* %13
br label %52
52: ; preds = %73, %49
%53 = load i32, i32* %10
%54 = icmp slt i32 %53, 11
br i1 %54, label %55, label %78
55: ; preds = %52
%56 = load i32, i32* %6
%57 = load i32, i32* %13
%58 = and i32 %56, %57
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %72
60: ; preds = %55
%61 = load i32, i32* %9
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %66
63: ; preds = %60
%64 = load i32*, i32** %5
%65 = call i32 (i32*, i8*, ...) @fprintf(i32* %64, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %66
66: ; preds = %63, %60
%67 = load i32*, i32** %5
%68 = load i32, i32* %10
%69 = call i32 (i32*, i8*, ...) @fprintf(i32* %67, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %68)
%70 = load i32, i32* %9
%71 = add nsw i32 %70, 1
store i32 %71, i32* %9
br label %72
72: ; preds = %66, %55
br label %73
73: ; preds = %72
%74 = load i32, i32* %10
%75 = add nsw i32 %74, 1
store i32 %75, i32* %10
%76 = load i32, i32* %13
%77 = shl i32 %76, 1
store i32 %77, i32* %13
br label %52
78: ; preds = %52
%79 = load i32*, i32** %5
%80 = load i32, i32* %8
%81 = call i32 (i32*, i8*, ...) @fprintf(i32* %79, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %80)
store i32 0, i32* %10
store i32 1, i32* %13
br label %82
82: ; preds = %100, %78
%83 = load i32, i32* %10
%84 = icmp slt i32 %83, 11
br i1 %84, label %85, label %105
85: ; preds = %82
%86 = load i32, i32* %6
%87 = load i32, i32* %13
%88 = and i32 %86, %87
%89 = icmp ne i32 %88, 0
br i1 %89, label %90, label %99
90: ; preds = %85
%91 = load i32*, i32** %5
%92 = load i32, i32* %7
%93 = load i32, i32* %13
%94 = and i32 %92, %93
%95 = icmp ne i32 %94, 0
%96 = zext i1 %95 to i64
%97 = select i1 %95, i32 49, i32 48
%98 = call i32 (i32*, i8*, ...) @fprintf(i32* %91, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %97)
br label %99
99: ; preds = %90, %85
br label %100
100: ; preds = %99
%101 = load i32, i32* %10
%102 = add nsw i32 %101, 1
store i32 %102, i32* %10
%103 = load i32, i32* %13
%104 = shl i32 %103, 1
store i32 %104, i32* %13
br label %82
105: ; preds = %82
%106 = load i32*, i32** %5
%107 = call i32 (i32*, i8*, ...) @fprintf(i32* %106, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%108 = load i32, i32* %8
store i32 %108, i32* %4
br label %109
109: ; preds = %105, %41
%110 = load i32, i32* %4
ret i32 %110
}

LLVM IR (-O2):
@.str = [8 x i8] c"%sL[%i]\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [2 x i8] c"!\00"
@.str.3 = [3 x i8] c"({\00"
@.str.5 = [6 x i8] c"L[%i]\00"
@.str.6 = [10 x i8] c"} == %i'b\00"
define i32 @print_sel_bits(i32* nocapture %0, i32 %1, i32 %2) {
%4 = and i32 %2, 1
%5 = and i32 %2, 2
%6 = insertelement <8 x i32> poison, i32 %1, i64 0
%7 = shufflevector <8 x i32> %6, <8 x i32> poison, <8 x i32> zeroinitializer
%8 = and <8 x i32> %7, <i32 1, i32 2, i32 4, i32 8, i32 16, i32 32, i32 64, i32 128>
%9 = icmp eq <8 x i32> %8, zeroinitializer
%10 = xor <8 x i1> %9, <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>
%11 = and i32 %2, 4
%12 = and i32 %2, 8
%13 = and i32 %2, 16
%14 = and i32 %2, 32
%15 = and i32 %2, 64
%16 = and i32 %2, 128
%17 = and i32 %1, 256
%18 = icmp eq i32 %17, 0
%19 = and i32 %2, 256
%20 = xor i1 %18, true
%21 = zext i1 %20 to i32
%22 = and i32 %1, 512
%23 = icmp eq i32 %22, 0
%24 = and i32 %2, 512
%25 = xor i1 %23, true
%26 = zext i1 %25 to i32
%27 = and i32 %1, 1024
%28 = icmp eq i32 %27, 0
%29 = and i32 %2, 1024
%30 = xor i1 %28, true
%31 = zext i1 %30 to i32
%32 = bitcast <8 x i1> %10 to i8
%33 = call i8 @llvm.ctpop.i8(i8 %32)
%34 = zext i8 %33 to i32
%35 = add nuw nsw i32 %34, %21
%36 = add nuw nsw i32 %35, %26
%37 = add nuw nsw i32 %36, %31
%38 = icmp eq i32 %37, 1
br i1 %38, label %39, label %81
39: ; preds = %3
%40 = lshr exact i32 %5, 1
%41 = extractelement <8 x i1> %9, i64 1
%42 = select i1 %41, i32 %4, i32 %40
%43 = lshr exact i32 %11, 2
%44 = extractelement <8 x i1> %9, i64 2
%45 = select i1 %44, i32 %42, i32 %43
%46 = lshr exact i32 %12, 3
%47 = extractelement <8 x i1> %9, i64 3
%48 = select i1 %47, i32 %45, i32 %46
%49 = lshr exact i32 %13, 4
%50 = extractelement <8 x i1> %9, i64 4
%51 = select i1 %50, i32 %48, i32 %49
%52 = lshr exact i32 %14, 5
%53 = extractelement <8 x i1> %9, i64 5
%54 = select i1 %53, i32 %51, i32 %52
%55 = lshr exact i32 %15, 6
%56 = extractelement <8 x i1> %9, i64 6
%57 = select i1 %56, i32 %54, i32 %55
%58 = lshr exact i32 %16, 7
%59 = extractelement <8 x i1> %9, i64 7
%60 = select i1 %59, i32 %57, i32 %58
%61 = lshr exact i32 %19, 8
%62 = select i1 %18, i32 %60, i32 %61
%63 = lshr exact i32 %24, 9
%64 = select i1 %23, i32 %62, i32 %63
%65 = lshr exact i32 %29, 10
%66 = select i1 %28, i32 %64, i32 %65
%67 = xor i1 %41, true
%68 = zext i1 %67 to i32
%69 = select i1 %44, i32 %68, i32 2
%70 = select i1 %47, i32 %69, i32 3
%71 = select i1 %50, i32 %70, i32 4
%72 = select i1 %53, i32 %71, i32 5
%73 = select i1 %56, i32 %72, i32 6
%74 = select i1 %59, i32 %73, i32 7
%75 = select i1 %18, i32 %74, i32 8
%76 = select i1 %23, i32 %75, i32 9
%77 = select i1 %28, i32 %76, i32 10
%78 = icmp eq i32 %66, 0
%79 = select i1 %78, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%80 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %79, i32 %77)
br label %166
81: ; preds = %3
%82 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %0)
br label %83
83: ; preds = %81, %96
%84 = phi i32 [ 1, %81 ], [ %99, %96 ]
%85 = phi i32 [ 0, %81 ], [ %98, %96 ]
%86 = phi i32 [ 0, %81 ], [ %97, %96 ]
%87 = and i32 %84, %1
%88 = icmp eq i32 %87, 0
br i1 %88, label %96, label %89
89: ; preds = %83
%90 = icmp eq i32 %86, 0
br i1 %90, label %93, label %91
91: ; preds = %89
%92 = tail call i32 @fputc(i32 44, i32* %0)
br label %93
93: ; preds = %91, %89
%94 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %85)
%95 = add nsw i32 %86, 1
br label %96
96: ; preds = %83, %93
%97 = phi i32 [ %95, %93 ], [ %86, %83 ]
%98 = add nuw nsw i32 %85, 1
%99 = shl i32 %84, 1
%100 = icmp eq i32 %98, 11
br i1 %100, label %101, label %83
101: ; preds = %96
%102 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %37)
%103 = extractelement <8 x i1> %9, i64 0
br i1 %103, label %107, label %104
104: ; preds = %101
%105 = or i32 %4, 48
%106 = tail call i32 @fputc(i32 %105, i32* %0)
br label %107
107: ; preds = %101, %104
%108 = extractelement <8 x i1> %9, i64 1
br i1 %108, label %113, label %109
109: ; preds = %107
%110 = icmp eq i32 %5, 0
%111 = select i1 %110, i32 48, i32 49
%112 = tail call i32 @fputc(i32 %111, i32* %0)
br label %113
113: ; preds = %109, %107
%114 = extractelement <8 x i1> %9, i64 2
br i1 %114, label %119, label %115
115: ; preds = %113
%116 = icmp eq i32 %11, 0
%117 = select i1 %116, i32 48, i32 49
%118 = tail call i32 @fputc(i32 %117, i32* %0)
br label %119
119: ; preds = %115, %113
%120 = extractelement <8 x i1> %9, i64 3
br i1 %120, label %125, label %121
121: ; preds = %119
%122 = icmp eq i32 %12, 0
%123 = select i1 %122, i32 48, i32 49
%124 = tail call i32 @fputc(i32 %123, i32* %0)
br label %125
125: ; preds = %121, %119
%126 = extractelement <8 x i1> %9, i64 4
br i1 %126, label %131, label %127
127: ; preds = %125
%128 = icmp eq i32 %13, 0
%129 = select i1 %128, i32 48, i32 49
%130 = tail call i32 @fputc(i32 %129, i32* %0)
br label %131
131: ; preds = %127, %125
%132 = extractelement <8 x i1> %9, i64 5
br i1 %132, label %137, label %133
133: ; preds = %131
%134 = icmp eq i32 %14, 0
%135 = select i1 %134, i32 48, i32 49
%136 = tail call i32 @fputc(i32 %135, i32* %0)
br label %137
137: ; preds = %133, %131
%138 = extractelement <8 x i1> %9, i64 6
br i1 %138, label %143, label %139
139: ; preds = %137
%140 = icmp eq i32 %15, 0
%141 = select i1 %140, i32 48, i32 49
%142 = tail call i32 @fputc(i32 %141, i32* %0)
br label %143
143: ; preds = %139, %137
%144 = extractelement <8 x i1> %9, i64 7
br i1 %144, label %149, label %145
145: ; preds = %143
%146 = icmp eq i32 %16, 0
%147 = select i1 %146, i32 48, i32 49
%148 = tail call i32 @fputc(i32 %147, i32* %0)
br label %149
149: ; preds = %145, %143
br i1 %18, label %154, label %150
150: ; preds = %149
%151 = icmp eq i32 %19, 0
%152 = select i1 %151, i32 48, i32 49
%153 = tail call i32 @fputc(i32 %152, i32* %0)
br label %154
154: ; preds = %150, %149
br i1 %23, label %159, label %155
155: ; preds = %154
%156 = icmp eq i32 %24, 0
%157 = select i1 %156, i32 48, i32 49
%158 = tail call i32 @fputc(i32 %157, i32* %0)
br label %159
159: ; preds = %155, %154
br i1 %28, label %164, label %160
160: ; preds = %159
%161 = icmp eq i32 %29, 0
%162 = select i1 %161, i32 48, i32 49
%163 = tail call i32 @fputc(i32 %162, i32* %0)
br label %164
164: ; preds = %160, %159
%165 = tail call i32 @fputc(i32 41, i32* %0)
br label %166
166: ; preds = %164, %39
ret i32 %37
}