#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 fail_real(int /*<<< orphan*/, int);
int icos(int, int, int);
int iexp(int, int, int);
int ilog2(int, int);
int ipow(int, int, int);
int isin(int, int, int);
int test_ifp(void) {
  if (ilog2(1, 0) != 0x7fffffff)
    return fail_real(0, 64);
  if (ilog2(1, 1) != 0)
    return fail_real(0, 66);
  if (ilog2(2, 2) != 0)
    return fail_real(0, 68);
  if (ilog2(2, 1) != 0x4000000)
    return fail_real(0, 70);
  if (ilog2(1, 2) != -0x4000000)
    return fail_real(0, 72);
  if (ilog2(4, 1) != 0x8000000)
    return fail_real(0, 74);
  if (ilog2(8, 1) != 3 * 0x4000000)
    return fail_real(0, 76);
  if (ilog2(3, 2) != 39256169)
    return fail_real(0, 78);
  if (ilog2(5, 2) != 88713093)
    return fail_real(0, 80);
  if (ilog2(1 << 31, 3) != 1974009751)
    return fail_real(0, 82);
  if (ipow(0, 4, 1) != 0)
    return fail_real(0, 84);
  if (ipow(1, 1, 1) != 1)
    return fail_real(0, 86);
  if (ipow(2, 10, 3) != 3 * 1024)
    return fail_real(0, 88);
  if (iexp(0, 1, 1) != 1)
    return fail_real(0, 90);
  if (iexp(1 << 5, 3, 1 << 16) != 2811605630)
    return fail_real(0, 92);
  if (isin(1, 1, 1 << 26) != 56470162)
    return fail_real(0, 94);
  if (isin(1, 2, 1 << 26) != 32173703)
    return fail_real(0, 96);
  if (icos(1, 1, 1 << 26) != 36259074)
    return fail_real(0, 98);
  if (icos(1, 2, 1 << 26) != 58893569)
    return fail_real(0, 100);
  return 0x80;
}


