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

/* Variables and functions */
int /*<<< orphan*/ ffts_permute_addr(int, int, int, int *);
void ffts_hardcodedleaf_is_rec_even4(ptrdiff_t **is, int big_N, int offset,
                                     int stride, int VL) {
  int i, perm[4];
  ffts_permute_addr(big_N, offset, stride, perm);
  if (!((2 * perm[0]) % (2 * VL))) {
    for (i = 0; i < 4; i++) {
      (*is)[i] = 2 * perm[i];
    }
    *is += 4;
  }
}


x86 assembly (clang, -O0):
<ffts_hardcodedleaf_is_rec_even4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    -0x30(%rbp),%rcx
call   1030 <ffts_permute_addr@plt>
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
mov    -0x18(%rbp),%ecx
shl    $0x1,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1199 <ffts_hardcodedleaf_is_rec_even4+0x89>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    118b <ffts_hardcodedleaf_is_rec_even4+0x7b>
movslq -0x1c(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
shl    $0x1,%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    115a <ffts_hardcodedleaf_is_rec_even4+0x4a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x10,%rcx
mov    %rcx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffts_hardcodedleaf_is_rec_even4>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %r8d,%ebp
mov    %rdi,%rbx
mov    %rsp,%rax
mov    %esi,%edi
mov    %edx,%esi
mov    %ecx,%edx
mov    %rax,%rcx
call   1030 <ffts_permute_addr@plt>
mov    (%rsp),%ecx
add    %ecx,%ecx
add    %ebp,%ebp
mov    %ecx,%eax
cltd
idiv   %ebp
test   %edx,%edx
jne    1164 <ffts_hardcodedleaf_is_rec_even4+0x54>
mov    (%rbx),%rax
mov    %ecx,(%rax)
mov    0x4(%rsp),%ecx
add    %ecx,%ecx
mov    %ecx,0x4(%rax)
mov    0x8(%rsp),%ecx
add    %ecx,%ecx
mov    %ecx,0x8(%rax)
mov    0xc(%rsp),%ecx
add    %ecx,%ecx
mov    %ecx,0xc(%rax)
add    $0x10,%rax
mov    %rax,(%rbx)
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @ffts_hardcodedleaf_is_rec_even4(i32** %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32**
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [4 x i32]
store i32** %0, i32*** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %12, i64 0, i64 0
%17 = call i32 @ffts_permute_addr(i32 %13, i32 %14, i32 %15, i32* %16)
%18 = getelementptr inbounds [4 x i32], [4 x i32]* %12, i64 0, i64 0
%19 = load i32, i32* %18
%20 = mul nsw i32 2, %19
%21 = load i32, i32* %10
%22 = mul nsw i32 2, %21
%23 = srem i32 %20, %22
%24 = icmp ne i32 %23, 0
br i1 %24, label %47, label %25
25: ; preds = %5
store i32 0, i32* %11
br label %26
26: ; preds = %40, %25
%27 = load i32, i32* %11
%28 = icmp slt i32 %27, 4
br i1 %28, label %29, label %43
29: ; preds = %26
%30 = load i32, i32* %11
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [4 x i32], [4 x i32]* %12, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = mul nsw i32 2, %33
%35 = load i32**, i32*** %6
%36 = load i32*, i32** %35
%37 = load i32, i32* %11
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i32, i32* %36, i64 %38
store i32 %34, i32* %39
br label %40
40: ; preds = %29
%41 = load i32, i32* %11
%42 = add nsw i32 %41, 1
store i32 %42, i32* %11
br label %26
43: ; preds = %26
%44 = load i32**, i32*** %6
%45 = load i32*, i32** %44
%46 = getelementptr inbounds i32, i32* %45, i64 4
store i32* %46, i32** %44
br label %47
47: ; preds = %43, %5
ret void
}

LLVM IR (-O2):
define void @ffts_hardcodedleaf_is_rec_even4(i32** nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca [4 x i32]
%7 = bitcast [4 x i32]* %6 to i8*
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%9 = call i32 @ffts_permute_addr(i32 %1, i32 %2, i32 %3, i32* %8)
%10 = load i32, i32* %8
%11 = shl nsw i32 %10, 1
%12 = shl nsw i32 %4, 1
%13 = srem i32 %11, %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %30
15: ; preds = %5
%16 = load i32*, i32** %0
store i32 %11, i32* %16
%17 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 1
%18 = load i32, i32* %17
%19 = shl nsw i32 %18, 1
%20 = getelementptr inbounds i32, i32* %16, i64 1
store i32 %19, i32* %20
%21 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 2
%22 = load i32, i32* %21
%23 = shl nsw i32 %22, 1
%24 = getelementptr inbounds i32, i32* %16, i64 2
store i32 %23, i32* %24
%25 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 3
%26 = load i32, i32* %25
%27 = shl nsw i32 %26, 1
%28 = getelementptr inbounds i32, i32* %16, i64 3
store i32 %27, i32* %28
%29 = getelementptr inbounds i32, i32* %16, i64 4
store i32* %29, i32** %0
br label %30
30: ; preds = %15, %5
ret void
}