#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 M_PI;
int UCHAR_MAX;
double euler_plus(double *h, double *Delta) {
  int l;
  double iChi = 0.0;
  double iVol = 0.0;
  int iv[256] = {
      0,  3,   3,   0,  3,   0,  -6, -3, 3,   -6, 0,  -3, 0,  -3, -3, 0,
      3,  0,   -6,  -3, -6,  -3, -3, -6, -12, -8, -8, -6, -8, -6, 0,  -3,
      3,  -6,  0,   -3, -12, -8, -8, -6, -6,  -3, -3, -6, -8, 0,  -6, -3,
      0,  -3,  -3,  0,  -8,  -6, 0,  -3, -8,  0,  -6, -3, 0,  3,  3,  0,
      3,  -6,  -12, -8, 0,   -3, -8, -6, -6,  -3, -8, 0,  -3, -6, -6, -3,
      0,  -3,  -8,  -6, -3,  0,  0,  -3, -8,  0,  0,  3,  -6, -3, 3,  0,
      -6, -3,  -8,  0,  -8,  0,  0,  3,  -3,  12, 0,  9,  0,  9,  3,  6,
      -3, -6,  -6,  -3, -6,  -3, 3,  0,  0,   9,  3,  6,  3,  6,  6,  3,
      3,  -12, -6,  -8, -6,  -8, -3, 0,  0,   -8, -3, -6, -3, -6, -6, -3,
      -6, -8,  -3,  0,  -3,  0,  12, 9,  -8,  0,  0,  3,  0,  3,  9,  6,
      0,  -8,  -3,  -6, -8,  0,  0,  3,  -3,  0,  0,  -3, -6, 3,  -3, 0,
      -3, -6,  -6,  -3, 0,   3,  9,  6,  -6,  3,  -3, 0,  3,  6,  6,  3,
      0,  -8,  -8,  0,  -3,  -6, 0,  3,  -3,  0,  -6, 3,  0,  -3, -3, 0,
      -3, -6,  0,   3,  -6,  -3, 9,  6,  -6,  3,  3,  6,  -3, 0,  6,  3,
      -3, 0,   -6,  3,  -6,  3,  3,  6,  -6,  9,  -3, 6,  -3, 6,  0,  3,
      0,  -3,  -3,  0,  -3,  0,  6,  3,  -3,  6,  0,  3,  0,  3,  3,  0};
  for (l = 0; l <= UCHAR_MAX; l++) {
    iChi += iv[l] * h[l];
    iVol += h[l];
  }
  return M_PI / 6 * iChi / (iVol * Delta[0] * Delta[1] * Delta[2]);
}


