#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*/ OisEna();
int /*<<< orphan*/ RtnCen(int);
int /*<<< orphan*/ SetStandby(int);
int /*<<< orphan*/ SrvCon(int, int);
int /*<<< orphan*/ SrvConAF(int);
void CtrStandby(unsigned char UcContMode) {
  switch (UcContMode) {
  case 0x01:
    RtnCen(0x00);
    SrvCon(0x00, 0x00);
    SrvCon(0x01, 0x00);
    SrvConAF(0x00);
    SetStandby(0x02);
    break;
  case 0x00:
    SetStandby(0x03);
    SrvConAF(0x01);
    RtnCen(0x00);
    OisEna();
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<CtrStandby>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     11b5 <CtrStandby+0x65>
jmp    1172 <CtrStandby+0x22>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
jne    11dc <CtrStandby+0x8c>
jmp    1183 <CtrStandby+0x33>
xor    %edi,%edi
call   1050 <RtnCen@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <SrvCon@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <SrvCon@plt>
xor    %edi,%edi
call   1060 <SrvConAF@plt>
mov    $0x2,%edi
call   1070 <SetStandby@plt>
jmp    11e1 <CtrStandby+0x91>
mov    $0x3,%edi
call   1070 <SetStandby@plt>
mov    $0x1,%edi
call   1060 <SrvConAF@plt>
xor    %edi,%edi
call   1050 <RtnCen@plt>
mov    $0x0,%al
call   1030 <OisEna@plt>
jmp    11e1 <CtrStandby+0x91>
jmp    11e1 <CtrStandby+0x91>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CtrStandby>:
push   %rax
test   %edi,%edi
je     1189 <CtrStandby+0x39>
cmp    $0x1,%dil
jne    11ac <CtrStandby+0x5c>
xor    %edi,%edi
call   1050 <RtnCen@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <SrvCon@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <SrvCon@plt>
xor    %edi,%edi
call   1060 <SrvConAF@plt>
mov    $0x2,%edi
pop    %rax
jmp    1070 <SetStandby@plt>
mov    $0x3,%edi
call   1070 <SetStandby@plt>
mov    $0x1,%edi
call   1060 <SrvConAF@plt>
xor    %edi,%edi
call   1050 <RtnCen@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <OisEna@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @CtrStandby(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
switch i32 %4, label %16 [
i32 1, label %5
i32 0, label %11
]
5: ; preds = %1
%6 = call i32 @RtnCen(i32 0)
%7 = call i32 @SrvCon(i32 0, i32 0)
%8 = call i32 @SrvCon(i32 1, i32 0)
%9 = call i32 @SrvConAF(i32 0)
%10 = call i32 @SetStandby(i32 2)
br label %17
11: ; preds = %1
%12 = call i32 @SetStandby(i32 3)
%13 = call i32 @SrvConAF(i32 1)
%14 = call i32 @RtnCen(i32 0)
%15 = call i32 (...) @OisEna()
br label %17
16: ; preds = %1
br label %17
17: ; preds = %16, %11, %5
ret void
}

LLVM IR (-O2):
define void @CtrStandby(i8 zeroext %0) {
switch i8 %0, label %13 [
i8 1, label %2
i8 0, label %8
]
2: ; preds = %1
%3 = tail call i32 @RtnCen(i32 0)
%4 = tail call i32 @SrvCon(i32 0, i32 0)
%5 = tail call i32 @SrvCon(i32 1, i32 0)
%6 = tail call i32 @SrvConAF(i32 0)
%7 = tail call i32 @SetStandby(i32 2)
br label %13
8: ; preds = %1
%9 = tail call i32 @SetStandby(i32 3)
%10 = tail call i32 @SrvConAF(i32 1)
%11 = tail call i32 @RtnCen(i32 0)
%12 = tail call i32 (...) @OisEna()
br label %13
13: ; preds = %1, %8, %2
ret void
}