#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 */
scalar_t__ fabs(float);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
float hamming(int);
float sinc(int);
void genrxfilt(FILE *f) {
  float coeff[32 * (1 << (3))];
  double tmul, at, t, f1, f2;
  int i, j;
  tmul = 1.0 * 9600 / (1 << (3)) / 22050;
  tmul *= 1.4;
  for (i = 0; i < 32 * (1 << (3)); i++)
    coeff[i] = sinc((i - 0.5 * 32 * (1 << (3))) * tmul) *
               hamming(i * (1.0 / (32 * (1 << (3)) - 1)));
  for (f1 = 0, i = 0; i < (1 << (3)); i++) {
    for (f2 = 0, j = 0; j < 32; j++)
      f2 += fabs(coeff[j * (1 << (3)) + i]);
    if (f2 > f1)
      f1 = f2;
  }
  f2 = 65535 / f1;
  fprintf(f, "/*\n  rxfilt = [");
  for (i = 0;;) {
    fprintf(f, " %g ;", coeff[i]);
    if ((++i) >= 32 * (1 << (3)))
      break;
    if (i & 3)
      continue;
    fprintf(f, "\n            ");
  }
  fprintf(f,
          " ];\n  abssum = %g;\n  semilogy((0:%u)/%u,abs(fft(rxfilt)))\n "
          "*/\n\nstatic const int rxfilter[%u][%u] = {",
          f1, 32 * (1 << (3)) - 1, 32 * (1 << (3)), (1 << (3)), 32);
  for (i = 0;;) {
    fprintf(f, "\n\t{");
    for (j = 0;;) {
      fprintf(f, " %d", (int)(f2 * coeff[j * (1 << (3)) + i]));
      if ((++j) >= 32)
        break;
      fprintf(f, ",");
    }
    fprintf(f, " }");
    if ((++i) >= (1 << (3)))
      break;
    fprintf(f, ",");
  }
  fprintf(f, "\n};\n\n");
}