x86 assembly (clang, -O0):
<euler_plus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    -0x430(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x400,%edx
call   1030 <memcpy@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2e94(%rip),%rcx
cmp    (%rcx),%eax
jg     11b5 <euler_plus+0xa5>
movslq -0x14(%rbp),%rax
cvtsi2sdl -0x430(%rbp,%rax,4),%xmm0
ff ff
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1152 <euler_plus+0x42>
mov    0x2e24(%rip),%rax
mov    (%rax),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x10(%rbp),%rax
mulsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm1
divsd  %xmm1,%xmm0
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<euler_plus>:
mov    0x2ee9(%rip),%rax
mov    (%rax),%eax
test   %eax,%eax
js     1175 <euler_plus+0x75>
lea    0x1(%rax),%r8
test   %rax,%rax
je     117f <euler_plus+0x7f>
mov    %r8d,%edx
and    $0xfffffffe,%edx
xorpd  %xmm1,%xmm1
xor    %ecx,%ecx
lea    0xed7(%rip),%rax
xorpd  %xmm2,%xmm2
nopl   (%rax)
xorps  %xmm0,%xmm0
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  (%rdi,%rcx,8),%xmm3
movsd  0x8(%rdi,%rcx,8),%xmm4
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm3,%xmm1
xorps  %xmm2,%xmm2
cvtsi2sdl 0x4(%rax,%rcx,4),%xmm2
mulsd  %xmm4,%xmm2
addsd  %xmm0,%xmm2
addsd  %xmm4,%xmm1
add    $0x2,%rcx
cmp    %rcx,%rdx
jne    1130 <euler_plus+0x30>
test   $0x1,%r8b
jne    118f <euler_plus+0x8f>
jmp    11af <euler_plus+0xaf>
xorpd  %xmm2,%xmm2
xorpd  %xmm1,%xmm1
jmp    11af <euler_plus+0xaf>
xorpd  %xmm1,%xmm1
xor    %ecx,%ecx
xorpd  %xmm2,%xmm2
test   $0x1,%r8b
je     11af <euler_plus+0xaf>
lea    0xe6a(%rip),%rax
xorps  %xmm0,%xmm0
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  (%rdi,%rcx,8),%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm0,%xmm2
addsd  %xmm3,%xmm1
mov    0x2e2a(%rip),%rax
movslq (%rax),%rax
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsi),%xmm1
mulsd  0x8(%rsi),%xmm1
mulsd  %xmm2,%xmm0
mulsd  0x10(%rsi),%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@__const.euler_plus.iv = [256 x i32] [i32 0, i32 3, i32 3, i32 0, i32 3, i32 0, i32 -6, i32 -3, i32 3, i32 -6, i32 0, i32 -3, i32 0, i32 -3, i32 -3, i32 0, i32 3, i32 0, i32 -6, i32 -3, i32 -6, i32 -3, i32 -3, i32 -6, i32 -12, i32 -8, i32 -8, i32 -6, i32 -8, i32 -6, i32 0, i32 -3, i32 3, i32 -6, i32 0, i32 -3, i32 -12, i32 -8, i32 -8, i32 -6, i32 -6, i32 -3, i32 -3, i32 -6, i32 -8, i32 0, i32 -6, i32 -3, i32 0, i32 -3, i32 -3, i32 0, i32 -8, i32 -6, i32 0, i32 -3, i32 -8, i32 0, i32 -6, i32 -3, i32 0, i32 3, i32 3, i32 0, i32 3, i32 -6, i32 -12, i32 -8, i32 0, i32 -3, i32 -8, i32 -6, i32 -6, i32 -3, i32 -8, i32 0, i32 -3, i32 -6, i32 -6, i32 -3, i32 0, i32 -3, i32 -8, i32 -6, i32 -3, i32 0, i32 0, i32 -3, i32 -8, i32 0, i32 0, i32 3, i32 -6, i32 -3, i32 3, i32 0, i32 -6, i32 -3, i32 -8, i32 0, i32 -8, i32 0, i32 0, i32 3, i32 -3, i32 12, i32 0, i32 9, i32 0, i32 9, i32 3, i32 6, i32 -3, i32 -6, i32 -6, i32 -3, i32 -6, i32 -3, i32 3, i32 0, i32 0, i32 9, i32 3, i32 6, i32 3, i32 6, i32 6, i32 3, i32 3, i32 -12, i32 -6, i32 -8, i32 -6, i32 -8, i32 -3, i32 0, i32 0, i32 -8, i32 -3, i32 -6, i32 -3, i32 -6, i32 -6, i32 -3, i32 -6, i32 -8, i32 -3, i32 0, i32 -3, i32 0, i32 12, i32 9, i32 -8, i32 0, i32 0, i32 3, i32 0, i32 3, i32 9, i32 6, i32 0, i32 -8, i32 -3, i32 -6, i32 -8, i32 0, i32 0, i32 3, i32 -3, i32 0, i32 0, i32 -3, i32 -6, i32 3, i32 -3, i32 0, i32 -3, i32 -6, i32 -6, i32 -3, i32 0, i32 3, i32 9, i32 6, i32 -6, i32 3, i32 -3, i32 0, i32 3, i32 6, i32 6, i32 3, i32 0, i32 -8, i32 -8, i32 0, i32 -3, i32 -6, i32 0, i32 3, i32 -3, i32 0, i32 -6, i32 3, i32 0, i32 -3, i32 -3, i32 0, i32 -3, i32 -6, i32 0, i32 3, i32 -6, i32 -3, i32 9, i32 6, i32 -6, i32 3, i32 3, i32 6, i32 -3, i32 0, i32 6, i32 3, i32 -3, i32 0, i32 -6, i32 3, i32 -6, i32 3, i32 3, i32 6, i32 -6, i32 9, i32 -3, i32 6, i32 -3, i32 6, i32 0, i32 3, i32 0, i32 -3, i32 -3, i32 0, i32 -3, i32 0, i32 6, i32 3, i32 -3, i32 6, i32 0, i32 3, i32 0, i32 3, i32 3, i32 0]
@UCHAR_MAX = global i32 0
@M_PI = global i32 0
define double @euler_plus(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca [256 x i32]
store double* %0, double** %3
store double* %1, double** %4
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
%9 = bitcast [256 x i32]* %8 to i8*
store i32 0, i32* %5
br label %10
10: ; preds = %34, %2
%11 = load i32, i32* %5
%12 = load i32, i32* @UCHAR_MAX
%13 = icmp sle i32 %11, %12
br i1 %13, label %14, label %37
14: ; preds = %10
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [256 x i32], [256 x i32]* %8, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = sitofp i32 %18 to double
%20 = load double*, double** %3
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %20, i64 %22
%24 = load double, double* %23
%25 = load double, double* %6
%26 = call double @llvm.fmuladd.f64(double %19, double %24, double %25)
store double %26, double* %6
%27 = load double*, double** %3
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds double, double* %27, i64 %29
%31 = load double, double* %30
%32 = load double, double* %7
%33 = fadd double %32, %31
store double %33, double* %7
br label %34
34: ; preds = %14
%35 = load i32, i32* %5
%36 = add nsw i32 %35, 1
store i32 %36, i32* %5
br label %10
37: ; preds = %10
%38 = load i32, i32* @M_PI
%39 = sdiv i32 %38, 6
%40 = sitofp i32 %39 to double
%41 = load double, double* %6
%42 = fmul double %40, %41
%43 = load double, double* %7
%44 = load double*, double** %4
%45 = getelementptr inbounds double, double* %44, i64 0
%46 = load double, double* %45
%47 = fmul double %43, %46
%48 = load double*, double** %4
%49 = getelementptr inbounds double, double* %48, i64 1
%50 = load double, double* %49
%51 = fmul double %47, %50
%52 = load double*, double** %4
%53 = getelementptr inbounds double, double* %52, i64 2
%54 = load double, double* %53
%55 = fmul double %51, %54
%56 = fdiv double %42, %55
ret double %56
}

