; LLVM IR from kylechampley/XrayPhysics :: src/xsource.ll (ZN10xraySource15simulateSpectraEffiPfi)

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

%class.xraySource = type { float, i32, float, ptr, i32, float, float, ptr }

@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [93 x i8], align 1

declare i32 @printf(ptr noundef, ...) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN10xraySource15simulateSpectraEffiPfi(ptr noundef nonnull align 8 dereferenceable(48) %0, float noundef %1, float noundef %2, i32 noundef %3, ptr noundef %4, i32 noundef %5) #2 align 2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca [4 x [2 x float]], align 16
  %19 = alloca i32, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca float, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca i32, align 4
  %30 = alloca float, align 4
  %31 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store float %1, ptr %9, align 4, !tbaa !9
  store float %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !11
  store ptr %4, ptr %12, align 8, !tbaa !5
  store i32 %5, ptr %13, align 4, !tbaa !11
  %32 = load ptr, ptr %8, align 8
  %33 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 7
  %34 = load ptr, ptr %33, align 8, !tbaa !13
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %38

36:                                               ; preds = %6
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  store ptr null, ptr %7, align 8
  br label %282

38:                                               ; preds = %6
  %39 = load float, ptr %9, align 4, !tbaa !9
  %40 = fpext float %39 to double
  %41 = fcmp olt double %40, 2.000000e+00
  br i1 %41, label %45, label %42

42:                                               ; preds = %38
  %43 = load float, ptr %9, align 4, !tbaa !9
  %44 = fcmp ogt float %43, 2.000000e+04
  br i1 %44, label %45, label %47

45:                                               ; preds = %42, %38
  %46 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef 20000)
  store ptr null, ptr %7, align 8
  br label %282

47:                                               ; preds = %42
  %48 = load i32, ptr %11, align 4, !tbaa !11
  %49 = icmp ne i32 %48, 29
  br i1 %49, label %50, label %61

50:                                               ; preds = %47
  %51 = load i32, ptr %11, align 4, !tbaa !11
  %52 = icmp ne i32 %51, 42
  br i1 %52, label %53, label %61

53:                                               ; preds = %50
  %54 = load i32, ptr %11, align 4, !tbaa !11
  %55 = icmp ne i32 %54, 74
  br i1 %55, label %56, label %61

56:                                               ; preds = %53
  %57 = load i32, ptr %11, align 4, !tbaa !11
  %58 = icmp ne i32 %57, 79
  br i1 %58, label %59, label %61

59:                                               ; preds = %56
  %60 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  store ptr null, ptr %7, align 8
  br label %282

61:                                               ; preds = %56, %53, %50, %47
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 3
  store ptr %62, ptr %63, align 8, !tbaa !15
  %64 = load float, ptr %9, align 4, !tbaa !9
  %65 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 0
  store float %64, ptr %65, align 8, !tbaa !16
  %66 = load float, ptr %10, align 4, !tbaa !9
  %67 = fpext float %66 to double
  %68 = fmul double %67, 0x400921FB54442D18
  %69 = fdiv double %68, 1.800000e+02
  %70 = fptrunc double %69 to float
  %71 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 2
  store float %70, ptr %71, align 8, !tbaa !17
  %72 = load i32, ptr %11, align 4, !tbaa !11
  %73 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 1
  store i32 %72, ptr %73, align 4, !tbaa !18
  %74 = load i32, ptr %13, align 4, !tbaa !11
  %75 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 4
  store i32 %74, ptr %75, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %76 = call noundef ptr @_ZN10xraySource14bremsstrahlungEv(ptr noundef nonnull align 8 dereferenceable(48) %32)
  store ptr %76, ptr %14, align 8, !tbaa !5
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  %78 = icmp eq ptr %77, null
  br i1 %78, label %79, label %80

79:                                               ; preds = %61
  store ptr null, ptr %7, align 8
  store i32 1, ptr %15, align 4
  br label %281

80:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %81 = call noundef i32 @_ZN10xraySource4getJEv(ptr noundef nonnull align 8 dereferenceable(48) %32)
  store i32 %81, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store float 0x4336345780000000, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %82 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 3
  %83 = load ptr, ptr %82, align 8, !tbaa !15
  %84 = getelementptr inbounds float, ptr %83, i64 0
  %85 = load float, ptr %84, align 4, !tbaa !9
  store float %85, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %86 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 0
  %87 = load float, ptr %86, align 8, !tbaa !16
  store float %87, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %88

