#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  unsigned char byte = 0;
  unsigned char paritybyte = 0;
  unsigned char parity = 0;
  fprintf(stdout, "{ ");
  for (byte = 0; byte < 127; byte++) {
    parity = ((byte & 0x01) + ((byte >> 1) & 0x01) + ((byte >> 2) & 0x01) +
              ((byte >> 3) & 0x01) + ((byte >> 4) & 0x01) +
              ((byte >> 5) & 0x01) + ((byte >> 6) & 0x01));
    if ((parity % 2) == 0) {
      paritybyte = 0x80 | byte;
    } else {
      paritybyte = byte;
    }
    fprintf(stdout, "0x%02x, ", paritybyte);
  }
  fprintf(stdout, " }\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
movb   $0x0,-0x12(%rbp)
movb   $0x0,-0x13(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
lea    0xebe(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movb   $0x0,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
cmp    $0x7f,%eax
jge    1200 <main+0xf0>
movzbl -0x11(%rbp),%eax
and    $0x1,%eax
movzbl -0x11(%rbp),%ecx
sar    $0x1,%ecx
and    $0x1,%ecx
add    %ecx,%eax
movzbl -0x11(%rbp),%ecx
sar    $0x2,%ecx
and    $0x1,%ecx
add    %ecx,%eax
movzbl -0x11(%rbp),%ecx
sar    $0x3,%ecx
and    $0x1,%ecx
add    %ecx,%eax
movzbl -0x11(%rbp),%ecx
sar    $0x4,%ecx
and    $0x1,%ecx
add    %ecx,%eax
movzbl -0x11(%rbp),%ecx
sar    $0x5,%ecx
and    $0x1,%ecx
add    %ecx,%eax
movzbl -0x11(%rbp),%ecx
sar    $0x6,%ecx
and    $0x1,%ecx
add    %ecx,%eax
mov    %al,-0x13(%rbp)
movzbl -0x13(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11d2 <main+0xc2>
movzbl -0x11(%rbp),%eax
or     $0x80,%eax
mov    %al,-0x12(%rbp)
jmp    11d8 <main+0xc8>
mov    -0x11(%rbp),%al
mov    %al,-0x12(%rbp)
mov    0x2e01(%rip),%rax
mov    (%rax),%edi
movzbl -0x12(%rbp),%edx
lea    0xe17(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x11(%rbp),%al
add    $0x1,%al
mov    %al,-0x11(%rbp)
jmp    114d <main+0x3d>
mov    0x2dd9(%rip),%rax
mov    (%rax),%edi
lea    0xdfc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xecd(%rip),%r15
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%eax
and    $0x1,%al
mov    %ebp,%ecx
shr    %cl
mov    %ebp,%edx
shr    $0x2,%dl
mov    %ebp,%ebx
shr    $0x3,%bl
add    %al,%bl
mov    %ebp,%eax
shr    $0x4,%al
add    %bl,%al
mov    %ebp,%ebx
shr    $0x5,%bl
add    %al,%bl
mov    %ebp,%eax
shr    $0x6,%al
add    %bl,%al
add    %cl,%al
add    %dl,%al
not    %al
shl    $0x7,%al
or     %bpl,%al
mov    (%r14),%edi
movzbl %al,%edx
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
add    $0x1,%bpl
cmp    $0x7f,%bpl
jne    1140 <main+0x30>
mov    (%r14),%edi
lea    0xe73(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [3 x i8] c"{ \00"
@.str.1 = [9 x i8] c"0x%02x, \00"
@.str.2 = [4 x i8] c" }\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 0, i8* %6
store i8 0, i8* %7
store i8 0, i8* %8
%9 = load i32, i32* @stdout
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8 0, i8* %6
br label %11
11: ; preds = %66, %2
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = icmp slt i32 %13, 127
br i1 %14, label %15, label %69
15: ; preds = %11
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = and i32 %17, 1
%19 = load i8, i8* %6
%20 = zext i8 %19 to i32
%21 = ashr i32 %20, 1
%22 = and i32 %21, 1
%23 = add nsw i32 %18, %22
%24 = load i8, i8* %6
%25 = zext i8 %24 to i32
%26 = ashr i32 %25, 2
%27 = and i32 %26, 1
%28 = add nsw i32 %23, %27
%29 = load i8, i8* %6
%30 = zext i8 %29 to i32
%31 = ashr i32 %30, 3
%32 = and i32 %31, 1
%33 = add nsw i32 %28, %32
%34 = load i8, i8* %6
%35 = zext i8 %34 to i32
%36 = ashr i32 %35, 4
%37 = and i32 %36, 1
%38 = add nsw i32 %33, %37
%39 = load i8, i8* %6
%40 = zext i8 %39 to i32
%41 = ashr i32 %40, 5
%42 = and i32 %41, 1
%43 = add nsw i32 %38, %42
%44 = load i8, i8* %6
%45 = zext i8 %44 to i32
%46 = ashr i32 %45, 6
%47 = and i32 %46, 1
%48 = add nsw i32 %43, %47
%49 = trunc i32 %48 to i8
store i8 %49, i8* %8
%50 = load i8, i8* %8
%51 = zext i8 %50 to i32
%52 = srem i32 %51, 2
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %59
54: ; preds = %15
%55 = load i8, i8* %6
%56 = zext i8 %55 to i32
%57 = or i32 128, %56
%58 = trunc i32 %57 to i8
store i8 %58, i8* %7
br label %61
59: ; preds = %15
%60 = load i8, i8* %6
store i8 %60, i8* %7
br label %61
61: ; preds = %59, %54
%62 = load i32, i32* @stdout
%63 = load i8, i8* %7
%64 = zext i8 %63 to i32
%65 = call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %61
%67 = load i8, i8* %6
%68 = add i8 %67, 1
store i8 %68, i8* %6
br label %11
69: ; preds = %11
%70 = load i32, i32* @stdout
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3 x i8] c"{ \00"
@.str.1 = [9 x i8] c"0x%02x, \00"
@.str.2 = [4 x i8] c" }\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %2, %5
%6 = phi i8 [ 0, %2 ], [ %26, %5 ]
%7 = and i8 %6, 1
%8 = lshr i8 %6, 1
%9 = lshr i8 %6, 2
%10 = lshr i8 %6, 3
%11 = lshr i8 %6, 4
%12 = lshr i8 %6, 5
%13 = lshr i8 %6, 6
%14 = add nuw nsw i8 %10, %7
%15 = add nuw nsw i8 %14, %11
%16 = add nuw nsw i8 %15, %12
%17 = add nuw nsw i8 %16, %13
%18 = add nuw i8 %17, %8
%19 = add nuw i8 %18, %9
%20 = xor i8 %19, -1
%21 = shl i8 %20, 7
%22 = or i8 %21, %6
%23 = load i32, i32* @stdout
%24 = zext i8 %22 to i32
%25 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %24)
%26 = add nuw nsw i8 %6, 1
%27 = icmp eq i8 %26, 127
br i1 %27, label %28, label %5
28: ; preds = %5
%29 = load i32, i32* @stdout
%30 = tail call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}