#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 uint32_t;

/* Variables and functions */
int /*<<< orphan*/ bfstages(float *, int, float *, int, int, int);
void fftrecurs(float *ioptr, int M, float *Utbl, int Ustride, int NDiffU,
               int StageCnt) {
  int i1;
  if (M <= (int)(11 - (sizeof(float) / 8)))
    bfstages(ioptr, M, Utbl, Ustride, NDiffU, StageCnt);
  else {
    for (i1 = 0; i1 < 8; i1++) {
      fftrecurs(&ioptr[i1 * ((uint32_t)1 << (M - 3)) * 2], M - 3, Utbl,
                8 * Ustride, NDiffU, StageCnt - 1);
    }
    bfstages(ioptr, M, Utbl, Ustride, ((uint32_t)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)
cmpl   $0xb,-0xc(%rbp)
jg     1168 <fftrecurs+0x48>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
call   1030 <bfstages@plt>
jmp    11fb <fftrecurs+0xdb>
movl   $0x0,-0x28(%rbp)
cmpl   $0x8,-0x28(%rbp)
jge    11cd <fftrecurs+0xad>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x3,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
imul   %ecx,%eax
shl    $0x1,%eax
cltq
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    116f <fftrecurs+0x4f>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0xc(%rbp),%ecx
sub    $0x3,%ecx
mov    $0x1,%r8d
shl    %cl,%r8d
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,%r15d
mov    %rdx,%r13
mov    %rdi,%rbx
cmp    $0xc,%esi
jge    1150 <fftrecurs+0x30>
mov    %rbx,%rdi
mov    %r13,%rdx
mov    %r15d,%r8d
mov    %ebp,%r9d
jmp    129c <fftrecurs+0x17c>
lea    -0x3(%rsi),%r14d
lea    0x0(,%rcx,8),%r12d
add    $0xffffffff,%ebp
mov    %rbx,%rdi
mov    %rsi,0x8(%rsp)
mov    %r14d,%esi
mov    %r13,%rdx
mov    %rcx,0x10(%rsp)
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0x1,%eax
mov    %r14d,%ecx
shl    %cl,%eax
mov    %rax,(%rsp)
add    %eax,%eax
cltq
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %r13,%rdx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0x4,%eax
mov    %r14d,%ecx
shl    %cl,%eax
cltq
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %r13,%rdx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0x6,%eax
mov    %r14d,%ecx
shl    %cl,%eax
cltq
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %r13,%rdx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0x8,%eax
mov    %r14d,%ecx
shl    %cl,%eax
cltq
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %r13,%rdx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0xa,%eax
mov    %r14d,%ecx
shl    %cl,%eax
cltq
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %r13,%rdx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0xc,%eax
mov    %r14d,%ecx
shl    %cl,%eax
cltq
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %r13,%rdx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    $0xe,%eax
mov    %r14d,%ecx
shl    %cl,%eax
cltq
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %r13,%rdx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %ebp,%r9d
call   1040 <fftrecurs@plt>
mov    %rbx,%rdi
mov    0x8(%rsp),%rsi
mov    %r13,%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 = icmp sle i32 %14, 11
br i1 %15, label %16, label %24
16: ; preds = %6
%17 = load float*, float** %7
%18 = load i32, i32* %8
%19 = load float*, float** %9
%20 = load i32, i32* %10
%21 = load i32, i32* %11
%22 = load i32, i32* %12
%23 = call i32 @bfstages(float* %17, i32 %18, float* %19, i32 %20, i32 %21, i32 %22)
br label %58
24: ; preds = %6
store i32 0, i32* %13
br label %25
25: ; preds = %46, %24
%26 = load i32, i32* %13
%27 = icmp slt i32 %26, 8
br i1 %27, label %28, label %49
28: ; preds = %25
%29 = load float*, float** %7
%30 = load i32, i32* %13
%31 = load i32, i32* %8
%32 = sub nsw i32 %31, 3
%33 = shl i32 1, %32
%34 = mul nsw i32 %30, %33
%35 = mul nsw i32 %34, 2
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds float, float* %29, i64 %36
%38 = load i32, i32* %8
%39 = sub nsw i32 %38, 3
%40 = load float*, float** %9
%41 = load i32, i32* %10
%42 = mul nsw i32 8, %41
%43 = load i32, i32* %11
%44 = load i32, i32* %12
%45 = sub nsw i32 %44, 1
br label %46
46: ; preds = %28
%47 = load i32, i32* %13
%48 = add nsw i32 %47, 1
store i32 %48, i32* %13
br label %25
49: ; preds = %25
%50 = load float*, float** %7
%51 = load i32, i32* %8
%52 = load float*, float** %9
%53 = load i32, i32* %10
%54 = load i32, i32* %8
%55 = sub nsw i32 %54, 3
%56 = shl i32 1, %55
%57 = call i32 @bfstages(float* %50, i32 %51, float* %52, i32 %53, i32 %56, i32 1)
br label %58
58: ; preds = %49, %16
ret void
}

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