#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*/ bbm_word_write(void *, int, int);
int /*<<< orphan*/ bbm_write(void *, int, int);
int /*<<< orphan*/ fc8150_clock_mode(void *);
int /*<<< orphan*/ fc8150_reset(void *);
int fc8150_init(void *hDevice) {
  bbm_write(hDevice, 0x00b0, 0x03);
  bbm_write(hDevice, 0x00b1, 0x00);
  bbm_write(hDevice, 0x00b2, 0x05);
  fc8150_reset(hDevice);
  fc8150_clock_mode(hDevice);
  bbm_write(hDevice, 0x1000, 0x27);
  bbm_write(hDevice, 0x1004, 0x4d);
  bbm_write(hDevice, 0x1069, 0x09);
  bbm_write(hDevice, 0x1075, 0x00);
  bbm_write(hDevice, 0x1083, 0x14);
  bbm_write(hDevice, 0x1084, 0x0f);
  bbm_word_write(hDevice, 0x00b4, 0x0000);
  bbm_write(hDevice, 0x00b9, 0x00);
  bbm_write(hDevice, 0x00ba, 0x01);
  bbm_write(hDevice, 0x2004, 0x41);
  bbm_write(hDevice, 0x2106, 0x1f);
  bbm_write(hDevice, 0x5010, 0x00);
  bbm_write(hDevice, 0x8004, 0x00);
  bbm_word_write(hDevice, 0x8010, (0));
  bbm_word_write(hDevice, 0x8020, ((0) + (188 * 32 * 2) - 1));
  bbm_word_write(hDevice, 0x8030, (((188 * 32 * 2) >> 1) - 1));
  bbm_write(hDevice, 0x0017, 0x01);
  bbm_write(hDevice, 0x8002, 0x01);
  bbm_write(hDevice, 0x8003, 0x01);
  bbm_write(hDevice, 0x0003, 0x07);
  bbm_write(hDevice, 0x0006, 0x01);
  return 0;
}


