#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 */
scalar_t__ isreflect(char *, char *);
char *ninety(char *);
char *reflect1(char *);
int /*<<< orphan*/ strcmp(char *, char *);
int control(char *a, char *b) {
  if (!strcmp(ninety(a), b))
    return 1;
  else if (!strcmp(ninety(ninety(a)), b))
    return 2;
  else if (!strcmp(ninety(ninety(ninety(a))), b))
    return 3;
  else if (!strcmp(reflect1(a), b))
    return 4;
  else if (isreflect(a, b))
    return 5;
  else if (!strcmp(a, b))
    return 6;
  return 7;
}


x86 assembly (clang, -O0):
<control>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ninety@plt>
mov    %rax,%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    117a <control+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1275 <control+0x135>
mov    -0x10(%rbp),%rdi
call   1030 <ninety@plt>
mov    %rax,%rdi
call   1030 <ninety@plt>
mov    %rax,%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11ac <control+0x6c>
movl   $0x2,-0x4(%rbp)
jmp    1275 <control+0x135>
mov    -0x10(%rbp),%rdi
call   1030 <ninety@plt>
mov    %rax,%rdi
call   1030 <ninety@plt>
mov    %rax,%rdi
call   1030 <ninety@plt>
mov    %rax,%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11e6 <control+0xa6>
movl   $0x3,-0x4(%rbp)
jmp    1275 <control+0x135>
mov    -0x10(%rbp),%rdi
call   1060 <reflect1@plt>
mov    %rax,%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1210 <control+0xd0>
movl   $0x4,-0x4(%rbp)
jmp    1275 <control+0x135>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <isreflect@plt>
cmp    $0x0,%rax
je     1233 <control+0xf3>
movl   $0x5,-0x4(%rbp)
jmp    1275 <control+0x135>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1255 <control+0x115>
movl   $0x6,-0x4(%rbp)
jmp    1275 <control+0x135>
jmp    125a <control+0x11a>
jmp    125f <control+0x11f>
jmp    1264 <control+0x124>
jmp    1269 <control+0x129>
jmp    126e <control+0x12e>
movl   $0x7,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<control>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <ninety@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     11ef <control+0xaf>
mov    %rbx,%rdi
call   1030 <ninety@plt>
mov    %rax,%rdi
call   1030 <ninety@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     11f6 <control+0xb6>
mov    %rbx,%rdi
call   1030 <ninety@plt>
mov    %rax,%rdi
call   1030 <ninety@plt>
mov    %rax,%rdi
call   1030 <ninety@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     11fd <control+0xbd>
mov    %rbx,%rdi
call   1060 <reflect1@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1204 <control+0xc4>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <isreflect@plt>
mov    %rax,%rcx
mov    $0x5,%eax
test   %rcx,%rcx
jne    1209 <control+0xc9>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
cmp    $0x1,%eax
mov    $0x7,%eax
sbb    $0x0,%eax
jmp    1209 <control+0xc9>
mov    $0x1,%eax
jmp    1209 <control+0xc9>
mov    $0x2,%eax
jmp    1209 <control+0xc9>
mov    $0x3,%eax
jmp    1209 <control+0xc9>
mov    $0x4,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @control(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 i8* @ninety(i8* %6)
%8 = load i8*, i8** %5
%9 = call i32 @strcmp(i8* %7, i8* %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %2
store i32 1, i32* %3
br label %54
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call i8* @ninety(i8* %13)
%15 = call i8* @ninety(i8* %14)
%16 = load i8*, i8** %5
%17 = call i32 @strcmp(i8* %15, i8* %16)
%18 = icmp ne i32 %17, 0
br i1 %18, label %20, label %19
19: ; preds = %12
store i32 2, i32* %3
br label %54
20: ; preds = %12
%21 = load i8*, i8** %4
%22 = call i8* @ninety(i8* %21)
%23 = call i8* @ninety(i8* %22)
%24 = call i8* @ninety(i8* %23)
%25 = load i8*, i8** %5
%26 = call i32 @strcmp(i8* %24, i8* %25)
%27 = icmp ne i32 %26, 0
br i1 %27, label %29, label %28
28: ; preds = %20
store i32 3, i32* %3
br label %54
29: ; preds = %20
%30 = load i8*, i8** %4
%31 = call i8* @reflect1(i8* %30)
%32 = load i8*, i8** %5
%33 = call i32 @strcmp(i8* %31, i8* %32)
%34 = icmp ne i32 %33, 0
br i1 %34, label %36, label %35
35: ; preds = %29
store i32 4, i32* %3
br label %54
36: ; preds = %29
%37 = load i8*, i8** %4
%38 = load i8*, i8** %5
%39 = call i64 @isreflect(i8* %37, i8* %38)
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %42
41: ; preds = %36
store i32 5, i32* %3
br label %54
42: ; preds = %36
%43 = load i8*, i8** %4
%44 = load i8*, i8** %5
%45 = call i32 @strcmp(i8* %43, i8* %44)
%46 = icmp ne i32 %45, 0
br i1 %46, label %48, label %47
47: ; preds = %42
store i32 6, i32* %3
br label %54
48: ; preds = %42
br label %49
49: ; preds = %48
br label %50
50: ; preds = %49
br label %51
51: ; preds = %50
br label %52
52: ; preds = %51
br label %53
53: ; preds = %52
store i32 7, i32* %3
br label %54
54: ; preds = %53, %47, %41, %35, %28, %19, %11
%55 = load i32, i32* %3
ret i32 %55
}

LLVM IR (-O2):
define i32 @control(i8* %0, i8* %1) {
%3 = tail call i8* @ninety(i8* %0)
%4 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(1) %1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %28, label %6
6: ; preds = %2
%7 = tail call i8* @ninety(i8* %0)
%8 = tail call i8* @ninety(i8* %7)
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %8, i8* dereferenceable(1) %1)
%10 = icmp eq i32 %9, 0
br i1 %10, label %28, label %11
11: ; preds = %6
%12 = tail call i8* @ninety(i8* %0)
%13 = tail call i8* @ninety(i8* %12)
%14 = tail call i8* @ninety(i8* %13)
%15 = tail call i32 @strcmp(i8* dereferenceable(1) %14, i8* dereferenceable(1) %1)
%16 = icmp eq i32 %15, 0
br i1 %16, label %28, label %17
17: ; preds = %11
%18 = tail call i8* @reflect1(i8* %0)
%19 = tail call i32 @strcmp(i8* dereferenceable(1) %18, i8* dereferenceable(1) %1)
%20 = icmp eq i32 %19, 0
br i1 %20, label %28, label %21
21: ; preds = %17
%22 = tail call i64 @isreflect(i8* %0, i8* %1)
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %21
%25 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%26 = icmp eq i32 %25, 0
%27 = select i1 %26, i32 6, i32 7
br label %28
28: ; preds = %24, %21, %17, %11, %6, %2
%29 = phi i32 [ 1, %2 ], [ 2, %6 ], [ 3, %11 ], [ 4, %17 ], [ 5, %21 ], [ %27, %24 ]
ret i32 %29
}