#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_PO3030K(unsigned char val) {
  switch (val) {
  case 1:
    VIM_SIF_I2cWriteByte(0x46, 0x40);
    VIM_SIF_I2cWriteByte(0x49, 0x85);
    VIM_SIF_I2cWriteByte(0x4a, 0x55);
    VIM_SIF_I2cWriteByte(0xb9, 0x03);
    VIM_SIF_I2cWriteByte(0xba, 0xe6);
    VIM_SIF_I2cWriteByte(0xbb, 0x07);
    VIM_SIF_I2cWriteByte(0xbc, 0xcc);
    break;
  case 2:
    VIM_SIF_I2cWriteByte(0x46, 0x20);
    VIM_SIF_I2cWriteByte(0x49, 0x6f);
    VIM_SIF_I2cWriteByte(0x4a, 0x1c);
    VIM_SIF_I2cWriteByte(0xb9, 0x03);
    VIM_SIF_I2cWriteByte(0xba, 0xe6);
    VIM_SIF_I2cWriteByte(0xbb, 0x07);
    VIM_SIF_I2cWriteByte(0xbc, 0xcc);
    break;
  case 4:
    VIM_SIF_I2cWriteByte(0x46, 0x00);
    VIM_SIF_I2cWriteByte(0xb9, 0x0f);
    VIM_SIF_I2cWriteByte(0xba, 0x98);
    VIM_SIF_I2cWriteByte(0xbb, 0x3e);
    VIM_SIF_I2cWriteByte(0xbc, 0x60);
    break;
  case 3:
    VIM_SIF_I2cWriteByte(0x46, 0x00);
    VIM_SIF_I2cWriteByte(0xb9, 0x03);
    VIM_SIF_I2cWriteByte(0xba, 0xe6);
    VIM_SIF_I2cWriteByte(0xbb, 0x07);
    VIM_SIF_I2cWriteByte(0xbc, 0xcc);
    VIM_SIF_I2cWriteByte(0x46, 0x40);
    VIM_SIF_I2cWriteByte(0x49, 0x85);
    VIM_SIF_I2cWriteByte(0x4a, 0x55);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<SensorSetMode_PO3030K>:
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     12eb <SensorSetMode_PO3030K+0x1db>
mov    -0x10(%rbp),%rax
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x46,%edi
mov    $0x40,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x49,%edi
mov    $0x85,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x4a,%edi
mov    $0x55,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xb9,%edi
mov    $0x3,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xba,%edi
mov    $0xe6,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbb,%edi
mov    $0x7,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbc,%edi
mov    $0xcc,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    12f0 <SensorSetMode_PO3030K+0x1e0>
mov    $0x46,%edi
mov    $0x20,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x49,%edi
mov    $0x6f,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x4a,%edi
mov    $0x1c,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xb9,%edi
mov    $0x3,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xba,%edi
mov    $0xe6,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbb,%edi
mov    $0x7,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbc,%edi
mov    $0xcc,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    12f0 <SensorSetMode_PO3030K+0x1e0>
mov    $0x46,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xb9,%edi
mov    $0xf,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xba,%edi
mov    $0x98,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbb,%edi
mov    $0x3e,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbc,%edi
mov    $0x60,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    12f0 <SensorSetMode_PO3030K+0x1e0>
mov    $0x46,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xb9,%edi
mov    $0x3,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xba,%edi
mov    $0xe6,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbb,%edi
mov    $0x7,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbc,%edi
mov    $0xcc,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x46,%edi
mov    $0x40,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x49,%edi
mov    $0x85,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x4a,%edi
mov    $0x55,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    12f0 <SensorSetMode_PO3030K+0x1e0>
jmp    12f0 <SensorSetMode_PO3030K+0x1e0>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetMode_PO3030K>:
push   %rax
add    $0xff,%dil
cmp    $0x3,%dil
ja     1159 <SensorSetMode_PO3030K+0x49>
movzbl %dil,%eax
lea    0xeda(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x46,%edi
mov    $0x40,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x49,%edi
mov    $0x85,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x4a,%edi
mov    $0x55,%esi
jmp    1183 <SensorSetMode_PO3030K+0x73>
pop    %rax
ret
mov    $0x46,%edi
mov    $0x20,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x49,%edi
mov    $0x6f,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x4a,%edi
mov    $0x1c,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xb9,%edi
mov    $0x3,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xba,%edi
mov    $0xe6,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbb,%edi
mov    $0x7,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbc,%edi
mov    $0xcc,%esi
pop    %rax
jmp    1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x46,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xb9,%edi
mov    $0x3,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xba,%edi
mov    $0xe6,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbb,%edi
mov    $0x7,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbc,%edi
mov    $0xcc,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x46,%edi
mov    $0x40,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x49,%edi
mov    $0x85,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x4a,%edi
mov    $0x55,%esi
pop    %rax
jmp    1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x46,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xb9,%edi
mov    $0xf,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xba,%edi
mov    $0x98,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbb,%edi
mov    $0x3e,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xbc,%edi
mov    $0x60,%esi
pop    %rax
jmp    1030 <VIM_SIF_I2cWriteByte@plt>

LLVM IR (-O0):
define void @SensorSetMode_PO3030K(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 %36 [
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 70, i32 64)
%7 = call i32 @VIM_SIF_I2cWriteByte(i32 73, i32 133)
%8 = call i32 @VIM_SIF_I2cWriteByte(i32 74, i32 85)
%9 = call i32 @VIM_SIF_I2cWriteByte(i32 185, i32 3)
%10 = call i32 @VIM_SIF_I2cWriteByte(i32 186, i32 230)
%11 = call i32 @VIM_SIF_I2cWriteByte(i32 187, i32 7)
%12 = call i32 @VIM_SIF_I2cWriteByte(i32 188, i32 204)
br label %37
13: ; preds = %1
%14 = call i32 @VIM_SIF_I2cWriteByte(i32 70, i32 32)
%15 = call i32 @VIM_SIF_I2cWriteByte(i32 73, i32 111)
%16 = call i32 @VIM_SIF_I2cWriteByte(i32 74, i32 28)
%17 = call i32 @VIM_SIF_I2cWriteByte(i32 185, i32 3)
%18 = call i32 @VIM_SIF_I2cWriteByte(i32 186, i32 230)
%19 = call i32 @VIM_SIF_I2cWriteByte(i32 187, i32 7)
%20 = call i32 @VIM_SIF_I2cWriteByte(i32 188, i32 204)
br label %37
21: ; preds = %1
%22 = call i32 @VIM_SIF_I2cWriteByte(i32 70, i32 0)
%23 = call i32 @VIM_SIF_I2cWriteByte(i32 185, i32 15)
%24 = call i32 @VIM_SIF_I2cWriteByte(i32 186, i32 152)
%25 = call i32 @VIM_SIF_I2cWriteByte(i32 187, i32 62)
%26 = call i32 @VIM_SIF_I2cWriteByte(i32 188, i32 96)
br label %37
27: ; preds = %1
%28 = call i32 @VIM_SIF_I2cWriteByte(i32 70, i32 0)
%29 = call i32 @VIM_SIF_I2cWriteByte(i32 185, i32 3)
%30 = call i32 @VIM_SIF_I2cWriteByte(i32 186, i32 230)
%31 = call i32 @VIM_SIF_I2cWriteByte(i32 187, i32 7)
%32 = call i32 @VIM_SIF_I2cWriteByte(i32 188, i32 204)
%33 = call i32 @VIM_SIF_I2cWriteByte(i32 70, i32 64)
%34 = call i32 @VIM_SIF_I2cWriteByte(i32 73, i32 133)
%35 = call i32 @VIM_SIF_I2cWriteByte(i32 74, i32 85)
br label %37
36: ; preds = %1
br label %37
37: ; preds = %36, %27, %21, %13, %5
ret void
}

LLVM IR (-O2):
define void @SensorSetMode_PO3030K(i8 zeroext %0) {
switch i8 %0, label %33 [
i8 1, label %2
i8 2, label %10
i8 4, label %18
i8 3, label %24
]
2: ; preds = %1
%3 = tail call i32 @VIM_SIF_I2cWriteByte(i32 70, i32 64)
%4 = tail call i32 @VIM_SIF_I2cWriteByte(i32 73, i32 133)
%5 = tail call i32 @VIM_SIF_I2cWriteByte(i32 74, i32 85)
%6 = tail call i32 @VIM_SIF_I2cWriteByte(i32 185, i32 3)
%7 = tail call i32 @VIM_SIF_I2cWriteByte(i32 186, i32 230)
%8 = tail call i32 @VIM_SIF_I2cWriteByte(i32 187, i32 7)
%9 = tail call i32 @VIM_SIF_I2cWriteByte(i32 188, i32 204)
br label %33
10: ; preds = %1
%11 = tail call i32 @VIM_SIF_I2cWriteByte(i32 70, i32 32)
%12 = tail call i32 @VIM_SIF_I2cWriteByte(i32 73, i32 111)
%13 = tail call i32 @VIM_SIF_I2cWriteByte(i32 74, i32 28)
%14 = tail call i32 @VIM_SIF_I2cWriteByte(i32 185, i32 3)
%15 = tail call i32 @VIM_SIF_I2cWriteByte(i32 186, i32 230)
%16 = tail call i32 @VIM_SIF_I2cWriteByte(i32 187, i32 7)
%17 = tail call i32 @VIM_SIF_I2cWriteByte(i32 188, i32 204)
br label %33
18: ; preds = %1
%19 = tail call i32 @VIM_SIF_I2cWriteByte(i32 70, i32 0)
%20 = tail call i32 @VIM_SIF_I2cWriteByte(i32 185, i32 15)
%21 = tail call i32 @VIM_SIF_I2cWriteByte(i32 186, i32 152)
%22 = tail call i32 @VIM_SIF_I2cWriteByte(i32 187, i32 62)
%23 = tail call i32 @VIM_SIF_I2cWriteByte(i32 188, i32 96)
br label %33
24: ; preds = %1
%25 = tail call i32 @VIM_SIF_I2cWriteByte(i32 70, i32 0)
%26 = tail call i32 @VIM_SIF_I2cWriteByte(i32 185, i32 3)
%27 = tail call i32 @VIM_SIF_I2cWriteByte(i32 186, i32 230)
%28 = tail call i32 @VIM_SIF_I2cWriteByte(i32 187, i32 7)
%29 = tail call i32 @VIM_SIF_I2cWriteByte(i32 188, i32 204)
%30 = tail call i32 @VIM_SIF_I2cWriteByte(i32 70, i32 64)
%31 = tail call i32 @VIM_SIF_I2cWriteByte(i32 73, i32 133)
%32 = tail call i32 @VIM_SIF_I2cWriteByte(i32 74, i32 85)
br label %33
33: ; preds = %1, %24, %18, %10, %2
ret void
}