#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 /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int a;
  int b;
  int c;
  int d;
  int e;
  printf("a: ");
  scanf("%d", &a);
  printf("b: ");
  scanf("%d", &b);
  if (a > 10 || b > 20) {
    printf("(a > 10 || b > 20) is TRUE.\n");
  } else {
    printf("(a > 10 || b > 20) is FALSE.\n");
  }
  printf("c: ");
  scanf("%d", &c);
  printf("d: ");
  scanf("%d", &d);
  if (c > 10 && d > 20) {
    printf("(c > 10 && d > 20) is TRUE.\n");
  } else {
    printf("(c > 10 && d > 20) is FALSE.\n");
  }
  printf("e: ");
  scanf("%d", &e);
  if (!(e > 10)) {
    printf("(!(e > 10)) is TRUE.\n");
  } else {
    printf("(!(e > 10)) is FALSE.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
lea    0xea6(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0xa,-0x8(%rbp)
jg     117b <main+0x5b>
cmpl   $0x14,-0xc(%rbp)
jle    118c <main+0x6c>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
jmp    1198 <main+0x78>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
lea    0xe59(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe3d(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0xa,-0x10(%rbp)
jle    11f5 <main+0xd5>
cmpl   $0x14,-0x14(%rbp)
jle    11f5 <main+0xd5>
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
jmp    1201 <main+0xe1>
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
lea    0xdf0(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0xa,-0x18(%rbp)
jg     1238 <main+0x118>
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
jmp    1244 <main+0x124>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
lea    0xebc(%rip),%rbx
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
cmpl   $0x15,0x18(%rsp)
lea    0xf1e(%rip),%rax
lea    0xe96(%rip),%rdi
cmovge %rax,%rdi
cmpl   $0xb,0x1c(%rsp)
cmovge %rax,%rdi
call   1030 <puts@plt>
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xe5c(%rip),%rdi
call   1040 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
cmpl   $0x15,0x10(%rsp)
lea    0xeab(%rip),%rdi
lea    0xe5c(%rip),%rax
cmovl  %rax,%rdi
cmpl   $0xb,0x14(%rsp)
cmovl  %rax,%rdi
call   1030 <puts@plt>
lea    0xe22(%rip),%rdi
call   1040 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
cmpl   $0xb,0xc(%rsp)
lea    0xe57(%rip),%rax
lea    0xe3b(%rip),%rdi
cmovge %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"a: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"b: \00"
@.str.3 = [29 x i8] c"(a > 10 || b > 20) is TRUE.\0A\00"
@.str.4 = [30 x i8] c"(a > 10 || b > 20) is FALSE.\0A\00"
@.str.5 = [4 x i8] c"c: \00"
@.str.6 = [4 x i8] c"d: \00"
@.str.7 = [29 x i8] c"(c > 10 && d > 20) is TRUE.\0A\00"
@.str.8 = [30 x i8] c"(c > 10 && d > 20) is FALSE.\0A\00"
@.str.9 = [4 x i8] c"e: \00"
@.str.10 = [22 x i8] c"(!(e > 10)) is TRUE.\0A\00"
@.str.11 = [23 x i8] c"(!(e > 10)) is FALSE.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %2
%12 = icmp sgt i32 %11, 10
br i1 %12, label %16, label %13
13: ; preds = %0
%14 = load i32, i32* %3
%15 = icmp sgt i32 %14, 20
br i1 %15, label %16, label %18
16: ; preds = %13, %0
%17 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
br label %20
18: ; preds = %13
%19 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
br label %20
20: ; preds = %18, %16
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%25 = load i32, i32* %4
%26 = icmp sgt i32 %25, 10
br i1 %26, label %27, label %32
27: ; preds = %20
%28 = load i32, i32* %5
%29 = icmp sgt i32 %28, 20
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
br label %34
32: ; preds = %27, %20
%33 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0))
br label %34
34: ; preds = %32, %30
%35 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%37 = load i32, i32* %6
%38 = icmp sgt i32 %37, 10
br i1 %38, label %41, label %39
39: ; preds = %34
%40 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
br label %43
41: ; preds = %34
%42 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0))
br label %43
43: ; preds = %41, %39
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"a: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"b: \00"
@.str.5 = [4 x i8] c"c: \00"
@.str.6 = [4 x i8] c"d: \00"
@.str.9 = [4 x i8] c"e: \00"
@str = [29 x i8] c"(a > 10 || b > 20) is FALSE.\00"
@str.12 = [29 x i8] c"(c > 10 && d > 20) is FALSE.\00"
@str.13 = [21 x i8] c"(!(e > 10)) is TRUE.\00"
@str.14 = [22 x i8] c"(!(e > 10)) is FALSE.\00"
@str.15 = [28 x i8] c"(c > 10 && d > 20) is TRUE.\00"
@str.16 = [28 x i8] c"(a > 10 || b > 20) is TRUE.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%13 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%15 = load i32, i32* %1
%16 = icmp sgt i32 %15, 10
%17 = load i32, i32* %2
%18 = icmp sgt i32 %17, 20
%19 = select i1 %16, i1 true, i1 %18
%20 = select i1 %19, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.16, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0)
%21 = call i32 @puts(i8* dereferenceable(1) %20)
%22 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%24 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%26 = load i32, i32* %3
%27 = icmp sgt i32 %26, 10
%28 = load i32, i32* %4
%29 = icmp sgt i32 %28, 20
%30 = select i1 %27, i1 %29, i1 false
%31 = select i1 %30, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.15, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str.12, i64 0, i64 0)
%32 = call i32 @puts(i8* dereferenceable(1) %31)
%33 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%35 = load i32, i32* %5
%36 = icmp sgt i32 %35, 10
%37 = select i1 %36, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.14, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.13, i64 0, i64 0)
%38 = call i32 @puts(i8* dereferenceable(1) %37)
ret i32 0
}