#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_byte_write(void *, int, int);
int /*<<< orphan*/ bbm_long_write(void *, int, int);
int fc8080_set_xtal(void *handle) {
  bbm_long_write(handle, 0x0278, 0x04000000);
  bbm_byte_write(handle, 0x027c, 0x80);
  bbm_byte_write(handle, 0x027d, 0x80);
  bbm_byte_write(handle, 0x027e, 0x02);
  bbm_byte_write(handle, 0x0120, 0x02);
  bbm_byte_write(handle, 0x0121, 0x0f);
  bbm_byte_write(handle, 0x0122, 0x0d);
  bbm_byte_write(handle, 0x0123, 0x00);
  bbm_byte_write(handle, 0x0124, 0x04);
  bbm_byte_write(handle, 0x0125, 0x03);
  bbm_byte_write(handle, 0x0126, 0x1c);
  bbm_byte_write(handle, 0x0127, 0x19);
  bbm_byte_write(handle, 0x0128, 0x02);
  bbm_byte_write(handle, 0x0129, 0x0c);
  bbm_byte_write(handle, 0x012a, 0x04);
  bbm_byte_write(handle, 0x012b, 0x30);
  bbm_byte_write(handle, 0x012c, 0xed);
  bbm_byte_write(handle, 0x012d, 0x13);
  bbm_byte_write(handle, 0x012e, 0x4f);
  bbm_byte_write(handle, 0x012f, 0x6b);
  return 0;
}


x86 assembly (clang, -O0):
<fc8080_set_xtal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x278,%esi
mov    $0x4000000,%edx
call   1030 <bbm_long_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x27c,%esi
mov    $0x80,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x27d,%esi
mov    $0x80,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x27e,%esi
mov    $0x2,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x120,%esi
mov    $0x2,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x121,%esi
mov    $0xf,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x122,%esi
mov    $0xd,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x123,%esi
xor    %edx,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x124,%esi
mov    $0x4,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x125,%esi
mov    $0x3,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x126,%esi
mov    $0x1c,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x127,%esi
mov    $0x19,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x128,%esi
mov    $0x2,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x129,%esi
mov    $0xc,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12a,%esi
mov    $0x4,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12b,%esi
mov    $0x30,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12c,%esi
mov    $0xed,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12d,%esi
mov    $0x13,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12e,%esi
mov    $0x4f,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12f,%esi
mov    $0x6b,%edx
call   1040 <bbm_byte_write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8080_set_xtal>:
push   %rbx
mov    %rdi,%rbx
mov    $0x278,%esi
mov    $0x4000000,%edx
call   1030 <bbm_long_write@plt>
mov    %rbx,%rdi
mov    $0x27c,%esi
mov    $0x80,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x27d,%esi
mov    $0x80,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x27e,%esi
mov    $0x2,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x120,%esi
mov    $0x2,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x121,%esi
mov    $0xf,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x122,%esi
mov    $0xd,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x123,%esi
xor    %edx,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x124,%esi
mov    $0x4,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x125,%esi
mov    $0x3,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x126,%esi
mov    $0x1c,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x127,%esi
mov    $0x19,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x128,%esi
mov    $0x2,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x129,%esi
mov    $0xc,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x12a,%esi
mov    $0x4,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x12b,%esi
mov    $0x30,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x12c,%esi
mov    $0xed,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x12d,%esi
mov    $0x13,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x12e,%esi
mov    $0x4f,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x12f,%esi
mov    $0x6b,%edx
call   1040 <bbm_byte_write@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fc8080_set_xtal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @bbm_long_write(i8* %3, i32 632, i32 67108864)
%5 = load i8*, i8** %2
%6 = call i32 @bbm_byte_write(i8* %5, i32 636, i32 128)
%7 = load i8*, i8** %2
%8 = call i32 @bbm_byte_write(i8* %7, i32 637, i32 128)
%9 = load i8*, i8** %2
%10 = call i32 @bbm_byte_write(i8* %9, i32 638, i32 2)
%11 = load i8*, i8** %2
%12 = call i32 @bbm_byte_write(i8* %11, i32 288, i32 2)
%13 = load i8*, i8** %2
%14 = call i32 @bbm_byte_write(i8* %13, i32 289, i32 15)
%15 = load i8*, i8** %2
%16 = call i32 @bbm_byte_write(i8* %15, i32 290, i32 13)
%17 = load i8*, i8** %2
%18 = call i32 @bbm_byte_write(i8* %17, i32 291, i32 0)
%19 = load i8*, i8** %2
%20 = call i32 @bbm_byte_write(i8* %19, i32 292, i32 4)
%21 = load i8*, i8** %2
%22 = call i32 @bbm_byte_write(i8* %21, i32 293, i32 3)
%23 = load i8*, i8** %2
%24 = call i32 @bbm_byte_write(i8* %23, i32 294, i32 28)
%25 = load i8*, i8** %2
%26 = call i32 @bbm_byte_write(i8* %25, i32 295, i32 25)
%27 = load i8*, i8** %2
%28 = call i32 @bbm_byte_write(i8* %27, i32 296, i32 2)
%29 = load i8*, i8** %2
%30 = call i32 @bbm_byte_write(i8* %29, i32 297, i32 12)
%31 = load i8*, i8** %2
%32 = call i32 @bbm_byte_write(i8* %31, i32 298, i32 4)
%33 = load i8*, i8** %2
%34 = call i32 @bbm_byte_write(i8* %33, i32 299, i32 48)
%35 = load i8*, i8** %2
%36 = call i32 @bbm_byte_write(i8* %35, i32 300, i32 237)
%37 = load i8*, i8** %2
%38 = call i32 @bbm_byte_write(i8* %37, i32 301, i32 19)
%39 = load i8*, i8** %2
%40 = call i32 @bbm_byte_write(i8* %39, i32 302, i32 79)
%41 = load i8*, i8** %2
%42 = call i32 @bbm_byte_write(i8* %41, i32 303, i32 107)
ret i32 0
}

