#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*/ puts(char *);
int main() {
  bool a;
  bool b;
  if (true) {
    puts("Hi!");
  }
  if (true && !false) {
    a = true;
    b = false;
    puts("The && operator means \"and\", and it allows you to set multiple "
         "conditions to be met at once!");
    puts("The ! operator means \"not\", so it changes false to true and vice "
         "versa!");
  }
  if (a || b) {
    a = false;
    puts("The || operator means \"or\", and it allows you to set multiple "
         "conditions, but only one has to be met!");
  }
  if (!a || !b) {
    puts("The || operator only returns false if all conditions are false.");
  } else if (!a) {
  }
  if (a || b) {
  } else {
    puts("Else-if statements let you run an if statement only if the one on "
         "the line before failed.");
    puts("An else statement runs after an if statement fails, but it needs no "
         "conditions - it runs so long as the other if fails!");
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
lea    0xf15(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1165 <main+0x55>
cmpl   $0x0,-0xc(%rbp)
je     1178 <main+0x68>
movl   $0x0,-0x8(%rbp)
lea    0xf36(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,-0x8(%rbp)
je     118c <main+0x7c>
cmpl   $0x0,-0xc(%rbp)
jne    119d <main+0x8d>
lea    0xf7c(%rip),%rdi
call   1030 <puts@plt>
jmp    11b1 <main+0xa1>
cmpl   $0x0,-0x8(%rbp)
jne    11ac <main+0x9c>
jmp    11ac <main+0x9c>
jmp    11b1 <main+0xa1>
cmpl   $0x0,-0x8(%rbp)
jne    11c5 <main+0xb5>
cmpl   $0x0,-0xc(%rbp)
je     11ca <main+0xba>
jmp    11ee <main+0xde>
lea    0xf7e(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcc(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    11f5 <main+0xe5>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xf31(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6d(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc7(%rip),%rdi
call   1030 <puts@plt>
lea    0xffb(%rip),%rdi
call   1030 <puts@plt>
lea    0x1049(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"Hi!\00"
@.str.1 = [93 x i8] c"The && operator means \22and\22, and it allows you to set multiple conditions to be met at once!\00"
@.str.2 = [72 x i8] c"The ! operator means \22not\22, so it changes false to true and vice versa!\00"
@.str.3 = [102 x i8] c"The || operator means \22or\22, and it allows you to set multiple conditions, but only one has to be met!\00"
@.str.4 = [64 x i8] c"The || operator only returns false if all conditions are false.\00"
@.str.5 = [90 x i8] c"Else-if statements let you run an if statement only if the one on the line before failed.\00"
@.str.6 = [120 x i8] c"An else statement runs after an if statement fails, but it needs no conditions - it runs so long as the other if fails!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %2
store i32 0, i32* %3
%5 = call i32 @puts(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @puts(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %0
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9, %0
store i32 0, i32* %2
%13 = call i32 @puts(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.3, i64 0, i64 0))
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %3
%19 = icmp ne i32 %18, 0
br i1 %19, label %22, label %20
20: ; preds = %17, %14
%21 = call i32 @puts(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.4, i64 0, i64 0))
br label %27
22: ; preds = %17
%23 = load i32, i32* %2
%24 = icmp ne i32 %23, 0
br i1 %24, label %26, label %25
25: ; preds = %22
br label %26
26: ; preds = %25, %22
br label %27
27: ; preds = %26, %20
%28 = load i32, i32* %2
%29 = icmp ne i32 %28, 0
br i1 %29, label %33, label %30
30: ; preds = %27
%31 = load i32, i32* %3
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %30, %27
br label %37
34: ; preds = %30
%35 = call i32 @puts(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.5, i64 0, i64 0))
%36 = call i32 @puts(i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %1
br label %38
37: ; preds = %33
store i32 1, i32* %1
br label %38
38: ; preds = %37, %34
%39 = load i32, i32* %1
ret i32 %39
}

LLVM IR (-O2):
@.str = [4 x i8] c"Hi!\00"
@.str.1 = [93 x i8] c"The && operator means \22and\22, and it allows you to set multiple conditions to be met at once!\00"
@.str.2 = [72 x i8] c"The ! operator means \22not\22, so it changes false to true and vice versa!\00"
@.str.3 = [102 x i8] c"The || operator means \22or\22, and it allows you to set multiple conditions, but only one has to be met!\00"
@.str.4 = [64 x i8] c"The || operator only returns false if all conditions are false.\00"
@.str.5 = [90 x i8] c"Else-if statements let you run an if statement only if the one on the line before failed.\00"
@.str.6 = [120 x i8] c"An else statement runs after an if statement fails, but it needs no conditions - it runs so long as the other if fails!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([102 x i8], [102 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([90 x i8], [90 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([120 x i8], [120 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}