#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 */
typedef int /*<<< orphan*/ item_list;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ print_char();
int /*<<< orphan*/ print_int();
int /*<<< orphan*/ print_long();
int /*<<< orphan*/ print_short();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strlen(char *);
scalar_t__ strncmp(char *, char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  char *item_list[] = {"char", "short", "int", "long"};
  if (argc != 2) {
    fprintf(stderr, "Usage: %s <data type>\n", argv[0]);
    exit(EXIT_FAILURE);
  }
  for (int i = 0; i < sizeof(item_list) / sizeof(item_list[0]); i++) {
    if (strncmp(argv[1], item_list[i], strlen(argv[1])) == 0) {
      printf("found: %s\n", argv[1]);
      break;
    }
  }
  if (strncmp(argv[1], item_list[0], strlen(argv[1])) == 0) {
    print_char();
  } else if (strncmp(argv[1], item_list[1], strlen(argv[1])) == 0) {
    print_short();
  } else if (strncmp(argv[1], item_list[2], strlen(argv[1])) == 0) {
    print_int();
  } else if (strncmp(argv[1], item_list[3], strlen(argv[1])) == 0) {
    print_long();
  } else {
    printf("item doesn't found\n");
    exit(EXIT_FAILURE);
  }
  printf("body\n");
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2c30(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2c2d(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2c2a(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2c27(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1209 <main+0x79>
mov    0x2df2(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe1e(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2dce(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
movl   $0x0,-0x34(%rbp)
movslq -0x34(%rbp),%rax
cmp    $0x4,%rax
jae    128b <main+0xfb>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x48(%rbp)
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <strlen@plt>
mov    -0x48(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1278 <main+0xe8>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xdbf(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    128b <main+0xfb>
jmp    127d <main+0xed>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1210 <main+0x80>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x58(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <strlen@plt>
mov    -0x58(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12d1 <main+0x141>
mov    $0x0,%al
call   10a0 <print_char@plt>
jmp    13d4 <main+0x244>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x68(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <strlen@plt>
mov    -0x68(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1317 <main+0x187>
mov    $0x0,%al
call   1050 <print_short@plt>
jmp    13cf <main+0x23f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x78(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <strlen@plt>
mov    -0x78(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    135d <main+0x1cd>
mov    $0x0,%al
call   1080 <print_int@plt>
jmp    13ca <main+0x23a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x88(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <strlen@plt>
mov    -0x88(%rbp),%rdi
mov    -0x80(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    13a9 <main+0x219>
mov    $0x0,%al
call   1090 <print_long@plt>
jmp    13c5 <main+0x235>
lea    0xc86(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2c12(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
jmp    13ca <main+0x23a>
jmp    13cf <main+0x23f>
jmp    13d4 <main+0x244>
lea    0xc6f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2bdf(%rip),%rax
mov    (%rax),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
cmp    $0x2,%edi
jne    1311 <main+0x171>
mov    0x8(%r14),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    0xe3d(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1238 <main+0x98>
mov    0x8(%r14),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    0xe20(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1238 <main+0x98>
mov    0x8(%r14),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    0xe04(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1238 <main+0x98>
mov    0x8(%r14),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    0xde6(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    124a <main+0xaa>
mov    0x8(%r14),%rsi
lea    0xde8(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x8(%r14),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    0xda3(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12db <main+0x13b>
mov    0x8(%r14),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    0xd86(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12e4 <main+0x144>
mov    0x8(%r14),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    0xd6a(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12ed <main+0x14d>
mov    0x8(%r14),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    0xd4c(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    132b <main+0x18b>
xor    %eax,%eax
call   10a0 <print_long@plt>
jmp    12f4 <main+0x154>
xor    %eax,%eax
call   10b0 <print_char@plt>
jmp    12f4 <main+0x154>
xor    %eax,%eax
call   1060 <print_short@plt>
jmp    12f4 <main+0x154>
xor    %eax,%eax
call   1090 <print_int@plt>
lea    0xd4e(%rip),%rdi
call   1040 <puts@plt>
mov    0x2cc9(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2cc8(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%rdx
lea    0xcf0(%rip),%rsi
call   1080 <fprintf@plt>
jmp    1337 <main+0x197>
lea    0xd04(%rip),%rdi
call   1040 <puts@plt>
mov    0x2c9a(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"char\00"
@.str.1 = [6 x i8] c"short\00"
@.str.2 = [4 x i8] c"int\00"
@.str.3 = [5 x i8] c"long\00"
@__const.main.item_list = [4 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0)]
@stderr = global i32 0
@.str.4 = [23 x i8] c"Usage: %s <data type>\0A\00"
@EXIT_FAILURE = global i32 0
@.str.5 = [11 x i8] c"found: %s\0A\00"
@.str.6 = [20 x i8] c"item doesn't found\0A\00"
@.str.7 = [6 x i8] c"body\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x i8*]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [4 x i8*]* %6 to i8*
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 2
br i1 %10, label %11, label %19
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i8* %15)
%17 = load i32, i32* @EXIT_FAILURE
%18 = call i32 @exit(i32 %17)
unreachable
19: ; preds = %2
store i32 0, i32* %7
br label %20
20: ; preds = %44, %19
%21 = load i32, i32* %7
%22 = sext i32 %21 to i64
%23 = icmp ult i64 %22, 4
br i1 %23, label %24, label %47
24: ; preds = %20
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = load i32, i32* %7
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [4 x i8*], [4 x i8*]* %6, i64 0, i64 %29
%31 = load i8*, i8** %30
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
%35 = call i32 @strlen(i8* %34)
%36 = call i64 @strncmp(i8* %27, i8* %31, i32 %35)
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %43
38: ; preds = %24
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 1
%41 = load i8*, i8** %40
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %41)
br label %47
43: ; preds = %24
br label %44
44: ; preds = %43
%45 = load i32, i32* %7
%46 = add nsw i32 %45, 1
store i32 %46, i32* %7
br label %20
47: ; preds = %38, %20
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 1
%50 = load i8*, i8** %49
%51 = getelementptr inbounds [4 x i8*], [4 x i8*]* %6, i64 0, i64 0
%52 = load i8*, i8** %51
%53 = load i8**, i8*** %5
%54 = getelementptr inbounds i8*, i8** %53, i64 1
%55 = load i8*, i8** %54
%56 = call i32 @strlen(i8* %55)
%57 = call i64 @strncmp(i8* %50, i8* %52, i32 %56)
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %47
%60 = call i32 (...) @print_char()
br label %110
61: ; preds = %47
%62 = load i8**, i8*** %5
%63 = getelementptr inbounds i8*, i8** %62, i64 1
%64 = load i8*, i8** %63
%65 = getelementptr inbounds [4 x i8*], [4 x i8*]* %6, i64 0, i64 1
%66 = load i8*, i8** %65
%67 = load i8**, i8*** %5
%68 = getelementptr inbounds i8*, i8** %67, i64 1
%69 = load i8*, i8** %68
%70 = call i32 @strlen(i8* %69)
%71 = call i64 @strncmp(i8* %64, i8* %66, i32 %70)
%72 = icmp eq i64 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %61
%74 = call i32 (...) @print_short()
br label %109
75: ; preds = %61
%76 = load i8**, i8*** %5
%77 = getelementptr inbounds i8*, i8** %76, i64 1
%78 = load i8*, i8** %77
%79 = getelementptr inbounds [4 x i8*], [4 x i8*]* %6, i64 0, i64 2
%80 = load i8*, i8** %79
%81 = load i8**, i8*** %5
%82 = getelementptr inbounds i8*, i8** %81, i64 1
%83 = load i8*, i8** %82
%84 = call i32 @strlen(i8* %83)
%85 = call i64 @strncmp(i8* %78, i8* %80, i32 %84)
%86 = icmp eq i64 %85, 0
br i1 %86, label %87, label %89
87: ; preds = %75
%88 = call i32 (...) @print_int()
br label %108
89: ; preds = %75
%90 = load i8**, i8*** %5
%91 = getelementptr inbounds i8*, i8** %90, i64 1
%92 = load i8*, i8** %91
%93 = getelementptr inbounds [4 x i8*], [4 x i8*]* %6, i64 0, i64 3
%94 = load i8*, i8** %93
%95 = load i8**, i8*** %5
%96 = getelementptr inbounds i8*, i8** %95, i64 1
%97 = load i8*, i8** %96
%98 = call i32 @strlen(i8* %97)
%99 = call i64 @strncmp(i8* %92, i8* %94, i32 %98)
%100 = icmp eq i64 %99, 0
br i1 %100, label %101, label %103
101: ; preds = %89
%102 = call i32 (...) @print_long()
br label %107
103: ; preds = %89
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%105 = load i32, i32* @EXIT_FAILURE
%106 = call i32 @exit(i32 %105)
unreachable
107: ; preds = %101
br label %108
108: ; preds = %107, %87
br label %109
109: ; preds = %108, %73
br label %110
110: ; preds = %109, %59
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%112 = load i32, i32* @EXIT_SUCCESS
ret i32 %112
}

LLVM IR (-O2):
@.str = [5 x i8] c"char\00"
@.str.1 = [6 x i8] c"short\00"
@.str.2 = [4 x i8] c"int\00"
@.str.3 = [5 x i8] c"long\00"
@stderr = global i32 0
@.str.4 = [23 x i8] c"Usage: %s <data type>\0A\00"
@EXIT_FAILURE = global i32 0
@.str.5 = [11 x i8] c"found: %s\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [19 x i8] c"item doesn't found\00"
@str.8 = [5 x i8] c"body\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strlen(i8* %6)
%8 = tail call i64 @strncmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %31, label %16
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %1
%13 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i8* %12)
%14 = load i32, i32* @EXIT_FAILURE
%15 = tail call i32 @exit(i32 %14)
unreachable
16: ; preds = %4
%17 = load i8*, i8** %5
%18 = tail call i32 @strlen(i8* %17)
%19 = tail call i64 @strncmp(i8* %17, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = icmp eq i64 %19, 0
br i1 %20, label %31, label %21
21: ; preds = %16
%22 = load i8*, i8** %5
%23 = tail call i32 @strlen(i8* %22)
%24 = tail call i64 @strncmp(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %23)
%25 = icmp eq i64 %24, 0
br i1 %25, label %31, label %26
26: ; preds = %21
%27 = load i8*, i8** %5
%28 = tail call i32 @strlen(i8* %27)
%29 = tail call i64 @strncmp(i8* %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %28)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %26, %21, %16, %4
%32 = load i8*, i8** %5
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %32)
br label %34
34: ; preds = %26, %31
%35 = load i8*, i8** %5
%36 = tail call i32 @strlen(i8* %35)
%37 = tail call i64 @strncmp(i8* %35, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %36)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %34
%40 = tail call i32 (...) @print_char()
br label %66
41: ; preds = %34
%42 = load i8*, i8** %5
%43 = tail call i32 @strlen(i8* %42)
%44 = tail call i64 @strncmp(i8* %42, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %43)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %41
%47 = tail call i32 (...) @print_short()
br label %66
48: ; preds = %41
%49 = load i8*, i8** %5
%50 = tail call i32 @strlen(i8* %49)
%51 = tail call i64 @strncmp(i8* %49, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %50)
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %48
%54 = tail call i32 (...) @print_int()
br label %66
55: ; preds = %48
%56 = load i8*, i8** %5
%57 = tail call i32 @strlen(i8* %56)
%58 = tail call i64 @strncmp(i8* %56, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %57)
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %55
%61 = tail call i32 (...) @print_long()
br label %66
62: ; preds = %55
%63 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%64 = load i32, i32* @EXIT_FAILURE
%65 = tail call i32 @exit(i32 %64)
unreachable
66: ; preds = %46, %60, %53, %39
%67 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.8, i64 0, i64 0))
%68 = load i32, i32* @EXIT_SUCCESS
ret i32 %68
}