88:                                               ; preds = %137, %80
  %89 = load i32, ptr %22, align 4, !tbaa !11
  %90 = icmp slt i32 %89, 2
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %140

92:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !11
  br label %93

93:                                               ; preds = %133, %92
  %94 = load i32, ptr %23, align 4, !tbaa !11
  %95 = icmp slt i32 %94, 2
  br i1 %95, label %97, label %96

96:                                               ; preds = %93
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %136

97:                                               ; preds = %93
  %98 = load i32, ptr %16, align 4, !tbaa !11
  %99 = load i32, ptr %22, align 4, !tbaa !11
  %100 = load i32, ptr %23, align 4, !tbaa !11
  %101 = call noundef float @_ZN10xraySource4EjklEiii(ptr noundef nonnull align 8 dereferenceable(48) %32, i32 noundef %98, i32 noundef %99, i32 noundef %100)
  %102 = load float, ptr %20, align 4, !tbaa !9
  %103 = fcmp oge float %101, %102
  br i1 %103, label %104, label %132

104:                                              ; preds = %97
  %105 = load i32, ptr %16, align 4, !tbaa !11
  %106 = load i32, ptr %22, align 4, !tbaa !11
  %107 = load i32, ptr %23, align 4, !tbaa !11
  %108 = call noundef float @_ZN10xraySource4EabsEiii(ptr noundef nonnull align 8 dereferenceable(48) %32, i32 noundef %105, i32 noundef %106, i32 noundef %107)
  %109 = load float, ptr %21, align 4, !tbaa !9
  %110 = fcmp olt float %108, %109
  br i1 %110, label %111, label %132

111:                                              ; preds = %104
  %112 = load i32, ptr %16, align 4, !tbaa !11
  %113 = load i32, ptr %22, align 4, !tbaa !11
  %114 = load i32, ptr %23, align 4, !tbaa !11
  %115 = call noundef float @_ZN10xraySource4EjklEiii(ptr noundef nonnull align 8 dereferenceable(48) %32, i32 noundef %112, i32 noundef %113, i32 noundef %114)
  %116 = load i32, ptr %19, align 4, !tbaa !11
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [4 x [2 x float]], ptr %18, i64 0, i64 %117
  %119 = getelementptr inbounds [2 x float], ptr %118, i64 0, i64 0
  store float %115, ptr %119, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %120 = load i32, ptr %22, align 4, !tbaa !11
  %121 = load i32, ptr %23, align 4, !tbaa !11
  %122 = call noundef float @_ZN10xraySource5fNjklEii(ptr noundef nonnull align 8 dereferenceable(48) %32, i32 noundef %120, i32 noundef %121)
  store float %122, ptr %24, align 4, !tbaa !9
  %123 = load float, ptr %17, align 4, !tbaa !9
  %124 = load float, ptr %24, align 4, !tbaa !9
  %125 = fmul float %123, %124
  %126 = load i32, ptr %19, align 4, !tbaa !11
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [4 x [2 x float]], ptr %18, i64 0, i64 %127
  %129 = getelementptr inbounds [2 x float], ptr %128, i64 0, i64 1
  store float %125, ptr %129, align 4, !tbaa !9
  %130 = load i32, ptr %19, align 4, !tbaa !11
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %132

132:                                              ; preds = %111, %104, %97
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %23, align 4, !tbaa !11
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %23, align 4, !tbaa !11
  br label %93, !llvm.loop !20

136:                                              ; preds = %96
  br label %137

137:                                              ; preds = %136
  %138 = load i32, ptr %22, align 4, !tbaa !11
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %22, align 4, !tbaa !11
  br label %88, !llvm.loop !22

140:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %141 = load i32, ptr %19, align 4, !tbaa !11
  store i32 %141, ptr %25, align 4, !tbaa !11
  %142 = load i32, ptr %25, align 4, !tbaa !11
  %143 = icmp sgt i32 %142, 0
  br i1 %143, label %144, label %226

144:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  store i32 0, ptr %26, align 4, !tbaa !11
  br label %145

145:                                              ; preds = %222, %144
  %146 = load i32, ptr %26, align 4, !tbaa !11
  %147 = load i32, ptr %25, align 4, !tbaa !11
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  store i32 8, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %225

150:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %151 = load i32, ptr %26, align 4, !tbaa !11
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [4 x [2 x float]], ptr %18, i64 0, i64 %152
  %154 = getelementptr inbounds [2 x float], ptr %153, i64 0, i64 0
  %155 = load float, ptr %154, align 8, !tbaa !9
  store float %155, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %156 = load i32, ptr %26, align 4, !tbaa !11
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [4 x [2 x float]], ptr %18, i64 0, i64 %157
  %159 = getelementptr inbounds [2 x float], ptr %158, i64 0, i64 1
  %160 = load float, ptr %159, align 4, !tbaa !9
  store float %160, ptr %28, align 4, !tbaa !9
  %161 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 1
  %162 = load i32, ptr %161, align 4, !tbaa !18
  %163 = icmp eq i32 %162, 74
  br i1 %163, label %164, label %209

164:                                              ; preds = %150
  %165 = load i32, ptr %25, align 4, !tbaa !11
  %166 = icmp eq i32 %165, 1
  br i1 %166, label %167, label %172

167:                                              ; preds = %164
  %168 = load float, ptr %28, align 4, !tbaa !9
  %169 = fpext float %168 to double
  %170 = fmul double %169, 3.000000e-01
  %171 = fptrunc double %170 to float
  store float %171, ptr %28, align 4, !tbaa !9
  br label %208

172:                                              ; preds = %164
  %173 = load i32, ptr %25, align 4, !tbaa !11
  %174 = icmp eq i32 %173, 2
  br i1 %174, label %175, label %189

175:                                              ; preds = %172
  %176 = load i32, ptr %26, align 4, !tbaa !11
  %177 = icmp eq i32 %176, 0
  br i1 %177, label %178, label %183

178:                                              ; preds = %175
  %179 = load float, ptr %28, align 4, !tbaa !9
  %180 = fpext float %179 to double
  %181 = fmul double %180, 3.000000e-01
  %182 = fptrunc double %181 to float
  store float %182, ptr %28, align 4, !tbaa !9
  br label %188

183:                                              ; preds = %175
  %184 = load float, ptr %28, align 4, !tbaa !9
  %185 = fpext float %184 to double
  %186 = fmul double %185, 2.200000e-01
  %187 = fptrunc double %186 to float
  store float %187, ptr %28, align 4, !tbaa !9
  br label %188

188:                                              ; preds = %183, %178
  br label %207

189:                                              ; preds = %172
  %190 = load i32, ptr %26, align 4, !tbaa !11
  %191 = icmp eq i32 %190, 0
  br i1 %191, label %192, label %197

192:                                              ; preds = %189
  %193 = load float, ptr %28, align 4, !tbaa !9
  %194 = fpext float %193 to double
  %195 = fmul double %194, 3.000000e-01
  %196 = fptrunc double %195 to float
  store float %196, ptr %28, align 4, !tbaa !9
  br label %206

197:                                              ; preds = %189
  %198 = load i32, ptr %26, align 4, !tbaa !11
  %199 = icmp eq i32 %198, 1
  br i1 %199, label %200, label %205

200:                                              ; preds = %197
  %201 = load float, ptr %28, align 4, !tbaa !9
  %202 = fpext float %201 to double
  %203 = fmul double %202, 2.200000e-01
  %204 = fptrunc double %203 to float
  store float %204, ptr %28, align 4, !tbaa !9
  br label %205

205:                                              ; preds = %200, %197
  br label %206

206:                                              ; preds = %205, %192
  br label %207

207:                                              ; preds = %206, %188
  br label %208

208:                                              ; preds = %207, %167
  br label %209

209:                                              ; preds = %208, %150
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %210 = load float, ptr %27, align 4, !tbaa !9
  %211 = call noundef float @_ZN10xraySource9gamma_invEf(ptr noundef nonnull align 8 dereferenceable(48) %32, float noundef %210)
  %212 = fpext float %211 to double
  %213 = fadd double 5.000000e-01, %212
  %214 = fptosi double %213 to i32
  store i32 %214, ptr %29, align 4, !tbaa !11
  %215 = load float, ptr %28, align 4, !tbaa !9
  %216 = load ptr, ptr %14, align 8, !tbaa !5
  %217 = load i32, ptr %29, align 4, !tbaa !11
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds float, ptr %216, i64 %218
  %220 = load float, ptr %219, align 4, !tbaa !9
  %221 = fadd float %220, %215
  store float %221, ptr %219, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %222

222:                                              ; preds = %209
  %223 = load i32, ptr %26, align 4, !tbaa !11
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %26, align 4, !tbaa !11
  br label %145, !llvm.loop !23

225:                                              ; preds = %149
  br label %226

