#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*/ CD_usage_error(char *);
int PARSE_command_line(int, char **);
int /*<<< orphan*/ initialize(char *);
int /*<<< orphan*/ set_cd_all();
int /*<<< orphan*/ set_cd_path_format(int);
int /*<<< orphan*/ set_cd_size();
int /*<<< orphan*/ set_cd_style(int);
int /*<<< orphan*/ set_cd_user();
int main_setcd(int argc, char **argv) {
  initialize(argv[1]);
  switch (PARSE_command_line(argc, argv)) {
  case 1:
    set_cd_all();
    break;
  case 2:
    set_cd_user();
    break;
  case 4:
    set_cd_style(4);
    break;
  case 5:
    set_cd_style(5);
    break;
  case 3:
    set_cd_size();
    break;
  case 6:
    set_cd_path_format(6);
    break;
  case 7:
    set_cd_path_format(7);
    break;
  default:
    CD_usage_error("[ all ] | [ user to ( <user> | HOME ) ] | [ stack style "
                   "<dest[ructive] | nond[estructive]> ] | [ stack size < # > "
                   "0 < 36 > ] | [ path format <abs[olute] | log[ical]> ]");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main_setcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <initialize@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   10a0 <PARSE_command_line@plt>
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x6,%eax
ja     122e <main_setcd+0xae>
mov    -0x18(%rbp),%rax
lea    0xe3b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1050 <set_cd_all@plt>
jmp    123a <main_setcd+0xba>
mov    $0x0,%al
call   1070 <set_cd_user@plt>
jmp    123a <main_setcd+0xba>
mov    $0x4,%edi
call   1040 <set_cd_style@plt>
jmp    123a <main_setcd+0xba>
mov    $0x5,%edi
call   1040 <set_cd_style@plt>
jmp    123a <main_setcd+0xba>
mov    $0x0,%al
call   1080 <set_cd_size@plt>
jmp    123a <main_setcd+0xba>
mov    $0x6,%edi
call   1030 <set_cd_path_format@plt>
jmp    123a <main_setcd+0xba>
mov    $0x7,%edi
call   1030 <set_cd_path_format@plt>
jmp    123a <main_setcd+0xba>
lea    0xde7(%rip),%rdi
call   1090 <CD_usage_error@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_setcd>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
call   1060 <initialize@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   10a0 <PARSE_command_line@plt>
add    $0xffffffff,%eax
cmp    $0x6,%eax
ja     11bc <main_setcd+0x3c>
lea    0xe56(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %eax,%eax
call   1050 <set_cd_all@plt>
jmp    1205 <main_setcd+0x85>
lea    0xe59(%rip),%rdi
call   1090 <CD_usage_error@plt>
jmp    1205 <main_setcd+0x85>
xor    %eax,%eax
call   1070 <set_cd_user@plt>
jmp    1205 <main_setcd+0x85>
xor    %eax,%eax
call   1080 <set_cd_size@plt>
jmp    1205 <main_setcd+0x85>
mov    $0x4,%edi
call   1040 <set_cd_style@plt>
jmp    1205 <main_setcd+0x85>
mov    $0x5,%edi
call   1040 <set_cd_style@plt>
jmp    1205 <main_setcd+0x85>
mov    $0x6,%edi
jmp    1200 <main_setcd+0x80>
mov    $0x7,%edi
call   1030 <set_cd_path_format@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [168 x i8] c"[ all ] | [ user to ( <user> | HOME ) ] | [ stack style <dest[ructive] | nond[estructive]> ] | [ stack size < # > 0 < 36 > ] | [ path format <abs[olute] | log[ical]> ]\00"
define i32 @main_setcd(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = call i32 @initialize(i8* %7)
%9 = load i32, i32* %3
%10 = load i8**, i8*** %4
%11 = call i32 @PARSE_command_line(i32 %9, i8** %10)
switch i32 %11, label %26 [
i32 1, label %12
i32 2, label %14
i32 4, label %16
i32 5, label %18
i32 3, label %20
i32 6, label %22
i32 7, label %24
]
12: ; preds = %2
%13 = call i32 (...) @set_cd_all()
br label %28
14: ; preds = %2
%15 = call i32 (...) @set_cd_user()
br label %28
16: ; preds = %2
%17 = call i32 @set_cd_style(i32 4)
br label %28
18: ; preds = %2
%19 = call i32 @set_cd_style(i32 5)
br label %28
20: ; preds = %2
%21 = call i32 (...) @set_cd_size()
br label %28
22: ; preds = %2
%23 = call i32 @set_cd_path_format(i32 6)
br label %28
24: ; preds = %2
%25 = call i32 @set_cd_path_format(i32 7)
br label %28
26: ; preds = %2
%27 = call i32 @CD_usage_error(i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0))
br label %28
28: ; preds = %26, %24, %22, %20, %18, %16, %14, %12
ret i32 0
}

LLVM IR (-O2):
@.str = [168 x i8] c"[ all ] | [ user to ( <user> | HOME ) ] | [ stack style <dest[ructive] | nond[estructive]> ] | [ stack size < # > 0 < 36 > ] | [ path format <abs[olute] | log[ical]> ]\00"
define i32 @main_setcd(i32 %0, i8** %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @initialize(i8* %4)
%6 = tail call i32 @PARSE_command_line(i32 %0, i8** %1)
switch i32 %6, label %21 [
i32 1, label %7
i32 2, label %9
i32 4, label %11
i32 5, label %13
i32 3, label %15
i32 6, label %17
i32 7, label %19
]
7: ; preds = %2
%8 = tail call i32 (...) @set_cd_all()
br label %23
9: ; preds = %2
%10 = tail call i32 (...) @set_cd_user()
br label %23
11: ; preds = %2
%12 = tail call i32 @set_cd_style(i32 4)
br label %23
13: ; preds = %2
%14 = tail call i32 @set_cd_style(i32 5)
br label %23
15: ; preds = %2
%16 = tail call i32 (...) @set_cd_size()
br label %23
17: ; preds = %2
%18 = tail call i32 @set_cd_path_format(i32 6)
br label %23
19: ; preds = %2
%20 = tail call i32 @set_cd_path_format(i32 7)
br label %23
21: ; preds = %2
%22 = tail call i32 @CD_usage_error(i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0))
br label %23
23: ; preds = %21, %19, %17, %15, %13, %11, %9, %7
ret i32 0
}