#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);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
double *frac_to_cartesian(double latt_vec[], double pos_frac[], int p_count,
                          double scale_factor) {
  int a;
  double *p_carte = NULL;
  p_carte = (double *)malloc(3 * p_count * sizeof(double));
  if (p_carte == NULL) {
    printf("\np_count = %i", p_count);
    printf("\nFailed to create p_carte!\n");
    exit(8);
  }
  for (a = 1; a <= p_count; a++) {
    p_carte[3 * a - 3] = scale_factor * ((pos_frac[3 * a - 3] * latt_vec[0]) +
                                         (pos_frac[3 * a - 2] * latt_vec[3]) +
                                         (pos_frac[3 * a - 1] * latt_vec[6]));
    p_carte[3 * a - 2] = scale_factor * ((pos_frac[3 * a - 3] * latt_vec[1]) +
                                         (pos_frac[3 * a - 2] * latt_vec[4]) +
                                         (pos_frac[3 * a - 1] * latt_vec[7]));
    p_carte[3 * a - 1] = scale_factor * ((pos_frac[3 * a - 3] * latt_vec[2]) +
                                         (pos_frac[3 * a - 2] * latt_vec[5]) +
                                         (pos_frac[3 * a - 1] * latt_vec[8]));
  }
  return p_carte;
}


