#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 *, int *);
int main(void) {
  int a, b, c;
  printf("Enter a, b and c");
  scanf("%d%d%d", &a, &b, &c);
  if ((a == 0) && (b == 0) && (c == 0))
    printf("You are on level 0");
  if ((a != 0) && (b != 0) && (c != 0))
    printf("You are on level 1");
  if ((a != 0) || (b == 0) || (c != 0))
    printf("One of the number entered is 0");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    117d <main+0x5d>
cmpl   $0x0,-0xc(%rbp)
jne    117d <main+0x5d>
cmpl   $0x0,-0x10(%rbp)
jne    117d <main+0x5d>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
je     11a7 <main+0x87>
cmpl   $0x0,-0xc(%rbp)
je     11a7 <main+0x87>
cmpl   $0x0,-0x10(%rbp)
je     11a7 <main+0x87>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    11c5 <main+0xa5>
cmpl   $0x0,-0xc(%rbp)
je     11c5 <main+0xa5>
cmpl   $0x0,-0x10(%rbp)
je     11d1 <main+0xb1>
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%edx
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%eax
test   %edx,%edx
jne    117b <main+0x5b>
test   %ecx,%ecx
jne    117b <main+0x5b>
test   %eax,%eax
jne    117b <main+0x5b>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    0x14(%rsp),%edx
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%eax
test   %edx,%edx
je     119f <main+0x7f>
test   %ecx,%ecx
je     119f <main+0x7f>
test   %eax,%eax
je     119f <main+0x7f>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    0x14(%rsp),%edx
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%eax
test   %edx,%edx
jne    11ab <main+0x8b>
test   %ecx,%ecx
je     11ab <main+0x8b>
test   %eax,%eax
je     11b7 <main+0x97>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a, b and c\00"
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [19 x i8] c"You are on level 0\00"
@.str.3 = [19 x i8] c"You are on level 1\00"
@.str.4 = [31 x i8] c"One of the number entered is 0\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %0
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %17
17: ; preds = %15, %12, %9, %0
%18 = load i32, i32* %2
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %28
20: ; preds = %17
%21 = load i32, i32* %3
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = load i32, i32* %4
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
br label %28
28: ; preds = %26, %23, %20, %17
%29 = load i32, i32* %2
%30 = icmp ne i32 %29, 0
br i1 %30, label %37, label %31
31: ; preds = %28
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 0
br i1 %33, label %37, label %34
34: ; preds = %31
%35 = load i32, i32* %4
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %34, %31, %28
%38 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
br label %39
39: ; preds = %37, %34
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a, b and c\00"
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [19 x i8] c"You are on level 0\00"
@.str.3 = [19 x i8] c"You are on level 1\00"
@.str.4 = [31 x i8] c"One of the number entered is 0\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 0
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 0
%13 = select i1 %10, i1 %12, i1 false
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 0
%16 = select i1 %13, i1 %15, i1 false
br i1 %16, label %17, label %22
17: ; preds = %0
%18 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%19 = load i32, i32* %1
%20 = load i32, i32* %2
%21 = load i32, i32* %3
br label %22
22: ; preds = %17, %0
%23 = phi i32 [ %21, %17 ], [ %14, %0 ]
%24 = phi i32 [ %20, %17 ], [ %11, %0 ]
%25 = phi i32 [ %19, %17 ], [ %9, %0 ]
%26 = icmp ne i32 %25, 0
%27 = icmp ne i32 %24, 0
%28 = select i1 %26, i1 %27, i1 false
%29 = icmp ne i32 %23, 0
%30 = select i1 %28, i1 %29, i1 false
br i1 %30, label %31, label %36
31: ; preds = %22
%32 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%33 = load i32, i32* %1
%34 = load i32, i32* %2
%35 = load i32, i32* %3
br label %36
36: ; preds = %31, %22
%37 = phi i32 [ %35, %31 ], [ %23, %22 ]
%38 = phi i32 [ %34, %31 ], [ %24, %22 ]
%39 = phi i32 [ %33, %31 ], [ %25, %22 ]
%40 = icmp ne i32 %39, 0
%41 = icmp eq i32 %38, 0
%42 = select i1 %40, i1 true, i1 %41
%43 = icmp ne i32 %37, 0
%44 = select i1 %42, i1 true, i1 %43
br i1 %44, label %45, label %47
45: ; preds = %36
%46 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
br label %47
47: ; preds = %36, %45
ret i32 0
}