#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*/ abort();
scalar_t__ cbrt(double);
scalar_t__ convert_it(double);
int main(int argc, char *argv[]) {
  double values[6] = {3.0, 1.95, 2.227, 729.0, 64.0, .0008797};
  unsigned i;
  for (i = 0; i < 6; i++)
    if (convert_it(values[i]) != cbrt(values[i]))
      abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
movsd  0xeba(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xea5(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe90(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe7b(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe66(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe51(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x6,-0x44(%rbp)
jae    120f <main+0xcf>
mov    -0x44(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm0
call   1050 <convert_it@plt>
mov    %rax,-0x50(%rbp)
mov    -0x44(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm0
call   1060 <cbrt@plt>
mov    %rax,%rcx
mov    -0x50(%rbp),%rax
cmp    %rcx,%rax
je     11fc <main+0xbc>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1201 <main+0xc1>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11bb <main+0x7b>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xec7(%rip),%xmm0
call   1040 <convert_it@plt>
mov    %rax,%rbx
movsd  0xeb7(%rip),%xmm0
call   1050 <cbrt@plt>
cmp    %rax,%rbx
jne    1209 <main+0xd9>
movsd  0xea9(%rip),%xmm0
call   1040 <convert_it@plt>
mov    %rax,%rbx
movsd  0xe99(%rip),%xmm0
call   1050 <cbrt@plt>
cmp    %rax,%rbx
jne    1209 <main+0xd9>
movsd  0xe8b(%rip),%xmm0
call   1040 <convert_it@plt>
mov    %rax,%rbx
movsd  0xe7b(%rip),%xmm0
call   1050 <cbrt@plt>
cmp    %rax,%rbx
jne    1209 <main+0xd9>
movsd  0xe71(%rip),%xmm0
call   1040 <convert_it@plt>
mov    %rax,%rbx
movsd  0xe61(%rip),%xmm0
call   1050 <cbrt@plt>
cmp    %rax,%rbx
jne    1209 <main+0xd9>
movsd  0xe57(%rip),%xmm0
call   1040 <convert_it@plt>
mov    %rax,%rbx
movsd  0xe47(%rip),%xmm0
call   1050 <cbrt@plt>
cmp    %rax,%rbx
jne    1209 <main+0xd9>
movsd  0xe3d(%rip),%xmm0
call   1040 <convert_it@plt>
mov    %rax,%rbx
movsd  0xe2d(%rip),%xmm0
call   1050 <cbrt@plt>
cmp    %rax,%rbx
jne    1209 <main+0xd9>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x double]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [6 x double]* %6 to i8*
%9 = bitcast i8* %8 to [6 x double]*
%10 = getelementptr inbounds [6 x double], [6 x double]* %9, i32 0, i32 0
store double 3.000000e+00, double* %10
%11 = getelementptr inbounds [6 x double], [6 x double]* %9, i32 0, i32 1
store double 1.950000e+00, double* %11
%12 = getelementptr inbounds [6 x double], [6 x double]* %9, i32 0, i32 2
store double 2.227000e+00, double* %12
%13 = getelementptr inbounds [6 x double], [6 x double]* %9, i32 0, i32 3
store double 7.290000e+02, double* %13
%14 = getelementptr inbounds [6 x double], [6 x double]* %9, i32 0, i32 4
store double 6.400000e+01, double* %14
%15 = getelementptr inbounds [6 x double], [6 x double]* %9, i32 0, i32 5
store double 8.797000e-04, double* %15
store i32 0, i32* %7
br label %16
16: ; preds = %34, %2
%17 = load i32, i32* %7
%18 = icmp ult i32 %17, 6
br i1 %18, label %19, label %37
19: ; preds = %16
%20 = load i32, i32* %7
%21 = zext i32 %20 to i64
%22 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %21
%23 = load double, double* %22
%24 = call i64 @convert_it(double %23)
%25 = load i32, i32* %7
%26 = zext i32 %25 to i64
%27 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %26
%28 = load double, double* %27
%29 = call i64 @cbrt(double %28)
%30 = icmp ne i64 %24, %29
br i1 %30, label %31, label %33
31: ; preds = %19
%32 = call i32 (...) @abort()
unreachable
33: ; preds = %19
br label %34
34: ; preds = %33
%35 = load i32, i32* %7
%36 = add i32 %35, 1
store i32 %36, i32* %7
br label %16
37: ; preds = %16
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @convert_it(double 3.000000e+00)
%4 = tail call i64 @cbrt(double 3.000000e+00)
%5 = icmp eq i64 %3, %4
br i1 %5, label %6, label %27
6: ; preds = %2
%7 = tail call i64 @convert_it(double 1.950000e+00)
%8 = tail call i64 @cbrt(double 1.950000e+00)
%9 = icmp eq i64 %7, %8
br i1 %9, label %10, label %27
10: ; preds = %6
%11 = tail call i64 @convert_it(double 2.227000e+00)
%12 = tail call i64 @cbrt(double 2.227000e+00)
%13 = icmp eq i64 %11, %12
br i1 %13, label %14, label %27
14: ; preds = %10
%15 = tail call i64 @convert_it(double 7.290000e+02)
%16 = tail call i64 @cbrt(double 7.290000e+02)
%17 = icmp eq i64 %15, %16
br i1 %17, label %18, label %27
18: ; preds = %14
%19 = tail call i64 @convert_it(double 6.400000e+01)
%20 = tail call i64 @cbrt(double 6.400000e+01)
%21 = icmp eq i64 %19, %20
br i1 %21, label %22, label %27
22: ; preds = %18
%23 = tail call i64 @convert_it(double 8.797000e-04)
%24 = tail call i64 @cbrt(double 8.797000e-04)
%25 = icmp eq i64 %23, %24
br i1 %25, label %26, label %27
26: ; preds = %22
ret i32 0
27: ; preds = %22, %18, %14, %10, %6, %2
%28 = tail call i32 (...) @abort()
unreachable
}