#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 main() {
  char *spec;
  char *block_size;
  spec = getenv("BLOCK");
  if (!spec && !(spec = getenv("BLOCK_SIZE")) && !(spec = getenv("BLOCKSIZE")))
    block_size = 0;
  else {
    if (*spec == '\'')
      block_size = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117b <main+0x6b>
lea    0xec5(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    117b <main+0x6b>
lea    0xeb6(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    117b <main+0x6b>
movq   $0x0,-0x18(%rbp)
jmp    1198 <main+0x88>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
jne    1193 <main+0x83>
movq   $0x0,-0x18(%rbp)
jmp    1198 <main+0x88>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
jne    113f <main+0x2f>
lea    0xedd(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
jne    113f <main+0x2f>
lea    0xed7(%rip),%rdi
call   1030 <getenv@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"BLOCK\00"
@.str.1 = [11 x i8] c"BLOCK_SIZE\00"
@.str.2 = [10 x i8] c"BLOCKSIZE\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i8* @getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %14, label %7
7: ; preds = %0
%8 = call i8* @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
store i8* %8, i8** %2
%9 = icmp ne i8* %8, null
br i1 %9, label %14, label %10
10: ; preds = %7
%11 = call i8* @getenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
store i8* %11, i8** %2
%12 = icmp ne i8* %11, null
br i1 %12, label %14, label %13
13: ; preds = %10
store i8* null, i8** %3
br label %21
14: ; preds = %10, %7, %0
%15 = load i8*, i8** %2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 39
br i1 %18, label %19, label %20
19: ; preds = %14
store i8* null, i8** %3
br label %20
20: ; preds = %19, %14
br label %21
21: ; preds = %20, %13
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"BLOCK\00"
@.str.1 = [11 x i8] c"BLOCK_SIZE\00"
@.str.2 = [10 x i8] c"BLOCKSIZE\00"
define i32 @main() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i8* @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i8* @getenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %6, %0, %3
ret i32 0
}