#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 */
int /*<<< orphan*/ bfstages(float *, int, float *, int, unsigned long, int);
void fftrecurs(float *ioptr, int M, float *Utbl, int Ustride, int NDiffU,
               int StageCnt) {
  int i1;
  if (M <= (11 - (sizeof(float) / 8)))
    bfstages(ioptr, M, Utbl, Ustride, NDiffU, StageCnt);
  else {
    for (i1 = 0; i1 < 8; i1++) {
      fftrecurs(&ioptr[i1 * ((unsigned long)1 << (M - 3)) * 2], M - 3, Utbl,
                8 * Ustride, NDiffU, StageCnt - 1);
    }
    bfstages(ioptr, M, Utbl, Ustride, ((unsigned long)1 << (M - 3)), 1);
  }
}


x86 assembly (clang, -O0):
<fftrecurs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movslq -0xc(%rbp),%rax
cmp    $0xb,%rax
ja     116c <fftrecurs+0x4c>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
movslq -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
call   1030 <bfstages@plt>
jmp    1208 <fftrecurs+0xe8>
movl   $0x0,-0x28(%rbp)
cmpl   $0x8,-0x28(%rbp)
jge    11d6 <fftrecurs+0xb6>
mov    -0x8(%rbp),%rdi
movslq -0x28(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x3,%ecx
mov    %ecx,%ecx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
imul   %rcx,%rax
shl    $0x1,%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0xc(%rbp),%esi
sub    $0x3,%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
shl    $0x3,%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
sub    $0x1,%r9d
call   1040 <fftrecurs@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1173 <fftrecurs+0x53>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x3,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%r8d
shl    %cl,%r8
mov    -0x2c(%rbp),%ecx
mov    $0x1,%r9d
call   1030 <bfstages@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fftrecurs>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9d,%ebp
mov    %r8d,%r13d
mov    %rdx,%r12
mov    %rdi,%rbx
cmp    $0xc,%esi
jae    1150 <fftrecurs+0x30>
movslq %r13d,%r8
mov    %rbx,%rdi
mov    %r12,%rdx
mov    %ebp,%r9d
jmp    1293 <fftrecurs+0x173>
lea    -0x3(%rsi),%r14d
lea    0x0(,%rcx,8),%r15d
add    $0xffffffff,%ebp
mov    %rbx,%rdi
mov    %rsi,0x8(%rsp)
mov    %r14d,%esi
mov    %r12,%rdx
mov    %rcx,0x10(%rsp)
mov    %r15d,%ecx
mov    %r13d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0x1,%eax
mov    %r14d,%ecx
shl    %cl,%rax
mov    %rax,(%rsp)
lea    (%rbx,%rax,8),%rdi
mov    %r14d,%esi
mov    %r12,%rdx
mov    %r15d,%ecx
mov    %r13d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0x4,%eax
mov    %r14d,%ecx
shl    %cl,%rax
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %r12,%rdx
mov    %r15d,%ecx
mov    %r13d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0x6,%eax
mov    %r14d,%ecx
shl    %cl,%rax
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %r12,%rdx
mov    %r15d,%ecx
mov    %r13d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0x8,%eax
mov    %r14d,%ecx
shl    %cl,%rax
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %r12,%rdx
mov    %r15d,%ecx
mov    %r13d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0xa,%eax
mov    %r14d,%ecx
shl    %cl,%rax
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %r12,%rdx
mov    %r15d,%ecx
mov    %r13d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0xc,%eax
mov    %r14d,%ecx
shl    %cl,%rax
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %r12,%rdx
mov    %r15d,%ecx
mov    %r13d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0xe,%eax
mov    %r14d,%ecx
shl    %cl,%rax
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %r12,%rdx
mov    %r15d,%ecx
mov    %r13d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    %rbx,%rdi
mov    0x8(%rsp),%rsi
mov    %r12,%rdx
mov    0x10(%rsp),%rcx
mov    (%rsp),%r8
mov    $0x1,%r9d
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <bfstages@plt>

LLVM IR (-O0):
define void @fftrecurs(float* %0, i32 %1, float* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca float*
%8 = alloca i32
%9 = alloca float*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store float* %0, float** %7
store i32 %1, i32* %8
store float* %2, float** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%14 = load i32, i32* %8
%15 = sext i32 %14 to i64
%16 = icmp ule i64 %15, 11
br i1 %16, label %17, label %26
17: ; preds = %6
%18 = load float*, float** %7
%19 = load i32, i32* %8
%20 = load float*, float** %9
%21 = load i32, i32* %10
%22 = load i32, i32* %11
%23 = sext i32 %22 to i64
%24 = load i32, i32* %12
%25 = call i32 @bfstages(float* %18, i32 %19, float* %20, i32 %21, i64 %23, i32 %24)
br label %62
26: ; preds = %6
store i32 0, i32* %13
br label %27
27: ; preds = %49, %26
%28 = load i32, i32* %13
%29 = icmp slt i32 %28, 8
br i1 %29, label %30, label %52
30: ; preds = %27
%31 = load float*, float** %7
%32 = load i32, i32* %13
%33 = sext i32 %32 to i64
%34 = load i32, i32* %8
%35 = sub nsw i32 %34, 3
%36 = zext i32 %35 to i64
%37 = shl i64 1, %36
%38 = mul i64 %33, %37
%39 = mul i64 %38, 2
%40 = getelementptr inbounds float, float* %31, i64 %39
%41 = load i32, i32* %8
%42 = sub nsw i32 %41, 3
%43 = load float*, float** %9
%44 = load i32, i32* %10
%45 = mul nsw i32 8, %44
%46 = load i32, i32* %11
%47 = load i32, i32* %12
%48 = sub nsw i32 %47, 1
br label %49
49: ; preds = %30
%50 = load i32, i32* %13
%51 = add nsw i32 %50, 1
store i32 %51, i32* %13
br label %27
52: ; preds = %27
%53 = load float*, float** %7
%54 = load i32, i32* %8
%55 = load float*, float** %9
%56 = load i32, i32* %10
%57 = load i32, i32* %8
%58 = sub nsw i32 %57, 3
%59 = zext i32 %58 to i64
%60 = shl i64 1, %59
%61 = call i32 @bfstages(float* %53, i32 %54, float* %55, i32 %56, i64 %60, i32 1)
br label %62
62: ; preds = %52, %17
ret void
}

LLVM IR (-O2):
define void @fftrecurs(float* %0, i32 %1, float* %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp ult i32 %1, 12
br i1 %7, label %29, label %8
8: ; preds = %6
%9 = add nsw i32 %1, -3
%10 = zext i32 %9 to i64
%11 = shl nsw i32 %3, 3
%12 = add nsw i32 %5, -1
tail call void @fftrecurs(float* %0, i32 %9, float* %2, i32 %11, i32 %4, i32 %12)
%13 = shl nuw i64 1, %10
%14 = shl i64 %13, 1
%15 = getelementptr inbounds float, float* %0, i64 %14
tail call void @fftrecurs(float* %15, i32 %9, float* %2, i32 %11, i32 %4, i32 %12)
%16 = shl i64 4, %10
%17 = getelementptr inbounds float, float* %0, i64 %16
tail call void @fftrecurs(float* %17, i32 %9, float* %2, i32 %11, i32 %4, i32 %12)
%18 = shl i64 6, %10
%19 = getelementptr inbounds float, float* %0, i64 %18
tail call void @fftrecurs(float* %19, i32 %9, float* %2, i32 %11, i32 %4, i32 %12)
%20 = shl i64 8, %10
%21 = getelementptr inbounds float, float* %0, i64 %20
tail call void @fftrecurs(float* %21, i32 %9, float* %2, i32 %11, i32 %4, i32 %12)
%22 = shl i64 10, %10
%23 = getelementptr inbounds float, float* %0, i64 %22
tail call void @fftrecurs(float* %23, i32 %9, float* %2, i32 %11, i32 %4, i32 %12)
%24 = shl i64 12, %10
%25 = getelementptr inbounds float, float* %0, i64 %24
tail call void @fftrecurs(float* %25, i32 %9, float* %2, i32 %11, i32 %4, i32 %12)
%26 = shl i64 14, %10
%27 = getelementptr inbounds float, float* %0, i64 %26
tail call void @fftrecurs(float* %27, i32 %9, float* %2, i32 %11, i32 %4, i32 %12)
%28 = tail call i32 @bfstages(float* %0, i32 %1, float* %2, i32 %3, i64 %13, i32 1)
br label %32
29: ; preds = %6
%30 = sext i32 %4 to i64
%31 = tail call i32 @bfstages(float* %0, i32 %1, float* %2, i32 %3, i64 %30, i32 %5)
br label %32
32: ; preds = %8, %29
ret void
}