226:                                              ; preds = %225, %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store float 1.000000e+00, ptr %30, align 4, !tbaa !9
  %227 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 0
  %228 = load float, ptr %227, align 8, !tbaa !16
  %229 = fpext float %228 to double
  %230 = fcmp ole double %229, 7.000000e+01
  br i1 %230, label %231, label %239

231:                                              ; preds = %226
  %232 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 0
  %233 = load float, ptr %232, align 8, !tbaa !16
  %234 = fpext float %233 to double
  %235 = call double @llvm.fmuladd.f64(double 6.413000e-02, double %234, double -1.525000e+00)
  %236 = call double @llvm.fabs.f64(double %235)
  %237 = fdiv double 1.000000e+00, %236
  %238 = fptrunc double %237 to float
  store float %238, ptr %30, align 4, !tbaa !9
  br label %261

239:                                              ; preds = %226
  %240 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 0
  %241 = load float, ptr %240, align 8, !tbaa !16
  %242 = fpext float %241 to double
  %243 = fcmp ole double %242, 1.400000e+02
  br i1 %243, label %244, label %259

244:                                              ; preds = %239
  %245 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 0
  %246 = load float, ptr %245, align 8, !tbaa !16
  %247 = fpext float %246 to double
  %248 = call double @llvm.fmuladd.f64(double -3.825000e-02, double %247, double 4.865000e+00)
  %249 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 0
  %250 = load float, ptr %249, align 8, !tbaa !16
  %251 = fpext float %250 to double
  %252 = fmul double 1.624000e-04, %251
  %253 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 0
  %254 = load float, ptr %253, align 8, !tbaa !16
  %255 = fpext float %254 to double
  %256 = call double @llvm.fmuladd.f64(double %252, double %255, double %248)
  %257 = fdiv double 1.000000e+00, %256
  %258 = fptrunc double %257 to float
  store float %258, ptr %30, align 4, !tbaa !9
  br label %260

259:                                              ; preds = %239
  store float 0x3FD7C3EBE0000000, ptr %30, align 4, !tbaa !9
  br label %260

260:                                              ; preds = %259, %244
  br label %261

261:                                              ; preds = %260, %231
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  store i32 0, ptr %31, align 4, !tbaa !11
  br label %262

262:                                              ; preds = %276, %261
  %263 = load i32, ptr %31, align 4, !tbaa !11
  %264 = getelementptr inbounds %class.xraySource, ptr %32, i32 0, i32 4
  %265 = load i32, ptr %264, align 8, !tbaa !19
  %266 = icmp slt i32 %263, %265
  br i1 %266, label %268, label %267

267:                                              ; preds = %262
  store i32 11, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  br label %279

268:                                              ; preds = %262
  %269 = load float, ptr %30, align 4, !tbaa !9
  %270 = load ptr, ptr %14, align 8, !tbaa !5
  %271 = load i32, ptr %31, align 4, !tbaa !11
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds float, ptr %270, i64 %272
  %274 = load float, ptr %273, align 4, !tbaa !9
  %275 = fmul float %274, %269
  store float %275, ptr %273, align 4, !tbaa !9
  br label %276

276:                                              ; preds = %268
  %277 = load i32, ptr %31, align 4, !tbaa !11
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %31, align 4, !tbaa !11
  br label %262, !llvm.loop !24

279:                                              ; preds = %267
  %280 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %280, ptr %7, align 8
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %281

281:                                              ; preds = %279, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %282