LLVM IR (-O2):
define i32 @fc8080_set_xtal(i8* %0) {
%2 = tail call i32 @bbm_long_write(i8* %0, i32 632, i32 67108864)
%3 = tail call i32 @bbm_byte_write(i8* %0, i32 636, i32 128)
%4 = tail call i32 @bbm_byte_write(i8* %0, i32 637, i32 128)
%5 = tail call i32 @bbm_byte_write(i8* %0, i32 638, i32 2)
%6 = tail call i32 @bbm_byte_write(i8* %0, i32 288, i32 2)
%7 = tail call i32 @bbm_byte_write(i8* %0, i32 289, i32 15)
%8 = tail call i32 @bbm_byte_write(i8* %0, i32 290, i32 13)
%9 = tail call i32 @bbm_byte_write(i8* %0, i32 291, i32 0)
%10 = tail call i32 @bbm_byte_write(i8* %0, i32 292, i32 4)
%11 = tail call i32 @bbm_byte_write(i8* %0, i32 293, i32 3)
%12 = tail call i32 @bbm_byte_write(i8* %0, i32 294, i32 28)
%13 = tail call i32 @bbm_byte_write(i8* %0, i32 295, i32 25)
%14 = tail call i32 @bbm_byte_write(i8* %0, i32 296, i32 2)
%15 = tail call i32 @bbm_byte_write(i8* %0, i32 297, i32 12)
%16 = tail call i32 @bbm_byte_write(i8* %0, i32 298, i32 4)
%17 = tail call i32 @bbm_byte_write(i8* %0, i32 299, i32 48)
%18 = tail call i32 @bbm_byte_write(i8* %0, i32 300, i32 237)
%19 = tail call i32 @bbm_byte_write(i8* %0, i32 301, i32 19)
%20 = tail call i32 @bbm_byte_write(i8* %0, i32 302, i32 79)
%21 = tail call i32 @bbm_byte_write(i8* %0, i32 303, i32 107)
ret i32 0
}