#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 /*<<< orphan*/ fft_size;

/* Variables and functions */
int next_composite(int);
int next_fast_fft_size(int x) {
  const int fft_size[] = {
      60,      64,      72,      75,      80,      100,     120,     125,
      128,     135,     144,     150,     160,     180,     200,     225,
      240,     256,     300,     320,     375,     400,     405,     432,
      500,     512,     540,     576,     625,     640,     648,     720,
      768,     800,     810,     864,     900,     960,     1000,    1080,
      1152,    1200,    1280,    1296,    1350,    1440,    1500,    1600,
      1620,    1728,    1800,    1920,    2000,    2025,    2160,    2304,
      2400,    2560,    2700,    2880,    3000,    3200,    3375,    3600,
      3840,    4000,    4050,    4320,    4500,    4800,    5120,    5184,
      5400,    5625,    6000,    6400,    6480,    6912,    7200,    7500,
      8000,    8100,    8640,    8748,    9000,    9375,    9600,    10000,
      10368,   10800,   10935,   11520,   12500,   12960,   13500,   13824,
      14400,   14580,   15000,   15625,   16000,   16200,   17280,   18000,
      19200,   19440,   20000,   20736,   21600,   23040,   24000,   24300,
      25920,   27000,   28800,   30000,   30375,   32000,   32400,   34560,
      36000,   38400,   40000,   40500,   43200,   45000,   46080,   48000,
      50000,   50625,   51840,   54000,   57600,   60000,   62500,   64000,
      67500,   72000,   72900,   75000,   80000,   84375,   90000,   96000,
      97200,   100000,  103680,  104976,  112500,  120000,  125000,  129600,
      131220,  140625,  150000,  160000,  162000,  164025,  174960,  187500,
      200000,  202500,  207360,  216000,  218700,  234375,  250000,  259200,
      270000,  273375,  291600,  312500,  324000,  337500,  345600,  360000,
      364500,  390625,  405000,  421875,  432000,  450000,  455625,  486000,
      518400,  540000,  562500,  576000,  607500,  648000,  675000,  703125,
      720000,  759375,  781250,  800000,  810000,  843750,  864000,  900000,
      937500,  1000000, 1012500, 1080000, 1125000, 1171875, 1200000, 1250000,
      1265625, 1280000, 1350000, 1406250, 1440000, 1500000, 1562500, 1600000,
      1687500, 1875000, 2000000, 2109375, 2250000, 2343750, 2400000, 2500000,
      2531250, 2812500, 3125000, 3200000, 3515625, 3750000, 3906250, 4000000,
      4100625, 4687500, 5000000, 5062500, 5184000, 5400000, 5467500, 5859375,
      6250000, 6328125, 6480000, 6561000, 6635520};
  const int count = sizeof(fft_size) / sizeof(fft_size[0]);
  int i;
  for (i = 0; i < count; i++)
    if (fft_size[i] >= x)
      return fft_size[i];
  return next_composite(x);
}