282:                                              ; preds = %281, %59, %45, %36
  %283 = load ptr, ptr %7, align 8
  ret ptr %283
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN10xraySource14bremsstrahlungEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN10xraySource4getJEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZN10xraySource4EjklEiii(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i32 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZN10xraySource4EabsEiii(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i32 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN10xraySource5fNjklEii(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZN10xraySource9gamma_invEf(ptr noundef nonnull align 8 dereferenceable(48), float noundef) #3 align 2

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

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

attributes #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 = { mustprogress 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 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 40}
!14 = !{!"_ZTS10xraySource", !10, i64 0, !12, i64 4, !10, i64 8, !6, i64 16, !12, i64 24, !10, i64 28, !10, i64 32, !6, i64 40}
!15 = !{!14, !6, i64 16}
!16 = !{!14, !10, i64 0}
!17 = !{!14, !10, i64 8}
!18 = !{!14, !12, i64 4}
!19 = !{!14, !12, i64 24}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}


; 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.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [93 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN10xraySource15simulateSpectraEffiPfi(ptr noundef nonnull align 8 dereferenceable(48) %0, float noundef %1, float noundef %2, i32 noundef %3, ptr noundef %4, i32 noundef %5) local_unnamed_addr #2 align 2 {
  %7 = alloca [4 x [2 x float]], align 16
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = icmp eq ptr %9, null
  %.sink126.sroa.gep = getelementptr inbounds i8, ptr %7, i64 4
  %.sink126.sroa.gep129 = getelementptr inbounds i8, ptr %7, i64 12
  br i1 %10, label %11, label %13

11:                                               ; preds = %6
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %174

13:                                               ; preds = %6
  %14 = fcmp olt float %1, 2.000000e+00
  %15 = fcmp ogt float %1, 2.000000e+04
  %or.cond = or i1 %14, %15
  br i1 %or.cond, label %16, label %18

16:                                               ; preds = %13
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 20000)
  br label %174

18:                                               ; preds = %13
  switch i32 %3, label %19 [
    i32 79, label %21
    i32 74, label %21
    i32 42, label %21
    i32 29, label %21
  ]

19:                                               ; preds = %18
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %174

21:                                               ; preds = %18, %18, %18, %18
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %4, ptr %22, align 8, !tbaa !12
  store float %1, ptr %0, align 8, !tbaa !13
  %23 = fpext float %2 to double
  %24 = fmul double %23, 0x400921FB54442D18
  %25 = fdiv double %24, 1.800000e+02
  %26 = fptrunc double %25 to float
  %27 = getelementptr inbounds i8, ptr %0, i64 8
  store float %26, ptr %27, align 8, !tbaa !14
  %28 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %3, ptr %28, align 4, !tbaa !15
  %29 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 %5, ptr %29, align 8, !tbaa !16
  %30 = tail call noundef ptr @_ZN10xraySource14bremsstrahlungEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
  %31 = icmp eq ptr %30, null
  br i1 %31, label %174, label %.preheader81

.preheader81:                                     ; preds = %21
  %32 = tail call noundef i32 @_ZN10xraySource4getJEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  %33 = load ptr, ptr %22, align 8, !tbaa !12
  %34 = load float, ptr %33, align 4, !tbaa !17
  %35 = load float, ptr %0, align 8, !tbaa !13
  %36 = tail call noundef float @_ZN10xraySource4EjklEiii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %32, i32 noundef 0, i32 noundef 0)
  %37 = fcmp ult float %36, %34
  br i1 %37, label %64, label %56

.preheader:                                       ; preds = %105
  switch i32 %.2.1.1, label %.preheader.split.preheader [
    i32 1, label %.loopexit.loopexit91
    i32 2, label %.preheader.split.us87.preheader
  ]

.preheader.split.us87.preheader:                  ; preds = %.preheader
  %38 = load float, ptr %7, align 16, !tbaa !17
  %39 = getelementptr inbounds i8, ptr %7, i64 4
  %40 = load float, ptr %39, align 4, !tbaa !17
  %41 = load i32, ptr %28, align 4, !tbaa !15
  %42 = icmp eq i32 %41, 74
  %43 = fpext float %40 to double
  %44 = fmul double %43, 3.000000e-01
  %45 = fptrunc double %44 to float
  %.071.us89.peel = select i1 %42, float %45, float %40
  %46 = tail call noundef float @_ZN10xraySource9gamma_invEf(ptr noundef nonnull align 8 dereferenceable(48) %0, float noundef %38)
  %47 = fpext float %46 to double
  %48 = fadd double %47, 5.000000e-01
  %49 = fptosi double %48 to i32
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds float, ptr %30, i64 %50
  %52 = load float, ptr %51, align 4, !tbaa !17
  %53 = fadd float %.071.us89.peel, %52
  store float %53, ptr %51, align 4, !tbaa !17
  %54 = getelementptr inbounds i8, ptr %7, i64 8
  %55 = load float, ptr %54, align 8, !tbaa !17
  br label %.loopexit.sink.split

.preheader.split.preheader:                       ; preds = %.preheader
  %wide.trip.count105 = zext nneg i32 %.2.1.1 to i64
  br label %.preheader.split

56:                                               ; preds = %.preheader81
  %57 = tail call noundef float @_ZN10xraySource4EabsEiii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %32, i32 noundef 0, i32 noundef 0)
  %58 = fcmp olt float %57, %35
  br i1 %58, label %59, label %64

