#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*/ fc8080_read(void *, int, unsigned char *);
int /*<<< orphan*/ fc8080_set_filter(void *);
int /*<<< orphan*/ fc8080_write(void *, int, int);
int fc8080_tuner_init(void *handle, unsigned int band) {
  int i;
  int n_rfagc_pd1_avg, n_rfagc_pd2_avg;
  unsigned char rfagc_pd2[6], rfagc_pd2_avg, rfagc_pd2_max, rfagc_pd2_min;
  unsigned char rfagc_pd1[6], rfagc_pd1_avg, rfagc_pd1_max, rfagc_pd1_min;
  fc8080_write(handle, 0x00, 0x00);
  fc8080_write(handle, 0x02, 0x11);
  fc8080_set_filter(handle);
  fc8080_write(handle, 0xb3, 0x78);
  fc8080_write(handle, 0x9c, 0x00);
  fc8080_write(handle, 0x9d, 0x01);
  fc8080_write(handle, 0x9e, 0x02);
  fc8080_write(handle, 0x9f, 0x0a);
  fc8080_write(handle, 0xa0, 0x2a);
  fc8080_write(handle, 0xa1, 0x32);
  fc8080_write(handle, 0xa2, 0x52);
  fc8080_write(handle, 0xa3, 0x56);
  fc8080_write(handle, 0xa4, 0x76);
  fc8080_write(handle, 0xa5, 0x7e);
  fc8080_write(handle, 0xa6, 0x7f);
  fc8080_write(handle, 0xa7, 0x9f);
  fc8080_write(handle, 0xa8, 0xc0);
  fc8080_write(handle, 0xd0, 0x00);
  rfagc_pd1[0] = 0;
  rfagc_pd1[1] = 0;
  rfagc_pd1[2] = 0;
  rfagc_pd1[3] = 0;
  rfagc_pd1[4] = 0;
  rfagc_pd1[5] = 0;
  rfagc_pd1_max = 0;
  rfagc_pd1_min = 255;
  for (i = 0; i < 6; i++) {
    fc8080_read(handle, 0xd8, &rfagc_pd1[i]);
    if (rfagc_pd1[i] >= rfagc_pd1_max)
      rfagc_pd1_max = rfagc_pd1[i];
    if (rfagc_pd1[i] <= rfagc_pd1_min)
      rfagc_pd1_min = rfagc_pd1[i];
  }
  n_rfagc_pd1_avg =
      (rfagc_pd1[0] + rfagc_pd1[1] + rfagc_pd1[2] + rfagc_pd1[3] +
       rfagc_pd1[4] + rfagc_pd1[5] - rfagc_pd1_max - rfagc_pd1_min) /
      4;
  rfagc_pd1_avg = (unsigned char)n_rfagc_pd1_avg;
  fc8080_write(handle, 0x7f, rfagc_pd1_avg);
  rfagc_pd2[0] = 0;
  rfagc_pd2[1] = 0;
  rfagc_pd2[2] = 0;
  rfagc_pd2[3] = 0;
  rfagc_pd2[4] = 0;
  rfagc_pd2[5] = 0;
  rfagc_pd2_max = 0;
  rfagc_pd2_min = 255;
  for (i = 0; i < 6; i++) {
    fc8080_read(handle, 0xd6, &rfagc_pd2[i]);
    if (rfagc_pd2[i] >= rfagc_pd2_max)
      rfagc_pd2_max = rfagc_pd2[i];
    if (rfagc_pd2[i] <= rfagc_pd2_min)
      rfagc_pd2_min = rfagc_pd2[i];
  }
  n_rfagc_pd2_avg =
      (rfagc_pd2[0] + rfagc_pd2[1] + rfagc_pd2[2] + rfagc_pd2[3] +
       rfagc_pd2[4] + rfagc_pd2[5] - rfagc_pd2_max - rfagc_pd2_min) /
      4;
  rfagc_pd2_avg = (unsigned char)n_rfagc_pd2_avg;
  fc8080_write(handle, 0x7e, rfagc_pd2_avg);
  fc8080_write(handle, 0x79, 0x26);
  fc8080_write(handle, 0x7a, 0x21);
  fc8080_write(handle, 0x7b, 0xff);
  fc8080_write(handle, 0x7c, 0x1b);
  fc8080_write(handle, 0x7d, 0x18);
  fc8080_write(handle, 0x84, 0x00);
  fc8080_write(handle, 0x85, 0x0d);
  fc8080_write(handle, 0x86, 0x00);
  fc8080_write(handle, 0x87, 0x10);
  fc8080_write(handle, 0x88, 0x00);
  fc8080_write(handle, 0x89, 0x0e);
  fc8080_write(handle, 0x8a, 0x00);
  fc8080_write(handle, 0x8b, 0x0e);
  fc8080_write(handle, 0x8c, 0x03);
  fc8080_write(handle, 0x8d, 0x10);
  fc8080_write(handle, 0x8e, 0x00);
  fc8080_write(handle, 0x8f, 0x10);
  fc8080_write(handle, 0x90, 0x04);
  fc8080_write(handle, 0x91, 0x10);
  fc8080_write(handle, 0x92, 0x00);
  fc8080_write(handle, 0x93, 0x00);
  fc8080_write(handle, 0x94, 0x00);
  fc8080_write(handle, 0x95, 0x0e);
  fc8080_write(handle, 0x96, 0x00);
  fc8080_write(handle, 0x97, 0x0e);
  fc8080_write(handle, 0x98, 0x00);
  fc8080_write(handle, 0x99, 0x0e);
  fc8080_write(handle, 0x9a, 0x00);
  fc8080_write(handle, 0x9b, 0x0e);
  fc8080_write(handle, 0x80, 0x3d);
  fc8080_write(handle, 0x81, 0x20);
  fc8080_write(handle, 0x82, 0x25);
  fc8080_write(handle, 0x83, 0x0a);
  fc8080_write(handle, 0xd0, 0x00);
  fc8080_write(handle, 0xd2, 0x28);
  fc8080_write(handle, 0xd4, 0x44);
  fc8080_write(handle, 0xae, 0x36);
  fc8080_write(handle, 0xad, 0x8b);
  fc8080_write(handle, 0x14, 0x63);
  fc8080_write(handle, 0x15, 0x02);
  fc8080_write(handle, 0x18, 0x43);
  fc8080_write(handle, 0x19, 0x21);
  fc8080_write(handle, 0x27, 0x82);
  fc8080_write(handle, 0x28, 0x33);
  fc8080_write(handle, 0x33, 0x43);
  fc8080_write(handle, 0x34, 0x41);
  fc8080_write(handle, 0x53, 0x41);
  fc8080_write(handle, 0x54, 0x01);
  fc8080_write(handle, 0x66, 0xf6);
  fc8080_write(handle, 0xaf, 0x14);
  fc8080_write(handle, 0xb6, 0x00);
  fc8080_write(handle, 0xb8, 0xb0);
  fc8080_write(handle, 0xb9, 0xc4);
  return 0;
}


