#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 cos(double);
double pow(double, double);
double sin(double);
double deriv1(double *param, int dimension, int functiontype, double x) {
  int i;
  double first_derivate = 0;
  switch (functiontype) {
  case 1: {
    int len = (dimension - 1);
    double D[len];
    for (i = 0; i <= len; i++) {
      D[i] = param[i + 1] * (i + 1);
    }
    for (i = 0; i <= len; i++) {
      first_derivate += D[i] * (pow(x, i));
    }
    break;
  }
  case 2: {
    double a = param[0];
    double b = param[1];
    double n = param[2];
    first_derivate = (a * (pow(2.7182818284, x)) + b * n * (pow(x, (n - 1))));
    break;
  }
  case 3: {
    double A = param[0];
    double m = param[1];
    double t = param[2];
    double B = param[3];
    double n = param[4];
    double p = param[5];
    first_derivate = A * m * (cos(n * x + p)) - B * n * (sin(m * x + t));
    break;
  }
  }
  return first_derivate;
}


x86 assembly (clang, -O0):
<deriv1>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8c(%rbp)
sub    $0x1,%eax
je     1191 <deriv1+0x61>
jmp    1169 <deriv1+0x39>
mov    -0x8c(%rbp),%eax
sub    $0x2,%eax
je     1286 <deriv1+0x156>
jmp    117d <deriv1+0x4d>
mov    -0x8c(%rbp),%eax
sub    $0x3,%eax
je     1334 <deriv1+0x204>
jmp    1434 <deriv1+0x304>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x38(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x98(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     1215 <deriv1+0xe5>
mov    -0x98(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    -0x1c(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movsd  (%rcx,%rdx,8),%xmm0
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
cvtsi2sd %ecx,%xmm1
mulsd  %xmm1,%xmm0
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11cb <deriv1+0x9b>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     127a <deriv1+0x14a>
mov    -0x98(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
call   1050 <pow@plt>
movaps %xmm0,%xmm2
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    121c <deriv1+0xec>
mov    -0x38(%rbp),%rax
mov    %rax,%rsp
jmp    1434 <deriv1+0x304>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x18(%rbp),%xmm1
movsd  0xd3f(%rip),%xmm0
call   1050 <pow@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  0xd06(%rip),%xmm2
subsd  %xmm2,%xmm1
call   1050 <pow@plt>
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0xb0(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1434 <deriv1+0x304>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sin@plt>
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0xc8(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deriv1>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movapd %xmm0,%xmm1
cmp    $0x3,%edx
je     119f <deriv1+0x6f>
cmp    $0x2,%edx
je     120b <deriv1+0xdb>
xorpd  %xmm2,%xmm2
cmp    $0x1,%edx
jne    146c <deriv1+0x33c>
mov    %rsp,%r14
lea    -0x1(%rsi),%eax
mov    %rsp,%r12
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
xorpd  %xmm2,%xmm2
test   %esi,%esi
jle    1469 <deriv1+0x339>
mov    %esi,%r15d
cmp    $0x4,%esi
movsd  %xmm1,-0x40(%rbp)
jae    1272 <deriv1+0x142>
xor    %eax,%eax
jmp    1310 <deriv1+0x1e0>
movsd  0x8(%rdi),%xmm3
movsd  0x20(%rdi),%xmm2
movsd  (%rdi),%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,-0x38(%rbp)
movapd %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  0x28(%rdi),%xmm0
mulsd  %xmm1,%xmm3
addsd  0x10(%rdi),%xmm3
movsd  %xmm3,-0x30(%rbp)
mulsd  0x18(%rdi),%xmm2
movsd  %xmm2,-0x40(%rbp)
call   1040 <cos@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1030 <sin@plt>
mulsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
jmp    1470 <deriv1+0x340>
movsd  (%rdi),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0x10(%rdi),%xmm2
movsd  %xmm2,-0x50(%rbp)
movsd  0x8(%rdi),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xdcc(%rip),%xmm0
movsd  %xmm1,-0x40(%rbp)
call   1050 <pow@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x50(%rbp),%xmm1
addsd  0xdb8(%rip),%xmm1
movsd  -0x40(%rbp),%xmm0
call   1050 <pow@plt>
mulsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
addsd  %xmm1,%xmm0
jmp    1470 <deriv1+0x340>
mov    %r15d,%eax
and    $0xfffffffc,%eax
xor    %ecx,%ecx
movdqa 0xd8d(%rip),%xmm8
movdqa 0xd94(%rip),%xmm9
movdqa 0xd9c(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movq   %rcx,%xmm3
pshufd $0x44,%xmm3,%xmm4
movdqa %xmm4,%xmm5
por    %xmm8,%xmm5
por    %xmm9,%xmm3
paddq  %xmm1,%xmm4
movq   %xmm5,%rdx
movupd (%rdi,%rdx,8),%xmm6
movupd 0x10(%rdi,%rdx,8),%xmm7
pshufd $0xfa,%xmm5,%xmm5
movd   %edx,%xmm0
movss  %xmm0,%xmm5
pshufd $0xee,%xmm4,%xmm0
punpckldq %xmm0,%xmm3
cvtdq2pd %xmm5,%xmm0
mulpd  %xmm6,%xmm0
cvtdq2pd %xmm3,%xmm3
mulpd  %xmm7,%xmm3
movapd %xmm0,(%r12,%rcx,8)
movapd %xmm3,0x10(%r12,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    12a0 <deriv1+0x170>
cmp    %r15,%rax
je     132f <deriv1+0x1ff>
nopl   (%rax)
lea    0x1(%rax),%rcx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mulsd  0x8(%rdi,%rax,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
mov    %rcx,%rax
cmp    %rcx,%r15
jne    1310 <deriv1+0x1e0>
test   %esi,%esi
jle    1469 <deriv1+0x339>
lea    -0x1(%r15),%rax
mov    %r15d,%r13d
and    $0x3,%r13d
cmp    $0x3,%rax
jae    1353 <deriv1+0x223>
xorpd  %xmm2,%xmm2
xor    %ebx,%ebx
jmp    1429 <deriv1+0x2f9>
and    $0xfffffffc,%r15d
xorpd  %xmm2,%xmm2
xor    %ebx,%ebx
nopl   (%rax)
movsd  %xmm2,-0x38(%rbp)
movsd  (%r12,%rbx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
movsd  -0x40(%rbp),%xmm0
call   1050 <pow@plt>
mulsd  -0x30(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0x8(%r12,%rbx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
lea    0x1(%rbx),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  -0x40(%rbp),%xmm0
call   1050 <pow@plt>
mulsd  -0x30(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0x10(%r12,%rbx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
lea    0x2(%rbx),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  -0x40(%rbp),%xmm0
call   1050 <pow@plt>
mulsd  -0x30(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0x18(%r12,%rbx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
lea    0x3(%rbx),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  -0x40(%rbp),%xmm0
call   1050 <pow@plt>
movapd %xmm0,%xmm2
mulsd  -0x30(%rbp),%xmm2
addsd  -0x38(%rbp),%xmm2
add    $0x4,%rbx
cmp    %r15,%rbx
jne    1360 <deriv1+0x230>
test   %r13,%r13
je     1469 <deriv1+0x339>
xchg   %ax,%ax
movsd  %xmm2,-0x38(%rbp)
movsd  (%r12,%rbx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
movsd  -0x40(%rbp),%xmm0
call   1050 <pow@plt>
movsd  -0x38(%rbp),%xmm2
mulsd  -0x30(%rbp),%xmm0
addsd  %xmm0,%xmm2
add    $0x1,%rbx
add    $0xffffffffffffffff,%r13
jne    1430 <deriv1+0x300>
mov    %r14,%rsp
movapd %xmm2,%xmm0
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double @deriv1(double* %0, i32 %1, i32 %2, double %3) {
%5 = alloca double*
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
%9 = alloca i32
%10 = alloca double
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i64
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
store double* %0, double** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store double %3, double* %8
store double 0.000000e+00, double* %10
%23 = load i32, i32* %7
switch i32 %23, label %133 [
i32 1, label %24
i32 2, label %73
i32 3, label %95
]
24: ; preds = %4
%25 = load i32, i32* %6
%26 = sub nsw i32 %25, 1
store i32 %26, i32* %11
%27 = load i32, i32* %11
%28 = zext i32 %27 to i64
%29 = call i8* @llvm.stacksave()
store i8* %29, i8** %12
%30 = alloca double, i64 %28
store i64 %28, i64* %13
store i32 0, i32* %9
br label %31
31: ; preds = %49, %24
%32 = load i32, i32* %9
%33 = load i32, i32* %11
%34 = icmp sle i32 %32, %33
br i1 %34, label %35, label %52
35: ; preds = %31
%36 = load double*, double** %5
%37 = load i32, i32* %9
%38 = add nsw i32 %37, 1
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %36, i64 %39
%41 = load double, double* %40
%42 = load i32, i32* %9
%43 = add nsw i32 %42, 1
%44 = sitofp i32 %43 to double
%45 = fmul double %41, %44
%46 = load i32, i32* %9
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds double, double* %30, i64 %47
store double %45, double* %48
br label %49
49: ; preds = %35
%50 = load i32, i32* %9
%51 = add nsw i32 %50, 1
store i32 %51, i32* %9
br label %31
52: ; preds = %31
store i32 0, i32* %9
br label %53
53: ; preds = %68, %52
%54 = load i32, i32* %9
%55 = load i32, i32* %11
%56 = icmp sle i32 %54, %55
br i1 %56, label %57, label %71
57: ; preds = %53
%58 = load i32, i32* %9
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds double, double* %30, i64 %59
%61 = load double, double* %60
%62 = load double, double* %8
%63 = load i32, i32* %9
%64 = sitofp i32 %63 to double
%65 = call double @pow(double %62, double %64)
%66 = load double, double* %10
%67 = call double @llvm.fmuladd.f64(double %61, double %65, double %66)
store double %67, double* %10
br label %68
68: ; preds = %57
%69 = load i32, i32* %9
%70 = add nsw i32 %69, 1
store i32 %70, i32* %9
br label %53
71: ; preds = %53
%72 = load i8*, i8** %12
br label %133
73: ; preds = %4
%74 = load double*, double** %5
%75 = getelementptr inbounds double, double* %74, i64 0
%76 = load double, double* %75
store double %76, double* %14
%77 = load double*, double** %5
%78 = getelementptr inbounds double, double* %77, i64 1
%79 = load double, double* %78
store double %79, double* %15
%80 = load double*, double** %5
%81 = getelementptr inbounds double, double* %80, i64 2
%82 = load double, double* %81
store double %82, double* %16
%83 = load double, double* %14
%84 = load double, double* %8
%85 = call double @pow(double 0x4005BF0A8B12500B, double %84)
%86 = load double, double* %15
%87 = load double, double* %16
%88 = fmul double %86, %87
%89 = load double, double* %8
%90 = load double, double* %16
%91 = fsub double %90, 1.000000e+00
%92 = call double @pow(double %89, double %91)
%93 = fmul double %88, %92
%94 = call double @llvm.fmuladd.f64(double %83, double %85, double %93)
store double %94, double* %10
br label %133
95: ; preds = %4
%96 = load double*, double** %5
%97 = getelementptr inbounds double, double* %96, i64 0
%98 = load double, double* %97
store double %98, double* %17
%99 = load double*, double** %5
%100 = getelementptr inbounds double, double* %99, i64 1
%101 = load double, double* %100
store double %101, double* %18
%102 = load double*, double** %5
%103 = getelementptr inbounds double, double* %102, i64 2
%104 = load double, double* %103
store double %104, double* %19
%105 = load double*, double** %5
%106 = getelementptr inbounds double, double* %105, i64 3
%107 = load double, double* %106
store double %107, double* %20
%108 = load double*, double** %5
%109 = getelementptr inbounds double, double* %108, i64 4
%110 = load double, double* %109
store double %110, double* %21
%111 = load double*, double** %5
%112 = getelementptr inbounds double, double* %111, i64 5
%113 = load double, double* %112
store double %113, double* %22
%114 = load double, double* %17
%115 = load double, double* %18
%116 = fmul double %114, %115
%117 = load double, double* %21
%118 = load double, double* %8
%119 = load double, double* %22
%120 = call double @llvm.fmuladd.f64(double %117, double %118, double %119)
%121 = call double @cos(double %120)
%122 = load double, double* %20
%123 = load double, double* %21
%124 = fmul double %122, %123
%125 = load double, double* %18
%126 = load double, double* %8
%127 = load double, double* %19
%128 = call double @llvm.fmuladd.f64(double %125, double %126, double %127)
%129 = call double @sin(double %128)
%130 = fmul double %124, %129
%131 = fneg double %130
%132 = call double @llvm.fmuladd.f64(double %116, double %121, double %131)
store double %132, double* %10
br label %133
133: ; preds = %4, %95, %73, %71
%134 = load double, double* %10
ret double %134
}

LLVM IR (-O2):
define double @deriv1(double* nocapture %0, i32 %1, i32 %2, double %3) {
switch i32 %2, label %151 [
i32 1, label %5
i32 2, label %118
i32 3, label %130
]
5: ; preds = %4
%6 = add nsw i32 %1, -1
%7 = zext i32 %6 to i64
%8 = tail call i8* @llvm.stacksave()
%9 = alloca double, i64 %7
%10 = icmp sgt i32 %1, 0
br i1 %10, label %11, label %116
11: ; preds = %5
%12 = zext i32 %1 to i64
%13 = icmp ult i32 %1, 4
br i1 %13, label %45, label %14
14: ; preds = %11
%15 = and i64 %12, 4294967292
br label %16
16: ; preds = %16, %14
%17 = phi i64 [ 0, %14 ], [ %41, %16 ]
%18 = insertelement <2 x i64> poison, i64 %17, i64 0
%19 = shufflevector <2 x i64> %18, <2 x i64> poison, <2 x i32> zeroinitializer
%20 = or <2 x i64> %19, <i64 1, i64 2>
%21 = or <2 x i64> %19, <i64 3, i64 poison>
%22 = add <2 x i64> %19, <i64 poison, i64 4>
%23 = shufflevector <2 x i64> %21, <2 x i64> %22, <2 x i32> <i32 0, i32 3>
%24 = extractelement <2 x i64> %20, i64 0
%25 = getelementptr inbounds double, double* %0, i64 %24
%26 = bitcast double* %25 to <2 x double>*
%27 = load <2 x double>, <2 x double>* %26
%28 = getelementptr inbounds double, double* %25, i64 2
%29 = bitcast double* %28 to <2 x double>*
%30 = load <2 x double>, <2 x double>* %29
%31 = trunc <2 x i64> %20 to <2 x i32>
%32 = trunc <2 x i64> %23 to <2 x i32>
%33 = sitofp <2 x i32> %31 to <2 x double>
%34 = sitofp <2 x i32> %32 to <2 x double>
%35 = fmul <2 x double> %27, %33
%36 = fmul <2 x double> %30, %34
%37 = getelementptr inbounds double, double* %9, i64 %17
%38 = bitcast double* %37 to <2 x double>*
store <2 x double> %35, <2 x double>* %38
%39 = getelementptr inbounds double, double* %37, i64 2
%40 = bitcast double* %39 to <2 x double>*
store <2 x double> %36, <2 x double>* %40
%41 = add nuw i64 %17, 4
%42 = icmp eq i64 %41, %15
br i1 %42, label %43, label %16
43: ; preds = %16
%44 = icmp eq i64 %15, %12
br i1 %44, label %47, label %45
45: ; preds = %11, %43
%46 = phi i64 [ 0, %11 ], [ %15, %43 ]
br label %54
47: ; preds = %54, %43
br i1 %10, label %48, label %116
48: ; preds = %47
%49 = add nsw i64 %12, -1
%50 = and i64 %12, 3
%51 = icmp ult i64 %49, 3
br i1 %51, label %98, label %52
52: ; preds = %48
%53 = and i64 %12, 4294967292
br label %64
54: ; preds = %45, %54
%55 = phi i64 [ %56, %54 ], [ %46, %45 ]
%56 = add nuw nsw i64 %55, 1
%57 = getelementptr inbounds double, double* %0, i64 %56
%58 = load double, double* %57
%59 = trunc i64 %56 to i32
%60 = sitofp i32 %59 to double
%61 = fmul double %58, %60
%62 = getelementptr inbounds double, double* %9, i64 %55
store double %61, double* %62
%63 = icmp eq i64 %56, %12
br i1 %63, label %47, label %54
64: ; preds = %64, %52
%65 = phi i64 [ 0, %52 ], [ %95, %64 ]
%66 = phi double [ 0.000000e+00, %52 ], [ %94, %64 ]
%67 = phi i64 [ 0, %52 ], [ %96, %64 ]
%68 = getelementptr inbounds double, double* %9, i64 %65
%69 = load double, double* %68
%70 = trunc i64 %65 to i32
%71 = sitofp i32 %70 to double
%72 = tail call double @pow(double %3, double %71)
%73 = tail call double @llvm.fmuladd.f64(double %69, double %72, double %66)
%74 = or i64 %65, 1
%75 = getelementptr inbounds double, double* %9, i64 %74
%76 = load double, double* %75
%77 = trunc i64 %74 to i32
%78 = sitofp i32 %77 to double
%79 = tail call double @pow(double %3, double %78)
%80 = tail call double @llvm.fmuladd.f64(double %76, double %79, double %73)
%81 = or i64 %65, 2
%82 = getelementptr inbounds double, double* %9, i64 %81
%83 = load double, double* %82
%84 = trunc i64 %81 to i32
%85 = sitofp i32 %84 to double
%86 = tail call double @pow(double %3, double %85)
%87 = tail call double @llvm.fmuladd.f64(double %83, double %86, double %80)
%88 = or i64 %65, 3
%89 = getelementptr inbounds double, double* %9, i64 %88
%90 = load double, double* %89
%91 = trunc i64 %88 to i32
%92 = sitofp i32 %91 to double
%93 = tail call double @pow(double %3, double %92)
%94 = tail call double @llvm.fmuladd.f64(double %90, double %93, double %87)
%95 = add nuw nsw i64 %65, 4
%96 = add i64 %67, 4
%97 = icmp eq i64 %96, %53
br i1 %97, label %98, label %64
98: ; preds = %64, %48
%99 = phi double [ undef, %48 ], [ %94, %64 ]
%100 = phi i64 [ 0, %48 ], [ %95, %64 ]
%101 = phi double [ 0.000000e+00, %48 ], [ %94, %64 ]
%102 = icmp eq i64 %50, 0
br i1 %102, label %116, label %103
103: ; preds = %98, %103
%104 = phi i64 [ %113, %103 ], [ %100, %98 ]
%105 = phi double [ %112, %103 ], [ %101, %98 ]
%106 = phi i64 [ %114, %103 ], [ 0, %98 ]
%107 = getelementptr inbounds double, double* %9, i64 %104
%108 = load double, double* %107
%109 = trunc i64 %104 to i32
%110 = sitofp i32 %109 to double
%111 = tail call double @pow(double %3, double %110)
%112 = tail call double @llvm.fmuladd.f64(double %108, double %111, double %105)
%113 = add nuw nsw i64 %104, 1
%114 = add i64 %106, 1
%115 = icmp eq i64 %114, %50
br i1 %115, label %116, label %103
116: ; preds = %98, %103, %5, %47
%117 = phi double [ 0.000000e+00, %47 ], [ 0.000000e+00, %5 ], [ %99, %98 ], [ %112, %103 ]
tail call void @llvm.stackrestore(i8* %8)
br label %151
118: ; preds = %4
%119 = load double, double* %0
%120 = getelementptr inbounds double, double* %0, i64 1
%121 = load double, double* %120
%122 = getelementptr inbounds double, double* %0, i64 2
%123 = load double, double* %122
%124 = tail call double @pow(double 0x4005BF0A8B12500B, double %3)
%125 = fmul double %121, %123
%126 = fadd double %123, -1.000000e+00
%127 = tail call double @pow(double %3, double %126)
%128 = fmul double %125, %127
%129 = tail call double @llvm.fmuladd.f64(double %119, double %124, double %128)
br label %151
130: ; preds = %4
%131 = load double, double* %0
%132 = getelementptr inbounds double, double* %0, i64 1
%133 = load double, double* %132
%134 = getelementptr inbounds double, double* %0, i64 2
%135 = load double, double* %134
%136 = getelementptr inbounds double, double* %0, i64 3
%137 = load double, double* %136
%138 = getelementptr inbounds double, double* %0, i64 4
%139 = load double, double* %138
%140 = getelementptr inbounds double, double* %0, i64 5
%141 = load double, double* %140
%142 = fmul double %131, %133
%143 = tail call double @llvm.fmuladd.f64(double %139, double %3, double %141)
%144 = tail call double @cos(double %143)
%145 = tail call double @llvm.fmuladd.f64(double %133, double %3, double %135)
%146 = tail call double @sin(double %145)
%147 = fneg double %137
%148 = fmul double %139, %147
%149 = fmul double %148, %146
%150 = tail call double @llvm.fmuladd.f64(double %142, double %144, double %149)
br label %151
151: ; preds = %4, %130, %118, %116
%152 = phi double [ 0.000000e+00, %4 ], [ %150, %130 ], [ %129, %118 ], [ %117, %116 ]
ret double %152
}