59:                                               ; preds = %56
  %60 = tail call noundef float @_ZN10xraySource4EjklEiii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %32, i32 noundef 0, i32 noundef 0)
  store float %60, ptr %7, align 16, !tbaa !17
  %61 = tail call noundef float @_ZN10xraySource5fNjklEii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef 0, i32 noundef 0)
  %62 = fmul float %61, 0x4336345780000000
  %63 = getelementptr inbounds i8, ptr %7, i64 4
  store float %62, ptr %63, align 4, !tbaa !17
  br label %64

64:                                               ; preds = %.preheader81, %56, %59
  %.2 = phi i32 [ 1, %59 ], [ 0, %56 ], [ 0, %.preheader81 ]
  %65 = tail call noundef float @_ZN10xraySource4EjklEiii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %32, i32 noundef 0, i32 noundef 1)
  %66 = fcmp ult float %65, %34
  br i1 %66, label %.preheader81.1, label %67

67:                                               ; preds = %64
  %68 = tail call noundef float @_ZN10xraySource4EabsEiii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %32, i32 noundef 0, i32 noundef 1)
  %69 = fcmp olt float %68, %35
  br i1 %69, label %70, label %.preheader81.1

70:                                               ; preds = %67
  %71 = tail call noundef float @_ZN10xraySource4EjklEiii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %32, i32 noundef 0, i32 noundef 1)
  %72 = zext nneg i32 %.2 to i64
  %73 = getelementptr inbounds [4 x [2 x float]], ptr %7, i64 0, i64 %72
  store float %71, ptr %73, align 8, !tbaa !17
  %74 = tail call noundef float @_ZN10xraySource5fNjklEii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef 0, i32 noundef 1)
  %75 = fmul float %74, 0x4336345780000000
  %76 = getelementptr inbounds i8, ptr %73, i64 4
  store float %75, ptr %76, align 4, !tbaa !17
  %77 = add nuw nsw i32 %.2, 1
  br label %.preheader81.1

.preheader81.1:                                   ; preds = %70, %67, %64
  %.2.1 = phi i32 [ %77, %70 ], [ %.2, %67 ], [ %.2, %64 ]
  %78 = tail call noundef float @_ZN10xraySource4EjklEiii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %32, i32 noundef 1, i32 noundef 0)
  %79 = fcmp ult float %78, %34
  br i1 %79, label %91, label %80

80:                                               ; preds = %.preheader81.1
  %81 = tail call noundef float @_ZN10xraySource4EabsEiii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %32, i32 noundef 1, i32 noundef 0)
  %82 = fcmp olt float %81, %35
  br i1 %82, label %83, label %91

83:                                               ; preds = %80
  %84 = tail call noundef float @_ZN10xraySource4EjklEiii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %32, i32 noundef 1, i32 noundef 0)
  %85 = sext i32 %.2.1 to i64
  %86 = getelementptr inbounds [4 x [2 x float]], ptr %7, i64 0, i64 %85
  store float %84, ptr %86, align 8, !tbaa !17
  %87 = tail call noundef float @_ZN10xraySource5fNjklEii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef 1, i32 noundef 0)
  %88 = fmul float %87, 0x4336345780000000
  %89 = getelementptr inbounds i8, ptr %86, i64 4
  store float %88, ptr %89, align 4, !tbaa !17
  %90 = add nsw i32 %.2.1, 1
  br label %91

91:                                               ; preds = %83, %80, %.preheader81.1
  %.2.193 = phi i32 [ %90, %83 ], [ %.2.1, %80 ], [ %.2.1, %.preheader81.1 ]
  %.073.lcssa.fr.194 = freeze i32 %.2.193
  %92 = tail call noundef float @_ZN10xraySource4EjklEiii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %32, i32 noundef 1, i32 noundef 1)
  %93 = fcmp ult float %92, %34
  br i1 %93, label %105, label %94

94:                                               ; preds = %91
  %95 = tail call noundef float @_ZN10xraySource4EabsEiii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %32, i32 noundef 1, i32 noundef 1)
  %96 = fcmp olt float %95, %35
  br i1 %96, label %97, label %105

97:                                               ; preds = %94
  %98 = tail call noundef float @_ZN10xraySource4EjklEiii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %32, i32 noundef 1, i32 noundef 1)
  %99 = sext i32 %.073.lcssa.fr.194 to i64
  %100 = getelementptr inbounds [4 x [2 x float]], ptr %7, i64 0, i64 %99
  store float %98, ptr %100, align 8, !tbaa !17
  %101 = tail call noundef float @_ZN10xraySource5fNjklEii(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef 1, i32 noundef 1)
  %102 = fmul float %101, 0x4336345780000000
  %103 = getelementptr inbounds i8, ptr %100, i64 4
  store float %102, ptr %103, align 4, !tbaa !17
  %104 = add i32 %.073.lcssa.fr.194, 1
  br label %105

