#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("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    0xf02(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x81,-0x14(%rbp)
jge    120e <main+0xbe>
mov    -0x14(%rbp),%eax
add    $0x80,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe96(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xe4a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
cvttsd2si -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x80,-0x14(%rbp)
jge    11ea <main+0x9a>
mov    -0x24(%rbp),%esi
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11fb <main+0xab>
mov    -0x24(%rbp),%esi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1200 <main+0xb0>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1189 <main+0x39>
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x40,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jg     12e0 <main+0x190>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xdbf(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sqrt@plt>
movsd  0xda2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd86(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0xffff,-0x24(%rbp)
jle    1299 <main+0x149>
movl   $0xffff,-0x24(%rbp)
cmpl   $0x100,-0x14(%rbp)
jge    12bc <main+0x16c>
mov    -0x24(%rbp),%esi
lea    0xdd0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12cd <main+0x17d>
mov    -0x24(%rbp),%esi
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d2 <main+0x182>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    123f <main+0xef>
lea    0xdac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x80,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jg     139e <main+0x24e>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xced(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1060 <log10@plt>
movsd  0xce0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcec(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0xff,-0x14(%rbp)
jg     137a <main+0x22a>
mov    -0x24(%rbp),%esi
lea    0xd12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    138b <main+0x23b>
mov    -0x24(%rbp),%esi
lea    0xd06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1390 <main+0x240>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1311 <main+0x1c1>
lea    0xcee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcbc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jg     1482 <main+0x332>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xc47(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc33(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
movsd  0xc16(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xbe5(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x7fff,-0x24(%rbp)
jle    143b <main+0x2eb>
movl   $0x7fff,-0x24(%rbp)
cmpl   $0xff,-0x14(%rbp)
jg     145e <main+0x30e>
mov    -0x24(%rbp),%esi
lea    0xc2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    146f <main+0x31f>
mov    -0x24(%rbp),%esi
lea    0xc22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1474 <main+0x324>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13cf <main+0x27f>
lea    0xc0a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xbd8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jg     1563 <main+0x413>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xb4b(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <atan@plt>
movsd  0xb2e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb1a(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xb01(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    151c <main+0x3cc>
movl   $0x1,-0x24(%rbp)
cmpl   $0xff,-0x14(%rbp)
jg     153f <main+0x3ef>
mov    -0x24(%rbp),%esi
lea    0xb4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1550 <main+0x400>
mov    -0x24(%rbp),%esi
lea    0xb41(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1555 <main+0x405>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    14b3 <main+0x363>
lea    0xb29(%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    0xef0(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd1(%rip),%rdi
call   1030 <puts@plt>
mov    $0x8000,%esi
mov    $0x81,%ebp
lea    0xebb(%rip),%rbx
nopl   (%rax)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  0xe57(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  0xe53(%rip),%xmm1
cvttsd2si %xmm1,%esi
add    $0x1,%ebp
cmp    $0x101,%ebp
jne    1190 <main+0x30>
lea    0xe87(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf71(%rip),%rdi
call   1030 <puts@plt>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
lea    0xf57(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1080 <sqrt@plt>
mulsd  0xe0b(%rip),%xmm0
addsd  0xdfb(%rip),%xmm0
cvttsd2si %xmm0,%esi
cmp    $0xffff,%esi
mov    $0xffff,%r14d
cmovge %r14d,%esi
mov    $0x41,%ebp
lea    0xe1b(%rip),%rbx
nopl   (%rax)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0xdcf(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1080 <sqrt@plt>
mulsd  0xdb6(%rip),%xmm0
addsd  0xda6(%rip),%xmm0
cvttsd2si %xmm0,%esi
cmp    $0xffff,%esi
cmovge %r14d,%esi
add    $0x1,%ebp
cmp    $0x101,%ebp
jne    1230 <main+0xd0>
lea    0xdd0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xe21(%rip),%rdi
call   1030 <puts@plt>
lea    0xea0(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1070 <log10@plt>
mulsd  0xd64(%rip),%xmm0
addsd  0xd64(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    $0x81,%ebp
lea    0xd74(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0xd1f(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1070 <log10@plt>
mulsd  0xd16(%rip),%xmm0
addsd  0xd16(%rip),%xmm0
cvttsd2si %xmm0,%esi
add    $0x1,%ebp
cmp    $0x101,%ebp
jne    12e0 <main+0x180>
lea    0xd2a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe14(%rip),%rdi
call   1030 <puts@plt>
lea    0xda9(%rip),%rdi
call   1030 <puts@plt>
lea    0xdfa(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <sin@plt>
mulsd  0xcbe(%rip),%xmm0
addsd  0xc9e(%rip),%xmm0
cvttsd2si %xmm0,%esi
cmp    $0x7fff,%esi
mov    $0x7fff,%r14d
cmovge %r14d,%esi
mov    $0x1,%ebp
lea    0xcbe(%rip),%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0xc87(%rip),%xmm0
mulsd  0xc87(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
mulsd  0xc5e(%rip),%xmm0
addsd  0xc3e(%rip),%xmm0
cvttsd2si %xmm0,%esi
cmp    $0x7fff,%esi
cmovge %r14d,%esi
add    $0x1,%ebp
cmp    $0x101,%ebp
jne    1390 <main+0x230>
lea    0xc68(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd52(%rip),%rdi
call   1030 <puts@plt>
lea    0xd14(%rip),%rdi
call   1030 <puts@plt>
lea    0xd38(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <atan@plt>
mulsd  0xbec(%rip),%xmm0
divsd  0xc14(%rip),%xmm0
addsd  0xbd4(%rip),%xmm0
cvttsd2si %xmm0,%esi
test   %esi,%esi
mov    $0x1,%r14d
cmove  %r14d,%esi
lea    0xbfd(%rip),%rbx
mov    $0x1,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0xbaf(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1060 <atan@plt>
mulsd  0xb96(%rip),%xmm0
divsd  0xbbe(%rip),%xmm0
addsd  0xb7e(%rip),%xmm0
cvttsd2si %xmm0,%esi
test   %esi,%esi
cmove  %r14d,%esi
add    $0x1,%ebp
cmp    $0x101,%ebp
jne    1450 <main+0x2f0>
lea    0xbac(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc96(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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