#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 */
double atan(int);
double log10(int);
int /*<<< orphan*/ printf(char *, ...);
double sin(int);
double sqrt(int);
int main(int argc, char *argv[]) {
  int i;
  double val;
  int ival;
  printf("/* THIS FILE WAS AUTOMATICALLY GENERATED - ANY MODIFICATIONS MADE TO "
         "THIS");
  printf(
      "   FILE MAY BE OVERWRITTEN DURING FUTURE BUILDS OF THE SOFTWARE */\n");
  printf("\n");
  printf("static const uint16_t fixed_reciprocal_table[129] =\n");
  printf("{\n");
  for (i = 0; i < 129; i++) {
    val = 32768.0 * 128.0 / (128 + i) + 0.5;
    ival = (int)val;
    if (i < 128)
      printf("    %6d,\n", ival);
    else
      printf("    %6d\n", ival);
  }
  printf("};\n\n");
  printf("static const uint16_t fixed_sqrt_table[193] =\n");
  printf("{\n");
  for (i = 64; i <= 256; i++) {
    ival = (int)(sqrt(i / 256.0) * 65536.0 + 0.5);
    if (ival > 65535)
      ival = 65535;
    if (i < 256)
      printf("    %6d,\n", ival);
    else
      printf("    %6d\n", ival);
  }
  printf("};\n\n");
  printf("static const int16_t fixed_log10_table[129] =\n");
  printf("{\n");
  for (i = 128; i <= 256; i++) {
    ival = (int)(log10(i / 256.0) * 32768.0 - 0.5);
    if (i <= 255)
      printf("    %6d,\n", ival);
    else
      printf("    %6d\n", ival);
  }
  printf("};\n\n");
  printf("static const int16_t fixed_sine_table[257] =\n");
  printf("{\n");
  for (i = 0; i <= 256; i++) {
    val = sin(i * 3.1415926535 / 512.0) * 32768.0;
    ival = (int)(val + 0.5);
    if (ival > 32767)
      ival = 32767;
    if (i <= 255)
      printf("    %6d,\n", ival);
    else
      printf("    %6d\n", ival);
  }
  printf("};\n\n");
  printf("static const uint16_t fixed_arctan_table[257] =\n");
  printf("{\n");
  for (i = 0; i <= 256; i++) {
    val = atan(i / 256.0) * 65536.0 / (2.0 * 3.1415926535);
    ival = (int)(val + 0.5);
    if (ival == 0)
      ival = 1;
    if (i <= 255)
      printf("    %6d,\n", ival);
    else
      printf("    %6d\n", ival);
  }
  printf("};\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x81,-0x14(%rbp)
jge    1238 <main+0xe8>
mov    -0x14(%rbp),%eax
add    $0x80,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe6c(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xe20(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
cvttsd2si -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x80,-0x14(%rbp)
jge    1214 <main+0xc4>
mov    -0x24(%rbp),%esi
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1225 <main+0xd5>
mov    -0x24(%rbp),%esi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122a <main+0xda>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11b3 <main+0x63>
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x40,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jg     130a <main+0x1ba>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xd95(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sqrt@plt>
movsd  0xd78(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd5c(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0xffff,-0x24(%rbp)
jle    12c3 <main+0x173>
movl   $0xffff,-0x24(%rbp)
cmpl   $0x100,-0x14(%rbp)
jge    12e6 <main+0x196>
mov    -0x24(%rbp),%esi
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12f7 <main+0x1a7>
mov    -0x24(%rbp),%esi
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12fc <main+0x1ac>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1269 <main+0x119>
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdde(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x80,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jg     13c8 <main+0x278>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xcc3(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1060 <log10@plt>
movsd  0xcb6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcc2(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0xff,-0x14(%rbp)
jg     13a4 <main+0x254>
mov    -0x24(%rbp),%esi
lea    0xd76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13b5 <main+0x265>
mov    -0x24(%rbp),%esi
lea    0xd6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13ba <main+0x26a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    133b <main+0x1eb>
lea    0xd52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xda7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jg     14ac <main+0x35c>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xc1d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc09(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
movsd  0xbec(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xbbb(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x7fff,-0x24(%rbp)
jle    1465 <main+0x315>
movl   $0x7fff,-0x24(%rbp)
cmpl   $0xff,-0x14(%rbp)
jg     1488 <main+0x338>
mov    -0x24(%rbp),%esi
lea    0xc92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1499 <main+0x349>
mov    -0x24(%rbp),%esi
lea    0xc86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    149e <main+0x34e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13f9 <main+0x2a9>
lea    0xc6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc3c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jg     158d <main+0x43d>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xb21(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <atan@plt>
movsd  0xb04(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xaf0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xad7(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    1546 <main+0x3f6>
movl   $0x1,-0x24(%rbp)
cmpl   $0xff,-0x14(%rbp)
jg     1569 <main+0x419>
mov    -0x24(%rbp),%esi
lea    0xbb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    157a <main+0x42a>
mov    -0x24(%rbp),%esi
lea    0xba5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    157f <main+0x42f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    14dd <main+0x38d>
lea    0xb8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf1c(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf49(%rip),%rdi
call   1040 <puts@plt>
lea    0x102a(%rip),%rdi
call   1040 <puts@plt>
mov    $0x8000,%esi
mov    $0x81,%ebp
lea    0xed1(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  0xe17(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  0xe13(%rip),%xmm1
cvttsd2si %xmm1,%esi
add    $0x1,%ebp
cmp    $0x101,%ebp
jne    11d0 <main+0x60>
lea    0xe91(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xfbe(%rip),%rdi
call   1040 <puts@plt>
lea    0xef7(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa4(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1090 <sqrt@plt>
mulsd  0xdcb(%rip),%xmm0
addsd  0xdbb(%rip),%xmm0
cvttsd2si %xmm0,%esi
cmp    $0xffff,%esi
mov    $0xffff,%r14d
cmovge %r14d,%esi
mov    $0x41,%ebp
lea    0xe25(%rip),%rbx
nopl   (%rax)
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0xd8f(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1090 <sqrt@plt>
mulsd  0xd76(%rip),%xmm0
addsd  0xd66(%rip),%xmm0
cvttsd2si %xmm0,%esi
cmp    $0xffff,%esi
cmovge %r14d,%esi
add    $0x1,%ebp
cmp    $0x101,%ebp
jne    1270 <main+0x100>
lea    0xdda(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf07(%rip),%rdi
call   1040 <puts@plt>
lea    0xe6e(%rip),%rdi
call   1040 <puts@plt>
lea    0xeed(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <log10@plt>
mulsd  0xd24(%rip),%xmm0
addsd  0xd24(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    $0x81,%ebp
lea    0xd7e(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0xcdf(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1080 <log10@plt>
mulsd  0xcd6(%rip),%xmm0
addsd  0xcd6(%rip),%xmm0
cvttsd2si %xmm0,%esi
add    $0x1,%ebp
cmp    $0x101,%ebp
jne    1320 <main+0x1b0>
lea    0xd34(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe61(%rip),%rdi
call   1040 <puts@plt>
lea    0xdf6(%rip),%rdi
call   1040 <puts@plt>
lea    0xe47(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1060 <sin@plt>
mulsd  0xc7e(%rip),%xmm0
addsd  0xc5e(%rip),%xmm0
cvttsd2si %xmm0,%esi
cmp    $0x7fff,%esi
mov    $0x7fff,%r14d
cmovge %r14d,%esi
mov    $0x1,%ebp
lea    0xcc8(%rip),%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0xc47(%rip),%xmm0
mulsd  0xc47(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1060 <sin@plt>
mulsd  0xc1e(%rip),%xmm0
addsd  0xbfe(%rip),%xmm0
cvttsd2si %xmm0,%esi
cmp    $0x7fff,%esi
cmovge %r14d,%esi
add    $0x1,%ebp
cmp    $0x101,%ebp
jne    13d0 <main+0x260>
lea    0xc72(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd9f(%rip),%rdi
call   1040 <puts@plt>
lea    0xd61(%rip),%rdi
call   1040 <puts@plt>
lea    0xd85(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1070 <atan@plt>
mulsd  0xbac(%rip),%xmm0
divsd  0xbd4(%rip),%xmm0
addsd  0xb94(%rip),%xmm0
cvttsd2si %xmm0,%esi
test   %esi,%esi
mov    $0x1,%r14d
cmove  %r14d,%esi
lea    0xc07(%rip),%rbx
mov    $0x1,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0xb6f(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1070 <atan@plt>
mulsd  0xb56(%rip),%xmm0
divsd  0xb7e(%rip),%xmm0
addsd  0xb3e(%rip),%xmm0
cvttsd2si %xmm0,%esi
test   %esi,%esi
cmove  %r14d,%esi
add    $0x1,%ebp
cmp    $0x101,%ebp
jne    1490 <main+0x320>
lea    0xbb6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xce3(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [74 x i8] c"/* THIS FILE WAS AUTOMATICALLY GENERATED - ANY MODIFICATIONS MADE TO THIS\00"
@.str.1 = [68 x i8] c" FILE MAY BE OVERWRITTEN DURING FUTURE BUILDS OF THE SOFTWARE */\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [53 x i8] c"static const uint16_t fixed_reciprocal_table[129] =\0A\00"
@.str.4 = [3 x i8] c"{\0A\00"
@.str.5 = [10 x i8] c" %6d,\0A\00"
@.str.6 = [9 x i8] c" %6d\0A\00"
@.str.7 = [5 x i8] c"};\0A\0A\00"
@.str.8 = [47 x i8] c"static const uint16_t fixed_sqrt_table[193] =\0A\00"
@.str.9 = [47 x i8] c"static const int16_t fixed_log10_table[129] =\0A\00"
@.str.10 = [46 x i8] c"static const int16_t fixed_sine_table[257] =\0A\00"
@.str.11 = [49 x i8] c"static const uint16_t fixed_arctan_table[257] =\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %6
br label %14
14: ; preds = %34, %2
%15 = load i32, i32* %6
%16 = icmp slt i32 %15, 129
br i1 %16, label %17, label %37
17: ; preds = %14
%18 = load i32, i32* %6
%19 = add nsw i32 128, %18
%20 = sitofp i32 %19 to double
%21 = fdiv double 0x4150000000000000, %20
%22 = fadd double %21, 5.000000e-01
store double %22, double* %7
%23 = load double, double* %7
%24 = fptosi double %23 to i32
store i32 %24, i32* %8
%25 = load i32, i32* %6
%26 = icmp slt i32 %25, 128
br i1 %26, label %27, label %30
27: ; preds = %17
%28 = load i32, i32* %8
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %28)
br label %33
30: ; preds = %17
%31 = load i32, i32* %8
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %31)
br label %33
33: ; preds = %30, %27
br label %34
34: ; preds = %33
%35 = load i32, i32* %6
%36 = add nsw i32 %35, 1
store i32 %36, i32* %6
br label %14
37: ; preds = %14
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0))
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32 64, i32* %6
br label %41
41: ; preds = %65, %37
%42 = load i32, i32* %6
%43 = icmp sle i32 %42, 256
br i1 %43, label %44, label %68
44: ; preds = %41
%45 = load i32, i32* %6
%46 = sitofp i32 %45 to double
%47 = fdiv double %46, 2.560000e+02
%48 = fptosi double %47 to i32
%49 = call double @sqrt(i32 %48)
%50 = call double @llvm.fmuladd.f64(double %49, double 6.553600e+04, double 5.000000e-01)
%51 = fptosi double %50 to i32
store i32 %51, i32* %8
%52 = load i32, i32* %8
%53 = icmp sgt i32 %52, 65535
br i1 %53, label %54, label %55
54: ; preds = %44
store i32 65535, i32* %8
br label %55
55: ; preds = %54, %44
%56 = load i32, i32* %6
%57 = icmp slt i32 %56, 256
br i1 %57, label %58, label %61
58: ; preds = %55
%59 = load i32, i32* %8
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %59)
br label %64
61: ; preds = %55
%62 = load i32, i32* %8
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %62)
br label %64
64: ; preds = %61, %58
br label %65
65: ; preds = %64
%66 = load i32, i32* %6
%67 = add nsw i32 %66, 1
store i32 %67, i32* %6
br label %41
68: ; preds = %41
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.9, i64 0, i64 0))
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32 128, i32* %6
br label %72
72: ; preds = %92, %68
%73 = load i32, i32* %6
%74 = icmp sle i32 %73, 256
br i1 %74, label %75, label %95
75: ; preds = %72
%76 = load i32, i32* %6
%77 = sitofp i32 %76 to double
%78 = fdiv double %77, 2.560000e+02
%79 = fptosi double %78 to i32
%80 = call double @log10(i32 %79)
%81 = call double @llvm.fmuladd.f64(double %80, double 3.276800e+04, double -5.000000e-01)
%82 = fptosi double %81 to i32
store i32 %82, i32* %8
%83 = load i32, i32* %6
%84 = icmp sle i32 %83, 255
br i1 %84, label %85, label %88
85: ; preds = %75
%86 = load i32, i32* %8
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %86)
br label %91
88: ; preds = %75
%89 = load i32, i32* %8
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %89)
br label %91
91: ; preds = %88, %85
br label %92
92: ; preds = %91
%93 = load i32, i32* %6
%94 = add nsw i32 %93, 1
store i32 %94, i32* %6
br label %72
95: ; preds = %72
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.10, i64 0, i64 0))
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %6
br label %99
99: ; preds = %126, %95
%100 = load i32, i32* %6
%101 = icmp sle i32 %100, 256
br i1 %101, label %102, label %129
102: ; preds = %99
%103 = load i32, i32* %6
%104 = sitofp i32 %103 to double
%105 = fmul double %104, 0x400921FB54411744
%106 = fdiv double %105, 5.120000e+02
%107 = fptosi double %106 to i32
%108 = call double @sin(i32 %107)
%109 = fmul double %108, 3.276800e+04
store double %109, double* %7
%110 = load double, double* %7
%111 = fadd double %110, 5.000000e-01
%112 = fptosi double %111 to i32
store i32 %112, i32* %8
%113 = load i32, i32* %8
%114 = icmp sgt i32 %113, 32767
br i1 %114, label %115, label %116
115: ; preds = %102
store i32 32767, i32* %8
br label %116
116: ; preds = %115, %102
%117 = load i32, i32* %6
%118 = icmp sle i32 %117, 255
br i1 %118, label %119, label %122
119: ; preds = %116
%120 = load i32, i32* %8
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %120)
br label %125
122: ; preds = %116
%123 = load i32, i32* %8
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %123)
br label %125
125: ; preds = %122, %119
br label %126
126: ; preds = %125
%127 = load i32, i32* %6
%128 = add nsw i32 %127, 1
store i32 %128, i32* %6
br label %99
129: ; preds = %99
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.11, i64 0, i64 0))
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %6
br label %133
133: ; preds = %160, %129
%134 = load i32, i32* %6
%135 = icmp sle i32 %134, 256
br i1 %135, label %136, label %163
136: ; preds = %133
%137 = load i32, i32* %6
%138 = sitofp i32 %137 to double
%139 = fdiv double %138, 2.560000e+02
%140 = fptosi double %139 to i32
%141 = call double @atan(i32 %140)
%142 = fmul double %141, 6.553600e+04
%143 = fdiv double %142, 0x401921FB54411744
store double %143, double* %7
%144 = load double, double* %7
%145 = fadd double %144, 5.000000e-01
%146 = fptosi double %145 to i32
store i32 %146, i32* %8
%147 = load i32, i32* %8
%148 = icmp eq i32 %147, 0
br i1 %148, label %149, label %150
149: ; preds = %136
store i32 1, i32* %8
br label %150
150: ; preds = %149, %136
%151 = load i32, i32* %6
%152 = icmp sle i32 %151, 255
br i1 %152, label %153, label %156
153: ; preds = %150
%154 = load i32, i32* %8
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %154)
br label %159
156: ; preds = %150
%157 = load i32, i32* %8
%158 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %157)
br label %159
159: ; preds = %156, %153
br label %160
160: ; preds = %159
%161 = load i32, i32* %6
%162 = add nsw i32 %161, 1
store i32 %162, i32* %6
br label %133
163: ; preds = %133
%164 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [74 x i8] c"/* THIS FILE WAS AUTOMATICALLY GENERATED - ANY MODIFICATIONS MADE TO THIS\00"
@.str.5 = [10 x i8] c" %6d,\0A\00"
@.str.6 = [9 x i8] c" %6d\0A\00"
@str = [67 x i8] c" FILE MAY BE OVERWRITTEN DURING FUTURE BUILDS OF THE SOFTWARE */\00"
@str.12 = [52 x i8] c"static const uint16_t fixed_reciprocal_table[129] =\00"
@str.15 = [46 x i8] c"static const uint16_t fixed_sqrt_table[193] =\00"
@str.18 = [46 x i8] c"static const int16_t fixed_log10_table[129] =\00"
@str.21 = [45 x i8] c"static const int16_t fixed_sine_table[257] =\00"
@str.24 = [48 x i8] c"static const uint16_t fixed_arctan_table[257] =\00"
@str.25 = [2 x i8] c"{\00"
@str.26 = [4 x i8] c"};\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.12, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.25, i64 0, i64 0))
br label %8
8: ; preds = %2, %8
%9 = phi i32 [ 32768, %2 ], [ %17, %8 ]
%10 = phi i32 [ 0, %2 ], [ %12, %8 ]
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %9)
%12 = add nuw nsw i32 %10, 1
%13 = add nuw nsw i32 %10, 129
%14 = sitofp i32 %13 to double
%15 = fdiv double 0x4150000000000000, %14
%16 = fadd double %15, 5.000000e-01
%17 = fptosi double %16 to i32
%18 = icmp eq i32 %12, 128
br i1 %18, label %19, label %8
19: ; preds = %8
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %17)
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.26, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.15, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.25, i64 0, i64 0))
%24 = tail call double @sqrt(i32 0)
%25 = tail call double @llvm.fmuladd.f64(double %24, double 6.553600e+04, double 5.000000e-01)
%26 = fptosi double %25 to i32
%27 = icmp slt i32 %26, 65535
%28 = select i1 %27, i32 %26, i32 65535
br label %29
29: ; preds = %19, %29
%30 = phi i32 [ %28, %19 ], [ %41, %29 ]
%31 = phi i32 [ 64, %19 ], [ %33, %29 ]
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %30)
%33 = add nuw nsw i32 %31, 1
%34 = sitofp i32 %33 to double
%35 = fmul double %34, 3.906250e-03
%36 = fptosi double %35 to i32
%37 = tail call double @sqrt(i32 %36)
%38 = tail call double @llvm.fmuladd.f64(double %37, double 6.553600e+04, double 5.000000e-01)
%39 = fptosi double %38 to i32
%40 = icmp slt i32 %39, 65535
%41 = select i1 %40, i32 %39, i32 65535
%42 = icmp eq i32 %33, 256
br i1 %42, label %43, label %29
43: ; preds = %29
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %41)
%45 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.26, i64 0, i64 0))
%46 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.18, i64 0, i64 0))
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.25, i64 0, i64 0))
%48 = tail call double @log10(i32 0)
%49 = tail call double @llvm.fmuladd.f64(double %48, double 3.276800e+04, double -5.000000e-01)
%50 = fptosi double %49 to i32
br label %51
51: ; preds = %43, %51
%52 = phi i32 [ %50, %43 ], [ %61, %51 ]
%53 = phi i32 [ 128, %43 ], [ %55, %51 ]
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %52)
%55 = add nuw nsw i32 %53, 1
%56 = sitofp i32 %55 to double
%57 = fmul double %56, 3.906250e-03
%58 = fptosi double %57 to i32
%59 = tail call double @log10(i32 %58)
%60 = tail call double @llvm.fmuladd.f64(double %59, double 3.276800e+04, double -5.000000e-01)
%61 = fptosi double %60 to i32
%62 = icmp eq i32 %55, 256
br i1 %62, label %63, label %51
63: ; preds = %51
%64 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %61)
%65 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.26, i64 0, i64 0))
%66 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.21, i64 0, i64 0))
%67 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.25, i64 0, i64 0))
%68 = tail call double @sin(i32 0)
%69 = fmul double %68, 3.276800e+04
%70 = fadd double %69, 5.000000e-01
%71 = fptosi double %70 to i32
%72 = icmp slt i32 %71, 32767
%73 = select i1 %72, i32 %71, i32 32767
br label %74
74: ; preds = %63, %74
%75 = phi i32 [ %73, %63 ], [ %88, %74 ]
%76 = phi i32 [ 0, %63 ], [ %78, %74 ]
%77 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %75)
%78 = add nuw nsw i32 %76, 1
%79 = sitofp i32 %78 to double
%80 = fmul double %79, 0x400921FB54411744
%81 = fmul double %80, 0x3F60000000000000
%82 = fptosi double %81 to i32
%83 = tail call double @sin(i32 %82)
%84 = fmul double %83, 3.276800e+04
%85 = fadd double %84, 5.000000e-01
%86 = fptosi double %85 to i32
%87 = icmp slt i32 %86, 32767
%88 = select i1 %87, i32 %86, i32 32767
%89 = icmp eq i32 %78, 256
br i1 %89, label %90, label %74
90: ; preds = %74
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %88)
%92 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.26, i64 0, i64 0))
%93 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.24, i64 0, i64 0))
%94 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.25, i64 0, i64 0))
%95 = tail call double @atan(i32 0)
%96 = fmul double %95, 6.553600e+04
%97 = fdiv double %96, 0x401921FB54411744
%98 = fadd double %97, 5.000000e-01
%99 = fptosi double %98 to i32
%100 = icmp eq i32 %99, 0
%101 = select i1 %100, i32 1, i32 %99
br label %102
102: ; preds = %90, %102
%103 = phi i32 [ %101, %90 ], [ %116, %102 ]
%104 = phi i32 [ 0, %90 ], [ %106, %102 ]
%105 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %103)
%106 = add nuw nsw i32 %104, 1
%107 = sitofp i32 %106 to double
%108 = fmul double %107, 3.906250e-03
%109 = fptosi double %108 to i32
%110 = tail call double @atan(i32 %109)
%111 = fmul double %110, 6.553600e+04
%112 = fdiv double %111, 0x401921FB54411744
%113 = fadd double %112, 5.000000e-01
%114 = fptosi double %113 to i32
%115 = icmp eq i32 %114, 0
%116 = select i1 %115, i32 1, i32 %114
%117 = icmp eq i32 %106, 256
br i1 %117, label %118, label %102
118: ; preds = %102
%119 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %116)
%120 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.26, i64 0, i64 0))
ret i32 0
}