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

; 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"

@.str = external hidden unnamed_addr constant [35 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@__func__.get_qsampling_manual = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @get_qsampling_manual(ptr noundef %0, ptr noundef %1, i32 noundef %2, double noundef %3, i32 noundef %4, ptr noundef %5, i32 noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) #0 {
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca [2048 x i8], align 16
  %31 = alloca i32, align 4
  %32 = alloca [2048 x i8], align 16
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store i32 %2, ptr %14, align 4, !tbaa !9
  store double %3, ptr %15, align 8, !tbaa !11
  store i32 %4, ptr %16, align 4, !tbaa !9
  store ptr %5, ptr %17, align 8, !tbaa !5
  store i32 %6, ptr %18, align 4, !tbaa !9
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %33 = load i32, ptr %16, align 4, !tbaa !9
  switch i32 %33, label %195 [
    i32 0, label %34
    i32 1, label %35
    i32 3, label %100
    i32 2, label %150
  ]

34:                                               ; preds = %10
  store i32 1, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %196

35:                                               ; preds = %10
  %36 = load i32, ptr %14, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = mul i64 %37, 8
  %39 = call noalias ptr @malloc(i64 noundef %38) #7
  store ptr %39, ptr %25, align 8, !tbaa !5
  %40 = load ptr, ptr %25, align 8, !tbaa !5
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %51

42:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %43 = load i32, ptr %14, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = mul i64 %44, 8
  %46 = trunc i64 %45 to i32
  store i32 %46, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %30) #6
  %47 = getelementptr inbounds [2048 x i8], ptr %30, i64 0, i64 0
  %48 = load i32, ptr %29, align 4, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %47, ptr noundef @.str, ptr noundef @.str.1, i32 noundef %48)
  %49 = load ptr, ptr %21, align 8, !tbaa !5
  %50 = getelementptr inbounds [2048 x i8], ptr %30, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %49, ptr noundef @.str.2, ptr noundef @__func__.get_qsampling_manual, i32 noundef 27, ptr noundef %50)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %30) #6
  store i32 1, ptr %11, align 4
  store i32 1, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %196

51:                                               ; preds = %35
  %52 = load i32, ptr %14, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = mul i64 %53, 8
  %55 = call noalias ptr @malloc(i64 noundef %54) #7
  store ptr %55, ptr %26, align 8, !tbaa !5
  %56 = load ptr, ptr %26, align 8, !tbaa !5
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %67

58:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %59 = load i32, ptr %14, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = mul i64 %60, 8
  %62 = trunc i64 %61 to i32
  store i32 %62, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %32) #6
  %63 = getelementptr inbounds [2048 x i8], ptr %32, i64 0, i64 0
  %64 = load i32, ptr %31, align 4, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %63, ptr noundef @.str, ptr noundef @.str.3, i32 noundef %64)
  %65 = load ptr, ptr %21, align 8, !tbaa !5
  %66 = getelementptr inbounds [2048 x i8], ptr %32, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %65, ptr noundef @.str.2, ptr noundef @__func__.get_qsampling_manual, i32 noundef 28, ptr noundef %66)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %32) #6
  store i32 1, ptr %11, align 4
  store i32 1, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %196

67:                                               ; preds = %51
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = load i32, ptr %14, align 4, !tbaa !9
  %71 = load ptr, ptr %25, align 8, !tbaa !5
  %72 = load ptr, ptr %26, align 8, !tbaa !5
  %73 = call i32 @compute_Laguerre(ptr noundef %68, ptr noundef %69, i32 noundef %70, double noundef 0.000000e+00, ptr noundef %71, ptr noundef %72, i32 noundef 1)
  store i32 0, ptr %27, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %94, %67
  %75 = load i32, ptr %27, align 4, !tbaa !9
  %76 = load i32, ptr %14, align 4, !tbaa !9
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %78, label %97

78:                                               ; preds = %74
  %79 = load ptr, ptr %19, align 8, !tbaa !5
  %80 = load ptr, ptr %20, align 8, !tbaa !5
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  %82 = load i32, ptr %27, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds double, ptr %81, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !11
  %86 = call i32 %79(ptr noundef %80, double noundef %85, ptr noundef %22)
  %87 = load double, ptr %22, align 8, !tbaa !11
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  %89 = load i32, ptr %27, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds double, ptr %88, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !11
  %93 = fmul double %92, %87
  store double %93, ptr %91, align 8, !tbaa !11
  br label %94

