#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 hdmi_read_reg(int);
int /*<<< orphan*/ hdmi_write_reg(int, int);
int i2c_read_clock_scale();
int /*<<< orphan*/ i2c_write_clock_scale(int);
int /*<<< orphan*/ writeHex(int);
int /*<<< orphan*/ writeString(char *);
void brute_force_write_seq(void) {
  {
    int j;
    writeString("Setting clock_scale to 0x");
    writeHex(1250);
    writeString("\n");
    i2c_write_clock_scale(1250);
    j = i2c_read_clock_scale();
    writeString("clock scale = 0x");
    writeHex(j);
    if (j == 1250)
      writeString(" - passed\n");
    else
      writeString(" - FAILED\n");
    hdmi_write_reg(0x0f, 0);
    j = hdmi_read_reg(1);
    if (j == 0xca)
      writeString("Correct vendor ID\n");
    else {
      writeString("FAILED - Vendor ID=0x");
      writeHex(j);
      writeString(" but should be 0xca\n");
    }
    j = hdmi_read_reg(2) | ((hdmi_read_reg(3) & 0xf) << 8);
    if (j == 0x613)
      writeString("Correct device ID\n");
    else {
      writeString("FAILED - Device ID=0x");
      writeHex(j);
      writeString(" but should be 0x613\n");
    }
  }
  hdmi_write_reg(0x5, 0x0);
  hdmi_write_reg(0x4, 0x3d);
  hdmi_write_reg(0x4, 0x1d);
  hdmi_write_reg(0x61, 0x30);
  hdmi_write_reg(0x9, 0xb2);
  hdmi_write_reg(0xa, 0xf8);
  hdmi_write_reg(0xb, 0x37);
  hdmi_write_reg(0xf, 0x0);
  hdmi_write_reg(0xc9, 0x0);
  hdmi_write_reg(0xca, 0x0);
  hdmi_write_reg(0xcb, 0x0);
  hdmi_write_reg(0xcc, 0x0);
  hdmi_write_reg(0xcd, 0x0);
  hdmi_write_reg(0xce, 0x0);
  hdmi_write_reg(0xcf, 0x0);
  hdmi_write_reg(0xd0, 0x0);
  hdmi_write_reg(0xe1, 0x0);
  hdmi_write_reg(0xf, 0x0);
  hdmi_write_reg(0xf8, 0xc3);
  hdmi_write_reg(0xf8, 0xa5);
  hdmi_write_reg(0x22, 0x60);
  hdmi_write_reg(0x1a, 0xe0);
  hdmi_write_reg(0x22, 0x48);
  hdmi_write_reg(0xf8, 0xff);
  hdmi_write_reg(0x4, 0x1d);
  hdmi_write_reg(0x61, 0x30);
  hdmi_write_reg(0xc, 0xff);
  hdmi_write_reg(0xd, 0xff);
  hdmi_write_reg(0xe, 0xcf);
  hdmi_write_reg(0xe, 0xce);
  hdmi_write_reg(0x10, 0x1);
  hdmi_write_reg(0x15, 0x9);
  hdmi_write_reg(0xf, 0x0);
  hdmi_write_reg(0x10, 0x1);
  hdmi_write_reg(0x15, 0x9);
  hdmi_write_reg(0x10, 0x1);
  hdmi_write_reg(0x11, 0xa0);
  hdmi_write_reg(0x12, 0x0);
  hdmi_write_reg(0x13, 0x20);
  hdmi_write_reg(0x14, 0x0);
  hdmi_write_reg(0x15, 0x3);
  hdmi_write_reg(0x10, 0x1);
  hdmi_write_reg(0x15, 0x9);
  hdmi_write_reg(0x10, 0x1);
  hdmi_write_reg(0x11, 0xa0);
  hdmi_write_reg(0x12, 0x20);
  hdmi_write_reg(0x13, 0x20);
  hdmi_write_reg(0x14, 0x0);
  hdmi_write_reg(0x15, 0x3);
  hdmi_write_reg(0x10, 0x1);
  hdmi_write_reg(0x15, 0x9);
  hdmi_write_reg(0x10, 0x1);
  hdmi_write_reg(0x11, 0xa0);
  hdmi_write_reg(0x12, 0x40);
  hdmi_write_reg(0x13, 0x20);
  hdmi_write_reg(0x14, 0x0);
  hdmi_write_reg(0x15, 0x3);
  hdmi_write_reg(0x10, 0x1);
  hdmi_write_reg(0x15, 0x9);
  hdmi_write_reg(0x10, 0x1);
  hdmi_write_reg(0x11, 0xa0);
  hdmi_write_reg(0x12, 0x60);
  hdmi_write_reg(0x13, 0x20);
  hdmi_write_reg(0x14, 0x0);
  hdmi_write_reg(0x15, 0x3);
  hdmi_write_reg(0x4, 0x1d);
  hdmi_write_reg(0x61, 0x30);
  hdmi_write_reg(0xf, 0x0);
  hdmi_write_reg(0xc1, 0x41);
  hdmi_write_reg(0xf, 0x1);
  hdmi_write_reg(0x58, 0x10);
  hdmi_write_reg(0x59, 0x68);
  hdmi_write_reg(0x5a, 0x0);
  hdmi_write_reg(0x5b, 0x3);
  hdmi_write_reg(0x5c, 0x0);
  hdmi_write_reg(0x5e, 0x0);
  hdmi_write_reg(0x5f, 0x0);
  hdmi_write_reg(0x60, 0x0);
  hdmi_write_reg(0x61, 0x0);
  hdmi_write_reg(0x62, 0x0);
  hdmi_write_reg(0x63, 0x0);
  hdmi_write_reg(0x64, 0x0);
  hdmi_write_reg(0x65, 0x0);
  hdmi_write_reg(0x5d, 0xf4);
  hdmi_write_reg(0xf, 0x0);
  hdmi_write_reg(0xcd, 0x3);
  hdmi_write_reg(0xf, 0x0);
  hdmi_write_reg(0xf, 0x1);
  hdmi_write_reg(0xf, 0x0);
  hdmi_write_reg(0x4, 0x1d);
  hdmi_write_reg(0x70, 0x0);
  hdmi_write_reg(0x72, 0x0);
  hdmi_write_reg(0xc0, 0x0);
  hdmi_write_reg(0x4, 0x15);
  hdmi_write_reg(0x61, 0x10);
  hdmi_write_reg(0x62, 0x18);
  hdmi_write_reg(0x63, 0x10);
  hdmi_write_reg(0x64, 0xc);
  hdmi_write_reg(0x4, 0x15);
  hdmi_write_reg(0x4, 0x15);
  hdmi_write_reg(0xc, 0x0);
  hdmi_write_reg(0xd, 0x40);
  hdmi_write_reg(0xe, 0x1);
  hdmi_write_reg(0xe, 0x0);
  hdmi_write_reg(0xf, 0x0);
  hdmi_write_reg(0x61, 0x0);
  hdmi_write_reg(0xf, 0x0);
  hdmi_write_reg(0xc1, 0x40);
  hdmi_write_reg(0xc6, 0x3);
}


