; LLVM IR from CLASS-SZ/class_sz :: class-sz/source (background)

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

%struct.background_parameters_for_distributions = type { ptr, i32, i32, ptr, ptr, ptr, i32 }
%struct.background = type { double, double, double, double, double, double, double, i32, double, double, double, double, i16, double, double, double, double, double, double, double, double, double, i16, double, double, ptr, i32, i32, double, i32, ptr, ptr, double, ptr, double, ptr, double, ptr, double, ptr, ptr, ptr, double, double, double, double, i32, ptr, double, double, double, double, double, double, double, double, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i16, i16, i16, i16, i16, i16, [2048 x i8], i16, [2048 x i8] }

@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [171 x i8], align 1
@__func__.background_ncdm_distribution = external hidden unnamed_addr constant [29 x i8], align 1

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

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

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

declare i32 @array_interpolate_spline(ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, double noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @background_ncdm_distribution(ptr noundef %0, double noundef %1, ptr noundef %2) #3 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca ptr, align 8
  %18 = alloca [2048 x i8], align 16
  %19 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %20, ptr %9, align 8, !tbaa !5
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %21, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  store ptr %23, ptr %8, align 8, !tbaa !5
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.background, ptr %24, i32 0, i32 39
  %26 = load ptr, ptr %25, align 8, !tbaa !14
  store ptr %26, ptr %17, align 8, !tbaa !5
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %27, i32 0, i32 1
  %29 = load i32, ptr %28, align 8, !tbaa !17
  store i32 %29, ptr %10, align 4, !tbaa !18
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.background, ptr %30, i32 0, i32 37
  %32 = load ptr, ptr %31, align 8, !tbaa !19
  %33 = load i32, ptr %10, align 4, !tbaa !18
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds double, ptr %32, i64 %34
  %36 = load double, ptr %35, align 8, !tbaa !9
  store double %36, ptr %12, align 8, !tbaa !9
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.background, ptr %37, i32 0, i32 40
  %39 = load ptr, ptr %38, align 8, !tbaa !20
  %40 = load i32, ptr %10, align 4, !tbaa !18
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i32, ptr %39, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !18
  %44 = icmp eq i32 %43, 1
  br i1 %44, label %45, label %157

45:                                               ; preds = %3
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %46, i32 0, i32 2
  %48 = load i32, ptr %47, align 4, !tbaa !21
  %49 = sub nsw i32 %48, 1
  store i32 %49, ptr %11, align 4, !tbaa !18
  %50 = load double, ptr %6, align 8, !tbaa !9
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %51, i32 0, i32 3
  %53 = load ptr, ptr %52, align 8, !tbaa !22
  %54 = getelementptr inbounds double, ptr %53, i64 0
  %55 = load double, ptr %54, align 8, !tbaa !9
  %56 = fcmp olt double %50, %55
  br i1 %56, label %57, label %64

57:                                               ; preds = %45
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %58, i32 0, i32 4
  %60 = load ptr, ptr %59, align 8, !tbaa !23
  %61 = getelementptr inbounds double, ptr %60, i64 0
  %62 = load double, ptr %61, align 8, !tbaa !9
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  store double %62, ptr %63, align 8, !tbaa !9
  br label %156

64:                                               ; preds = %45
  %65 = load double, ptr %6, align 8, !tbaa !9
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %66, i32 0, i32 3
  %68 = load ptr, ptr %67, align 8, !tbaa !22
  %69 = load i32, ptr %11, align 4, !tbaa !18
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds double, ptr %68, i64 %70
  %72 = load double, ptr %71, align 8, !tbaa !9
  %73 = fcmp ogt double %65, %72
  br i1 %73, label %74, label %123

74:                                               ; preds = %64
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %75, i32 0, i32 3
  %77 = load ptr, ptr %76, align 8, !tbaa !22
  %78 = load i32, ptr %11, align 4, !tbaa !18
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds double, ptr %77, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !9
  store double %81, ptr %13, align 8, !tbaa !9
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %82, i32 0, i32 4
  %84 = load ptr, ptr %83, align 8, !tbaa !23
  %85 = load i32, ptr %11, align 4, !tbaa !18
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds double, ptr %84, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !9
  store double %88, ptr %15, align 8, !tbaa !9
  %89 = load double, ptr %13, align 8, !tbaa !9
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %90, i32 0, i32 3
  %92 = load ptr, ptr %91, align 8, !tbaa !22
  %93 = load i32, ptr %11, align 4, !tbaa !18
  %94 = sub nsw i32 %93, 1
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds double, ptr %92, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !9
  %98 = fsub double %89, %97
  store double %98, ptr %14, align 8, !tbaa !9
  %99 = load double, ptr %15, align 8, !tbaa !9
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %100, i32 0, i32 4
  %102 = load ptr, ptr %101, align 8, !tbaa !23
  %103 = load i32, ptr %11, align 4, !tbaa !18
  %104 = sub nsw i32 %103, 1
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds double, ptr %102, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !9
  %108 = fsub double %99, %107
  store double %108, ptr %16, align 8, !tbaa !9
  %109 = load double, ptr %15, align 8, !tbaa !9
  %110 = load double, ptr %13, align 8, !tbaa !9
  %111 = load double, ptr %6, align 8, !tbaa !9
  %112 = fsub double %110, %111
  %113 = fneg double %112
  %114 = load double, ptr %16, align 8, !tbaa !9
  %115 = fmul double %113, %114
  %116 = load double, ptr %15, align 8, !tbaa !9
  %117 = fdiv double %115, %116
  %118 = load double, ptr %14, align 8, !tbaa !9
  %119 = fdiv double %117, %118
  %120 = call double @exp(double noundef %119) #4
  %121 = fmul double %109, %120
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  store double %121, ptr %122, align 8, !tbaa !9
  br label %155

123:                                              ; preds = %64
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %124, i32 0, i32 3
  %126 = load ptr, ptr %125, align 8, !tbaa !22
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %127, i32 0, i32 2
  %129 = load i32, ptr %128, align 4, !tbaa !21
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %130, i32 0, i32 4
  %132 = load ptr, ptr %131, align 8, !tbaa !23
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %133, i32 0, i32 5
  %135 = load ptr, ptr %134, align 8, !tbaa !24
  %136 = load double, ptr %6, align 8, !tbaa !9
  %137 = load ptr, ptr %9, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.background_parameters_for_distributions, ptr %137, i32 0, i32 6
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.background, ptr %140, i32 0, i32 149
  %142 = getelementptr inbounds [2048 x i8], ptr %141, i64 0, i64 0
  %143 = call i32 @array_interpolate_spline(ptr noundef %126, i32 noundef %129, ptr noundef %132, ptr noundef %135, i32 noundef 1, double noundef %136, ptr noundef %138, ptr noundef %139, i32 noundef 1, ptr noundef %142)
  %144 = icmp eq i32 %143, 1
  br i1 %144, label %145, label %154

145:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 2048, ptr %18) #4
  %146 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.background, ptr %147, i32 0, i32 149
  %149 = getelementptr inbounds [2048 x i8], ptr %148, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %146, ptr noundef @.str.6, ptr noundef @.str.46, ptr noundef %149)
  %150 = load ptr, ptr %8, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.background, ptr %150, i32 0, i32 149
  %152 = getelementptr inbounds [2048 x i8], ptr %151, i64 0, i64 0
  %153 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %152, ptr noundef @.str.3, ptr noundef @__func__.background_ncdm_distribution, i32 noundef 1165, ptr noundef %153)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %18) #4
  store i32 1, ptr %4, align 4
  store i32 1, ptr %19, align 4
  br label %176

