#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*/ GyrCon_lc898122_sharp(int);
int /*<<< orphan*/ SrvCon_lc898122_sharp(int, int);
int /*<<< orphan*/ StbOnn_lc898122_sharp();
unsigned char RtnCen_lc898122_sharp(unsigned char UcCmdPar) {
  unsigned char UcCmdSts;
  UcCmdSts = 0x02;
  GyrCon_lc898122_sharp(0x00);
  if (!UcCmdPar) {
    StbOnn_lc898122_sharp();
  } else if (UcCmdPar == 0x01) {
    SrvCon_lc898122_sharp(0x00, 0x01);
    SrvCon_lc898122_sharp(0x01, 0x00);
  } else if (UcCmdPar == 0x02) {
    SrvCon_lc898122_sharp(0x00, 0x00);
    SrvCon_lc898122_sharp(0x01, 0x01);
  }
  return (UcCmdSts);
}


x86 assembly (clang, -O0):
<RtnCen_lc898122_sharp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x2,-0x2(%rbp)
xor    %edi,%edi
call   1040 <GyrCon_lc898122_sharp@plt>
cmpb   $0x0,-0x1(%rbp)
jne    115f <RtnCen_lc898122_sharp+0x2f>
mov    $0x0,%al
call   1030 <StbOnn_lc898122_sharp@plt>
jmp    11b5 <RtnCen_lc898122_sharp+0x85>
movzbl -0x1(%rbp),%eax
cmp    $0x1,%eax
jne    1189 <RtnCen_lc898122_sharp+0x59>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <SrvCon_lc898122_sharp@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1050 <SrvCon_lc898122_sharp@plt>
jmp    11b0 <RtnCen_lc898122_sharp+0x80>
movzbl -0x1(%rbp),%eax
cmp    $0x2,%eax
jne    11ab <RtnCen_lc898122_sharp+0x7b>
xor    %esi,%esi
mov    %esi,%edi
call   1050 <SrvCon_lc898122_sharp@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1050 <SrvCon_lc898122_sharp@plt>
jmp    11b0 <RtnCen_lc898122_sharp+0x80>
jmp    11b5 <RtnCen_lc898122_sharp+0x85>
movzbl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RtnCen_lc898122_sharp>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1040 <GyrCon_lc898122_sharp@plt>
cmp    $0x2,%bl
je     1151 <RtnCen_lc898122_sharp+0x21>
cmp    $0x1,%bl
je     1166 <RtnCen_lc898122_sharp+0x36>
test   %bl,%bl
jne    117e <RtnCen_lc898122_sharp+0x4e>
xor    %eax,%eax
call   1030 <StbOnn_lc898122_sharp@plt>
jmp    117e <RtnCen_lc898122_sharp+0x4e>
xor    %edi,%edi
xor    %esi,%esi
call   1050 <SrvCon_lc898122_sharp@plt>
mov    $0x1,%edi
mov    $0x1,%esi
jmp    1179 <RtnCen_lc898122_sharp+0x49>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <SrvCon_lc898122_sharp@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1050 <SrvCon_lc898122_sharp@plt>
mov    $0x2,%al
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @RtnCen_lc898122_sharp(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
store i8 2, i8* %3
%4 = call i32 @GyrCon_lc898122_sharp(i32 0)
%5 = load i8, i8* %2
%6 = icmp ne i8 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 (...) @StbOnn_lc898122_sharp()
br label %25
9: ; preds = %1
%10 = load i8, i8* %2
%11 = zext i8 %10 to i32
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = call i32 @SrvCon_lc898122_sharp(i32 0, i32 1)
%15 = call i32 @SrvCon_lc898122_sharp(i32 1, i32 0)
br label %24
16: ; preds = %9
%17 = load i8, i8* %2
%18 = zext i8 %17 to i32
%19 = icmp eq i32 %18, 2
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = call i32 @SrvCon_lc898122_sharp(i32 0, i32 0)
%22 = call i32 @SrvCon_lc898122_sharp(i32 1, i32 1)
br label %23
23: ; preds = %20, %16
br label %24
24: ; preds = %23, %13
br label %25
25: ; preds = %24, %7
%26 = load i8, i8* %3
ret i8 %26
}

LLVM IR (-O2):
define zeroext i8 @RtnCen_lc898122_sharp(i8 zeroext %0) {
%2 = tail call i32 @GyrCon_lc898122_sharp(i32 0)
switch i8 %0, label %11 [
i8 0, label %3
i8 1, label %5
i8 2, label %8
]
3: ; preds = %1
%4 = tail call i32 (...) @StbOnn_lc898122_sharp()
br label %11
5: ; preds = %1
%6 = tail call i32 @SrvCon_lc898122_sharp(i32 0, i32 1)
%7 = tail call i32 @SrvCon_lc898122_sharp(i32 1, i32 0)
br label %11
8: ; preds = %1
%9 = tail call i32 @SrvCon_lc898122_sharp(i32 0, i32 0)
%10 = tail call i32 @SrvCon_lc898122_sharp(i32 1, i32 1)
br label %11
11: ; preds = %1, %5, %8, %3
ret i8 2
}