#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 /*<<< orphan*/ system(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;
    }
    system("./bitflip-recursive");
  }
  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    115f <main+0x3f>
movl   $0x0,-0x8(%rbp)
lea    0xeb2(%rip),%rdi
lea    0xeae(%rip),%rsi
call   1040 <printf@plt>
jmp    11a8 <main+0x88>
cmpl   $0x0,-0x8(%rbp)
jne    1188 <main+0x68>
movl   $0x1,-0x8(%rbp)
lea    0xe89(%rip),%rdi
lea    0xe8c(%rip),%rsi
call   1040 <printf@plt>
jmp    11a3 <main+0x83>
lea    0xe71(%rip),%rdi
lea    0xe7a(%rip),%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    11a8 <main+0x88>
lea    0xe68(%rip),%rdi
call   1030 <system@plt>
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0x1,%eax
lea    0xecf(%rip),%r15
lea    0xecf(%rip),%r12
lea    0xebe(%rip),%r14
lea    0xec7(%rip),%rbx
nopl   0x0(%rax)
xor    %ebp,%ebp
cmp    $0x1,%eax
setne  %bpl
mov    %r12,%rsi
cmove  %r15,%rsi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
mov    %ebp,%eax
jmp    1150 <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"
@.str.4 = [20 x i8] c"./bitflip-recursive\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
%17 = call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
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"
@.str.4 = [20 x i8] c"./bitflip-recursive\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)
%8 = tail call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
br label %1
}