154:                                              ; preds = %123
  br label %155

155:                                              ; preds = %154, %74
  br label %156

156:                                              ; preds = %155, %57
  br label %175

157:                                              ; preds = %3
  %158 = call double @pow(double noundef 0x401921FB54442D18, double noundef 3.000000e+00) #4
  %159 = fdiv double 1.000000e+00, %158
  %160 = load double, ptr %6, align 8, !tbaa !9
  %161 = load double, ptr %12, align 8, !tbaa !9
  %162 = fsub double %160, %161
  %163 = call double @exp(double noundef %162) #4
  %164 = fadd double %163, 1.000000e+00
  %165 = fdiv double 1.000000e+00, %164
  %166 = load double, ptr %6, align 8, !tbaa !9
  %167 = load double, ptr %12, align 8, !tbaa !9
  %168 = fadd double %166, %167
  %169 = call double @exp(double noundef %168) #4
  %170 = fadd double %169, 1.000000e+00
  %171 = fdiv double 1.000000e+00, %170
  %172 = fadd double %165, %171
  %173 = fmul double %159, %172
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  store double %173, ptr %174, align 8, !tbaa !9
  br label %175

175:                                              ; preds = %157, %156
  store i32 0, ptr %4, align 4
  store i32 1, ptr %19, align 4
  br label %176