LLVM IR (-O2):
@__const.euler_plus.iv = [256 x i32] [i32 0, i32 3, i32 3, i32 0, i32 3, i32 0, i32 -6, i32 -3, i32 3, i32 -6, i32 0, i32 -3, i32 0, i32 -3, i32 -3, i32 0, i32 3, i32 0, i32 -6, i32 -3, i32 -6, i32 -3, i32 -3, i32 -6, i32 -12, i32 -8, i32 -8, i32 -6, i32 -8, i32 -6, i32 0, i32 -3, i32 3, i32 -6, i32 0, i32 -3, i32 -12, i32 -8, i32 -8, i32 -6, i32 -6, i32 -3, i32 -3, i32 -6, i32 -8, i32 0, i32 -6, i32 -3, i32 0, i32 -3, i32 -3, i32 0, i32 -8, i32 -6, i32 0, i32 -3, i32 -8, i32 0, i32 -6, i32 -3, i32 0, i32 3, i32 3, i32 0, i32 3, i32 -6, i32 -12, i32 -8, i32 0, i32 -3, i32 -8, i32 -6, i32 -6, i32 -3, i32 -8, i32 0, i32 -3, i32 -6, i32 -6, i32 -3, i32 0, i32 -3, i32 -8, i32 -6, i32 -3, i32 0, i32 0, i32 -3, i32 -8, i32 0, i32 0, i32 3, i32 -6, i32 -3, i32 3, i32 0, i32 -6, i32 -3, i32 -8, i32 0, i32 -8, i32 0, i32 0, i32 3, i32 -3, i32 12, i32 0, i32 9, i32 0, i32 9, i32 3, i32 6, i32 -3, i32 -6, i32 -6, i32 -3, i32 -6, i32 -3, i32 3, i32 0, i32 0, i32 9, i32 3, i32 6, i32 3, i32 6, i32 6, i32 3, i32 3, i32 -12, i32 -6, i32 -8, i32 -6, i32 -8, i32 -3, i32 0, i32 0, i32 -8, i32 -3, i32 -6, i32 -3, i32 -6, i32 -6, i32 -3, i32 -6, i32 -8, i32 -3, i32 0, i32 -3, i32 0, i32 12, i32 9, i32 -8, i32 0, i32 0, i32 3, i32 0, i32 3, i32 9, i32 6, i32 0, i32 -8, i32 -3, i32 -6, i32 -8, i32 0, i32 0, i32 3, i32 -3, i32 0, i32 0, i32 -3, i32 -6, i32 3, i32 -3, i32 0, i32 -3, i32 -6, i32 -6, i32 -3, i32 0, i32 3, i32 9, i32 6, i32 -6, i32 3, i32 -3, i32 0, i32 3, i32 6, i32 6, i32 3, i32 0, i32 -8, i32 -8, i32 0, i32 -3, i32 -6, i32 0, i32 3, i32 -3, i32 0, i32 -6, i32 3, i32 0, i32 -3, i32 -3, i32 0, i32 -3, i32 -6, i32 0, i32 3, i32 -6, i32 -3, i32 9, i32 6, i32 -6, i32 3, i32 3, i32 6, i32 -3, i32 0, i32 6, i32 3, i32 -3, i32 0, i32 -6, i32 3, i32 -6, i32 3, i32 3, i32 6, i32 -6, i32 9, i32 -3, i32 6, i32 -3, i32 6, i32 0, i32 3, i32 0, i32 -3, i32 -3, i32 0, i32 -3, i32 0, i32 6, i32 3, i32 -3, i32 6, i32 0, i32 3, i32 0, i32 3, i32 3, i32 0]
@UCHAR_MAX = global i32 0
@M_PI = global i32 0
define double @euler_plus(double* nocapture %0, double* nocapture %1) {
%3 = load i32, i32* @UCHAR_MAX
%4 = icmp slt i32 %3, 0
br i1 %4, label %50, label %5
5: ; preds = %2
%6 = add nuw i32 %3, 1
%7 = zext i32 %6 to i64
%8 = and i64 %7, 1
%9 = icmp eq i32 %3, 0
br i1 %9, label %35, label %10
10: ; preds = %5
%11 = and i64 %7, 4294967294
br label %12
12: ; preds = %12, %10
%13 = phi i64 [ 0, %10 ], [ %32, %12 ]
%14 = phi double [ 0.000000e+00, %10 ], [ %31, %12 ]
%15 = phi double [ 0.000000e+00, %10 ], [ %30, %12 ]
%16 = phi i64 [ 0, %10 ], [ %33, %12 ]
%17 = getelementptr inbounds [256 x i32], [256 x i32]* @__const.euler_plus.iv, i64 0, i64 %13
%18 = load i32, i32* %17
%19 = sitofp i32 %18 to double
%20 = getelementptr inbounds double, double* %0, i64 %13
%21 = load double, double* %20
%22 = tail call double @llvm.fmuladd.f64(double %19, double %21, double %15)
%23 = fadd double %14, %21
%24 = or i64 %13, 1
%25 = getelementptr inbounds [256 x i32], [256 x i32]* @__const.euler_plus.iv, i64 0, i64 %24
%26 = load i32, i32* %25
%27 = sitofp i32 %26 to double
%28 = getelementptr inbounds double, double* %0, i64 %24
%29 = load double, double* %28
%30 = tail call double @llvm.fmuladd.f64(double %27, double %29, double %22)
%31 = fadd double %23, %29
%32 = add nuw nsw i64 %13, 2
%33 = add i64 %16, 2
%34 = icmp eq i64 %33, %11
br i1 %34, label %35, label %12
35: ; preds = %12, %5
%36 = phi double [ undef, %5 ], [ %30, %12 ]
%37 = phi double [ undef, %5 ], [ %31, %12 ]
%38 = phi i64 [ 0, %5 ], [ %32, %12 ]
%39 = phi double [ 0.000000e+00, %5 ], [ %31, %12 ]
%40 = phi double [ 0.000000e+00, %5 ], [ %30, %12 ]
%41 = icmp eq i64 %8, 0
br i1 %41, label %50, label %42
42: ; preds = %35
%43 = getelementptr inbounds [256 x i32], [256 x i32]* @__const.euler_plus.iv, i64 0, i64 %38
%44 = load i32, i32* %43
%45 = sitofp i32 %44 to double
%46 = getelementptr inbounds double, double* %0, i64 %38
%47 = load double, double* %46
%48 = tail call double @llvm.fmuladd.f64(double %45, double %47, double %40)
%49 = fadd double %39, %47
br label %50
50: ; preds = %42, %35, %2
%51 = phi double [ 0.000000e+00, %2 ], [ %36, %35 ], [ %48, %42 ]
%52 = phi double [ 0.000000e+00, %2 ], [ %37, %35 ], [ %49, %42 ]
%53 = load i32, i32* @M_PI
%54 = sdiv i32 %53, 6
%55 = sitofp i32 %54 to double
%56 = fmul double %51, %55
%57 = load double, double* %1
%58 = fmul double %52, %57
%59 = getelementptr inbounds double, double* %1, i64 1
%60 = load double, double* %59
%61 = fmul double %58, %60
%62 = getelementptr inbounds double, double* %1, i64 2
%63 = load double, double* %62
%64 = fmul double %61, %63
%65 = fdiv double %56, %64
ret double %65
}