x86 assembly (clang, -O0):
<next_fast_fft_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
mov    %edi,-0x8(%rbp)
lea    -0x3e0(%rbp),%rdi
lea    0xec4(%rip),%rsi
mov    $0x3d4,%edx
call   1030 <memcpy@plt>
movl   $0xf5,-0x3e4(%rbp)
movl   $0x0,-0x3e8(%rbp)
cmpl   $0xf5,-0x3e8(%rbp)
jge    11b0 <next_fast_fft_size+0x90>
movslq -0x3e8(%rbp),%rax
mov    -0x3e0(%rbp,%rax,4),%eax
cmp    -0x8(%rbp),%eax
jl     1197 <next_fast_fft_size+0x77>
movslq -0x3e8(%rbp),%rax
mov    -0x3e0(%rbp,%rax,4),%eax
mov    %eax,-0x4(%rbp)
jmp    11bb <next_fast_fft_size+0x9b>
jmp    119c <next_fast_fft_size+0x7c>
mov    -0x3e8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3e8(%rbp)
jmp    115a <next_fast_fft_size+0x3a>
mov    -0x8(%rbp),%edi
call   1040 <next_composite@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_fast_fft_size>:
mov    $0x4,%ecx
lea    0xee4(%rip),%rdx
nopl   0x0(%rax)
mov    -0x10(%rdx,%rcx,4),%eax
cmp    %edi,%eax
jge    1159 <next_fast_fft_size+0x49>
mov    -0xc(%rdx,%rcx,4),%eax
cmp    %edi,%eax
jge    1159 <next_fast_fft_size+0x49>
mov    -0x8(%rdx,%rcx,4),%eax
cmp    %edi,%eax
jge    1159 <next_fast_fft_size+0x49>
mov    -0x4(%rdx,%rcx,4),%eax
cmp    %edi,%eax
jge    1159 <next_fast_fft_size+0x49>
mov    (%rdx,%rcx,4),%eax
cmp    %edi,%eax
jge    1159 <next_fast_fft_size+0x49>
add    $0x5,%rcx
cmp    $0xf9,%rcx
jne    1120 <next_fast_fft_size+0x10>
jmp    1030 <next_composite@plt>
ret

