#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 *convolve(double *, int, double *, int);
int /*<<< orphan*/ free(double *);
double *make_low_pass_filter(double, double, double, int *);
double *cc_low_pass(double *data, int data_len, double omega_pass,
                    double omega_stop, double error) {
  int fir_len;
  double *fir = make_low_pass_filter(omega_pass, omega_stop, error, &fir_len);
  double *result;
  result = convolve(data, data_len, fir, fir_len);
  free(fir);
  return result;
}


x86 assembly (clang, -O0):
<cc_low_pass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
lea    -0x2c(%rbp),%rdi
call   1050 <make_low_pass_filter@plt>
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
call   1040 <convolve@plt>
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc_low_pass>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%r14d
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
call   1050 <make_low_pass_filter@plt>
mov    %rax,%rbp
mov    0xc(%rsp),%ecx
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rax,%rdx
call   1040 <convolve@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define double* @cc_low_pass(double* %0, i32 %1, double %2, double %3, double %4) {
%6 = alloca double*
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double* %0, double** %6
store i32 %1, i32* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%14 = load double, double* %8
%15 = load double, double* %9
%16 = load double, double* %10
%17 = call double* @make_low_pass_filter(double %14, double %15, double %16, i32* %11)
store double* %17, double** %12
%18 = load double*, double** %6
%19 = load i32, i32* %7
%20 = load double*, double** %12
%21 = load i32, i32* %11
%22 = call double* @convolve(double* %18, i32 %19, double* %20, i32 %21)
store double* %22, double** %13
%23 = load double*, double** %12
%24 = call i32 @free(double* %23)
%25 = load double*, double** %13
ret double* %25
}

LLVM IR (-O2):
define double* @cc_low_pass(double* %0, i32 %1, double %2, double %3, double %4) {
%6 = alloca i32
%7 = bitcast i32* %6 to i8*
%8 = call double* @make_low_pass_filter(double %2, double %3, double %4, i32* %6)
%9 = load i32, i32* %6
%10 = call double* @convolve(double* %0, i32 %1, double* %8, i32 %9)
%11 = call i32 @free(double* %8)
ret double* %10
}