#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*/ a_buff;

/* Variables and functions */
int /*<<< orphan*/ fn_WTconformAndDecimatorBy2(float *, float *,
                                               unsigned int const, float *,
                                               unsigned int const);
int /*<<< orphan*/ memcpy(float *, float *, int);
int /*<<< orphan*/ memset(float *, int /*<<< orphan*/, int);
void fn_dirUniversalRecursiveFWT(float *p_ka, float *a_da,
                                 const unsigned int const cuci_N,
                                 unsigned int cuic_w, float *p2tf_HPF,
                                 float *p2tf_LPF,
                                 const unsigned int const cuic_ord) {
  float a_buff[cuci_N >> 1];
  if (cuic_w == 0) {
    return;
  }
  memset(a_buff, 0, sizeof(a_buff));
  fn_WTconformAndDecimatorBy2(p_ka, a_da, cuci_N, p2tf_HPF, cuic_ord);
  fn_WTconformAndDecimatorBy2(a_buff, a_da, cuci_N, p2tf_LPF, cuic_ord);
  if ((cuic_w - 1) == 0) {
    memcpy(&p_ka[cuci_N >> 1], a_buff, sizeof(a_buff));
    return;
  }
  fn_dirUniversalRecursiveFWT(&p_ka[cuci_N >> 1], a_buff, (cuci_N >> 1),
                              (cuic_w - 1), p2tf_HPF, p2tf_LPF, cuic_ord);
  return;
}


