#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*/ attribute_list_attribute_name(char *);
int /*<<< orphan*/ attribute_list_dictionary(char *);
int /*<<< orphan*/ attribute_list_folder_attribute();
int /*<<< orphan*/ attribute_list_without_folder();
char *environ_exit_application_name(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  char *application_name;
  if ((application_name = environ_exit_application_name(argv[0]))) {
  };
  if (argc == 3) {
    if (strcmp(argv[2], "$dictionary") != 0) {
      attribute_list_dictionary(argv[2]);
      exit(0);
    }
  } else if (argc == 2) {
    if (strcmp(argv[1], "with_table") == 0) {
      attribute_list_folder_attribute();
      exit(0);
    } else {
      attribute_list_attribute_name(argv[1]);
      exit(0);
    }
  }
  attribute_list_without_folder();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1060 <environ_exit_application_name@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     11a5 <main+0x35>
jmp    11a5 <main+0x35>
cmpl   $0x3,-0x8(%rbp)
jne    11e6 <main+0x76>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe42(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     11e1 <main+0x71>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1080 <attribute_list_dictionary@plt>
xor    %edi,%edi
call   1090 <exit@plt>
jmp    1235 <main+0xc5>
cmpl   $0x2,-0x8(%rbp)
jne    1230 <main+0xc0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe0d(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    121c <main+0xac>
mov    $0x0,%al
call   1040 <attribute_list_folder_attribute@plt>
xor    %edi,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <attribute_list_attribute_name@plt>
xor    %edi,%edi
call   1090 <exit@plt>
jmp    1235 <main+0xc5>
mov    $0x0,%al
call   1030 <attribute_list_without_folder@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    (%rsi),%rdi
call   1060 <environ_exit_application_name@plt>
cmp    $0x3,%ebp
je     11ad <main+0x3d>
cmp    $0x2,%ebp
jne    11c2 <main+0x52>
mov    0x8(%rbx),%rdi
lea    0xe77(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    11e2 <main+0x72>
xor    %eax,%eax
call   1040 <attribute_list_folder_attribute@plt>
xor    %edi,%edi
call   1090 <exit@plt>
mov    0x10(%rbx),%rdi
lea    0xe48(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    11d2 <main+0x62>
xor    %eax,%eax
call   1030 <attribute_list_without_folder@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    0x10(%rbx),%rdi
call   1080 <attribute_list_dictionary@plt>
xor    %edi,%edi
call   1090 <exit@plt>
mov    0x8(%rbx),%rdi
call   1050 <attribute_list_attribute_name@plt>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"$dictionary\00"
@.str.1 = [11 x i8] c"with_table\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = call i8* @environ_exit_application_name(i8* %9)
store i8* %10, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %13
12: ; preds = %2
br label %13
13: ; preds = %12, %2
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 3
br i1 %15, label %16, label %29
16: ; preds = %13
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %28
22: ; preds = %16
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 2
%25 = load i8*, i8** %24
%26 = call i32 @attribute_list_dictionary(i8* %25)
%27 = call i32 @exit(i32 0)
unreachable
28: ; preds = %16
br label %48
29: ; preds = %13
%30 = load i32, i32* %4
%31 = icmp eq i32 %30, 2
br i1 %31, label %32, label %47
32: ; preds = %29
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 1
%35 = load i8*, i8** %34
%36 = call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %41
38: ; preds = %32
%39 = call i32 (...) @attribute_list_folder_attribute()
%40 = call i32 @exit(i32 0)
unreachable
41: ; preds = %32
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 1
%44 = load i8*, i8** %43
%45 = call i32 @attribute_list_attribute_name(i8* %44)
%46 = call i32 @exit(i32 0)
unreachable
47: ; preds = %29
br label %48
48: ; preds = %47, %28
%49 = call i32 (...) @attribute_list_without_folder()
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"$dictionary\00"
@.str.1 = [11 x i8] c"with_table\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i8* @environ_exit_application_name(i8* %3)
switch i32 %0, label %26 [
i32 3, label %5
i32 2, label %14
]
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %26, label %10
10: ; preds = %5
%11 = load i8*, i8** %6
%12 = tail call i32 @attribute_list_dictionary(i8* %11)
%13 = tail call i32 @exit(i32 0)
unreachable
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = tail call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %14
%20 = tail call i32 (...) @attribute_list_folder_attribute()
%21 = tail call i32 @exit(i32 0)
unreachable
22: ; preds = %14
%23 = load i8*, i8** %15
%24 = tail call i32 @attribute_list_attribute_name(i8* %23)
%25 = tail call i32 @exit(i32 0)
unreachable
26: ; preds = %2, %5
%27 = tail call i32 (...) @attribute_list_without_folder()
ret i32 0
}