#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) {
  int some_test_failed;
  argc = argc;
  argv = argv;
  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    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xeae(%rip),%rdi
mov    $0x31,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     116d <main+0x4d>
movl   $0x1,-0x14(%rbp)
lea    0xe8f(%rip),%rdi
mov    $0x32,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     118f <main+0x6f>
movl   $0x1,-0x14(%rbp)
lea    0xe70(%rip),%rdi
mov    $0x33,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     11b1 <main+0x91>
movl   $0x1,-0x14(%rbp)
lea    0xe51(%rip),%rdi
mov    $0x34,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     11d3 <main+0xb3>
movl   $0x1,-0x14(%rbp)
lea    0xe32(%rip),%rdi
mov    $0x35,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     11f5 <main+0xd5>
movl   $0x1,-0x14(%rbp)
lea    0xe13(%rip),%rdi
mov    $0x36,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     1217 <main+0xf7>
movl   $0x1,-0x14(%rbp)
lea    0xdf4(%rip),%rdi
mov    $0x37,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     1239 <main+0x119>
movl   $0x1,-0x14(%rbp)
lea    0xdd5(%rip),%rdi
mov    $0x38,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     125b <main+0x13b>
movl   $0x1,-0x14(%rbp)
lea    0xdb6(%rip),%rdi
mov    $0x39,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     127d <main+0x15d>
movl   $0x1,-0x14(%rbp)
lea    0xd97(%rip),%rdi
mov    $0x41,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     129f <main+0x17f>
movl   $0x1,-0x14(%rbp)
lea    0xd79(%rip),%rdi
mov    $0x42,%esi
call   1040 <check_environment_variable@plt>
cmp    $0x0,%rax
je     12c1 <main+0x1a1>
movl   $0x1,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     12dc <main+0x1bc>
lea    0xd51(%rip),%rdi
call   1030 <printf@plt>
jmp    12e8 <main+0x1c8>
lea    0xd49(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%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) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
store i32 %7, i32* %4
%8 = load i8**, i8*** %5
store i8** %8, i8*** %5
store i32 0, i32* %6
%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 = %2
store i32 1, i32* %6
br label %12
12: ; preds = %11, %2
%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* %6
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* %6
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* %6
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* %6
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* %6
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* %6
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* %6
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* %6
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* %6
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* %6
br label %52
52: ; preds = %51, %48
%53 = load i32, i32* %6
%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* %6
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) {
%3 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 49)
%4 = icmp ne i64 %3, 0
%5 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 50)
%6 = icmp ne i64 %5, 0
%7 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8 signext 51)
%8 = icmp ne i64 %7, 0
%9 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8 signext 52)
%10 = icmp ne i64 %9, 0
%11 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8 signext 53)
%12 = icmp ne i64 %11, 0
%13 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8 signext 54)
%14 = icmp ne i64 %13, 0
%15 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8 signext 55)
%16 = icmp ne i64 %15, 0
%17 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8 signext 56)
%18 = icmp ne i64 %17, 0
%19 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8 signext 57)
%20 = icmp ne i64 %19, 0
%21 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8 signext 65)
%22 = icmp ne i64 %21, 0
%23 = tail call i64 @check_environment_variable(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8 signext 66)
%24 = icmp ne i64 %23, 0
%25 = select i1 %24, i1 true, i1 %22
%26 = select i1 %25, i1 true, i1 %20
%27 = select i1 %26, i1 true, i1 %18
%28 = select i1 %27, i1 true, i1 %16
%29 = select i1 %28, i1 true, i1 %14
%30 = select i1 %29, i1 true, i1 %12
%31 = select i1 %30, i1 true, i1 %10
%32 = select i1 %31, i1 true, i1 %8
%33 = select i1 %32, i1 true, i1 %6
%34 = select i1 %33, i1 true, i1 %4
%35 = select i1 %34, 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)
%36 = tail call i32 @puts(i8* dereferenceable(1) %35)
%37 = zext i1 %34 to i32
ret i32 %37
}