105:                                              ; preds = %97, %94, %91
  %.2.1.1 = phi i32 [ %104, %97 ], [ %.073.lcssa.fr.194, %94 ], [ %.073.lcssa.fr.194, %91 ]
  %106 = icmp sgt i32 %.2.1.1, 0
  br i1 %106, label %.preheader, label %.loopexit

.preheader.split:                                 ; preds = %.preheader.split.preheader, %123
  %indvars.iv102 = phi i64 [ 0, %.preheader.split.preheader ], [ %indvars.iv.next103, %123 ]
  %107 = getelementptr inbounds [4 x [2 x float]], ptr %7, i64 0, i64 %indvars.iv102
  %108 = load float, ptr %107, align 8, !tbaa !17
  %109 = getelementptr inbounds i8, ptr %107, i64 4
  %110 = load float, ptr %109, align 4, !tbaa !17
  %111 = load i32, ptr %28, align 4, !tbaa !15
  %112 = icmp eq i32 %111, 74
  br i1 %112, label %113, label %123

113:                                              ; preds = %.preheader.split
  %114 = trunc nuw nsw i64 %indvars.iv102 to i32
  switch i32 %114, label %123 [
    i32 0, label %115
    i32 1, label %119
  ]

115:                                              ; preds = %113
  %116 = fpext float %110 to double
  %117 = fmul double %116, 3.000000e-01
  %118 = fptrunc double %117 to float
  br label %123

119:                                              ; preds = %113
  %120 = fpext float %110 to double
  %121 = fmul double %120, 2.200000e-01
  %122 = fptrunc double %121 to float
  br label %123

123:                                              ; preds = %113, %115, %119, %.preheader.split
  %.071 = phi float [ %118, %115 ], [ %122, %119 ], [ %110, %.preheader.split ], [ %110, %113 ]
  %124 = tail call noundef float @_ZN10xraySource9gamma_invEf(ptr noundef nonnull align 8 dereferenceable(48) %0, float noundef %108)
  %125 = fpext float %124 to double
  %126 = fadd double %125, 5.000000e-01
  %127 = fptosi double %126 to i32
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds float, ptr %30, i64 %128
  %130 = load float, ptr %129, align 4, !tbaa !17
  %131 = fadd float %.071, %130
  store float %131, ptr %129, align 4, !tbaa !17
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %exitcond106.not = icmp eq i64 %indvars.iv.next103, %wide.trip.count105
  br i1 %exitcond106.not, label %.loopexit, label %.preheader.split, !llvm.loop !18

.loopexit.loopexit91:                             ; preds = %.preheader
  %132 = load float, ptr %7, align 16, !tbaa !17
  br label %.loopexit.sink.split

.loopexit.sink.split:                             ; preds = %.loopexit.loopexit91, %.preheader.split.us87.preheader
  %.sink126.sroa.phi = phi ptr [ %.sink126.sroa.gep, %.loopexit.loopexit91 ], [ %.sink126.sroa.gep129, %.preheader.split.us87.preheader ]
  %.sink122 = phi double [ 3.000000e-01, %.loopexit.loopexit91 ], [ 2.200000e-01, %.preheader.split.us87.preheader ]
  %.sink = phi float [ %132, %.loopexit.loopexit91 ], [ %55, %.preheader.split.us87.preheader ]
  %133 = load float, ptr %.sink126.sroa.phi, align 4, !tbaa !17
  %134 = load i32, ptr %28, align 4, !tbaa !15
  %135 = icmp eq i32 %134, 74
  %136 = fpext float %133 to double
  %137 = fmul double %.sink122, %136
  %138 = fptrunc double %137 to float
  %.071.us = select i1 %135, float %138, float %133
  %139 = tail call noundef float @_ZN10xraySource9gamma_invEf(ptr noundef nonnull align 8 dereferenceable(48) %0, float noundef %.sink)
  %140 = fpext float %139 to double
  %141 = fadd double %140, 5.000000e-01
  %142 = fptosi double %141 to i32
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds float, ptr %30, i64 %143
  %145 = load float, ptr %144, align 4, !tbaa !17
  %146 = fadd float %.071.us, %145
  store float %146, ptr %144, align 4, !tbaa !17
  br label %.loopexit

