; 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 allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

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

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

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

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

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

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

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

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

47:                                               ; preds = %4
  %48 = load i32, ptr %14, align 4, !tbaa !5
  %49 = load i32, ptr %15, align 4, !tbaa !5
  %50 = sub nsw i32 %48, %49
  %51 = add nsw i32 %50, 1
  %52 = srem i32 %51, 2
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %123

54:                                               ; preds = %47
  %55 = load i32, ptr %14, align 4, !tbaa !5
  %56 = load i32, ptr %15, align 4, !tbaa !5
  %57 = sub nsw i32 %55, %56
  %58 = add nsw i32 %57, 1
  %59 = sdiv i32 %58, 2
  store i32 %59, ptr %10, align 4, !tbaa !5
  %60 = load i32, ptr %10, align 4, !tbaa !5
  %61 = mul nsw i32 2, %60
  %62 = load ptr, ptr %8, align 8, !tbaa !11
  %63 = call ptr @r8vec_uniform_01_new(i32 noundef %61, ptr noundef %62)
  store ptr %63, ptr %11, align 8, !tbaa !11
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %118, %54
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = load i32, ptr %10, align 4, !tbaa !5
  %67 = mul nsw i32 2, %66
  %68 = sub nsw i32 %67, 2
  %69 = icmp sle i32 %65, %68
  br i1 %69, label %70, label %121

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

118:                                              ; preds = %70
  %119 = load i32, ptr %9, align 4, !tbaa !5
  %120 = add nsw i32 %119, 2
  store i32 %120, ptr %9, align 4, !tbaa !5
  br label %64, !llvm.loop !13

121:                                              ; preds = %64
  %122 = load ptr, ptr %11, align 8, !tbaa !11
  call void @free(ptr noundef %122) #5
  br label %222

123:                                              ; preds = %47
  %124 = load i32, ptr %14, align 4, !tbaa !5
  %125 = sub nsw i32 %124, 1
  store i32 %125, ptr %14, align 4, !tbaa !5
  %126 = load i32, ptr %14, align 4, !tbaa !5
  %127 = load i32, ptr %15, align 4, !tbaa !5
  %128 = sub nsw i32 %126, %127
  %129 = add nsw i32 %128, 1
  %130 = sdiv i32 %129, 2
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %10, align 4, !tbaa !5
  %132 = load i32, ptr %10, align 4, !tbaa !5
  %133 = mul nsw i32 2, %132
  %134 = load ptr, ptr %8, align 8, !tbaa !11
  %135 = call ptr @r8vec_uniform_01_new(i32 noundef %133, ptr noundef %134)
  store ptr %135, ptr %11, align 8, !tbaa !11
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %190, %123
  %137 = load i32, ptr %9, align 4, !tbaa !5
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = mul nsw i32 2, %138
  %140 = sub nsw i32 %139, 4
  %141 = icmp sle i32 %137, %140
  br i1 %141, label %142, label %193

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

190:                                              ; preds = %142
  %191 = load i32, ptr %9, align 4, !tbaa !5
  %192 = add nsw i32 %191, 2
  store i32 %192, ptr %9, align 4, !tbaa !5
  br label %136, !llvm.loop !15

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

222:                                              ; preds = %193, %121
  br label %223

223:                                              ; preds = %222, %26
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %224

224:                                              ; preds = %241, %223
  %225 = load i32, ptr %9, align 4, !tbaa !5
  %226 = load i32, ptr %5, align 4, !tbaa !5
  %227 = icmp slt i32 %225, %226
  br i1 %227, label %228, label %244

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

241:                                              ; preds = %228
  %242 = load i32, ptr %9, align 4, !tbaa !5
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %9, align 4, !tbaa !5
  br label %224, !llvm.loop !16