x86 assembly (clang, -O0):
<genrxfilt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
mov    %rdi,-0x8(%rbp)
movsd  0xeb1(%rip),%xmm0
movsd  %xmm0,-0x418(%rbp)
ff
movsd  0xe99(%rip),%xmm0
mulsd  -0x418(%rbp),%xmm0
ff
movsd  %xmm0,-0x418(%rbp)
ff
movl   $0x0,-0x43c(%rbp)
cmpl   $0x100,-0x43c(%rbp)
jge    120e <genrxfilt+0xce>
cvtsi2sdl -0x43c(%rbp),%xmm0
ff
movsd  0xe7f(%rip),%xmm1
subsd  %xmm1,%xmm0
mulsd  -0x418(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1060 <sinc@plt>
movss  %xmm0,-0x444(%rbp)
ff
cvtsi2sdl -0x43c(%rbp),%xmm0
ff
movsd  0xe4a(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <hamming@plt>
movaps %xmm0,%xmm1
movss  -0x444(%rbp),%xmm0
ff
mulss  %xmm1,%xmm0
movslq -0x43c(%rbp),%rax
movss  %xmm0,-0x410(%rbp,%rax,4)
ff ff
mov    -0x43c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x43c(%rbp)
jmp    1181 <genrxfilt+0x41>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x430(%rbp)
ff
movl   $0x0,-0x43c(%rbp)
cmpl   $0x8,-0x43c(%rbp)
jge    12d9 <genrxfilt+0x199>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x438(%rbp)
ff
movl   $0x0,-0x440(%rbp)
cmpl   $0x20,-0x440(%rbp)
jge    129a <genrxfilt+0x15a>
mov    -0x440(%rbp),%eax
shl    $0x3,%eax
add    -0x43c(%rbp),%eax
cltq
movss  -0x410(%rbp,%rax,4),%xmm0
ff ff
call   1030 <fabs@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x438(%rbp),%xmm0
ff
movsd  %xmm0,-0x438(%rbp)
ff
mov    -0x440(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x440(%rbp)
jmp    1245 <genrxfilt+0x105>
movsd  -0x438(%rbp),%xmm0
ff
ucomisd -0x430(%rbp),%xmm0
ff
jbe    12c0 <genrxfilt+0x180>
movsd  -0x438(%rbp),%xmm0
ff
movsd  %xmm0,-0x430(%rbp)
ff
jmp    12c5 <genrxfilt+0x185>
mov    -0x43c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x43c(%rbp)
jmp    1223 <genrxfilt+0xe3>
movsd  0xd2f(%rip),%xmm0
divsd  -0x430(%rbp),%xmm0
ff
movsd  %xmm0,-0x438(%rbp)
ff
mov    -0x8(%rbp),%rdi
lea    0xd2c(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x43c(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x43c(%rbp),%rax
movss  -0x410(%rbp,%rax,4),%xmm0
ff ff
cvtss2sd %xmm0,%xmm0
lea    0xd0c(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
mov    -0x43c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x43c(%rbp)
cmp    $0x100,%eax
jl     1352 <genrxfilt+0x212>
jmp    1380 <genrxfilt+0x240>
mov    -0x43c(%rbp),%eax
and    $0x3,%eax
cmp    $0x0,%eax
je     1369 <genrxfilt+0x229>
jmp    130d <genrxfilt+0x1cd>
mov    -0x8(%rbp),%rdi
lea    0xcca(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    130d <genrxfilt+0x1cd>
mov    -0x8(%rbp),%rdi
movsd  -0x430(%rbp),%xmm0
ff
lea    0xcb9(%rip),%rsi
mov    $0xff,%edx
mov    $0x100,%ecx
mov    $0x8,%r8d
mov    $0x20,%r9d
mov    $0x1,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x43c(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xcec(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x440(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x438(%rbp),%xmm0
ff
mov    -0x440(%rbp),%eax
shl    $0x3,%eax
add    -0x43c(%rbp),%eax
cltq
movss  -0x410(%rbp,%rax,4),%xmm1
ff ff
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edx
lea    0xca6(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x440(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x440(%rbp)
cmp    $0x20,%eax
jl     1433 <genrxfilt+0x2f3>
jmp    144a <genrxfilt+0x30a>
mov    -0x8(%rbp),%rdi
lea    0xc7b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    13d6 <genrxfilt+0x296>
mov    -0x8(%rbp),%rdi
lea    0xc66(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x43c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x43c(%rbp)
cmp    $0x8,%eax
jl     1479 <genrxfilt+0x339>
jmp    1490 <genrxfilt+0x350>
mov    -0x8(%rbp),%rdi
lea    0xc35(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    13ba <genrxfilt+0x27a>
mov    -0x8(%rbp),%rdi
lea    0xc23(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
add    $0x450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrxfilt>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x428,%rsp
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,0x10(%rsp)
addsd  0xe6b(%rip),%xmm0
mulsd  0xe6b(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sinc@plt>
movss  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  0xe56(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1060 <hamming@plt>
mulss  0x8(%rsp),%xmm0
movss  %xmm0,0x20(%rsp,%rbx,4)
add    $0x1,%rbx
cmp    $0x100,%rbx
jne    1180 <genrxfilt+0x20>
xorps  %xmm0,%xmm0
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,0x18(%rsp)
movss  0x20(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movss  0x40(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movss  0x60(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movss  0x80(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x8(%rsp),%xmm0
sub    $0xffffffffffffff80,%rbx
cmp    $0x400,%rbx
jne    11f0 <genrxfilt+0x90>
movsd  %xmm0,0x18(%rsp)
xorps  %xmm0,%xmm0
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,0x10(%rsp)
movss  0x24(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movss  0x44(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x40,%rbx
cmp    $0x400,%rbx
jne    1290 <genrxfilt+0x130>
movsd  %xmm0,0x10(%rsp)
xorpd  %xmm1,%xmm1
movsd  0x18(%rsp),%xmm0
maxsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rsp)
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsd  %xmm1,0x8(%rsp)
movss  0x28(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movss  0x48(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
addsd  0x8(%rsp),%xmm1
add    $0x40,%rbx
cmp    $0x400,%rbx
jne    1300 <genrxfilt+0x1a0>
movsd  %xmm1,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
maxsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
nopl   0x0(%rax)
movsd  %xmm0,0x18(%rsp)
movss  0x2c(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movss  0x4c(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x18(%rsp),%xmm0
add    $0x40,%rbx
cmp    $0x400,%rbx
jne    1370 <genrxfilt+0x210>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
maxsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
nopl   0x0(%rax)
movsd  %xmm0,0x10(%rsp)
movss  0x30(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0x50(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x40,%rbx
cmp    $0x400,%rbx
jne    13e0 <genrxfilt+0x280>
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
maxsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
nopl   0x0(%rax)
movsd  %xmm0,0x8(%rsp)
movss  0x34(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movss  0x54(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x40,%rbx
cmp    $0x400,%rbx
jne    1450 <genrxfilt+0x2f0>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
maxsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
nopl   0x0(%rax)
movsd  %xmm0,0x18(%rsp)
movss  0x38(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movss  0x58(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x18(%rsp),%xmm0
add    $0x40,%rbx
cmp    $0x400,%rbx
jne    14c0 <genrxfilt+0x360>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
maxsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
nopl   0x0(%rax)
movsd  %xmm0,0x10(%rsp)
movss  0x3c(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0x5c(%rsp,%rbx,1),%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x40,%rbx
cmp    $0x400,%rbx
jne    1530 <genrxfilt+0x3d0>
movsd  0x18(%rsp),%xmm1
maxsd  0x8(%rsp),%xmm1
maxsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
lea    0xa88(%rip),%rdi
mov    $0x1,%ebp
mov    $0xf,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
movss  0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xa70(%rip),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
lea    0xa62(%rip),%r14
jmp    1604 <genrxfilt+0x4a4>
cs nopw 0x0(%rax,%rax,1)
movss  0x20(%rsp,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
add    $0x1,%rbp
cmp    $0x100,%rbp
je     1621 <genrxfilt+0x4c1>
test   $0x3,%bpl
jne    15e0 <genrxfilt+0x480>
mov    $0xd,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %r15,%rcx
call   1080 <fwrite@plt>
jmp    15e0 <genrxfilt+0x480>
movsd  0x9ef(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
lea    0xa04(%rip),%rsi
mov    %r15,%rdi
mov    $0xff,%edx
mov    $0x100,%ecx
mov    $0x8,%r8d
mov    $0x20,%r9d
mov    $0x1,%al
call   1050 <fprintf@plt>
lea    0x20(%rsp),%rbx
lea    0xa41(%rip),%r13
lea    0xa3e(%rip),%r12
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xa18(%rip),%rdi
mov    %r15,%rcx
call   1080 <fwrite@plt>
movss  0x20(%rsp,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edx
mov    %r15,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x20,%r14d
mov    $0x2c,%edi
mov    %r15,%rsi
call   1030 <fputc@plt>
movss  (%rbx,%r14,1),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edx
mov    %r15,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
add    $0x20,%r14
cmp    $0x400,%r14
jne    16c0 <genrxfilt+0x560>
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r12,%rdi
mov    %r15,%rcx
call   1080 <fwrite@plt>
cmp    $0x7,%rbp
je     1730 <genrxfilt+0x5d0>
add    $0x1,%rbp
mov    $0x2c,%edi
mov    %r15,%rsi
call   1030 <fputc@plt>
add    $0x4,%rbx
jmp    1680 <genrxfilt+0x520>
lea    0x97d(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r15,%rcx
add    $0x428,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <fwrite@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"/*\0A rxfilt = [\00"
@.str.1 = [6 x i8] c" %g ;\00"
@.str.2 = [14 x i8] c"\0A \00"
@.str.3 = [101 x i8] c" ];\0A abssum = %g;\0A semilogy((0:%u)/%u,abs(fft(rxfilt)))\0A */\0A\0Astatic const int rxfilter[%u][%u] = {\00"
@.str.4 = [4 x i8] c"\0A\09{\00"
@.str.5 = [4 x i8] c" %d\00"
@.str.6 = [2 x i8] c",\00"
@.str.7 = [3 x i8] c" }\00"
@.str.8 = [6 x i8] c"\0A};\0A\0A\00"
define void @genrxfilt(i32* %0) {
%2 = alloca i32*
%3 = alloca [256 x float]
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %2
store double 0x3FABDD2B899406F7, double* %4
%11 = load double, double* %4
%12 = fmul double %11, 1.400000e+00
store double %12, double* %4
store i32 0, i32* %9
br label %13
13: ; preds = %33, %1
%14 = load i32, i32* %9
%15 = icmp slt i32 %14, 256
br i1 %15, label %16, label %36
16: ; preds = %13
%17 = load i32, i32* %9
%18 = sitofp i32 %17 to double
%19 = fsub double %18, 1.280000e+02
%20 = load double, double* %4
%21 = fmul double %19, %20
%22 = fptosi double %21 to i32
%23 = call float @sinc(i32 %22)
%24 = load i32, i32* %9
%25 = sitofp i32 %24 to double
%26 = fmul double %25, 0x3F70101010101010
%27 = fptosi double %26 to i32
%28 = call float @hamming(i32 %27)
%29 = fmul float %23, %28
%30 = load i32, i32* %9
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 %31
store float %29, float* %32
br label %33
33: ; preds = %16
%34 = load i32, i32* %9
%35 = add nsw i32 %34, 1
store i32 %35, i32* %9
br label %13
36: ; preds = %13
store double 0.000000e+00, double* %7
store i32 0, i32* %9
br label %37
37: ; preds = %66, %36
%38 = load i32, i32* %9
%39 = icmp slt i32 %38, 8
br i1 %39, label %40, label %69
40: ; preds = %37
store double 0.000000e+00, double* %8
store i32 0, i32* %10
br label %41
41: ; preds = %56, %40
%42 = load i32, i32* %10
%43 = icmp slt i32 %42, 32
br i1 %43, label %44, label %59
44: ; preds = %41
%45 = load i32, i32* %10
%46 = mul nsw i32 %45, 8
%47 = load i32, i32* %9
%48 = add nsw i32 %46, %47
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 %49
%51 = load float, float* %50
%52 = call i64 @fabs(float %51)
%53 = sitofp i64 %52 to double
%54 = load double, double* %8
%55 = fadd double %54, %53
store double %55, double* %8
br label %56
56: ; preds = %44
%57 = load i32, i32* %10
%58 = add nsw i32 %57, 1
store i32 %58, i32* %10
br label %41
59: ; preds = %41
%60 = load double, double* %8
%61 = load double, double* %7
%62 = fcmp ogt double %60, %61
br i1 %62, label %63, label %65
63: ; preds = %59
%64 = load double, double* %8
store double %64, double* %7
br label %65
65: ; preds = %63, %59
br label %66
66: ; preds = %65
%67 = load i32, i32* %9
%68 = add nsw i32 %67, 1
store i32 %68, i32* %9
br label %37
69: ; preds = %37
%70 = load double, double* %7
%71 = fdiv double 6.553500e+04, %70
store double %71, double* %8
%72 = load i32*, i32** %2
%73 = call i32 (i32*, i8*, ...) @fprintf(i32* %72, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %9
br label %74
74: ; preds = %91, %90, %69
%75 = load i32*, i32** %2
%76 = load i32, i32* %9
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 %77
%79 = load float, float* %78
%80 = fpext float %79 to double
%81 = call i32 (i32*, i8*, ...) @fprintf(i32* %75, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %80)
%82 = load i32, i32* %9
%83 = add nsw i32 %82, 1
store i32 %83, i32* %9
%84 = icmp sge i32 %83, 256
br i1 %84, label %85, label %86
85: ; preds = %74
br label %94
86: ; preds = %74
%87 = load i32, i32* %9
%88 = and i32 %87, 3
%89 = icmp ne i32 %88, 0
br i1 %89, label %90, label %91
90: ; preds = %86
br label %74
91: ; preds = %86
%92 = load i32*, i32** %2
%93 = call i32 (i32*, i8*, ...) @fprintf(i32* %92, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %74
94: ; preds = %85
%95 = load i32*, i32** %2
%96 = load double, double* %7
%97 = call i32 (i32*, i8*, ...) @fprintf(i32* %95, i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.3, i64 0, i64 0), double %96, i32 255, i32 256, i32 8, i32 32)
store i32 0, i32* %9
br label %98
98: ; preds = %129, %94
%99 = load i32*, i32** %2
%100 = call i32 (i32*, i8*, ...) @fprintf(i32* %99, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %10
br label %101
101: ; preds = %119, %98
%102 = load i32*, i32** %2
%103 = load double, double* %8
%104 = load i32, i32* %10
%105 = mul nsw i32 %104, 8
%106 = load i32, i32* %9
%107 = add nsw i32 %105, %106
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 %108
%110 = load float, float* %109
%111 = fpext float %110 to double
%112 = fmul double %103, %111
%113 = fptosi double %112 to i32
%114 = call i32 (i32*, i8*, ...) @fprintf(i32* %102, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %113)
%115 = load i32, i32* %10
%116 = add nsw i32 %115, 1
store i32 %116, i32* %10
%117 = icmp sge i32 %116, 32
br i1 %117, label %118, label %119
118: ; preds = %101
br label %122
119: ; preds = %101
%120 = load i32*, i32** %2
%121 = call i32 (i32*, i8*, ...) @fprintf(i32* %120, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %101
122: ; preds = %118
%123 = load i32*, i32** %2
%124 = call i32 (i32*, i8*, ...) @fprintf(i32* %123, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%125 = load i32, i32* %9
%126 = add nsw i32 %125, 1
store i32 %126, i32* %9
%127 = icmp sge i32 %126, 8
br i1 %127, label %128, label %129
128: ; preds = %122
br label %132
129: ; preds = %122
%130 = load i32*, i32** %2
%131 = call i32 (i32*, i8*, ...) @fprintf(i32* %130, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %98
132: ; preds = %128
%133 = load i32*, i32** %2
%134 = call i32 (i32*, i8*, ...) @fprintf(i32* %133, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"/*\0A rxfilt = [\00"
@.str.1 = [6 x i8] c" %g ;\00"
@.str.2 = [14 x i8] c"\0A \00"
@.str.3 = [101 x i8] c" ];\0A abssum = %g;\0A semilogy((0:%u)/%u,abs(fft(rxfilt)))\0A */\0A\0Astatic const int rxfilter[%u][%u] = {\00"
@.str.4 = [4 x i8] c"\0A\09{\00"
@.str.5 = [4 x i8] c" %d\00"
@.str.7 = [3 x i8] c" }\00"
@.str.8 = [6 x i8] c"\0A};\0A\0A\00"
define void @genrxfilt(i32* nocapture %0) {
%2 = alloca [256 x float]
%3 = bitcast [256 x float]* %2 to i8*
br label %4
4: ; preds = %1, %4
%5 = phi i64 [ 0, %1 ], [ %17, %4 ]
%6 = trunc i64 %5 to i32
%7 = sitofp i32 %6 to double
%8 = fadd double %7, -1.280000e+02
%9 = fmul double %8, 0x3FB3813813813813
%10 = fptosi double %9 to i32
%11 = tail call float @sinc(i32 %10)
%12 = fmul double %7, 0x3F70101010101010
%13 = fptosi double %12 to i32
%14 = tail call float @hamming(i32 %13)
%15 = fmul float %11, %14
%16 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %5
store float %15, float* %16
%17 = add nuw nsw i64 %5, 1
%18 = icmp eq i64 %17, 256
br i1 %18, label %19, label %4
19: ; preds = %4, %19
%20 = phi i64 [ %49, %19 ], [ 0, %4 ]
%21 = phi double [ %48, %19 ], [ 0.000000e+00, %4 ]
%22 = shl nuw nsw i64 %20, 3
%23 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %22
%24 = load float, float* %23
%25 = tail call i64 @fabs(float %24)
%26 = sitofp i64 %25 to double
%27 = fadd double %21, %26
%28 = shl i64 %20, 3
%29 = or i64 %28, 8
%30 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %29
%31 = load float, float* %30
%32 = tail call i64 @fabs(float %31)
%33 = sitofp i64 %32 to double
%34 = fadd double %27, %33
%35 = shl i64 %20, 3
%36 = or i64 %35, 16
%37 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %36
%38 = load float, float* %37
%39 = tail call i64 @fabs(float %38)
%40 = sitofp i64 %39 to double
%41 = fadd double %34, %40
%42 = shl i64 %20, 3
%43 = or i64 %42, 24
%44 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %43
%45 = load float, float* %44
%46 = tail call i64 @fabs(float %45)
%47 = sitofp i64 %46 to double
%48 = fadd double %41, %47
%49 = add nuw nsw i64 %20, 4
%50 = icmp eq i64 %49, 32
br i1 %50, label %51, label %19
51: ; preds = %19
%52 = fcmp ogt double %48, 0.000000e+00
br label %53
53: ; preds = %53, %51
%54 = phi i64 [ 0, %51 ], [ %70, %53 ]
%55 = phi double [ 0.000000e+00, %51 ], [ %69, %53 ]
%56 = shl nuw nsw i64 %54, 3
%57 = or i64 %56, 1
%58 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %57
%59 = load float, float* %58
%60 = tail call i64 @fabs(float %59)
%61 = sitofp i64 %60 to double
%62 = fadd double %55, %61
%63 = shl i64 %54, 3
%64 = or i64 %63, 9
%65 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %64
%66 = load float, float* %65
%67 = tail call i64 @fabs(float %66)
%68 = sitofp i64 %67 to double
%69 = fadd double %62, %68
%70 = add nuw nsw i64 %54, 2
%71 = icmp eq i64 %70, 32
br i1 %71, label %72, label %53
72: ; preds = %53
%73 = select i1 %52, double %48, double 0.000000e+00
%74 = fcmp ogt double %69, %73
br label %75
75: ; preds = %75, %72
%76 = phi i64 [ 0, %72 ], [ %92, %75 ]
%77 = phi double [ 0.000000e+00, %72 ], [ %91, %75 ]
%78 = shl nuw nsw i64 %76, 3
%79 = or i64 %78, 2
%80 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %79
%81 = load float, float* %80
%82 = tail call i64 @fabs(float %81)
%83 = sitofp i64 %82 to double
%84 = fadd double %77, %83
%85 = shl i64 %76, 3
%86 = or i64 %85, 10
%87 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %86
%88 = load float, float* %87
%89 = tail call i64 @fabs(float %88)
%90 = sitofp i64 %89 to double
%91 = fadd double %84, %90
%92 = add nuw nsw i64 %76, 2
%93 = icmp eq i64 %92, 32
br i1 %93, label %94, label %75
94: ; preds = %75
%95 = select i1 %74, double %69, double %73
%96 = fcmp ogt double %91, %95
br label %97
97: ; preds = %97, %94
%98 = phi i64 [ 0, %94 ], [ %114, %97 ]
%99 = phi double [ 0.000000e+00, %94 ], [ %113, %97 ]
%100 = shl nuw nsw i64 %98, 3
%101 = or i64 %100, 3
%102 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %101
%103 = load float, float* %102
%104 = tail call i64 @fabs(float %103)
%105 = sitofp i64 %104 to double
%106 = fadd double %99, %105
%107 = shl i64 %98, 3
%108 = or i64 %107, 11
%109 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %108
%110 = load float, float* %109
%111 = tail call i64 @fabs(float %110)
%112 = sitofp i64 %111 to double
%113 = fadd double %106, %112
%114 = add nuw nsw i64 %98, 2
%115 = icmp eq i64 %114, 32
br i1 %115, label %116, label %97
116: ; preds = %97
%117 = select i1 %96, double %91, double %95
%118 = fcmp ogt double %113, %117
br label %119
119: ; preds = %119, %116
%120 = phi i64 [ 0, %116 ], [ %136, %119 ]
%121 = phi double [ 0.000000e+00, %116 ], [ %135, %119 ]
%122 = shl nuw nsw i64 %120, 3
%123 = or i64 %122, 4
%124 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %123
%125 = load float, float* %124
%126 = tail call i64 @fabs(float %125)
%127 = sitofp i64 %126 to double
%128 = fadd double %121, %127
%129 = shl i64 %120, 3
%130 = or i64 %129, 12
%131 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %130
%132 = load float, float* %131
%133 = tail call i64 @fabs(float %132)
%134 = sitofp i64 %133 to double
%135 = fadd double %128, %134
%136 = add nuw nsw i64 %120, 2
%137 = icmp eq i64 %136, 32
br i1 %137, label %138, label %119
138: ; preds = %119
%139 = select i1 %118, double %113, double %117
%140 = fcmp ogt double %135, %139
br label %141
141: ; preds = %141, %138
%142 = phi i64 [ 0, %138 ], [ %158, %141 ]
%143 = phi double [ 0.000000e+00, %138 ], [ %157, %141 ]
%144 = shl nuw nsw i64 %142, 3
%145 = or i64 %144, 5
%146 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %145
%147 = load float, float* %146
%148 = tail call i64 @fabs(float %147)
%149 = sitofp i64 %148 to double
%150 = fadd double %143, %149
%151 = shl i64 %142, 3
%152 = or i64 %151, 13
%153 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %152
%154 = load float, float* %153
%155 = tail call i64 @fabs(float %154)
%156 = sitofp i64 %155 to double
%157 = fadd double %150, %156
%158 = add nuw nsw i64 %142, 2
%159 = icmp eq i64 %158, 32
br i1 %159, label %160, label %141
160: ; preds = %141
%161 = select i1 %140, double %135, double %139
%162 = fcmp ogt double %157, %161
br label %163
163: ; preds = %163, %160
%164 = phi i64 [ 0, %160 ], [ %180, %163 ]
%165 = phi double [ 0.000000e+00, %160 ], [ %179, %163 ]
%166 = shl nuw nsw i64 %164, 3
%167 = or i64 %166, 6
%168 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %167
%169 = load float, float* %168
%170 = tail call i64 @fabs(float %169)
%171 = sitofp i64 %170 to double
%172 = fadd double %165, %171
%173 = shl i64 %164, 3
%174 = or i64 %173, 14
%175 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %174
%176 = load float, float* %175
%177 = tail call i64 @fabs(float %176)
%178 = sitofp i64 %177 to double
%179 = fadd double %172, %178
%180 = add nuw nsw i64 %164, 2
%181 = icmp eq i64 %180, 32
br i1 %181, label %182, label %163
182: ; preds = %163
%183 = select i1 %162, double %157, double %161
%184 = fcmp ogt double %179, %183
br label %185
185: ; preds = %185, %182
%186 = phi i64 [ 0, %182 ], [ %202, %185 ]
%187 = phi double [ 0.000000e+00, %182 ], [ %201, %185 ]
%188 = shl nuw nsw i64 %186, 3
%189 = or i64 %188, 7
%190 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %189
%191 = load float, float* %190
%192 = tail call i64 @fabs(float %191)
%193 = sitofp i64 %192 to double
%194 = fadd double %187, %193
%195 = shl i64 %186, 3
%196 = or i64 %195, 15
%197 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %196
%198 = load float, float* %197
%199 = tail call i64 @fabs(float %198)
%200 = sitofp i64 %199 to double
%201 = fadd double %194, %200
%202 = add nuw nsw i64 %186, 2
%203 = icmp eq i64 %202, 32
br i1 %203, label %204, label %185
204: ; preds = %185
%205 = select i1 %184, double %179, double %183
%206 = fcmp ogt double %201, %205
%207 = select i1 %206, double %201, double %205
%208 = tail call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 15, i64 1, i32* %0)
%209 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 0
%210 = load float, float* %209
%211 = fpext float %210 to double
%212 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %211)
br label %213
213: ; preds = %204, %219
%214 = phi i64 [ 1, %204 ], [ %224, %219 ]
%215 = and i64 %214, 3
%216 = icmp eq i64 %215, 0
br i1 %216, label %217, label %219
217: ; preds = %213
%218 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %0)
br label %219
219: ; preds = %217, %213
%220 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %214
%221 = load float, float* %220
%222 = fpext float %221 to double
%223 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %222)
%224 = add nuw nsw i64 %214, 1
%225 = icmp eq i64 %224, 256
br i1 %225, label %226, label %213
226: ; preds = %219
%227 = fdiv double 6.553500e+04, %207
%228 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.3, i64 0, i64 0), double %207, i32 255, i32 256, i32 8, i32 32)
br label %229
229: ; preds = %254, %226
%230 = phi i64 [ %255, %254 ], [ 0, %226 ]
%231 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i64 3, i64 1, i32* %0)
%232 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %230
%233 = load float, float* %232
%234 = fpext float %233 to double
%235 = fmul double %227, %234
%236 = fptosi double %235 to i32
%237 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %236)
br label %238
238: ; preds = %229, %238
%239 = phi i64 [ 0, %229 ], [ %240, %238 ]
%240 = add nuw nsw i64 %239, 1
%241 = tail call i32 @fputc(i32 44, i32* %0)
%242 = shl nsw i64 %240, 3
%243 = add nuw nsw i64 %242, %230
%244 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 %243
%245 = load float, float* %244
%246 = fpext float %245 to double
%247 = fmul double %227, %246
%248 = fptosi double %247 to i32
%249 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %248)
%250 = icmp eq i64 %240, 31
br i1 %250, label %251, label %238
251: ; preds = %238
%252 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i64 2, i64 1, i32* %0)
%253 = icmp eq i64 %230, 7
br i1 %253, label %257, label %254
254: ; preds = %251
%255 = add nuw nsw i64 %230, 1
%256 = tail call i32 @fputc(i32 44, i32* %0)
br label %229
257: ; preds = %251
%258 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i64 5, i64 1, i32* %0)
ret void
}