#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int checkm(const int m) {
  int k;
  for (k = 4; k <= m; k <<= 1) {
    if (k == m)
      return (0);
  }
  fprintf(stderr, "fft : m must be a integer of power of 2!\n");
  return (-1);
}


x86 assembly (clang, -O0):
<checkm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1159 <checkm+0x49>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1146 <checkm+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1175 <checkm+0x65>
jmp    114b <checkm+0x3b>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <checkm+0x12>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
lea    0xe97(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkm>:
cmp    $0x4,%edi
jl     112a <checkm+0x1a>
mov    $0x4,%eax
nopw   0x0(%rax,%rax,1)
cmp    %edi,%eax
je     114a <checkm+0x3a>
add    %eax,%eax
cmp    %edi,%eax
jle    1120 <checkm+0x10>
push   %rax
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"fft : m must be a integer of power of 2!\0A\00"
define i32 @checkm(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 4, i32* %4
br label %5
5: ; preds = %15, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 0, i32* %2
br label %21
14: ; preds = %9
br label %15
15: ; preds = %14
%16 = load i32, i32* %4
%17 = shl i32 %16, 1
store i32 %17, i32* %4
br label %5
18: ; preds = %5
%19 = load i32, i32* @stderr
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %21
21: ; preds = %18, %13
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"fft : m must be a integer of power of 2!\0A\00"
define i32 @checkm(i32 %0) {
%2 = icmp slt i32 %0, 4
br i1 %2, label %9, label %5
3: ; preds = %5
%4 = icmp sgt i32 %8, %0
br i1 %4, label %9, label %5
5: ; preds = %1, %3
%6 = phi i32 [ %8, %3 ], [ 4, %1 ]
%7 = icmp eq i32 %6, %0
%8 = shl i32 %6, 1
br i1 %7, label %12, label %3
9: ; preds = %3, %1
%10 = load i32, i32* @stderr
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %5, %9
%13 = phi i32 [ -1, %9 ], [ 0, %5 ]
ret i32 %13
}