x86 assembly (clang, -O0):
<brute_force_write_seq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe91(%rip),%rdi
call   1040 <writeString@plt>
mov    $0x4e2,%edi
call   1050 <writeHex@plt>
lea    0xf37(%rip),%rdi
call   1040 <writeString@plt>
mov    $0x4e2,%edi
call   1060 <i2c_write_clock_scale@plt>
mov    $0x0,%al
call   1070 <i2c_read_clock_scale@plt>
mov    %eax,-0x4(%rbp)
lea    0xe75(%rip),%rdi
call   1040 <writeString@plt>
mov    -0x4(%rbp),%edi
call   1050 <writeHex@plt>
cmpl   $0x4e2,-0x4(%rbp)
jne    11d0 <brute_force_write_seq+0x70>
lea    0xe65(%rip),%rdi
call   1040 <writeString@plt>
jmp    11dc <brute_force_write_seq+0x7c>
lea    0xe5f(%rip),%rdi
call   1040 <writeString@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x1,%edi
call   1030 <hdmi_read_reg@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xca,-0x4(%rbp)
jne    1213 <brute_force_write_seq+0xb3>
lea    0xe38(%rip),%rdi
call   1040 <writeString@plt>
jmp    1233 <brute_force_write_seq+0xd3>
lea    0xe3a(%rip),%rdi
call   1040 <writeString@plt>
mov    -0x4(%rbp),%edi
call   1050 <writeHex@plt>
lea    0xe3c(%rip),%rdi
call   1040 <writeString@plt>
mov    $0x2,%edi
call   1030 <hdmi_read_reg@plt>
mov    %eax,-0x8(%rbp)
mov    $0x3,%edi
call   1030 <hdmi_read_reg@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
and    $0xf,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x613,-0x4(%rbp)
jne    1278 <brute_force_write_seq+0x118>
lea    0xe11(%rip),%rdi
call   1040 <writeString@plt>
jmp    1298 <brute_force_write_seq+0x138>
lea    0xe13(%rip),%rdi
call   1040 <writeString@plt>
mov    -0x4(%rbp),%edi
call   1050 <writeHex@plt>
lea    0xe15(%rip),%rdi
call   1040 <writeString@plt>
mov    $0x5,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x3d,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x1d,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x61,%edi
mov    $0x30,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x9,%edi
mov    $0xb2,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xa,%edi
mov    $0xf8,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xb,%edi
mov    $0x37,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc9,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xca,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xcb,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xcc,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xcd,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xce,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xcf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xd0,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xe1,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf8,%edi
mov    $0xc3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf8,%edi
mov    $0xa5,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x22,%edi
mov    $0x60,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x1a,%edi
mov    $0xe0,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x22,%edi
mov    $0x48,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf8,%edi
mov    $0xff,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x1d,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x61,%edi
mov    $0x30,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc,%edi
mov    $0xff,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xd,%edi
mov    $0xff,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xe,%edi
mov    $0xcf,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xe,%edi
mov    $0xce,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x9,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x9,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x11,%edi
mov    $0xa0,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x12,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x13,%edi
mov    $0x20,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x14,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x9,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x11,%edi
mov    $0xa0,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x12,%edi
mov    $0x20,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x13,%edi
mov    $0x20,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x14,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x9,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x11,%edi
mov    $0xa0,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x12,%edi
mov    $0x40,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x13,%edi
mov    $0x20,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x14,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x9,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x11,%edi
mov    $0xa0,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x12,%edi
mov    $0x60,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x13,%edi
mov    $0x20,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x14,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x1d,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x61,%edi
mov    $0x30,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc1,%edi
mov    $0x41,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x58,%edi
mov    $0x10,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x59,%edi
mov    $0x68,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x5a,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x5b,%edi
mov    $0x3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x5c,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x5e,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x5f,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x60,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x61,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x62,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x63,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x64,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x65,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x5d,%edi
mov    $0xf4,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xcd,%edi
mov    $0x3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x1d,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x70,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x72,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc0,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x15,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x61,%edi
mov    $0x10,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x62,%edi
mov    $0x18,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x63,%edi
mov    $0x10,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x64,%edi
mov    $0xc,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x15,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x15,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xd,%edi
mov    $0x40,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xe,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xe,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x61,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc1,%edi
mov    $0x40,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc6,%edi
mov    $0x3,%esi
call   1080 <hdmi_write_reg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brute_force_write_seq>:
push   %rbp
push   %rbx
push   %rax
lea    0xe96(%rip),%rdi
call   1040 <writeString@plt>
mov    $0x4e2,%edi
call   1050 <writeHex@plt>
lea    0xf3c(%rip),%rdi
call   1040 <writeString@plt>
mov    $0x4e2,%edi
call   1060 <i2c_write_clock_scale@plt>
xor    %eax,%eax
call   1070 <i2c_read_clock_scale@plt>
mov    %eax,%ebx
lea    0xe7b(%rip),%rdi
call   1040 <writeString@plt>
mov    %ebx,%edi
call   1050 <writeHex@plt>
cmp    $0x4e2,%ebx
lea    0xe73(%rip),%rax
lea    0xe77(%rip),%rdi
cmove  %rax,%rdi
call   1040 <writeString@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x1,%edi
call   1030 <hdmi_read_reg@plt>
cmp    $0xca,%eax
jne    11ee <brute_force_write_seq+0x8e>
lea    0xe55(%rip),%rdi
jmp    120a <brute_force_write_seq+0xaa>
mov    %eax,%ebx
lea    0xe5d(%rip),%rdi
call   1040 <writeString@plt>
mov    %ebx,%edi
call   1050 <writeHex@plt>
lea    0xe60(%rip),%rdi
call   1040 <writeString@plt>
mov    $0x2,%edi
call   1030 <hdmi_read_reg@plt>
mov    %eax,%ebp
mov    $0x3,%edi
call   1030 <hdmi_read_reg@plt>
mov    %eax,%ebx
and    $0xf,%ebx
shl    $0x8,%ebx
or     %ebp,%ebx
cmp    $0x613,%ebx
jne    1240 <brute_force_write_seq+0xe0>
lea    0xe41(%rip),%rdi
jmp    125a <brute_force_write_seq+0xfa>
lea    0xe4b(%rip),%rdi
call   1040 <writeString@plt>
mov    %ebx,%edi
call   1050 <writeHex@plt>
lea    0xe4e(%rip),%rdi
call   1040 <writeString@plt>
mov    $0x5,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x3d,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x1d,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x61,%edi
mov    $0x30,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x9,%edi
mov    $0xb2,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xa,%edi
mov    $0xf8,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xb,%edi
mov    $0x37,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc9,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xca,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xcb,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xcc,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xcd,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xce,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xcf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xd0,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xe1,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf8,%edi
mov    $0xc3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf8,%edi
mov    $0xa5,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x22,%edi
mov    $0x60,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x1a,%edi
mov    $0xe0,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x22,%edi
mov    $0x48,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf8,%edi
mov    $0xff,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x1d,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x61,%edi
mov    $0x30,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc,%edi
mov    $0xff,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xd,%edi
mov    $0xff,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xe,%edi
mov    $0xcf,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xe,%edi
mov    $0xce,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x9,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x9,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x11,%edi
mov    $0xa0,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x12,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x13,%edi
mov    $0x20,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x14,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x9,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x11,%edi
mov    $0xa0,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x12,%edi
mov    $0x20,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x13,%edi
mov    $0x20,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x14,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x9,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x11,%edi
mov    $0xa0,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x12,%edi
mov    $0x40,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x13,%edi
mov    $0x20,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x14,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x9,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x10,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x11,%edi
mov    $0xa0,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x12,%edi
mov    $0x60,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x13,%edi
mov    $0x20,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x14,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x15,%edi
mov    $0x3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x1d,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x61,%edi
mov    $0x30,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc1,%edi
mov    $0x41,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x58,%edi
mov    $0x10,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x59,%edi
mov    $0x68,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x5a,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x5b,%edi
mov    $0x3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x5c,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x5e,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x5f,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x60,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x61,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x62,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x63,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x64,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x65,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x5d,%edi
mov    $0xf4,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xcd,%edi
mov    $0x3,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x1d,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x70,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x72,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc0,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x15,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x61,%edi
mov    $0x10,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x62,%edi
mov    $0x18,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x63,%edi
mov    $0x10,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x64,%edi
mov    $0xc,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x15,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x4,%edi
mov    $0x15,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xd,%edi
mov    $0x40,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xe,%edi
mov    $0x1,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xe,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0x61,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc1,%edi
mov    $0x40,%esi
call   1080 <hdmi_write_reg@plt>
mov    $0xc6,%edi
mov    $0x3,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1080 <hdmi_write_reg@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Setting clock_scale to 0x\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [17 x i8] c"clock scale = 0x\00"
@.str.3 = [11 x i8] c" - passed\0A\00"
@.str.4 = [11 x i8] c" - FAILED\0A\00"
@.str.5 = [19 x i8] c"Correct vendor ID\0A\00"
@.str.6 = [22 x i8] c"FAILED - Vendor ID=0x\00"
@.str.7 = [21 x i8] c" but should be 0xca\0A\00"
@.str.8 = [19 x i8] c"Correct device ID\0A\00"
@.str.9 = [22 x i8] c"FAILED - Device ID=0x\00"
@.str.10 = [22 x i8] c" but should be 0x613\0A\00"
define void @brute_force_write_seq() {
%1 = alloca i32
%2 = call i32 @writeString(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @writeHex(i32 1250)
%4 = call i32 @writeString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @i2c_write_clock_scale(i32 1250)
%6 = call i32 (...) @i2c_read_clock_scale()
store i32 %6, i32* %1
%7 = call i32 @writeString(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* %1
%9 = call i32 @writeHex(i32 %8)
%10 = load i32, i32* %1
%11 = icmp eq i32 %10, 1250
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = call i32 @writeString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
br label %16
14: ; preds = %0
%15 = call i32 @writeString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
%17 = call i32 @hdmi_write_reg(i32 15, i32 0)
%18 = call i32 @hdmi_read_reg(i32 1)
store i32 %18, i32* %1
%19 = load i32, i32* %1
%20 = icmp eq i32 %19, 202
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = call i32 @writeString(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
br label %28
23: ; preds = %16
%24 = call i32 @writeString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%25 = load i32, i32* %1
%26 = call i32 @writeHex(i32 %25)
%27 = call i32 @writeString(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
br label %28
28: ; preds = %23, %21
%29 = call i32 @hdmi_read_reg(i32 2)
%30 = call i32 @hdmi_read_reg(i32 3)
%31 = and i32 %30, 15
%32 = shl i32 %31, 8
%33 = or i32 %29, %32
store i32 %33, i32* %1
%34 = load i32, i32* %1
%35 = icmp eq i32 %34, 1555
br i1 %35, label %36, label %38
36: ; preds = %28
%37 = call i32 @writeString(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %43
38: ; preds = %28
%39 = call i32 @writeString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0))
%40 = load i32, i32* %1
%41 = call i32 @writeHex(i32 %40)
%42 = call i32 @writeString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
br label %43
43: ; preds = %38, %36
%44 = call i32 @hdmi_write_reg(i32 5, i32 0)
%45 = call i32 @hdmi_write_reg(i32 4, i32 61)
%46 = call i32 @hdmi_write_reg(i32 4, i32 29)
%47 = call i32 @hdmi_write_reg(i32 97, i32 48)
%48 = call i32 @hdmi_write_reg(i32 9, i32 178)
%49 = call i32 @hdmi_write_reg(i32 10, i32 248)
%50 = call i32 @hdmi_write_reg(i32 11, i32 55)
%51 = call i32 @hdmi_write_reg(i32 15, i32 0)
%52 = call i32 @hdmi_write_reg(i32 201, i32 0)
%53 = call i32 @hdmi_write_reg(i32 202, i32 0)
%54 = call i32 @hdmi_write_reg(i32 203, i32 0)
%55 = call i32 @hdmi_write_reg(i32 204, i32 0)
%56 = call i32 @hdmi_write_reg(i32 205, i32 0)
%57 = call i32 @hdmi_write_reg(i32 206, i32 0)
%58 = call i32 @hdmi_write_reg(i32 207, i32 0)
%59 = call i32 @hdmi_write_reg(i32 208, i32 0)
%60 = call i32 @hdmi_write_reg(i32 225, i32 0)
%61 = call i32 @hdmi_write_reg(i32 15, i32 0)
%62 = call i32 @hdmi_write_reg(i32 248, i32 195)
%63 = call i32 @hdmi_write_reg(i32 248, i32 165)
%64 = call i32 @hdmi_write_reg(i32 34, i32 96)
%65 = call i32 @hdmi_write_reg(i32 26, i32 224)
%66 = call i32 @hdmi_write_reg(i32 34, i32 72)
%67 = call i32 @hdmi_write_reg(i32 248, i32 255)
%68 = call i32 @hdmi_write_reg(i32 4, i32 29)
%69 = call i32 @hdmi_write_reg(i32 97, i32 48)
%70 = call i32 @hdmi_write_reg(i32 12, i32 255)
%71 = call i32 @hdmi_write_reg(i32 13, i32 255)
%72 = call i32 @hdmi_write_reg(i32 14, i32 207)
%73 = call i32 @hdmi_write_reg(i32 14, i32 206)
%74 = call i32 @hdmi_write_reg(i32 16, i32 1)
%75 = call i32 @hdmi_write_reg(i32 21, i32 9)
%76 = call i32 @hdmi_write_reg(i32 15, i32 0)
%77 = call i32 @hdmi_write_reg(i32 16, i32 1)
%78 = call i32 @hdmi_write_reg(i32 21, i32 9)
%79 = call i32 @hdmi_write_reg(i32 16, i32 1)
%80 = call i32 @hdmi_write_reg(i32 17, i32 160)
%81 = call i32 @hdmi_write_reg(i32 18, i32 0)
%82 = call i32 @hdmi_write_reg(i32 19, i32 32)
%83 = call i32 @hdmi_write_reg(i32 20, i32 0)
%84 = call i32 @hdmi_write_reg(i32 21, i32 3)
%85 = call i32 @hdmi_write_reg(i32 16, i32 1)
%86 = call i32 @hdmi_write_reg(i32 21, i32 9)
%87 = call i32 @hdmi_write_reg(i32 16, i32 1)
%88 = call i32 @hdmi_write_reg(i32 17, i32 160)
%89 = call i32 @hdmi_write_reg(i32 18, i32 32)
%90 = call i32 @hdmi_write_reg(i32 19, i32 32)
%91 = call i32 @hdmi_write_reg(i32 20, i32 0)
%92 = call i32 @hdmi_write_reg(i32 21, i32 3)
%93 = call i32 @hdmi_write_reg(i32 16, i32 1)
%94 = call i32 @hdmi_write_reg(i32 21, i32 9)
%95 = call i32 @hdmi_write_reg(i32 16, i32 1)
%96 = call i32 @hdmi_write_reg(i32 17, i32 160)
%97 = call i32 @hdmi_write_reg(i32 18, i32 64)
%98 = call i32 @hdmi_write_reg(i32 19, i32 32)
%99 = call i32 @hdmi_write_reg(i32 20, i32 0)
%100 = call i32 @hdmi_write_reg(i32 21, i32 3)
%101 = call i32 @hdmi_write_reg(i32 16, i32 1)
%102 = call i32 @hdmi_write_reg(i32 21, i32 9)
%103 = call i32 @hdmi_write_reg(i32 16, i32 1)
%104 = call i32 @hdmi_write_reg(i32 17, i32 160)
%105 = call i32 @hdmi_write_reg(i32 18, i32 96)
%106 = call i32 @hdmi_write_reg(i32 19, i32 32)
%107 = call i32 @hdmi_write_reg(i32 20, i32 0)
%108 = call i32 @hdmi_write_reg(i32 21, i32 3)
%109 = call i32 @hdmi_write_reg(i32 4, i32 29)
%110 = call i32 @hdmi_write_reg(i32 97, i32 48)
%111 = call i32 @hdmi_write_reg(i32 15, i32 0)
%112 = call i32 @hdmi_write_reg(i32 193, i32 65)
%113 = call i32 @hdmi_write_reg(i32 15, i32 1)
%114 = call i32 @hdmi_write_reg(i32 88, i32 16)
%115 = call i32 @hdmi_write_reg(i32 89, i32 104)
%116 = call i32 @hdmi_write_reg(i32 90, i32 0)
%117 = call i32 @hdmi_write_reg(i32 91, i32 3)
%118 = call i32 @hdmi_write_reg(i32 92, i32 0)
%119 = call i32 @hdmi_write_reg(i32 94, i32 0)
%120 = call i32 @hdmi_write_reg(i32 95, i32 0)
%121 = call i32 @hdmi_write_reg(i32 96, i32 0)
%122 = call i32 @hdmi_write_reg(i32 97, i32 0)
%123 = call i32 @hdmi_write_reg(i32 98, i32 0)
%124 = call i32 @hdmi_write_reg(i32 99, i32 0)
%125 = call i32 @hdmi_write_reg(i32 100, i32 0)
%126 = call i32 @hdmi_write_reg(i32 101, i32 0)
%127 = call i32 @hdmi_write_reg(i32 93, i32 244)
%128 = call i32 @hdmi_write_reg(i32 15, i32 0)
%129 = call i32 @hdmi_write_reg(i32 205, i32 3)
%130 = call i32 @hdmi_write_reg(i32 15, i32 0)
%131 = call i32 @hdmi_write_reg(i32 15, i32 1)
%132 = call i32 @hdmi_write_reg(i32 15, i32 0)
%133 = call i32 @hdmi_write_reg(i32 4, i32 29)
%134 = call i32 @hdmi_write_reg(i32 112, i32 0)
%135 = call i32 @hdmi_write_reg(i32 114, i32 0)
%136 = call i32 @hdmi_write_reg(i32 192, i32 0)
%137 = call i32 @hdmi_write_reg(i32 4, i32 21)
%138 = call i32 @hdmi_write_reg(i32 97, i32 16)
%139 = call i32 @hdmi_write_reg(i32 98, i32 24)
%140 = call i32 @hdmi_write_reg(i32 99, i32 16)
%141 = call i32 @hdmi_write_reg(i32 100, i32 12)
%142 = call i32 @hdmi_write_reg(i32 4, i32 21)
%143 = call i32 @hdmi_write_reg(i32 4, i32 21)
%144 = call i32 @hdmi_write_reg(i32 12, i32 0)
%145 = call i32 @hdmi_write_reg(i32 13, i32 64)
%146 = call i32 @hdmi_write_reg(i32 14, i32 1)
%147 = call i32 @hdmi_write_reg(i32 14, i32 0)
%148 = call i32 @hdmi_write_reg(i32 15, i32 0)
%149 = call i32 @hdmi_write_reg(i32 97, i32 0)
%150 = call i32 @hdmi_write_reg(i32 15, i32 0)
%151 = call i32 @hdmi_write_reg(i32 193, i32 64)
%152 = call i32 @hdmi_write_reg(i32 198, i32 3)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Setting clock_scale to 0x\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [17 x i8] c"clock scale = 0x\00"
@.str.3 = [11 x i8] c" - passed\0A\00"
@.str.4 = [11 x i8] c" - FAILED\0A\00"
@.str.5 = [19 x i8] c"Correct vendor ID\0A\00"
@.str.6 = [22 x i8] c"FAILED - Vendor ID=0x\00"
@.str.7 = [21 x i8] c" but should be 0xca\0A\00"
@.str.8 = [19 x i8] c"Correct device ID\0A\00"
@.str.9 = [22 x i8] c"FAILED - Device ID=0x\00"
@.str.10 = [22 x i8] c" but should be 0x613\0A\00"
define void @brute_force_write_seq() {
%1 = tail call i32 @writeString(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @writeHex(i32 1250)
%3 = tail call i32 @writeString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @i2c_write_clock_scale(i32 1250)
%5 = tail call i32 (...) @i2c_read_clock_scale()
%6 = tail call i32 @writeString(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @writeHex(i32 %5)
%8 = icmp eq i32 %5, 1250
%9 = select i1 %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0)
%10 = tail call i32 @writeString(i8* %9)
%11 = tail call i32 @hdmi_write_reg(i32 15, i32 0)
%12 = tail call i32 @hdmi_read_reg(i32 1)
%13 = icmp eq i32 %12, 202
br i1 %13, label %17, label %14
14: ; preds = %0
%15 = tail call i32 @writeString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%16 = tail call i32 @writeHex(i32 %12)
br label %17
17: ; preds = %0, %14
%18 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), %14 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), %0 ]
%19 = tail call i32 @writeString(i8* %18)
%20 = tail call i32 @hdmi_read_reg(i32 2)
%21 = tail call i32 @hdmi_read_reg(i32 3)
%22 = shl i32 %21, 8
%23 = and i32 %22, 3840
%24 = or i32 %23, %20
%25 = icmp eq i32 %24, 1555
br i1 %25, label %29, label %26
26: ; preds = %17
%27 = tail call i32 @writeString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0))
%28 = tail call i32 @writeHex(i32 %24)
br label %29
29: ; preds = %17, %26
%30 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), %26 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), %17 ]
%31 = tail call i32 @writeString(i8* %30)
%32 = tail call i32 @hdmi_write_reg(i32 5, i32 0)
%33 = tail call i32 @hdmi_write_reg(i32 4, i32 61)
%34 = tail call i32 @hdmi_write_reg(i32 4, i32 29)
%35 = tail call i32 @hdmi_write_reg(i32 97, i32 48)
%36 = tail call i32 @hdmi_write_reg(i32 9, i32 178)
%37 = tail call i32 @hdmi_write_reg(i32 10, i32 248)
%38 = tail call i32 @hdmi_write_reg(i32 11, i32 55)
%39 = tail call i32 @hdmi_write_reg(i32 15, i32 0)
%40 = tail call i32 @hdmi_write_reg(i32 201, i32 0)
%41 = tail call i32 @hdmi_write_reg(i32 202, i32 0)
%42 = tail call i32 @hdmi_write_reg(i32 203, i32 0)
%43 = tail call i32 @hdmi_write_reg(i32 204, i32 0)
%44 = tail call i32 @hdmi_write_reg(i32 205, i32 0)
%45 = tail call i32 @hdmi_write_reg(i32 206, i32 0)
%46 = tail call i32 @hdmi_write_reg(i32 207, i32 0)
%47 = tail call i32 @hdmi_write_reg(i32 208, i32 0)
%48 = tail call i32 @hdmi_write_reg(i32 225, i32 0)
%49 = tail call i32 @hdmi_write_reg(i32 15, i32 0)
%50 = tail call i32 @hdmi_write_reg(i32 248, i32 195)
%51 = tail call i32 @hdmi_write_reg(i32 248, i32 165)
%52 = tail call i32 @hdmi_write_reg(i32 34, i32 96)
%53 = tail call i32 @hdmi_write_reg(i32 26, i32 224)
%54 = tail call i32 @hdmi_write_reg(i32 34, i32 72)
%55 = tail call i32 @hdmi_write_reg(i32 248, i32 255)
%56 = tail call i32 @hdmi_write_reg(i32 4, i32 29)
%57 = tail call i32 @hdmi_write_reg(i32 97, i32 48)
%58 = tail call i32 @hdmi_write_reg(i32 12, i32 255)
%59 = tail call i32 @hdmi_write_reg(i32 13, i32 255)
%60 = tail call i32 @hdmi_write_reg(i32 14, i32 207)
%61 = tail call i32 @hdmi_write_reg(i32 14, i32 206)
%62 = tail call i32 @hdmi_write_reg(i32 16, i32 1)
%63 = tail call i32 @hdmi_write_reg(i32 21, i32 9)
%64 = tail call i32 @hdmi_write_reg(i32 15, i32 0)
%65 = tail call i32 @hdmi_write_reg(i32 16, i32 1)
%66 = tail call i32 @hdmi_write_reg(i32 21, i32 9)
%67 = tail call i32 @hdmi_write_reg(i32 16, i32 1)
%68 = tail call i32 @hdmi_write_reg(i32 17, i32 160)
%69 = tail call i32 @hdmi_write_reg(i32 18, i32 0)
%70 = tail call i32 @hdmi_write_reg(i32 19, i32 32)
%71 = tail call i32 @hdmi_write_reg(i32 20, i32 0)
%72 = tail call i32 @hdmi_write_reg(i32 21, i32 3)
%73 = tail call i32 @hdmi_write_reg(i32 16, i32 1)
%74 = tail call i32 @hdmi_write_reg(i32 21, i32 9)
%75 = tail call i32 @hdmi_write_reg(i32 16, i32 1)
%76 = tail call i32 @hdmi_write_reg(i32 17, i32 160)
%77 = tail call i32 @hdmi_write_reg(i32 18, i32 32)
%78 = tail call i32 @hdmi_write_reg(i32 19, i32 32)
%79 = tail call i32 @hdmi_write_reg(i32 20, i32 0)
%80 = tail call i32 @hdmi_write_reg(i32 21, i32 3)
%81 = tail call i32 @hdmi_write_reg(i32 16, i32 1)
%82 = tail call i32 @hdmi_write_reg(i32 21, i32 9)
%83 = tail call i32 @hdmi_write_reg(i32 16, i32 1)
%84 = tail call i32 @hdmi_write_reg(i32 17, i32 160)
%85 = tail call i32 @hdmi_write_reg(i32 18, i32 64)
%86 = tail call i32 @hdmi_write_reg(i32 19, i32 32)
%87 = tail call i32 @hdmi_write_reg(i32 20, i32 0)
%88 = tail call i32 @hdmi_write_reg(i32 21, i32 3)
%89 = tail call i32 @hdmi_write_reg(i32 16, i32 1)
%90 = tail call i32 @hdmi_write_reg(i32 21, i32 9)
%91 = tail call i32 @hdmi_write_reg(i32 16, i32 1)
%92 = tail call i32 @hdmi_write_reg(i32 17, i32 160)
%93 = tail call i32 @hdmi_write_reg(i32 18, i32 96)
%94 = tail call i32 @hdmi_write_reg(i32 19, i32 32)
%95 = tail call i32 @hdmi_write_reg(i32 20, i32 0)
%96 = tail call i32 @hdmi_write_reg(i32 21, i32 3)
%97 = tail call i32 @hdmi_write_reg(i32 4, i32 29)
%98 = tail call i32 @hdmi_write_reg(i32 97, i32 48)
%99 = tail call i32 @hdmi_write_reg(i32 15, i32 0)
%100 = tail call i32 @hdmi_write_reg(i32 193, i32 65)
%101 = tail call i32 @hdmi_write_reg(i32 15, i32 1)
%102 = tail call i32 @hdmi_write_reg(i32 88, i32 16)
%103 = tail call i32 @hdmi_write_reg(i32 89, i32 104)
%104 = tail call i32 @hdmi_write_reg(i32 90, i32 0)
%105 = tail call i32 @hdmi_write_reg(i32 91, i32 3)
%106 = tail call i32 @hdmi_write_reg(i32 92, i32 0)
%107 = tail call i32 @hdmi_write_reg(i32 94, i32 0)
%108 = tail call i32 @hdmi_write_reg(i32 95, i32 0)
%109 = tail call i32 @hdmi_write_reg(i32 96, i32 0)
%110 = tail call i32 @hdmi_write_reg(i32 97, i32 0)
%111 = tail call i32 @hdmi_write_reg(i32 98, i32 0)
%112 = tail call i32 @hdmi_write_reg(i32 99, i32 0)
%113 = tail call i32 @hdmi_write_reg(i32 100, i32 0)
%114 = tail call i32 @hdmi_write_reg(i32 101, i32 0)
%115 = tail call i32 @hdmi_write_reg(i32 93, i32 244)
%116 = tail call i32 @hdmi_write_reg(i32 15, i32 0)
%117 = tail call i32 @hdmi_write_reg(i32 205, i32 3)
%118 = tail call i32 @hdmi_write_reg(i32 15, i32 0)
%119 = tail call i32 @hdmi_write_reg(i32 15, i32 1)
%120 = tail call i32 @hdmi_write_reg(i32 15, i32 0)
%121 = tail call i32 @hdmi_write_reg(i32 4, i32 29)
%122 = tail call i32 @hdmi_write_reg(i32 112, i32 0)
%123 = tail call i32 @hdmi_write_reg(i32 114, i32 0)
%124 = tail call i32 @hdmi_write_reg(i32 192, i32 0)
%125 = tail call i32 @hdmi_write_reg(i32 4, i32 21)
%126 = tail call i32 @hdmi_write_reg(i32 97, i32 16)
%127 = tail call i32 @hdmi_write_reg(i32 98, i32 24)
%128 = tail call i32 @hdmi_write_reg(i32 99, i32 16)
%129 = tail call i32 @hdmi_write_reg(i32 100, i32 12)
%130 = tail call i32 @hdmi_write_reg(i32 4, i32 21)
%131 = tail call i32 @hdmi_write_reg(i32 4, i32 21)
%132 = tail call i32 @hdmi_write_reg(i32 12, i32 0)
%133 = tail call i32 @hdmi_write_reg(i32 13, i32 64)
%134 = tail call i32 @hdmi_write_reg(i32 14, i32 1)
%135 = tail call i32 @hdmi_write_reg(i32 14, i32 0)
%136 = tail call i32 @hdmi_write_reg(i32 15, i32 0)
%137 = tail call i32 @hdmi_write_reg(i32 97, i32 0)
%138 = tail call i32 @hdmi_write_reg(i32 15, i32 0)
%139 = tail call i32 @hdmi_write_reg(i32 193, i32 64)
%140 = tail call i32 @hdmi_write_reg(i32 198, i32 3)
ret void
}