#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 */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char const *);
scalar_t__ strcmp(char *, char *);
extern int is_full_check(const char *test_name) {
  char *env_cceph_full_check;
  env_cceph_full_check = getenv("CCEPH_FULL_CHECK");
  if (env_cceph_full_check == NULL || strcmp(env_cceph_full_check, "1") != 0) {
    printf("NOT FULL CHECK, test %s will be ignored.\n", test_name);
    return 0;
  } else {
    printf("FULL CHECK, test %s will run.\n", test_name);
    return 1;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_full_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1171 <is_full_check+0x41>
mov    -0x18(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     118d <is_full_check+0x5d>
mov    -0x10(%rbp),%rsi
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11a4 <is_full_check+0x74>
mov    -0x10(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_full_check>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xec3(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1173 <is_full_check+0x43>
lea    0xec3(%rip),%rsi
mov    %rax,%rdi
call   1050 <strcmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
sete   %bpl
lea    0xed7(%rip),%rax
lea    0xea6(%rip),%rdi
cmove  %rax,%rdi
jmp    117c <is_full_check+0x4c>
xor    %ebp,%ebp
lea    0xe97(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"CCEPH_FULL_CHECK\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [42 x i8] c"NOT FULL CHECK, test %s will be ignored.\0A\00"
@.str.3 = [31 x i8] c"FULL CHECK, test %s will run.\0A\00"
define i32 @is_full_check(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = call i8* @getenv(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i8*, i8** %4
%10 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %8, %1
%13 = load i8*, i8** %3
%14 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8* %13)
store i32 0, i32* %2
br label %18
15: ; preds = %8
%16 = load i8*, i8** %3
%17 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8* %16)
store i32 1, i32* %2
br label %18
18: ; preds = %15, %12
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@.str = [17 x i8] c"CCEPH_FULL_CHECK\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [42 x i8] c"NOT FULL CHECK, test %s will be ignored.\0A\00"
@.str.3 = [31 x i8] c"FULL CHECK, test %s will run.\0A\00"
define i32 @is_full_check(i8* %0) {
%2 = tail call i8* @getenv(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0)
%8 = zext i1 %6 to i32
br label %9
9: ; preds = %4, %1
%10 = phi i8* [ getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), %1 ], [ %7, %4 ]
%11 = phi i32 [ 0, %1 ], [ %8, %4 ]
%12 = tail call i32 @printf(i8* %10, i8* %0)
ret i32 %11
}