#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_WTconformAndUpsemplerBy2(float *, float *,
                                               unsigned int const, float *,
                                               unsigned int const);
int /*<<< orphan*/ memcpy(float *, float *, int);
int /*<<< orphan*/ memset(float *, int /*<<< orphan*/, int);
void fn_invUniversalRecursiveFWT(float *a_da, float *p_ka,
                                 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;
  }
  if ((cuic_w - 1) == 0) {
    memcpy(a_buff, &p_ka[cuci_N >> 1], sizeof(a_buff));
    fn_WTconformAndUpsemplerBy2(a_da, p_ka, cuci_N, p2tf_HPF, cuic_ord);
    fn_WTconformAndUpsemplerBy2(a_da, a_buff, cuci_N, p2tf_LPF, cuic_ord);
    return;
  }
  fn_invUniversalRecursiveFWT(a_da, &p_ka[cuci_N >> 1], (cuci_N >> 1),
                              (cuic_w - 1), p2tf_HPF, p2tf_LPF, cuic_ord);
  memset(a_buff, 0, sizeof(a_buff));
  memcpy(a_buff, a_da, (sizeof(float) * cuci_N) >> 1);
  memset(a_da, 0, (sizeof(float) * cuci_N) >> 1);
  fn_WTconformAndUpsemplerBy2(a_da, p_ka, cuci_N, p2tf_HPF, cuic_ord);
  fn_WTconformAndUpsemplerBy2(a_da, a_buff, cuci_N, p2tf_LPF, cuic_ord);
  return;
}


