#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ show_audio_dbc(int /*<<< orphan*/ *, unsigned char *, int);
int /*<<< orphan*/ show_edid_dtd(int /*<<< orphan*/ *, unsigned char *);
int /*<<< orphan*/ show_extended_dbc(int /*<<< orphan*/ *, unsigned char *,
                                     int);
int /*<<< orphan*/ show_vendor_dbc(int /*<<< orphan*/ *, unsigned char *, int);
void show_cea_timing(FILE *outfile, unsigned char *edid_ext) {
  int i, dbc;
  int off_dtd = edid_ext[2];
  int n_dtd;
  fprintf(outfile, "Found CEA EDID Timing Extension rev 3\n");
  if (off_dtd < 4) {
    fprintf(outfile, "Block is empty (off_dtd = %d)\n", off_dtd);
    return;
  }
  n_dtd = (125 - off_dtd) / 18;
  fprintf(outfile, "Block has DTDs starting at offset %d (%d bytes of DBCs)\n",
          off_dtd, off_dtd - 4);
  fprintf(outfile, "There is space for %d DTDs in extension\n", n_dtd);
  fprintf(outfile,
          "There are %d native DTDs (between regular and extensions)\n",
          edid_ext[3] & 0xf);
  fprintf(outfile, "IT formats %sdefault to underscan\n",
          (edid_ext[3] & 0x80) ? "" : "do not ");
  fprintf(outfile, "Support: %sbasic audio, %sYCrCb 4:4:4, %sYCrCb 4:2:2\n",
          (edid_ext[3] & 0x40) ? "" : "no ", (edid_ext[3] & 0x20) ? "" : "no ",
          (edid_ext[3] & 0x10) ? "" : "no ");
  dbc = 4;
  while (dbc < off_dtd) {
    int db_len = edid_ext[dbc + 0] & 0x1f;
    int dbp = dbc + 1;
    switch (edid_ext[dbc + 0] >> 5) {
    case 1:
      show_audio_dbc(outfile, edid_ext, dbc);
      break;
    case 2:
      while (dbp < (dbc + db_len + 1)) {
        int vtype = edid_ext[dbp + 0] & 0x7f;
        fprintf(outfile, "Video: Code %d %s\n", vtype,
                (edid_ext[dbp + 0] & 0x80) ? "(native)" : "");
        dbp += 1;
      }
      break;
    case 3:
      show_vendor_dbc(outfile, edid_ext, dbc + 1);
      break;
    case 4: {
      unsigned char dbcsp_alloc = edid_ext[dbp + 0];
      fprintf(outfile, "Speakers: %s%s%s%s%s%s%s\n",
              (dbcsp_alloc & 0x40) ? "RearCenter L/R " : "",
              (dbcsp_alloc & 0x20) ? "FrontCenter L/R " : "",
              (dbcsp_alloc & 0x10) ? "Rear Center" : "",
              (dbcsp_alloc & 0x08) ? "Rear L/R " : "",
              (dbcsp_alloc & 0x04) ? "Front Center " : "",
              (dbcsp_alloc & 0x02) ? "LFE " : "",
              (dbcsp_alloc & 0x01) ? "Front L/R " : "");
      break;
    }
    case 7:
      show_extended_dbc(outfile, edid_ext, dbc);
      break;
    default:
      fprintf(outfile, "Unknown Data Block type tag 0x%x, len 0x%x\n",
              edid_ext[dbc + 0] >> 5, db_len);
      break;
    }
    dbc += db_len + 1;
  }
  for (i = 0; i < n_dtd; i++) {
    if ((edid_ext[off_dtd + 18 * i + 0] == 0) &&
        (edid_ext[off_dtd + 18 * i + 1] == 0)) {
      fprintf(outfile, "End of DTD padding after %d DTDs\n", i);
      break;
    }
    show_edid_dtd(outfile, edid_ext + (off_dtd + 18 * i));
  }
}