x86 assembly (clang, -O0):
<frac_to_cartesian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
movq   $0x0,-0x30(%rbp)
imul   $0x3,-0x14(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1199 <frac_to_cartesian+0x69>
mov    -0x14(%rbp),%esi
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x8,%edi
call   1050 <exit@plt>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1339 <frac_to_cartesian+0x209>
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
sub    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm3
mov    -0x10(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x18(%rax),%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x10(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
sub    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
sub    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    -0x10(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x10(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
sub    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm3
mov    -0x10(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x28(%rax),%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x10(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11a0 <frac_to_cartesian+0x70>
mov    -0x30(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frac_to_cartesian>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movapd %xmm0,(%rsp)
mov    %edx,%r15d
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x0(,%r15,8),%eax
lea    (%rax,%rax,2),%edi
call   1050 <malloc@plt>
test   %rax,%rax
je     13c8 <frac_to_cartesian+0x288>
test   %r15d,%r15d
movapd (%rsp),%xmm8
jle    13be <frac_to_cartesian+0x27e>
mov    %r15d,%r9d
lea    0x1(%r9),%rcx
mov    $0x1,%r10d
cmp    $0x2,%r15d
jb     12f6 <frac_to_cartesian+0x1b6>
lea    (%rcx,%rcx,2),%rdx
lea    (%rax,%rdx,8),%rsi
add    $0xffffffffffffffe8,%rsi
lea    (%r14,%rdx,8),%rdx
add    $0xffffffffffffffe8,%rdx
lea    0x48(%rbx),%rdi
cmp    %rdx,%rax
setb   %r8b
cmp    %r14,%rsi
seta   %r11b
cmp    %rdi,%rax
setb   %dl
cmp    %rbx,%rsi
seta   %sil
test   %r11b,%r8b
jne    12f6 <frac_to_cartesian+0x1b6>
and    %sil,%dl
jne    12f6 <frac_to_cartesian+0x1b6>
mov    %r9d,%r8d
and    $0xfffffffe,%r8d
mov    %r9,%r10
or     $0x1,%r10
movapd %xmm8,%xmm0
unpcklpd %xmm8,%xmm0
xor    %edi,%edi
mov    %r8,%rsi
nopl   0x0(%rax,%rax,1)
movupd (%r14,%rdi,1),%xmm2
movupd 0x10(%r14,%rdi,1),%xmm3
movupd 0x20(%r14,%rdi,1),%xmm1
movapd %xmm3,%xmm4
movsd  %xmm2,%xmm4
shufpd $0x1,%xmm1,%xmm2
movsd  %xmm3,%xmm1
movsd  (%rbx),%xmm7
movsd  0x8(%rbx),%xmm6
movsd  0x10(%rbx),%xmm3
movsd  0x18(%rbx),%xmm5
unpcklpd %xmm7,%xmm7
unpcklpd %xmm5,%xmm5
mulpd  %xmm2,%xmm5
mulpd  %xmm4,%xmm7
addpd  %xmm5,%xmm7
movsd  0x30(%rbx),%xmm5
unpcklpd %xmm5,%xmm5
mulpd  %xmm1,%xmm5
addpd  %xmm7,%xmm5
mulpd  %xmm0,%xmm5
unpcklpd %xmm6,%xmm6
movsd  0x20(%rbx),%xmm7
unpcklpd %xmm7,%xmm7
mulpd  %xmm2,%xmm7
mulpd  %xmm4,%xmm6
addpd  %xmm7,%xmm6
movsd  0x38(%rbx),%xmm7
unpcklpd %xmm7,%xmm7
mulpd  %xmm1,%xmm7
addpd  %xmm6,%xmm7
mulpd  %xmm0,%xmm7
unpcklpd %xmm3,%xmm3
movsd  0x28(%rbx),%xmm6
unpcklpd %xmm6,%xmm6
mulpd  %xmm2,%xmm6
mulpd  %xmm4,%xmm3
addpd  %xmm6,%xmm3
movsd  0x40(%rbx),%xmm2
unpcklpd %xmm2,%xmm2
mulpd  %xmm1,%xmm2
addpd  %xmm3,%xmm2
mulpd  %xmm0,%xmm2
movapd %xmm5,%xmm1
unpcklpd %xmm7,%xmm1
unpckhpd %xmm2,%xmm7
shufpd $0x2,%xmm5,%xmm2
movupd %xmm2,0x10(%rax,%rdi,1)
movupd %xmm7,0x20(%rax,%rdi,1)
movupd %xmm1,(%rax,%rdi,1)
add    $0x30,%rdi
add    $0xfffffffffffffffe,%rsi
jne    1200 <frac_to_cartesian+0xc0>
cmp    %r8,%r9
je     13be <frac_to_cartesian+0x27e>
lea    (%r10,%r10,2),%rdx
lea    -0x8(,%rdx,8),%rsi
ff
sub    %r10,%rcx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x10(%r14,%rsi,1),%xmm0
movsd  -0x8(%r14,%rsi,1),%xmm1
mulsd  0x18(%rbx),%xmm1
mulsd  (%rbx),%xmm0
movsd  (%r14,%rsi,1),%xmm2
mulsd  0x30(%rbx),%xmm2
addsd  %xmm1,%xmm0
addsd  %xmm0,%xmm2
mulsd  %xmm8,%xmm2
movsd  %xmm2,-0x10(%rax,%rsi,1)
movsd  -0x10(%r14,%rsi,1),%xmm0
movsd  -0x8(%r14,%rsi,1),%xmm1
mulsd  0x20(%rbx),%xmm1
mulsd  0x8(%rbx),%xmm0
addsd  %xmm1,%xmm0
movsd  (%r14,%rsi,1),%xmm1
mulsd  0x38(%rbx),%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm8,%xmm1
movsd  %xmm1,-0x8(%rax,%rsi,1)
movsd  -0x8(%r14,%rsi,1),%xmm0
mulsd  0x28(%rbx),%xmm0
movsd  -0x10(%r14,%rsi,1),%xmm1
mulsd  0x10(%rbx),%xmm1
addsd  %xmm0,%xmm1
movsd  (%r14,%rsi,1),%xmm0
mulsd  0x40(%rbx),%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm8,%xmm0
movsd  %xmm0,(%rax,%rsi,1)
add    $0x18,%rsi
add    $0xffffffffffffffff,%rcx
jne    1310 <frac_to_cartesian+0x1d0>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xc31(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc2e(%rip),%rdi
call   1030 <puts@plt>
mov    $0x8,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"\0Ap_count = %i\00"
@.str.1 = [28 x i8] c"\0AFailed to create p_carte!\0A\00"
define double* @frac_to_cartesian(double* %0, double* %1, i32 %2, double %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca double
%9 = alloca i32
%10 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store i32 %2, i32* %7
store double %3, double* %8
store double* null, double** %10
%11 = load i32, i32* %7
%12 = mul nsw i32 3, %11
%13 = sext i32 %12 to i64
%14 = mul i64 %13, 8
%15 = trunc i64 %14 to i32
%16 = call i64 @malloc(i32 %15)
%17 = inttoptr i64 %16 to double*
store double* %17, double** %10
%18 = load double*, double** %10
%19 = icmp eq double* %18, null
br i1 %19, label %20, label %25
20: ; preds = %4
%21 = load i32, i32* %7
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%24 = call i32 @exit(i32 8)
unreachable
25: ; preds = %4
store i32 1, i32* %9
br label %26
26: ; preds = %154, %25
%27 = load i32, i32* %9
%28 = load i32, i32* %7
%29 = icmp sle i32 %27, %28
br i1 %29, label %30, label %157
30: ; preds = %26
%31 = load double, double* %8
%32 = load double*, double** %6
%33 = load i32, i32* %9
%34 = mul nsw i32 3, %33
%35 = sub nsw i32 %34, 3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double, double* %32, i64 %36
%38 = load double, double* %37
%39 = load double*, double** %5
%40 = getelementptr inbounds double, double* %39, i64 0
%41 = load double, double* %40
%42 = load double*, double** %6
%43 = load i32, i32* %9
%44 = mul nsw i32 3, %43
%45 = sub nsw i32 %44, 2
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds double, double* %42, i64 %46
%48 = load double, double* %47
%49 = load double*, double** %5
%50 = getelementptr inbounds double, double* %49, i64 3
%51 = load double, double* %50
%52 = fmul double %48, %51
%53 = call double @llvm.fmuladd.f64(double %38, double %41, double %52)
%54 = load double*, double** %6
%55 = load i32, i32* %9
%56 = mul nsw i32 3, %55
%57 = sub nsw i32 %56, 1
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds double, double* %54, i64 %58
%60 = load double, double* %59
%61 = load double*, double** %5
%62 = getelementptr inbounds double, double* %61, i64 6
%63 = load double, double* %62
%64 = call double @llvm.fmuladd.f64(double %60, double %63, double %53)
%65 = fmul double %31, %64
%66 = load double*, double** %10
%67 = load i32, i32* %9
%68 = mul nsw i32 3, %67
%69 = sub nsw i32 %68, 3
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %66, i64 %70
store double %65, double* %71
%72 = load double, double* %8
%73 = load double*, double** %6
%74 = load i32, i32* %9
%75 = mul nsw i32 3, %74
%76 = sub nsw i32 %75, 3
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %73, i64 %77
%79 = load double, double* %78
%80 = load double*, double** %5
%81 = getelementptr inbounds double, double* %80, i64 1
%82 = load double, double* %81
%83 = load double*, double** %6
%84 = load i32, i32* %9
%85 = mul nsw i32 3, %84
%86 = sub nsw i32 %85, 2
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds double, double* %83, i64 %87
%89 = load double, double* %88
%90 = load double*, double** %5
%91 = getelementptr inbounds double, double* %90, i64 4
%92 = load double, double* %91
%93 = fmul double %89, %92
%94 = call double @llvm.fmuladd.f64(double %79, double %82, double %93)
%95 = load double*, double** %6
%96 = load i32, i32* %9
%97 = mul nsw i32 3, %96
%98 = sub nsw i32 %97, 1
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds double, double* %95, i64 %99
%101 = load double, double* %100
%102 = load double*, double** %5
%103 = getelementptr inbounds double, double* %102, i64 7
%104 = load double, double* %103
%105 = call double @llvm.fmuladd.f64(double %101, double %104, double %94)
%106 = fmul double %72, %105
%107 = load double*, double** %10
%108 = load i32, i32* %9
%109 = mul nsw i32 3, %108
%110 = sub nsw i32 %109, 2
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %107, i64 %111
store double %106, double* %112
%113 = load double, double* %8
%114 = load double*, double** %6
%115 = load i32, i32* %9
%116 = mul nsw i32 3, %115
%117 = sub nsw i32 %116, 3
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %114, i64 %118
%120 = load double, double* %119
%121 = load double*, double** %5
%122 = getelementptr inbounds double, double* %121, i64 2
%123 = load double, double* %122
%124 = load double*, double** %6
%125 = load i32, i32* %9
%126 = mul nsw i32 3, %125
%127 = sub nsw i32 %126, 2
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds double, double* %124, i64 %128
%130 = load double, double* %129
%131 = load double*, double** %5
%132 = getelementptr inbounds double, double* %131, i64 5
%133 = load double, double* %132
%134 = fmul double %130, %133
%135 = call double @llvm.fmuladd.f64(double %120, double %123, double %134)
%136 = load double*, double** %6
%137 = load i32, i32* %9
%138 = mul nsw i32 3, %137
%139 = sub nsw i32 %138, 1
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds double, double* %136, i64 %140
%142 = load double, double* %141
%143 = load double*, double** %5
%144 = getelementptr inbounds double, double* %143, i64 8
%145 = load double, double* %144
%146 = call double @llvm.fmuladd.f64(double %142, double %145, double %135)
%147 = fmul double %113, %146
%148 = load double*, double** %10
%149 = load i32, i32* %9
%150 = mul nsw i32 3, %149
%151 = sub nsw i32 %150, 1
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds double, double* %148, i64 %152
store double %147, double* %153
br label %154
154: ; preds = %30
%155 = load i32, i32* %9
%156 = add nsw i32 %155, 1
store i32 %156, i32* %9
br label %26
157: ; preds = %26
%158 = load double*, double** %10
ret double* %158
}

LLVM IR (-O2):
@.str = [14 x i8] c"\0Ap_count = %i\00"
@str = [27 x i8] c"\0AFailed to create p_carte!\00"
define double* @frac_to_cartesian(double* nocapture %0, double* nocapture %1, i32 %2, double %3) {
%5 = mul i32 %2, 24
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to double*
%8 = inttoptr i64 %6 to i8*
%9 = icmp eq i64 %6, 0
br i1 %9, label %118, label %10
10: ; preds = %4
%11 = icmp slt i32 %2, 1
br i1 %11, label %166, label %12
12: ; preds = %10
%13 = getelementptr inbounds double, double* %0, i64 3
%14 = getelementptr inbounds double, double* %0, i64 6
%15 = getelementptr inbounds double, double* %0, i64 1
%16 = getelementptr inbounds double, double* %0, i64 4
%17 = getelementptr inbounds double, double* %0, i64 7
%18 = getelementptr inbounds double, double* %0, i64 2
%19 = getelementptr inbounds double, double* %0, i64 5
%20 = getelementptr inbounds double, double* %0, i64 8
%21 = add nuw i32 %2, 1
%22 = zext i32 %21 to i64
%23 = add nsw i64 %22, -1
%24 = icmp ult i64 %23, 2
br i1 %24, label %116, label %25
25: ; preds = %12
%26 = mul nuw nsw i64 %22, 3
%27 = add nsw i64 %26, -3
%28 = getelementptr double, double* %7, i64 %27
%29 = getelementptr double, double* %1, i64 %27
%30 = bitcast double* %29 to i8*
%31 = getelementptr double, double* %0, i64 9
%32 = bitcast double* %31 to i8*
%33 = icmp ult i8* %8, %30
%34 = icmp ugt double* %28, %1
%35 = and i1 %33, %34
%36 = icmp ult i8* %8, %32
%37 = icmp ugt double* %28, %0
%38 = and i1 %36, %37
%39 = or i1 %35, %38
br i1 %39, label %116, label %40
40: ; preds = %25
%41 = and i64 %23, -2
%42 = or i64 %23, 1
%43 = insertelement <2 x double> poison, double %3, i64 0
%44 = shufflevector <2 x double> %43, <2 x double> poison, <2 x i32> zeroinitializer
%45 = getelementptr inbounds double, double* %7, i64 -2
br label %46
46: ; preds = %46, %40
%47 = phi i64 [ 0, %40 ], [ %112, %46 ]
%48 = or i64 %47, 1
%49 = mul nuw nsw i64 %48, 3
%50 = add nsw i64 %49, -3
%51 = getelementptr inbounds double, double* %1, i64 %50
%52 = bitcast double* %51 to <6 x double>*
%53 = load <6 x double>, <6 x double>* %52
%54 = shufflevector <6 x double> %53, <6 x double> poison, <2 x i32> <i32 0, i32 3>
%55 = shufflevector <6 x double> %53, <6 x double> poison, <2 x i32> <i32 1, i32 4>
%56 = shufflevector <6 x double> %53, <6 x double> poison, <2 x i32> <i32 2, i32 5>
%57 = load double, double* %0
%58 = insertelement <2 x double> poison, double %57, i64 0
%59 = shufflevector <2 x double> %58, <2 x double> poison, <2 x i32> zeroinitializer
%60 = load double, double* %13
%61 = insertelement <2 x double> poison, double %60, i64 0
%62 = shufflevector <2 x double> %61, <2 x double> poison, <2 x i32> zeroinitializer
%63 = fmul <2 x double> %55, %62
%64 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %54, <2 x double> %59, <2 x double> %63)
%65 = add nsw i64 %49, -1
%66 = load double, double* %14
%67 = insertelement <2 x double> poison, double %66, i64 0
%68 = shufflevector <2 x double> %67, <2 x double> poison, <2 x i32> zeroinitializer
%69 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %56, <2 x double> %68, <2 x double> %64)
%70 = fmul <2 x double> %69, %44
%71 = bitcast double* %51 to <6 x double>*
%72 = load <6 x double>, <6 x double>* %71
%73 = shufflevector <6 x double> %72, <6 x double> poison, <2 x i32> <i32 0, i32 3>
%74 = shufflevector <6 x double> %72, <6 x double> poison, <2 x i32> <i32 1, i32 4>
%75 = shufflevector <6 x double> %72, <6 x double> poison, <2 x i32> <i32 2, i32 5>
%76 = load double, double* %15
%77 = insertelement <2 x double> poison, double %76, i64 0
%78 = shufflevector <2 x double> %77, <2 x double> poison, <2 x i32> zeroinitializer
%79 = load double, double* %16
%80 = insertelement <2 x double> poison, double %79, i64 0
%81 = shufflevector <2 x double> %80, <2 x double> poison, <2 x i32> zeroinitializer
%82 = fmul <2 x double> %74, %81
%83 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %73, <2 x double> %78, <2 x double> %82)
%84 = load double, double* %17
%85 = insertelement <2 x double> poison, double %84, i64 0
%86 = shufflevector <2 x double> %85, <2 x double> poison, <2 x i32> zeroinitializer
%87 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %75, <2 x double> %86, <2 x double> %83)
%88 = fmul <2 x double> %87, %44
%89 = bitcast double* %51 to <6 x double>*
%90 = load <6 x double>, <6 x double>* %89
%91 = shufflevector <6 x double> %90, <6 x double> poison, <2 x i32> <i32 0, i32 3>
%92 = shufflevector <6 x double> %90, <6 x double> poison, <2 x i32> <i32 1, i32 4>
%93 = shufflevector <6 x double> %90, <6 x double> poison, <2 x i32> <i32 2, i32 5>
%94 = load double, double* %18
%95 = insertelement <2 x double> poison, double %94, i64 0
%96 = shufflevector <2 x double> %95, <2 x double> poison, <2 x i32> zeroinitializer
%97 = load double, double* %19
%98 = insertelement <2 x double> poison, double %97, i64 0
%99 = shufflevector <2 x double> %98, <2 x double> poison, <2 x i32> zeroinitializer
%100 = fmul <2 x double> %92, %99
%101 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %91, <2 x double> %96, <2 x double> %100)
%102 = load double, double* %20
%103 = insertelement <2 x double> poison, double %102, i64 0
%104 = shufflevector <2 x double> %103, <2 x double> poison, <2 x i32> zeroinitializer
%105 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %93, <2 x double> %104, <2 x double> %101)
%106 = fmul <2 x double> %105, %44
%107 = getelementptr inbounds double, double* %45, i64 %65
%108 = bitcast double* %107 to <6 x double>*
%109 = shufflevector <2 x double> %70, <2 x double> %88, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
%110 = shufflevector <2 x double> %106, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%111 = shufflevector <4 x double> %109, <4 x double> %110, <6 x i32> <i32 0, i32 2, i32 4, i32 1, i32 3, i32 5>
store <6 x double> %111, <6 x double>* %108
%112 = add nuw i64 %47, 2
%113 = icmp eq i64 %112, %41
br i1 %113, label %114, label %46
114: ; preds = %46
%115 = icmp eq i64 %23, %41
br i1 %115, label %166, label %116
116: ; preds = %25, %12, %114
%117 = phi i64 [ 1, %25 ], [ 1, %12 ], [ %42, %114 ]
br label %122
118: ; preds = %4
%119 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %2)
%120 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%121 = tail call i32 @exit(i32 8)
unreachable
122: ; preds = %116, %122
%123 = phi i64 [ %164, %122 ], [ %117, %116 ]
%124 = mul nuw nsw i64 %123, 3
%125 = add nsw i64 %124, -3
%126 = getelementptr inbounds double, double* %1, i64 %125
%127 = load double, double* %126
%128 = load double, double* %0
%129 = add nsw i64 %124, -2
%130 = getelementptr inbounds double, double* %1, i64 %129
%131 = load double, double* %130
%132 = load double, double* %13
%133 = fmul double %131, %132
%134 = tail call double @llvm.fmuladd.f64(double %127, double %128, double %133)
%135 = add nsw i64 %124, -1
%136 = getelementptr inbounds double, double* %1, i64 %135
%137 = load double, double* %136
%138 = load double, double* %14
%139 = tail call double @llvm.fmuladd.f64(double %137, double %138, double %134)
%140 = fmul double %139, %3
%141 = getelementptr inbounds double, double* %7, i64 %125
store double %140, double* %141
%142 = load double, double* %126
%143 = load double, double* %15
%144 = load double, double* %130
%145 = load double, double* %16
%146 = fmul double %144, %145
%147 = tail call double @llvm.fmuladd.f64(double %142, double %143, double %146)
%148 = load double, double* %136
%149 = load double, double* %17
%150 = tail call double @llvm.fmuladd.f64(double %148, double %149, double %147)
%151 = fmul double %150, %3
%152 = getelementptr inbounds double, double* %7, i64 %129
store double %151, double* %152
%153 = load double, double* %126
%154 = load double, double* %18
%155 = load double, double* %130
%156 = load double, double* %19
%157 = fmul double %155, %156
%158 = tail call double @llvm.fmuladd.f64(double %153, double %154, double %157)
%159 = load double, double* %136
%160 = load double, double* %20
%161 = tail call double @llvm.fmuladd.f64(double %159, double %160, double %158)
%162 = fmul double %161, %3
%163 = getelementptr inbounds double, double* %7, i64 %135
store double %162, double* %163
%164 = add nuw nsw i64 %123, 1
%165 = icmp eq i64 %164, %22
br i1 %165, label %166, label %122
166: ; preds = %122, %114, %10
ret double* %7
}