#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 *);
scalar_t__ strcmp(char *, char *);
void Check_List(int argc, char **argv) {
  if (argc != 4)
    PrintErrorExit(argv[0], "list map : too many args");
  else if (strcmp(argv[3], "map"))
    PrintErrorExit(argv[0], "list map : Can only list map");
}


x86 assembly (clang, -O0):
<Check_List>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x4(%rbp)
je     1151 <Check_List+0x31>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <PrintErrorExit@plt>
jmp    1187 <Check_List+0x67>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xed2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1182 <Check_List+0x62>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe9c(%rip),%rsi
call   1040 <PrintErrorExit@plt>
jmp    1187 <Check_List+0x67>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Check_List>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x4,%edi
jne    1147 <Check_List+0x27>
mov    0x18(%rbx),%rdi
lea    0xefe(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1157 <Check_List+0x37>
lea    0xed4(%rip),%rsi
jmp    114e <Check_List+0x2e>
lea    0xeb2(%rip),%rsi
mov    (%rbx),%rdi
pop    %rbx
jmp    1040 <PrintErrorExit@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"list map : too many args\00"
@.str.1 = [4 x i8] c"map\00"
@.str.2 = [29 x i8] c"list map : Can only list map\00"
define void @Check_List(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 ne i32 %5, 4
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @PrintErrorExit(i8* %10, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %24
12: ; preds = %2
%13 = load i8**, i8*** %4
%14 = getelementptr inbounds i8*, i8** %13, i64 3
%15 = load i8*, i8** %14
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %23
18: ; preds = %12
%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 ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %23
23: ; preds = %18, %12
br label %24
24: ; preds = %23, %7
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"list map : too many args\00"
@.str.1 = [4 x i8] c"map\00"
@.str.2 = [29 x i8] c"list map : Can only list map\00"
define void @Check_List(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 4
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 3
%6 = load i8*, i8** %5
%7 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4, %2
%10 = phi i8* [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), %2 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), %4 ]
%11 = load i8*, i8** %1
%12 = tail call i32 @PrintErrorExit(i8* %11, i8* %10)
br label %13
13: ; preds = %9, %4
ret void
}