#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*/ PRINTF(void *, char *);
int fc8151_read(void *, int, unsigned char *);
int /*<<< orphan*/ fc8151_set_filter(void *);
int /*<<< orphan*/ fc8151_write(void *, int, int);
int /*<<< orphan*/ msWait(int);
int fc8151_tuner_init(void *hDevice, unsigned int band) {
  unsigned char RFPD_REF, MIXPD_REF;
  int res = 0;
  PRINTF(hDevice, "fc8151_init\n");
  fc8151_write(hDevice, 0x00, 0x00);
  fc8151_write(hDevice, 0x02, 0x81);
  fc8151_write(hDevice, 0x13, 0xF4);
  fc8151_write(hDevice, 0x30, 0x0A);
  fc8151_write(hDevice, 0x3B, 0x01);
  fc8151_set_filter(hDevice);
  fc8151_write(hDevice, 0x3B, 0x00);
  fc8151_write(hDevice, 0x34, 0x68);
  fc8151_write(hDevice, 0x36, 0xFF);
  fc8151_write(hDevice, 0x37, 0xFF);
  fc8151_write(hDevice, 0x39, 0x11);
  fc8151_write(hDevice, 0x3A, 0x00);
  fc8151_write(hDevice, 0x52, 0x20);
  fc8151_write(hDevice, 0x53, 0x5F);
  fc8151_write(hDevice, 0x54, 0x00);
  fc8151_write(hDevice, 0x5E, 0x00);
  fc8151_write(hDevice, 0x63, 0x30);
  fc8151_write(hDevice, 0x56, 0x0F);
  fc8151_write(hDevice, 0x57, 0x1F);
  fc8151_write(hDevice, 0x58, 0x09);
  fc8151_write(hDevice, 0x59, 0x5E);
  fc8151_write(hDevice, 0x29, 0x00);
  fc8151_write(hDevice, 0x94, 0x00);
  fc8151_write(hDevice, 0x95, 0x01);
  fc8151_write(hDevice, 0x96, 0x11);
  fc8151_write(hDevice, 0x97, 0x21);
  fc8151_write(hDevice, 0x98, 0x31);
  fc8151_write(hDevice, 0x99, 0x32);
  fc8151_write(hDevice, 0x9A, 0x42);
  fc8151_write(hDevice, 0x9B, 0x52);
  fc8151_write(hDevice, 0x9C, 0x53);
  fc8151_write(hDevice, 0x9D, 0x63);
  fc8151_write(hDevice, 0x9E, 0x63);
  fc8151_write(hDevice, 0x9F, 0x63);
  fc8151_write(hDevice, 0x79, 0x2A);
  fc8151_write(hDevice, 0x7A, 0x24);
  fc8151_write(hDevice, 0x7B, 0xFF);
  fc8151_write(hDevice, 0x7C, 0x16);
  fc8151_write(hDevice, 0x7D, 0x12);
  fc8151_write(hDevice, 0x84, 0x00);
  fc8151_write(hDevice, 0x85, 0x08);
  fc8151_write(hDevice, 0x86, 0x00);
  fc8151_write(hDevice, 0x87, 0x08);
  fc8151_write(hDevice, 0x88, 0x00);
  fc8151_write(hDevice, 0x89, 0x08);
  fc8151_write(hDevice, 0x8A, 0x00);
  fc8151_write(hDevice, 0x8B, 0x08);
  fc8151_write(hDevice, 0x8C, 0x00);
  fc8151_write(hDevice, 0x8D, 0x1D);
  fc8151_write(hDevice, 0x8E, 0x13);
  fc8151_write(hDevice, 0x8F, 0x1D);
  fc8151_write(hDevice, 0x90, 0x13);
  fc8151_write(hDevice, 0x91, 0x1D);
  fc8151_write(hDevice, 0x92, 0x13);
  fc8151_write(hDevice, 0x93, 0x1D);
  fc8151_write(hDevice, 0x80, 0x1F);
  fc8151_write(hDevice, 0x81, 0x0A);
  fc8151_write(hDevice, 0x82, 0x40);
  fc8151_write(hDevice, 0x83, 0x0A);
  fc8151_write(hDevice, 0xA0, 0xC0);
  fc8151_write(hDevice, 0x7E, 0x7F);
  fc8151_write(hDevice, 0x7F, 0x7F);
  fc8151_write(hDevice, 0xD0, 0x0A);
  fc8151_write(hDevice, 0xD2, 0x28);
  fc8151_write(hDevice, 0xD4, 0x28);
  fc8151_write(hDevice, 0xA0, 0x17);
  fc8151_write(hDevice, 0xD0, 0x00);
  fc8151_write(hDevice, 0xA1, 0x1D);
  msWait(100);
  res = fc8151_read(hDevice, 0xD6, &RFPD_REF);
  res = fc8151_read(hDevice, 0xD8, &MIXPD_REF);
  fc8151_write(hDevice, 0xA0, 0xD7);
  fc8151_write(hDevice, 0xD0, 0x0A);
  fc8151_write(hDevice, 0x7E, RFPD_REF);
  fc8151_write(hDevice, 0x7F, MIXPD_REF);
  fc8151_write(hDevice, 0xA0, 0xC0);
  fc8151_write(hDevice, 0xA1, 0x00);
  return res;
}


