#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int truncate(double);
int main() {
  printf("#include <stdint.h>\n\n");
  printf("const uint16_t time_tab_ntsc[0x%X] = {\n", 0x400);
  for (int i = 0; i < 0x400; i += 8) {
    printf("\t");
    for (int j = i; j < i + 8; j++) {
      double time = ((double)j) * 6.0 / 5.0;
      printf("0x%04x, ", truncate(time));
    }
    printf("\n");
  }
  printf("};\n\n");
  printf("const uint16_t speed_tab_ntsc[0x%X] = {\n", 0x400);
  for (int i = 0; i < 0x400; i += 8) {
    printf("\t");
    for (int j = i; j < i + 8; j++) {
      double speed = ((double)j) * 5.0 / 6.0;
      printf("0x%04x, ", truncate(speed));
    }
    printf("\n");
  }
  printf("};\n\n");
  printf("const uint16_t time_tab_pal[0x%X] = {\n", 0x400);
  for (int i = 0; i < 0x400; i += 8) {
    printf("\t");
    for (int j = i; j < i + 8; j++)
      printf("0x%04X, ", j);
    printf("\n");
  }
  printf("};\n\n");
  printf("const uint16_t speed_tab_pal[0x%X] = {\n", 0x400);
  for (int i = 0; i < 0x400; i += 8) {
    printf("\t");
    for (int j = i; j < i + 8; j++)
      printf("0x%04x, ", j);
    printf("\n");
  }
  printf("};\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x400,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x400,-0x8(%rbp)
jge    11ef <main+0xcf>
lea    0xee3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x8,%ecx
cmp    %ecx,%eax
jge    11d3 <main+0xb3>
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xe6a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe66(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <truncate@plt>
mov    %eax,%esi
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1178 <main+0x58>
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x8(%rbp)
jmp    1157 <main+0x37>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe5a(%rip),%rdi
mov    $0x400,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x400,-0x1c(%rbp)
jge    12af <main+0x18f>
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x1c(%rbp),%ecx
add    $0x8,%ecx
cmp    %ecx,%eax
jge    1293 <main+0x173>
cvtsi2sdl -0x20(%rbp),%xmm0
movsd  0xdb2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd9e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1040 <truncate@plt>
mov    %eax,%esi
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1238 <main+0x118>
lea    0xdc2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x1c(%rbp)
jmp    1217 <main+0xf7>
lea    0xda3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdc3(%rip),%rdi
mov    $0x400,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x2c(%rbp)
cmpl   $0x400,-0x2c(%rbp)
jge    1344 <main+0x224>
lea    0xd63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x8,%ecx
cmp    %ecx,%eax
jge    1328 <main+0x208>
mov    -0x30(%rbp),%esi
lea    0xd9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    12f8 <main+0x1d8>
lea    0xd2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x2c(%rbp)
jmp    12d7 <main+0x1b7>
lea    0xd0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd5e(%rip),%rdi
mov    $0x400,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x400,-0x34(%rbp)
jge    13d9 <main+0x2b9>
lea    0xcce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x34(%rbp),%ecx
add    $0x8,%ecx
cmp    %ecx,%eax
jge    13bd <main+0x29d>
mov    -0x38(%rbp),%esi
lea    0xca8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    138d <main+0x26d>
lea    0xc98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x34(%rbp)
jmp    136c <main+0x24c>
lea    0xc79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xf7f(%rip),%rdi
call   1040 <puts@plt>
lea    0xec1(%rip),%rdi
mov    $0x400,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xorpd  %xmm0,%xmm0
movsd  %xmm0,(%rsp)
mov    $0x7,%ebx
lea    0xec8(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    $0x9,%edi
call   1030 <putchar@plt>
movsd  (%rsp),%xmm0
movsd  0xe69(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe65(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x6(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe36(%rip),%xmm0
divsd  0xe36(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x5(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe0b(%rip),%xmm0
divsd  0xe0b(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x4(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xde0(%rip),%xmm0
divsd  0xde0(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x3(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xdb5(%rip),%xmm0
divsd  0xdb5(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x2(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xd8a(%rip),%xmm0
divsd  0xd8a(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x1(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xd5f(%rip),%xmm0
divsd  0xd5f(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0xd37(%rip),%xmm0
divsd  0xd37(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  (%rsp),%xmm0
addsd  0xd21(%rip),%xmm0
movsd  %xmm0,(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x8(%rbx),%eax
add    $0xfffffff9,%ebx
cmp    $0x3f8,%ebx
mov    %eax,%ebx
jb     1180 <main+0x40>
lea    0xdc6(%rip),%rdi
call   1040 <puts@plt>
lea    0xd24(%rip),%rdi
mov    $0x400,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xorpd  %xmm0,%xmm0
movsd  %xmm0,(%rsp)
mov    $0x7,%ebx
lea    0xcfa(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    $0x9,%edi
call   1030 <putchar@plt>
movsd  (%rsp),%xmm0
movsd  0xca1(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc8d(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x6(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xc6e(%rip),%xmm0
divsd  0xc5e(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x5(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xc43(%rip),%xmm0
divsd  0xc33(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x4(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xc18(%rip),%xmm0
divsd  0xc08(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x3(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xbed(%rip),%xmm0
divsd  0xbdd(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x2(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xbc2(%rip),%xmm0
divsd  0xbb2(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x1(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xb97(%rip),%xmm0
divsd  0xb87(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0xb6f(%rip),%xmm0
divsd  0xb5f(%rip),%xmm0
call   1060 <truncate@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  (%rsp),%xmm0
addsd  0xb51(%rip),%xmm0
movsd  %xmm0,(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x8(%rbx),%eax
add    $0xfffffff9,%ebx
cmp    $0x3f8,%ebx
mov    %eax,%ebx
jb     1350 <main+0x210>
lea    0xbf6(%rip),%rdi
call   1040 <puts@plt>
lea    0xb7d(%rip),%rdi
mov    $0x400,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xb91(%rip),%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x2(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x3(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x4(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x5(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x6(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x7(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x8(%rbx),%eax
cmp    $0x3f8,%ebx
mov    %eax,%ebx
jb     1510 <main+0x3d0>
lea    0xb3c(%rip),%rdi
call   1040 <puts@plt>
lea    0xaf3(%rip),%rdi
mov    $0x400,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xa7e(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x2(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x3(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x4(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x5(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x6(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x7(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x8(%rbx),%eax
cmp    $0x3f8,%ebx
mov    %eax,%ebx
jb     15d0 <main+0x490>
lea    0xa7c(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [22 x i8] c"#include <stdint.h>\0A\0A\00"
@.str.1 = [40 x i8] c"const uint16_t time_tab_ntsc[0x%X] = {\0A\00"
@.str.2 = [2 x i8] c"\09\00"
@.str.3 = [9 x i8] c"0x%04x, \00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [5 x i8] c"};\0A\0A\00"
@.str.6 = [41 x i8] c"const uint16_t speed_tab_ntsc[0x%X] = {\0A\00"
@.str.7 = [39 x i8] c"const uint16_t time_tab_pal[0x%X] = {\0A\00"
@.str.8 = [9 x i8] c"0x%04X, \00"
@.str.9 = [40 x i8] c"const uint16_t speed_tab_pal[0x%X] = {\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 1024)
store i32 0, i32* %2
br label %14
14: ; preds = %38, %0
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 1024
br i1 %16, label %17, label %41
17: ; preds = %14
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%19 = load i32, i32* %2
store i32 %19, i32* %3
br label %20
20: ; preds = %33, %17
%21 = load i32, i32* %3
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 8
%24 = icmp slt i32 %21, %23
br i1 %24, label %25, label %36
25: ; preds = %20
%26 = load i32, i32* %3
%27 = sitofp i32 %26 to double
%28 = fmul double %27, 6.000000e+00
%29 = fdiv double %28, 5.000000e+00
store double %29, double* %4
%30 = load double, double* %4
%31 = call i32 @truncate(double %30)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %31)
br label %33
33: ; preds = %25
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
store i32 %35, i32* %3
br label %20
36: ; preds = %20
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %38
38: ; preds = %36
%39 = load i32, i32* %2
%40 = add nsw i32 %39, 8
store i32 %40, i32* %2
br label %14
41: ; preds = %14
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0), i32 1024)
store i32 0, i32* %5
br label %44
44: ; preds = %68, %41
%45 = load i32, i32* %5
%46 = icmp slt i32 %45, 1024
br i1 %46, label %47, label %71
47: ; preds = %44
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%49 = load i32, i32* %5
store i32 %49, i32* %6
br label %50
50: ; preds = %63, %47
%51 = load i32, i32* %6
%52 = load i32, i32* %5
%53 = add nsw i32 %52, 8
%54 = icmp slt i32 %51, %53
br i1 %54, label %55, label %66
55: ; preds = %50
%56 = load i32, i32* %6
%57 = sitofp i32 %56 to double
%58 = fmul double %57, 5.000000e+00
%59 = fdiv double %58, 6.000000e+00
store double %59, double* %7
%60 = load double, double* %7
%61 = call i32 @truncate(double %60)
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %61)
br label %63
63: ; preds = %55
%64 = load i32, i32* %6
%65 = add nsw i32 %64, 1
store i32 %65, i32* %6
br label %50
66: ; preds = %50
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %68
68: ; preds = %66
%69 = load i32, i32* %5
%70 = add nsw i32 %69, 8
store i32 %70, i32* %5
br label %44
71: ; preds = %44
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i32 1024)
store i32 0, i32* %8
br label %74
74: ; preds = %93, %71
%75 = load i32, i32* %8
%76 = icmp slt i32 %75, 1024
br i1 %76, label %77, label %96
77: ; preds = %74
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%79 = load i32, i32* %8
store i32 %79, i32* %9
br label %80
80: ; preds = %88, %77
%81 = load i32, i32* %9
%82 = load i32, i32* %8
%83 = add nsw i32 %82, 8
%84 = icmp slt i32 %81, %83
br i1 %84, label %85, label %91
85: ; preds = %80
%86 = load i32, i32* %9
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %86)
br label %88
88: ; preds = %85
%89 = load i32, i32* %9
%90 = add nsw i32 %89, 1
store i32 %90, i32* %9
br label %80
91: ; preds = %80
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %93
93: ; preds = %91
%94 = load i32, i32* %8
%95 = add nsw i32 %94, 8
store i32 %95, i32* %8
br label %74
96: ; preds = %74
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i32 1024)
store i32 0, i32* %10
br label %99
99: ; preds = %118, %96
%100 = load i32, i32* %10
%101 = icmp slt i32 %100, 1024
br i1 %101, label %102, label %121
102: ; preds = %99
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%104 = load i32, i32* %10
store i32 %104, i32* %11
br label %105
105: ; preds = %113, %102
%106 = load i32, i32* %11
%107 = load i32, i32* %10
%108 = add nsw i32 %107, 8
%109 = icmp slt i32 %106, %108
br i1 %109, label %110, label %116
110: ; preds = %105
%111 = load i32, i32* %11
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %111)
br label %113
113: ; preds = %110
%114 = load i32, i32* %11
%115 = add nsw i32 %114, 1
store i32 %115, i32* %11
br label %105
116: ; preds = %105
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %118
118: ; preds = %116
%119 = load i32, i32* %10
%120 = add nsw i32 %119, 8
store i32 %120, i32* %10
br label %99
121: ; preds = %99
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [40 x i8] c"const uint16_t time_tab_ntsc[0x%X] = {\0A\00"
@.str.3 = [9 x i8] c"0x%04x, \00"
@.str.6 = [41 x i8] c"const uint16_t speed_tab_ntsc[0x%X] = {\0A\00"
@.str.7 = [39 x i8] c"const uint16_t time_tab_pal[0x%X] = {\0A\00"
@.str.8 = [9 x i8] c"0x%04X, \00"
@.str.9 = [40 x i8] c"const uint16_t speed_tab_pal[0x%X] = {\0A\00"
@str = [21 x i8] c"#include <stdint.h>\0A\00"
@str.13 = [4 x i8] c"};\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 1024)
br label %6
3: ; preds = %6
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.13, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0), i32 1024)
br label %62
6: ; preds = %0, %6
%7 = phi i32 [ 0, %0 ], [ %56, %6 ]
%8 = tail call i32 @putchar(i32 9)
%9 = sitofp i32 %7 to double
%10 = fmul double %9, 6.000000e+00
%11 = fdiv double %10, 5.000000e+00
%12 = tail call i32 @truncate(double %11)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = or i32 %7, 1
%15 = sitofp i32 %14 to double
%16 = fmul double %15, 6.000000e+00
%17 = fdiv double %16, 5.000000e+00
%18 = tail call i32 @truncate(double %17)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %18)
%20 = or i32 %7, 2
%21 = sitofp i32 %20 to double
%22 = fmul double %21, 6.000000e+00
%23 = fdiv double %22, 5.000000e+00
%24 = tail call i32 @truncate(double %23)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %24)
%26 = or i32 %7, 3
%27 = sitofp i32 %26 to double
%28 = fmul double %27, 6.000000e+00
%29 = fdiv double %28, 5.000000e+00
%30 = tail call i32 @truncate(double %29)
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %30)
%32 = or i32 %7, 4
%33 = sitofp i32 %32 to double
%34 = fmul double %33, 6.000000e+00
%35 = fdiv double %34, 5.000000e+00
%36 = tail call i32 @truncate(double %35)
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %36)
%38 = or i32 %7, 5
%39 = sitofp i32 %38 to double
%40 = fmul double %39, 6.000000e+00
%41 = fdiv double %40, 5.000000e+00
%42 = tail call i32 @truncate(double %41)
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %42)
%44 = or i32 %7, 6
%45 = sitofp i32 %44 to double
%46 = fmul double %45, 6.000000e+00
%47 = fdiv double %46, 5.000000e+00
%48 = tail call i32 @truncate(double %47)
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %48)
%50 = or i32 %7, 7
%51 = sitofp i32 %50 to double
%52 = fmul double %51, 6.000000e+00
%53 = fdiv double %52, 5.000000e+00
%54 = tail call i32 @truncate(double %53)
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %54)
%56 = add nuw nsw i32 %7, 8
%57 = tail call i32 @putchar(i32 10)
%58 = icmp ult i32 %7, 1016
br i1 %58, label %6, label %3
59: ; preds = %62
%60 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.13, i64 0, i64 0))
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i32 1024)
br label %118
62: ; preds = %3, %62
%63 = phi i32 [ 0, %3 ], [ %112, %62 ]
%64 = tail call i32 @putchar(i32 9)
%65 = sitofp i32 %63 to double
%66 = fmul double %65, 5.000000e+00
%67 = fdiv double %66, 6.000000e+00
%68 = tail call i32 @truncate(double %67)
%69 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %68)
%70 = or i32 %63, 1
%71 = sitofp i32 %70 to double
%72 = fmul double %71, 5.000000e+00
%73 = fdiv double %72, 6.000000e+00
%74 = tail call i32 @truncate(double %73)
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %74)
%76 = or i32 %63, 2
%77 = sitofp i32 %76 to double
%78 = fmul double %77, 5.000000e+00
%79 = fdiv double %78, 6.000000e+00
%80 = tail call i32 @truncate(double %79)
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %80)
%82 = or i32 %63, 3
%83 = sitofp i32 %82 to double
%84 = fmul double %83, 5.000000e+00
%85 = fdiv double %84, 6.000000e+00
%86 = tail call i32 @truncate(double %85)
%87 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %86)
%88 = or i32 %63, 4
%89 = sitofp i32 %88 to double
%90 = fmul double %89, 5.000000e+00
%91 = fdiv double %90, 6.000000e+00
%92 = tail call i32 @truncate(double %91)
%93 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %92)
%94 = or i32 %63, 5
%95 = sitofp i32 %94 to double
%96 = fmul double %95, 5.000000e+00
%97 = fdiv double %96, 6.000000e+00
%98 = tail call i32 @truncate(double %97)
%99 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %98)
%100 = or i32 %63, 6
%101 = sitofp i32 %100 to double
%102 = fmul double %101, 5.000000e+00
%103 = fdiv double %102, 6.000000e+00
%104 = tail call i32 @truncate(double %103)
%105 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %104)
%106 = or i32 %63, 7
%107 = sitofp i32 %106 to double
%108 = fmul double %107, 5.000000e+00
%109 = fdiv double %108, 6.000000e+00
%110 = tail call i32 @truncate(double %109)
%111 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %110)
%112 = add nuw nsw i32 %63, 8
%113 = tail call i32 @putchar(i32 10)
%114 = icmp ult i32 %63, 1016
br i1 %114, label %62, label %59
115: ; preds = %118
%116 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.13, i64 0, i64 0))
%117 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i32 1024)
br label %141
118: ; preds = %59, %118
%119 = phi i32 [ 0, %59 ], [ %136, %118 ]
%120 = tail call i32 @putchar(i32 9)
%121 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %119)
%122 = or i32 %119, 1
%123 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %122)
%124 = or i32 %119, 2
%125 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %124)
%126 = or i32 %119, 3
%127 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %126)
%128 = or i32 %119, 4
%129 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %128)
%130 = or i32 %119, 5
%131 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %130)
%132 = or i32 %119, 6
%133 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %132)
%134 = or i32 %119, 7
%135 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %134)
%136 = add nuw nsw i32 %119, 8
%137 = tail call i32 @putchar(i32 10)
%138 = icmp ult i32 %119, 1016
br i1 %138, label %118, label %115
139: ; preds = %141
%140 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.13, i64 0, i64 0))
ret i32 0
141: ; preds = %115, %141
%142 = phi i32 [ 0, %115 ], [ %159, %141 ]
%143 = tail call i32 @putchar(i32 9)
%144 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %142)
%145 = or i32 %142, 1
%146 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %145)
%147 = or i32 %142, 2
%148 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %147)
%149 = or i32 %142, 3
%150 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %149)
%151 = or i32 %142, 4
%152 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %151)
%153 = or i32 %142, 5
%154 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %153)
%155 = or i32 %142, 6
%156 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %155)
%157 = or i32 %142, 7
%158 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %157)
%159 = add nuw nsw i32 %142, 8
%160 = tail call i32 @putchar(i32 10)
%161 = icmp ult i32 %142, 1016
br i1 %161, label %141, label %139
}