#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 */
double NAN;
scalar_t__ errno;
double fabs(double);
double pow(double, double);
double sin(double);
double calc(double x, double y, double z) {
  errno = 0;
  double a0 = pow(x, y + 1.0) / pow(x - y, 1.0 / z);
  double a1 = y / ((5 + 1.0) * fabs(x + y));
  double a2 = pow(x + 0, 1.0 / fabs(sin(y)));
  if (errno)
    return NAN;
  return a0 + a1 + a2;
}


x86 assembly (clang, -O0):
<calc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    0x2e9a(%rip),%rax
movq   $0x0,(%rax)
movsd  -0x10(%rbp),%xmm0
movsd  0xeae(%rip),%xmm1
addsd  -0x18(%rbp),%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  0xe8d(%rip),%xmm1
divsd  -0x20(%rbp),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
addsd  -0x18(%rbp),%xmm2
movaps 0xe6c(%rip),%xmm1
pand   %xmm1,%xmm2
movsd  0xe58(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x40(%rbp),%xmm0
movaps 0xe2d(%rip),%xmm1
pand   %xmm1,%xmm2
movsd  0xe11(%rip),%xmm1
divsd  %xmm2,%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x38(%rbp)
mov    0x2dd4(%rip),%rax
cmpq   $0x0,(%rax)
je     1223 <calc+0x103>
mov    0x2de3(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1237 <calc+0x117>
movsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc>:
push   %rbx
sub    $0x50,%rsp
movsd  %xmm2,0x8(%rsp)
movapd %xmm1,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
mov    0x2e9b(%rip),%rbx
movq   $0x0,(%rbx)
addsd  0xeb4(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,0x40(%rsp)
movapd 0x10(%rsp),%xmm0
subsd  0x20(%rsp),%xmm0
movsd  0xe96(%rip),%xmm1
divsd  0x8(%rsp),%xmm1
call   1040 <pow@plt>
movapd %xmm0,0x30(%rsp)
xorpd  %xmm0,%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movapd 0x20(%rsp),%xmm0
call   1030 <sin@plt>
andpd  0xe72(%rip),%xmm0
movsd  0xe5a(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
call   1040 <pow@plt>
cmpq   $0x0,(%rbx)
je     11c8 <calc+0xa8>
mov    0x2e36(%rip),%rax
movsd  (%rax),%xmm1
jmp    1208 <calc+0xe8>
movapd 0x20(%rsp),%xmm2
movapd 0x10(%rsp),%xmm1
addsd  %xmm2,%xmm1
andpd  0xe30(%rip),%xmm1
mulsd  0xe20(%rip),%xmm1
unpcklpd 0x40(%rsp),%xmm2
unpcklpd 0x30(%rsp),%xmm1
divpd  %xmm1,%xmm2
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
@NAN = global double 0.000000e+00
define double @calc(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store i64 0, i64* @errno
%11 = load double, double* %5
%12 = load double, double* %6
%13 = fadd double %12, 1.000000e+00
%14 = call double @pow(double %11, double %13)
%15 = load double, double* %5
%16 = load double, double* %6
%17 = fsub double %15, %16
%18 = load double, double* %7
%19 = fdiv double 1.000000e+00, %18
%20 = call double @pow(double %17, double %19)
%21 = fdiv double %14, %20
store double %21, double* %8
%22 = load double, double* %6
%23 = load double, double* %5
%24 = load double, double* %6
%25 = fadd double %23, %24
%26 = call double @llvm.fabs.f64(double %25)
%27 = fmul double 6.000000e+00, %26
%28 = fdiv double %22, %27
store double %28, double* %9
%29 = load double, double* %5
%30 = fadd double %29, 0.000000e+00
%31 = load double, double* %6
%32 = call double @sin(double %31)
%33 = call double @llvm.fabs.f64(double %32)
%34 = fdiv double 1.000000e+00, %33
%35 = call double @pow(double %30, double %34)
store double %35, double* %10
%36 = load i64, i64* @errno
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %3
%39 = load double, double* @NAN
store double %39, double* %4
br label %46
40: ; preds = %3
%41 = load double, double* %8
%42 = load double, double* %9
%43 = fadd double %41, %42
%44 = load double, double* %10
%45 = fadd double %43, %44
store double %45, double* %4
br label %46
46: ; preds = %40, %38
%47 = load double, double* %4
ret double %47
}

LLVM IR (-O2):
@errno = global i64 0
@NAN = global double 0.000000e+00
define double @calc(double %0, double %1, double %2) {
store i64 0, i64* @errno
%4 = fadd double %1, 1.000000e+00
%5 = tail call double @pow(double %0, double %4)
%6 = fsub double %0, %1
%7 = fdiv double 1.000000e+00, %2
%8 = tail call double @pow(double %6, double %7)
%9 = fadd double %0, 0.000000e+00
%10 = tail call double @sin(double %1)
%11 = tail call double @llvm.fabs.f64(double %10)
%12 = fdiv double 1.000000e+00, %11
%13 = tail call double @pow(double %9, double %12)
%14 = load i64, i64* @errno
%15 = icmp eq i64 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %3
%17 = load double, double* @NAN
br label %31
18: ; preds = %3
%19 = fadd double %0, %1
%20 = tail call double @llvm.fabs.f64(double %19)
%21 = fmul double %20, 6.000000e+00
%22 = insertelement <2 x double> poison, double %1, i64 0
%23 = insertelement <2 x double> %22, double %5, i64 1
%24 = insertelement <2 x double> poison, double %21, i64 0
%25 = insertelement <2 x double> %24, double %8, i64 1
%26 = fdiv <2 x double> %23, %25
%27 = shufflevector <2 x double> %26, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%28 = fadd <2 x double> %26, %27
%29 = extractelement <2 x double> %28, i64 0
%30 = fadd double %29, %13
br label %31
31: ; preds = %18, %16
%32 = phi double [ %17, %16 ], [ %30, %18 ]
ret double %32
}