#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, 0x0369d037);
  bbm_byte_write(handle, 0x027c, 0x96);
  bbm_byte_write(handle, 0x027d, 0x6d);
  bbm_byte_write(handle, 0x027e, 0x00);
  bbm_byte_write(handle, 0x0120, 0x0e);
  bbm_byte_write(handle, 0x0121, 0x00);
  bbm_byte_write(handle, 0x0122, 0x03);
  bbm_byte_write(handle, 0x0123, 0x03);
  bbm_byte_write(handle, 0x0124, 0x1f);
  bbm_byte_write(handle, 0x0125, 0x1a);
  bbm_byte_write(handle, 0x0126, 0x1b);
  bbm_byte_write(handle, 0x0127, 0x03);
  bbm_byte_write(handle, 0x0128, 0x0a);
  bbm_byte_write(handle, 0x0129, 0x05);
  bbm_byte_write(handle, 0x012a, 0x37);
  bbm_byte_write(handle, 0x012b, 0x2d);
  bbm_byte_write(handle, 0x012c, 0xfa);
  bbm_byte_write(handle, 0x012d, 0x1f);
  bbm_byte_write(handle, 0x012e, 0x49);
  bbm_byte_write(handle, 0x012f, 0x5c);
  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    $0x369d037,%edx
call   1030 <bbm_long_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x27c,%esi
mov    $0x96,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x27d,%esi
mov    $0x6d,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x27e,%esi
xor    %edx,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x120,%esi
mov    $0xe,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x121,%esi
xor    %edx,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x122,%esi
mov    $0x3,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x123,%esi
mov    $0x3,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x124,%esi
mov    $0x1f,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x125,%esi
mov    $0x1a,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x126,%esi
mov    $0x1b,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x127,%esi
mov    $0x3,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x128,%esi
mov    $0xa,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x129,%esi
mov    $0x5,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12a,%esi
mov    $0x37,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12b,%esi
mov    $0x2d,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12c,%esi
mov    $0xfa,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12d,%esi
mov    $0x1f,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12e,%esi
mov    $0x49,%edx
call   1040 <bbm_byte_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12f,%esi
mov    $0x5c,%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    $0x369d037,%edx
call   1030 <bbm_long_write@plt>
mov    %rbx,%rdi
mov    $0x27c,%esi
mov    $0x96,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x27d,%esi
mov    $0x6d,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x27e,%esi
xor    %edx,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x120,%esi
mov    $0xe,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x121,%esi
xor    %edx,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x122,%esi
mov    $0x3,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x123,%esi
mov    $0x3,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x124,%esi
mov    $0x1f,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x125,%esi
mov    $0x1a,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x126,%esi
mov    $0x1b,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x127,%esi
mov    $0x3,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x128,%esi
mov    $0xa,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x129,%esi
mov    $0x5,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x12a,%esi
mov    $0x37,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x12b,%esi
mov    $0x2d,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x12c,%esi
mov    $0xfa,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x12d,%esi
mov    $0x1f,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x12e,%esi
mov    $0x49,%edx
call   1040 <bbm_byte_write@plt>
mov    %rbx,%rdi
mov    $0x12f,%esi
mov    $0x5c,%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 57266231)
%5 = load i8*, i8** %2
%6 = call i32 @bbm_byte_write(i8* %5, i32 636, i32 150)
%7 = load i8*, i8** %2
%8 = call i32 @bbm_byte_write(i8* %7, i32 637, i32 109)
%9 = load i8*, i8** %2
%10 = call i32 @bbm_byte_write(i8* %9, i32 638, i32 0)
%11 = load i8*, i8** %2
%12 = call i32 @bbm_byte_write(i8* %11, i32 288, i32 14)
%13 = load i8*, i8** %2
%14 = call i32 @bbm_byte_write(i8* %13, i32 289, i32 0)
%15 = load i8*, i8** %2
%16 = call i32 @bbm_byte_write(i8* %15, i32 290, i32 3)
%17 = load i8*, i8** %2
%18 = call i32 @bbm_byte_write(i8* %17, i32 291, i32 3)
%19 = load i8*, i8** %2
%20 = call i32 @bbm_byte_write(i8* %19, i32 292, i32 31)
%21 = load i8*, i8** %2
%22 = call i32 @bbm_byte_write(i8* %21, i32 293, i32 26)
%23 = load i8*, i8** %2
%24 = call i32 @bbm_byte_write(i8* %23, i32 294, i32 27)
%25 = load i8*, i8** %2
%26 = call i32 @bbm_byte_write(i8* %25, i32 295, i32 3)
%27 = load i8*, i8** %2
%28 = call i32 @bbm_byte_write(i8* %27, i32 296, i32 10)
%29 = load i8*, i8** %2
%30 = call i32 @bbm_byte_write(i8* %29, i32 297, i32 5)
%31 = load i8*, i8** %2
%32 = call i32 @bbm_byte_write(i8* %31, i32 298, i32 55)
%33 = load i8*, i8** %2
%34 = call i32 @bbm_byte_write(i8* %33, i32 299, i32 45)
%35 = load i8*, i8** %2
%36 = call i32 @bbm_byte_write(i8* %35, i32 300, i32 250)
%37 = load i8*, i8** %2
%38 = call i32 @bbm_byte_write(i8* %37, i32 301, i32 31)
%39 = load i8*, i8** %2
%40 = call i32 @bbm_byte_write(i8* %39, i32 302, i32 73)
%41 = load i8*, i8** %2
%42 = call i32 @bbm_byte_write(i8* %41, i32 303, i32 92)
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 57266231)
%3 = tail call i32 @bbm_byte_write(i8* %0, i32 636, i32 150)
%4 = tail call i32 @bbm_byte_write(i8* %0, i32 637, i32 109)
%5 = tail call i32 @bbm_byte_write(i8* %0, i32 638, i32 0)
%6 = tail call i32 @bbm_byte_write(i8* %0, i32 288, i32 14)
%7 = tail call i32 @bbm_byte_write(i8* %0, i32 289, i32 0)
%8 = tail call i32 @bbm_byte_write(i8* %0, i32 290, i32 3)
%9 = tail call i32 @bbm_byte_write(i8* %0, i32 291, i32 3)
%10 = tail call i32 @bbm_byte_write(i8* %0, i32 292, i32 31)
%11 = tail call i32 @bbm_byte_write(i8* %0, i32 293, i32 26)
%12 = tail call i32 @bbm_byte_write(i8* %0, i32 294, i32 27)
%13 = tail call i32 @bbm_byte_write(i8* %0, i32 295, i32 3)
%14 = tail call i32 @bbm_byte_write(i8* %0, i32 296, i32 10)
%15 = tail call i32 @bbm_byte_write(i8* %0, i32 297, i32 5)
%16 = tail call i32 @bbm_byte_write(i8* %0, i32 298, i32 55)
%17 = tail call i32 @bbm_byte_write(i8* %0, i32 299, i32 45)
%18 = tail call i32 @bbm_byte_write(i8* %0, i32 300, i32 250)
%19 = tail call i32 @bbm_byte_write(i8* %0, i32 301, i32 31)
%20 = tail call i32 @bbm_byte_write(i8* %0, i32 302, i32 73)
%21 = tail call i32 @bbm_byte_write(i8* %0, i32 303, i32 92)
ret i32 0
}