x86 assembly (clang, -O0):
<fc8151_tuner_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe8f(%rip),%rsi
call   1070 <PRINTF@plt>
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
mov    $0x81,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x13,%esi
mov    $0xf4,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x30,%esi
mov    $0xa,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3b,%esi
mov    $0x1,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fc8151_set_filter@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3b,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x34,%esi
mov    $0x68,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x36,%esi
mov    $0xff,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x37,%esi
mov    $0xff,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x39,%esi
mov    $0x11,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3a,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x52,%esi
mov    $0x20,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x53,%esi
mov    $0x5f,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x54,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x5e,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x63,%esi
mov    $0x30,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x56,%esi
mov    $0xf,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x57,%esi
mov    $0x1f,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x58,%esi
mov    $0x9,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x59,%esi
mov    $0x5e,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x29,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x94,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x95,%esi
mov    $0x1,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x96,%esi
mov    $0x11,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x97,%esi
mov    $0x21,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x98,%esi
mov    $0x31,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x99,%esi
mov    $0x32,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9a,%esi
mov    $0x42,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9b,%esi
mov    $0x52,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9c,%esi
mov    $0x53,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9d,%esi
mov    $0x63,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9e,%esi
mov    $0x63,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9f,%esi
mov    $0x63,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x79,%esi
mov    $0x2a,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x7a,%esi
mov    $0x24,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x7b,%esi
mov    $0xff,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x7c,%esi
mov    $0x16,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x7d,%esi
mov    $0x12,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x84,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x85,%esi
mov    $0x8,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x86,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x87,%esi
mov    $0x8,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x88,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x89,%esi
mov    $0x8,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8a,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8b,%esi
mov    $0x8,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8c,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8d,%esi
mov    $0x1d,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8e,%esi
mov    $0x13,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8f,%esi
mov    $0x1d,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x90,%esi
mov    $0x13,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x91,%esi
mov    $0x1d,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x92,%esi
mov    $0x13,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x93,%esi
mov    $0x1d,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x80,%esi
mov    $0x1f,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x81,%esi
mov    $0xa,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x82,%esi
mov    $0x40,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x83,%esi
mov    $0xa,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa0,%esi
mov    $0xc0,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x7e,%esi
mov    $0x7f,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x7f,%edx
mov    %edx,%esi
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xd0,%esi
mov    $0xa,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xd2,%esi
mov    $0x28,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xd4,%esi
mov    $0x28,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa0,%esi
mov    $0x17,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xd0,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa1,%esi
mov    $0x1d,%edx
call   1060 <fc8151_write@plt>
mov    $0x64,%edi
call   1050 <msWait@plt>
mov    -0x8(%rbp),%rdi
mov    $0xd6,%esi
lea    -0xd(%rbp),%rdx
call   1030 <fc8151_read@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xd8,%esi
lea    -0xe(%rbp),%rdx
call   1030 <fc8151_read@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa0,%esi
mov    $0xd7,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xd0,%esi
mov    $0xa,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
movzbl -0xd(%rbp),%edx
mov    $0x7e,%esi
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
movzbl -0xe(%rbp),%edx
mov    $0x7f,%esi
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa0,%esi
mov    $0xc0,%edx
call   1060 <fc8151_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa1,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8151_tuner_init>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xea3(%rip),%rsi
call   1070 <PRINTF@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x81,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x13,%esi
mov    $0xf4,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x30,%esi
mov    $0xa,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x3b,%esi
mov    $0x1,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
call   1040 <fc8151_set_filter@plt>
mov    %rbx,%rdi
mov    $0x3b,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x34,%esi
mov    $0x68,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x36,%esi
mov    $0xff,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x37,%esi
mov    $0xff,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x39,%esi
mov    $0x11,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x3a,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x52,%esi
mov    $0x20,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x53,%esi
mov    $0x5f,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x54,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x5e,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x63,%esi
mov    $0x30,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x56,%esi
mov    $0xf,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x57,%esi
mov    $0x1f,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x58,%esi
mov    $0x9,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x59,%esi
mov    $0x5e,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x29,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x94,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x95,%esi
mov    $0x1,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x96,%esi
mov    $0x11,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x97,%esi
mov    $0x21,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x98,%esi
mov    $0x31,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x99,%esi
mov    $0x32,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x9a,%esi
mov    $0x42,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x9b,%esi
mov    $0x52,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x9c,%esi
mov    $0x53,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x9d,%esi
mov    $0x63,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x9e,%esi
mov    $0x63,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x9f,%esi
mov    $0x63,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x79,%esi
mov    $0x2a,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x7a,%esi
mov    $0x24,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x7b,%esi
mov    $0xff,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x7c,%esi
mov    $0x16,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x7d,%esi
mov    $0x12,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x84,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x85,%esi
mov    $0x8,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x86,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x87,%esi
mov    $0x8,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x88,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x89,%esi
mov    $0x8,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x8a,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x8b,%esi
mov    $0x8,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x8c,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x8d,%esi
mov    $0x1d,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x8e,%esi
mov    $0x13,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x8f,%esi
mov    $0x1d,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x90,%esi
mov    $0x13,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x91,%esi
mov    $0x1d,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x92,%esi
mov    $0x13,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x93,%esi
mov    $0x1d,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x80,%esi
mov    $0x1f,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x81,%esi
mov    $0xa,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x82,%esi
mov    $0x40,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x83,%esi
mov    $0xa,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0xa0,%esi
mov    $0xc0,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x7e,%esi
mov    $0x7f,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0x7f,%esi
mov    $0x7f,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0xd0,%esi
mov    $0xa,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0xd2,%esi
mov    $0x28,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0xd4,%esi
mov    $0x28,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0xa0,%esi
mov    $0x17,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0xd0,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0xa1,%esi
mov    $0x1d,%edx
call   1060 <fc8151_write@plt>
mov    $0x64,%edi
call   1050 <msWait@plt>
lea    0x7(%rsp),%rdx
mov    %rbx,%rdi
mov    $0xd6,%esi
call   1030 <fc8151_read@plt>
lea    0x6(%rsp),%rdx
mov    %rbx,%rdi
mov    $0xd8,%esi
call   1030 <fc8151_read@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0xa0,%esi
mov    $0xd7,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0xd0,%esi
mov    $0xa,%edx
call   1060 <fc8151_write@plt>
movzbl 0x7(%rsp),%edx
mov    %rbx,%rdi
mov    $0x7e,%esi
call   1060 <fc8151_write@plt>
movzbl 0x6(%rsp),%edx
mov    %rbx,%rdi
mov    $0x7f,%esi
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0xa0,%esi
mov    $0xc0,%edx
call   1060 <fc8151_write@plt>
mov    %rbx,%rdi
mov    $0xa1,%esi
xor    %edx,%edx
call   1060 <fc8151_write@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"fc8151_init\0A\00"
define i32 @fc8151_tuner_init(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %7
%8 = load i8*, i8** %3
%9 = call i32 @PRINTF(i8* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%10 = load i8*, i8** %3
%11 = call i32 @fc8151_write(i8* %10, i32 0, i32 0)
%12 = load i8*, i8** %3
%13 = call i32 @fc8151_write(i8* %12, i32 2, i32 129)
%14 = load i8*, i8** %3
%15 = call i32 @fc8151_write(i8* %14, i32 19, i32 244)
%16 = load i8*, i8** %3
%17 = call i32 @fc8151_write(i8* %16, i32 48, i32 10)
%18 = load i8*, i8** %3
%19 = call i32 @fc8151_write(i8* %18, i32 59, i32 1)
%20 = load i8*, i8** %3
%21 = call i32 @fc8151_set_filter(i8* %20)
%22 = load i8*, i8** %3
%23 = call i32 @fc8151_write(i8* %22, i32 59, i32 0)
%24 = load i8*, i8** %3
%25 = call i32 @fc8151_write(i8* %24, i32 52, i32 104)
%26 = load i8*, i8** %3
%27 = call i32 @fc8151_write(i8* %26, i32 54, i32 255)
%28 = load i8*, i8** %3
%29 = call i32 @fc8151_write(i8* %28, i32 55, i32 255)
%30 = load i8*, i8** %3
%31 = call i32 @fc8151_write(i8* %30, i32 57, i32 17)
%32 = load i8*, i8** %3
%33 = call i32 @fc8151_write(i8* %32, i32 58, i32 0)
%34 = load i8*, i8** %3
%35 = call i32 @fc8151_write(i8* %34, i32 82, i32 32)
%36 = load i8*, i8** %3
%37 = call i32 @fc8151_write(i8* %36, i32 83, i32 95)
%38 = load i8*, i8** %3
%39 = call i32 @fc8151_write(i8* %38, i32 84, i32 0)
%40 = load i8*, i8** %3
%41 = call i32 @fc8151_write(i8* %40, i32 94, i32 0)
%42 = load i8*, i8** %3
%43 = call i32 @fc8151_write(i8* %42, i32 99, i32 48)
%44 = load i8*, i8** %3
%45 = call i32 @fc8151_write(i8* %44, i32 86, i32 15)
%46 = load i8*, i8** %3
%47 = call i32 @fc8151_write(i8* %46, i32 87, i32 31)
%48 = load i8*, i8** %3
%49 = call i32 @fc8151_write(i8* %48, i32 88, i32 9)
%50 = load i8*, i8** %3
%51 = call i32 @fc8151_write(i8* %50, i32 89, i32 94)
%52 = load i8*, i8** %3
%53 = call i32 @fc8151_write(i8* %52, i32 41, i32 0)
%54 = load i8*, i8** %3
%55 = call i32 @fc8151_write(i8* %54, i32 148, i32 0)
%56 = load i8*, i8** %3
%57 = call i32 @fc8151_write(i8* %56, i32 149, i32 1)
%58 = load i8*, i8** %3
%59 = call i32 @fc8151_write(i8* %58, i32 150, i32 17)
%60 = load i8*, i8** %3
%61 = call i32 @fc8151_write(i8* %60, i32 151, i32 33)
%62 = load i8*, i8** %3
%63 = call i32 @fc8151_write(i8* %62, i32 152, i32 49)
%64 = load i8*, i8** %3
%65 = call i32 @fc8151_write(i8* %64, i32 153, i32 50)
%66 = load i8*, i8** %3
%67 = call i32 @fc8151_write(i8* %66, i32 154, i32 66)
%68 = load i8*, i8** %3
%69 = call i32 @fc8151_write(i8* %68, i32 155, i32 82)
%70 = load i8*, i8** %3
%71 = call i32 @fc8151_write(i8* %70, i32 156, i32 83)
%72 = load i8*, i8** %3
%73 = call i32 @fc8151_write(i8* %72, i32 157, i32 99)
%74 = load i8*, i8** %3
%75 = call i32 @fc8151_write(i8* %74, i32 158, i32 99)
%76 = load i8*, i8** %3
%77 = call i32 @fc8151_write(i8* %76, i32 159, i32 99)
%78 = load i8*, i8** %3
%79 = call i32 @fc8151_write(i8* %78, i32 121, i32 42)
%80 = load i8*, i8** %3
%81 = call i32 @fc8151_write(i8* %80, i32 122, i32 36)
%82 = load i8*, i8** %3
%83 = call i32 @fc8151_write(i8* %82, i32 123, i32 255)
%84 = load i8*, i8** %3
%85 = call i32 @fc8151_write(i8* %84, i32 124, i32 22)
%86 = load i8*, i8** %3
%87 = call i32 @fc8151_write(i8* %86, i32 125, i32 18)
%88 = load i8*, i8** %3
%89 = call i32 @fc8151_write(i8* %88, i32 132, i32 0)
%90 = load i8*, i8** %3
%91 = call i32 @fc8151_write(i8* %90, i32 133, i32 8)
%92 = load i8*, i8** %3
%93 = call i32 @fc8151_write(i8* %92, i32 134, i32 0)
%94 = load i8*, i8** %3
%95 = call i32 @fc8151_write(i8* %94, i32 135, i32 8)
%96 = load i8*, i8** %3
%97 = call i32 @fc8151_write(i8* %96, i32 136, i32 0)
%98 = load i8*, i8** %3
%99 = call i32 @fc8151_write(i8* %98, i32 137, i32 8)
%100 = load i8*, i8** %3
%101 = call i32 @fc8151_write(i8* %100, i32 138, i32 0)
%102 = load i8*, i8** %3
%103 = call i32 @fc8151_write(i8* %102, i32 139, i32 8)
%104 = load i8*, i8** %3
%105 = call i32 @fc8151_write(i8* %104, i32 140, i32 0)
%106 = load i8*, i8** %3
%107 = call i32 @fc8151_write(i8* %106, i32 141, i32 29)
%108 = load i8*, i8** %3
%109 = call i32 @fc8151_write(i8* %108, i32 142, i32 19)
%110 = load i8*, i8** %3
%111 = call i32 @fc8151_write(i8* %110, i32 143, i32 29)
%112 = load i8*, i8** %3
%113 = call i32 @fc8151_write(i8* %112, i32 144, i32 19)
%114 = load i8*, i8** %3
%115 = call i32 @fc8151_write(i8* %114, i32 145, i32 29)
%116 = load i8*, i8** %3
%117 = call i32 @fc8151_write(i8* %116, i32 146, i32 19)
%118 = load i8*, i8** %3
%119 = call i32 @fc8151_write(i8* %118, i32 147, i32 29)
%120 = load i8*, i8** %3
%121 = call i32 @fc8151_write(i8* %120, i32 128, i32 31)
%122 = load i8*, i8** %3
%123 = call i32 @fc8151_write(i8* %122, i32 129, i32 10)
%124 = load i8*, i8** %3
%125 = call i32 @fc8151_write(i8* %124, i32 130, i32 64)
%126 = load i8*, i8** %3
%127 = call i32 @fc8151_write(i8* %126, i32 131, i32 10)
%128 = load i8*, i8** %3
%129 = call i32 @fc8151_write(i8* %128, i32 160, i32 192)
%130 = load i8*, i8** %3
%131 = call i32 @fc8151_write(i8* %130, i32 126, i32 127)
%132 = load i8*, i8** %3
%133 = call i32 @fc8151_write(i8* %132, i32 127, i32 127)
%134 = load i8*, i8** %3
%135 = call i32 @fc8151_write(i8* %134, i32 208, i32 10)
%136 = load i8*, i8** %3
%137 = call i32 @fc8151_write(i8* %136, i32 210, i32 40)
%138 = load i8*, i8** %3
%139 = call i32 @fc8151_write(i8* %138, i32 212, i32 40)
%140 = load i8*, i8** %3
%141 = call i32 @fc8151_write(i8* %140, i32 160, i32 23)
%142 = load i8*, i8** %3
%143 = call i32 @fc8151_write(i8* %142, i32 208, i32 0)
%144 = load i8*, i8** %3
%145 = call i32 @fc8151_write(i8* %144, i32 161, i32 29)
%146 = call i32 @msWait(i32 100)
%147 = load i8*, i8** %3
%148 = call i32 @fc8151_read(i8* %147, i32 214, i8* %5)
store i32 %148, i32* %7
%149 = load i8*, i8** %3
%150 = call i32 @fc8151_read(i8* %149, i32 216, i8* %6)
store i32 %150, i32* %7
%151 = load i8*, i8** %3
%152 = call i32 @fc8151_write(i8* %151, i32 160, i32 215)
%153 = load i8*, i8** %3
%154 = call i32 @fc8151_write(i8* %153, i32 208, i32 10)
%155 = load i8*, i8** %3
%156 = load i8, i8* %5
%157 = zext i8 %156 to i32
%158 = call i32 @fc8151_write(i8* %155, i32 126, i32 %157)
%159 = load i8*, i8** %3
%160 = load i8, i8* %6
%161 = zext i8 %160 to i32
%162 = call i32 @fc8151_write(i8* %159, i32 127, i32 %161)
%163 = load i8*, i8** %3
%164 = call i32 @fc8151_write(i8* %163, i32 160, i32 192)
%165 = load i8*, i8** %3
%166 = call i32 @fc8151_write(i8* %165, i32 161, i32 0)
%167 = load i32, i32* %7
ret i32 %167
}

LLVM IR (-O2):
@.str = [13 x i8] c"fc8151_init\0A\00"
define i32 @fc8151_tuner_init(i8* %0, i32 %1) {
%3 = alloca i8
%4 = alloca i8
%5 = tail call i32 @PRINTF(i8* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @fc8151_write(i8* %0, i32 0, i32 0)
%7 = tail call i32 @fc8151_write(i8* %0, i32 2, i32 129)
%8 = tail call i32 @fc8151_write(i8* %0, i32 19, i32 244)
%9 = tail call i32 @fc8151_write(i8* %0, i32 48, i32 10)
%10 = tail call i32 @fc8151_write(i8* %0, i32 59, i32 1)
%11 = tail call i32 @fc8151_set_filter(i8* %0)
%12 = tail call i32 @fc8151_write(i8* %0, i32 59, i32 0)
%13 = tail call i32 @fc8151_write(i8* %0, i32 52, i32 104)
%14 = tail call i32 @fc8151_write(i8* %0, i32 54, i32 255)
%15 = tail call i32 @fc8151_write(i8* %0, i32 55, i32 255)
%16 = tail call i32 @fc8151_write(i8* %0, i32 57, i32 17)
%17 = tail call i32 @fc8151_write(i8* %0, i32 58, i32 0)
%18 = tail call i32 @fc8151_write(i8* %0, i32 82, i32 32)
%19 = tail call i32 @fc8151_write(i8* %0, i32 83, i32 95)
%20 = tail call i32 @fc8151_write(i8* %0, i32 84, i32 0)
%21 = tail call i32 @fc8151_write(i8* %0, i32 94, i32 0)
%22 = tail call i32 @fc8151_write(i8* %0, i32 99, i32 48)
%23 = tail call i32 @fc8151_write(i8* %0, i32 86, i32 15)
%24 = tail call i32 @fc8151_write(i8* %0, i32 87, i32 31)
%25 = tail call i32 @fc8151_write(i8* %0, i32 88, i32 9)
%26 = tail call i32 @fc8151_write(i8* %0, i32 89, i32 94)
%27 = tail call i32 @fc8151_write(i8* %0, i32 41, i32 0)
%28 = tail call i32 @fc8151_write(i8* %0, i32 148, i32 0)
%29 = tail call i32 @fc8151_write(i8* %0, i32 149, i32 1)
%30 = tail call i32 @fc8151_write(i8* %0, i32 150, i32 17)
%31 = tail call i32 @fc8151_write(i8* %0, i32 151, i32 33)
%32 = tail call i32 @fc8151_write(i8* %0, i32 152, i32 49)
%33 = tail call i32 @fc8151_write(i8* %0, i32 153, i32 50)
%34 = tail call i32 @fc8151_write(i8* %0, i32 154, i32 66)
%35 = tail call i32 @fc8151_write(i8* %0, i32 155, i32 82)
%36 = tail call i32 @fc8151_write(i8* %0, i32 156, i32 83)
%37 = tail call i32 @fc8151_write(i8* %0, i32 157, i32 99)
%38 = tail call i32 @fc8151_write(i8* %0, i32 158, i32 99)
%39 = tail call i32 @fc8151_write(i8* %0, i32 159, i32 99)
%40 = tail call i32 @fc8151_write(i8* %0, i32 121, i32 42)
%41 = tail call i32 @fc8151_write(i8* %0, i32 122, i32 36)
%42 = tail call i32 @fc8151_write(i8* %0, i32 123, i32 255)
%43 = tail call i32 @fc8151_write(i8* %0, i32 124, i32 22)
%44 = tail call i32 @fc8151_write(i8* %0, i32 125, i32 18)
%45 = tail call i32 @fc8151_write(i8* %0, i32 132, i32 0)
%46 = tail call i32 @fc8151_write(i8* %0, i32 133, i32 8)
%47 = tail call i32 @fc8151_write(i8* %0, i32 134, i32 0)
%48 = tail call i32 @fc8151_write(i8* %0, i32 135, i32 8)
%49 = tail call i32 @fc8151_write(i8* %0, i32 136, i32 0)
%50 = tail call i32 @fc8151_write(i8* %0, i32 137, i32 8)
%51 = tail call i32 @fc8151_write(i8* %0, i32 138, i32 0)
%52 = tail call i32 @fc8151_write(i8* %0, i32 139, i32 8)
%53 = tail call i32 @fc8151_write(i8* %0, i32 140, i32 0)
%54 = tail call i32 @fc8151_write(i8* %0, i32 141, i32 29)
%55 = tail call i32 @fc8151_write(i8* %0, i32 142, i32 19)
%56 = tail call i32 @fc8151_write(i8* %0, i32 143, i32 29)
%57 = tail call i32 @fc8151_write(i8* %0, i32 144, i32 19)
%58 = tail call i32 @fc8151_write(i8* %0, i32 145, i32 29)
%59 = tail call i32 @fc8151_write(i8* %0, i32 146, i32 19)
%60 = tail call i32 @fc8151_write(i8* %0, i32 147, i32 29)
%61 = tail call i32 @fc8151_write(i8* %0, i32 128, i32 31)
%62 = tail call i32 @fc8151_write(i8* %0, i32 129, i32 10)
%63 = tail call i32 @fc8151_write(i8* %0, i32 130, i32 64)
%64 = tail call i32 @fc8151_write(i8* %0, i32 131, i32 10)
%65 = tail call i32 @fc8151_write(i8* %0, i32 160, i32 192)
%66 = tail call i32 @fc8151_write(i8* %0, i32 126, i32 127)
%67 = tail call i32 @fc8151_write(i8* %0, i32 127, i32 127)
%68 = tail call i32 @fc8151_write(i8* %0, i32 208, i32 10)
%69 = tail call i32 @fc8151_write(i8* %0, i32 210, i32 40)
%70 = tail call i32 @fc8151_write(i8* %0, i32 212, i32 40)
%71 = tail call i32 @fc8151_write(i8* %0, i32 160, i32 23)
%72 = tail call i32 @fc8151_write(i8* %0, i32 208, i32 0)
%73 = tail call i32 @fc8151_write(i8* %0, i32 161, i32 29)
%74 = tail call i32 @msWait(i32 100)
%75 = call i32 @fc8151_read(i8* %0, i32 214, i8* %3)
%76 = call i32 @fc8151_read(i8* %0, i32 216, i8* %4)
%77 = call i32 @fc8151_write(i8* %0, i32 160, i32 215)
%78 = call i32 @fc8151_write(i8* %0, i32 208, i32 10)
%79 = load i8, i8* %3
%80 = zext i8 %79 to i32
%81 = call i32 @fc8151_write(i8* %0, i32 126, i32 %80)
%82 = load i8, i8* %4
%83 = zext i8 %82 to i32
%84 = call i32 @fc8151_write(i8* %0, i32 127, i32 %83)
%85 = call i32 @fc8151_write(i8* %0, i32 160, i32 192)
%86 = call i32 @fc8151_write(i8* %0, i32 161, i32 0)
ret i32 %76
}