#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*/ RamWrite32A_Ofilm(int, int);
int /*<<< orphan*/ RegWriteA_Ofilm(int, int);
void AutoGainControlSw_OFILM(unsigned char UcModeSw_OFILM) {
  if (UcModeSw_OFILM == 0x00) {
    RegWriteA_Ofilm(0x0129, 0xA0);
    RegWriteA_Ofilm(0x012A, 0xA0);
    ;
    RamWrite32A_Ofilm(0x100B, 0x3F800000);
    RamWrite32A_Ofilm(0x100B | 0x0100, 0x3F800000);
  } else {
    RegWriteA_Ofilm(0x0129, 0xA3);
    RegWriteA_Ofilm(0x012A, 0xA3);
    ;
  }
}


x86 assembly (clang, -O0):
<AutoGainControlSw_OFILM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jne    117c <AutoGainControlSw_OFILM+0x5c>
mov    $0x129,%edi
mov    $0xa0,%esi
call   1030 <RegWriteA_Ofilm@plt>
mov    $0x12a,%edi
mov    $0xa0,%esi
call   1030 <RegWriteA_Ofilm@plt>
mov    $0x100b,%edi
mov    $0x3f800000,%esi
call   1040 <RamWrite32A_Ofilm@plt>
mov    $0x110b,%edi
mov    $0x3f800000,%esi
call   1040 <RamWrite32A_Ofilm@plt>
jmp    119a <AutoGainControlSw_OFILM+0x7a>
mov    $0x129,%edi
mov    $0xa3,%esi
call   1030 <RegWriteA_Ofilm@plt>
mov    $0x12a,%edi
mov    $0xa3,%esi
call   1030 <RegWriteA_Ofilm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AutoGainControlSw_OFILM>:
push   %rax
test   %edi,%edi
je     1144 <AutoGainControlSw_OFILM+0x24>
mov    $0x129,%edi
mov    $0xa3,%esi
call   1030 <RegWriteA_Ofilm@plt>
mov    $0x12a,%edi
mov    $0xa3,%esi
pop    %rax
jmp    1030 <RegWriteA_Ofilm@plt>
mov    $0x129,%edi
mov    $0xa0,%esi
call   1030 <RegWriteA_Ofilm@plt>
mov    $0x12a,%edi
mov    $0xa0,%esi
call   1030 <RegWriteA_Ofilm@plt>
mov    $0x100b,%edi
mov    $0x3f800000,%esi
call   1040 <RamWrite32A_Ofilm@plt>
mov    $0x110b,%edi
mov    $0x3f800000,%esi
pop    %rax
jmp    1040 <RamWrite32A_Ofilm@plt>

LLVM IR (-O0):
define void @AutoGainControlSw_OFILM(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = call i32 @RegWriteA_Ofilm(i32 297, i32 160)
%8 = call i32 @RegWriteA_Ofilm(i32 298, i32 160)
%9 = call i32 @RamWrite32A_Ofilm(i32 4107, i32 1065353216)
%10 = call i32 @RamWrite32A_Ofilm(i32 4363, i32 1065353216)
br label %14
11: ; preds = %1
%12 = call i32 @RegWriteA_Ofilm(i32 297, i32 163)
%13 = call i32 @RegWriteA_Ofilm(i32 298, i32 163)
br label %14
14: ; preds = %11, %6
ret void
}

LLVM IR (-O2):
define void @AutoGainControlSw_OFILM(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = tail call i32 @RegWriteA_Ofilm(i32 297, i32 160)
%5 = tail call i32 @RegWriteA_Ofilm(i32 298, i32 160)
%6 = tail call i32 @RamWrite32A_Ofilm(i32 4107, i32 1065353216)
%7 = tail call i32 @RamWrite32A_Ofilm(i32 4363, i32 1065353216)
br label %11
8: ; preds = %1
%9 = tail call i32 @RegWriteA_Ofilm(i32 297, i32 163)
%10 = tail call i32 @RegWriteA_Ofilm(i32 298, i32 163)
br label %11
11: ; preds = %8, %3
ret void
}