x86 assembly (clang, -O0):
<test_ifp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <ilog2@plt>
cmp    $0x7fffffff,%eax
je     1193 <test_ifp+0x33>
xor    %edi,%edi
mov    $0x40,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <ilog2@plt>
cmp    $0x0,%eax
je     11bc <test_ifp+0x5c>
xor    %edi,%edi
mov    $0x42,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x2,%esi
mov    %esi,%edi
call   1040 <ilog2@plt>
cmp    $0x0,%eax
je     11e5 <test_ifp+0x85>
xor    %edi,%edi
mov    $0x44,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <ilog2@plt>
cmp    $0x4000000,%eax
je     1213 <test_ifp+0xb3>
xor    %edi,%edi
mov    $0x46,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <ilog2@plt>
cmp    $0xfc000000,%eax
je     1241 <test_ifp+0xe1>
xor    %edi,%edi
mov    $0x48,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x4,%edi
mov    $0x1,%esi
call   1040 <ilog2@plt>
cmp    $0x8000000,%eax
je     126f <test_ifp+0x10f>
xor    %edi,%edi
mov    $0x4a,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <ilog2@plt>
cmp    $0xc000000,%eax
je     129d <test_ifp+0x13d>
xor    %edi,%edi
mov    $0x4c,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x3,%edi
mov    $0x2,%esi
call   1040 <ilog2@plt>
cmp    $0x2570069,%eax
je     12cb <test_ifp+0x16b>
xor    %edi,%edi
mov    $0x4e,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x5,%edi
mov    $0x2,%esi
call   1040 <ilog2@plt>
cmp    $0x549a785,%eax
je     12f9 <test_ifp+0x199>
xor    %edi,%edi
mov    $0x50,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x80000000,%edi
mov    $0x3,%esi
call   1040 <ilog2@plt>
cmp    $0x75a8ff97,%eax
je     1327 <test_ifp+0x1c7>
xor    %edi,%edi
mov    $0x52,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x1,%edx
call   1070 <ipow@plt>
cmp    $0x0,%eax
je     1355 <test_ifp+0x1f5>
xor    %edi,%edi
mov    $0x54,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x1,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1070 <ipow@plt>
cmp    $0x1,%eax
je     1380 <test_ifp+0x220>
xor    %edi,%edi
mov    $0x56,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x2,%edi
mov    $0xa,%esi
mov    $0x3,%edx
call   1070 <ipow@plt>
cmp    $0xc00,%eax
je     13b3 <test_ifp+0x253>
xor    %edi,%edi
mov    $0x58,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
xor    %edi,%edi
mov    $0x1,%edx
mov    %edx,%esi
call   1060 <iexp@plt>
cmp    $0x1,%eax
je     13de <test_ifp+0x27e>
xor    %edi,%edi
mov    $0x5a,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x20,%edi
mov    $0x3,%esi
mov    $0x10000,%edx
call   1060 <iexp@plt>
cltq
mov    $0xa795b27e,%ecx
cmp    %rcx,%rax
je     1416 <test_ifp+0x2b6>
xor    %edi,%edi
mov    $0x5c,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x1,%esi
mov    $0x4000000,%edx
mov    %esi,%edi
call   1080 <isin@plt>
cmp    $0x35daa92,%eax
je     1446 <test_ifp+0x2e6>
xor    %edi,%edi
mov    $0x5e,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x4000000,%edx
call   1080 <isin@plt>
cmp    $0x1eaee87,%eax
je     1479 <test_ifp+0x319>
xor    %edi,%edi
mov    $0x60,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x1,%esi
mov    $0x4000000,%edx
mov    %esi,%edi
call   1030 <icos@plt>
cmp    $0x2294502,%eax
je     14a9 <test_ifp+0x349>
xor    %edi,%edi
mov    $0x62,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x4000000,%edx
call   1030 <icos@plt>
cmp    $0x382a501,%eax
je     14dc <test_ifp+0x37c>
xor    %edi,%edi
mov    $0x64,%esi
call   1050 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    14e3 <test_ifp+0x383>
movl   $0x80,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ifp>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <ilog2@plt>
mov    $0x40,%esi
cmp    $0x7fffffff,%eax
jne    12fa <test_ifp+0x1ba>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <ilog2@plt>
mov    $0x42,%esi
test   %eax,%eax
jne    12fa <test_ifp+0x1ba>
mov    $0x2,%edi
mov    $0x2,%esi
call   1030 <ilog2@plt>
mov    $0x44,%esi
test   %eax,%eax
jne    12fa <test_ifp+0x1ba>
mov    $0x2,%edi
mov    $0x1,%esi
call   1030 <ilog2@plt>
mov    $0x46,%esi
cmp    $0x4000000,%eax
jne    12fa <test_ifp+0x1ba>
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <ilog2@plt>
mov    $0x48,%esi
cmp    $0xfc000000,%eax
jne    12fa <test_ifp+0x1ba>
mov    $0x4,%edi
mov    $0x1,%esi
call   1030 <ilog2@plt>
mov    $0x4a,%esi
cmp    $0x8000000,%eax
jne    12fa <test_ifp+0x1ba>
mov    $0x8,%edi
mov    $0x1,%esi
call   1030 <ilog2@plt>
mov    $0x4c,%esi
cmp    $0xc000000,%eax
jne    12fa <test_ifp+0x1ba>
mov    $0x3,%edi
mov    $0x2,%esi
call   1030 <ilog2@plt>
mov    $0x4e,%esi
cmp    $0x2570069,%eax
jne    12fa <test_ifp+0x1ba>
mov    $0x5,%edi
mov    $0x2,%esi
call   1030 <ilog2@plt>
mov    $0x50,%esi
cmp    $0x549a785,%eax
jne    12fa <test_ifp+0x1ba>
mov    $0x80000000,%edi
mov    $0x3,%esi
call   1030 <ilog2@plt>
mov    $0x52,%esi
cmp    $0x75a8ff97,%eax
jne    12fa <test_ifp+0x1ba>
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x1,%edx
call   1060 <ipow@plt>
mov    $0x54,%esi
test   %eax,%eax
jne    12fa <test_ifp+0x1ba>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1060 <ipow@plt>
mov    $0x56,%esi
cmp    $0x1,%eax
jne    12fa <test_ifp+0x1ba>
mov    $0x2,%edi
mov    $0xa,%esi
mov    $0x3,%edx
call   1060 <ipow@plt>
mov    $0x58,%esi
cmp    $0xc00,%eax
jne    12fa <test_ifp+0x1ba>
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1050 <iexp@plt>
mov    $0x5a,%esi
cmp    $0x1,%eax
jne    12fa <test_ifp+0x1ba>
mov    $0x20,%edi
mov    $0x3,%esi
mov    $0x10000,%edx
call   1050 <iexp@plt>
mov    $0x5c,%esi
xor    %edi,%edi
pop    %rax
jmp    1040 <fail_real@plt>

