#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 kiss_fft_next_fast_size(int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int n, m, m2, m1;
  m2 = 0;
  for (n = 1; n < 1001; n++) {
    m = kiss_fft_next_fast_size(n);
    if (m != m2) {
      printf("%d ", m);
      m2 = m;
    }
  }
  printf("\n");
  m2 = 0;
  for (n = 1; n < 1001; n++) {
    m = kiss_fft_next_fast_size(n);
    if (m != m2) {
      m1 = 2 * m;
      printf("%d ", m1);
      m2 = m;
    }
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x3e9,-0x8(%rbp)
jge    118b <main+0x6b>
mov    -0x8(%rbp),%edi
call   1040 <kiss_fft_next_fast_size@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1178 <main+0x58>
mov    -0xc(%rbp),%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    117d <main+0x5d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <main+0x1d>
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x3e9,-0x8(%rbp)
jge    11fe <main+0xde>
mov    -0x8(%rbp),%edi
call   1040 <kiss_fft_next_fast_size@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     11eb <main+0xcb>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    11f0 <main+0xd0>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11a7 <main+0x87>
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xebd(%rip),%r14
xor    %r15d,%r15d
jmp    115b <main+0x2b>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
cmp    $0x3e9,%ebx
je     117a <main+0x4a>
mov    %ebx,%edi
call   1050 <kiss_fft_next_fast_size@plt>
cmp    %r15d,%eax
je     1150 <main+0x20>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%r15d
jmp    1150 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%ebx
lea    0xe70(%rip),%r14
xor    %r15d,%r15d
jmp    11ab <main+0x7b>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebx
cmp    $0x3e9,%ebx
je     11cc <main+0x9c>
mov    %ebx,%edi
call   1050 <kiss_fft_next_fast_size@plt>
cmp    %r15d,%eax
je     11a0 <main+0x70>
mov    %eax,%ebp
mov    %eax,%esi
add    %ebp,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%r15d
jmp    11a0 <main+0x70>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main() {
br label %1
1: ; preds = %0, %8
%2 = phi i32 [ 1, %0 ], [ %10, %8 ]
%3 = phi i32 [ 0, %0 ], [ %9, %8 ]
%4 = tail call i32 @kiss_fft_next_fast_size(i32 %2)
%5 = icmp eq i32 %4, %3
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %8
8: ; preds = %1, %6
%9 = phi i32 [ %4, %6 ], [ %3, %1 ]
%10 = add nuw nsw i32 %2, 1
%11 = icmp eq i32 %10, 1001
br i1 %11, label %12, label %1
12: ; preds = %8
%13 = tail call i32 @putchar(i32 10)
br label %14
14: ; preds = %12, %22
%15 = phi i32 [ 1, %12 ], [ %24, %22 ]
%16 = phi i32 [ 0, %12 ], [ %23, %22 ]
%17 = tail call i32 @kiss_fft_next_fast_size(i32 %15)
%18 = icmp eq i32 %17, %16
br i1 %18, label %22, label %19
19: ; preds = %14
%20 = shl nsw i32 %17, 1
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %14, %19
%23 = phi i32 [ %17, %19 ], [ %16, %14 ]
%24 = add nuw nsw i32 %15, 1
%25 = icmp eq i32 %24, 1001
br i1 %25, label %26, label %14
26: ; preds = %22
%27 = tail call i32 @putchar(i32 10)
ret i32 0
}