#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 */
float cosf(float);
int /*<<< orphan*/ printf(char *, float, float, float, float, float);
float tanf(float);
void main() {
  float _accel_range_scale = 9.80665f / 4096;
  float _accel_scale_x_offset = 0;
  float _accel_scale_x_scale = 1;
  float sample_freq = 1000;
  float _cutoff_freq = 30;
  float fr = sample_freq / _cutoff_freq;
  float ohm = tanf(3.14159f / fr);
  float cs = cosf(3.14159f / 4.0);
  float c = 1.0 + 2.0 * cs * ohm + ohm * ohm;
  float _b0 = ohm * ohm / c;
  float _b1 = 2.0 * _b0;
  float _b2 = _b0;
  float _a1 = 2.0 * (ohm * ohm - 1.0) / c;
  float _a2 = (1.0 - 2.0 * cs * ohm + ohm * ohm) / c;
  printf("_b0 = %a\n_b1 = %a\n_b2 = %a\n_a1 = %a\n_a2 = %a\n\n", _b0, _b1, _b2,
         _a1, _a2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movss  0xee4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xecb(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xeba(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xea9(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
divss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe89(%rip),%xmm0
divss  -0x18(%rbp),%xmm0
call   1030 <tanf@plt>
movss  %xmm0,-0x1c(%rbp)
movss  0xe6e(%rip),%xmm0
call   1040 <cosf@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe4b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe2a(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0x1c(%rbp),%xmm1
mulss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
divss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdee(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdb9(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xdb5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x24(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd8a(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xd52(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0x1c(%rbp),%xmm1
mulss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
movss  -0x24(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x28(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm1
movss  -0x30(%rbp),%xmm2
movss  -0x34(%rbp),%xmm3
movss  -0x38(%rbp),%xmm4
lea    0xd2e(%rip),%rdi
call   1050 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xef9(%rip),%rdi
movss  0xee1(%rip),%xmm1
movss  0xedd(%rip),%xmm0
movss  0xed9(%rip),%xmm3
movss  0xed5(%rip),%xmm4
movaps %xmm0,%xmm2
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"_b0 = %a\0A_b1 = %a\0A_b2 = %a\0A_a1 = %a\0A_a2 = %a\0A\0A\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
store float 0x3F639D0140000000, float* %1
store float 0.000000e+00, float* %2
store float 1.000000e+00, float* %3
store float 1.000000e+03, float* %4
store float 3.000000e+01, float* %5
%15 = load float, float* %4
%16 = load float, float* %5
%17 = fdiv float %15, %16
store float %17, float* %6
%18 = load float, float* %6
%19 = fdiv float 0x400921FA00000000, %18
%20 = call float @tanf(float %19)
store float %20, float* %7
%21 = call float @cosf(float 0x3FE921FA00000000)
store float %21, float* %8
%22 = load float, float* %8
%23 = fpext float %22 to double
%24 = fmul double 2.000000e+00, %23
%25 = load float, float* %7
%26 = fpext float %25 to double
%27 = call double @llvm.fmuladd.f64(double %24, double %26, double 1.000000e+00)
%28 = load float, float* %7
%29 = load float, float* %7
%30 = fmul float %28, %29
%31 = fpext float %30 to double
%32 = fadd double %27, %31
%33 = fptrunc double %32 to float
store float %33, float* %9
%34 = load float, float* %7
%35 = load float, float* %7
%36 = fmul float %34, %35
%37 = load float, float* %9
%38 = fdiv float %36, %37
store float %38, float* %10
%39 = load float, float* %10
%40 = fpext float %39 to double
%41 = fmul double 2.000000e+00, %40
%42 = fptrunc double %41 to float
store float %42, float* %11
%43 = load float, float* %10
store float %43, float* %12
%44 = load float, float* %7
%45 = load float, float* %7
%46 = fmul float %44, %45
%47 = fpext float %46 to double
%48 = fsub double %47, 1.000000e+00
%49 = fmul double 2.000000e+00, %48
%50 = load float, float* %9
%51 = fpext float %50 to double
%52 = fdiv double %49, %51
%53 = fptrunc double %52 to float
store float %53, float* %13
%54 = load float, float* %8
%55 = fpext float %54 to double
%56 = fmul double 2.000000e+00, %55
%57 = load float, float* %7
%58 = fpext float %57 to double
%59 = fneg double %56
%60 = call double @llvm.fmuladd.f64(double %59, double %58, double 1.000000e+00)
%61 = load float, float* %7
%62 = load float, float* %7
%63 = fmul float %61, %62
%64 = fpext float %63 to double
%65 = fadd double %60, %64
%66 = load float, float* %9
%67 = fpext float %66 to double
%68 = fdiv double %65, %67
%69 = fptrunc double %68 to float
store float %69, float* %14
%70 = load float, float* %10
%71 = load float, float* %11
%72 = load float, float* %12
%73 = load float, float* %13
%74 = load float, float* %14
%75 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), float %70, float %71, float %72, float %73, float %74)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"_b0 = %a\0A_b1 = %a\0A_b2 = %a\0A_a1 = %a\0A_a2 = %a\0A\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), float 0x3F800408E0000000, float 0x3F900408E0000000, float 0x3F800408E0000000, float 0xBFFBC16FE0000000, float 0x3FE8832040000000)
ret void
}