#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*/ strcmp(char *, char *);
int option_operation_mode_parser(char *string, void *data) {
  if (!strcmp("0", string)) {
    *((int *)data) = 0;
  } else if (!strcmp("1", string)) {
    *((int *)data) = 1;
  } else if (!strcmp("2", string)) {
    *((int *)data) = 2;
  } else if (!strcmp("7", string)) {
    *((int *)data) = 7;
  } else if (!strcmp("8", string)) {
    *((int *)data) = 8;
  } else if (!strcmp("tag", string)) {
    *((int *)data) = 0;
  } else if (!strcmp("test", string)) {
    *((int *)data) = 1;
  } else if (!strcmp("train", string)) {
    *((int *)data) = 2;
  } else if (!strcmp("dump", string)) {
    *((int *)data) = 7;
  } else if (!strcmp("debug", string)) {
    *((int *)data) = 8;
  } else {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<option_operation_mode_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed5(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1148 <option_operation_mode_parser+0x38>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
jmp    12e9 <option_operation_mode_parser+0x1d9>
mov    -0x10(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1170 <option_operation_mode_parser+0x60>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
jmp    12e4 <option_operation_mode_parser+0x1d4>
mov    -0x10(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1198 <option_operation_mode_parser+0x88>
mov    -0x18(%rbp),%rax
movl   $0x2,(%rax)
jmp    12df <option_operation_mode_parser+0x1cf>
mov    -0x10(%rbp),%rsi
lea    0xe63(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11c0 <option_operation_mode_parser+0xb0>
mov    -0x18(%rbp),%rax
movl   $0x7,(%rax)
jmp    12da <option_operation_mode_parser+0x1ca>
mov    -0x10(%rbp),%rsi
lea    0xe3d(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11e8 <option_operation_mode_parser+0xd8>
mov    -0x18(%rbp),%rax
movl   $0x8,(%rax)
jmp    12d5 <option_operation_mode_parser+0x1c5>
mov    -0x10(%rbp),%rsi
lea    0xe17(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1210 <option_operation_mode_parser+0x100>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
jmp    12d0 <option_operation_mode_parser+0x1c0>
mov    -0x10(%rbp),%rsi
lea    0xdf3(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1238 <option_operation_mode_parser+0x128>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
jmp    12cb <option_operation_mode_parser+0x1bb>
mov    -0x10(%rbp),%rsi
lea    0xdd0(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1260 <option_operation_mode_parser+0x150>
mov    -0x18(%rbp),%rax
movl   $0x2,(%rax)
jmp    12c6 <option_operation_mode_parser+0x1b6>
mov    -0x10(%rbp),%rsi
lea    0xdae(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1288 <option_operation_mode_parser+0x178>
mov    -0x18(%rbp),%rax
movl   $0x7,(%rax)
jmp    12c1 <option_operation_mode_parser+0x1b1>
mov    -0x10(%rbp),%rsi
lea    0xd8b(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    12b0 <option_operation_mode_parser+0x1a0>
mov    -0x18(%rbp),%rax
movl   $0x8,(%rax)
jmp    12bc <option_operation_mode_parser+0x1ac>
movl   $0x1,-0x4(%rbp)
jmp    12f0 <option_operation_mode_parser+0x1e0>
jmp    12c1 <option_operation_mode_parser+0x1b1>
jmp    12c6 <option_operation_mode_parser+0x1b6>
jmp    12cb <option_operation_mode_parser+0x1bb>
jmp    12d0 <option_operation_mode_parser+0x1c0>
jmp    12d5 <option_operation_mode_parser+0x1c5>
jmp    12da <option_operation_mode_parser+0x1ca>
jmp    12df <option_operation_mode_parser+0x1cf>
jmp    12e4 <option_operation_mode_parser+0x1d4>
jmp    12e9 <option_operation_mode_parser+0x1d9>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<option_operation_mode_parser>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xedf(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
xor    %ebp,%ebp
test   %eax,%eax
je     1229 <option_operation_mode_parser+0x119>
lea    0xec8(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     120f <option_operation_mode_parser+0xff>
lea    0xeb3(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1216 <option_operation_mode_parser+0x106>
lea    0xe9e(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     121d <option_operation_mode_parser+0x10d>
lea    0xe89(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1224 <option_operation_mode_parser+0x114>
lea    0xe74(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1229 <option_operation_mode_parser+0x119>
lea    0xe61(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
mov    $0x1,%ebp
test   %eax,%eax
je     1229 <option_operation_mode_parser+0x119>
lea    0xe4e(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
mov    $0x2,%ebp
test   %eax,%eax
je     1229 <option_operation_mode_parser+0x119>
lea    0xe3c(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
mov    $0x7,%ebp
test   %eax,%eax
je     1229 <option_operation_mode_parser+0x119>
lea    0xe29(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%eax
mov    $0x8,%ebp
test   %ecx,%ecx
jne    122e <option_operation_mode_parser+0x11e>
jmp    1229 <option_operation_mode_parser+0x119>
mov    $0x1,%ebp
jmp    1229 <option_operation_mode_parser+0x119>
mov    $0x2,%ebp
jmp    1229 <option_operation_mode_parser+0x119>
mov    $0x7,%ebp
jmp    1229 <option_operation_mode_parser+0x119>
mov    $0x8,%ebp
mov    %ebp,(%r14)
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [2 x i8] c"2\00"
@.str.3 = [2 x i8] c"7\00"
@.str.4 = [2 x i8] c"8\00"
@.str.5 = [4 x i8] c"tag\00"
@.str.6 = [5 x i8] c"test\00"
@.str.7 = [6 x i8] c"train\00"
@.str.8 = [5 x i8] c"dump\00"
@.str.9 = [6 x i8] c"debug\00"
define i32 @option_operation_mode_parser(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i32*
store i32 0, i32* %11
br label %85
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = icmp ne i32 %14, 0
br i1 %15, label %19, label %16
16: ; preds = %12
%17 = load i8*, i8** %5
%18 = bitcast i8* %17 to i32*
store i32 1, i32* %18
br label %84
19: ; preds = %12
%20 = load i8*, i8** %4
%21 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* %20)
%22 = icmp ne i32 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %19
%24 = load i8*, i8** %5
%25 = bitcast i8* %24 to i32*
store i32 2, i32* %25
br label %83
26: ; preds = %19
%27 = load i8*, i8** %4
%28 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* %27)
%29 = icmp ne i32 %28, 0
br i1 %29, label %33, label %30
30: ; preds = %26
%31 = load i8*, i8** %5
%32 = bitcast i8* %31 to i32*
store i32 7, i32* %32
br label %82
33: ; preds = %26
%34 = load i8*, i8** %4
%35 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* %34)
%36 = icmp ne i32 %35, 0
br i1 %36, label %40, label %37
37: ; preds = %33
%38 = load i8*, i8** %5
%39 = bitcast i8* %38 to i32*
store i32 8, i32* %39
br label %81
40: ; preds = %33
%41 = load i8*, i8** %4
%42 = call i32 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %41)
%43 = icmp ne i32 %42, 0
br i1 %43, label %47, label %44
44: ; preds = %40
%45 = load i8*, i8** %5
%46 = bitcast i8* %45 to i32*
store i32 0, i32* %46
br label %80
47: ; preds = %40
%48 = load i8*, i8** %4
%49 = call i32 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %48)
%50 = icmp ne i32 %49, 0
br i1 %50, label %54, label %51
51: ; preds = %47
%52 = load i8*, i8** %5
%53 = bitcast i8* %52 to i32*
store i32 1, i32* %53
br label %79
54: ; preds = %47
%55 = load i8*, i8** %4
%56 = call i32 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %55)
%57 = icmp ne i32 %56, 0
br i1 %57, label %61, label %58
58: ; preds = %54
%59 = load i8*, i8** %5
%60 = bitcast i8* %59 to i32*
store i32 2, i32* %60
br label %78
61: ; preds = %54
%62 = load i8*, i8** %4
%63 = call i32 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %62)
%64 = icmp ne i32 %63, 0
br i1 %64, label %68, label %65
65: ; preds = %61
%66 = load i8*, i8** %5
%67 = bitcast i8* %66 to i32*
store i32 7, i32* %67
br label %77
68: ; preds = %61
%69 = load i8*, i8** %4
%70 = call i32 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* %69)
%71 = icmp ne i32 %70, 0
br i1 %71, label %75, label %72
72: ; preds = %68
%73 = load i8*, i8** %5
%74 = bitcast i8* %73 to i32*
store i32 8, i32* %74
br label %76
75: ; preds = %68
store i32 1, i32* %3
br label %86
76: ; preds = %72
br label %77
77: ; preds = %76, %65
br label %78
78: ; preds = %77, %58
br label %79
79: ; preds = %78, %51
br label %80
80: ; preds = %79, %44
br label %81
81: ; preds = %80, %37
br label %82
82: ; preds = %81, %30
br label %83
83: ; preds = %82, %23
br label %84
84: ; preds = %83, %16
br label %85
85: ; preds = %84, %9
store i32 0, i32* %3
br label %86
86: ; preds = %85, %75
%87 = load i32, i32* %3
ret i32 %87
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [2 x i8] c"2\00"
@.str.3 = [2 x i8] c"7\00"
@.str.4 = [2 x i8] c"8\00"
@.str.5 = [4 x i8] c"tag\00"
@.str.6 = [5 x i8] c"test\00"
@.str.7 = [6 x i8] c"train\00"
@.str.8 = [5 x i8] c"dump\00"
@.str.9 = [6 x i8] c"debug\00"
define i32 @option_operation_mode_parser(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* dereferenceable(1) %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %32, label %5
5: ; preds = %2
%6 = tail call i32 @strcmp(i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* dereferenceable(1) %0)
%7 = icmp eq i32 %6, 0
br i1 %7, label %32, label %8
8: ; preds = %5
%9 = tail call i32 @strcmp(i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* dereferenceable(1) %0)
%10 = icmp eq i32 %9, 0
br i1 %10, label %32, label %11
11: ; preds = %8
%12 = tail call i32 @strcmp(i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* dereferenceable(1) %0)
%13 = icmp eq i32 %12, 0
br i1 %13, label %32, label %14
14: ; preds = %11
%15 = tail call i32 @strcmp(i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* dereferenceable(1) %0)
%16 = icmp eq i32 %15, 0
br i1 %16, label %32, label %17
17: ; preds = %14
%18 = tail call i32 @strcmp(i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* dereferenceable(1) %0)
%19 = icmp eq i32 %18, 0
br i1 %19, label %32, label %20
20: ; preds = %17
%21 = tail call i32 @strcmp(i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* dereferenceable(1) %0)
%22 = icmp eq i32 %21, 0
br i1 %22, label %32, label %23
23: ; preds = %20
%24 = tail call i32 @strcmp(i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* dereferenceable(1) %0)
%25 = icmp eq i32 %24, 0
br i1 %25, label %32, label %26
26: ; preds = %23
%27 = tail call i32 @strcmp(i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* dereferenceable(1) %0)
%28 = icmp eq i32 %27, 0
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = tail call i32 @strcmp(i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* dereferenceable(1) %0)
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %29, %26, %23, %20, %17, %14, %11, %8, %5, %2
%33 = phi i32 [ 0, %2 ], [ 1, %5 ], [ 2, %8 ], [ 7, %11 ], [ 8, %14 ], [ 0, %17 ], [ 1, %20 ], [ 2, %23 ], [ 7, %26 ], [ 8, %29 ]
%34 = bitcast i8* %1 to i32*
store i32 %33, i32* %34
br label %35
35: ; preds = %32, %29
%36 = phi i32 [ 1, %29 ], [ 0, %32 ]
ret i32 %36
}