94:                                               ; preds = %78
  %95 = load i32, ptr %27, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %27, align 4, !tbaa !9
  br label %74, !llvm.loop !13

97:                                               ; preds = %74
  %98 = load ptr, ptr %25, align 8, !tbaa !5
  call void @free(ptr noundef %98) #6
  %99 = load ptr, ptr %26, align 8, !tbaa !5
  call void @free(ptr noundef %99) #6
  store i32 0, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %196

100:                                              ; preds = %10
  store i32 0, ptr %27, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %146, %100
  %102 = load i32, ptr %27, align 4, !tbaa !9
  %103 = load i32, ptr %14, align 4, !tbaa !9
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %105, label %149

105:                                              ; preds = %101
  %106 = load double, ptr %15, align 8, !tbaa !11
  %107 = load i32, ptr %14, align 4, !tbaa !9
  %108 = sitofp i32 %107 to double
  %109 = fdiv double %106, %108
  store double %109, ptr %23, align 8, !tbaa !11
  %110 = load double, ptr %23, align 8, !tbaa !11
  %111 = load i32, ptr %27, align 4, !tbaa !9
  %112 = sitofp i32 %111 to double
  %113 = load double, ptr %23, align 8, !tbaa !11
  %114 = call double @llvm.fmuladd.f64(double %112, double %113, double %110)
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  %116 = load i32, ptr %27, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds double, ptr %115, i64 %117
  store double %114, ptr %118, align 8, !tbaa !11
  %119 = load ptr, ptr %19, align 8, !tbaa !5
  %120 = load ptr, ptr %20, align 8, !tbaa !5
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = load i32, ptr %27, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds double, ptr %121, i64 %123
  %125 = load double, ptr %124, align 8, !tbaa !11
  %126 = call i32 %119(ptr noundef %120, double noundef %125, ptr noundef %22)
  %127 = load double, ptr %22, align 8, !tbaa !11
  %128 = load double, ptr %23, align 8, !tbaa !11
  %129 = fmul double %127, %128
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  %131 = load i32, ptr %27, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds double, ptr %130, i64 %132
  store double %129, ptr %133, align 8, !tbaa !11
  %134 = load i32, ptr %27, align 4, !tbaa !9
  %135 = load i32, ptr %14, align 4, !tbaa !9
  %136 = sub nsw i32 %135, 1
  %137 = icmp eq i32 %134, %136
  br i1 %137, label %138, label %145

138:                                              ; preds = %105
  %139 = load ptr, ptr %13, align 8, !tbaa !5
  %140 = load i32, ptr %27, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds double, ptr %139, i64 %141
  %143 = load double, ptr %142, align 8, !tbaa !11
  %144 = fmul double %143, 5.000000e-01
  store double %144, ptr %142, align 8, !tbaa !11
  br label %145

145:                                              ; preds = %138, %105
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %27, align 4, !tbaa !9
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %27, align 4, !tbaa !9
  br label %101, !llvm.loop !15

149:                                              ; preds = %101
  store i32 0, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %196

150:                                              ; preds = %10
  store i32 0, ptr %27, align 4, !tbaa !9
  br label %151

151:                                              ; preds = %191, %150
  %152 = load i32, ptr %27, align 4, !tbaa !9
  %153 = load i32, ptr %14, align 4, !tbaa !9
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %155, label %194

