#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int lowbit, i, j, value, curbit;
  printf("static unsigned char sspairtable[256*2][9] = {\n");
  for (lowbit = 0; lowbit < 2; ++lowbit) {
    for (i = 0; i < 256; i++) {
      printf("    {");
      value = i;
      curbit = lowbit << 7;
      for (j = 0; j < 8; ++j) {
        if ((value & 0x80) != curbit) {
          printf(" %d,", j + 1);
          curbit ^= 0x80;
        }
        value <<= 1;
      }
      printf("},\n");
    }
  }
  printf("};\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11f6 <main+0xe6>
movl   $0x0,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    11e3 <main+0xd3>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x7,%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    11c7 <main+0xb7>
mov    -0x14(%rbp),%eax
and    $0x80,%eax
cmp    -0x18(%rbp),%eax
je     11b0 <main+0xa0>
mov    -0x10(%rbp),%esi
add    $0x1,%esi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
xor    $0x80,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1176 <main+0x66>
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <main+0x35>
jmp    11e8 <main+0xd8>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
xor    %r14d,%r14d
xor    %r15d,%r15d
xor    %r12d,%r12d
xor    %r13d,%r13d
xor    %ebx,%ebx
jmp    11aa <main+0x8a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
sub    $0xffffff80,%r13d
add    $0x40,%r12d
add    $0x20,%r15d
add    $0x10,%r14d
addl   $0x8,0xc(%rsp)
addl   $0x4,0x10(%rsp)
addl   $0x2,0x14(%rsp)
cmp    $0x100,%ebx
je     12e3 <main+0x1c3>
lea    0xe4f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x0,%ebp
test   $0x80,%bl
je     11da <main+0xba>
lea    0xe3d(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x80,%ebp
mov    0x14(%rsp),%eax
and    $0x80,%eax
cmp    %ebp,%eax
je     1200 <main+0xe0>
lea    0xe18(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    $0x80,%ebp
mov    0x10(%rsp),%eax
and    $0x80,%eax
cmp    %ebp,%eax
je     1226 <main+0x106>
lea    0xdf2(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    $0x80,%ebp
mov    0xc(%rsp),%eax
and    $0x80,%eax
cmp    %ebp,%eax
je     124c <main+0x12c>
lea    0xdcc(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    $0x80,%ebp
mov    %r14d,%eax
and    $0x80,%eax
cmp    %ebp,%eax
je     1271 <main+0x151>
lea    0xda7(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    $0x80,%ebp
mov    %r15d,%eax
and    $0x80,%eax
cmp    %ebp,%eax
je     1296 <main+0x176>
lea    0xd82(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    $0x80,%ebp
mov    %r12d,%eax
and    $0x80,%eax
cmp    %ebp,%eax
je     12bb <main+0x19b>
lea    0xd5d(%rip),%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    $0x80,%ebp
mov    %r13d,%eax
and    $0x80,%eax
cmp    %ebp,%eax
je     1170 <main+0x50>
lea    0xd34(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1170 <main+0x50>
movl   $0x0,0x14(%rsp)
xor    %ebx,%ebx
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
xor    %r15d,%r15d
xor    %r12d,%r12d
xor    %r13d,%r13d
xor    %ebp,%ebp
jmp    1349 <main+0x229>
nopw   0x0(%rax,%rax,1)
lea    0xd26(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebp
sub    $0xffffff80,%r13d
add    $0x40,%r12d
add    $0x20,%r15d
addl   $0x10,0xc(%rsp)
addl   $0x8,0x10(%rsp)
add    $0x4,%ebx
addl   $0x2,0x14(%rsp)
cmp    $0x400,%ebx
je     148e <main+0x36e>
lea    0xcb0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x80,%r14d
test   $0x80,%bpl
jne    1379 <main+0x259>
xor    %r14d,%r14d
lea    0xc99(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%eax
and    $0x80,%eax
cmp    %r14d,%eax
je     13a1 <main+0x281>
lea    0xc78(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    $0x80,%r14d
mov    %ebx,%eax
and    $0x80,%eax
cmp    %r14d,%eax
je     13c7 <main+0x2a7>
lea    0xc52(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    $0x80,%r14d
mov    0x10(%rsp),%eax
and    $0x80,%eax
cmp    %r14d,%eax
je     13ef <main+0x2cf>
lea    0xc2a(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    $0x80,%r14d
mov    0xc(%rsp),%eax
and    $0x80,%eax
cmp    %r14d,%eax
je     1417 <main+0x2f7>
lea    0xc02(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    $0x80,%r14d
mov    %r15d,%eax
and    $0x80,%eax
cmp    %r14d,%eax
je     143e <main+0x31e>
lea    0xbdb(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    $0x80,%r14d
mov    %r12d,%eax
and    $0x80,%eax
cmp    %r14d,%eax
je     1465 <main+0x345>
lea    0xbb4(%rip),%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    $0x80,%r14d
mov    %r13d,%eax
and    $0x80,%eax
cmp    %r14d,%eax
je     1310 <main+0x1f0>
lea    0xb89(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1310 <main+0x1f0>
lea    0xba5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [48 x i8] c"static unsigned char sspairtable[256*2][9] = {\0A\00"
@.str.1 = [6 x i8] c" {\00"
@.str.2 = [5 x i8] c" %d,\00"
@.str.3 = [4 x i8] c"},\0A\00"
@.str.4 = [4 x i8] c"};\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %8
8: ; preds = %46, %0
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %49
11: ; preds = %8
store i32 0, i32* %3
br label %12
12: ; preds = %42, %11
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 256
br i1 %14, label %15, label %45
15: ; preds = %12
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32, i32* %3
store i32 %17, i32* %5
%18 = load i32, i32* %2
%19 = shl i32 %18, 7
store i32 %19, i32* %6
store i32 0, i32* %4
br label %20
20: ; preds = %37, %15
%21 = load i32, i32* %4
%22 = icmp slt i32 %21, 8
br i1 %22, label %23, label %40
23: ; preds = %20
%24 = load i32, i32* %5
%25 = and i32 %24, 128
%26 = load i32, i32* %6
%27 = icmp ne i32 %25, %26
br i1 %27, label %28, label %34
28: ; preds = %23
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %30)
%32 = load i32, i32* %6
%33 = xor i32 %32, 128
store i32 %33, i32* %6
br label %34
34: ; preds = %28, %23
%35 = load i32, i32* %5
%36 = shl i32 %35, 1
store i32 %36, i32* %5
br label %37
37: ; preds = %34
%38 = load i32, i32* %4
%39 = add nsw i32 %38, 1
store i32 %39, i32* %4
br label %20
40: ; preds = %20
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %42
42: ; preds = %40
%43 = load i32, i32* %3
%44 = add nsw i32 %43, 1
store i32 %44, i32* %3
br label %12
45: ; preds = %12
br label %46
46: ; preds = %45
%47 = load i32, i32* %2
%48 = add nsw i32 %47, 1
store i32 %48, i32* %2
br label %8
49: ; preds = %8
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c" {\00"
@.str.2 = [5 x i8] c" %d,\00"
@str = [47 x i8] c"static unsigned char sspairtable[256*2][9] = {\00"
@str.5 = [3 x i8] c"};\00"
@str.6 = [3 x i8] c"},\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %64
%3 = phi i32 [ 0, %0 ], [ %66, %64 ]
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = and i32 %3, 128
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 1)
br label %9
9: ; preds = %7, %2
%10 = phi i32 [ 128, %7 ], [ 0, %2 ]
%11 = shl nuw i32 %3, 1
%12 = and i32 %11, 128
%13 = icmp eq i32 %12, %10
br i1 %13, label %17, label %14
14: ; preds = %9
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 2)
%16 = xor i32 %10, 128
br label %17
17: ; preds = %14, %9
%18 = phi i32 [ %16, %14 ], [ %10, %9 ]
%19 = shl i32 %3, 2
%20 = and i32 %19, 128
%21 = icmp eq i32 %20, %18
br i1 %21, label %25, label %22
22: ; preds = %17
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 3)
%24 = xor i32 %18, 128
br label %25
25: ; preds = %22, %17
%26 = phi i32 [ %24, %22 ], [ %18, %17 ]
%27 = shl i32 %3, 3
%28 = and i32 %27, 128
%29 = icmp eq i32 %28, %26
br i1 %29, label %33, label %30
30: ; preds = %25
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 4)
%32 = xor i32 %26, 128
br label %33
33: ; preds = %30, %25
%34 = phi i32 [ %32, %30 ], [ %26, %25 ]
%35 = shl i32 %3, 4
%36 = and i32 %35, 128
%37 = icmp eq i32 %36, %34
br i1 %37, label %41, label %38
38: ; preds = %33
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 5)
%40 = xor i32 %34, 128
br label %41
41: ; preds = %38, %33
%42 = phi i32 [ %40, %38 ], [ %34, %33 ]
%43 = shl i32 %3, 5
%44 = and i32 %43, 128
%45 = icmp eq i32 %44, %42
br i1 %45, label %49, label %46
46: ; preds = %41
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 6)
%48 = xor i32 %42, 128
br label %49
49: ; preds = %46, %41
%50 = phi i32 [ %48, %46 ], [ %42, %41 ]
%51 = shl i32 %3, 6
%52 = and i32 %51, 128
%53 = icmp eq i32 %52, %50
br i1 %53, label %57, label %54
54: ; preds = %49
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 7)
%56 = xor i32 %50, 128
br label %57
57: ; preds = %54, %49
%58 = phi i32 [ %56, %54 ], [ %50, %49 ]
%59 = shl i32 %3, 7
%60 = and i32 %59, 128
%61 = icmp eq i32 %60, %58
br i1 %61, label %64, label %62
62: ; preds = %57
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 8)
br label %64
64: ; preds = %62, %57
%65 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.6, i64 0, i64 0))
%66 = add nuw nsw i32 %3, 1
%67 = icmp eq i32 %66, 256
br i1 %67, label %68, label %2
68: ; preds = %64, %130
%69 = phi i32 [ %132, %130 ], [ 0, %64 ]
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%71 = and i32 %69, 128
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %68
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 1)
br label %75
75: ; preds = %73, %68
%76 = phi i32 [ 0, %73 ], [ 128, %68 ]
%77 = shl nuw i32 %69, 1
%78 = and i32 %77, 128
%79 = icmp eq i32 %78, %76
br i1 %79, label %83, label %80
80: ; preds = %75
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 2)
%82 = xor i32 %76, 128
br label %83
83: ; preds = %80, %75
%84 = phi i32 [ %82, %80 ], [ %76, %75 ]
%85 = shl i32 %69, 2
%86 = and i32 %85, 128
%87 = icmp eq i32 %86, %84
br i1 %87, label %91, label %88
88: ; preds = %83
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 3)
%90 = xor i32 %84, 128
br label %91
91: ; preds = %88, %83
%92 = phi i32 [ %90, %88 ], [ %84, %83 ]
%93 = shl i32 %69, 3
%94 = and i32 %93, 128
%95 = icmp eq i32 %94, %92
br i1 %95, label %99, label %96
96: ; preds = %91
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 4)
%98 = xor i32 %92, 128
br label %99
99: ; preds = %96, %91
%100 = phi i32 [ %98, %96 ], [ %92, %91 ]
%101 = shl i32 %69, 4
%102 = and i32 %101, 128
%103 = icmp eq i32 %102, %100
br i1 %103, label %107, label %104
104: ; preds = %99
%105 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 5)
%106 = xor i32 %100, 128
br label %107
107: ; preds = %104, %99
%108 = phi i32 [ %106, %104 ], [ %100, %99 ]
%109 = shl i32 %69, 5
%110 = and i32 %109, 128
%111 = icmp eq i32 %110, %108
br i1 %111, label %115, label %112
112: ; preds = %107
%113 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 6)
%114 = xor i32 %108, 128
br label %115
115: ; preds = %112, %107
%116 = phi i32 [ %114, %112 ], [ %108, %107 ]
%117 = shl i32 %69, 6
%118 = and i32 %117, 128
%119 = icmp eq i32 %118, %116
br i1 %119, label %123, label %120
120: ; preds = %115
%121 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 7)
%122 = xor i32 %116, 128
br label %123
123: ; preds = %120, %115
%124 = phi i32 [ %122, %120 ], [ %116, %115 ]
%125 = shl i32 %69, 7
%126 = and i32 %125, 128
%127 = icmp eq i32 %126, %124
br i1 %127, label %130, label %128
128: ; preds = %123
%129 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 8)
br label %130
130: ; preds = %128, %123
%131 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.6, i64 0, i64 0))
%132 = add nuw nsw i32 %69, 1
%133 = icmp eq i32 %132, 256
br i1 %133, label %134, label %68
134: ; preds = %130
%135 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}