#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 atoi(char *);
int /*<<< orphan*/ funct(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int a = atoi(argv[1]);
  int b = atoi(argv[2]);
  int c = atoi(argv[3]);
  if (a == b || b == c) {
    printf("True decision; True condition; False condition.");
  }
  if (a) {
    if (a == b) {
      printf("Unevaluated decision and condition.");
    }
  } else {
    printf("False Decision.");
  }
  switch (a) {
  case 0:
    printf("Executed switch case.");
    break;
  default:
    printf("Unexecuted switch case.");
    break;
  }
  funct(a);
  funct(b + c);
}


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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
je     118e <main+0x5e>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    119a <main+0x6a>
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
je     11c1 <main+0x91>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    11bc <main+0x8c>
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
jmp    11cd <main+0x9d>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
test   %eax,%eax
jne    11ee <main+0xbe>
jmp    11dd <main+0xad>
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
jmp    11fa <main+0xca>
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
call   1040 <funct@plt>
mov    -0x18(%rbp),%edi
add    -0x1c(%rbp),%edi
call   1040 <funct@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbp
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
mov    0x10(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,%r14d
mov    0x18(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,%r15d
cmp    %r14d,%ebx
je     1167 <main+0x37>
cmp    %r15d,%r14d
jne    1173 <main+0x43>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
test   %ebx,%ebx
je     1185 <main+0x55>
cmp    %r14d,%ebx
je     1185 <main+0x55>
lea    0xef7(%rip),%rbp
jmp    11b0 <main+0x80>
test   %ebx,%ebx
lea    0xed6(%rip),%rax
lea    0xee5(%rip),%rbp
cmove  %rax,%rbp
lea    0xeb4(%rip),%rax
lea    0xe89(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
mov    %rbp,%rdi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <funct@plt>
add    %r14d,%r15d
mov    %r15d,%edi
call   1040 <funct@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [48 x i8] c"True decision; True condition; False condition.\00"
@.str.1 = [36 x i8] c"Unevaluated decision and condition.\00"
@.str.2 = [16 x i8] c"False Decision.\00"
@.str.3 = [22 x i8] c"Executed switch case.\00"
@.str.4 = [24 x i8] c"Unexecuted switch case.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
store i32 %12, i32* %6
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i32 @atoi(i8* %15)
store i32 %16, i32* %7
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 3
%19 = load i8*, i8** %18
%20 = call i32 @atoi(i8* %19)
store i32 %20, i32* %8
%21 = load i32, i32* %6
%22 = load i32, i32* %7
%23 = icmp eq i32 %21, %22
br i1 %23, label %28, label %24
24: ; preds = %2
%25 = load i32, i32* %7
%26 = load i32, i32* %8
%27 = icmp eq i32 %25, %26
br i1 %27, label %28, label %30
28: ; preds = %24, %2
%29 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
br label %30
30: ; preds = %28, %24
%31 = load i32, i32* %6
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %40
33: ; preds = %30
%34 = load i32, i32* %6
%35 = load i32, i32* %7
%36 = icmp eq i32 %34, %35
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %39
39: ; preds = %37, %33
br label %42
40: ; preds = %30
%41 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
br label %42
42: ; preds = %40, %39
%43 = load i32, i32* %6
switch i32 %43, label %46 [
i32 0, label %44
]
44: ; preds = %42
%45 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %48
46: ; preds = %42
%47 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %48
48: ; preds = %46, %44
%49 = load i32, i32* %6
%50 = call i32 @funct(i32 %49)
%51 = load i32, i32* %7
%52 = load i32, i32* %8
%53 = add nsw i32 %51, %52
%54 = call i32 @funct(i32 %53)
%55 = load i32, i32* %3
ret i32 %55
}

LLVM IR (-O2):
@.str = [48 x i8] c"True decision; True condition; False condition.\00"
@.str.1 = [36 x i8] c"Unevaluated decision and condition.\00"
@.str.2 = [16 x i8] c"False Decision.\00"
@.str.3 = [22 x i8] c"Executed switch case.\00"
@.str.4 = [24 x i8] c"Unexecuted switch case.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = getelementptr inbounds i8*, i8** %1, i64 3
%10 = load i8*, i8** %9
%11 = tail call i32 @atoi(i8* %10)
%12 = icmp eq i32 %5, %8
%13 = icmp eq i32 %8, %11
%14 = select i1 %12, i1 true, i1 %13
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %2, %15
%18 = icmp eq i32 %5, 0
%19 = select i1 %18, i1 true, i1 %12
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = select i1 %18, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0)
%22 = select i1 %18, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0)
%23 = tail call i32 @printf(i8* dereferenceable(1) %22)
br label %24
24: ; preds = %17, %20
%25 = phi i8* [ %21, %20 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), %17 ]
%26 = tail call i32 @printf(i8* dereferenceable(1) %25)
%27 = tail call i32 @funct(i32 %5)
%28 = add nsw i32 %11, %8
%29 = tail call i32 @funct(i32 %28)
ret i32 0
}