155:                                              ; preds = %151
  %156 = load i32, ptr %14, align 4, !tbaa !9
  %157 = sitofp i32 %156 to double
  %158 = fadd double %157, 1.000000e+00
  %159 = fdiv double 1.000000e+00, %158
  store double %159, ptr %23, align 8, !tbaa !11
  %160 = load double, ptr %23, align 8, !tbaa !11
  %161 = load i32, ptr %27, align 4, !tbaa !9
  %162 = sitofp i32 %161 to double
  %163 = load double, ptr %23, align 8, !tbaa !11
  %164 = call double @llvm.fmuladd.f64(double %162, double %163, double %160)
  store double %164, ptr %24, align 8, !tbaa !11
  %165 = load double, ptr %24, align 8, !tbaa !11
  %166 = fdiv double 1.000000e+00, %165
  %167 = fsub double %166, 1.000000e+00
  %168 = load ptr, ptr %12, align 8, !tbaa !5
  %169 = load i32, ptr %27, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds double, ptr %168, i64 %170
  store double %167, ptr %171, align 8, !tbaa !11
  %172 = load ptr, ptr %19, align 8, !tbaa !5
  %173 = load ptr, ptr %20, align 8, !tbaa !5
  %174 = load ptr, ptr %12, align 8, !tbaa !5
  %175 = load i32, ptr %27, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds double, ptr %174, i64 %176
  %178 = load double, ptr %177, align 8, !tbaa !11
  %179 = call i32 %172(ptr noundef %173, double noundef %178, ptr noundef %22)
  %180 = load double, ptr %22, align 8, !tbaa !11
  %181 = load double, ptr %23, align 8, !tbaa !11
  %182 = fmul double %180, %181
  %183 = load double, ptr %24, align 8, !tbaa !11
  %184 = fdiv double %182, %183
  %185 = load double, ptr %24, align 8, !tbaa !11
  %186 = fdiv double %184, %185
  %187 = load ptr, ptr %13, align 8, !tbaa !5
  %188 = load i32, ptr %27, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds double, ptr %187, i64 %189
  store double %186, ptr %190, align 8, !tbaa !11
  br label %191

191:                                              ; preds = %155
  %192 = load i32, ptr %27, align 4, !tbaa !9
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %27, align 4, !tbaa !9
  br label %151, !llvm.loop !16

194:                                              ; preds = %151
  store i32 0, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %196

195:                                              ; preds = %10
  store i32 0, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %196

196:                                              ; preds = %195, %194, %149, %97, %58, %42, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  %197 = load i32, ptr %11, align 4
  ret i32 %197
}

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

declare void @class_protect_sprintf(ptr noundef, ptr noundef, ...) #3

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @compute_Laguerre(ptr noundef, ptr noundef, i32 noundef, double noundef, ptr noundef, ptr noundef, i32 noundef) #0

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 "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 }
attributes #7 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !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"

@.str = external hidden unnamed_addr constant [35 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@__func__.get_qsampling_manual = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @get_qsampling_manual(ptr noundef %0, ptr noundef %1, i32 noundef %2, double noundef %3, i32 noundef %4, ptr nocapture noundef readnone %5, i32 noundef %6, ptr nocapture noundef readonly %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #0 {
  %11 = alloca double, align 8
  %12 = alloca [2048 x i8], align 16
  %13 = alloca [2048 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  switch i32 %4, label %69 [
    i32 0, label %.loopexit
    i32 1, label %23
    i32 3, label %.preheader
    i32 2, label %.preheader72
  ]

.preheader72:                                     ; preds = %10
  %14 = icmp sgt i32 %2, 0
  br i1 %14, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader72
  %15 = add nuw i32 %2, 1
  %16 = uitofp i32 %15 to double
  %17 = fdiv double 1.000000e+00, %16
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %56

.preheader:                                       ; preds = %10
  %18 = icmp sgt i32 %2, 0
  br i1 %18, label %.lr.ph76, label %.loopexit

.lr.ph76:                                         ; preds = %.preheader
  %19 = uitofp nneg i32 %2 to double
  %20 = fdiv double %3, %19
  %21 = add nsw i32 %2, -1
  %22 = zext nneg i32 %21 to i64
  %wide.trip.count84 = zext nneg i32 %2 to i64
  br label %45

23:                                               ; preds = %10
  %24 = sext i32 %2 to i64
  %25 = shl nsw i64 %24, 3
  %26 = tail call noalias ptr @malloc(i64 noundef %25) #7
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %30

28:                                               ; preds = %23
  %29 = trunc i64 %25 to i32
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %12) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %12, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef %29) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %9, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.get_qsampling_manual, i32 noundef 27, ptr noundef nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %12) #6
  br label %.loopexit

30:                                               ; preds = %23
  %31 = tail call noalias ptr @malloc(i64 noundef %25) #7
  %32 = icmp eq ptr %31, null
  br i1 %32, label %33, label %35

33:                                               ; preds = %30
  %34 = trunc i64 %25 to i32
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %13) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %13, ptr noundef nonnull @.str, ptr noundef nonnull @.str.3, i32 noundef %34) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %9, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.get_qsampling_manual, i32 noundef 28, ptr noundef nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %13) #6
  br label %.loopexit