x86 assembly (clang, -O0):
<fn_dirUniversalRecursiveFWT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x14(%rbp),%eax
shr    %eax
mov    %rax,-0x50(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    11a4 <fn_dirUniversalRecursiveFWT+0x64>
movl   $0x1,-0x3c(%rbp)
jmp    126f <fn_dirUniversalRecursiveFWT+0x12f>
mov    -0x48(%rbp),%rdi
mov    -0x50(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    0x10(%rbp),%r8d
call   1030 <fn_WTconformAndDecimatorBy2@plt>
mov    -0x48(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    0x10(%rbp),%r8d
call   1030 <fn_WTconformAndDecimatorBy2@plt>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jne    122a <fn_dirUniversalRecursiveFWT+0xea>
mov    -0x48(%rbp),%rsi
mov    -0x50(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%ecx
shr    $0x1,%ecx
mov    %ecx,%ecx
shl    $0x2,%rcx
add    %rcx,%rdi
shl    $0x2,%rax
mov    %eax,%edx
call   1060 <memcpy@plt>
movl   $0x1,-0x3c(%rbp)
jmp    126f <fn_dirUniversalRecursiveFWT+0x12f>
mov    -0x48(%rbp),%rsi
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%eax
shr    $0x1,%eax
mov    %eax,%eax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x14(%rbp),%edx
shr    $0x1,%edx
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%eax
sub    $0x10,%rsp
mov    %eax,(%rsp)
call   1040 <fn_dirUniversalRecursiveFWT@plt>
add    $0x10,%rsp
movl   $0x1,-0x3c(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_dirUniversalRecursiveFWT>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,-0x40(%rbp)
mov    %r8,-0x38(%rbp)
mov    %edx,%r13d
shr    %r13d
mov    %rsp,%rbx
lea    0xf(,%r13,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
test   %ecx,%ecx
je     1203 <fn_dirUniversalRecursiveFWT+0xc3>
mov    %edx,%r15d
lea    0x0(,%r13,4),%edx
mov    %rdi,%r12
mov    %rbx,%rdi
mov    %rsi,%r14
xor    %esi,%esi
mov    %edx,-0x2c(%rbp)
mov    %ecx,-0x30(%rbp)
call   1050 <memset@plt>
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
mov    -0x38(%rbp),%rcx
mov    0x10(%rbp),%r8d
call   1030 <fn_WTconformAndDecimatorBy2@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
mov    -0x40(%rbp),%r15
mov    %r15,%rcx
mov    0x10(%rbp),%r8d
call   1030 <fn_WTconformAndDecimatorBy2@plt>
mov    -0x30(%rbp),%ecx
lea    (%r12,%r13,4),%rdi
add    $0xffffffff,%ecx
je     11f8 <fn_dirUniversalRecursiveFWT+0xb8>
sub    $0x8,%rsp
mov    %rbx,%rsi
mov    %r13d,%edx
mov    -0x38(%rbp),%r8
mov    %r15,%r9
mov    0x10(%rbp),%eax
push   %rax
call   1040 <fn_dirUniversalRecursiveFWT@plt>
add    $0x10,%rsp
jmp    1203 <fn_dirUniversalRecursiveFWT+0xc3>
mov    %rbx,%rsi
mov    -0x2c(%rbp),%edx
call   1060 <memcpy@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @fn_dirUniversalRecursiveFWT(float* %0, float* %1, i32 %2, i32 %3, float* %4, float* %5, i32 %6) {
%8 = alloca float*
%9 = alloca float*
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i64
%17 = alloca i32
store float* %0, float** %8
store float* %1, float** %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
store i32 %6, i32* %14
%18 = load i32, i32* %10
%19 = lshr i32 %18, 1
%20 = zext i32 %19 to i64
%21 = call i8* @llvm.stacksave()
store i8* %21, i8** %15
%22 = alloca float, i64 %20
store i64 %20, i64* %16
%23 = load i32, i32* %11
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %7
store i32 1, i32* %17
br label %66
26: ; preds = %7
%27 = mul nuw i64 4, %20
%28 = trunc i64 %27 to i32
%29 = call i32 @memset(float* %22, i32 0, i32 %28)
%30 = load float*, float** %8
%31 = load float*, float** %9
%32 = load i32, i32* %10
%33 = load float*, float** %12
%34 = load i32, i32* %14
%35 = call i32 @fn_WTconformAndDecimatorBy2(float* %30, float* %31, i32 %32, float* %33, i32 %34)
%36 = load float*, float** %9
%37 = load i32, i32* %10
%38 = load float*, float** %13
%39 = load i32, i32* %14
%40 = call i32 @fn_WTconformAndDecimatorBy2(float* %22, float* %36, i32 %37, float* %38, i32 %39)
%41 = load i32, i32* %11
%42 = sub i32 %41, 1
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %53
44: ; preds = %26
%45 = load float*, float** %8
%46 = load i32, i32* %10
%47 = lshr i32 %46, 1
%48 = zext i32 %47 to i64
%49 = getelementptr inbounds float, float* %45, i64 %48
%50 = mul nuw i64 4, %20
%51 = trunc i64 %50 to i32
%52 = call i32 @memcpy(float* %49, float* %22, i32 %51)
store i32 1, i32* %17
br label %66
53: ; preds = %26
%54 = load float*, float** %8
%55 = load i32, i32* %10
%56 = lshr i32 %55, 1
%57 = zext i32 %56 to i64
%58 = getelementptr inbounds float, float* %54, i64 %57
%59 = load i32, i32* %10
%60 = lshr i32 %59, 1
%61 = load i32, i32* %11
%62 = sub i32 %61, 1
%63 = load float*, float** %12
%64 = load float*, float** %13
%65 = load i32, i32* %14
store i32 1, i32* %17
br label %66
66: ; preds = %53, %44, %25
%67 = load i8*, i8** %15
ret void
}

LLVM IR (-O2):
define void @fn_dirUniversalRecursiveFWT(float* %0, float* %1, i32 %2, i32 %3, float* %4, float* %5, i32 %6) {
%8 = lshr i32 %2, 1
%9 = zext i32 %8 to i64
%10 = alloca float, i64 %9
%11 = icmp eq i32 %3, 0
br i1 %11, label %23, label %12
12: ; preds = %7
%13 = shl i32 %8, 2
%14 = call i32 @memset(float* %10, i32 0, i32 %13)
%15 = call i32 @fn_WTconformAndDecimatorBy2(float* %0, float* %1, i32 %2, float* %4, i32 %6)
%16 = call i32 @fn_WTconformAndDecimatorBy2(float* %10, float* %1, i32 %2, float* %5, i32 %6)
%17 = add i32 %3, -1
%18 = icmp eq i32 %17, 0
%19 = getelementptr inbounds float, float* %0, i64 %9
br i1 %18, label %20, label %22
20: ; preds = %12
%21 = call i32 @memcpy(float* %19, float* %10, i32 %13)
br label %23
22: ; preds = %12
br label %23
23: ; preds = %7, %22, %20
ret void
}