176:                                              ; preds = %175, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %177 = load i32, ptr %4, align 4
  ret i32 %177
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = !{!"any pointer", !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, !6, i64 0}
!12 = !{!"background_parameters_for_distributions", !6, i64 0, !13, i64 8, !13, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !13, i64 40}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 304}
!15 = !{!"background", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !13, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !16, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !16, i64 176, !10, i64 184, !10, i64 192, !6, i64 200, !13, i64 208, !13, i64 212, !10, i64 216, !13, i64 224, !6, i64 232, !6, i64 240, !10, i64 248, !6, i64 256, !10, i64 264, !6, i64 272, !10, i64 280, !6, i64 288, !10, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !13, i64 360, !6, i64 368, !10, i64 376, !10, i64 384, !10, i64 392, !10, i64 400, !10, i64 408, !10, i64 416, !10, i64 424, !10, i64 432, !10, i64 440, !10, i64 448, !10, i64 456, !13, i64 464, !13, i64 468, !13, i64 472, !13, i64 476, !13, i64 480, !13, i64 484, !13, i64 488, !13, i64 492, !13, i64 496, !13, i64 500, !13, i64 504, !13, i64 508, !13, i64 512, !13, i64 516, !13, i64 520, !13, i64 524, !13, i64 528, !13, i64 532, !13, i64 536, !13, i64 540, !13, i64 544, !13, i64 548, !13, i64 552, !13, i64 556, !13, i64 560, !13, i64 564, !13, i64 568, !13, i64 572, !13, i64 576, !13, i64 580, !13, i64 584, !13, i64 588, !13, i64 592, !13, i64 596, !13, i64 600, !13, i64 604, !13, i64 608, !13, i64 612, !13, i64 616, !13, i64 620, !13, i64 624, !13, i64 628, !6, i64 632, !6, i64 640, !6, i64 648, !6, i64 656, !6, i64 664, !13, i64 672, !13, i64 676, !13, i64 680, !13, i64 684, !13, i64 688, !13, i64 692, !13, i64 696, !13, i64 700, !13, i64 704, !13, i64 708, !13, i64 712, !13, i64 716, !13, i64 720, !16, i64 724, !16, i64 726, !16, i64 728, !16, i64 730, !16, i64 732, !16, i64 734, !16, i64 736, !16, i64 738, !16, i64 740, !16, i64 742, !16, i64 744, !6, i64 752, !6, i64 760, !6, i64 768, !6, i64 776, !6, i64 784, !6, i64 792, !6, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !6, i64 832, !16, i64 840, !16, i64 842, !16, i64 844, !16, i64 846, !16, i64 848, !16, i64 850, !7, i64 852, !16, i64 2900, !7, i64 2902}
!16 = !{!"short", !7, i64 0}
!17 = !{!12, !13, i64 8}
!18 = !{!13, !13, i64 0}
!19 = !{!15, !6, i64 288}
!20 = !{!15, !6, i64 312}
!21 = !{!12, !13, i64 12}
!22 = !{!12, !6, i64 16}
!23 = !{!12, !6, i64 24}
!24 = !{!12, !6, i64 32}


; 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.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [171 x i8], align 1
@__func__.background_ncdm_distribution = external hidden unnamed_addr constant [29 x i8], align 1

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

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

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

