#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(int argc, const char *argv[]) {
  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    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    11fd <main+0xed>
movl   $0x0,-0x18(%rbp)
cmpl   $0x100,-0x18(%rbp)
jge    11ea <main+0xda>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x7,%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x8,-0x1c(%rbp)
jge    11ce <main+0xbe>
mov    -0x20(%rbp),%eax
and    $0x80,%eax
cmp    -0x24(%rbp),%eax
je     11b7 <main+0xa7>
mov    -0x1c(%rbp),%esi
add    $0x1,%esi
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
xor    $0x80,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    117d <main+0x6d>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114c <main+0x3c>
jmp    11ef <main+0xdf>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113b <main+0x2b>
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%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(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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
br label %12
12: ; preds = %50, %2
%13 = load i32, i32* %6
%14 = icmp slt i32 %13, 2
br i1 %14, label %15, label %53
15: ; preds = %12
store i32 0, i32* %7
br label %16
16: ; preds = %46, %15
%17 = load i32, i32* %7
%18 = icmp slt i32 %17, 256
br i1 %18, label %19, label %49
19: ; preds = %16
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%21 = load i32, i32* %7
store i32 %21, i32* %9
%22 = load i32, i32* %6
%23 = shl i32 %22, 7
store i32 %23, i32* %10
store i32 0, i32* %8
br label %24
24: ; preds = %41, %19
%25 = load i32, i32* %8
%26 = icmp slt i32 %25, 8
br i1 %26, label %27, label %44
27: ; preds = %24
%28 = load i32, i32* %9
%29 = and i32 %28, 128
%30 = load i32, i32* %10
%31 = icmp ne i32 %29, %30
br i1 %31, label %32, label %38
32: ; preds = %27
%33 = load i32, i32* %8
%34 = add nsw i32 %33, 1
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %34)
%36 = load i32, i32* %10
%37 = xor i32 %36, 128
store i32 %37, i32* %10
br label %38
38: ; preds = %32, %27
%39 = load i32, i32* %9
%40 = shl i32 %39, 1
store i32 %40, i32* %9
br label %41
41: ; preds = %38
%42 = load i32, i32* %8
%43 = add nsw i32 %42, 1
store i32 %43, i32* %8
br label %24
44: ; preds = %24
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %46
46: ; preds = %44
%47 = load i32, i32* %7
%48 = add nsw i32 %47, 1
store i32 %48, i32* %7
br label %16
49: ; preds = %16
br label %50
50: ; preds = %49
%51 = load i32, i32* %6
%52 = add nsw i32 %51, 1
store i32 %52, i32* %6
br label %12
53: ; preds = %12
%54 = 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(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
br label %4
4: ; preds = %2, %66
%5 = phi i32 [ 0, %2 ], [ %68, %66 ]
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%7 = and i32 %5, 128
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = 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 %11
11: ; preds = %9, %4
%12 = phi i32 [ 128, %9 ], [ 0, %4 ]
%13 = shl nuw i32 %5, 1
%14 = and i32 %13, 128
%15 = icmp eq i32 %14, %12
br i1 %15, label %19, label %16
16: ; preds = %11
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 2)
%18 = xor i32 %12, 128
br label %19
19: ; preds = %16, %11
%20 = phi i32 [ %18, %16 ], [ %12, %11 ]
%21 = shl i32 %5, 2
%22 = and i32 %21, 128
%23 = icmp eq i32 %22, %20
br i1 %23, label %27, label %24
24: ; preds = %19
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 3)
%26 = xor i32 %20, 128
br label %27
27: ; preds = %24, %19
%28 = phi i32 [ %26, %24 ], [ %20, %19 ]
%29 = shl i32 %5, 3
%30 = and i32 %29, 128
%31 = icmp eq i32 %30, %28
br i1 %31, label %35, label %32
32: ; preds = %27
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 4)
%34 = xor i32 %28, 128
br label %35
35: ; preds = %32, %27
%36 = phi i32 [ %34, %32 ], [ %28, %27 ]
%37 = shl i32 %5, 4
%38 = and i32 %37, 128
%39 = icmp eq i32 %38, %36
br i1 %39, label %43, label %40
40: ; preds = %35
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 5)
%42 = xor i32 %36, 128
br label %43
43: ; preds = %40, %35
%44 = phi i32 [ %42, %40 ], [ %36, %35 ]
%45 = shl i32 %5, 5
%46 = and i32 %45, 128
%47 = icmp eq i32 %46, %44
br i1 %47, label %51, label %48
48: ; preds = %43
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 6)
%50 = xor i32 %44, 128
br label %51
51: ; preds = %48, %43
%52 = phi i32 [ %50, %48 ], [ %44, %43 ]
%53 = shl i32 %5, 6
%54 = and i32 %53, 128
%55 = icmp eq i32 %54, %52
br i1 %55, label %59, label %56
56: ; preds = %51
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 7)
%58 = xor i32 %52, 128
br label %59
59: ; preds = %56, %51
%60 = phi i32 [ %58, %56 ], [ %52, %51 ]
%61 = shl i32 %5, 7
%62 = and i32 %61, 128
%63 = icmp eq i32 %62, %60
br i1 %63, label %66, label %64
64: ; preds = %59
%65 = 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 %66
66: ; preds = %64, %59
%67 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.6, i64 0, i64 0))
%68 = add nuw nsw i32 %5, 1
%69 = icmp eq i32 %68, 256
br i1 %69, label %70, label %4
70: ; preds = %66, %132
%71 = phi i32 [ %134, %132 ], [ 0, %66 ]
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%73 = and i32 %71, 128
%74 = icmp eq i32 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %70
%76 = 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 %77
77: ; preds = %75, %70
%78 = phi i32 [ 0, %75 ], [ 128, %70 ]
%79 = shl nuw i32 %71, 1
%80 = and i32 %79, 128
%81 = icmp eq i32 %80, %78
br i1 %81, label %85, label %82
82: ; preds = %77
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 2)
%84 = xor i32 %78, 128
br label %85
85: ; preds = %82, %77
%86 = phi i32 [ %84, %82 ], [ %78, %77 ]
%87 = shl i32 %71, 2
%88 = and i32 %87, 128
%89 = icmp eq i32 %88, %86
br i1 %89, label %93, label %90
90: ; preds = %85
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 3)
%92 = xor i32 %86, 128
br label %93
93: ; preds = %90, %85
%94 = phi i32 [ %92, %90 ], [ %86, %85 ]
%95 = shl i32 %71, 3
%96 = and i32 %95, 128
%97 = icmp eq i32 %96, %94
br i1 %97, label %101, label %98
98: ; preds = %93
%99 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 4)
%100 = xor i32 %94, 128
br label %101
101: ; preds = %98, %93
%102 = phi i32 [ %100, %98 ], [ %94, %93 ]
%103 = shl i32 %71, 4
%104 = and i32 %103, 128
%105 = icmp eq i32 %104, %102
br i1 %105, label %109, label %106
106: ; preds = %101
%107 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 5)
%108 = xor i32 %102, 128
br label %109
109: ; preds = %106, %101
%110 = phi i32 [ %108, %106 ], [ %102, %101 ]
%111 = shl i32 %71, 5
%112 = and i32 %111, 128
%113 = icmp eq i32 %112, %110
br i1 %113, label %117, label %114
114: ; preds = %109
%115 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 6)
%116 = xor i32 %110, 128
br label %117
117: ; preds = %114, %109
%118 = phi i32 [ %116, %114 ], [ %110, %109 ]
%119 = shl i32 %71, 6
%120 = and i32 %119, 128
%121 = icmp eq i32 %120, %118
br i1 %121, label %125, label %122
122: ; preds = %117
%123 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 7)
%124 = xor i32 %118, 128
br label %125
125: ; preds = %122, %117
%126 = phi i32 [ %124, %122 ], [ %118, %117 ]
%127 = shl i32 %71, 7
%128 = and i32 %127, 128
%129 = icmp eq i32 %128, %126
br i1 %129, label %132, label %130
130: ; preds = %125
%131 = 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 %132
132: ; preds = %130, %125
%133 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.6, i64 0, i64 0))
%134 = add nuw nsw i32 %71, 1
%135 = icmp eq i32 %134, 256
br i1 %135, label %136, label %70
136: ; preds = %132
%137 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}