LLVM IR (-O0):
@__const.next_fast_fft_size.fft_size = [245 x i32] [i32 60, i32 64, i32 72, i32 75, i32 80, i32 100, i32 120, i32 125, i32 128, i32 135, i32 144, i32 150, i32 160, i32 180, i32 200, i32 225, i32 240, i32 256, i32 300, i32 320, i32 375, i32 400, i32 405, i32 432, i32 500, i32 512, i32 540, i32 576, i32 625, i32 640, i32 648, i32 720, i32 768, i32 800, i32 810, i32 864, i32 900, i32 960, i32 1000, i32 1080, i32 1152, i32 1200, i32 1280, i32 1296, i32 1350, i32 1440, i32 1500, i32 1600, i32 1620, i32 1728, i32 1800, i32 1920, i32 2000, i32 2025, i32 2160, i32 2304, i32 2400, i32 2560, i32 2700, i32 2880, i32 3000, i32 3200, i32 3375, i32 3600, i32 3840, i32 4000, i32 4050, i32 4320, i32 4500, i32 4800, i32 5120, i32 5184, i32 5400, i32 5625, i32 6000, i32 6400, i32 6480, i32 6912, i32 7200, i32 7500, i32 8000, i32 8100, i32 8640, i32 8748, i32 9000, i32 9375, i32 9600, i32 10000, i32 10368, i32 10800, i32 10935, i32 11520, i32 12500, i32 12960, i32 13500, i32 13824, i32 14400, i32 14580, i32 15000, i32 15625, i32 16000, i32 16200, i32 17280, i32 18000, i32 19200, i32 19440, i32 20000, i32 20736, i32 21600, i32 23040, i32 24000, i32 24300, i32 25920, i32 27000, i32 28800, i32 30000, i32 30375, i32 32000, i32 32400, i32 34560, i32 36000, i32 38400, i32 40000, i32 40500, i32 43200, i32 45000, i32 46080, i32 48000, i32 50000, i32 50625, i32 51840, i32 54000, i32 57600, i32 60000, i32 62500, i32 64000, i32 67500, i32 72000, i32 72900, i32 75000, i32 80000, i32 84375, i32 90000, i32 96000, i32 97200, i32 100000, i32 103680, i32 104976, i32 112500, i32 120000, i32 125000, i32 129600, i32 131220, i32 140625, i32 150000, i32 160000, i32 162000, i32 164025, i32 174960, i32 187500, i32 200000, i32 202500, i32 207360, i32 216000, i32 218700, i32 234375, i32 250000, i32 259200, i32 270000, i32 273375, i32 291600, i32 312500, i32 324000, i32 337500, i32 345600, i32 360000, i32 364500, i32 390625, i32 405000, i32 421875, i32 432000, i32 450000, i32 455625, i32 486000, i32 518400, i32 540000, i32 562500, i32 576000, i32 607500, i32 648000, i32 675000, i32 703125, i32 720000, i32 759375, i32 781250, i32 800000, i32 810000, i32 843750, i32 864000, i32 900000, i32 937500, i32 1000000, i32 1012500, i32 1080000, i32 1125000, i32 1171875, i32 1200000, i32 1250000, i32 1265625, i32 1280000, i32 1350000, i32 1406250, i32 1440000, i32 1500000, i32 1562500, i32 1600000, i32 1687500, i32 1875000, i32 2000000, i32 2109375, i32 2250000, i32 2343750, i32 2400000, i32 2500000, i32 2531250, i32 2812500, i32 3125000, i32 3200000, i32 3515625, i32 3750000, i32 3906250, i32 4000000, i32 4100625, i32 4687500, i32 5000000, i32 5062500, i32 5184000, i32 5400000, i32 5467500, i32 5859375, i32 6250000, i32 6328125, i32 6480000, i32 6561000, i32 6635520]
define i32 @next_fast_fft_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [245 x i32]
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
%7 = bitcast [245 x i32]* %4 to i8*
store i32 245, i32* %5
store i32 0, i32* %6
br label %8
8: ; preds = %24, %1
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 245
br i1 %10, label %11, label %27
11: ; preds = %8
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [245 x i32], [245 x i32]* %4, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = load i32, i32* %3
%17 = icmp sge i32 %15, %16
br i1 %17, label %18, label %23
18: ; preds = %11
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [245 x i32], [245 x i32]* %4, i64 0, i64 %20
%22 = load i32, i32* %21
store i32 %22, i32* %2
br label %30
23: ; preds = %11
br label %24
24: ; preds = %23
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
store i32 %26, i32* %6
br label %8
27: ; preds = %8
%28 = load i32, i32* %3
%29 = call i32 @next_composite(i32 %28)
store i32 %29, i32* %2
br label %30
30: ; preds = %27, %18
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
@__const.next_fast_fft_size.fft_size = [245 x i32] [i32 60, i32 64, i32 72, i32 75, i32 80, i32 100, i32 120, i32 125, i32 128, i32 135, i32 144, i32 150, i32 160, i32 180, i32 200, i32 225, i32 240, i32 256, i32 300, i32 320, i32 375, i32 400, i32 405, i32 432, i32 500, i32 512, i32 540, i32 576, i32 625, i32 640, i32 648, i32 720, i32 768, i32 800, i32 810, i32 864, i32 900, i32 960, i32 1000, i32 1080, i32 1152, i32 1200, i32 1280, i32 1296, i32 1350, i32 1440, i32 1500, i32 1600, i32 1620, i32 1728, i32 1800, i32 1920, i32 2000, i32 2025, i32 2160, i32 2304, i32 2400, i32 2560, i32 2700, i32 2880, i32 3000, i32 3200, i32 3375, i32 3600, i32 3840, i32 4000, i32 4050, i32 4320, i32 4500, i32 4800, i32 5120, i32 5184, i32 5400, i32 5625, i32 6000, i32 6400, i32 6480, i32 6912, i32 7200, i32 7500, i32 8000, i32 8100, i32 8640, i32 8748, i32 9000, i32 9375, i32 9600, i32 10000, i32 10368, i32 10800, i32 10935, i32 11520, i32 12500, i32 12960, i32 13500, i32 13824, i32 14400, i32 14580, i32 15000, i32 15625, i32 16000, i32 16200, i32 17280, i32 18000, i32 19200, i32 19440, i32 20000, i32 20736, i32 21600, i32 23040, i32 24000, i32 24300, i32 25920, i32 27000, i32 28800, i32 30000, i32 30375, i32 32000, i32 32400, i32 34560, i32 36000, i32 38400, i32 40000, i32 40500, i32 43200, i32 45000, i32 46080, i32 48000, i32 50000, i32 50625, i32 51840, i32 54000, i32 57600, i32 60000, i32 62500, i32 64000, i32 67500, i32 72000, i32 72900, i32 75000, i32 80000, i32 84375, i32 90000, i32 96000, i32 97200, i32 100000, i32 103680, i32 104976, i32 112500, i32 120000, i32 125000, i32 129600, i32 131220, i32 140625, i32 150000, i32 160000, i32 162000, i32 164025, i32 174960, i32 187500, i32 200000, i32 202500, i32 207360, i32 216000, i32 218700, i32 234375, i32 250000, i32 259200, i32 270000, i32 273375, i32 291600, i32 312500, i32 324000, i32 337500, i32 345600, i32 360000, i32 364500, i32 390625, i32 405000, i32 421875, i32 432000, i32 450000, i32 455625, i32 486000, i32 518400, i32 540000, i32 562500, i32 576000, i32 607500, i32 648000, i32 675000, i32 703125, i32 720000, i32 759375, i32 781250, i32 800000, i32 810000, i32 843750, i32 864000, i32 900000, i32 937500, i32 1000000, i32 1012500, i32 1080000, i32 1125000, i32 1171875, i32 1200000, i32 1250000, i32 1265625, i32 1280000, i32 1350000, i32 1406250, i32 1440000, i32 1500000, i32 1562500, i32 1600000, i32 1687500, i32 1875000, i32 2000000, i32 2109375, i32 2250000, i32 2343750, i32 2400000, i32 2500000, i32 2531250, i32 2812500, i32 3125000, i32 3200000, i32 3515625, i32 3750000, i32 3906250, i32 4000000, i32 4100625, i32 4687500, i32 5000000, i32 5062500, i32 5184000, i32 5400000, i32 5467500, i32 5859375, i32 6250000, i32 6328125, i32 6480000, i32 6561000, i32 6635520]
define i32 @next_fast_fft_size(i32 %0) {
br label %25
2: ; preds = %25
%3 = add nuw nsw i64 %26, 1
%4 = getelementptr inbounds [245 x i32], [245 x i32]* @__const.next_fast_fft_size.fft_size, i64 0, i64 %3
%5 = load i32, i32* %4
%6 = icmp slt i32 %5, %0
br i1 %6, label %7, label %32
7: ; preds = %2
%8 = add nuw nsw i64 %26, 2
%9 = getelementptr inbounds [245 x i32], [245 x i32]* @__const.next_fast_fft_size.fft_size, i64 0, i64 %8
%10 = load i32, i32* %9
%11 = icmp slt i32 %10, %0
br i1 %11, label %12, label %32
12: ; preds = %7
%13 = add nuw nsw i64 %26, 3
%14 = getelementptr inbounds [245 x i32], [245 x i32]* @__const.next_fast_fft_size.fft_size, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = icmp slt i32 %15, %0
br i1 %16, label %17, label %32
17: ; preds = %12
%18 = add nuw nsw i64 %26, 4
%19 = getelementptr inbounds [245 x i32], [245 x i32]* @__const.next_fast_fft_size.fft_size, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = icmp slt i32 %20, %0
br i1 %21, label %22, label %32
22: ; preds = %17
%23 = add nuw nsw i64 %26, 5
%24 = icmp eq i64 %23, 245
br i1 %24, label %30, label %25
25: ; preds = %22, %1
%26 = phi i64 [ 0, %1 ], [ %23, %22 ]
%27 = getelementptr inbounds [245 x i32], [245 x i32]* @__const.next_fast_fft_size.fft_size, i64 0, i64 %26
%28 = load i32, i32* %27
%29 = icmp slt i32 %28, %0
br i1 %29, label %2, label %32
30: ; preds = %22
%31 = tail call i32 @next_composite(i32 %0)
br label %32
32: ; preds = %25, %2, %7, %12, %17, %30
%33 = phi i32 [ %31, %30 ], [ %28, %25 ], [ %5, %2 ], [ %10, %7 ], [ %15, %12 ], [ %20, %17 ]
ret i32 %33
}