char *order(char *args) {
  if (!strcmp(args, "나가기")) {
    return "exit";
  } else if (!strcmp(args[0], "목록")) {
    return "ls";
  } else if (!strcmp(args[0], "이동")) {
    return "cd";
  } else if (!strcmp(args[0], "삭제")) {
    return "rm";
  } else if (!strcmp(args[0], "폴더삭제")) {
    return "rmdir";
  } else if (!strcmp(args[0], "폴더생성")) {
    return "mkdir";
  } else if (!strcmp(args[0], "내용")) {
    return "cat";
  } else if (!strcmp(args[0], "복사")) {
    return "cp";
  } else if (!strcmp(args[0], "이동")) {
    return "mv";
  } else if (!strcmp(args[0], "파일찾기")) {
    return "find";
  } else
    return args;
}


x86 assembly (clang, -O0):
<order>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1145 <order+0x35>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e2 <order+0x1d2>
mov    -0x10(%rbp),%rax
movsbq (%rax),%rdi
lea    0xebb(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1172 <order+0x62>
lea    0xead(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e2 <order+0x1d2>
mov    -0x10(%rbp),%rax
movsbq (%rax),%rdi
lea    0xe98(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    119f <order+0x8f>
lea    0xe8a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e2 <order+0x1d2>
mov    -0x10(%rbp),%rax
movsbq (%rax),%rdi
lea    0xe7e(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11cc <order+0xbc>
lea    0xe60(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e2 <order+0x1d2>
mov    -0x10(%rbp),%rax
movsbq (%rax),%rdi
lea    0xe4b(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11f9 <order+0xe9>
lea    0xe43(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e2 <order+0x1d2>
mov    -0x10(%rbp),%rax
movsbq (%rax),%rdi
lea    0xe31(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1226 <order+0x116>
lea    0xe29(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e2 <order+0x1d2>
mov    -0x10(%rbp),%rax
movsbq (%rax),%rdi
lea    0xe17(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1253 <order+0x143>
lea    0xe09(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e2 <order+0x1d2>
mov    -0x10(%rbp),%rax
movsbq (%rax),%rdi
lea    0xdf5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1280 <order+0x170>
lea    0xde7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e2 <order+0x1d2>
mov    -0x10(%rbp),%rax
movsbq (%rax),%rdi
lea    0xd8a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    12ad <order+0x19d>
lea    0xdbd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e2 <order+0x1d2>
mov    -0x10(%rbp),%rax
movsbq (%rax),%rdi
lea    0xda8(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    12da <order+0x1ca>
lea    0xda0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e2 <order+0x1d2>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<order>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11de <order+0xce>
movsbq (%rbx),%r14
lea    0xed9(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11e7 <order+0xd7>
lea    0xecc(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11f0 <order+0xe0>
lea    0xec8(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11f9 <order+0xe9>
lea    0xeab(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1202 <order+0xf2>
lea    0xeab(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     120b <order+0xfb>
lea    0xeab(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1214 <order+0x104>
lea    0xea3(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     121d <order+0x10d>
lea    0xe9a(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
lea    0xe96(%rip),%rax
cmove  %rax,%rbx
jmp    1224 <order+0x114>
lea    0xe25(%rip),%rbx
jmp    1224 <order+0x114>
lea    0xe28(%rip),%rbx
jmp    1224 <order+0x114>
lea    0xe29(%rip),%rbx
jmp    1224 <order+0x114>
lea    0xe23(%rip),%rbx
jmp    1224 <order+0x114>
lea    0xe2a(%rip),%rbx
jmp    1224 <order+0x114>
lea    0xe34(%rip),%rbx
jmp    1224 <order+0x114>
lea    0xe38(%rip),%rbx
jmp    1224 <order+0x114>
lea    0xe3a(%rip),%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"\EB\82\98\EA\B0\80\EA\B8\B0\00"
@.str.1 = [5 x i8] c"exit\00"
@.str.2 = [7 x i8] c"\EB\AA\A9\EB\A1\9D\00"
@.str.3 = [3 x i8] c"ls\00"
@.str.4 = [7 x i8] c"\EC\9D\B4\EB\8F\99\00"
@.str.5 = [3 x i8] c"cd\00"
@.str.6 = [7 x i8] c"\EC\82\AD\EC\A0\9C\00"
@.str.7 = [3 x i8] c"rm\00"
@.str.8 = [13 x i8] c"\ED\8F\B4\EB\8D\94\EC\82\AD\EC\A0\9C\00"
@.str.9 = [6 x i8] c"rmdir\00"
@.str.10 = [13 x i8] c"\ED\8F\B4\EB\8D\94\EC\83\9D\EC\84\B1\00"
@.str.11 = [6 x i8] c"mkdir\00"
@.str.12 = [7 x i8] c"\EB\82\B4\EC\9A\A9\00"
@.str.13 = [4 x i8] c"cat\00"
@.str.14 = [7 x i8] c"\EB\B3\B5\EC\82\AC\00"
@.str.15 = [3 x i8] c"cp\00"
@.str.16 = [3 x i8] c"mv\00"
@.str.17 = [13 x i8] c"\ED\8C\8C\EC\9D\BC\EC\B0\BE\EA\B8\B0\00"
@.str.18 = [5 x i8] c"find\00"
define i8* @order(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strcmp(i8* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %91
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i64
%13 = inttoptr i64 %12 to i8*
%14 = call i32 @strcmp(i8* %13, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp ne i32 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %8
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %91
17: ; preds = %8
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 0
%20 = load i8, i8* %19
%21 = sext i8 %20 to i64
%22 = inttoptr i64 %21 to i8*
%23 = call i32 @strcmp(i8* %22, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%24 = icmp ne i32 %23, 0
br i1 %24, label %26, label %25
25: ; preds = %17
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %91
26: ; preds = %17
%27 = load i8*, i8** %3
%28 = getelementptr inbounds i8, i8* %27, i64 0
%29 = load i8, i8* %28
%30 = sext i8 %29 to i64
%31 = inttoptr i64 %30 to i8*
%32 = call i32 @strcmp(i8* %31, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%33 = icmp ne i32 %32, 0
br i1 %33, label %35, label %34
34: ; preds = %26
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %91
35: ; preds = %26
%36 = load i8*, i8** %3
%37 = getelementptr inbounds i8, i8* %36, i64 0
%38 = load i8, i8* %37
%39 = sext i8 %38 to i64
%40 = inttoptr i64 %39 to i8*
%41 = call i32 @strcmp(i8* %40, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%42 = icmp ne i32 %41, 0
br i1 %42, label %44, label %43
43: ; preds = %35
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %91
44: ; preds = %35
%45 = load i8*, i8** %3
%46 = getelementptr inbounds i8, i8* %45, i64 0
%47 = load i8, i8* %46
%48 = sext i8 %47 to i64
%49 = inttoptr i64 %48 to i8*
%50 = call i32 @strcmp(i8* %49, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%51 = icmp ne i32 %50, 0
br i1 %51, label %53, label %52
52: ; preds = %44
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %91
53: ; preds = %44
%54 = load i8*, i8** %3
%55 = getelementptr inbounds i8, i8* %54, i64 0
%56 = load i8, i8* %55
%57 = sext i8 %56 to i64
%58 = inttoptr i64 %57 to i8*
%59 = call i32 @strcmp(i8* %58, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%60 = icmp ne i32 %59, 0
br i1 %60, label %62, label %61
61: ; preds = %53
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %91
62: ; preds = %53
%63 = load i8*, i8** %3
%64 = getelementptr inbounds i8, i8* %63, i64 0
%65 = load i8, i8* %64
%66 = sext i8 %65 to i64
%67 = inttoptr i64 %66 to i8*
%68 = call i32 @strcmp(i8* %67, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
%69 = icmp ne i32 %68, 0
br i1 %69, label %71, label %70
70: ; preds = %62
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %91
71: ; preds = %62
%72 = load i8*, i8** %3
%73 = getelementptr inbounds i8, i8* %72, i64 0
%74 = load i8, i8* %73
%75 = sext i8 %74 to i64
%76 = inttoptr i64 %75 to i8*
%77 = call i32 @strcmp(i8* %76, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%78 = icmp ne i32 %77, 0
br i1 %78, label %80, label %79
79: ; preds = %71
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %91
80: ; preds = %71
%81 = load i8*, i8** %3
%82 = getelementptr inbounds i8, i8* %81, i64 0
%83 = load i8, i8* %82
%84 = sext i8 %83 to i64
%85 = inttoptr i64 %84 to i8*
%86 = call i32 @strcmp(i8* %85, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0))
%87 = icmp ne i32 %86, 0
br i1 %87, label %89, label %88
88: ; preds = %80
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %91
89: ; preds = %80
%90 = load i8*, i8** %3
store i8* %90, i8** %2
br label %91
91: ; preds = %89, %88, %79, %70, %61, %52, %43, %34, %25, %16, %7
%92 = load i8*, i8** %2
ret i8* %92
}

LLVM IR (-O2):
@.str = [10 x i8] c"\EB\82\98\EA\B0\80\EA\B8\B0\00"
@.str.1 = [5 x i8] c"exit\00"
@.str.2 = [7 x i8] c"\EB\AA\A9\EB\A1\9D\00"
@.str.3 = [3 x i8] c"ls\00"
@.str.4 = [7 x i8] c"\EC\9D\B4\EB\8F\99\00"
@.str.5 = [3 x i8] c"cd\00"
@.str.6 = [7 x i8] c"\EC\82\AD\EC\A0\9C\00"
@.str.7 = [3 x i8] c"rm\00"
@.str.8 = [13 x i8] c"\ED\8F\B4\EB\8D\94\EC\82\AD\EC\A0\9C\00"
@.str.9 = [6 x i8] c"rmdir\00"
@.str.10 = [13 x i8] c"\ED\8F\B4\EB\8D\94\EC\83\9D\EC\84\B1\00"
@.str.11 = [6 x i8] c"mkdir\00"
@.str.12 = [7 x i8] c"\EB\82\B4\EC\9A\A9\00"
@.str.13 = [4 x i8] c"cat\00"
@.str.14 = [7 x i8] c"\EB\B3\B5\EC\82\AC\00"
@.str.15 = [3 x i8] c"cp\00"
@.str.17 = [13 x i8] c"\ED\8C\8C\EC\9D\BC\EC\B0\BE\EA\B8\B0\00"
@.str.18 = [5 x i8] c"find\00"
define i8* @order(i8* %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %32, label %4
4: ; preds = %1
%5 = load i8, i8* %0
%6 = sext i8 %5 to i64
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %32, label %10
10: ; preds = %4
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %32, label %13
13: ; preds = %10
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %32, label %16
16: ; preds = %13
%17 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %32, label %19
19: ; preds = %16
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %32, label %22
22: ; preds = %19
%23 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %32, label %25
25: ; preds = %22
%26 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %32, label %28
28: ; preds = %25
%29 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0))
%30 = icmp eq i32 %29, 0
%31 = select i1 %30, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8* %0
br label %32
32: ; preds = %28, %25, %22, %19, %16, %13, %10, %4, %1
%33 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %1 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), %10 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), %13 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), %16 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), %19 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), %22 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), %25 ], [ %31, %28 ]
ret i8* %33
}