#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*/ PrintErrorExit(char *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
void Check_Load(int argc, char **argv) {
  if (argc > 3) {
    if (!strcmp(argv[3], "map")) {
      if (argc == 5)
        return;
      PrintErrorExit(argv[0], "load map");
    }
    if (argc == 4)
      return;
    PrintErrorExit(argv[0], "load");
  }
  PrintErrorExit(argv[0], "load");
}


x86 assembly (clang, -O0):
<Check_Load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x4(%rbp)
jle    119a <Check_Load+0x7a>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xebd(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1178 <Check_Load+0x58>
cmpl   $0x5,-0x4(%rbp)
jne    1165 <Check_Load+0x45>
jmp    11ad <Check_Load+0x8d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe8d(%rip),%rsi
call   1040 <PrintErrorExit@plt>
cmpl   $0x4,-0x4(%rbp)
jne    1187 <Check_Load+0x67>
jmp    11ad <Check_Load+0x8d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe74(%rip),%rsi
call   1040 <PrintErrorExit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe61(%rip),%rsi
call   1040 <PrintErrorExit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Check_Load>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x4,%edi
jl     1177 <Check_Load+0x57>
mov    %edi,%ebp
mov    0x18(%rbx),%rdi
lea    0xecd(%rip),%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1148 <Check_Load+0x28>
cmp    $0x4,%ebp
je     1161 <Check_Load+0x41>
jmp    1168 <Check_Load+0x48>
cmp    $0x5,%ebp
je     1161 <Check_Load+0x41>
mov    (%rbx),%rdi
lea    0xea9(%rip),%rsi
call   1040 <PrintErrorExit@plt>
cmp    $0x4,%ebp
jne    1168 <Check_Load+0x48>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    (%rbx),%rdi
lea    0xe97(%rip),%rsi
call   1040 <PrintErrorExit@plt>
mov    (%rbx),%rdi
lea    0xe88(%rip),%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <PrintErrorExit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"map\00"
@.str.1 = [9 x i8] c"load map\00"
@.str.2 = [5 x i8] c"load\00"
define void @Check_Load(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 3
br i1 %6, label %7, label %31
7: ; preds = %2
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 3
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%12 = icmp ne i32 %11, 0
br i1 %12, label %22, label %13
13: ; preds = %7
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 5
br i1 %15, label %16, label %17
16: ; preds = %13
br label %36
17: ; preds = %13
%18 = load i8**, i8*** %4
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 @PrintErrorExit(i8* %20, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %22
22: ; preds = %17, %7
%23 = load i32, i32* %3
%24 = icmp eq i32 %23, 4
br i1 %24, label %25, label %26
25: ; preds = %22
br label %36
26: ; preds = %22
%27 = load i8**, i8*** %4
%28 = getelementptr inbounds i8*, i8** %27, i64 0
%29 = load i8*, i8** %28
%30 = call i32 @PrintErrorExit(i8* %29, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %31
31: ; preds = %26, %2
%32 = load i8**, i8*** %4
%33 = getelementptr inbounds i8*, i8** %32, i64 0
%34 = load i8*, i8** %33
%35 = call i32 @PrintErrorExit(i8* %34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %36
36: ; preds = %31, %25, %16
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"map\00"
@.str.1 = [9 x i8] c"load map\00"
@.str.2 = [5 x i8] c"load\00"
define void @Check_Load(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 3
br i1 %3, label %4, label %19
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 3
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = icmp eq i32 %0, 5
br i1 %10, label %22, label %11
11: ; preds = %9
%12 = load i8*, i8** %1
%13 = tail call i32 @PrintErrorExit(i8* %12, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %11, %4
%15 = icmp eq i32 %0, 4
br i1 %15, label %22, label %16
16: ; preds = %14
%17 = load i8*, i8** %1
%18 = tail call i32 @PrintErrorExit(i8* %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %19
19: ; preds = %16, %2
%20 = load i8*, i8** %1
%21 = tail call i32 @PrintErrorExit(i8* %20, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %22
22: ; preds = %14, %9, %19
ret void
}