.loopexit:                                        ; preds = %123, %.loopexit.sink.split, %105
  %147 = load float, ptr %0, align 8, !tbaa !13
  %148 = fpext float %147 to double
  %149 = fcmp ugt float %147, 7.000000e+01
  br i1 %149, label %155, label %150

150:                                              ; preds = %.loopexit
  %151 = tail call double @llvm.fmuladd.f64(double %148, double 6.413000e-02, double -1.525000e+00)
  %152 = tail call double @llvm.fabs.f64(double %151)
  %153 = fdiv double 1.000000e+00, %152
  %154 = fptrunc double %153 to float
  br label %163

155:                                              ; preds = %.loopexit
  %156 = fcmp ugt float %147, 1.400000e+02
  br i1 %156, label %163, label %157

157:                                              ; preds = %155
  %158 = tail call double @llvm.fmuladd.f64(double %148, double -3.825000e-02, double 4.865000e+00)
  %159 = fmul double %148, 1.624000e-04
  %160 = tail call double @llvm.fmuladd.f64(double %159, double %148, double %158)
  %161 = fdiv double 1.000000e+00, %160
  %162 = fptrunc double %161 to float
  br label %163

163:                                              ; preds = %155, %157, %150
  %.069 = phi float [ %154, %150 ], [ %162, %157 ], [ 0x3FD7C3EBE0000000, %155 ]
  %164 = load i32, ptr %29, align 8, !tbaa !16
  %165 = icmp sgt i32 %164, 0
  br i1 %165, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %163
  %wide.trip.count110 = zext nneg i32 %164 to i64
  %min.iters.check = icmp ult i32 %164, 8
  br i1 %min.iters.check, label %.lr.ph.preheader128, label %vector.ph

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

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count110, 2147483640
  %broadcast.splatinsert = insertelement <4 x float> poison, float %.069, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %166 = getelementptr inbounds float, ptr %30, i64 %index
  %167 = getelementptr inbounds i8, ptr %166, i64 16
  %wide.load = load <4 x float>, ptr %166, align 4, !tbaa !17
  %wide.load127 = load <4 x float>, ptr %167, align 4, !tbaa !17
  %168 = fmul <4 x float> %broadcast.splat, %wide.load
  %169 = fmul <4 x float> %broadcast.splat, %wide.load127
  store <4 x float> %168, ptr %166, align 4, !tbaa !17
  store <4 x float> %169, ptr %167, align 4, !tbaa !17
  %index.next = add nuw i64 %index, 8
  %170 = icmp eq i64 %index.next, %n.vec
  br i1 %170, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count110
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader128

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %163
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %174

.lr.ph:                                           ; preds = %.lr.ph.preheader128, %.lr.ph
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %.lr.ph ], [ %indvars.iv107.ph, %.lr.ph.preheader128 ]
  %171 = getelementptr inbounds float, ptr %30, i64 %indvars.iv107
  %172 = load float, ptr %171, align 4, !tbaa !17
  %173 = fmul float %.069, %172
  store float %173, ptr %171, align 4, !tbaa !17
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %exitcond111.not = icmp eq i64 %indvars.iv.next108, %wide.trip.count110
  br i1 %exitcond111.not, label %._crit_edge, label %.lr.ph, !llvm.loop !23

174:                                              ; preds = %._crit_edge, %21, %19, %16, %11
  %.1 = phi ptr [ null, %11 ], [ null, %16 ], [ null, %19 ], [ %30, %._crit_edge ], [ null, %21 ]
  ret ptr %.1
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN10xraySource14bremsstrahlungEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN10xraySource4getJEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZN10xraySource4EjklEiii(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZN10xraySource4EabsEiii(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN10xraySource5fNjklEii(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZN10xraySource9gamma_invEf(ptr noundef nonnull align 8 dereferenceable(48), float noundef) local_unnamed_addr #3 align 2

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

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

attributes #0 = { nofree 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 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 = { mustprogress 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, !11, i64 40}
!6 = !{!"_ZTS10xraySource", !7, i64 0, !10, i64 4, !7, i64 8, !11, i64 16, !10, i64 24, !7, i64 28, !7, i64 32, !11, i64 40}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !11, i64 16}
!13 = !{!6, !7, i64 0}
!14 = !{!6, !7, i64 8}
!15 = !{!6, !10, i64 4}
!16 = !{!6, !10, i64 24}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19, !21, !22}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = distinct !{!23, !19, !22, !21}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass