#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*/ printf(char *, int, int);
int /*<<< orphan*/ tms_command(int, int, int);
void tap_navigate(int start_state, int end_state) {
  if (start_state == 11 && end_state == 1)
    tms_command(3, 3, 1);
  else if (start_state == 10 && end_state == 1)
    tms_command(3, 3, 1);
  else
    printf("Not implemented TAP navigate sequence %d %d\n", start_state,
           end_state);
}


x86 assembly (clang, -O0):
<tap_navigate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xb,-0x4(%rbp)
jne    1158 <tap_navigate+0x38>
cmpl   $0x1,-0x8(%rbp)
jne    1158 <tap_navigate+0x38>
mov    $0x3,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1040 <tms_command@plt>
jmp    1199 <tap_navigate+0x79>
cmpl   $0xa,-0x4(%rbp)
jne    1182 <tap_navigate+0x62>
cmpl   $0x1,-0x8(%rbp)
jne    1182 <tap_navigate+0x62>
mov    $0x3,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1040 <tms_command@plt>
jmp    1194 <tap_navigate+0x74>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
jmp    1199 <tap_navigate+0x79>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tap_navigate>:
mov    %esi,%edx
mov    %edi,%esi
cmp    $0xb,%edi
jne    112e <tap_navigate+0xe>
cmp    $0x1,%edx
je     1138 <tap_navigate+0x18>
cmp    $0xa,%esi
jne    114c <tap_navigate+0x2c>
cmp    $0x1,%edx
jne    114c <tap_navigate+0x2c>
mov    $0x3,%edi
mov    $0x3,%esi
mov    $0x1,%edx
jmp    1040 <tms_command@plt>
lea    0xead(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"Not implemented TAP navigate sequence %d %d\0A\00"
define void @tap_navigate(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 11
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @tms_command(i32 3, i32 3, i32 1)
br label %25
12: ; preds = %7, %2
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 10
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %4
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 @tms_command(i32 3, i32 3, i32 1)
br label %24
20: ; preds = %15, %12
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %21, i32 %22)
br label %24
24: ; preds = %20, %18
br label %25
25: ; preds = %24, %10
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"Not implemented TAP navigate sequence %d %d\0A\00"
define void @tap_navigate(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 11
%4 = icmp eq i32 %1, 1
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @tms_command(i32 3, i32 3, i32 1)
br label %15
8: ; preds = %2
%9 = icmp eq i32 %0, 10
%10 = and i1 %9, %4
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = tail call i32 @tms_command(i32 3, i32 3, i32 1)
br label %15
13: ; preds = %8
%14 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
br label %15
15: ; preds = %11, %13, %6
ret void
}