LLVM IR (-O0):
define i32 @test_ifp() {
%1 = alloca i32
%2 = call i32 @ilog2(i32 1, i32 0)
%3 = icmp ne i32 %2, 2147483647
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @fail_real(i32 0, i32 64)
store i32 %5, i32* %1
br label %98
6: ; preds = %0
%7 = call i32 @ilog2(i32 1, i32 1)
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @fail_real(i32 0, i32 66)
store i32 %10, i32* %1
br label %98
11: ; preds = %6
%12 = call i32 @ilog2(i32 2, i32 2)
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @fail_real(i32 0, i32 68)
store i32 %15, i32* %1
br label %98
16: ; preds = %11
%17 = call i32 @ilog2(i32 2, i32 1)
%18 = icmp ne i32 %17, 67108864
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @fail_real(i32 0, i32 70)
store i32 %20, i32* %1
br label %98
21: ; preds = %16
%22 = call i32 @ilog2(i32 1, i32 2)
%23 = icmp ne i32 %22, -67108864
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @fail_real(i32 0, i32 72)
store i32 %25, i32* %1
br label %98
26: ; preds = %21
%27 = call i32 @ilog2(i32 4, i32 1)
%28 = icmp ne i32 %27, 134217728
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @fail_real(i32 0, i32 74)
store i32 %30, i32* %1
br label %98
31: ; preds = %26
%32 = call i32 @ilog2(i32 8, i32 1)
%33 = icmp ne i32 %32, 201326592
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 @fail_real(i32 0, i32 76)
store i32 %35, i32* %1
br label %98
36: ; preds = %31
%37 = call i32 @ilog2(i32 3, i32 2)
%38 = icmp ne i32 %37, 39256169
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 @fail_real(i32 0, i32 78)
store i32 %40, i32* %1
br label %98
41: ; preds = %36
%42 = call i32 @ilog2(i32 5, i32 2)
%43 = icmp ne i32 %42, 88713093
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 @fail_real(i32 0, i32 80)
store i32 %45, i32* %1
br label %98
46: ; preds = %41
%47 = call i32 @ilog2(i32 -2147483648, i32 3)
%48 = icmp ne i32 %47, 1974009751
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = call i32 @fail_real(i32 0, i32 82)
store i32 %50, i32* %1
br label %98
51: ; preds = %46
%52 = call i32 @ipow(i32 0, i32 4, i32 1)
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = call i32 @fail_real(i32 0, i32 84)
store i32 %55, i32* %1
br label %98
56: ; preds = %51
%57 = call i32 @ipow(i32 1, i32 1, i32 1)
%58 = icmp ne i32 %57, 1
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = call i32 @fail_real(i32 0, i32 86)
store i32 %60, i32* %1
br label %98
61: ; preds = %56
%62 = call i32 @ipow(i32 2, i32 10, i32 3)
%63 = icmp ne i32 %62, 3072
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = call i32 @fail_real(i32 0, i32 88)
store i32 %65, i32* %1
br label %98
66: ; preds = %61
%67 = call i32 @iexp(i32 0, i32 1, i32 1)
%68 = icmp ne i32 %67, 1
br i1 %68, label %69, label %71
69: ; preds = %66
%70 = call i32 @fail_real(i32 0, i32 90)
store i32 %70, i32* %1
br label %98
71: ; preds = %66
%72 = call i32 @iexp(i32 32, i32 3, i32 65536)
%73 = sext i32 %72 to i64
%74 = icmp ne i64 %73, 2811605630
br i1 %74, label %75, label %77
75: ; preds = %71
%76 = call i32 @fail_real(i32 0, i32 92)
store i32 %76, i32* %1
br label %98
77: ; preds = %71
%78 = call i32 @isin(i32 1, i32 1, i32 67108864)
%79 = icmp ne i32 %78, 56470162
br i1 %79, label %80, label %82
80: ; preds = %77
%81 = call i32 @fail_real(i32 0, i32 94)
store i32 %81, i32* %1
br label %98
82: ; preds = %77
%83 = call i32 @isin(i32 1, i32 2, i32 67108864)
%84 = icmp ne i32 %83, 32173703
br i1 %84, label %85, label %87
85: ; preds = %82
%86 = call i32 @fail_real(i32 0, i32 96)
store i32 %86, i32* %1
br label %98
87: ; preds = %82
%88 = call i32 @icos(i32 1, i32 1, i32 67108864)
%89 = icmp ne i32 %88, 36259074
br i1 %89, label %90, label %92
90: ; preds = %87
%91 = call i32 @fail_real(i32 0, i32 98)
store i32 %91, i32* %1
br label %98
92: ; preds = %87
%93 = call i32 @icos(i32 1, i32 2, i32 67108864)
%94 = icmp ne i32 %93, 58893569
br i1 %94, label %95, label %97
95: ; preds = %92
%96 = call i32 @fail_real(i32 0, i32 100)
store i32 %96, i32* %1
br label %98
97: ; preds = %92
store i32 128, i32* %1
br label %98
98: ; preds = %97, %95, %90, %85, %80, %75, %69, %64, %59, %54, %49, %44, %39, %34, %29, %24, %19, %14, %9, %4
%99 = load i32, i32* %1
ret i32 %99
}

LLVM IR (-O2):
define i32 @test_ifp() {
%1 = tail call i32 @ilog2(i32 1, i32 0)
%2 = icmp eq i32 %1, 2147483647
br i1 %2, label %3, label %44
3: ; preds = %0
%4 = tail call i32 @ilog2(i32 1, i32 1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %44
6: ; preds = %3
%7 = tail call i32 @ilog2(i32 2, i32 2)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %44
9: ; preds = %6
%10 = tail call i32 @ilog2(i32 2, i32 1)
%11 = icmp eq i32 %10, 67108864
br i1 %11, label %12, label %44
12: ; preds = %9
%13 = tail call i32 @ilog2(i32 1, i32 2)
%14 = icmp eq i32 %13, -67108864
br i1 %14, label %15, label %44
15: ; preds = %12
%16 = tail call i32 @ilog2(i32 4, i32 1)
%17 = icmp eq i32 %16, 134217728
br i1 %17, label %18, label %44
18: ; preds = %15
%19 = tail call i32 @ilog2(i32 8, i32 1)
%20 = icmp eq i32 %19, 201326592
br i1 %20, label %21, label %44
21: ; preds = %18
%22 = tail call i32 @ilog2(i32 3, i32 2)
%23 = icmp eq i32 %22, 39256169
br i1 %23, label %24, label %44
24: ; preds = %21
%25 = tail call i32 @ilog2(i32 5, i32 2)
%26 = icmp eq i32 %25, 88713093
br i1 %26, label %27, label %44
27: ; preds = %24
%28 = tail call i32 @ilog2(i32 -2147483648, i32 3)
%29 = icmp eq i32 %28, 1974009751
br i1 %29, label %30, label %44
30: ; preds = %27
%31 = tail call i32 @ipow(i32 0, i32 4, i32 1)
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %44
33: ; preds = %30
%34 = tail call i32 @ipow(i32 1, i32 1, i32 1)
%35 = icmp eq i32 %34, 1
br i1 %35, label %36, label %44
36: ; preds = %33
%37 = tail call i32 @ipow(i32 2, i32 10, i32 3)
%38 = icmp eq i32 %37, 3072
br i1 %38, label %39, label %44
39: ; preds = %36
%40 = tail call i32 @iexp(i32 0, i32 1, i32 1)
%41 = icmp eq i32 %40, 1
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = tail call i32 @iexp(i32 32, i32 3, i32 65536)
br label %44
44: ; preds = %39, %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6, %3, %0, %42
%45 = phi i32 [ 92, %42 ], [ 64, %0 ], [ 66, %3 ], [ 68, %6 ], [ 70, %9 ], [ 72, %12 ], [ 74, %15 ], [ 76, %18 ], [ 78, %21 ], [ 80, %24 ], [ 82, %27 ], [ 84, %30 ], [ 86, %33 ], [ 88, %36 ], [ 90, %39 ]
%46 = tail call i32 @fail_real(i32 0, i32 %45)
ret i32 %46
}