; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (r8lib)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: nounwind
declare double @cos(double noundef) #2

; Function Attrs: nounwind
declare double @sqrt(double noundef) #2

; Function Attrs: nounwind
declare double @log(double noundef) #2

; Function Attrs: nounwind
declare double @sin(double noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @r8vec_uniform_01_new(i32 noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @r8vec_normal_ab(i32 noundef %0, double noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4) #3 {
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store i32 %0, ptr %6, align 4, !tbaa !5
  store double %1, ptr %7, align 8, !tbaa !9
  store double %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !11
  store ptr %4, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store double 0x400921FB54442D18, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 1, ptr %16, align 4, !tbaa !5
  %17 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %17, ptr %15, align 4, !tbaa !5
  %18 = load i32, ptr %15, align 4, !tbaa !5
  %19 = load i32, ptr %16, align 4, !tbaa !5
  %20 = sub nsw i32 %18, %19
  %21 = add nsw i32 %20, 1
  %22 = icmp eq i32 %21, 1
  br i1 %22, label %23, label %44

23:                                               ; preds = %5
  %24 = load ptr, ptr %9, align 8, !tbaa !11
  %25 = call ptr @r8vec_uniform_01_new(i32 noundef 2, ptr noundef %24)
  store ptr %25, ptr %13, align 8, !tbaa !11
  %26 = load ptr, ptr %13, align 8, !tbaa !11
  %27 = getelementptr inbounds double, ptr %26, i64 0
  %28 = load double, ptr %27, align 8, !tbaa !9
  %29 = call double @log(double noundef %28) #4
  %30 = fmul double -2.000000e+00, %29
  %31 = call double @sqrt(double noundef %30) #4
  %32 = load ptr, ptr %13, align 8, !tbaa !11
  %33 = getelementptr inbounds double, ptr %32, i64 1
  %34 = load double, ptr %33, align 8, !tbaa !9
  %35 = fmul double 0x401921FB54442D18, %34
  %36 = call double @cos(double noundef %35) #4
  %37 = fmul double %31, %36
  %38 = load ptr, ptr %10, align 8, !tbaa !11
  %39 = load i32, ptr %15, align 4, !tbaa !5
  %40 = sub nsw i32 %39, 1
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds double, ptr %38, i64 %41
  store double %37, ptr %42, align 8, !tbaa !9
  %43 = load ptr, ptr %13, align 8, !tbaa !11
  call void @free(ptr noundef %43) #4
  br label %220

44:                                               ; preds = %5
  %45 = load i32, ptr %15, align 4, !tbaa !5
  %46 = load i32, ptr %16, align 4, !tbaa !5
  %47 = sub nsw i32 %45, %46
  %48 = add nsw i32 %47, 1
  %49 = srem i32 %48, 2
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %120

51:                                               ; preds = %44
  %52 = load i32, ptr %15, align 4, !tbaa !5
  %53 = load i32, ptr %16, align 4, !tbaa !5
  %54 = sub nsw i32 %52, %53
  %55 = add nsw i32 %54, 1
  %56 = sdiv i32 %55, 2
  store i32 %56, ptr %12, align 4, !tbaa !5
  %57 = load i32, ptr %12, align 4, !tbaa !5
  %58 = mul nsw i32 2, %57
  %59 = load ptr, ptr %9, align 8, !tbaa !11
  %60 = call ptr @r8vec_uniform_01_new(i32 noundef %58, ptr noundef %59)
  store ptr %60, ptr %13, align 8, !tbaa !11
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %115, %51
  %62 = load i32, ptr %11, align 4, !tbaa !5
  %63 = load i32, ptr %12, align 4, !tbaa !5
  %64 = mul nsw i32 2, %63
  %65 = sub nsw i32 %64, 2
  %66 = icmp sle i32 %62, %65
  br i1 %66, label %67, label %118

67:                                               ; preds = %61
  %68 = load ptr, ptr %13, align 8, !tbaa !11
  %69 = load i32, ptr %11, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds double, ptr %68, i64 %70
  %72 = load double, ptr %71, align 8, !tbaa !9
  %73 = call double @log(double noundef %72) #4
  %74 = fmul double -2.000000e+00, %73
  %75 = call double @sqrt(double noundef %74) #4
  %76 = load ptr, ptr %13, align 8, !tbaa !11
  %77 = load i32, ptr %11, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds double, ptr %76, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !9
  %82 = fmul double 0x401921FB54442D18, %81
  %83 = call double @cos(double noundef %82) #4
  %84 = fmul double %75, %83
  %85 = load ptr, ptr %10, align 8, !tbaa !11
  %86 = load i32, ptr %16, align 4, !tbaa !5
  %87 = load i32, ptr %11, align 4, !tbaa !5
  %88 = add nsw i32 %86, %87
  %89 = sub nsw i32 %88, 1
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds double, ptr %85, i64 %90
  store double %84, ptr %91, align 8, !tbaa !9
  %92 = load ptr, ptr %13, align 8, !tbaa !11
  %93 = load i32, ptr %11, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds double, ptr %92, i64 %94
  %96 = load double, ptr %95, align 8, !tbaa !9
  %97 = call double @log(double noundef %96) #4
  %98 = fmul double -2.000000e+00, %97
  %99 = call double @sqrt(double noundef %98) #4
  %100 = load ptr, ptr %13, align 8, !tbaa !11
  %101 = load i32, ptr %11, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds double, ptr %100, i64 %103
  %105 = load double, ptr %104, align 8, !tbaa !9
  %106 = fmul double 0x401921FB54442D18, %105
  %107 = call double @sin(double noundef %106) #4
  %108 = fmul double %99, %107
  %109 = load ptr, ptr %10, align 8, !tbaa !11
  %110 = load i32, ptr %16, align 4, !tbaa !5
  %111 = load i32, ptr %11, align 4, !tbaa !5
  %112 = add nsw i32 %110, %111
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds double, ptr %109, i64 %113
  store double %108, ptr %114, align 8, !tbaa !9
  br label %115

115:                                              ; preds = %67
  %116 = load i32, ptr %11, align 4, !tbaa !5
  %117 = add nsw i32 %116, 2
  store i32 %117, ptr %11, align 4, !tbaa !5
  br label %61, !llvm.loop !13

118:                                              ; preds = %61
  %119 = load ptr, ptr %13, align 8, !tbaa !11
  call void @free(ptr noundef %119) #4
  br label %219

120:                                              ; preds = %44
  %121 = load i32, ptr %15, align 4, !tbaa !5
  %122 = sub nsw i32 %121, 1
  store i32 %122, ptr %15, align 4, !tbaa !5
  %123 = load i32, ptr %15, align 4, !tbaa !5
  %124 = load i32, ptr %16, align 4, !tbaa !5
  %125 = sub nsw i32 %123, %124
  %126 = add nsw i32 %125, 1
  %127 = sdiv i32 %126, 2
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %12, align 4, !tbaa !5
  %129 = load i32, ptr %12, align 4, !tbaa !5
  %130 = mul nsw i32 2, %129
  %131 = load ptr, ptr %9, align 8, !tbaa !11
  %132 = call ptr @r8vec_uniform_01_new(i32 noundef %130, ptr noundef %131)
  store ptr %132, ptr %13, align 8, !tbaa !11
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %187, %120
  %134 = load i32, ptr %11, align 4, !tbaa !5
  %135 = load i32, ptr %12, align 4, !tbaa !5
  %136 = mul nsw i32 2, %135
  %137 = sub nsw i32 %136, 4
  %138 = icmp sle i32 %134, %137
  br i1 %138, label %139, label %190

139:                                              ; preds = %133
  %140 = load ptr, ptr %13, align 8, !tbaa !11
  %141 = load i32, ptr %11, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds double, ptr %140, i64 %142
  %144 = load double, ptr %143, align 8, !tbaa !9
  %145 = call double @log(double noundef %144) #4
  %146 = fmul double -2.000000e+00, %145
  %147 = call double @sqrt(double noundef %146) #4
  %148 = load ptr, ptr %13, align 8, !tbaa !11
  %149 = load i32, ptr %11, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds double, ptr %148, i64 %151
  %153 = load double, ptr %152, align 8, !tbaa !9
  %154 = fmul double 0x401921FB54442D18, %153
  %155 = call double @cos(double noundef %154) #4
  %156 = fmul double %147, %155
  %157 = load ptr, ptr %10, align 8, !tbaa !11
  %158 = load i32, ptr %16, align 4, !tbaa !5
  %159 = load i32, ptr %11, align 4, !tbaa !5
  %160 = add nsw i32 %158, %159
  %161 = sub nsw i32 %160, 1
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds double, ptr %157, i64 %162
  store double %156, ptr %163, align 8, !tbaa !9
  %164 = load ptr, ptr %13, align 8, !tbaa !11
  %165 = load i32, ptr %11, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds double, ptr %164, i64 %166
  %168 = load double, ptr %167, align 8, !tbaa !9
  %169 = call double @log(double noundef %168) #4
  %170 = fmul double -2.000000e+00, %169
  %171 = call double @sqrt(double noundef %170) #4
  %172 = load ptr, ptr %13, align 8, !tbaa !11
  %173 = load i32, ptr %11, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds double, ptr %172, i64 %175
  %177 = load double, ptr %176, align 8, !tbaa !9
  %178 = fmul double 0x401921FB54442D18, %177
  %179 = call double @sin(double noundef %178) #4
  %180 = fmul double %171, %179
  %181 = load ptr, ptr %10, align 8, !tbaa !11
  %182 = load i32, ptr %16, align 4, !tbaa !5
  %183 = load i32, ptr %11, align 4, !tbaa !5
  %184 = add nsw i32 %182, %183
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds double, ptr %181, i64 %185
  store double %180, ptr %186, align 8, !tbaa !9
  br label %187

187:                                              ; preds = %139
  %188 = load i32, ptr %11, align 4, !tbaa !5
  %189 = add nsw i32 %188, 2
  store i32 %189, ptr %11, align 4, !tbaa !5
  br label %133, !llvm.loop !15

190:                                              ; preds = %133
  %191 = load i32, ptr %12, align 4, !tbaa !5
  %192 = mul nsw i32 2, %191
  %193 = sub nsw i32 %192, 2
  store i32 %193, ptr %11, align 4, !tbaa !5
  %194 = load ptr, ptr %13, align 8, !tbaa !11
  %195 = load i32, ptr %11, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds double, ptr %194, i64 %196
  %198 = load double, ptr %197, align 8, !tbaa !9
  %199 = call double @log(double noundef %198) #4
  %200 = fmul double -2.000000e+00, %199
  %201 = call double @sqrt(double noundef %200) #4
  %202 = load ptr, ptr %13, align 8, !tbaa !11
  %203 = load i32, ptr %11, align 4, !tbaa !5
  %204 = add nsw i32 %203, 1
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds double, ptr %202, i64 %205
  %207 = load double, ptr %206, align 8, !tbaa !9
  %208 = fmul double 0x401921FB54442D18, %207
  %209 = call double @cos(double noundef %208) #4
  %210 = fmul double %201, %209
  %211 = load ptr, ptr %10, align 8, !tbaa !11
  %212 = load i32, ptr %16, align 4, !tbaa !5
  %213 = load i32, ptr %11, align 4, !tbaa !5
  %214 = add nsw i32 %212, %213
  %215 = sub nsw i32 %214, 1
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds double, ptr %211, i64 %216
  store double %210, ptr %217, align 8, !tbaa !9
  %218 = load ptr, ptr %13, align 8, !tbaa !11
  call void @free(ptr noundef %218) #4
  br label %219

219:                                              ; preds = %190, %118
  br label %220

220:                                              ; preds = %219, %23
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %221

221:                                              ; preds = %238, %220
  %222 = load i32, ptr %11, align 4, !tbaa !5
  %223 = load i32, ptr %6, align 4, !tbaa !5
  %224 = icmp slt i32 %222, %223
  br i1 %224, label %225, label %241

225:                                              ; preds = %221
  %226 = load double, ptr %7, align 8, !tbaa !9
  %227 = load double, ptr %8, align 8, !tbaa !9
  %228 = load ptr, ptr %10, align 8, !tbaa !11
  %229 = load i32, ptr %11, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds double, ptr %228, i64 %230
  %232 = load double, ptr %231, align 8, !tbaa !9
  %233 = call double @llvm.fmuladd.f64(double %227, double %232, double %226)
  %234 = load ptr, ptr %10, align 8, !tbaa !11
  %235 = load i32, ptr %11, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds double, ptr %234, i64 %236
  store double %233, ptr %237, align 8, !tbaa !9
  br label %238

238:                                              ; preds = %225
  %239 = load i32, ptr %11, align 4, !tbaa !5
  %240 = add nsw i32 %239, 1
  store i32 %240, ptr %11, align 4, !tbaa !5
  br label %221, !llvm.loop !16

241:                                              ; preds = %221
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @log(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @r8vec_uniform_01_new(i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @r8vec_normal_ab(i32 noundef %0, double noundef %1, double noundef %2, ptr noundef %3, ptr nocapture noundef %4) local_unnamed_addr #3 {
  %6 = icmp eq i32 %0, 1
  br i1 %6, label %.thread, label %17

.thread:                                          ; preds = %5
  %7 = tail call ptr @r8vec_uniform_01_new(i32 noundef 2, ptr noundef %3)
  %8 = load double, ptr %7, align 8, !tbaa !5
  %9 = tail call double @log(double noundef %8) #5
  %10 = fmul double %9, -2.000000e+00
  %11 = tail call double @sqrt(double noundef %10) #5
  %12 = getelementptr inbounds i8, ptr %7, i64 8
  %13 = load double, ptr %12, align 8, !tbaa !5
  %14 = fmul double %13, 0x401921FB54442D18
  %15 = tail call double @cos(double noundef %14) #5
  %16 = fmul double %11, %15
  store double %16, ptr %4, align 8, !tbaa !5
  tail call void @free(ptr noundef %7) #5
  br label %.lr.ph83.preheader

17:                                               ; preds = %5
  %18 = and i32 %0, 1
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %45

20:                                               ; preds = %17
  %21 = tail call ptr @r8vec_uniform_01_new(i32 noundef %0, ptr noundef %3)
  %.not7376 = icmp slt i32 %0, 2
  br i1 %.not7376, label %._crit_edge80, label %.lr.ph79.preheader

.lr.ph79.preheader:                               ; preds = %20
  %22 = add nsw i32 %0, -2
  %23 = zext nneg i32 %22 to i64
  br label %.lr.ph79

.lr.ph79:                                         ; preds = %.lr.ph79.preheader, %.lr.ph79
  %indvars.iv86 = phi i64 [ 0, %.lr.ph79.preheader ], [ %indvars.iv.next87, %.lr.ph79 ]
  %24 = getelementptr inbounds double, ptr %21, i64 %indvars.iv86
  %25 = load double, ptr %24, align 8, !tbaa !5
  %26 = tail call double @log(double noundef %25) #5
  %27 = fmul double %26, -2.000000e+00
  %28 = tail call double @sqrt(double noundef %27) #5
  %29 = or disjoint i64 %indvars.iv86, 1
  %30 = getelementptr inbounds double, ptr %21, i64 %29
  %31 = load double, ptr %30, align 8, !tbaa !5
  %32 = fmul double %31, 0x401921FB54442D18
  %33 = tail call double @cos(double noundef %32) #5
  %34 = fmul double %28, %33
  %35 = getelementptr inbounds double, ptr %4, i64 %indvars.iv86
  store double %34, ptr %35, align 8, !tbaa !5
  %36 = load double, ptr %24, align 8, !tbaa !5
  %37 = tail call double @log(double noundef %36) #5
  %38 = fmul double %37, -2.000000e+00
  %39 = tail call double @sqrt(double noundef %38) #5
  %40 = load double, ptr %30, align 8, !tbaa !5
  %41 = fmul double %40, 0x401921FB54442D18
  %42 = tail call double @sin(double noundef %41) #5
  %43 = fmul double %39, %42
  %44 = getelementptr inbounds double, ptr %4, i64 %29
  store double %43, ptr %44, align 8, !tbaa !5
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 2
  %.not73 = icmp ugt i64 %indvars.iv.next87, %23
  br i1 %.not73, label %._crit_edge80, label %.lr.ph79, !llvm.loop !9

45:                                               ; preds = %17
  %46 = add i32 %0, 1
  %47 = tail call ptr @r8vec_uniform_01_new(i32 noundef %46, ptr noundef %3)
  %48 = add i32 %0, -3
  %.not74 = icmp slt i32 %48, 0
  br i1 %.not74, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %45
  %49 = zext nneg i32 %48 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %50 = getelementptr inbounds double, ptr %47, i64 %indvars.iv
  %51 = load double, ptr %50, align 8, !tbaa !5
  %52 = tail call double @log(double noundef %51) #5
  %53 = fmul double %52, -2.000000e+00
  %54 = tail call double @sqrt(double noundef %53) #5
  %55 = or disjoint i64 %indvars.iv, 1
  %56 = getelementptr inbounds double, ptr %47, i64 %55
  %57 = load double, ptr %56, align 8, !tbaa !5
  %58 = fmul double %57, 0x401921FB54442D18
  %59 = tail call double @cos(double noundef %58) #5
  %60 = fmul double %54, %59
  %61 = getelementptr inbounds double, ptr %4, i64 %indvars.iv
  store double %60, ptr %61, align 8, !tbaa !5
  %62 = load double, ptr %50, align 8, !tbaa !5
  %63 = tail call double @log(double noundef %62) #5
  %64 = fmul double %63, -2.000000e+00
  %65 = tail call double @sqrt(double noundef %64) #5
  %66 = load double, ptr %56, align 8, !tbaa !5
  %67 = fmul double %66, 0x401921FB54442D18
  %68 = tail call double @sin(double noundef %67) #5
  %69 = fmul double %65, %68
  %70 = getelementptr inbounds double, ptr %4, i64 %55
  store double %69, ptr %70, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2
  %.not = icmp ugt i64 %indvars.iv.next, %49
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph, %45
  %71 = add nsw i32 %0, -1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds double, ptr %47, i64 %72
  %74 = load double, ptr %73, align 8, !tbaa !5
  %75 = tail call double @log(double noundef %74) #5
  %76 = fmul double %75, -2.000000e+00
  %77 = tail call double @sqrt(double noundef %76) #5
  %78 = sext i32 %0 to i64
  %79 = getelementptr inbounds double, ptr %47, i64 %78
  %80 = load double, ptr %79, align 8, !tbaa !5
  %81 = fmul double %80, 0x401921FB54442D18
  %82 = tail call double @cos(double noundef %81) #5
  %83 = fmul double %77, %82
  %84 = getelementptr inbounds double, ptr %4, i64 %72
  store double %83, ptr %84, align 8, !tbaa !5
  br label %._crit_edge80

._crit_edge80:                                    ; preds = %.lr.ph79, %20, %._crit_edge
  %.sink = phi ptr [ %47, %._crit_edge ], [ %21, %20 ], [ %21, %.lr.ph79 ]
  tail call void @free(ptr noundef %.sink) #5
  %85 = icmp sgt i32 %0, 0
  br i1 %85, label %.lr.ph83.preheader, label %._crit_edge84

.lr.ph83.preheader:                               ; preds = %.thread, %._crit_edge80
  %wide.trip.count = zext nneg i32 %0 to i64
  %min.iters.check = icmp ult i32 %0, 4
  br i1 %min.iters.check, label %.lr.ph83.preheader95, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph83.preheader
  %n.vec = and i64 %wide.trip.count, 2147483644
  %broadcast.splatinsert = insertelement <2 x double> poison, double %2, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert93 = insertelement <2 x double> poison, double %1, i64 0
  %broadcast.splat94 = shufflevector <2 x double> %broadcast.splatinsert93, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %86 = getelementptr inbounds double, ptr %4, i64 %index
  %87 = getelementptr inbounds i8, ptr %86, i64 16
  %wide.load = load <2 x double>, ptr %86, align 8, !tbaa !5
  %wide.load92 = load <2 x double>, ptr %87, align 8, !tbaa !5
  %88 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load, <2 x double> %broadcast.splat94)
  %89 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load92, <2 x double> %broadcast.splat94)
  store <2 x double> %88, ptr %86, align 8, !tbaa !5
  store <2 x double> %89, ptr %87, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %90 = icmp eq i64 %index.next, %n.vec
  br i1 %90, label %middle.block, label %vector.body, !llvm.loop !12

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge84, label %.lr.ph83.preheader95

.lr.ph83.preheader95:                             ; preds = %middle.block, %.lr.ph83.preheader
  %indvars.iv89.ph = phi i64 [ 0, %.lr.ph83.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph83

.lr.ph83:                                         ; preds = %.lr.ph83.preheader95, %.lr.ph83
  %indvars.iv89 = phi i64 [ %indvars.iv.next90, %.lr.ph83 ], [ %indvars.iv89.ph, %.lr.ph83.preheader95 ]
  %91 = getelementptr inbounds double, ptr %4, i64 %indvars.iv89
  %92 = load double, ptr %91, align 8, !tbaa !5
  %93 = tail call double @llvm.fmuladd.f64(double %2, double %92, double %1)
  store double %93, ptr %91, align 8, !tbaa !5
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge84, label %.lr.ph83, !llvm.loop !15

._crit_edge84:                                    ; preds = %.lr.ph83, %middle.block, %._crit_edge80
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10, !13, !14}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !10, !14, !13}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass