#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 */
scalar_t__ check_environment_variable(char *, char);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv, char **envp) {
  int some_test_failed;
  some_test_failed = 0;
  if (check_environment_variable("V1", '1'))
    some_test_failed = 1;
  if (check_environment_variable("V2", '2'))
    some_test_failed = 1;
  if (check_environment_variable("V3", '3'))
    some_test_failed = 1;
  if (check_environment_variable("V4", '4'))
    some_test_failed = 1;
  if (check_environment_variable("V5", '5'))
    some_test_failed = 1;
  if (check_environment_variable("V6", '6'))
    some_test_failed = 1;
  if (check_environment_variable("V7", '7'))
    some_test_failed = 1;
  if (check_environment_variable("V8", '8'))
    some_test_failed = 1;
  if (check_environment_variable("V9", '9'))
    some_test_failed = 1;
  if (check_environment_variable("V10", 'A'))
    some_test_failed = 1;
  if (check_environment_variable("V11", 'B'))
    some_test_failed = 1;
  if (some_test_failed) {
    printf("FAILURE\n");
  } else {
    printf("SUCCESS\n");
  }
  return some_test_failed;
}


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    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xeb8(%rip),%rdi
mov    $0x31,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     1163 <main+0x43>
movl   $0x1,-0x1c(%rbp)
lea    0xe99(%rip),%rdi
mov    $0x32,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     1185 <main+0x65>
movl   $0x1,-0x1c(%rbp)
lea    0xe7a(%rip),%rdi
mov    $0x33,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     11a7 <main+0x87>
movl   $0x1,-0x1c(%rbp)
lea    0xe5b(%rip),%rdi
mov    $0x34,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     11c9 <main+0xa9>
movl   $0x1,-0x1c(%rbp)
lea    0xe3c(%rip),%rdi
mov    $0x35,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     11eb <main+0xcb>
movl   $0x1,-0x1c(%rbp)
lea    0xe1d(%rip),%rdi
mov    $0x36,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     120d <main+0xed>
movl   $0x1,-0x1c(%rbp)
lea    0xdfe(%rip),%rdi
mov    $0x37,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     122f <main+0x10f>
movl   $0x1,-0x1c(%rbp)
lea    0xddf(%rip),%rdi
mov    $0x38,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     1251 <main+0x131>
movl   $0x1,-0x1c(%rbp)
lea    0xdc0(%rip),%rdi
mov    $0x39,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     1273 <main+0x153>
movl   $0x1,-0x1c(%rbp)
lea    0xda1(%rip),%rdi
mov    $0x41,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     1295 <main+0x175>
movl   $0x1,-0x1c(%rbp)
lea    0xd83(%rip),%rdi
mov    $0x42,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     12b7 <main+0x197>
movl   $0x1,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     12d2 <main+0x1b2>
lea    0xd5b(%rip),%rdi
call   1030 <printf@plt>
jmp    12de <main+0x1be>
lea    0xd53(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xecb(%rip),%rdi
mov    $0x31,%esi
call   1040 <check_environment_variable@plt>
mov    %rax,0x20(%rsp)
lea    0xeb8(%rip),%rdi
mov    $0x32,%esi
call   1040 <check_environment_variable@plt>
mov    %rax,0x18(%rsp)
lea    0xea5(%rip),%rdi
mov    $0x33,%esi
call   1040 <check_environment_variable@plt>
mov    %rax,0x10(%rsp)
lea    0xe92(%rip),%rdi
mov    $0x34,%esi
call   1040 <check_environment_variable@plt>
mov    %rax,%rbx
lea    0xe81(%rip),%rdi
mov    $0x35,%esi
call   1040 <check_environment_variable@plt>
mov    %rax,0x8(%rsp)
lea    0xe6e(%rip),%rdi
mov    $0x36,%esi
call   1040 <check_environment_variable@plt>
mov    %rax,%r14
lea    0xe5d(%rip),%rdi
mov    $0x37,%esi
call   1040 <check_environment_variable@plt>
mov    %rax,%rbp
lea    0xe4c(%rip),%rdi
mov    $0x38,%esi
call   1040 <check_environment_variable@plt>
mov    %rax,%r15
lea    0xe3b(%rip),%rdi
mov    $0x39,%esi
call   1040 <check_environment_variable@plt>
mov    %rax,%r12
lea    0xe2a(%rip),%rdi
mov    $0x41,%esi
call   1040 <check_environment_variable@plt>
mov    %rax,%r13
lea    0xe1a(%rip),%rdi
mov    $0x42,%esi
call   1040 <check_environment_variable@plt>
or     %r13,%rax
or     %r15,%r12
or     %rax,%r12
or     %r14,%rbp
or     0x8(%rsp),%rbp
or     %r12,%rbp
or     0x10(%rsp),%rbx
or     0x18(%rsp),%rbx
or     %rbp,%rbx
xor    %ebp,%ebp
or     0x20(%rsp),%rbx
setne  %bpl
lea    0xde9(%rip),%rax
lea    0xdda(%rip),%rdi
cmovne %rax,%rdi
call   1030 <puts@plt>
mov    %ebp,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"V1\00"
@.str.1 = [3 x i8] c"V2\00"
@.str.2 = [3 x i8] c"V3\00"
@.str.3 = [3 x i8] c"V4\00"
@.str.4 = [3 x i8] c"V5\00"
@.str.5 = [3 x i8] c"V6\00"
@.str.6 = [3 x i8] c"V7\00"
@.str.7 = [3 x i8] c"V8\00"
@.str.8 = [3 x i8] c"V9\00"
@.str.9 = [4 x i8] c"V10\00"
@.str.10 = [4 x i8] c"V11\00"
@.str.11 = [9 x i8] c"FAILURE\0A\00"
@.str.12 = [9 x i8] c"SUCCESS\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
store i32 0, i32* %8
%9 = call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 49)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %3
store i32 1, i32* %8
br label %12
12: ; preds = %11, %3
%13 = call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 50)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 1, i32* %8
br label %16
16: ; preds = %15, %12
%17 = call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8 signext 51)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %16
store i32 1, i32* %8
br label %20
20: ; preds = %19, %16
%21 = call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8 signext 52)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 1, i32* %8
br label %24
24: ; preds = %23, %20
%25 = call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8 signext 53)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %24
store i32 1, i32* %8
br label %28
28: ; preds = %27, %24
%29 = call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8 signext 54)
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %28
store i32 1, i32* %8
br label %32
32: ; preds = %31, %28
%33 = call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8 signext 55)
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %36
35: ; preds = %32
store i32 1, i32* %8
br label %36
36: ; preds = %35, %32
%37 = call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8 signext 56)
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %40
39: ; preds = %36
store i32 1, i32* %8
br label %40
40: ; preds = %39, %36
%41 = call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8 signext 57)
%42 = icmp ne i64 %41, 0
br i1 %42, label %43, label %44
43: ; preds = %40
store i32 1, i32* %8
br label %44
44: ; preds = %43, %40
%45 = call i64 @check_environment_variable(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8 signext 65)
%46 = icmp ne i64 %45, 0
br i1 %46, label %47, label %48
47: ; preds = %44
store i32 1, i32* %8
br label %48
48: ; preds = %47, %44
%49 = call i64 @check_environment_variable(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8 signext 66)
%50 = icmp ne i64 %49, 0
br i1 %50, label %51, label %52
51: ; preds = %48
store i32 1, i32* %8
br label %52
52: ; preds = %51, %48
%53 = load i32, i32* %8
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %52
%56 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
br label %59
57: ; preds = %52
%58 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
br label %59
59: ; preds = %57, %55
%60 = load i32, i32* %8
ret i32 %60
}