x86 assembly (clang, -O0):
<fc8150_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xb0,%esi
mov    $0x3,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xb1,%esi
xor    %edx,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xb2,%esi
mov    $0x5,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
call   1050 <fc8150_reset@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fc8150_clock_mode@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1000,%esi
mov    $0x27,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1004,%esi
mov    $0x4d,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1069,%esi
mov    $0x9,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1075,%esi
xor    %edx,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1083,%esi
mov    $0x14,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1084,%esi
mov    $0xf,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xb4,%esi
xor    %edx,%edx
call   1060 <bbm_word_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xb9,%esi
xor    %edx,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xba,%esi
mov    $0x1,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2004,%esi
mov    $0x41,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2106,%esi
mov    $0x1f,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x5010,%esi
xor    %edx,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8004,%esi
xor    %edx,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8010,%esi
xor    %edx,%edx
call   1060 <bbm_word_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8020,%esi
mov    $0x2eff,%edx
call   1060 <bbm_word_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8030,%esi
mov    $0x177f,%edx
call   1060 <bbm_word_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8002,%esi
mov    $0x1,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8003,%esi
mov    $0x1,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
mov    $0x7,%edx
call   1030 <bbm_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
call   1030 <bbm_write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8150_init>:
push   %rbx
mov    %rdi,%rbx
mov    $0xb0,%esi
mov    $0x3,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0xb1,%esi
xor    %edx,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0xb2,%esi
mov    $0x5,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
call   1050 <fc8150_reset@plt>
mov    %rbx,%rdi
call   1040 <fc8150_clock_mode@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    $0x27,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x1004,%esi
mov    $0x4d,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x1069,%esi
mov    $0x9,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x1075,%esi
xor    %edx,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x1083,%esi
mov    $0x14,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x1084,%esi
mov    $0xf,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0xb4,%esi
xor    %edx,%edx
call   1060 <bbm_word_write@plt>
mov    %rbx,%rdi
mov    $0xb9,%esi
xor    %edx,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0xba,%esi
mov    $0x1,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x2004,%esi
mov    $0x41,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x2106,%esi
mov    $0x1f,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x5010,%esi
xor    %edx,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x8004,%esi
xor    %edx,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x8010,%esi
xor    %edx,%edx
call   1060 <bbm_word_write@plt>
mov    %rbx,%rdi
mov    $0x8020,%esi
mov    $0x2eff,%edx
call   1060 <bbm_word_write@plt>
mov    %rbx,%rdi
mov    $0x8030,%esi
mov    $0x177f,%edx
call   1060 <bbm_word_write@plt>
mov    %rbx,%rdi
mov    $0x17,%esi
mov    $0x1,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x8002,%esi
mov    $0x1,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x8003,%esi
mov    $0x1,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x7,%edx
call   1030 <bbm_write@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x1,%edx
call   1030 <bbm_write@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fc8150_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @bbm_write(i8* %3, i32 176, i32 3)
%5 = load i8*, i8** %2
%6 = call i32 @bbm_write(i8* %5, i32 177, i32 0)
%7 = load i8*, i8** %2
%8 = call i32 @bbm_write(i8* %7, i32 178, i32 5)
%9 = load i8*, i8** %2
%10 = call i32 @fc8150_reset(i8* %9)
%11 = load i8*, i8** %2
%12 = call i32 @fc8150_clock_mode(i8* %11)
%13 = load i8*, i8** %2
%14 = call i32 @bbm_write(i8* %13, i32 4096, i32 39)
%15 = load i8*, i8** %2
%16 = call i32 @bbm_write(i8* %15, i32 4100, i32 77)
%17 = load i8*, i8** %2
%18 = call i32 @bbm_write(i8* %17, i32 4201, i32 9)
%19 = load i8*, i8** %2
%20 = call i32 @bbm_write(i8* %19, i32 4213, i32 0)
%21 = load i8*, i8** %2
%22 = call i32 @bbm_write(i8* %21, i32 4227, i32 20)
%23 = load i8*, i8** %2
%24 = call i32 @bbm_write(i8* %23, i32 4228, i32 15)
%25 = load i8*, i8** %2
%26 = call i32 @bbm_word_write(i8* %25, i32 180, i32 0)
%27 = load i8*, i8** %2
%28 = call i32 @bbm_write(i8* %27, i32 185, i32 0)
%29 = load i8*, i8** %2
%30 = call i32 @bbm_write(i8* %29, i32 186, i32 1)
%31 = load i8*, i8** %2
%32 = call i32 @bbm_write(i8* %31, i32 8196, i32 65)
%33 = load i8*, i8** %2
%34 = call i32 @bbm_write(i8* %33, i32 8454, i32 31)
%35 = load i8*, i8** %2
%36 = call i32 @bbm_write(i8* %35, i32 20496, i32 0)
%37 = load i8*, i8** %2
%38 = call i32 @bbm_write(i8* %37, i32 32772, i32 0)
%39 = load i8*, i8** %2
%40 = call i32 @bbm_word_write(i8* %39, i32 32784, i32 0)
%41 = load i8*, i8** %2
%42 = call i32 @bbm_word_write(i8* %41, i32 32800, i32 12031)
%43 = load i8*, i8** %2
%44 = call i32 @bbm_word_write(i8* %43, i32 32816, i32 6015)
%45 = load i8*, i8** %2
%46 = call i32 @bbm_write(i8* %45, i32 23, i32 1)
%47 = load i8*, i8** %2
%48 = call i32 @bbm_write(i8* %47, i32 32770, i32 1)
%49 = load i8*, i8** %2
%50 = call i32 @bbm_write(i8* %49, i32 32771, i32 1)
%51 = load i8*, i8** %2
%52 = call i32 @bbm_write(i8* %51, i32 3, i32 7)
%53 = load i8*, i8** %2
%54 = call i32 @bbm_write(i8* %53, i32 6, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @fc8150_init(i8* %0) {
%2 = tail call i32 @bbm_write(i8* %0, i32 176, i32 3)
%3 = tail call i32 @bbm_write(i8* %0, i32 177, i32 0)
%4 = tail call i32 @bbm_write(i8* %0, i32 178, i32 5)
%5 = tail call i32 @fc8150_reset(i8* %0)
%6 = tail call i32 @fc8150_clock_mode(i8* %0)
%7 = tail call i32 @bbm_write(i8* %0, i32 4096, i32 39)
%8 = tail call i32 @bbm_write(i8* %0, i32 4100, i32 77)
%9 = tail call i32 @bbm_write(i8* %0, i32 4201, i32 9)
%10 = tail call i32 @bbm_write(i8* %0, i32 4213, i32 0)
%11 = tail call i32 @bbm_write(i8* %0, i32 4227, i32 20)
%12 = tail call i32 @bbm_write(i8* %0, i32 4228, i32 15)
%13 = tail call i32 @bbm_word_write(i8* %0, i32 180, i32 0)
%14 = tail call i32 @bbm_write(i8* %0, i32 185, i32 0)
%15 = tail call i32 @bbm_write(i8* %0, i32 186, i32 1)
%16 = tail call i32 @bbm_write(i8* %0, i32 8196, i32 65)
%17 = tail call i32 @bbm_write(i8* %0, i32 8454, i32 31)
%18 = tail call i32 @bbm_write(i8* %0, i32 20496, i32 0)
%19 = tail call i32 @bbm_write(i8* %0, i32 32772, i32 0)
%20 = tail call i32 @bbm_word_write(i8* %0, i32 32784, i32 0)
%21 = tail call i32 @bbm_word_write(i8* %0, i32 32800, i32 12031)
%22 = tail call i32 @bbm_word_write(i8* %0, i32 32816, i32 6015)
%23 = tail call i32 @bbm_write(i8* %0, i32 23, i32 1)
%24 = tail call i32 @bbm_write(i8* %0, i32 32770, i32 1)
%25 = tail call i32 @bbm_write(i8* %0, i32 32771, i32 1)
%26 = tail call i32 @bbm_write(i8* %0, i32 3, i32 7)
%27 = tail call i32 @bbm_write(i8* %0, i32 6, i32 1)
ret i32 0
}