x86 assembly (clang, -O0):
<fc8080_tuner_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
mov    $0x11,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fc8080_set_filter@plt>
mov    -0x8(%rbp),%rdi
mov    $0xb3,%esi
mov    $0x78,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9c,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9d,%esi
mov    $0x1,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9e,%esi
mov    $0x2,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9f,%esi
mov    $0xa,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa0,%esi
mov    $0x2a,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa1,%esi
mov    $0x32,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa2,%esi
mov    $0x52,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa3,%esi
mov    $0x56,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa4,%esi
mov    $0x76,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa5,%esi
mov    $0x7e,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa6,%esi
mov    $0x7f,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa7,%esi
mov    $0x9f,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa8,%esi
mov    $0xc0,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xd0,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
movb   $0x0,-0x27(%rbp)
movb   $0x0,-0x26(%rbp)
movb   $0x0,-0x25(%rbp)
movb   $0x0,-0x24(%rbp)
movb   $0x0,-0x23(%rbp)
movb   $0x0,-0x22(%rbp)
movb   $0x0,-0x29(%rbp)
movb   $0xff,-0x2a(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jge    131c <fc8080_tuner_init+0x1ec>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
lea    -0x27(%rbp),%rdx
add    %rax,%rdx
mov    $0xd8,%esi
call   1050 <fc8080_read@plt>
movslq -0x10(%rbp),%rax
movzbl -0x27(%rbp,%rax,1),%eax
movzbl -0x29(%rbp),%ecx
cmp    %ecx,%eax
jl     12e9 <fc8080_tuner_init+0x1b9>
movslq -0x10(%rbp),%rax
mov    -0x27(%rbp,%rax,1),%al
mov    %al,-0x29(%rbp)
movslq -0x10(%rbp),%rax
movzbl -0x27(%rbp,%rax,1),%eax
movzbl -0x2a(%rbp),%ecx
cmp    %ecx,%eax
jg     1309 <fc8080_tuner_init+0x1d9>
movslq -0x10(%rbp),%rax
mov    -0x27(%rbp,%rax,1),%al
mov    %al,-0x2a(%rbp)
jmp    130e <fc8080_tuner_init+0x1de>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12a6 <fc8080_tuner_init+0x176>
movzbl -0x27(%rbp),%eax
movzbl -0x26(%rbp),%ecx
add    %ecx,%eax
movzbl -0x25(%rbp),%ecx
add    %ecx,%eax
movzbl -0x24(%rbp),%ecx
add    %ecx,%eax
movzbl -0x23(%rbp),%ecx
add    %ecx,%eax
movzbl -0x22(%rbp),%ecx
add    %ecx,%eax
movzbl -0x29(%rbp),%ecx
sub    %ecx,%eax
movzbl -0x2a(%rbp),%ecx
sub    %ecx,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0x28(%rbp),%edx
mov    $0x7f,%esi
call   1030 <fc8080_write@plt>
movb   $0x0,-0x1e(%rbp)
movb   $0x0,-0x1d(%rbp)
movb   $0x0,-0x1c(%rbp)
movb   $0x0,-0x1b(%rbp)
movb   $0x0,-0x1a(%rbp)
movb   $0x0,-0x19(%rbp)
movb   $0x0,-0x20(%rbp)
movb   $0xff,-0x21(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jge    140a <fc8080_tuner_init+0x2da>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
lea    -0x1e(%rbp),%rdx
add    %rax,%rdx
mov    $0xd6,%esi
call   1050 <fc8080_read@plt>
movslq -0x10(%rbp),%rax
movzbl -0x1e(%rbp,%rax,1),%eax
movzbl -0x20(%rbp),%ecx
cmp    %ecx,%eax
jl     13d7 <fc8080_tuner_init+0x2a7>
movslq -0x10(%rbp),%rax
mov    -0x1e(%rbp,%rax,1),%al
mov    %al,-0x20(%rbp)
movslq -0x10(%rbp),%rax
movzbl -0x1e(%rbp,%rax,1),%eax
movzbl -0x21(%rbp),%ecx
cmp    %ecx,%eax
jg     13f7 <fc8080_tuner_init+0x2c7>
movslq -0x10(%rbp),%rax
mov    -0x1e(%rbp,%rax,1),%al
mov    %al,-0x21(%rbp)
jmp    13fc <fc8080_tuner_init+0x2cc>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1394 <fc8080_tuner_init+0x264>
movzbl -0x1e(%rbp),%eax
movzbl -0x1d(%rbp),%ecx
add    %ecx,%eax
movzbl -0x1c(%rbp),%ecx
add    %ecx,%eax
movzbl -0x1b(%rbp),%ecx
add    %ecx,%eax
movzbl -0x1a(%rbp),%ecx
add    %ecx,%eax
movzbl -0x19(%rbp),%ecx
add    %ecx,%eax
movzbl -0x20(%rbp),%ecx
sub    %ecx,%eax
movzbl -0x21(%rbp),%ecx
sub    %ecx,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %al,-0x1f(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0x1f(%rbp),%edx
mov    $0x7e,%esi
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x79,%esi
mov    $0x26,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x7a,%esi
mov    $0x21,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x7b,%esi
mov    $0xff,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x7c,%esi
mov    $0x1b,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x7d,%esi
mov    $0x18,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x84,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x85,%esi
mov    $0xd,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x86,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x87,%esi
mov    $0x10,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x88,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x89,%esi
mov    $0xe,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8a,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8b,%esi
mov    $0xe,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8c,%esi
mov    $0x3,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8d,%esi
mov    $0x10,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8e,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8f,%esi
mov    $0x10,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x90,%esi
mov    $0x4,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x91,%esi
mov    $0x10,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x92,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x93,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x94,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x95,%esi
mov    $0xe,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x96,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x97,%esi
mov    $0xe,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x98,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x99,%esi
mov    $0xe,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9a,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x9b,%esi
mov    $0xe,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x80,%esi
mov    $0x3d,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x81,%esi
mov    $0x20,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x82,%esi
mov    $0x25,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x83,%esi
mov    $0xa,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xd0,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xd2,%esi
mov    $0x28,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xd4,%esi
mov    $0x44,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xae,%esi
mov    $0x36,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xad,%esi
mov    $0x8b,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x14,%esi
mov    $0x63,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x15,%esi
mov    $0x2,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x18,%esi
mov    $0x43,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x19,%esi
mov    $0x21,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x27,%esi
mov    $0x82,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x28,%esi
mov    $0x33,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x33,%esi
mov    $0x43,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x34,%esi
mov    $0x41,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x53,%esi
mov    $0x41,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x54,%esi
mov    $0x1,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x66,%esi
mov    $0xf6,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xaf,%esi
mov    $0x14,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xb6,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xb8,%esi
mov    $0xb0,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xb9,%esi
mov    $0xc4,%edx
call   1030 <fc8080_write@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8080_tuner_init>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
xor    %esi,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x11,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
call   1040 <fc8080_set_filter@plt>
mov    %rbx,%rdi
mov    $0xb3,%esi
mov    $0x78,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x9c,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x9d,%esi
mov    $0x1,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x9e,%esi
mov    $0x2,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x9f,%esi
mov    $0xa,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xa0,%esi
mov    $0x2a,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xa1,%esi
mov    $0x32,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xa2,%esi
mov    $0x52,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xa3,%esi
mov    $0x56,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xa4,%esi
mov    $0x76,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xa5,%esi
mov    $0x7e,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xa6,%esi
mov    $0x7f,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xa7,%esi
mov    $0x9f,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xa8,%esi
mov    $0xc0,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xd0,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
lea    0x9(%rsp),%rbp
lea    0xa(%rsp),%r13
lea    0xb(%rsp),%r12
movl   $0x0,0x8(%rsp)
movw   $0x0,0xc(%rsp)
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
mov    $0xd8,%esi
call   1050 <fc8080_read@plt>
mov    0x8(%rsp),%r15d
mov    %rbx,%rdi
mov    $0xd8,%esi
mov    %rbp,%rdx
call   1050 <fc8080_read@plt>
movzbl 0x9(%rsp),%ebp
cmp    %r15b,%bpl
mov    %ebp,%r14d
cmovb  %r15d,%r14d
cmova  %r15d,%ebp
mov    %rbx,%rdi
mov    $0xd8,%esi
mov    %r13,%rdx
call   1050 <fc8080_read@plt>
movzbl 0xa(%rsp),%eax
cmp    %r14b,%al
cmovae %eax,%r14d
cmp    %bpl,%al
cmovbe %eax,%ebp
mov    %rbx,%rdi
mov    $0xd8,%esi
mov    %r12,%rdx
call   1050 <fc8080_read@plt>
movzbl 0xb(%rsp),%eax
cmp    %r14b,%al
cmovae %eax,%r14d
cmp    %bpl,%al
cmovbe %eax,%ebp
mov    %rbx,%rdi
mov    $0xd8,%esi
lea    0xc(%rsp),%rdx
call   1050 <fc8080_read@plt>
mov    0xc(%rsp),%eax
cmp    %r14b,%al
cmovae %eax,%r14d
cmp    %bpl,%al
cmovbe %eax,%ebp
mov    %rbx,%rdi
mov    $0xd8,%esi
lea    0xd(%rsp),%rdx
call   1050 <fc8080_read@plt>
movzbl 0xd(%rsp),%eax
cmp    %r14b,%al
cmovae %eax,%r14d
cmp    %bpl,%al
cmovbe %eax,%ebp
movzbl 0x8(%rsp),%ecx
movzbl 0x9(%rsp),%edx
movzbl 0xa(%rsp),%esi
movzbl 0xb(%rsp),%r9d
movzbl 0xc(%rsp),%r8d
movzbl %r14b,%edi
movzbl %bpl,%ebp
add    %edi,%ebp
sub    %ebp,%ecx
add    %edx,%ecx
add    %esi,%ecx
add    %r9d,%ecx
add    %r8d,%ecx
lea    (%rax,%rcx,1),%edx
add    $0x3,%edx
add    %eax,%ecx
test   %cx,%cx
cmovns %ecx,%edx
shr    $0x2,%edx
movzbl %dl,%edx
mov    %rbx,%rdi
mov    $0x7f,%esi
call   1030 <fc8080_write@plt>
lea    0x11(%rsp),%rbp
lea    0x12(%rsp),%r13
lea    0x13(%rsp),%r12
movl   $0x0,0x10(%rsp)
movw   $0x0,0x14(%rsp)
lea    0x10(%rsp),%rdx
mov    %rbx,%rdi
mov    $0xd6,%esi
call   1050 <fc8080_read@plt>
mov    0x10(%rsp),%r15d
mov    %rbx,%rdi
mov    $0xd6,%esi
mov    %rbp,%rdx
call   1050 <fc8080_read@plt>
movzbl 0x11(%rsp),%ebp
cmp    %r15b,%bpl
mov    %ebp,%r14d
cmovb  %r15d,%r14d
cmova  %r15d,%ebp
mov    %rbx,%rdi
mov    $0xd6,%esi
mov    %r13,%rdx
call   1050 <fc8080_read@plt>
movzbl 0x12(%rsp),%eax
cmp    %r14b,%al
cmovae %eax,%r14d
cmp    %bpl,%al
cmovbe %eax,%ebp
mov    %rbx,%rdi
mov    $0xd6,%esi
mov    %r12,%rdx
call   1050 <fc8080_read@plt>
movzbl 0x13(%rsp),%eax
cmp    %r14b,%al
cmovae %eax,%r14d
cmp    %bpl,%al
cmovbe %eax,%ebp
mov    %rbx,%rdi
mov    $0xd6,%esi
lea    0x14(%rsp),%rdx
call   1050 <fc8080_read@plt>
mov    0x14(%rsp),%eax
cmp    %r14b,%al
cmovae %eax,%r14d
cmp    %bpl,%al
cmovbe %eax,%ebp
mov    %rbx,%rdi
mov    $0xd6,%esi
lea    0x15(%rsp),%rdx
call   1050 <fc8080_read@plt>
movzbl 0x15(%rsp),%eax
cmp    %r14b,%al
cmovae %eax,%r14d
cmp    %bpl,%al
cmovbe %eax,%ebp
movzbl 0x10(%rsp),%ecx
movzbl 0x11(%rsp),%edx
movzbl 0x12(%rsp),%esi
movzbl 0x13(%rsp),%r9d
movzbl 0x14(%rsp),%r8d
movzbl %r14b,%edi
movzbl %bpl,%ebp
add    %edi,%ebp
sub    %ebp,%ecx
add    %edx,%ecx
add    %esi,%ecx
add    %r9d,%ecx
add    %r8d,%ecx
lea    (%rax,%rcx,1),%edx
add    $0x3,%edx
add    %eax,%ecx
test   %cx,%cx
cmovns %ecx,%edx
shr    $0x2,%edx
movzbl %dl,%edx
mov    %rbx,%rdi
mov    $0x7e,%esi
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x79,%esi
mov    $0x26,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x7a,%esi
mov    $0x21,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x7b,%esi
mov    $0xff,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x7c,%esi
mov    $0x1b,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x7d,%esi
mov    $0x18,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x84,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x85,%esi
mov    $0xd,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x86,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x87,%esi
mov    $0x10,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x88,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x89,%esi
mov    $0xe,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x8a,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x8b,%esi
mov    $0xe,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x8c,%esi
mov    $0x3,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x8d,%esi
mov    $0x10,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x8e,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x8f,%esi
mov    $0x10,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x90,%esi
mov    $0x4,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x91,%esi
mov    $0x10,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x92,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x93,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x94,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x95,%esi
mov    $0xe,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x96,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x97,%esi
mov    $0xe,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x98,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x99,%esi
mov    $0xe,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x9a,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x9b,%esi
mov    $0xe,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x80,%esi
mov    $0x3d,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x81,%esi
mov    $0x20,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x82,%esi
mov    $0x25,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x83,%esi
mov    $0xa,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xd0,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xd2,%esi
mov    $0x28,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xd4,%esi
mov    $0x44,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xae,%esi
mov    $0x36,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xad,%esi
mov    $0x8b,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
mov    $0x63,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x15,%esi
mov    $0x2,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x18,%esi
mov    $0x43,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x19,%esi
mov    $0x21,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x27,%esi
mov    $0x82,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x28,%esi
mov    $0x33,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x33,%esi
mov    $0x43,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x34,%esi
mov    $0x41,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x53,%esi
mov    $0x41,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x54,%esi
mov    $0x1,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x66,%esi
mov    $0xf6,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xaf,%esi
mov    $0x14,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xb6,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xb8,%esi
mov    $0xb0,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0xb9,%esi
mov    $0xc4,%edx
call   1030 <fc8080_write@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fc8080_tuner_init(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [6 x i8]
%9 = alloca i8
%10 = alloca i8
%11 = alloca i8
%12 = alloca [6 x i8]
%13 = alloca i8
%14 = alloca i8
%15 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
%16 = load i8*, i8** %3
%17 = call i32 @fc8080_write(i8* %16, i32 0, i32 0)
%18 = load i8*, i8** %3
%19 = call i32 @fc8080_write(i8* %18, i32 2, i32 17)
%20 = load i8*, i8** %3
%21 = call i32 @fc8080_set_filter(i8* %20)
%22 = load i8*, i8** %3
%23 = call i32 @fc8080_write(i8* %22, i32 179, i32 120)
%24 = load i8*, i8** %3
%25 = call i32 @fc8080_write(i8* %24, i32 156, i32 0)
%26 = load i8*, i8** %3
%27 = call i32 @fc8080_write(i8* %26, i32 157, i32 1)
%28 = load i8*, i8** %3
%29 = call i32 @fc8080_write(i8* %28, i32 158, i32 2)
%30 = load i8*, i8** %3
%31 = call i32 @fc8080_write(i8* %30, i32 159, i32 10)
%32 = load i8*, i8** %3
%33 = call i32 @fc8080_write(i8* %32, i32 160, i32 42)
%34 = load i8*, i8** %3
%35 = call i32 @fc8080_write(i8* %34, i32 161, i32 50)
%36 = load i8*, i8** %3
%37 = call i32 @fc8080_write(i8* %36, i32 162, i32 82)
%38 = load i8*, i8** %3
%39 = call i32 @fc8080_write(i8* %38, i32 163, i32 86)
%40 = load i8*, i8** %3
%41 = call i32 @fc8080_write(i8* %40, i32 164, i32 118)
%42 = load i8*, i8** %3
%43 = call i32 @fc8080_write(i8* %42, i32 165, i32 126)
%44 = load i8*, i8** %3
%45 = call i32 @fc8080_write(i8* %44, i32 166, i32 127)
%46 = load i8*, i8** %3
%47 = call i32 @fc8080_write(i8* %46, i32 167, i32 159)
%48 = load i8*, i8** %3
%49 = call i32 @fc8080_write(i8* %48, i32 168, i32 192)
%50 = load i8*, i8** %3
%51 = call i32 @fc8080_write(i8* %50, i32 208, i32 0)
%52 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 0
store i8 0, i8* %52
%53 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 1
store i8 0, i8* %53
%54 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 2
store i8 0, i8* %54
%55 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 3
store i8 0, i8* %55
%56 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 4
store i8 0, i8* %56
%57 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 5
store i8 0, i8* %57
store i8 0, i8* %14
store i8 -1, i8* %15
store i32 0, i32* %5
br label %58
58: ; preds = %95, %2
%59 = load i32, i32* %5
%60 = icmp slt i32 %59, 6
br i1 %60, label %61, label %98
61: ; preds = %58
%62 = load i8*, i8** %3
%63 = load i32, i32* %5
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 %64
%66 = call i32 @fc8080_read(i8* %62, i32 216, i8* %65)
%67 = load i32, i32* %5
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 %68
%70 = load i8, i8* %69
%71 = zext i8 %70 to i32
%72 = load i8, i8* %14
%73 = zext i8 %72 to i32
%74 = icmp sge i32 %71, %73
br i1 %74, label %75, label %80
75: ; preds = %61
%76 = load i32, i32* %5
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 %77
%79 = load i8, i8* %78
store i8 %79, i8* %14
br label %80
80: ; preds = %75, %61
%81 = load i32, i32* %5
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 %82
%84 = load i8, i8* %83
%85 = zext i8 %84 to i32
%86 = load i8, i8* %15
%87 = zext i8 %86 to i32
%88 = icmp sle i32 %85, %87
br i1 %88, label %89, label %94
89: ; preds = %80
%90 = load i32, i32* %5
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 %91
%93 = load i8, i8* %92
store i8 %93, i8* %15
br label %94
94: ; preds = %89, %80
br label %95
95: ; preds = %94
%96 = load i32, i32* %5
%97 = add nsw i32 %96, 1
store i32 %97, i32* %5
br label %58
98: ; preds = %58
%99 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 0
%100 = load i8, i8* %99
%101 = zext i8 %100 to i32
%102 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 1
%103 = load i8, i8* %102
%104 = zext i8 %103 to i32
%105 = add nsw i32 %101, %104
%106 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 2
%107 = load i8, i8* %106
%108 = zext i8 %107 to i32
%109 = add nsw i32 %105, %108
%110 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 3
%111 = load i8, i8* %110
%112 = zext i8 %111 to i32
%113 = add nsw i32 %109, %112
%114 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 4
%115 = load i8, i8* %114
%116 = zext i8 %115 to i32
%117 = add nsw i32 %113, %116
%118 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 5
%119 = load i8, i8* %118
%120 = zext i8 %119 to i32
%121 = add nsw i32 %117, %120
%122 = load i8, i8* %14
%123 = zext i8 %122 to i32
%124 = sub nsw i32 %121, %123
%125 = load i8, i8* %15
%126 = zext i8 %125 to i32
%127 = sub nsw i32 %124, %126
%128 = sdiv i32 %127, 4
store i32 %128, i32* %6
%129 = load i32, i32* %6
%130 = trunc i32 %129 to i8
store i8 %130, i8* %13
%131 = load i8*, i8** %3
%132 = load i8, i8* %13
%133 = zext i8 %132 to i32
%134 = call i32 @fc8080_write(i8* %131, i32 127, i32 %133)
%135 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
store i8 0, i8* %135
%136 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 1
store i8 0, i8* %136
%137 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 2
store i8 0, i8* %137
%138 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 3
store i8 0, i8* %138
%139 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 4
store i8 0, i8* %139
%140 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 5
store i8 0, i8* %140
store i8 0, i8* %10
store i8 -1, i8* %11
store i32 0, i32* %5
br label %141
141: ; preds = %178, %98
%142 = load i32, i32* %5
%143 = icmp slt i32 %142, 6
br i1 %143, label %144, label %181
144: ; preds = %141
%145 = load i8*, i8** %3
%146 = load i32, i32* %5
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 %147
%149 = call i32 @fc8080_read(i8* %145, i32 214, i8* %148)
%150 = load i32, i32* %5
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 %151
%153 = load i8, i8* %152
%154 = zext i8 %153 to i32
%155 = load i8, i8* %10
%156 = zext i8 %155 to i32
%157 = icmp sge i32 %154, %156
br i1 %157, label %158, label %163
158: ; preds = %144
%159 = load i32, i32* %5
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 %160
%162 = load i8, i8* %161
store i8 %162, i8* %10
br label %163
163: ; preds = %158, %144
%164 = load i32, i32* %5
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 %165
%167 = load i8, i8* %166
%168 = zext i8 %167 to i32
%169 = load i8, i8* %11
%170 = zext i8 %169 to i32
%171 = icmp sle i32 %168, %170
br i1 %171, label %172, label %177
172: ; preds = %163
%173 = load i32, i32* %5
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 %174
%176 = load i8, i8* %175
store i8 %176, i8* %11
br label %177
177: ; preds = %172, %163
br label %178
178: ; preds = %177
%179 = load i32, i32* %5
%180 = add nsw i32 %179, 1
store i32 %180, i32* %5
br label %141
181: ; preds = %141
%182 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%183 = load i8, i8* %182
%184 = zext i8 %183 to i32
%185 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 1
%186 = load i8, i8* %185
%187 = zext i8 %186 to i32
%188 = add nsw i32 %184, %187
%189 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 2
%190 = load i8, i8* %189
%191 = zext i8 %190 to i32
%192 = add nsw i32 %188, %191
%193 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 3
%194 = load i8, i8* %193
%195 = zext i8 %194 to i32
%196 = add nsw i32 %192, %195
%197 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 4
%198 = load i8, i8* %197
%199 = zext i8 %198 to i32
%200 = add nsw i32 %196, %199
%201 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 5
%202 = load i8, i8* %201
%203 = zext i8 %202 to i32
%204 = add nsw i32 %200, %203
%205 = load i8, i8* %10
%206 = zext i8 %205 to i32
%207 = sub nsw i32 %204, %206
%208 = load i8, i8* %11
%209 = zext i8 %208 to i32
%210 = sub nsw i32 %207, %209
%211 = sdiv i32 %210, 4
store i32 %211, i32* %7
%212 = load i32, i32* %7
%213 = trunc i32 %212 to i8
store i8 %213, i8* %9
%214 = load i8*, i8** %3
%215 = load i8, i8* %9
%216 = zext i8 %215 to i32
%217 = call i32 @fc8080_write(i8* %214, i32 126, i32 %216)
%218 = load i8*, i8** %3
%219 = call i32 @fc8080_write(i8* %218, i32 121, i32 38)
%220 = load i8*, i8** %3
%221 = call i32 @fc8080_write(i8* %220, i32 122, i32 33)
%222 = load i8*, i8** %3
%223 = call i32 @fc8080_write(i8* %222, i32 123, i32 255)
%224 = load i8*, i8** %3
%225 = call i32 @fc8080_write(i8* %224, i32 124, i32 27)
%226 = load i8*, i8** %3
%227 = call i32 @fc8080_write(i8* %226, i32 125, i32 24)
%228 = load i8*, i8** %3
%229 = call i32 @fc8080_write(i8* %228, i32 132, i32 0)
%230 = load i8*, i8** %3
%231 = call i32 @fc8080_write(i8* %230, i32 133, i32 13)
%232 = load i8*, i8** %3
%233 = call i32 @fc8080_write(i8* %232, i32 134, i32 0)
%234 = load i8*, i8** %3
%235 = call i32 @fc8080_write(i8* %234, i32 135, i32 16)
%236 = load i8*, i8** %3
%237 = call i32 @fc8080_write(i8* %236, i32 136, i32 0)
%238 = load i8*, i8** %3
%239 = call i32 @fc8080_write(i8* %238, i32 137, i32 14)
%240 = load i8*, i8** %3
%241 = call i32 @fc8080_write(i8* %240, i32 138, i32 0)
%242 = load i8*, i8** %3
%243 = call i32 @fc8080_write(i8* %242, i32 139, i32 14)
%244 = load i8*, i8** %3
%245 = call i32 @fc8080_write(i8* %244, i32 140, i32 3)
%246 = load i8*, i8** %3
%247 = call i32 @fc8080_write(i8* %246, i32 141, i32 16)
%248 = load i8*, i8** %3
%249 = call i32 @fc8080_write(i8* %248, i32 142, i32 0)
%250 = load i8*, i8** %3
%251 = call i32 @fc8080_write(i8* %250, i32 143, i32 16)
%252 = load i8*, i8** %3
%253 = call i32 @fc8080_write(i8* %252, i32 144, i32 4)
%254 = load i8*, i8** %3
%255 = call i32 @fc8080_write(i8* %254, i32 145, i32 16)
%256 = load i8*, i8** %3
%257 = call i32 @fc8080_write(i8* %256, i32 146, i32 0)
%258 = load i8*, i8** %3
%259 = call i32 @fc8080_write(i8* %258, i32 147, i32 0)
%260 = load i8*, i8** %3
%261 = call i32 @fc8080_write(i8* %260, i32 148, i32 0)
%262 = load i8*, i8** %3
%263 = call i32 @fc8080_write(i8* %262, i32 149, i32 14)
%264 = load i8*, i8** %3
%265 = call i32 @fc8080_write(i8* %264, i32 150, i32 0)
%266 = load i8*, i8** %3
%267 = call i32 @fc8080_write(i8* %266, i32 151, i32 14)
%268 = load i8*, i8** %3
%269 = call i32 @fc8080_write(i8* %268, i32 152, i32 0)
%270 = load i8*, i8** %3
%271 = call i32 @fc8080_write(i8* %270, i32 153, i32 14)
%272 = load i8*, i8** %3
%273 = call i32 @fc8080_write(i8* %272, i32 154, i32 0)
%274 = load i8*, i8** %3
%275 = call i32 @fc8080_write(i8* %274, i32 155, i32 14)
%276 = load i8*, i8** %3
%277 = call i32 @fc8080_write(i8* %276, i32 128, i32 61)
%278 = load i8*, i8** %3
%279 = call i32 @fc8080_write(i8* %278, i32 129, i32 32)
%280 = load i8*, i8** %3
%281 = call i32 @fc8080_write(i8* %280, i32 130, i32 37)
%282 = load i8*, i8** %3
%283 = call i32 @fc8080_write(i8* %282, i32 131, i32 10)
%284 = load i8*, i8** %3
%285 = call i32 @fc8080_write(i8* %284, i32 208, i32 0)
%286 = load i8*, i8** %3
%287 = call i32 @fc8080_write(i8* %286, i32 210, i32 40)
%288 = load i8*, i8** %3
%289 = call i32 @fc8080_write(i8* %288, i32 212, i32 68)
%290 = load i8*, i8** %3
%291 = call i32 @fc8080_write(i8* %290, i32 174, i32 54)
%292 = load i8*, i8** %3
%293 = call i32 @fc8080_write(i8* %292, i32 173, i32 139)
%294 = load i8*, i8** %3
%295 = call i32 @fc8080_write(i8* %294, i32 20, i32 99)
%296 = load i8*, i8** %3
%297 = call i32 @fc8080_write(i8* %296, i32 21, i32 2)
%298 = load i8*, i8** %3
%299 = call i32 @fc8080_write(i8* %298, i32 24, i32 67)
%300 = load i8*, i8** %3
%301 = call i32 @fc8080_write(i8* %300, i32 25, i32 33)
%302 = load i8*, i8** %3
%303 = call i32 @fc8080_write(i8* %302, i32 39, i32 130)
%304 = load i8*, i8** %3
%305 = call i32 @fc8080_write(i8* %304, i32 40, i32 51)
%306 = load i8*, i8** %3
%307 = call i32 @fc8080_write(i8* %306, i32 51, i32 67)
%308 = load i8*, i8** %3
%309 = call i32 @fc8080_write(i8* %308, i32 52, i32 65)
%310 = load i8*, i8** %3
%311 = call i32 @fc8080_write(i8* %310, i32 83, i32 65)
%312 = load i8*, i8** %3
%313 = call i32 @fc8080_write(i8* %312, i32 84, i32 1)
%314 = load i8*, i8** %3
%315 = call i32 @fc8080_write(i8* %314, i32 102, i32 246)
%316 = load i8*, i8** %3
%317 = call i32 @fc8080_write(i8* %316, i32 175, i32 20)
%318 = load i8*, i8** %3
%319 = call i32 @fc8080_write(i8* %318, i32 182, i32 0)
%320 = load i8*, i8** %3
%321 = call i32 @fc8080_write(i8* %320, i32 184, i32 176)
%322 = load i8*, i8** %3
%323 = call i32 @fc8080_write(i8* %322, i32 185, i32 196)
ret i32 0
}

LLVM IR (-O2):
define i32 @fc8080_tuner_init(i8* %0, i32 %1) {
%3 = alloca [6 x i8]
%4 = alloca [6 x i8]
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%7 = tail call i32 @fc8080_write(i8* %0, i32 0, i32 0)
%8 = tail call i32 @fc8080_write(i8* %0, i32 2, i32 17)
%9 = tail call i32 @fc8080_set_filter(i8* %0)
%10 = tail call i32 @fc8080_write(i8* %0, i32 179, i32 120)
%11 = tail call i32 @fc8080_write(i8* %0, i32 156, i32 0)
%12 = tail call i32 @fc8080_write(i8* %0, i32 157, i32 1)
%13 = tail call i32 @fc8080_write(i8* %0, i32 158, i32 2)
%14 = tail call i32 @fc8080_write(i8* %0, i32 159, i32 10)
%15 = tail call i32 @fc8080_write(i8* %0, i32 160, i32 42)
%16 = tail call i32 @fc8080_write(i8* %0, i32 161, i32 50)
%17 = tail call i32 @fc8080_write(i8* %0, i32 162, i32 82)
%18 = tail call i32 @fc8080_write(i8* %0, i32 163, i32 86)
%19 = tail call i32 @fc8080_write(i8* %0, i32 164, i32 118)
%20 = tail call i32 @fc8080_write(i8* %0, i32 165, i32 126)
%21 = tail call i32 @fc8080_write(i8* %0, i32 166, i32 127)
%22 = tail call i32 @fc8080_write(i8* %0, i32 167, i32 159)
%23 = tail call i32 @fc8080_write(i8* %0, i32 168, i32 192)
%24 = tail call i32 @fc8080_write(i8* %0, i32 208, i32 0)
%25 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 1
%26 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 2
%27 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 3
%28 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 4
%29 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 5
%30 = call i32 @fc8080_read(i8* %0, i32 216, i8* %6)
%31 = load i8, i8* %6
%32 = call i32 @fc8080_read(i8* %0, i32 216, i8* %25)
%33 = load i8, i8* %25
%34 = icmp ult i8 %33, %31
%35 = select i1 %34, i8 %31, i8 %33
%36 = icmp ugt i8 %33, %31
%37 = select i1 %36, i8 %31, i8 %33
%38 = call i32 @fc8080_read(i8* %0, i32 216, i8* %26)
%39 = load i8, i8* %26
%40 = icmp ult i8 %39, %35
%41 = select i1 %40, i8 %35, i8 %39
%42 = icmp ugt i8 %39, %37
%43 = select i1 %42, i8 %37, i8 %39
%44 = call i32 @fc8080_read(i8* %0, i32 216, i8* %27)
%45 = load i8, i8* %27
%46 = icmp ult i8 %45, %41
%47 = select i1 %46, i8 %41, i8 %45
%48 = icmp ugt i8 %45, %43
%49 = select i1 %48, i8 %43, i8 %45
%50 = call i32 @fc8080_read(i8* %0, i32 216, i8* %28)
%51 = load i8, i8* %28
%52 = icmp ult i8 %51, %47
%53 = select i1 %52, i8 %47, i8 %51
%54 = icmp ugt i8 %51, %49
%55 = select i1 %54, i8 %49, i8 %51
%56 = call i32 @fc8080_read(i8* %0, i32 216, i8* %29)
%57 = load i8, i8* %29
%58 = icmp ult i8 %57, %53
%59 = select i1 %58, i8 %53, i8 %57
%60 = icmp ugt i8 %57, %55
%61 = select i1 %60, i8 %55, i8 %57
%62 = load i8, i8* %6
%63 = zext i8 %62 to i16
%64 = load i8, i8* %25
%65 = zext i8 %64 to i16
%66 = load i8, i8* %26
%67 = zext i8 %66 to i16
%68 = load i8, i8* %27
%69 = zext i8 %68 to i16
%70 = load i8, i8* %28
%71 = zext i8 %70 to i16
%72 = zext i8 %57 to i16
%73 = zext i8 %59 to i16
%74 = zext i8 %61 to i16
%75 = add nuw nsw i16 %74, %73
%76 = sub nsw i16 %63, %75
%77 = add nsw i16 %76, %65
%78 = add nsw i16 %77, %67
%79 = add nsw i16 %78, %69
%80 = add nsw i16 %79, %71
%81 = add nsw i16 %80, %72
%82 = sdiv i16 %81, 4
%83 = and i16 %82, 255
%84 = zext i16 %83 to i32
%85 = call i32 @fc8080_write(i8* %0, i32 127, i32 %84)
%86 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 1
%87 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 2
%88 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 3
%89 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 4
%90 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 5
%91 = call i32 @fc8080_read(i8* %0, i32 214, i8* %5)
%92 = load i8, i8* %5
%93 = call i32 @fc8080_read(i8* %0, i32 214, i8* %86)
%94 = load i8, i8* %86
%95 = icmp ult i8 %94, %92
%96 = select i1 %95, i8 %92, i8 %94
%97 = icmp ugt i8 %94, %92
%98 = select i1 %97, i8 %92, i8 %94
%99 = call i32 @fc8080_read(i8* %0, i32 214, i8* %87)
%100 = load i8, i8* %87
%101 = icmp ult i8 %100, %96
%102 = select i1 %101, i8 %96, i8 %100
%103 = icmp ugt i8 %100, %98
%104 = select i1 %103, i8 %98, i8 %100
%105 = call i32 @fc8080_read(i8* %0, i32 214, i8* %88)
%106 = load i8, i8* %88
%107 = icmp ult i8 %106, %102
%108 = select i1 %107, i8 %102, i8 %106
%109 = icmp ugt i8 %106, %104
%110 = select i1 %109, i8 %104, i8 %106
%111 = call i32 @fc8080_read(i8* %0, i32 214, i8* %89)
%112 = load i8, i8* %89
%113 = icmp ult i8 %112, %108
%114 = select i1 %113, i8 %108, i8 %112
%115 = icmp ugt i8 %112, %110
%116 = select i1 %115, i8 %110, i8 %112
%117 = call i32 @fc8080_read(i8* %0, i32 214, i8* %90)
%118 = load i8, i8* %90
%119 = icmp ult i8 %118, %114
%120 = select i1 %119, i8 %114, i8 %118
%121 = icmp ugt i8 %118, %116
%122 = select i1 %121, i8 %116, i8 %118
%123 = load i8, i8* %5
%124 = zext i8 %123 to i16
%125 = load i8, i8* %86
%126 = zext i8 %125 to i16
%127 = load i8, i8* %87
%128 = zext i8 %127 to i16
%129 = load i8, i8* %88
%130 = zext i8 %129 to i16
%131 = load i8, i8* %89
%132 = zext i8 %131 to i16
%133 = zext i8 %118 to i16
%134 = zext i8 %120 to i16
%135 = zext i8 %122 to i16
%136 = add nuw nsw i16 %135, %134
%137 = sub nsw i16 %124, %136
%138 = add nsw i16 %137, %126
%139 = add nsw i16 %138, %128
%140 = add nsw i16 %139, %130
%141 = add nsw i16 %140, %132
%142 = add nsw i16 %141, %133
%143 = sdiv i16 %142, 4
%144 = and i16 %143, 255
%145 = zext i16 %144 to i32
%146 = call i32 @fc8080_write(i8* %0, i32 126, i32 %145)
%147 = call i32 @fc8080_write(i8* %0, i32 121, i32 38)
%148 = call i32 @fc8080_write(i8* %0, i32 122, i32 33)
%149 = call i32 @fc8080_write(i8* %0, i32 123, i32 255)
%150 = call i32 @fc8080_write(i8* %0, i32 124, i32 27)
%151 = call i32 @fc8080_write(i8* %0, i32 125, i32 24)
%152 = call i32 @fc8080_write(i8* %0, i32 132, i32 0)
%153 = call i32 @fc8080_write(i8* %0, i32 133, i32 13)
%154 = call i32 @fc8080_write(i8* %0, i32 134, i32 0)
%155 = call i32 @fc8080_write(i8* %0, i32 135, i32 16)
%156 = call i32 @fc8080_write(i8* %0, i32 136, i32 0)
%157 = call i32 @fc8080_write(i8* %0, i32 137, i32 14)
%158 = call i32 @fc8080_write(i8* %0, i32 138, i32 0)
%159 = call i32 @fc8080_write(i8* %0, i32 139, i32 14)
%160 = call i32 @fc8080_write(i8* %0, i32 140, i32 3)
%161 = call i32 @fc8080_write(i8* %0, i32 141, i32 16)
%162 = call i32 @fc8080_write(i8* %0, i32 142, i32 0)
%163 = call i32 @fc8080_write(i8* %0, i32 143, i32 16)
%164 = call i32 @fc8080_write(i8* %0, i32 144, i32 4)
%165 = call i32 @fc8080_write(i8* %0, i32 145, i32 16)
%166 = call i32 @fc8080_write(i8* %0, i32 146, i32 0)
%167 = call i32 @fc8080_write(i8* %0, i32 147, i32 0)
%168 = call i32 @fc8080_write(i8* %0, i32 148, i32 0)
%169 = call i32 @fc8080_write(i8* %0, i32 149, i32 14)
%170 = call i32 @fc8080_write(i8* %0, i32 150, i32 0)
%171 = call i32 @fc8080_write(i8* %0, i32 151, i32 14)
%172 = call i32 @fc8080_write(i8* %0, i32 152, i32 0)
%173 = call i32 @fc8080_write(i8* %0, i32 153, i32 14)
%174 = call i32 @fc8080_write(i8* %0, i32 154, i32 0)
%175 = call i32 @fc8080_write(i8* %0, i32 155, i32 14)
%176 = call i32 @fc8080_write(i8* %0, i32 128, i32 61)
%177 = call i32 @fc8080_write(i8* %0, i32 129, i32 32)
%178 = call i32 @fc8080_write(i8* %0, i32 130, i32 37)
%179 = call i32 @fc8080_write(i8* %0, i32 131, i32 10)
%180 = call i32 @fc8080_write(i8* %0, i32 208, i32 0)
%181 = call i32 @fc8080_write(i8* %0, i32 210, i32 40)
%182 = call i32 @fc8080_write(i8* %0, i32 212, i32 68)
%183 = call i32 @fc8080_write(i8* %0, i32 174, i32 54)
%184 = call i32 @fc8080_write(i8* %0, i32 173, i32 139)
%185 = call i32 @fc8080_write(i8* %0, i32 20, i32 99)
%186 = call i32 @fc8080_write(i8* %0, i32 21, i32 2)
%187 = call i32 @fc8080_write(i8* %0, i32 24, i32 67)
%188 = call i32 @fc8080_write(i8* %0, i32 25, i32 33)
%189 = call i32 @fc8080_write(i8* %0, i32 39, i32 130)
%190 = call i32 @fc8080_write(i8* %0, i32 40, i32 51)
%191 = call i32 @fc8080_write(i8* %0, i32 51, i32 67)
%192 = call i32 @fc8080_write(i8* %0, i32 52, i32 65)
%193 = call i32 @fc8080_write(i8* %0, i32 83, i32 65)
%194 = call i32 @fc8080_write(i8* %0, i32 84, i32 1)
%195 = call i32 @fc8080_write(i8* %0, i32 102, i32 246)
%196 = call i32 @fc8080_write(i8* %0, i32 175, i32 20)
%197 = call i32 @fc8080_write(i8* %0, i32 182, i32 0)
%198 = call i32 @fc8080_write(i8* %0, i32 184, i32 176)
%199 = call i32 @fc8080_write(i8* %0, i32 185, i32 196)
ret i32 0
}