#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 *, char *);
int main() {
  int bit = 1;
  while (1) {
    if (bit == 1) {
      bit = 0;
      printf("%s", "False\n");
    } else if (bit == 0) {
      bit = 1;
      printf("%s", "True\n");
    } else {
      printf("%s", "ERROR\n");
      return 0;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    114f <main+0x3f>
movl   $0x0,-0x8(%rbp)
lea    0xec2(%rip),%rdi
lea    0xebe(%rip),%rsi
call   1030 <printf@plt>
jmp    1198 <main+0x88>
cmpl   $0x0,-0x8(%rbp)
jne    1178 <main+0x68>
movl   $0x1,-0x8(%rbp)
lea    0xe99(%rip),%rdi
lea    0xe9c(%rip),%rsi
call   1030 <printf@plt>
jmp    1193 <main+0x83>
lea    0xe81(%rip),%rdi
lea    0xe8a(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    1198 <main+0x88>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%eax
lea    0xee0(%rip),%r14
lea    0xee0(%rip),%r15
lea    0xecf(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %ebp,%ebp
cmp    $0x1,%eax
setne  %bpl
mov    %r15,%rsi
cmove  %r14,%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %ebp,%eax
jmp    1140 <main+0x30>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c"False\0A\00"
@.str.2 = [6 x i8] c"True\0A\00"
@.str.3 = [7 x i8] c"ERROR\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %0, %16
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %3
store i32 0, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %16
8: ; preds = %3
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
store i32 1, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %15
13: ; preds = %8
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
15: ; preds = %11
br label %16
16: ; preds = %15, %6
br label %3
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c"False\0A\00"
@.str.2 = [6 x i8] c"True\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %6, %1 ]
%3 = icmp eq i32 %2, 1
%4 = select i1 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%5 = xor i1 %3, true
%6 = zext i1 %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %1
}