x86 assembly (clang, -O0):
<show_cea_timing>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x58,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x2(%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea5(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmpl   $0x4,-0x24(%rbp)
jge    11a2 <show_cea_timing+0x52>
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%edx
lea    0xead(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    159e <show_cea_timing+0x44e>
mov    $0x7d,%eax
sub    -0x24(%rbp),%eax
mov    $0x12,%ecx
cltd
idiv   %ecx
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%edx
mov    -0x24(%rbp),%ecx
sub    $0x4,%ecx
lea    0xe99(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%edx
lea    0xebd(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl 0x3(%rax),%edx
and    $0xf,%edx
lea    0xec9(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl 0x3(%rax),%ecx
and    $0x80,%ecx
lea    0xf07(%rip),%rdx
lea    0xe3f(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xecf(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl 0x3(%rax),%ecx
and    $0x40,%ecx
lea    0xf13(%rip),%rdx
lea    0xe0d(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0x18(%rbp),%rax
movzbl 0x3(%rax),%esi
and    $0x20,%esi
lea    0xef3(%rip),%rcx
lea    0xded(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%rcx
mov    -0x18(%rbp),%rax
movzbl 0x3(%rax),%esi
and    $0x10,%esi
lea    0xed3(%rip),%r8
lea    0xdcd(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%r8
lea    0xe88(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x4,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1508 <show_cea_timing+0x3b8>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
and    $0x1f,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
shr    $0x5,%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x40(%rbp)
sub    $0x6,%eax
ja     14ce <show_cea_timing+0x37e>
mov    -0x40(%rbp),%rax
lea    0xcfd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%edx
call   1060 <show_audio_dbc@plt>
jmp    14f7 <show_cea_timing+0x3a7>
jmp    1326 <show_cea_timing+0x1d6>
mov    -0x30(%rbp),%eax
mov    -0x20(%rbp),%ecx
add    -0x2c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    13a0 <show_cea_timing+0x250>
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
and    $0x7f,%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x34(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%esi
and    $0x80,%esi
lea    0xceb(%rip),%rcx
lea    0xdfa(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%rcx
lea    0xdd9(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1326 <show_cea_timing+0x1d6>
jmp    14f7 <show_cea_timing+0x3a7>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%edx
add    $0x1,%edx
call   1030 <show_vendor_dbc@plt>
jmp    14f7 <show_cea_timing+0x3a7>
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x35(%rbp)
mov    -0x10(%rbp),%rdi
movzbl -0x35(%rbp),%ecx
and    $0x40,%ecx
lea    0xc7f(%rip),%rdx
lea    0xdb1(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
movzbl -0x35(%rbp),%esi
and    $0x20,%esi
lea    0xc63(%rip),%rcx
lea    0xda5(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%rcx
movzbl -0x35(%rbp),%esi
and    $0x10,%esi
lea    0xc47(%rip),%r8
lea    0xd9a(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%r8
movzbl -0x35(%rbp),%esi
and    $0x8,%esi
lea    0xc2b(%rip),%r9
lea    0xd8a(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%r9
movzbl -0x35(%rbp),%esi
and    $0x4,%esi
lea    0xc0f(%rip),%r11
lea    0xd78(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%r11
movzbl -0x35(%rbp),%esi
and    $0x2,%esi
lea    0xbf3(%rip),%r10
lea    0xd6a(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%r10
movzbl -0x35(%rbp),%ebx
and    $0x1,%ebx
lea    0xbd7(%rip),%rax
lea    0xd53(%rip),%rsi
cmp    $0x0,%ebx
cmovne %rsi,%rax
lea    0xce1(%rip),%rsi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    14f7 <show_cea_timing+0x3a7>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%edx
call   1070 <show_extended_dbc@plt>
jmp    14f7 <show_cea_timing+0x3a7>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
sar    $0x5,%edx
mov    -0x2c(%rbp),%ecx
lea    0xcff(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    12b0 <show_cea_timing+0x160>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    159e <show_cea_timing+0x44e>
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   $0x12,-0x1c(%rbp),%edx
add    %edx,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1575 <show_cea_timing+0x425>
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   $0x12,-0x1c(%rbp),%edx
add    %edx,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1575 <show_cea_timing+0x425>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xcb2(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    159e <show_cea_timing+0x44e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x24(%rbp),%eax
imul   $0x12,-0x1c(%rbp),%ecx
add    %ecx,%eax
cltq
add    %rax,%rsi
call   1050 <show_edid_dtd@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    150f <show_cea_timing+0x3bf>
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_cea_timing>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
movzbl 0x2(%rsi),%r13d
lea    0xe9c(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1060 <fwrite@plt>
cmp    $0x3,%r13d
ja     11ba <show_cea_timing+0x5a>
lea    0xea4(%rip),%rsi
mov    %r14,%rdi
mov    %r13d,%edx
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fprintf@plt>
movzwl %r13w,%eax
mov    $0x7d,%ecx
sub    %eax,%ecx
imul   $0xe39,%ecx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
shr    $0x10,%eax
add    %ecx,%eax
movswl %ax,%r12d
lea    -0x4(%r13),%ecx
lea    0xe7e(%rip),%rsi
mov    %r14,%rdi
mov    %r13d,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xea3(%rip),%rsi
mov    %r14,%rdi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
movzbl 0x3(%rbx),%edx
and    $0xf,%edx
lea    0xeb1(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
cmpb   $0x0,0x3(%rbx)
lea    0xefa(%rip),%rdx
lea    0xe32(%rip),%r15
cmovs  %r15,%rdx
lea    0xec5(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
movzbl 0x3(%rbx),%eax
test   $0x40,%al
lea    0xf0f(%rip),%r8
mov    %r15,%rdx
cmove  %r8,%rdx
test   $0x20,%al
mov    %r15,%rcx
cmove  %r8,%rcx
test   $0x10,%al
cmovne %r15,%r8
lea    0xebc(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    $0x4,%r13b
je     147c <show_cea_timing+0x31c>
mov    %r14,(%rsp)
mov    %r12d,0xc(%rsp)
mov    $0x4,%edx
lea    0xee0(%rip),%rbp
lea    0xec6(%rip),%rsi
mov    %r13,0x20(%rsp)
mov    (%rsp),%r14
jmp    12e1 <show_cea_timing+0x181>
mov    (%rsp),%rdi
mov    %r15,%rbx
mov    %r15,%rsi
call   1070 <show_audio_dbc@plt>
lea    0xea5(%rip),%rsi
lea    0xeb1(%rip),%rbp
mov    0x18(%rsp),%rax
mov    0x10(%rsp),%rcx
lea    (%rcx,%rax,1),%edx
mov    0x20(%rsp),%r13
cmp    %r13d,%edx
jae    146d <show_cea_timing+0x30d>
mov    %edx,%r8d
mov    %rbx,%r15
movzbl (%rbx,%r8,1),%eax
mov    %eax,%ecx
and    $0x1f,%ecx
lea    0x1(%r8),%r9
shr    $0x5,%eax
lea    -0x1(%rax),%ebx
cmp    $0x6,%ebx
mov    %rcx,0x18(%rsp)
mov    %r9,0x10(%rsp)
ja     142f <show_cea_timing+0x2cf>
lea    0xceb(%rip),%rdi
movslq (%rdi,%rbx,4),%rbx
add    %rdi,%rbx
jmp    *%rbx
test   %ecx,%ecx
lea    0xd3a(%rip),%r13
mov    %r15,%rbx
je     12c6 <show_cea_timing+0x166>
mov    0x18(%rsp),%r12
add    %r8,%r12
mov    0x10(%rsp),%r15d
add    $0xffffffffffffffff,%r15
nopl   (%rax)
movzbl 0x1(%rbx,%r15,1),%eax
mov    %eax,%edx
and    $0x7f,%edx
test   $0x80,%al
mov    %rbp,%rcx
cmove  %r13,%rcx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xdff(%rip),%rsi
lea    0xe0b(%rip),%rbp
add    $0x1,%r15
cmp    %r12,%r15
jb     1340 <show_cea_timing+0x1e0>
jmp    12c6 <show_cea_timing+0x166>
mov    (%rsp),%rdi
mov    %r15,%rbx
mov    %r15,%rsi
mov    %r9d,%edx
call   1030 <show_vendor_dbc@plt>
jmp    12b8 <show_cea_timing+0x158>
mov    %r15,%rbx
movzbl (%r15,%r9,1),%eax
test   $0x40,%al
lea    0xdf8(%rip),%rdx
lea    0xcb8(%rip),%rsi
cmove  %rsi,%rdx
test   $0x20,%al
lea    0xdf4(%rip),%rcx
cmove  %rsi,%rcx
test   $0x10,%al
lea    0xdf8(%rip),%r8
cmove  %rsi,%r8
test   $0x8,%al
lea    0xdf7(%rip),%r9
cmove  %rsi,%r9
test   $0x4,%al
lea    0xdf4(%rip),%r10
cmove  %rsi,%r10
test   $0x2,%al
lea    0xdf5(%rip),%r11
cmove  %rsi,%r11
test   $0x1,%al
lea    0xded(%rip),%r15
cmove  %rsi,%r15
sub    $0x8,%rsp
mov    0x8(%rsp),%rdi
lea    0xd75(%rip),%rsi
xor    %eax,%eax
push   %r15
push   %r11
push   %r10
call   1040 <fprintf@plt>
lea    0xd45(%rip),%rsi
lea    0xd51(%rip),%rbp
add    $0x20,%rsp
jmp    12c6 <show_cea_timing+0x166>
mov    (%rsp),%rdi
lea    0xdb5(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xd1a(%rip),%rsi
lea    0xd26(%rip),%rbp
mov    %r15,%rbx
jmp    12c6 <show_cea_timing+0x166>
mov    (%rsp),%rdi
mov    %r15,%rbx
mov    %r15,%rsi
call   1080 <show_extended_dbc@plt>
jmp    12b8 <show_cea_timing+0x158>
cmp    $0x6b,%r13b
mov    0xc(%rsp),%r12d
mov    (%rsp),%r14
ja     14d4 <show_cea_timing+0x374>
mov    %r13d,%eax
cmp    $0x2,%r12d
mov    $0x1,%r15d
cmovge %r12d,%r15d
add    %rax,%rbx
xor    %ebp,%ebp
jmp    14b8 <show_cea_timing+0x358>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <show_edid_dtd@plt>
add    $0x1,%rbp
add    $0x12,%rbx
cmp    %rbp,%r15
je     14d4 <show_cea_timing+0x374>
cmpb   $0x0,(%rbx)
jne    14a0 <show_cea_timing+0x340>
cmpb   $0x0,0x1(%rbx)
jne    14a0 <show_cea_timing+0x340>
lea    0xd51(%rip),%rsi
mov    %r14,%rdi
mov    %ebp,%edx
jmp    11a5 <show_cea_timing+0x45>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Found CEA EDID Timing Extension rev 3\0A\00"
@.str.1 = [31 x i8] c"Block is empty (off_dtd = %d)\0A\00"
@.str.2 = [57 x i8] c"Block has DTDs starting at offset %d (%d bytes of DBCs)\0A\00"
@.str.3 = [41 x i8] c"There is space for %d DTDs in extension\0A\00"
@.str.4 = [59 x i8] c"There are %d native DTDs (between regular and extensions)\0A\00"
@.str.5 = [35 x i8] c"IT formats %sdefault to underscan\0A\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.7 = [8 x i8] c"do not \00"
@.str.8 = [54 x i8] c"Support: %sbasic audio, %sYCrCb 4:4:4, %sYCrCb 4:2:2\0A\00"
@.str.9 = [4 x i8] c"no \00"
@.str.10 = [19 x i8] c"Video: Code %d %s\0A\00"
@.str.11 = [9 x i8] c"(native)\00"
@.str.12 = [26 x i8] c"Speakers: %s%s%s%s%s%s%s\0A\00"
@.str.13 = [16 x i8] c"RearCenter L/R \00"
@.str.14 = [17 x i8] c"FrontCenter L/R \00"
@.str.15 = [12 x i8] c"Rear Center\00"
@.str.16 = [10 x i8] c"Rear L/R \00"
@.str.17 = [14 x i8] c"Front Center \00"
@.str.18 = [5 x i8] c"LFE \00"
@.str.19 = [11 x i8] c"Front L/R \00"
@.str.20 = [44 x i8] c"Unknown Data Block type tag 0x%x, len 0x%x\0A\00"
@.str.21 = [34 x i8] c"End of DTD padding after %d DTDs\0A\00"
define void @show_cea_timing(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8
store i32* %0, i32** %3
store i8* %1, i8** %4
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
store i32 %16, i32* %7
%17 = load i32*, i32** %3
%18 = call i32 (i32*, i8*, ...) @fprintf(i32* %17, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%19 = load i32, i32* %7
%20 = icmp slt i32 %19, 4
br i1 %20, label %21, label %25
21: ; preds = %2
%22 = load i32*, i32** %3
%23 = load i32, i32* %7
%24 = call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %23)
br label %267
25: ; preds = %2
%26 = load i32, i32* %7
%27 = sub nsw i32 125, %26
%28 = sdiv i32 %27, 18
store i32 %28, i32* %8
%29 = load i32*, i32** %3
%30 = load i32, i32* %7
%31 = load i32, i32* %7
%32 = sub nsw i32 %31, 4
%33 = call i32 (i32*, i8*, ...) @fprintf(i32* %29, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0), i32 %30, i32 %32)
%34 = load i32*, i32** %3
%35 = load i32, i32* %8
%36 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i32 %35)
%37 = load i32*, i32** %3
%38 = load i8*, i8** %4
%39 = getelementptr inbounds i8, i8* %38, i64 3
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = and i32 %41, 15
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %37, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.4, i64 0, i64 0), i32 %42)
%44 = load i32*, i32** %3
%45 = load i8*, i8** %4
%46 = getelementptr inbounds i8, i8* %45, i64 3
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = and i32 %48, 128
%50 = icmp ne i32 %49, 0
%51 = zext i1 %50 to i64
%52 = select i1 %50, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0)
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %44, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i8* %52)
%54 = load i32*, i32** %3
%55 = load i8*, i8** %4
%56 = getelementptr inbounds i8, i8* %55, i64 3
%57 = load i8, i8* %56
%58 = zext i8 %57 to i32
%59 = and i32 %58, 64
%60 = icmp ne i32 %59, 0
%61 = zext i1 %60 to i64
%62 = select i1 %60, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0)
%63 = load i8*, i8** %4
%64 = getelementptr inbounds i8, i8* %63, i64 3
%65 = load i8, i8* %64
%66 = zext i8 %65 to i32
%67 = and i32 %66, 32
%68 = icmp ne i32 %67, 0
%69 = zext i1 %68 to i64
%70 = select i1 %68, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0)
%71 = load i8*, i8** %4
%72 = getelementptr inbounds i8, i8* %71, i64 3
%73 = load i8, i8* %72
%74 = zext i8 %73 to i32
%75 = and i32 %74, 16
%76 = icmp ne i32 %75, 0
%77 = zext i1 %76 to i64
%78 = select i1 %76, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0)
%79 = call i32 (i32*, i8*, ...) @fprintf(i32* %54, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0), i8* %62, i8* %70, i8* %78)
store i32 4, i32* %6
br label %80
80: ; preds = %216, %25
%81 = load i32, i32* %6
%82 = load i32, i32* %7
%83 = icmp slt i32 %81, %82
br i1 %83, label %84, label %221
84: ; preds = %80
%85 = load i8*, i8** %4
%86 = load i32, i32* %6
%87 = add nsw i32 %86, 0
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i8, i8* %85, i64 %88
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = and i32 %91, 31
store i32 %92, i32* %9
%93 = load i32, i32* %6
%94 = add nsw i32 %93, 1
store i32 %94, i32* %10
%95 = load i8*, i8** %4
%96 = load i32, i32* %6
%97 = add nsw i32 %96, 0
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds i8, i8* %95, i64 %98
%100 = load i8, i8* %99
%101 = zext i8 %100 to i32
%102 = ashr i32 %101, 5
switch i32 %102, label %204 [
i32 1, label %103
i32 2, label %108
i32 3, label %142
i32 4, label %148
i32 7, label %199
]
103: ; preds = %84
%104 = load i32*, i32** %3
%105 = load i8*, i8** %4
%106 = load i32, i32* %6
%107 = call i32 @show_audio_dbc(i32* %104, i8* %105, i32 %106)
br label %216
108: ; preds = %84
br label %109
109: ; preds = %116, %108
%110 = load i32, i32* %10
%111 = load i32, i32* %6
%112 = load i32, i32* %9
%113 = add nsw i32 %111, %112
%114 = add nsw i32 %113, 1
%115 = icmp slt i32 %110, %114
br i1 %115, label %116, label %141
116: ; preds = %109
%117 = load i8*, i8** %4
%118 = load i32, i32* %10
%119 = add nsw i32 %118, 0
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i8, i8* %117, i64 %120
%122 = load i8, i8* %121
%123 = zext i8 %122 to i32
%124 = and i32 %123, 127
store i32 %124, i32* %11
%125 = load i32*, i32** %3
%126 = load i32, i32* %11
%127 = load i8*, i8** %4
%128 = load i32, i32* %10
%129 = add nsw i32 %128, 0
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i8, i8* %127, i64 %130
%132 = load i8, i8* %131
%133 = zext i8 %132 to i32
%134 = and i32 %133, 128
%135 = icmp ne i32 %134, 0
%136 = zext i1 %135 to i64
%137 = select i1 %135, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%138 = call i32 (i32*, i8*, ...) @fprintf(i32* %125, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 %126, i8* %137)
%139 = load i32, i32* %10
%140 = add nsw i32 %139, 1
store i32 %140, i32* %10
br label %109
141: ; preds = %109
br label %216
142: ; preds = %84
%143 = load i32*, i32** %3
%144 = load i8*, i8** %4
%145 = load i32, i32* %6
%146 = add nsw i32 %145, 1
%147 = call i32 @show_vendor_dbc(i32* %143, i8* %144, i32 %146)
br label %216
148: ; preds = %84
%149 = load i8*, i8** %4
%150 = load i32, i32* %10
%151 = add nsw i32 %150, 0
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds i8, i8* %149, i64 %152
%154 = load i8, i8* %153
store i8 %154, i8* %12
%155 = load i32*, i32** %3
%156 = load i8, i8* %12
%157 = zext i8 %156 to i32
%158 = and i32 %157, 64
%159 = icmp ne i32 %158, 0
%160 = zext i1 %159 to i64
%161 = select i1 %159, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%162 = load i8, i8* %12
%163 = zext i8 %162 to i32
%164 = and i32 %163, 32
%165 = icmp ne i32 %164, 0
%166 = zext i1 %165 to i64
%167 = select i1 %165, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%168 = load i8, i8* %12
%169 = zext i8 %168 to i32
%170 = and i32 %169, 16
%171 = icmp ne i32 %170, 0
%172 = zext i1 %171 to i64
%173 = select i1 %171, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%174 = load i8, i8* %12
%175 = zext i8 %174 to i32
%176 = and i32 %175, 8
%177 = icmp ne i32 %176, 0
%178 = zext i1 %177 to i64
%179 = select i1 %177, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%180 = load i8, i8* %12
%181 = zext i8 %180 to i32
%182 = and i32 %181, 4
%183 = icmp ne i32 %182, 0
%184 = zext i1 %183 to i64
%185 = select i1 %183, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%186 = load i8, i8* %12
%187 = zext i8 %186 to i32
%188 = and i32 %187, 2
%189 = icmp ne i32 %188, 0
%190 = zext i1 %189 to i64
%191 = select i1 %189, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%192 = load i8, i8* %12
%193 = zext i8 %192 to i32
%194 = and i32 %193, 1
%195 = icmp ne i32 %194, 0
%196 = zext i1 %195 to i64
%197 = select i1 %195, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%198 = call i32 (i32*, i8*, ...) @fprintf(i32* %155, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i8* %161, i8* %167, i8* %173, i8* %179, i8* %185, i8* %191, i8* %197)
br label %216
199: ; preds = %84
%200 = load i32*, i32** %3
%201 = load i8*, i8** %4
%202 = load i32, i32* %6
%203 = call i32 @show_extended_dbc(i32* %200, i8* %201, i32 %202)
br label %216
204: ; preds = %84
%205 = load i32*, i32** %3
%206 = load i8*, i8** %4
%207 = load i32, i32* %6
%208 = add nsw i32 %207, 0
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds i8, i8* %206, i64 %209
%211 = load i8, i8* %210
%212 = zext i8 %211 to i32
%213 = ashr i32 %212, 5
%214 = load i32, i32* %9
%215 = call i32 (i32*, i8*, ...) @fprintf(i32* %205, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.20, i64 0, i64 0), i32 %213, i32 %214)
br label %216
216: ; preds = %204, %199, %148, %142, %141, %103
%217 = load i32, i32* %9
%218 = add nsw i32 %217, 1
%219 = load i32, i32* %6
%220 = add nsw i32 %219, %218
store i32 %220, i32* %6
br label %80
221: ; preds = %80
store i32 0, i32* %5
br label %222
222: ; preds = %264, %221
%223 = load i32, i32* %5
%224 = load i32, i32* %8
%225 = icmp slt i32 %223, %224
br i1 %225, label %226, label %267
226: ; preds = %222
%227 = load i8*, i8** %4
%228 = load i32, i32* %7
%229 = load i32, i32* %5
%230 = mul nsw i32 18, %229
%231 = add nsw i32 %228, %230
%232 = add nsw i32 %231, 0
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds i8, i8* %227, i64 %233
%235 = load i8, i8* %234
%236 = zext i8 %235 to i32
%237 = icmp eq i32 %236, 0
br i1 %237, label %238, label %254
238: ; preds = %226
%239 = load i8*, i8** %4
%240 = load i32, i32* %7
%241 = load i32, i32* %5
%242 = mul nsw i32 18, %241
%243 = add nsw i32 %240, %242
%244 = add nsw i32 %243, 1
%245 = sext i32 %244 to i64
%246 = getelementptr inbounds i8, i8* %239, i64 %245
%247 = load i8, i8* %246
%248 = zext i8 %247 to i32
%249 = icmp eq i32 %248, 0
br i1 %249, label %250, label %254
250: ; preds = %238
%251 = load i32*, i32** %3
%252 = load i32, i32* %5
%253 = call i32 (i32*, i8*, ...) @fprintf(i32* %251, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.21, i64 0, i64 0), i32 %252)
br label %267
254: ; preds = %238, %226
%255 = load i32*, i32** %3
%256 = load i8*, i8** %4
%257 = load i32, i32* %7
%258 = load i32, i32* %5
%259 = mul nsw i32 18, %258
%260 = add nsw i32 %257, %259
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds i8, i8* %256, i64 %261
%263 = call i32 @show_edid_dtd(i32* %255, i8* %262)
br label %264
264: ; preds = %254
%265 = load i32, i32* %5
%266 = add nsw i32 %265, 1
store i32 %266, i32* %5
br label %222
267: ; preds = %21, %250, %222
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Found CEA EDID Timing Extension rev 3\0A\00"
@.str.1 = [31 x i8] c"Block is empty (off_dtd = %d)\0A\00"
@.str.2 = [57 x i8] c"Block has DTDs starting at offset %d (%d bytes of DBCs)\0A\00"
@.str.3 = [41 x i8] c"There is space for %d DTDs in extension\0A\00"
@.str.4 = [59 x i8] c"There are %d native DTDs (between regular and extensions)\0A\00"
@.str.5 = [35 x i8] c"IT formats %sdefault to underscan\0A\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.7 = [8 x i8] c"do not \00"
@.str.8 = [54 x i8] c"Support: %sbasic audio, %sYCrCb 4:4:4, %sYCrCb 4:2:2\0A\00"
@.str.9 = [4 x i8] c"no \00"
@.str.10 = [19 x i8] c"Video: Code %d %s\0A\00"
@.str.11 = [9 x i8] c"(native)\00"
@.str.12 = [26 x i8] c"Speakers: %s%s%s%s%s%s%s\0A\00"
@.str.13 = [16 x i8] c"RearCenter L/R \00"
@.str.14 = [17 x i8] c"FrontCenter L/R \00"
@.str.15 = [12 x i8] c"Rear Center\00"
@.str.16 = [10 x i8] c"Rear L/R \00"
@.str.17 = [14 x i8] c"Front Center \00"
@.str.18 = [5 x i8] c"LFE \00"
@.str.19 = [11 x i8] c"Front L/R \00"
@.str.20 = [44 x i8] c"Unknown Data Block type tag 0x%x, len 0x%x\0A\00"
@.str.21 = [34 x i8] c"End of DTD padding after %d DTDs\0A\00"
define void @show_cea_timing(i32* %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 38, i64 1, i32* %0)
%7 = icmp ult i8 %4, 4
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %130
10: ; preds = %2
%11 = zext i8 %4 to i16
%12 = sub nsw i16 125, %11
%13 = sdiv i16 %12, 18
%14 = sext i16 %13 to i32
%15 = add nsw i32 %5, -4
%16 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %15)
%17 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i32 %14)
%18 = getelementptr inbounds i8, i8* %1, i64 3
%19 = load i8, i8* %18
%20 = and i8 %19, 15
%21 = zext i8 %20 to i32
%22 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.4, i64 0, i64 0), i32 %21)
%23 = load i8, i8* %18
%24 = icmp sgt i8 %23, -1
%25 = select i1 %24, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%26 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i8* %25)
%27 = load i8, i8* %18
%28 = zext i8 %27 to i32
%29 = and i32 %28, 64
%30 = icmp eq i32 %29, 0
%31 = select i1 %30, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%32 = and i32 %28, 32
%33 = icmp eq i32 %32, 0
%34 = select i1 %33, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%35 = and i32 %28, 16
%36 = icmp eq i32 %35, 0
%37 = select i1 %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%38 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0), i8* %31, i8* %34, i8* %37)
%39 = icmp eq i8 %4, 4
br i1 %39, label %42, label %46
40: ; preds = %108
%41 = icmp ult i8 %4, 108
br i1 %41, label %42, label %130
42: ; preds = %10, %40
%43 = zext i8 %4 to i64
%44 = call i32 @llvm.smax.i32(i32 %14, i32 1)
%45 = zext i32 %44 to i64
br label %111
46: ; preds = %10, %108
%47 = phi i32 [ %109, %108 ], [ 4, %10 ]
%48 = zext i32 %47 to i64
%49 = getelementptr inbounds i8, i8* %1, i64 %48
%50 = load i8, i8* %49
%51 = zext i8 %50 to i32
%52 = and i32 %51, 31
%53 = add nuw i32 %47, 1
%54 = lshr i32 %51, 5
switch i32 %54, label %106 [
i32 1, label %61
i32 2, label %55
i32 3, label %75
i32 4, label %77
i32 7, label %104
]
55: ; preds = %46
%56 = icmp eq i32 %52, 0
br i1 %56, label %108, label %57
57: ; preds = %55
%58 = add nuw nsw i32 %52, %47
%59 = zext i32 %53 to i64
%60 = zext i32 %58 to i64
br label %63
61: ; preds = %46
%62 = tail call i32 @show_audio_dbc(i32* %0, i8* %1, i32 %47)
br label %108
63: ; preds = %57, %63
%64 = phi i64 [ %59, %57 ], [ %73, %63 ]
%65 = getelementptr inbounds i8, i8* %1, i64 %64
%66 = load i8, i8* %65
%67 = zext i8 %66 to i32
%68 = and i32 %67, 127
%69 = and i32 %67, 128
%70 = icmp eq i32 %69, 0
%71 = select i1 %70, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0)
%72 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 %68, i8* %71)
%73 = add nuw nsw i64 %64, 1
%74 = icmp ult i64 %64, %60
br i1 %74, label %63, label %108
75: ; preds = %46
%76 = tail call i32 @show_vendor_dbc(i32* %0, i8* %1, i32 %53)
br label %108
77: ; preds = %46
%78 = zext i32 %53 to i64
%79 = getelementptr inbounds i8, i8* %1, i64 %78
%80 = load i8, i8* %79
%81 = zext i8 %80 to i32
%82 = and i32 %81, 64
%83 = icmp eq i32 %82, 0
%84 = select i1 %83, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0)
%85 = and i32 %81, 32
%86 = icmp eq i32 %85, 0
%87 = select i1 %86, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0)
%88 = and i32 %81, 16
%89 = icmp eq i32 %88, 0
%90 = select i1 %89, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0)
%91 = and i32 %81, 8
%92 = icmp eq i32 %91, 0
%93 = select i1 %92, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.16, i64 0, i64 0)
%94 = and i32 %81, 4
%95 = icmp eq i32 %94, 0
%96 = select i1 %95, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0)
%97 = and i32 %81, 2
%98 = icmp eq i32 %97, 0
%99 = select i1 %98, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0)
%100 = and i32 %81, 1
%101 = icmp eq i32 %100, 0
%102 = select i1 %101, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.19, i64 0, i64 0)
%103 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i8* %84, i8* %87, i8* %90, i8* %93, i8* %96, i8* %99, i8* %102)
br label %108
104: ; preds = %46
%105 = tail call i32 @show_extended_dbc(i32* %0, i8* %1, i32 %47)
br label %108
106: ; preds = %46
%107 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.20, i64 0, i64 0), i32 %54, i32 %52)
br label %108
108: ; preds = %63, %55, %106, %104, %77, %75, %61
%109 = add i32 %53, %52
%110 = icmp ult i32 %109, %5
br i1 %110, label %46, label %40
111: ; preds = %42, %126
%112 = phi i64 [ 0, %42 ], [ %128, %126 ]
%113 = mul nuw nsw i64 %112, 18
%114 = add nuw nsw i64 %113, %43
%115 = getelementptr inbounds i8, i8* %1, i64 %114
%116 = load i8, i8* %115
%117 = icmp eq i8 %116, 0
br i1 %117, label %118, label %126
118: ; preds = %111
%119 = add nuw nsw i64 %114, 1
%120 = getelementptr inbounds i8, i8* %1, i64 %119
%121 = load i8, i8* %120
%122 = icmp eq i8 %121, 0
br i1 %122, label %123, label %126
123: ; preds = %118
%124 = trunc i64 %112 to i32
%125 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.21, i64 0, i64 0), i32 %124)
br label %130
126: ; preds = %118, %111
%127 = tail call i32 @show_edid_dtd(i32* %0, i8* %115)
%128 = add nuw nsw i64 %112, 1
%129 = icmp eq i64 %128, %45
br i1 %129, label %130, label %111
130: ; preds = %126, %40, %123, %8
ret void
}