declare i32 @array_interpolate_spline(ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, double noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @background_ncdm_distribution(ptr noundef %0, double noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca [2048 x i8], align 16
  %5 = load ptr, ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load i32, ptr %6, align 8, !tbaa !11
  %8 = sext i32 %7 to i64
  %9 = getelementptr inbounds i8, ptr %5, i64 312
  %10 = load ptr, ptr %9, align 8, !tbaa !12
  %11 = getelementptr inbounds i32, ptr %10, i64 %8
  %12 = load i32, ptr %11, align 4, !tbaa !16
  %13 = icmp eq i32 %12, 1
  br i1 %13, label %14, label %59

14:                                               ; preds = %3
  %15 = getelementptr inbounds i8, ptr %0, i64 12
  %16 = load i32, ptr %15, align 4, !tbaa !17
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  %18 = load ptr, ptr %17, align 8, !tbaa !18
  %19 = load double, ptr %18, align 8, !tbaa !19
  %20 = fcmp ogt double %19, %1
  br i1 %20, label %21, label %25

21:                                               ; preds = %14
  %22 = getelementptr inbounds i8, ptr %0, i64 24
  %23 = load ptr, ptr %22, align 8, !tbaa !20
  %24 = load double, ptr %23, align 8, !tbaa !19
  store double %24, ptr %2, align 8, !tbaa !19
  br label %75

25:                                               ; preds = %14
  %26 = add nsw i32 %16, -1
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds double, ptr %18, i64 %27
  %29 = load double, ptr %28, align 8, !tbaa !19
  %30 = fcmp olt double %29, %1
  %31 = getelementptr inbounds i8, ptr %0, i64 24
  %32 = load ptr, ptr %31, align 8, !tbaa !20
  br i1 %30, label %33, label %51

33:                                               ; preds = %25
  %34 = getelementptr inbounds double, ptr %32, i64 %27
  %35 = load double, ptr %34, align 8, !tbaa !19
  %36 = add nsw i32 %16, -2
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds double, ptr %18, i64 %37
  %39 = load double, ptr %38, align 8, !tbaa !19
  %40 = fsub double %29, %39
  %41 = getelementptr inbounds double, ptr %32, i64 %37
  %42 = load double, ptr %41, align 8, !tbaa !19
  %43 = fsub double %35, %42
  %44 = fsub double %29, %1
  %45 = fneg double %44
  %46 = fmul double %43, %45
  %47 = fdiv double %46, %35
  %48 = fdiv double %47, %40
  %49 = tail call double @exp(double noundef %48) #4
  %50 = fmul double %35, %49
  store double %50, ptr %2, align 8, !tbaa !19
  br label %75

51:                                               ; preds = %25
  %52 = getelementptr inbounds i8, ptr %0, i64 32
  %53 = load ptr, ptr %52, align 8, !tbaa !21
  %54 = getelementptr inbounds i8, ptr %0, i64 40
  %55 = getelementptr inbounds i8, ptr %5, i64 2902
  %56 = tail call i32 @array_interpolate_spline(ptr noundef nonnull %18, i32 noundef %16, ptr noundef %32, ptr noundef %53, i32 noundef 1, double noundef %1, ptr noundef nonnull %54, ptr noundef %2, i32 noundef 1, ptr noundef nonnull %55) #4
  %57 = icmp eq i32 %56, 1
  br i1 %57, label %58, label %75

58:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %4) #4
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %4, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.46, ptr noundef nonnull %55) #4
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %55, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.background_ncdm_distribution, i32 noundef 1165, ptr noundef nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %4) #4
  br label %75

