#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 */
double M_PI;
double cos(double);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
double hamming(float);
double sin(double);
void gentbl_afsk2400(FILE *f, float tcm3105clk) {
  int i, sum, v;
  fprintf(f,
          "\n/*\n * afsk2400 specific tables (tcm3105 clk %7fHz)\n */\n"
          "#define AFSK24_TX_FREQ_LO %d\n"
          "#define AFSK24_TX_FREQ_HI %d\n"
          "#define AFSK24_BITPLL_INC %d\n"
          "#define AFSK24_SAMPLERATE %d\n\n",
          tcm3105clk, (int)(tcm3105clk / 3694.0), (int)(tcm3105clk / 2015.0),
          0x10000 * 2400 / 16000, 16000);
  fprintf(f, "static const int afsk24_tx_lo_i[] = {\n\t");
  for (sum = i = 0; i < 14; i++) {
    sum += (v = 127.0 *
                cos(2.0 * M_PI * (double)i * (tcm3105clk / 3694.0) /
                    (double)16000) *
                hamming((float)(i) / (14 - 1.0)));
    fprintf(f, " %4i%c", v, (i < 14 - 1) ? ',' : ' ');
  }
  fprintf(f,
          "\n};\n#define SUM_AFSK24_TX_LO_I %d\n\n"
          "static const int afsk24_tx_lo_q[] = {\n\t",
          sum);
  for (sum = i = 0; i < 14; i++) {
    sum += (v = 127.0 *
                sin(2.0 * M_PI * (double)i * (tcm3105clk / 3694.0) /
                    (double)16000) *
                hamming((float)(i) / (14 - 1.0)));
    fprintf(f, " %4i%c", v, (i < 14 - 1) ? ',' : ' ');
  }
  fprintf(f,
          "\n};\n#define SUM_AFSK24_TX_LO_Q %d\n\n"
          "static const int afsk24_tx_hi_i[] = {\n\t",
          sum);
  for (sum = i = 0; i < 14; i++) {
    sum += (v = 127.0 *
                cos(2.0 * M_PI * (double)i * (tcm3105clk / 2015.0) /
                    (double)16000) *
                hamming((float)(i) / (14 - 1.0)));
    fprintf(f, " %4i%c", v, (i < 14 - 1) ? ',' : ' ');
  }
  fprintf(f,
          "\n};\n#define SUM_AFSK24_TX_HI_I %d\n\n"
          "static const int afsk24_tx_hi_q[] = {\n\t",
          sum);
  for (sum = i = 0; i < 14; i++) {
    sum += (v = 127.0 *
                sin(2.0 * M_PI * (double)i * (tcm3105clk / 2015.0) /
                    (double)16000) *
                hamming((float)(i) / (14 - 1.0)));
    fprintf(f, " %4i%c", v, (i < 14 - 1) ? ',' : ' ');
  }
  fprintf(f, "\n};\n#define SUM_AFSK24_TX_HI_Q %d\n\n", sum);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe99(%rip),%xmm2
divsd  %xmm2,%xmm1
cvttsd2si %xmm1,%edx
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe78(%rip),%xmm2
divsd  %xmm2,%xmm1
cvttsd2si %xmm1,%ecx
lea    0xe99(%rip),%rsi
mov    $0x2666,%r8d
mov    $0x3e80,%r9d
mov    $0x1,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf29(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xe,-0x10(%rbp)
jge    129b <gentbl_afsk2400+0x15b>
movsd  0xe4c(%rip),%xmm0
mov    0x2e05(%rip),%rax
mulsd  (%rax),%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe07(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe0f(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1060 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xdf3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
cvtsi2ssl -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdd1(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1050 <hamming@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    $0x20,%ecx
mov    $0x2c,%eax
cmp    $0xd,%esi
cmovl  %eax,%ecx
lea    0xe80(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11ca <gentbl_afsk2400+0x8a>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xe64(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xe,-0x10(%rbp)
jge    138f <gentbl_afsk2400+0x24f>
movsd  0xd58(%rip),%xmm0
mov    0x2d11(%rip),%rax
mulsd  (%rax),%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xd13(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd1b(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xcff(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
cvtsi2ssl -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcdd(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1050 <hamming@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    $0x20,%ecx
mov    $0x2c,%eax
cmp    $0xd,%esi
cmovl  %eax,%ecx
lea    0xd8c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12be <gentbl_afsk2400+0x17e>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xdbb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xe,-0x10(%rbp)
jge    1483 <gentbl_afsk2400+0x343>
movsd  0xc64(%rip),%xmm0
mov    0x2c1d(%rip),%rax
mulsd  (%rax),%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xc17(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc27(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1060 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xc0b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
cvtsi2ssl -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xbe9(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1050 <hamming@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    $0x20,%ecx
mov    $0x2c,%eax
cmp    $0xd,%esi
cmovl  %eax,%ecx
lea    0xc98(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    13b2 <gentbl_afsk2400+0x272>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xd12(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xe,-0x10(%rbp)
jge    1577 <gentbl_afsk2400+0x437>
movsd  0xb70(%rip),%xmm0
mov    0x2b29(%rip),%rax
mulsd  (%rax),%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xb23(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb33(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xb17(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
cvtsi2ssl -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xaf5(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1050 <hamming@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    $0x20,%ecx
mov    $0x2c,%eax
cmp    $0xd,%esi
cmovl  %eax,%ecx
lea    0xba4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    14a6 <gentbl_afsk2400+0x366>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xc69(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%r13
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
divsd  0xe90(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
cvttsd2si %xmm1,%edx
movaps %xmm0,%xmm1
divsd  0xe83(%rip),%xmm1
movsd  %xmm1,0x20(%rsp)
cvttsd2si %xmm1,%ecx
lea    0xe96(%rip),%rsi
mov    $0x2666,%r8d
mov    $0x3e80,%r9d
mov    $0x1,%al
call   1030 <fprintf@plt>
lea    0xf2a(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1070 <fwrite@plt>
xorpd  %xmm1,%xmm1
mov    0x2e1b(%rip),%r15
mov    $0x20,%r12d
lea    0xf28(%rip),%r14
xor    %ebp,%ebp
xor    %ebx,%ebx
xchg   %ax,%ax
movsd  %xmm1,0x8(%rsp)
movsd  (%r15),%xmm0
addsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x10(%rsp),%xmm0
divsd  0xe0f(%rip),%xmm0
call   1060 <cos@plt>
mulsd  0xe0a(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
divss  0xe05(%rip),%xmm0
call   1050 <hamming@plt>
mulsd  0x18(%rsp),%xmm0
cvttsd2si %xmm0,%edx
add    %edx,%ebp
cmp    $0xd,%ebx
mov    $0x2c,%ecx
cmove  %r12d,%ecx
mov    %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
movsd  0x8(%rsp),%xmm1
addsd  0xdc5(%rip),%xmm1
add    $0x1,%ebx
cmp    $0xe,%ebx
jne    11e0 <gentbl_afsk2400+0x90>
lea    0xe9b(%rip),%rsi
mov    %r13,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
xorpd  %xmm1,%xmm1
mov    $0x20,%r12d
lea    0xe77(%rip),%r14
xor    %ebp,%ebp
xor    %ebx,%ebx
nop
movsd  %xmm1,0x8(%rsp)
movsd  (%r15),%xmm0
addsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x10(%rsp),%xmm0
divsd  0xd5f(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0xd5a(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
divss  0xd55(%rip),%xmm0
call   1050 <hamming@plt>
mulsd  0x18(%rsp),%xmm0
cvttsd2si %xmm0,%edx
add    %edx,%ebp
cmp    $0xd,%ebx
mov    $0x2c,%ecx
cmove  %r12d,%ecx
mov    %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
movsd  0x8(%rsp),%xmm1
addsd  0xd15(%rip),%xmm1
add    $0x1,%ebx
cmp    $0xe,%ebx
jne    1290 <gentbl_afsk2400+0x140>
lea    0xe36(%rip),%rsi
mov    %r13,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
xorpd  %xmm1,%xmm1
mov    $0x20,%r12d
lea    0xdc7(%rip),%r14
xor    %ebp,%ebp
xor    %ebx,%ebx
nop
movsd  %xmm1,0x10(%rsp)
movsd  (%r15),%xmm0
addsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x20(%rsp),%xmm0
divsd  0xcaf(%rip),%xmm0
call   1060 <cos@plt>
mulsd  0xcaa(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
divss  0xca5(%rip),%xmm0
call   1050 <hamming@plt>
mulsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edx
add    %edx,%ebp
cmp    $0xd,%ebx
mov    $0x2c,%ecx
cmove  %r12d,%ecx
mov    %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
movsd  0x10(%rsp),%xmm1
addsd  0xc65(%rip),%xmm1
add    $0x1,%ebx
cmp    $0xe,%ebx
jne    1340 <gentbl_afsk2400+0x1f0>
lea    0xdd1(%rip),%rsi
mov    %r13,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
xorpd  %xmm1,%xmm1
mov    $0x20,%r12d
lea    0xd17(%rip),%r14
xor    %ebp,%ebp
xor    %ebx,%ebx
nop
movsd  %xmm1,0x10(%rsp)
movsd  (%r15),%xmm0
addsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x20(%rsp),%xmm0
divsd  0xbff(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0xbfa(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
divss  0xbf5(%rip),%xmm0
call   1050 <hamming@plt>
mulsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edx
add    %edx,%ebp
cmp    $0xd,%ebx
mov    $0x2c,%ecx
cmove  %r12d,%ecx
mov    %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
movsd  0x10(%rsp),%xmm1
addsd  0xbb5(%rip),%xmm1
add    $0x1,%ebx
cmp    $0xe,%ebx
jne    13f0 <gentbl_afsk2400+0x2a0>
lea    0xd6c(%rip),%rsi
mov    %r13,%rdi
mov    %ebp,%edx
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [174 x i8] c"\0A/*\0A * afsk2400 specific tables (tcm3105 clk %7fHz)\0A */\0A#define AFSK24_TX_FREQ_LO %d\0A#define AFSK24_TX_FREQ_HI %d\0A#define AFSK24_BITPLL_INC %d\0A#define AFSK24_SAMPLERATE %d\0A\0A\00"
@.str.1 = [40 x i8] c"static const int afsk24_tx_lo_i[] = {\0A\09\00"
@M_PI = global double 0.000000e+00
@.str.2 = [7 x i8] c" %4i%c\00"
@.str.3 = [75 x i8] c"\0A};\0A#define SUM_AFSK24_TX_LO_I %d\0A\0Astatic const int afsk24_tx_lo_q[] = {\0A\09\00"
@.str.4 = [75 x i8] c"\0A};\0A#define SUM_AFSK24_TX_LO_Q %d\0A\0Astatic const int afsk24_tx_hi_i[] = {\0A\09\00"
@.str.5 = [75 x i8] c"\0A};\0A#define SUM_AFSK24_TX_HI_I %d\0A\0Astatic const int afsk24_tx_hi_q[] = {\0A\09\00"
@.str.6 = [36 x i8] c"\0A};\0A#define SUM_AFSK24_TX_HI_Q %d\0A\0A\00"
define void @gentbl_afsk2400(i32* %0, float %1) {
%3 = alloca i32*
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store float %1, float* %4
%8 = load i32*, i32** %3
%9 = load float, float* %4
%10 = fpext float %9 to double
%11 = load float, float* %4
%12 = fpext float %11 to double
%13 = fdiv double %12, 3.694000e+03
%14 = fptosi double %13 to i32
%15 = load float, float* %4
%16 = fpext float %15 to double
%17 = fdiv double %16, 2.015000e+03
%18 = fptosi double %17 to i32
%19 = call i32 (i32*, i8*, ...) @fprintf(i32* %8, i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), double %10, i32 %14, i32 %18, i32 9830, i32 16000)
%20 = load i32*, i32** %3
%21 = call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %5
store i32 0, i32* %6
br label %22
22: ; preds = %55, %2
%23 = load i32, i32* %5
%24 = icmp slt i32 %23, 14
br i1 %24, label %25, label %58
25: ; preds = %22
%26 = load double, double* @M_PI
%27 = fmul double 2.000000e+00, %26
%28 = load i32, i32* %5
%29 = sitofp i32 %28 to double
%30 = fmul double %27, %29
%31 = load float, float* %4
%32 = fpext float %31 to double
%33 = fdiv double %32, 3.694000e+03
%34 = fmul double %30, %33
%35 = fdiv double %34, 1.600000e+04
%36 = call double @cos(double %35)
%37 = fmul double 1.270000e+02, %36
%38 = load i32, i32* %5
%39 = sitofp i32 %38 to float
%40 = fpext float %39 to double
%41 = fdiv double %40, 1.300000e+01
%42 = fptrunc double %41 to float
%43 = call double @hamming(float %42)
%44 = fmul double %37, %43
%45 = fptosi double %44 to i32
store i32 %45, i32* %7
%46 = load i32, i32* %6
%47 = add nsw i32 %46, %45
store i32 %47, i32* %6
%48 = load i32*, i32** %3
%49 = load i32, i32* %7
%50 = load i32, i32* %5
%51 = icmp slt i32 %50, 13
%52 = zext i1 %51 to i64
%53 = select i1 %51, i32 44, i32 32
%54 = call i32 (i32*, i8*, ...) @fprintf(i32* %48, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %49, i32 %53)
br label %55
55: ; preds = %25
%56 = load i32, i32* %5
%57 = add nsw i32 %56, 1
store i32 %57, i32* %5
br label %22
58: ; preds = %22
%59 = load i32*, i32** %3
%60 = load i32, i32* %6
%61 = call i32 (i32*, i8*, ...) @fprintf(i32* %59, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.3, i64 0, i64 0), i32 %60)
store i32 0, i32* %5
store i32 0, i32* %6
br label %62
62: ; preds = %95, %58
%63 = load i32, i32* %5
%64 = icmp slt i32 %63, 14
br i1 %64, label %65, label %98
65: ; preds = %62
%66 = load double, double* @M_PI
%67 = fmul double 2.000000e+00, %66
%68 = load i32, i32* %5
%69 = sitofp i32 %68 to double
%70 = fmul double %67, %69
%71 = load float, float* %4
%72 = fpext float %71 to double
%73 = fdiv double %72, 3.694000e+03
%74 = fmul double %70, %73
%75 = fdiv double %74, 1.600000e+04
%76 = call double @sin(double %75)
%77 = fmul double 1.270000e+02, %76
%78 = load i32, i32* %5
%79 = sitofp i32 %78 to float
%80 = fpext float %79 to double
%81 = fdiv double %80, 1.300000e+01
%82 = fptrunc double %81 to float
%83 = call double @hamming(float %82)
%84 = fmul double %77, %83
%85 = fptosi double %84 to i32
store i32 %85, i32* %7
%86 = load i32, i32* %6
%87 = add nsw i32 %86, %85
store i32 %87, i32* %6
%88 = load i32*, i32** %3
%89 = load i32, i32* %7
%90 = load i32, i32* %5
%91 = icmp slt i32 %90, 13
%92 = zext i1 %91 to i64
%93 = select i1 %91, i32 44, i32 32
%94 = call i32 (i32*, i8*, ...) @fprintf(i32* %88, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %89, i32 %93)
br label %95
95: ; preds = %65
%96 = load i32, i32* %5
%97 = add nsw i32 %96, 1
store i32 %97, i32* %5
br label %62
98: ; preds = %62
%99 = load i32*, i32** %3
%100 = load i32, i32* %6
%101 = call i32 (i32*, i8*, ...) @fprintf(i32* %99, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.4, i64 0, i64 0), i32 %100)
store i32 0, i32* %5
store i32 0, i32* %6
br label %102
102: ; preds = %135, %98
%103 = load i32, i32* %5
%104 = icmp slt i32 %103, 14
br i1 %104, label %105, label %138
105: ; preds = %102
%106 = load double, double* @M_PI
%107 = fmul double 2.000000e+00, %106
%108 = load i32, i32* %5
%109 = sitofp i32 %108 to double
%110 = fmul double %107, %109
%111 = load float, float* %4
%112 = fpext float %111 to double
%113 = fdiv double %112, 2.015000e+03
%114 = fmul double %110, %113
%115 = fdiv double %114, 1.600000e+04
%116 = call double @cos(double %115)
%117 = fmul double 1.270000e+02, %116
%118 = load i32, i32* %5
%119 = sitofp i32 %118 to float
%120 = fpext float %119 to double
%121 = fdiv double %120, 1.300000e+01
%122 = fptrunc double %121 to float
%123 = call double @hamming(float %122)
%124 = fmul double %117, %123
%125 = fptosi double %124 to i32
store i32 %125, i32* %7
%126 = load i32, i32* %6
%127 = add nsw i32 %126, %125
store i32 %127, i32* %6
%128 = load i32*, i32** %3
%129 = load i32, i32* %7
%130 = load i32, i32* %5
%131 = icmp slt i32 %130, 13
%132 = zext i1 %131 to i64
%133 = select i1 %131, i32 44, i32 32
%134 = call i32 (i32*, i8*, ...) @fprintf(i32* %128, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %129, i32 %133)
br label %135
135: ; preds = %105
%136 = load i32, i32* %5
%137 = add nsw i32 %136, 1
store i32 %137, i32* %5
br label %102
138: ; preds = %102
%139 = load i32*, i32** %3
%140 = load i32, i32* %6
%141 = call i32 (i32*, i8*, ...) @fprintf(i32* %139, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.5, i64 0, i64 0), i32 %140)
store i32 0, i32* %5
store i32 0, i32* %6
br label %142
142: ; preds = %175, %138
%143 = load i32, i32* %5
%144 = icmp slt i32 %143, 14
br i1 %144, label %145, label %178
145: ; preds = %142
%146 = load double, double* @M_PI
%147 = fmul double 2.000000e+00, %146
%148 = load i32, i32* %5
%149 = sitofp i32 %148 to double
%150 = fmul double %147, %149
%151 = load float, float* %4
%152 = fpext float %151 to double
%153 = fdiv double %152, 2.015000e+03
%154 = fmul double %150, %153
%155 = fdiv double %154, 1.600000e+04
%156 = call double @sin(double %155)
%157 = fmul double 1.270000e+02, %156
%158 = load i32, i32* %5
%159 = sitofp i32 %158 to float
%160 = fpext float %159 to double
%161 = fdiv double %160, 1.300000e+01
%162 = fptrunc double %161 to float
%163 = call double @hamming(float %162)
%164 = fmul double %157, %163
%165 = fptosi double %164 to i32
store i32 %165, i32* %7
%166 = load i32, i32* %6
%167 = add nsw i32 %166, %165
store i32 %167, i32* %6
%168 = load i32*, i32** %3
%169 = load i32, i32* %7
%170 = load i32, i32* %5
%171 = icmp slt i32 %170, 13
%172 = zext i1 %171 to i64
%173 = select i1 %171, i32 44, i32 32
%174 = call i32 (i32*, i8*, ...) @fprintf(i32* %168, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %169, i32 %173)
br label %175
175: ; preds = %145
%176 = load i32, i32* %5
%177 = add nsw i32 %176, 1
store i32 %177, i32* %5
br label %142
178: ; preds = %142
%179 = load i32*, i32** %3
%180 = load i32, i32* %6
%181 = call i32 (i32*, i8*, ...) @fprintf(i32* %179, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i32 %180)
ret void
}

LLVM IR (-O2):
@.str = [174 x i8] c"\0A/*\0A * afsk2400 specific tables (tcm3105 clk %7fHz)\0A */\0A#define AFSK24_TX_FREQ_LO %d\0A#define AFSK24_TX_FREQ_HI %d\0A#define AFSK24_BITPLL_INC %d\0A#define AFSK24_SAMPLERATE %d\0A\0A\00"
@.str.1 = [40 x i8] c"static const int afsk24_tx_lo_i[] = {\0A\09\00"
@M_PI = global double 0.000000e+00
@.str.2 = [7 x i8] c" %4i%c\00"
@.str.3 = [75 x i8] c"\0A};\0A#define SUM_AFSK24_TX_LO_I %d\0A\0Astatic const int afsk24_tx_lo_q[] = {\0A\09\00"
@.str.4 = [75 x i8] c"\0A};\0A#define SUM_AFSK24_TX_LO_Q %d\0A\0Astatic const int afsk24_tx_hi_i[] = {\0A\09\00"
@.str.5 = [75 x i8] c"\0A};\0A#define SUM_AFSK24_TX_HI_I %d\0A\0Astatic const int afsk24_tx_hi_q[] = {\0A\09\00"
@.str.6 = [36 x i8] c"\0A};\0A#define SUM_AFSK24_TX_HI_Q %d\0A\0A\00"
define void @gentbl_afsk2400(i32* nocapture %0, float %1) {
%3 = fpext float %1 to double
%4 = fdiv double %3, 3.694000e+03
%5 = fptosi double %4 to i32
%6 = fdiv double %3, 2.015000e+03
%7 = fptosi double %6 to i32
%8 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), double %3, i32 %5, i32 %7, i32 9830, i32 16000)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i64 39, i64 1, i32* %0)
br label %10
10: ; preds = %2, %10
%11 = phi i32 [ 0, %2 ], [ %26, %10 ]
%12 = phi i32 [ 0, %2 ], [ %30, %10 ]
%13 = load double, double* @M_PI
%14 = fmul double %13, 2.000000e+00
%15 = sitofp i32 %12 to double
%16 = fmul double %14, %15
%17 = fmul double %4, %16
%18 = fdiv double %17, 1.600000e+04
%19 = tail call double @cos(double %18)
%20 = fmul double %19, 1.270000e+02
%21 = sitofp i32 %12 to float
%22 = fdiv float %21, 1.300000e+01
%23 = tail call double @hamming(float %22)
%24 = fmul double %20, %23
%25 = fptosi double %24 to i32
%26 = add nsw i32 %11, %25
%27 = icmp eq i32 %12, 13
%28 = select i1 %27, i32 32, i32 44
%29 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %25, i32 %28)
%30 = add nuw nsw i32 %12, 1
%31 = icmp eq i32 %30, 14
br i1 %31, label %32, label %10
32: ; preds = %10
%33 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.3, i64 0, i64 0), i32 %26)
br label %34
34: ; preds = %32, %34
%35 = phi i32 [ 0, %32 ], [ %50, %34 ]
%36 = phi i32 [ 0, %32 ], [ %54, %34 ]
%37 = load double, double* @M_PI
%38 = fmul double %37, 2.000000e+00
%39 = sitofp i32 %36 to double
%40 = fmul double %38, %39
%41 = fmul double %4, %40
%42 = fdiv double %41, 1.600000e+04
%43 = tail call double @sin(double %42)
%44 = fmul double %43, 1.270000e+02
%45 = sitofp i32 %36 to float
%46 = fdiv float %45, 1.300000e+01
%47 = tail call double @hamming(float %46)
%48 = fmul double %44, %47
%49 = fptosi double %48 to i32
%50 = add nsw i32 %35, %49
%51 = icmp eq i32 %36, 13
%52 = select i1 %51, i32 32, i32 44
%53 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %49, i32 %52)
%54 = add nuw nsw i32 %36, 1
%55 = icmp eq i32 %54, 14
br i1 %55, label %56, label %34
56: ; preds = %34
%57 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.4, i64 0, i64 0), i32 %50)
br label %58
58: ; preds = %56, %58
%59 = phi i32 [ 0, %56 ], [ %74, %58 ]
%60 = phi i32 [ 0, %56 ], [ %78, %58 ]
%61 = load double, double* @M_PI
%62 = fmul double %61, 2.000000e+00
%63 = sitofp i32 %60 to double
%64 = fmul double %62, %63
%65 = fmul double %6, %64
%66 = fdiv double %65, 1.600000e+04
%67 = tail call double @cos(double %66)
%68 = fmul double %67, 1.270000e+02
%69 = sitofp i32 %60 to float
%70 = fdiv float %69, 1.300000e+01
%71 = tail call double @hamming(float %70)
%72 = fmul double %68, %71
%73 = fptosi double %72 to i32
%74 = add nsw i32 %59, %73
%75 = icmp eq i32 %60, 13
%76 = select i1 %75, i32 32, i32 44
%77 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %73, i32 %76)
%78 = add nuw nsw i32 %60, 1
%79 = icmp eq i32 %78, 14
br i1 %79, label %80, label %58
80: ; preds = %58
%81 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.5, i64 0, i64 0), i32 %74)
br label %82
82: ; preds = %80, %82
%83 = phi i32 [ 0, %80 ], [ %98, %82 ]
%84 = phi i32 [ 0, %80 ], [ %102, %82 ]
%85 = load double, double* @M_PI
%86 = fmul double %85, 2.000000e+00
%87 = sitofp i32 %84 to double
%88 = fmul double %86, %87
%89 = fmul double %6, %88
%90 = fdiv double %89, 1.600000e+04
%91 = tail call double @sin(double %90)
%92 = fmul double %91, 1.270000e+02
%93 = sitofp i32 %84 to float
%94 = fdiv float %93, 1.300000e+01
%95 = tail call double @hamming(float %94)
%96 = fmul double %92, %95
%97 = fptosi double %96 to i32
%98 = add nsw i32 %83, %97
%99 = icmp eq i32 %84, 13
%100 = select i1 %99, i32 32, i32 44
%101 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %97, i32 %100)
%102 = add nuw nsw i32 %84, 1
%103 = icmp eq i32 %102, 14
br i1 %103, label %104, label %82
104: ; preds = %82
%105 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i32 %98)
ret void
}