#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 */
bool isPowerOfFour(int num) {
  switch (num) {
  case 1:
  case 4:
  case 16:
  case 64:
  case 256:
  case 1024:
  case 4096:
  case 16384:
  case 65536:
  case 262144:
  case 1048576:
  case 4194304:
  case 16777216:
  case 67108864:
  case 268435456:
  case 1073741824:
    return true;
  default:
    return false;
  }
}


x86 assembly (clang, -O0):
<isPowerOfFour>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     1232 <isPowerOfFour+0x132>
jmp    111b <isPowerOfFour+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x4,%eax
je     1232 <isPowerOfFour+0x132>
jmp    112c <isPowerOfFour+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x10,%eax
je     1232 <isPowerOfFour+0x132>
jmp    113d <isPowerOfFour+0x3d>
mov    -0xc(%rbp),%eax
sub    $0x40,%eax
je     1232 <isPowerOfFour+0x132>
jmp    114e <isPowerOfFour+0x4e>
mov    -0xc(%rbp),%eax
sub    $0x100,%eax
je     1232 <isPowerOfFour+0x132>
jmp    1161 <isPowerOfFour+0x61>
mov    -0xc(%rbp),%eax
sub    $0x400,%eax
je     1232 <isPowerOfFour+0x132>
jmp    1174 <isPowerOfFour+0x74>
mov    -0xc(%rbp),%eax
sub    $0x1000,%eax
je     1232 <isPowerOfFour+0x132>
jmp    1187 <isPowerOfFour+0x87>
mov    -0xc(%rbp),%eax
sub    $0x4000,%eax
je     1232 <isPowerOfFour+0x132>
jmp    119a <isPowerOfFour+0x9a>
mov    -0xc(%rbp),%eax
sub    $0x10000,%eax
je     1232 <isPowerOfFour+0x132>
jmp    11ad <isPowerOfFour+0xad>
mov    -0xc(%rbp),%eax
sub    $0x40000,%eax
je     1232 <isPowerOfFour+0x132>
jmp    11c0 <isPowerOfFour+0xc0>
mov    -0xc(%rbp),%eax
sub    $0x100000,%eax
je     1232 <isPowerOfFour+0x132>
jmp    11d3 <isPowerOfFour+0xd3>
mov    -0xc(%rbp),%eax
sub    $0x400000,%eax
je     1232 <isPowerOfFour+0x132>
jmp    11e6 <isPowerOfFour+0xe6>
mov    -0xc(%rbp),%eax
sub    $0x1000000,%eax
je     1232 <isPowerOfFour+0x132>
jmp    11f9 <isPowerOfFour+0xf9>
mov    -0xc(%rbp),%eax
sub    $0x4000000,%eax
je     1232 <isPowerOfFour+0x132>
jmp    120c <isPowerOfFour+0x10c>
mov    -0xc(%rbp),%eax
sub    $0x10000000,%eax
je     1232 <isPowerOfFour+0x132>
jmp    121f <isPowerOfFour+0x11f>
mov    -0xc(%rbp),%eax
sub    $0x40000000,%eax
jne    123e <isPowerOfFour+0x13e>
jmp    1232 <isPowerOfFour+0x132>
movl   $0x1,-0x4(%rbp)
jmp    1245 <isPowerOfFour+0x145>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPowerOfFour>:
mov    $0x1,%eax
cmp    $0xffff,%edi
jg     1136 <isPowerOfFour+0x36>
cmp    $0xff,%edi
jg     1158 <isPowerOfFour+0x58>
add    $0xffffffff,%edi
cmp    $0x3f,%edi
ja     11c8 <isPowerOfFour+0xc8>
movabs $0x8000000000008009,%rcx
bt     %rdi,%rcx
jae    11c8 <isPowerOfFour+0xc8>
ret
cmp    $0xffffff,%edi
jg     1172 <isPowerOfFour+0x72>
cmp    $0xfffff,%edi
jg     118c <isPowerOfFour+0x8c>
cmp    $0x10000,%edi
je     1135 <isPowerOfFour+0x35>
cmp    $0x40000,%edi
je     1135 <isPowerOfFour+0x35>
jmp    11c8 <isPowerOfFour+0xc8>
cmp    $0xfff,%edi
jg     119e <isPowerOfFour+0x9e>
cmp    $0x100,%edi
je     1135 <isPowerOfFour+0x35>
cmp    $0x400,%edi
je     1135 <isPowerOfFour+0x35>
jmp    11c8 <isPowerOfFour+0xc8>
cmp    $0xfffffff,%edi
jg     11b0 <isPowerOfFour+0xb0>
cmp    $0x1000000,%edi
je     1135 <isPowerOfFour+0x35>
cmp    $0x4000000,%edi
je     1135 <isPowerOfFour+0x35>
jmp    11c8 <isPowerOfFour+0xc8>
cmp    $0x100000,%edi
je     1135 <isPowerOfFour+0x35>
cmp    $0x400000,%edi
je     1135 <isPowerOfFour+0x35>
jmp    11c8 <isPowerOfFour+0xc8>
cmp    $0x1000,%edi
je     1135 <isPowerOfFour+0x35>
cmp    $0x4000,%edi
je     1135 <isPowerOfFour+0x35>
jmp    11c8 <isPowerOfFour+0xc8>
cmp    $0x10000000,%edi
je     1135 <isPowerOfFour+0x35>
cmp    $0x40000000,%edi
je     1135 <isPowerOfFour+0x35>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isPowerOfFour(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 1, label %5
i32 4, label %5
i32 16, label %5
i32 64, label %5
i32 256, label %5
i32 1024, label %5
i32 4096, label %5
i32 16384, label %5
i32 65536, label %5
i32 262144, label %5
i32 1048576, label %5
i32 4194304, label %5
i32 16777216, label %5
i32 67108864, label %5
i32 268435456, label %5
i32 1073741824, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @isPowerOfFour(i32 %0) {
switch i32 %0, label %2 [
i32 1, label %3
i32 4, label %3
i32 16, label %3
i32 64, label %3
i32 256, label %3
i32 1024, label %3
i32 4096, label %3
i32 16384, label %3
i32 65536, label %3
i32 262144, label %3
i32 1048576, label %3
i32 4194304, label %3
i32 16777216, label %3
i32 67108864, label %3
i32 268435456, label %3
i32 1073741824, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}