LLVM IR (-O2):
@.str = [3 x i8] c"V1\00"
@.str.1 = [3 x i8] c"V2\00"
@.str.2 = [3 x i8] c"V3\00"
@.str.3 = [3 x i8] c"V4\00"
@.str.4 = [3 x i8] c"V5\00"
@.str.5 = [3 x i8] c"V6\00"
@.str.6 = [3 x i8] c"V7\00"
@.str.7 = [3 x i8] c"V8\00"
@.str.8 = [3 x i8] c"V9\00"
@.str.9 = [4 x i8] c"V10\00"
@.str.10 = [4 x i8] c"V11\00"
@str = [8 x i8] c"SUCCESS\00"
@str.13 = [8 x i8] c"FAILURE\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 49)
%5 = icmp ne i64 %4, 0
%6 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 50)
%7 = icmp ne i64 %6, 0
%8 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8 signext 51)
%9 = icmp ne i64 %8, 0
%10 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8 signext 52)
%11 = icmp ne i64 %10, 0
%12 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8 signext 53)
%13 = icmp ne i64 %12, 0
%14 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8 signext 54)
%15 = icmp ne i64 %14, 0
%16 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8 signext 55)
%17 = icmp ne i64 %16, 0
%18 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8 signext 56)
%19 = icmp ne i64 %18, 0
%20 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8 signext 57)
%21 = icmp ne i64 %20, 0
%22 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8 signext 65)
%23 = icmp ne i64 %22, 0
%24 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8 signext 66)
%25 = icmp ne i64 %24, 0
%26 = select i1 %25, i1 true, i1 %23
%27 = select i1 %26, i1 true, i1 %21
%28 = select i1 %27, i1 true, i1 %19
%29 = select i1 %28, i1 true, i1 %17
%30 = select i1 %29, i1 true, i1 %15
%31 = select i1 %30, i1 true, i1 %13
%32 = select i1 %31, i1 true, i1 %11
%33 = select i1 %32, i1 true, i1 %9
%34 = select i1 %33, i1 true, i1 %7
%35 = select i1 %34, i1 true, i1 %5
%36 = select i1 %35, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.13, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0)
%37 = tail call i32 @puts(i8* dereferenceable(1) %36)
%38 = zext i1 %35 to i32
ret i32 %38
}