#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_OV6680(unsigned char val) {
  switch (val) {
  case 1:
    VIM_SIF_I2cWriteByte(0x0f, 0x25);
    VIM_SIF_I2cWriteByte(0x4f, 0x83);
    VIM_SIF_I2cWriteByte(0x13, 0xcd);
    VIM_SIF_I2cWriteByte(0x2d, 0x00);
    VIM_SIF_I2cWriteByte(0x2e, 0x00);
    VIM_SIF_I2cWriteByte(0x13, 0xc0);
    break;
  case 2:
    VIM_SIF_I2cWriteByte(0x13, 0xe0);
    VIM_SIF_I2cWriteByte(0x0f, 0x21);
    VIM_SIF_I2cWriteByte(0x50, 0x6d);
    VIM_SIF_I2cWriteByte(0x2d, 0x00);
    VIM_SIF_I2cWriteByte(0x2e, 0x00);
    break;
  case 4:
    VIM_SIF_I2cWriteByte(0x0f, 0x21);
    VIM_SIF_I2cWriteByte(0x13, 0xcd);
    VIM_SIF_I2cWriteByte(0x2d, 0x10);
    VIM_SIF_I2cWriteByte(0x2e, 0x10);
    VIM_SIF_I2cWriteByte(0x13, 0xc0);
    break;
  case 3:
    VIM_SIF_I2cWriteByte(0x13, 0xcd);
    VIM_SIF_I2cWriteByte(0x2d, 0x00);
    VIM_SIF_I2cWriteByte(0x2e, 0x00);
    VIM_SIF_I2cWriteByte(0x13, 0xc0);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<SensorSetMode_OV6680>:
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     1276 <SensorSetMode_OV6680+0x166>
mov    -0x10(%rbp),%rax
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0xf,%edi
mov    $0x25,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x4f,%edi
mov    $0x83,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x13,%edi
mov    $0xcd,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2d,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2e,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x13,%edi
mov    $0xc0,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    127b <SensorSetMode_OV6680+0x16b>
mov    $0x13,%edi
mov    $0xe0,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xf,%edi
mov    $0x21,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x50,%edi
mov    $0x6d,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2d,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2e,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    127b <SensorSetMode_OV6680+0x16b>
mov    $0xf,%edi
mov    $0x21,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x13,%edi
mov    $0xcd,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2d,%edi
mov    $0x10,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2e,%edi
mov    $0x10,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x13,%edi
mov    $0xc0,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    127b <SensorSetMode_OV6680+0x16b>
mov    $0x13,%edi
mov    $0xcd,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2d,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2e,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x13,%edi
mov    $0xc0,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    127b <SensorSetMode_OV6680+0x16b>
jmp    127b <SensorSetMode_OV6680+0x16b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetMode_OV6680>:
push   %rax
add    $0xff,%dil
cmp    $0x3,%dil
ja     1171 <SensorSetMode_OV6680+0x61>
movzbl %dil,%eax
lea    0xeda(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0xf,%edi
mov    $0x25,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x4f,%edi
mov    $0x83,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x13,%edi
mov    $0xcd,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2d,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2e,%edi
xor    %esi,%esi
jmp    11f0 <SensorSetMode_OV6680+0xe0>
pop    %rax
ret
mov    $0x13,%edi
mov    $0xe0,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xf,%edi
mov    $0x21,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x50,%edi
mov    $0x6d,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2d,%edi
xor    %esi,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2e,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0xf,%edi
mov    $0x21,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x13,%edi
mov    $0xcd,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2d,%edi
mov    $0x10,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x2e,%edi
mov    $0x10,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
mov    $0x13,%edi
mov    $0xc0,%esi
pop    %rax
jmp    1030 <VIM_SIF_I2cWriteByte@plt>

LLVM IR (-O0):
define void @SensorSetMode_OV6680(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 %29 [
i32 1, label %5
i32 2, label %12
i32 4, label %18
i32 3, label %24
]
5: ; preds = %1
%6 = call i32 @VIM_SIF_I2cWriteByte(i32 15, i32 37)
%7 = call i32 @VIM_SIF_I2cWriteByte(i32 79, i32 131)
%8 = call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 205)
%9 = call i32 @VIM_SIF_I2cWriteByte(i32 45, i32 0)
%10 = call i32 @VIM_SIF_I2cWriteByte(i32 46, i32 0)
%11 = call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 192)
br label %30
12: ; preds = %1
%13 = call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 224)
%14 = call i32 @VIM_SIF_I2cWriteByte(i32 15, i32 33)
%15 = call i32 @VIM_SIF_I2cWriteByte(i32 80, i32 109)
%16 = call i32 @VIM_SIF_I2cWriteByte(i32 45, i32 0)
%17 = call i32 @VIM_SIF_I2cWriteByte(i32 46, i32 0)
br label %30
18: ; preds = %1
%19 = call i32 @VIM_SIF_I2cWriteByte(i32 15, i32 33)
%20 = call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 205)
%21 = call i32 @VIM_SIF_I2cWriteByte(i32 45, i32 16)
%22 = call i32 @VIM_SIF_I2cWriteByte(i32 46, i32 16)
%23 = call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 192)
br label %30
24: ; preds = %1
%25 = call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 205)
%26 = call i32 @VIM_SIF_I2cWriteByte(i32 45, i32 0)
%27 = call i32 @VIM_SIF_I2cWriteByte(i32 46, i32 0)
%28 = call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 192)
br label %30
29: ; preds = %1
br label %30
30: ; preds = %29, %24, %18, %12, %5
ret void
}

LLVM IR (-O2):
define void @SensorSetMode_OV6680(i8 zeroext %0) {
switch i8 %0, label %26 [
i8 1, label %2
i8 2, label %9
i8 4, label %15
i8 3, label %21
]
2: ; preds = %1
%3 = tail call i32 @VIM_SIF_I2cWriteByte(i32 15, i32 37)
%4 = tail call i32 @VIM_SIF_I2cWriteByte(i32 79, i32 131)
%5 = tail call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 205)
%6 = tail call i32 @VIM_SIF_I2cWriteByte(i32 45, i32 0)
%7 = tail call i32 @VIM_SIF_I2cWriteByte(i32 46, i32 0)
%8 = tail call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 192)
br label %26
9: ; preds = %1
%10 = tail call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 224)
%11 = tail call i32 @VIM_SIF_I2cWriteByte(i32 15, i32 33)
%12 = tail call i32 @VIM_SIF_I2cWriteByte(i32 80, i32 109)
%13 = tail call i32 @VIM_SIF_I2cWriteByte(i32 45, i32 0)
%14 = tail call i32 @VIM_SIF_I2cWriteByte(i32 46, i32 0)
br label %26
15: ; preds = %1
%16 = tail call i32 @VIM_SIF_I2cWriteByte(i32 15, i32 33)
%17 = tail call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 205)
%18 = tail call i32 @VIM_SIF_I2cWriteByte(i32 45, i32 16)
%19 = tail call i32 @VIM_SIF_I2cWriteByte(i32 46, i32 16)
%20 = tail call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 192)
br label %26
21: ; preds = %1
%22 = tail call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 205)
%23 = tail call i32 @VIM_SIF_I2cWriteByte(i32 45, i32 0)
%24 = tail call i32 @VIM_SIF_I2cWriteByte(i32 46, i32 0)
%25 = tail call i32 @VIM_SIF_I2cWriteByte(i32 19, i32 192)
br label %26
26: ; preds = %1, %21, %15, %9, %2
ret void
}