244:                                              ; preds = %224
  %245 = load ptr, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret ptr %245
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind allocsize(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 #3 = { 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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 allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local noalias noundef ptr @r8vec_normal_ab_new(i32 noundef %0, double noundef %1, double noundef %2, ptr noundef %3) local_unnamed_addr #4 {
  %5 = sext i32 %0 to i64
  %6 = shl nsw i64 %5, 3
  %7 = tail call noalias ptr @malloc(i64 noundef %6) #6
  %8 = icmp eq i32 %0, 1
  br i1 %8, label %.thread, label %19

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

19:                                               ; preds = %4
  %20 = and i32 %0, 1
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %49

22:                                               ; preds = %19
  %23 = tail call ptr @r8vec_uniform_01_new(i32 noundef %0, ptr noundef %3)
  %.not7578 = icmp slt i32 %0, 2
  br i1 %.not7578, label %._crit_edge82, label %.lr.ph81.preheader

.lr.ph81.preheader:                               ; preds = %22
  %24 = add nsw i32 %0, -2
  %25 = zext nneg i32 %24 to i64
  br label %.lr.ph81

.lr.ph81:                                         ; preds = %.lr.ph81.preheader, %.lr.ph81
  %indvars.iv88 = phi i64 [ 0, %.lr.ph81.preheader ], [ %indvars.iv.next89, %.lr.ph81 ]
  %26 = getelementptr inbounds double, ptr %23, i64 %indvars.iv88
  %27 = load double, ptr %26, align 8, !tbaa !5
  %28 = tail call double @log(double noundef %27) #7
  %29 = fmul double %28, -2.000000e+00
  %30 = tail call double @sqrt(double noundef %29) #7
  %31 = or disjoint i64 %indvars.iv88, 1
  %32 = getelementptr inbounds double, ptr %23, i64 %31
  %33 = load double, ptr %32, align 8, !tbaa !5
  %34 = fmul double %33, 0x401921FB54442D18
  %35 = tail call double @cos(double noundef %34) #7
  %36 = getelementptr inbounds double, ptr %7, i64 %indvars.iv88
  %37 = load double, ptr %26, align 8, !tbaa !5
  %38 = tail call double @log(double noundef %37) #7
  %39 = fmul double %38, -2.000000e+00
  %40 = tail call double @sqrt(double noundef %39) #7
  %41 = load double, ptr %32, align 8, !tbaa !5
  %42 = fmul double %41, 0x401921FB54442D18
  %43 = tail call double @sin(double noundef %42) #7
  %44 = insertelement <2 x double> poison, double %30, i64 0
  %45 = insertelement <2 x double> %44, double %40, i64 1
  %46 = insertelement <2 x double> poison, double %35, i64 0
  %47 = insertelement <2 x double> %46, double %43, i64 1
  %48 = fmul <2 x double> %45, %47
  store <2 x double> %48, ptr %36, align 8, !tbaa !5
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 2
  %.not75 = icmp ugt i64 %indvars.iv.next89, %25
  br i1 %.not75, label %._crit_edge82, label %.lr.ph81, !llvm.loop !9

49:                                               ; preds = %19
  %50 = add i32 %0, 1
  %51 = tail call ptr @r8vec_uniform_01_new(i32 noundef %50, ptr noundef %3)
  %52 = add i32 %0, -3
  %.not76 = icmp slt i32 %52, 0
  br i1 %.not76, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %49
  %53 = zext nneg i32 %52 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 ]
  %54 = getelementptr inbounds double, ptr %51, i64 %indvars.iv
  %55 = load double, ptr %54, align 8, !tbaa !5
  %56 = tail call double @log(double noundef %55) #7
  %57 = fmul double %56, -2.000000e+00
  %58 = tail call double @sqrt(double noundef %57) #7
  %59 = or disjoint i64 %indvars.iv, 1
  %60 = getelementptr inbounds double, ptr %51, i64 %59
  %61 = load double, ptr %60, align 8, !tbaa !5
  %62 = fmul double %61, 0x401921FB54442D18
  %63 = tail call double @cos(double noundef %62) #7
  %64 = getelementptr inbounds double, ptr %7, i64 %indvars.iv
  %65 = load double, ptr %54, align 8, !tbaa !5
  %66 = tail call double @log(double noundef %65) #7
  %67 = fmul double %66, -2.000000e+00
  %68 = tail call double @sqrt(double noundef %67) #7
  %69 = load double, ptr %60, align 8, !tbaa !5
  %70 = fmul double %69, 0x401921FB54442D18
  %71 = tail call double @sin(double noundef %70) #7
  %72 = insertelement <2 x double> poison, double %58, i64 0
  %73 = insertelement <2 x double> %72, double %68, i64 1
  %74 = insertelement <2 x double> poison, double %63, i64 0
  %75 = insertelement <2 x double> %74, double %71, i64 1
  %76 = fmul <2 x double> %73, %75
  store <2 x double> %76, ptr %64, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2
  %.not = icmp ugt i64 %indvars.iv.next, %53
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph, %49
  %77 = add nsw i32 %0, -1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds double, ptr %51, i64 %78
  %80 = load double, ptr %79, align 8, !tbaa !5
  %81 = tail call double @log(double noundef %80) #7
  %82 = fmul double %81, -2.000000e+00
  %83 = tail call double @sqrt(double noundef %82) #7
  %84 = getelementptr inbounds double, ptr %51, i64 %5
  %85 = load double, ptr %84, align 8, !tbaa !5
  %86 = fmul double %85, 0x401921FB54442D18
  %87 = tail call double @cos(double noundef %86) #7
  %88 = fmul double %83, %87
  %89 = getelementptr inbounds double, ptr %7, i64 %78
  store double %88, ptr %89, align 8, !tbaa !5
  br label %._crit_edge82

