#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*/ VIM_SIF_I2cWriteByte(int, int);
void SensorSetMode_BF3403(unsigned char val) {
  switch (val) {
  case 1:
    VIM_SIF_I2cWriteByte(0xf0, 0x01);
    VIM_SIF_I2cWriteByte(0x3b, 0x08);
    VIM_SIF_I2cWriteByte(0x92, 0x66);
    VIM_SIF_I2cWriteByte(0x8e, 0x04);
    VIM_SIF_I2cWriteByte(0x8f, 0x00);
    VIM_SIF_I2cWriteByte(0x80, 0x01);
    VIM_SIF_I2cWriteByte(0xf0, 0x00);
    break;
  case 2:
    VIM_SIF_I2cWriteByte(0xf0, 0x01);
    VIM_SIF_I2cWriteByte(0x3b, 0xe2);
    VIM_SIF_I2cWriteByte(0x92, 0x00);
    VIM_SIF_I2cWriteByte(0x8e, 0x04);
    VIM_SIF_I2cWriteByte(0x8f, 0x00);
    VIM_SIF_I2cWriteByte(0x80, 0x00);
    VIM_SIF_I2cWriteByte(0xf0, 0x00);
    break;
  case 4:
    VIM_SIF_I2cWriteByte(0xf0, 0x01);
    VIM_SIF_I2cWriteByte(0x3b, 0xe2);
    VIM_SIF_I2cWriteByte(0x8e, 0x0f);
    VIM_SIF_I2cWriteByte(0x8f, 0xa0);
    VIM_SIF_I2cWriteByte(0xf0, 0x00);
    break;
  case 3:
    VIM_SIF_I2cWriteByte(0xf0, 0x01);
    VIM_SIF_I2cWriteByte(0x3b, 0xe2);
    VIM_SIF_I2cWriteByte(0x8e, 0x04);
    VIM_SIF_I2cWriteByte(0x8f, 0x00);
    VIM_SIF_I2cWriteByte(0xf0, 0x00);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<SensorSetMode_BF3403>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3,%eax
ja     12a9 <SensorSetMode_BF3403+0x199>
mov    -0x10(%rbp),%rax
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0xf0,%edi
mov    $0x1,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x3b,%edi
mov    $0x8,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x92,%edi
mov    $0x66,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8e,%edi
mov    $0x4,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8f,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x80,%edi
mov    $0x1,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xf0,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    12ae <SensorSetMode_BF3403+0x19e>
mov    $0xf0,%edi
mov    $0x1,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x3b,%edi
mov    $0xe2,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x92,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8e,%edi
mov    $0x4,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8f,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x80,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xf0,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    12ae <SensorSetMode_BF3403+0x19e>
mov    $0xf0,%edi
mov    $0x1,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x3b,%edi
mov    $0xe2,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8e,%edi
mov    $0xf,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8f,%edi
mov    $0xa0,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xf0,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    12ae <SensorSetMode_BF3403+0x19e>
mov    $0xf0,%edi
mov    $0x1,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x3b,%edi
mov    $0xe2,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8e,%edi
mov    $0x4,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8f,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xf0,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    12ae <SensorSetMode_BF3403+0x19e>
jmp    12ae <SensorSetMode_BF3403+0x19e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetMode_BF3403>:
add    $0xff,%dil
cmp    $0x3,%dil
ja     1186 <SensorSetMode_BF3403+0x76>
push   %rax
movzbl %dil,%eax
lea    0xeda(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0xf0,%edi
mov    $0x1,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x3b,%edi
mov    $0x8,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x92,%edi
mov    $0x66,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8e,%edi
mov    $0x4,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8f,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x80,%edi
mov    $0x1,%esi
jmp    1240 <SensorSetMode_BF3403+0x130>
ret
mov    $0xf0,%edi
mov    $0x1,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x3b,%edi
mov    $0xe2,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x92,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8e,%edi
mov    $0x4,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8f,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x80,%edi
jmp    1205 <SensorSetMode_BF3403+0xf5>
mov    $0xf0,%edi
mov    $0x1,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x3b,%edi
mov    $0xe2,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8e,%edi
mov    $0x4,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8f,%edi
xor    %esi,%esi
jmp    1240 <SensorSetMode_BF3403+0x130>
mov    $0xf0,%edi
mov    $0x1,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x3b,%edi
mov    $0xe2,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8e,%edi
mov    $0xf,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x8f,%edi
mov    $0xa0,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xf0,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <VIM_SIF_I2cWriteByte@plt>

LLVM IR (-O0):
define void @SensorSetMode_BF3403(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 %33 [
i32 1, label %5
i32 2, label %13
i32 4, label %21
i32 3, label %27
]
5: ; preds = %1
%6 = call i32 @VIM_SIF_I2cWriteByte(i32 240, i32 1)
%7 = call i32 @VIM_SIF_I2cWriteByte(i32 59, i32 8)
%8 = call i32 @VIM_SIF_I2cWriteByte(i32 146, i32 102)
%9 = call i32 @VIM_SIF_I2cWriteByte(i32 142, i32 4)
%10 = call i32 @VIM_SIF_I2cWriteByte(i32 143, i32 0)
%11 = call i32 @VIM_SIF_I2cWriteByte(i32 128, i32 1)
%12 = call i32 @VIM_SIF_I2cWriteByte(i32 240, i32 0)
br label %34
13: ; preds = %1
%14 = call i32 @VIM_SIF_I2cWriteByte(i32 240, i32 1)
%15 = call i32 @VIM_SIF_I2cWriteByte(i32 59, i32 226)
%16 = call i32 @VIM_SIF_I2cWriteByte(i32 146, i32 0)
%17 = call i32 @VIM_SIF_I2cWriteByte(i32 142, i32 4)
%18 = call i32 @VIM_SIF_I2cWriteByte(i32 143, i32 0)
%19 = call i32 @VIM_SIF_I2cWriteByte(i32 128, i32 0)
%20 = call i32 @VIM_SIF_I2cWriteByte(i32 240, i32 0)
br label %34
21: ; preds = %1
%22 = call i32 @VIM_SIF_I2cWriteByte(i32 240, i32 1)
%23 = call i32 @VIM_SIF_I2cWriteByte(i32 59, i32 226)
%24 = call i32 @VIM_SIF_I2cWriteByte(i32 142, i32 15)
%25 = call i32 @VIM_SIF_I2cWriteByte(i32 143, i32 160)
%26 = call i32 @VIM_SIF_I2cWriteByte(i32 240, i32 0)
br label %34
27: ; preds = %1
%28 = call i32 @VIM_SIF_I2cWriteByte(i32 240, i32 1)
%29 = call i32 @VIM_SIF_I2cWriteByte(i32 59, i32 226)
%30 = call i32 @VIM_SIF_I2cWriteByte(i32 142, i32 4)
%31 = call i32 @VIM_SIF_I2cWriteByte(i32 143, i32 0)
%32 = call i32 @VIM_SIF_I2cWriteByte(i32 240, i32 0)
br label %34
33: ; preds = %1
br label %34
34: ; preds = %33, %27, %21, %13, %5
ret void
}

LLVM IR (-O2):
define void @SensorSetMode_BF3403(i8 zeroext %0) {
switch i8 %0, label %28 [
i8 1, label %2
i8 2, label %9
i8 4, label %16
i8 3, label %21
]
2: ; preds = %1
%3 = tail call i32 @VIM_SIF_I2cWriteByte(i32 240, i32 1)
%4 = tail call i32 @VIM_SIF_I2cWriteByte(i32 59, i32 8)
%5 = tail call i32 @VIM_SIF_I2cWriteByte(i32 146, i32 102)
%6 = tail call i32 @VIM_SIF_I2cWriteByte(i32 142, i32 4)
%7 = tail call i32 @VIM_SIF_I2cWriteByte(i32 143, i32 0)
%8 = tail call i32 @VIM_SIF_I2cWriteByte(i32 128, i32 1)
br label %26
9: ; preds = %1
%10 = tail call i32 @VIM_SIF_I2cWriteByte(i32 240, i32 1)
%11 = tail call i32 @VIM_SIF_I2cWriteByte(i32 59, i32 226)
%12 = tail call i32 @VIM_SIF_I2cWriteByte(i32 146, i32 0)
%13 = tail call i32 @VIM_SIF_I2cWriteByte(i32 142, i32 4)
%14 = tail call i32 @VIM_SIF_I2cWriteByte(i32 143, i32 0)
%15 = tail call i32 @VIM_SIF_I2cWriteByte(i32 128, i32 0)
br label %26
16: ; preds = %1
%17 = tail call i32 @VIM_SIF_I2cWriteByte(i32 240, i32 1)
%18 = tail call i32 @VIM_SIF_I2cWriteByte(i32 59, i32 226)
%19 = tail call i32 @VIM_SIF_I2cWriteByte(i32 142, i32 15)
%20 = tail call i32 @VIM_SIF_I2cWriteByte(i32 143, i32 160)
br label %26
21: ; preds = %1
%22 = tail call i32 @VIM_SIF_I2cWriteByte(i32 240, i32 1)
%23 = tail call i32 @VIM_SIF_I2cWriteByte(i32 59, i32 226)
%24 = tail call i32 @VIM_SIF_I2cWriteByte(i32 142, i32 4)
%25 = tail call i32 @VIM_SIF_I2cWriteByte(i32 143, i32 0)
br label %26
26: ; preds = %2, %9, %16, %21
%27 = tail call i32 @VIM_SIF_I2cWriteByte(i32 240, i32 0)
br label %28
28: ; preds = %26, %1
ret void
}