35:                                               ; preds = %30
  %36 = tail call i32 @compute_Laguerre(ptr noundef %0, ptr noundef %1, i32 noundef %2, double noundef 0.000000e+00, ptr noundef nonnull %26, ptr noundef nonnull %31, i32 noundef 1)
  %37 = icmp sgt i32 %2, 0
  br i1 %37, label %.lr.ph78.preheader, label %._crit_edge

.lr.ph78.preheader:                               ; preds = %35
  %wide.trip.count89 = zext nneg i32 %2 to i64
  br label %.lr.ph78

.lr.ph78:                                         ; preds = %.lr.ph78.preheader, %.lr.ph78
  %indvars.iv86 = phi i64 [ 0, %.lr.ph78.preheader ], [ %indvars.iv.next87, %.lr.ph78 ]
  %38 = getelementptr inbounds double, ptr %0, i64 %indvars.iv86
  %39 = load double, ptr %38, align 8, !tbaa !5
  %40 = call i32 %7(ptr noundef %8, double noundef %39, ptr noundef nonnull %11) #6
  %41 = load double, ptr %11, align 8, !tbaa !5
  %42 = getelementptr inbounds double, ptr %1, i64 %indvars.iv86
  %43 = load double, ptr %42, align 8, !tbaa !5
  %44 = fmul double %41, %43
  store double %44, ptr %42, align 8, !tbaa !5
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count89
  br i1 %exitcond90.not, label %._crit_edge, label %.lr.ph78, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph78, %35
  call void @free(ptr noundef %26) #6
  call void @free(ptr noundef %31) #6
  br label %.loopexit

45:                                               ; preds = %.lr.ph76, %45
  %indvars.iv81 = phi i64 [ 0, %.lr.ph76 ], [ %indvars.iv.next82, %45 ]
  %46 = trunc nuw nsw i64 %indvars.iv81 to i32
  %47 = uitofp nneg i32 %46 to double
  %48 = call double @llvm.fmuladd.f64(double %47, double %20, double %20)
  %49 = getelementptr inbounds double, ptr %0, i64 %indvars.iv81
  store double %48, ptr %49, align 8, !tbaa !5
  %50 = call i32 %7(ptr noundef %8, double noundef %48, ptr noundef nonnull %11) #6
  %51 = load double, ptr %11, align 8, !tbaa !5
  %52 = fmul double %20, %51
  %53 = getelementptr inbounds double, ptr %1, i64 %indvars.iv81
  %54 = icmp eq i64 %indvars.iv81, %22
  %55 = fmul double %52, 5.000000e-01
  %storemerge = select i1 %54, double %55, double %52
  store double %storemerge, ptr %53, align 8, !tbaa !5
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next82, %wide.trip.count84
  br i1 %exitcond85.not, label %.loopexit, label %45, !llvm.loop !11

56:                                               ; preds = %.lr.ph, %56
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %56 ]
  %57 = trunc nuw nsw i64 %indvars.iv to i32
  %58 = uitofp nneg i32 %57 to double
  %59 = call double @llvm.fmuladd.f64(double %58, double %17, double %17)
  %60 = fdiv double 1.000000e+00, %59
  %61 = fadd double %60, -1.000000e+00
  %62 = getelementptr inbounds double, ptr %0, i64 %indvars.iv
  store double %61, ptr %62, align 8, !tbaa !5
  %63 = call i32 %7(ptr noundef %8, double noundef %61, ptr noundef nonnull %11) #6
  %64 = load double, ptr %11, align 8, !tbaa !5
  %65 = fmul double %17, %64
  %66 = fdiv double %65, %59
  %67 = fdiv double %66, %59
  %68 = getelementptr inbounds double, ptr %1, i64 %indvars.iv
  store double %67, ptr %68, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %56, !llvm.loop !12

69:                                               ; preds = %10
  br label %.loopexit

.loopexit:                                        ; preds = %56, %45, %.preheader72, %.preheader, %10, %69, %._crit_edge, %33, %28
  %.0 = phi i32 [ 0, %69 ], [ 1, %28 ], [ 1, %33 ], [ 0, %._crit_edge ], [ 1, %10 ], [ 0, %.preheader ], [ 0, %.preheader72 ], [ 0, %45 ], [ 0, %56 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  ret i32 %.0
}

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

declare void @class_protect_sprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @compute_Laguerre(ptr noundef, ptr noundef, i32 noundef, double noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

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

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


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