59:                                               ; preds = %3
  %60 = getelementptr inbounds i8, ptr %5, i64 288
  %61 = load ptr, ptr %60, align 8, !tbaa !22
  %62 = getelementptr inbounds double, ptr %61, i64 %8
  %63 = load double, ptr %62, align 8, !tbaa !19
  %64 = fsub double %1, %63
  %65 = tail call double @exp(double noundef %64) #4
  %66 = fadd double %63, %1
  %67 = tail call double @exp(double noundef %66) #4
  %68 = insertelement <2 x double> poison, double %65, i64 0
  %69 = insertelement <2 x double> %68, double %67, i64 1
  %70 = fadd <2 x double> %69, <double 1.000000e+00, double 1.000000e+00>
  %71 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %70
  %shift = shufflevector <2 x double> %71, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %72 = fadd <2 x double> %71, %shift
  %73 = extractelement <2 x double> %72, i64 0
  %74 = fmul double %73, 0x3F708345EB45D77F
  store double %74, ptr %2, align 8, !tbaa !19
  br label %75

75:                                               ; preds = %59, %33, %51, %21, %58
  %.0 = phi i32 [ 1, %58 ], [ 0, %21 ], [ 0, %51 ], [ 0, %33 ], [ 0, %59 ]
  ret i32 %.0
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { 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 #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, !7, i64 0}
!6 = !{!"background_parameters_for_distributions", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!13, !7, i64 312}
!13 = !{!"background", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !10, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !14, i64 88, !15, i64 96, !14, i64 104, !14, i64 112, !14, i64 120, !14, i64 128, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !15, i64 176, !14, i64 184, !14, i64 192, !7, i64 200, !10, i64 208, !10, i64 212, !14, i64 216, !10, i64 224, !7, i64 232, !7, i64 240, !14, i64 248, !7, i64 256, !14, i64 264, !7, i64 272, !14, i64 280, !7, i64 288, !14, i64 296, !7, i64 304, !7, i64 312, !7, i64 320, !14, i64 328, !14, i64 336, !14, i64 344, !14, i64 352, !10, i64 360, !7, i64 368, !14, i64 376, !14, i64 384, !14, i64 392, !14, i64 400, !14, i64 408, !14, i64 416, !14, i64 424, !14, i64 432, !14, i64 440, !14, i64 448, !14, i64 456, !10, i64 464, !10, i64 468, !10, i64 472, !10, i64 476, !10, i64 480, !10, i64 484, !10, i64 488, !10, i64 492, !10, i64 496, !10, i64 500, !10, i64 504, !10, i64 508, !10, i64 512, !10, i64 516, !10, i64 520, !10, i64 524, !10, i64 528, !10, i64 532, !10, i64 536, !10, i64 540, !10, i64 544, !10, i64 548, !10, i64 552, !10, i64 556, !10, i64 560, !10, i64 564, !10, i64 568, !10, i64 572, !10, i64 576, !10, i64 580, !10, i64 584, !10, i64 588, !10, i64 592, !10, i64 596, !10, i64 600, !10, i64 604, !10, i64 608, !10, i64 612, !10, i64 616, !10, i64 620, !10, i64 624, !10, i64 628, !7, i64 632, !7, i64 640, !7, i64 648, !7, i64 656, !7, i64 664, !10, i64 672, !10, i64 676, !10, i64 680, !10, i64 684, !10, i64 688, !10, i64 692, !10, i64 696, !10, i64 700, !10, i64 704, !10, i64 708, !10, i64 712, !10, i64 716, !10, i64 720, !15, i64 724, !15, i64 726, !15, i64 728, !15, i64 730, !15, i64 732, !15, i64 734, !15, i64 736, !15, i64 738, !15, i64 740, !15, i64 742, !15, i64 744, !7, i64 752, !7, i64 760, !7, i64 768, !7, i64 776, !7, i64 784, !7, i64 792, !7, i64 800, !7, i64 808, !7, i64 816, !7, i64 824, !7, i64 832, !15, i64 840, !15, i64 842, !15, i64 844, !15, i64 846, !15, i64 848, !15, i64 850, !8, i64 852, !15, i64 2900, !8, i64 2902}
!14 = !{!"double", !8, i64 0}
!15 = !{!"short", !8, i64 0}
!16 = !{!10, !10, i64 0}
!17 = !{!6, !10, i64 12}
!18 = !{!6, !7, i64 16}
!19 = !{!14, !14, i64 0}
!20 = !{!6, !7, i64 24}
!21 = !{!6, !7, i64 32}
!22 = !{!13, !7, i64 288}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass