#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
float cbt(float f) {
  float t = 1;
  while ((t * t * t) != f && t != f) {
    t++;
  }
  if (t > 9999999 || t < -9999999 || t == f) {
    printf("ERROR 5");
    printf("\n\n");
    exit(0);
  } else {
    return t;
  }
}


x86 assembly (clang, -O0):
<cbt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xecb(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
xor    %eax,%eax
ucomiss -0x4(%rbp),%xmm0
mov    %al,-0x9(%rbp)
jne    1163 <cbt+0x43>
jp     1163 <cbt+0x43>
jmp    1177 <cbt+0x57>
movss  -0x8(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1187 <cbt+0x67>
jmp    119e <cbt+0x7e>
movss  0xe71(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    113a <cbt+0x1a>
movss  -0x8(%rbp),%xmm0
movss  0xe59(%rip),%xmm1
ucomiss %xmm1,%xmm0
ja     11db <cbt+0xbb>
movss  0xe4c(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
ja     11db <cbt+0xbb>
movss  -0x8(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
jne    11fa <cbt+0xda>
jp     11fa <cbt+0xda>
lea    0xe2a(%rip),%rdi
call   1030 <printf@plt>
lea    0xe26(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbt>:
push   %rax
movaps %xmm0,%xmm1
movss  0xec4(%rip),%xmm0
ucomiss %xmm0,%xmm1
jne    1143 <cbt+0x13>
jnp    116d <cbt+0x3d>
movss  0xeb5(%rip),%xmm2
movaps %xmm2,%xmm0
xchg   %ax,%ax
addss  %xmm2,%xmm0
ucomiss %xmm1,%xmm0
jne    115b <cbt+0x2b>
jnp    116d <cbt+0x3d>
movaps %xmm0,%xmm3
mulss  %xmm0,%xmm3
mulss  %xmm0,%xmm3
ucomiss %xmm1,%xmm3
jne    1150 <cbt+0x20>
jp     1150 <cbt+0x20>
ucomiss %xmm1,%xmm0
jne    1174 <cbt+0x44>
jnp    118c <cbt+0x5c>
ucomiss 0xe89(%rip),%xmm0
ja     118c <cbt+0x5c>
movss  0xe83(%rip),%xmm1
ucomiss %xmm0,%xmm1
ja     118c <cbt+0x5c>
pop    %rax
ret
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
lea    0xe75(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"ERROR 5\00"
@.str.1 = [3 x i8] c"\0A\0A\00"
define float @cbt(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
store float 1.000000e+00, float* %3
br label %4
4: ; preds = %18, %1
%5 = load float, float* %3
%6 = load float, float* %3
%7 = fmul float %5, %6
%8 = load float, float* %3
%9 = fmul float %7, %8
%10 = load float, float* %2
%11 = fcmp une float %9, %10
br i1 %11, label %12, label %16
12: ; preds = %4
%13 = load float, float* %3
%14 = load float, float* %2
%15 = fcmp une float %13, %14
br label %16
16: ; preds = %12, %4
%17 = phi i1 [ false, %4 ], [ %15, %12 ]
br i1 %17, label %18, label %21
18: ; preds = %16
%19 = load float, float* %3
%20 = fadd float %19, 1.000000e+00
store float %20, float* %3
br label %4
21: ; preds = %16
%22 = load float, float* %3
%23 = fcmp ogt float %22, 0x416312CFE0000000
br i1 %23, label %31, label %24
24: ; preds = %21
%25 = load float, float* %3
%26 = fcmp olt float %25, 0xC16312CFE0000000
br i1 %26, label %31, label %27
27: ; preds = %24
%28 = load float, float* %3
%29 = load float, float* %2
%30 = fcmp oeq float %28, %29
br i1 %30, label %31, label %35
31: ; preds = %27, %24, %21
%32 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%33 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%34 = call i32 @exit(i32 0)
unreachable
35: ; preds = %27
%36 = load float, float* %3
ret float %36
}

LLVM IR (-O2):
@.str = [8 x i8] c"ERROR 5\00"
@str = [2 x i8] c"\0A\00"
define float @cbt(float %0) {
%2 = fcmp une float %0, 1.000000e+00
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi float [ %5, %3 ], [ 1.000000e+00, %1 ]
%5 = fadd float %4, 1.000000e+00
%6 = fmul float %5, %5
%7 = fmul float %5, %6
%8 = fcmp une float %7, %0
%9 = fcmp une float %5, %0
%10 = and i1 %9, %8
br i1 %10, label %3, label %11
11: ; preds = %3, %1
%12 = phi float [ 1.000000e+00, %1 ], [ %5, %3 ]
%13 = fcmp ogt float %12, 0x416312CFE0000000
%14 = fcmp olt float %12, 0xC16312CFE0000000
%15 = or i1 %13, %14
%16 = fcmp oeq float %12, %0
%17 = or i1 %16, %15
br i1 %17, label %18, label %22
18: ; preds = %11
%19 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%21 = tail call i32 @exit(i32 0)
unreachable
22: ; preds = %11
ret float %12
}