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


x86 assembly (clang, -O0):
<Check_Close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x4(%rbp)
jle    117d <Check_Close+0x5d>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xebe(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    116a <Check_Close+0x4a>
cmpl   $0x4,-0x4(%rbp)
jne    1165 <Check_Close+0x45>
jmp    1190 <Check_Close+0x70>
jmp    116a <Check_Close+0x4a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe88(%rip),%rsi
call   1040 <PrintErrorExit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe75(%rip),%rsi
call   1040 <PrintErrorExit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Check_Close>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x4,%edi
jl     115c <Check_Close+0x3c>
mov    %edi,%ebp
mov    0x18(%rbx),%rdi
lea    0xece(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x4,%ebp
jne    114d <Check_Close+0x2d>
test   %eax,%eax
jne    114d <Check_Close+0x2d>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    (%rbx),%rdi
lea    0xea9(%rip),%rsi
call   1040 <PrintErrorExit@plt>
mov    (%rbx),%rdi
lea    0xe9a(%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 = [10 x i8] c"close map\00"
define void @Check_Close(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 %23
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 %18, label %13
13: ; preds = %7
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 4
br i1 %15, label %16, label %17
16: ; preds = %13
br label %28
17: ; preds = %13
br label %18
18: ; preds = %17, %7
%19 = load i8**, i8*** %4
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 @PrintErrorExit(i8* %21, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %18, %2
%24 = load i8**, i8*** %4
%25 = getelementptr inbounds i8*, i8** %24, i64 0
%26 = load i8*, i8** %25
%27 = call i32 @PrintErrorExit(i8* %26, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %28
28: ; preds = %23, %16
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"map\00"
@.str.1 = [10 x i8] c"close map\00"
define void @Check_Close(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 3
br i1 %3, label %4, label %14
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
%9 = icmp eq i32 %0, 4
%10 = and i1 %9, %8
br i1 %10, label %17, label %11
11: ; preds = %4
%12 = load i8*, i8** %1
%13 = tail call i32 @PrintErrorExit(i8* %12, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %1
%16 = tail call i32 @PrintErrorExit(i8* %15, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %4, %14
ret void
}