x86 assembly (clang, -O0):
<fn_invUniversalRecursiveFWT>:
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_invUniversalRecursiveFWT+0x64>
movl   $0x1,-0x3c(%rbp)
jmp    12d1 <fn_invUniversalRecursiveFWT+0x191>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jne    1215 <fn_invUniversalRecursiveFWT+0xd5>
mov    -0x48(%rbp),%rdi
mov    -0x50(%rbp),%rax
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
shr    $0x1,%ecx
mov    %ecx,%ecx
shl    $0x2,%rcx
add    %rcx,%rsi
shl    $0x2,%rax
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    0x10(%rbp),%r8d
call   1050 <fn_WTconformAndUpsemplerBy2@plt>
mov    -0x48(%rbp),%rsi
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    0x10(%rbp),%r8d
call   1050 <fn_WTconformAndUpsemplerBy2@plt>
movl   $0x1,-0x3c(%rbp)
jmp    12d1 <fn_invUniversalRecursiveFWT+0x191>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
shr    $0x1,%eax
mov    %eax,%eax
shl    $0x2,%rax
add    %rax,%rsi
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   1060 <fn_invUniversalRecursiveFWT@plt>
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rdi
add    $0x10,%rsp
shl    $0x2,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x48(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%eax
shl    $0x2,%rax
shr    $0x1,%rax
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%eax
shl    $0x2,%rax
shr    $0x1,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    0x10(%rbp),%r8d
call   1050 <fn_WTconformAndUpsemplerBy2@plt>
mov    -0x48(%rbp),%rsi
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    0x10(%rbp),%r8d
call   1050 <fn_WTconformAndUpsemplerBy2@plt>
movl   $0x1,-0x3c(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_invUniversalRecursiveFWT>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edx,%ebx
shr    %ebx
mov    %rsp,%r14
lea    0xf(,%rbx,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
test   %ecx,%ecx
je     1211 <fn_invUniversalRecursiveFWT+0xd1>
mov    %edx,%r12d
mov    %rdi,%r15
mov    0x10(%rbp),%r13d
mov    %rsi,-0x40(%rbp)
lea    (%rsi,%rbx,4),%rsi
add    $0xffffffff,%ecx
mov    %r8,-0x38(%rbp)
je     11d7 <fn_invUniversalRecursiveFWT+0x97>
sub    $0x8,%rsp
mov    %r15,%rdi
mov    %ebx,%edx
mov    %r9,-0x30(%rbp)
push   %r13
call   1060 <fn_invUniversalRecursiveFWT@plt>
add    $0x10,%rsp
shl    $0x2,%ebx
mov    %r14,%rdi
xor    %esi,%esi
mov    %ebx,%edx
call   1030 <memset@plt>
lea    (%r12,%r12,1),%ebx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   1040 <memcpy@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    %ebx,%edx
mov    -0x30(%rbp),%rbx
call   1030 <memset@plt>
jmp    11e7 <fn_invUniversalRecursiveFWT+0xa7>
shl    $0x2,%ebx
mov    %r14,%rdi
mov    %ebx,%edx
mov    %r9,%rbx
call   1040 <memcpy@plt>
mov    %r15,%rdi
mov    -0x40(%rbp),%rsi
mov    %r12d,%edx
mov    -0x38(%rbp),%rcx
mov    %r13d,%r8d
call   1050 <fn_WTconformAndUpsemplerBy2@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r12d,%edx
mov    %rbx,%rcx
mov    %r13d,%r8d
call   1050 <fn_WTconformAndUpsemplerBy2@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @fn_invUniversalRecursiveFWT(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 %92
26: ; preds = %7
%27 = load i32, i32* %11
%28 = sub i32 %27, 1
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %50
30: ; preds = %26
%31 = load float*, float** %9
%32 = load i32, i32* %10
%33 = lshr i32 %32, 1
%34 = zext i32 %33 to i64
%35 = getelementptr inbounds float, float* %31, i64 %34
%36 = mul nuw i64 4, %20
%37 = trunc i64 %36 to i32
%38 = call i32 @memcpy(float* %22, float* %35, i32 %37)
%39 = load float*, float** %8
%40 = load float*, float** %9
%41 = load i32, i32* %10
%42 = load float*, float** %12
%43 = load i32, i32* %14
%44 = call i32 @fn_WTconformAndUpsemplerBy2(float* %39, float* %40, i32 %41, float* %42, i32 %43)
%45 = load float*, float** %8
%46 = load i32, i32* %10
%47 = load float*, float** %13
%48 = load i32, i32* %14
%49 = call i32 @fn_WTconformAndUpsemplerBy2(float* %45, float* %22, i32 %46, float* %47, i32 %48)
store i32 1, i32* %17
br label %92
50: ; preds = %26
%51 = load float*, float** %8
%52 = load float*, float** %9
%53 = load i32, i32* %10
%54 = lshr i32 %53, 1
%55 = zext i32 %54 to i64
%56 = getelementptr inbounds float, float* %52, i64 %55
%57 = load i32, i32* %10
%58 = lshr i32 %57, 1
%59 = load i32, i32* %11
%60 = sub i32 %59, 1
%61 = load float*, float** %12
%62 = load float*, float** %13
%63 = load i32, i32* %14
%64 = mul nuw i64 4, %20
%65 = trunc i64 %64 to i32
%66 = call i32 @memset(float* %22, i32 0, i32 %65)
%67 = load float*, float** %8
%68 = load i32, i32* %10
%69 = zext i32 %68 to i64
%70 = mul i64 4, %69
%71 = lshr i64 %70, 1
%72 = trunc i64 %71 to i32
%73 = call i32 @memcpy(float* %22, float* %67, i32 %72)
%74 = load float*, float** %8
%75 = load i32, i32* %10
%76 = zext i32 %75 to i64
%77 = mul i64 4, %76
%78 = lshr i64 %77, 1
%79 = trunc i64 %78 to i32
%80 = call i32 @memset(float* %74, i32 0, i32 %79)
%81 = load float*, float** %8
%82 = load float*, float** %9
%83 = load i32, i32* %10
%84 = load float*, float** %12
%85 = load i32, i32* %14
%86 = call i32 @fn_WTconformAndUpsemplerBy2(float* %81, float* %82, i32 %83, float* %84, i32 %85)
%87 = load float*, float** %8
%88 = load i32, i32* %10
%89 = load float*, float** %13
%90 = load i32, i32* %14
%91 = call i32 @fn_WTconformAndUpsemplerBy2(float* %87, float* %22, i32 %88, float* %89, i32 %90)
store i32 1, i32* %17
br label %92
92: ; preds = %50, %30, %25
%93 = load i8*, i8** %15
ret void
}

LLVM IR (-O2):
define void @fn_invUniversalRecursiveFWT(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 %28, label %12
12: ; preds = %7
%13 = add i32 %3, -1
%14 = icmp eq i32 %13, 0
%15 = getelementptr inbounds float, float* %1, i64 %9
br i1 %14, label %16, label %19
16: ; preds = %12
%17 = shl i32 %8, 2
%18 = call i32 @memcpy(float* %10, float* %15, i32 %17)
br label %25
19: ; preds = %12
tail call void @fn_invUniversalRecursiveFWT(float* %0, float* %15, i32 %8, i32 %13, float* %4, float* %5, i32 %6)
%20 = shl i32 %8, 2
%21 = call i32 @memset(float* %10, i32 0, i32 %20)
%22 = shl i32 %2, 1
%23 = call i32 @memcpy(float* %10, float* %0, i32 %22)
%24 = call i32 @memset(float* %0, i32 0, i32 %22)
br label %25
25: ; preds = %16, %19
%26 = call i32 @fn_WTconformAndUpsemplerBy2(float* %0, float* %1, i32 %2, float* %4, i32 %6)
%27 = call i32 @fn_WTconformAndUpsemplerBy2(float* %0, float* %10, i32 %2, float* %5, i32 %6)
br label %28
28: ; preds = %25, %7
ret void
}