._crit_edge82:                                    ; preds = %.lr.ph81, %22, %._crit_edge
  %.sink = phi ptr [ %51, %._crit_edge ], [ %23, %22 ], [ %23, %.lr.ph81 ]
  tail call void @free(ptr noundef %.sink) #7
  %90 = icmp sgt i32 %0, 0
  br i1 %90, label %.lr.ph85.preheader, label %._crit_edge86

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

vector.ph:                                        ; preds = %.lr.ph85.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.splatinsert95 = insertelement <2 x double> poison, double %1, i64 0
  %broadcast.splat96 = shufflevector <2 x double> %broadcast.splatinsert95, <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 ]
  %91 = getelementptr inbounds double, ptr %7, i64 %index
  %92 = getelementptr inbounds i8, ptr %91, i64 16
  %wide.load = load <2 x double>, ptr %91, align 8, !tbaa !5
  %wide.load94 = load <2 x double>, ptr %92, align 8, !tbaa !5
  %93 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load, <2 x double> %broadcast.splat96)
  %94 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load94, <2 x double> %broadcast.splat96)
  store <2 x double> %93, ptr %91, align 8, !tbaa !5
  store <2 x double> %94, ptr %92, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %95 = icmp eq i64 %index.next, %n.vec
  br i1 %95, 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_edge86, label %.lr.ph85.preheader97

.lr.ph85.preheader97:                             ; preds = %middle.block, %.lr.ph85.preheader
  %indvars.iv91.ph = phi i64 [ 0, %.lr.ph85.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph85

.lr.ph85:                                         ; preds = %.lr.ph85.preheader97, %.lr.ph85
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %.lr.ph85 ], [ %indvars.iv91.ph, %.lr.ph85.preheader97 ]
  %96 = getelementptr inbounds double, ptr %7, i64 %indvars.iv91
  %97 = load double, ptr %96, align 8, !tbaa !5
  %98 = tail call double @llvm.fmuladd.f64(double %2, double %97, double %1)
  store double %98, ptr %96, align 8, !tbaa !5
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next92, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge86, label %.lr.ph85, !llvm.loop !15

._crit_edge86:                                    ; preds = %.lr.ph85, %middle.block, %._crit_edge82
  ret ptr %7
}

; 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>) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #2 = { 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 #3 = { 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 #4 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { 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,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass