#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 check_state_transition(char *from, char *to) {
  if ((!strcmp(from, "NEW") && !strcmp(to, "IN PROGRESS")) ||
      (!strcmp(from, "IN PROGRESS") && !strcmp(to, "RESOLVED")) ||
      (!strcmp(from, "NEW") && !strcmp(to, "REJECTED")) ||
      (!strcmp(from, "IN PROGRESS") && !strcmp(to, "REJECTED")) ||
      (!strcmp(from, "NEW") && !strcmp(to, "RESOLVED"))) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<check_state_transition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1152 <check_state_transition+0x42>
mov    -0x18(%rbp),%rdi
lea    0xec0(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
je     121a <check_state_transition+0x10a>
mov    -0x10(%rbp),%rdi
lea    0xea7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1184 <check_state_transition+0x74>
mov    -0x18(%rbp),%rdi
lea    0xe9a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
je     121a <check_state_transition+0x10a>
mov    -0x10(%rbp),%rdi
lea    0xe71(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11b6 <check_state_transition+0xa6>
mov    -0x18(%rbp),%rdi
lea    0xe71(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
je     121a <check_state_transition+0x10a>
mov    -0x10(%rbp),%rdi
lea    0xe43(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11e8 <check_state_transition+0xd8>
mov    -0x18(%rbp),%rdi
lea    0xe3f(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
je     121a <check_state_transition+0x10a>
mov    -0x10(%rbp),%rdi
lea    0xe0d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1226 <check_state_transition+0x116>
mov    -0x18(%rbp),%rdi
lea    0xe04(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1226 <check_state_transition+0x116>
movl   $0x1,-0x4(%rbp)
jmp    122d <check_state_transition+0x11d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_state_transition>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xedf(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    113f <check_state_transition+0x2f>
lea    0xed1(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11b0 <check_state_transition+0xa0>
lea    0xebe(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1167 <check_state_transition+0x57>
lea    0xeb5(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11b0 <check_state_transition+0xa0>
test   %ebp,%ebp
jne    117e <check_state_transition+0x6e>
lea    0xea7(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11b0 <check_state_transition+0xa0>
test   %ebx,%ebx
jne    1195 <check_state_transition+0x85>
lea    0xe90(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11b0 <check_state_transition+0xa0>
test   %ebp,%ebp
jne    11ac <check_state_transition+0x9c>
lea    0xe70(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11b0 <check_state_transition+0xa0>
xor    %eax,%eax
jmp    11b5 <check_state_transition+0xa5>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"NEW\00"
@.str.1 = [12 x i8] c"IN PROGRESS\00"
@.str.2 = [9 x i8] c"RESOLVED\00"
@.str.3 = [9 x i8] c"REJECTED\00"
define i32 @check_state_transition(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* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i8*, i8** %5
%11 = call i32 @strcmp(i8* %10, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %45
13: ; preds = %9, %2
%14 = load i8*, i8** %4
%15 = call i32 @strcmp(i8* %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp ne i32 %15, 0
br i1 %16, label %21, label %17
17: ; preds = %13
%18 = load i8*, i8** %5
%19 = call i32 @strcmp(i8* %18, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %45
21: ; preds = %17, %13
%22 = load i8*, i8** %4
%23 = call i32 @strcmp(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%24 = icmp ne i32 %23, 0
br i1 %24, label %29, label %25
25: ; preds = %21
%26 = load i8*, i8** %5
%27 = call i32 @strcmp(i8* %26, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %45
29: ; preds = %25, %21
%30 = load i8*, i8** %4
%31 = call i32 @strcmp(i8* %30, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%32 = icmp ne i32 %31, 0
br i1 %32, label %37, label %33
33: ; preds = %29
%34 = load i8*, i8** %5
%35 = call i32 @strcmp(i8* %34, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %45
37: ; preds = %33, %29
%38 = load i8*, i8** %4
%39 = call i32 @strcmp(i8* %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%40 = icmp ne i32 %39, 0
br i1 %40, label %46, label %41
41: ; preds = %37
%42 = load i8*, i8** %5
%43 = call i32 @strcmp(i8* %42, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%44 = icmp ne i32 %43, 0
br i1 %44, label %46, label %45
45: ; preds = %41, %33, %25, %17, %9
store i32 1, i32* %3
br label %47
46: ; preds = %41, %37
store i32 0, i32* %3
br label %47
47: ; preds = %46, %45
%48 = load i32, i32* %3
ret i32 %48
}

LLVM IR (-O2):
@.str = [4 x i8] c"NEW\00"
@.str.1 = [12 x i8] c"IN PROGRESS\00"
@.str.2 = [9 x i8] c"RESOLVED\00"
@.str.3 = [9 x i8] c"REJECTED\00"
define i32 @check_state_transition(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32 %6, 0
br i1 %7, label %27, label %8
8: ; preds = %5, %2
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %27, label %14
14: ; preds = %11, %8
br i1 %4, label %15, label %18
15: ; preds = %14
%16 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%17 = icmp eq i32 %16, 0
br i1 %17, label %27, label %18
18: ; preds = %15, %14
br i1 %10, label %19, label %22
19: ; preds = %18
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %27, label %22
22: ; preds = %19, %18
br i1 %4, label %23, label %26
23: ; preds = %22
%24 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%25 = icmp eq i32 %24, 0
br i1 %25, label %27, label %26
26: ; preds = %23, %22
br label %27
27: ; preds = %5, %11, %15, %19, %23, %26
%28 = phi i32 [ 0, %26 ], [ 1, %23 ], [ 1, %19 ], [ 1, %15 ], [ 1, %11 ], [ 1, %5 ]
ret i32 %28
}