; LLVM IR from stivalaa/EstimNetDirected :: src (equilibriumExpectation)

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

; Function Attrs: nounwind uwtable
define dso_local void @algorithm_S(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, i32 noundef %13, i32 noundef %14, double noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, i32 noundef %19, double noundef %20, i32 noundef %21, i32 noundef %22, i32 noundef %23, i32 noundef %24, i32 noundef %25) #0 {
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca double, align 8
  %43 = alloca ptr, align 8
  %44 = alloca ptr, align 8
  %45 = alloca ptr, align 8
  %46 = alloca i32, align 4
  %47 = alloca double, align 8
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca i32, align 4
  %54 = alloca i32, align 4
  %55 = alloca double, align 8
  %56 = alloca ptr, align 8
  %57 = alloca ptr, align 8
  %58 = alloca ptr, align 8
  %59 = alloca ptr, align 8
  %60 = alloca ptr, align 8
  %61 = alloca ptr, align 8
  %62 = alloca ptr, align 8
  %63 = alloca double, align 8
  %64 = alloca double, align 8
  %65 = alloca double, align 8
  store ptr %0, ptr %27, align 8, !tbaa !5
  store i32 %1, ptr %28, align 4, !tbaa !9
  store i32 %2, ptr %29, align 4, !tbaa !9
  store i32 %3, ptr %30, align 4, !tbaa !9
  store i32 %4, ptr %31, align 4, !tbaa !9
  store ptr %5, ptr %32, align 8, !tbaa !5
  store ptr %6, ptr %33, align 8, !tbaa !5
  store ptr %7, ptr %34, align 8, !tbaa !5
  store ptr %8, ptr %35, align 8, !tbaa !5
  store ptr %9, ptr %36, align 8, !tbaa !5
  store ptr %10, ptr %37, align 8, !tbaa !5
  store ptr %11, ptr %38, align 8, !tbaa !5
  store ptr %12, ptr %39, align 8, !tbaa !5
  store i32 %13, ptr %40, align 4, !tbaa !9
  store i32 %14, ptr %41, align 4, !tbaa !9
  store double %15, ptr %42, align 8, !tbaa !11
  store ptr %16, ptr %43, align 8, !tbaa !5
  store ptr %17, ptr %44, align 8, !tbaa !5
  store ptr %18, ptr %45, align 8, !tbaa !5
  store i32 %19, ptr %46, align 4, !tbaa !9
  store double %20, ptr %47, align 8, !tbaa !11
  store i32 %21, ptr %48, align 4, !tbaa !9
  store i32 %22, ptr %49, align 4, !tbaa !9
  store i32 %23, ptr %50, align 4, !tbaa !9
  store i32 %24, ptr %51, align 4, !tbaa !9
  store i32 %25, ptr %52, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #5
  %66 = load i32, ptr %28, align 4, !tbaa !9
  %67 = zext i32 %66 to i64
  %68 = mul i64 %67, 8
  %69 = call ptr @safe_malloc(i64 noundef %68)
  store ptr %69, ptr %56, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #5
  %70 = load i32, ptr %28, align 4, !tbaa !9
  %71 = zext i32 %70 to i64
  %72 = mul i64 %71, 8
  %73 = call ptr @safe_malloc(i64 noundef %72)
  store ptr %73, ptr %57, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #5
  %74 = load i32, ptr %28, align 4, !tbaa !9
  %75 = zext i32 %74 to i64
  %76 = mul i64 %75, 8
  %77 = call ptr @safe_malloc(i64 noundef %76)
  store ptr %77, ptr %58, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #5
  %78 = load i32, ptr %28, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = mul i64 %79, 8
  %81 = call ptr @safe_malloc(i64 noundef %80)
  store ptr %81, ptr %59, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #5
  %82 = load i32, ptr %28, align 4, !tbaa !9
  %83 = zext i32 %82 to i64
  %84 = mul i64 %83, 8
  %85 = call ptr @safe_malloc(i64 noundef %84)
  store ptr %85, ptr %60, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #5
  %86 = load i32, ptr %28, align 4, !tbaa !9
  %87 = zext i32 %86 to i64
  %88 = mul i64 %87, 8
  %89 = call ptr @safe_malloc(i64 noundef %88)
  store ptr %89, ptr %61, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #5
  %90 = load i32, ptr %28, align 4, !tbaa !9
  %91 = zext i32 %90 to i64
  %92 = call ptr @safe_calloc(i64 noundef %91, i64 noundef 8)
  store ptr %92, ptr %62, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #5
  store double 0.000000e+00, ptr %65, align 8, !tbaa !11
  %93 = load i32, ptr %46, align 4, !tbaa !9
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %95, label %102

95:                                               ; preds = %26
  %96 = load ptr, ptr %27, align 8, !tbaa !5
  %97 = load i32, ptr %48, align 4, !tbaa !9
  %98 = load i32, ptr %51, align 4, !tbaa !9
  %99 = load i32, ptr %49, align 4, !tbaa !9
  %100 = load i32, ptr %52, align 4, !tbaa !9
  %101 = call double @arcCorrection(ptr noundef %96, i32 noundef %97, i32 noundef %98, i32 noundef %99, i32 noundef %100)
  store double %101, ptr %64, align 8, !tbaa !11
  br label %102

102:                                              ; preds = %95, %26
  store i32 0, ptr %54, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %112, %102
  %104 = load i32, ptr %54, align 4, !tbaa !9
  %105 = load i32, ptr %28, align 4, !tbaa !9
  %106 = icmp ult i32 %104, %105
  br i1 %106, label %107, label %115

107:                                              ; preds = %103
  %108 = load ptr, ptr %43, align 8, !tbaa !5
  %109 = load i32, ptr %54, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds double, ptr %108, i64 %110
  store double 0.000000e+00, ptr %111, align 8, !tbaa !11
  br label %112

112:                                              ; preds = %107
  %113 = load i32, ptr %54, align 4, !tbaa !9
  %114 = add i32 %113, 1
  store i32 %114, ptr %54, align 4, !tbaa !9
  br label %103, !llvm.loop !13

115:                                              ; preds = %103
  store i32 0, ptr %53, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %354, %115
  %117 = load i32, ptr %53, align 4, !tbaa !9
  %118 = load i32, ptr %40, align 4, !tbaa !9
  %119 = icmp ult i32 %117, %118
  br i1 %119, label %120, label %357

120:                                              ; preds = %116
  %121 = load ptr, ptr %45, align 8, !tbaa !5
  %122 = load i32, ptr %53, align 4, !tbaa !9
  %123 = load i32, ptr %40, align 4, !tbaa !9
  %124 = sub i32 %122, %123
  %125 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef @.str, i32 noundef %124) #5
  %126 = load i32, ptr %46, align 4, !tbaa !9
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %158

128:                                              ; preds = %120
  %129 = load ptr, ptr %27, align 8, !tbaa !5
  %130 = load i32, ptr %28, align 4, !tbaa !9
  %131 = load i32, ptr %29, align 4, !tbaa !9
  %132 = load i32, ptr %30, align 4, !tbaa !9
  %133 = load i32, ptr %31, align 4, !tbaa !9
  %134 = load ptr, ptr %32, align 8, !tbaa !5
  %135 = load ptr, ptr %33, align 8, !tbaa !5
  %136 = load ptr, ptr %34, align 8, !tbaa !5
  %137 = load ptr, ptr %35, align 8, !tbaa !5
  %138 = load ptr, ptr %36, align 8, !tbaa !5
  %139 = load ptr, ptr %37, align 8, !tbaa !5
  %140 = load ptr, ptr %38, align 8, !tbaa !5
  %141 = load ptr, ptr %39, align 8, !tbaa !5
  %142 = load ptr, ptr %43, align 8, !tbaa !5
  %143 = load ptr, ptr %56, align 8, !tbaa !5
  %144 = load ptr, ptr %57, align 8, !tbaa !5
  %145 = load i32, ptr %41, align 4, !tbaa !9
  %146 = zext i32 %145 to i64
  %147 = load double, ptr %47, align 8, !tbaa !11
  %148 = load i32, ptr %48, align 4, !tbaa !9
  %149 = load i32, ptr %49, align 4, !tbaa !9
  %150 = load i32, ptr %51, align 4, !tbaa !9
  %151 = load i32, ptr %52, align 4, !tbaa !9
  %152 = call double @ifdSampler(ptr noundef %129, i32 noundef %130, i32 noundef %131, i32 noundef %132, i32 noundef %133, ptr noundef %134, ptr noundef %135, ptr noundef %136, ptr noundef %137, ptr noundef %138, ptr noundef %139, ptr noundef %140, ptr noundef %141, ptr noundef %142, ptr noundef %143, ptr noundef %144, i64 noundef %146, i32 noundef 0, double noundef %147, ptr noundef %63, ptr noundef %65, i32 noundef %148, i32 noundef %149, i32 noundef %150, i32 noundef %151)
  store double %152, ptr %55, align 8, !tbaa !11
  %153 = load ptr, ptr %45, align 8, !tbaa !5
  %154 = load double, ptr %65, align 8, !tbaa !11
  %155 = load double, ptr %64, align 8, !tbaa !11
  %156 = fsub double %154, %155
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %153, ptr noundef @.str.1, double noundef %156) #5
  br label %210

158:                                              ; preds = %120
  %159 = load i32, ptr %50, align 4, !tbaa !9
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %161, label %185

161:                                              ; preds = %158
  %162 = load ptr, ptr %27, align 8, !tbaa !5
  %163 = load i32, ptr %28, align 4, !tbaa !9
  %164 = load i32, ptr %29, align 4, !tbaa !9
  %165 = load i32, ptr %30, align 4, !tbaa !9
  %166 = load i32, ptr %31, align 4, !tbaa !9
  %167 = load ptr, ptr %32, align 8, !tbaa !5
  %168 = load ptr, ptr %33, align 8, !tbaa !5
  %169 = load ptr, ptr %34, align 8, !tbaa !5
  %170 = load ptr, ptr %35, align 8, !tbaa !5
  %171 = load ptr, ptr %36, align 8, !tbaa !5
  %172 = load ptr, ptr %37, align 8, !tbaa !5
  %173 = load ptr, ptr %38, align 8, !tbaa !5
  %174 = load ptr, ptr %39, align 8, !tbaa !5
  %175 = load ptr, ptr %43, align 8, !tbaa !5
  %176 = load ptr, ptr %56, align 8, !tbaa !5
  %177 = load ptr, ptr %57, align 8, !tbaa !5
  %178 = load i32, ptr %41, align 4, !tbaa !9
  %179 = zext i32 %178 to i64
  %180 = load i32, ptr %48, align 4, !tbaa !9
  %181 = load i32, ptr %49, align 4, !tbaa !9
  %182 = load i32, ptr %51, align 4, !tbaa !9
  %183 = load i32, ptr %52, align 4, !tbaa !9
  %184 = call double @tntSampler(ptr noundef %162, i32 noundef %163, i32 noundef %164, i32 noundef %165, i32 noundef %166, ptr noundef %167, ptr noundef %168, ptr noundef %169, ptr noundef %170, ptr noundef %171, ptr noundef %172, ptr noundef %173, ptr noundef %174, ptr noundef %175, ptr noundef %176, ptr noundef %177, i64 noundef %179, i32 noundef 0, i32 noundef %180, i32 noundef %181, i32 noundef %182, i32 noundef %183)
  store double %184, ptr %55, align 8, !tbaa !11
  br label %209

185:                                              ; preds = %158
  %186 = load ptr, ptr %27, align 8, !tbaa !5
  %187 = load i32, ptr %28, align 4, !tbaa !9
  %188 = load i32, ptr %29, align 4, !tbaa !9
  %189 = load i32, ptr %30, align 4, !tbaa !9
  %190 = load i32, ptr %31, align 4, !tbaa !9
  %191 = load ptr, ptr %32, align 8, !tbaa !5
  %192 = load ptr, ptr %33, align 8, !tbaa !5
  %193 = load ptr, ptr %34, align 8, !tbaa !5
  %194 = load ptr, ptr %35, align 8, !tbaa !5
  %195 = load ptr, ptr %36, align 8, !tbaa !5
  %196 = load ptr, ptr %37, align 8, !tbaa !5
  %197 = load ptr, ptr %38, align 8, !tbaa !5
  %198 = load ptr, ptr %39, align 8, !tbaa !5
  %199 = load ptr, ptr %43, align 8, !tbaa !5
  %200 = load ptr, ptr %56, align 8, !tbaa !5
  %201 = load ptr, ptr %57, align 8, !tbaa !5
  %202 = load i32, ptr %41, align 4, !tbaa !9
  %203 = zext i32 %202 to i64
  %204 = load i32, ptr %48, align 4, !tbaa !9
  %205 = load i32, ptr %49, align 4, !tbaa !9
  %206 = load i32, ptr %51, align 4, !tbaa !9
  %207 = load i32, ptr %52, align 4, !tbaa !9
  %208 = call double @basicSampler(ptr noundef %186, i32 noundef %187, i32 noundef %188, i32 noundef %189, i32 noundef %190, ptr noundef %191, ptr noundef %192, ptr noundef %193, ptr noundef %194, ptr noundef %195, ptr noundef %196, ptr noundef %197, ptr noundef %198, ptr noundef %199, ptr noundef %200, ptr noundef %201, i64 noundef %203, i32 noundef 0, i32 noundef %204, i32 noundef %205, i32 noundef %206, i32 noundef %207)
  store double %208, ptr %55, align 8, !tbaa !11
  br label %209

209:                                              ; preds = %185, %161
  br label %210

210:                                              ; preds = %209, %128
  store i32 0, ptr %54, align 4, !tbaa !9
  br label %211

211:                                              ; preds = %347, %210
  %212 = load i32, ptr %54, align 4, !tbaa !9
  %213 = load i32, ptr %28, align 4, !tbaa !9
  %214 = icmp ult i32 %212, %213
  br i1 %214, label %215, label %350

215:                                              ; preds = %211
  %216 = load ptr, ptr %57, align 8, !tbaa !5
  %217 = load i32, ptr %54, align 4, !tbaa !9
  %218 = zext i32 %217 to i64
  %219 = getelementptr inbounds double, ptr %216, i64 %218
  %220 = load double, ptr %219, align 8, !tbaa !11
  %221 = load ptr, ptr %56, align 8, !tbaa !5
  %222 = load i32, ptr %54, align 4, !tbaa !9
  %223 = zext i32 %222 to i64
  %224 = getelementptr inbounds double, ptr %221, i64 %223
  %225 = load double, ptr %224, align 8, !tbaa !11
  %226 = fsub double %220, %225
  %227 = load ptr, ptr %59, align 8, !tbaa !5
  %228 = load i32, ptr %54, align 4, !tbaa !9
  %229 = zext i32 %228 to i64
  %230 = getelementptr inbounds double, ptr %227, i64 %229
  store double %226, ptr %230, align 8, !tbaa !11
  %231 = load ptr, ptr %56, align 8, !tbaa !5
  %232 = load i32, ptr %54, align 4, !tbaa !9
  %233 = zext i32 %232 to i64
  %234 = getelementptr inbounds double, ptr %231, i64 %233
  %235 = load double, ptr %234, align 8, !tbaa !11
  %236 = load ptr, ptr %57, align 8, !tbaa !5
  %237 = load i32, ptr %54, align 4, !tbaa !9
  %238 = zext i32 %237 to i64
  %239 = getelementptr inbounds double, ptr %236, i64 %238
  %240 = load double, ptr %239, align 8, !tbaa !11
  %241 = fadd double %235, %240
  %242 = load ptr, ptr %58, align 8, !tbaa !5
  %243 = load i32, ptr %54, align 4, !tbaa !9
  %244 = zext i32 %243 to i64
  %245 = getelementptr inbounds double, ptr %242, i64 %244
  store double %241, ptr %245, align 8, !tbaa !11
  %246 = load ptr, ptr %59, align 8, !tbaa !5
  %247 = load i32, ptr %54, align 4, !tbaa !9
  %248 = zext i32 %247 to i64
  %249 = getelementptr inbounds double, ptr %246, i64 %248
  %250 = load double, ptr %249, align 8, !tbaa !11
  %251 = load ptr, ptr %59, align 8, !tbaa !5
  %252 = load i32, ptr %54, align 4, !tbaa !9
  %253 = zext i32 %252 to i64
  %254 = getelementptr inbounds double, ptr %251, i64 %253
  %255 = load double, ptr %254, align 8, !tbaa !11
  %256 = load ptr, ptr %62, align 8, !tbaa !5
  %257 = load i32, ptr %54, align 4, !tbaa !9
  %258 = zext i32 %257 to i64
  %259 = getelementptr inbounds double, ptr %256, i64 %258
  %260 = load double, ptr %259, align 8, !tbaa !11
  %261 = call double @llvm.fmuladd.f64(double %250, double %255, double %260)
  store double %261, ptr %259, align 8, !tbaa !11
  %262 = load ptr, ptr %60, align 8, !tbaa !5
  %263 = load i32, ptr %54, align 4, !tbaa !9
  %264 = zext i32 %263 to i64
  %265 = getelementptr inbounds double, ptr %262, i64 %264
  store double 0.000000e+00, ptr %265, align 8, !tbaa !11
  %266 = load ptr, ptr %58, align 8, !tbaa !5
  %267 = load i32, ptr %54, align 4, !tbaa !9
  %268 = zext i32 %267 to i64
  %269 = getelementptr inbounds double, ptr %266, i64 %268
  %270 = load double, ptr %269, align 8, !tbaa !11
  %271 = fcmp olt double %270, 0.000000e+00
  br i1 %271, label %279, label %272

272:                                              ; preds = %215
  %273 = load ptr, ptr %58, align 8, !tbaa !5
  %274 = load i32, ptr %54, align 4, !tbaa !9
  %275 = zext i32 %274 to i64
  %276 = getelementptr inbounds double, ptr %273, i64 %275
  %277 = load double, ptr %276, align 8, !tbaa !11
  %278 = fcmp ogt double %277, 0.000000e+00
  br i1 %278, label %279, label %297

279:                                              ; preds = %272, %215
  %280 = load double, ptr %42, align 8, !tbaa !11
  %281 = load ptr, ptr %58, align 8, !tbaa !5
  %282 = load i32, ptr %54, align 4, !tbaa !9
  %283 = zext i32 %282 to i64
  %284 = getelementptr inbounds double, ptr %281, i64 %283
  %285 = load double, ptr %284, align 8, !tbaa !11
  %286 = load ptr, ptr %58, align 8, !tbaa !5
  %287 = load i32, ptr %54, align 4, !tbaa !9
  %288 = zext i32 %287 to i64
  %289 = getelementptr inbounds double, ptr %286, i64 %288
  %290 = load double, ptr %289, align 8, !tbaa !11
  %291 = fmul double %285, %290
  %292 = fdiv double %280, %291
  %293 = load ptr, ptr %60, align 8, !tbaa !5
  %294 = load i32, ptr %54, align 4, !tbaa !9
  %295 = zext i32 %294 to i64
  %296 = getelementptr inbounds double, ptr %293, i64 %295
  store double %292, ptr %296, align 8, !tbaa !11
  br label %297

297:                                              ; preds = %279, %272
  %298 = load ptr, ptr %59, align 8, !tbaa !5
  %299 = load i32, ptr %54, align 4, !tbaa !9
  %300 = zext i32 %299 to i64
  %301 = getelementptr inbounds double, ptr %298, i64 %300
  %302 = load double, ptr %301, align 8, !tbaa !11
  %303 = fcmp olt double %302, 0.000000e+00
  %304 = zext i1 %303 to i64
  %305 = select i1 %303, i32 -1, i32 1
  %306 = sitofp i32 %305 to double
  %307 = load ptr, ptr %60, align 8, !tbaa !5
  %308 = load i32, ptr %54, align 4, !tbaa !9
  %309 = zext i32 %308 to i64
  %310 = getelementptr inbounds double, ptr %307, i64 %309
  %311 = load double, ptr %310, align 8, !tbaa !11
  %312 = fmul double %306, %311
  %313 = load ptr, ptr %59, align 8, !tbaa !5
  %314 = load i32, ptr %54, align 4, !tbaa !9
  %315 = zext i32 %314 to i64
  %316 = getelementptr inbounds double, ptr %313, i64 %315
  %317 = load double, ptr %316, align 8, !tbaa !11
  %318 = fmul double %312, %317
  %319 = load ptr, ptr %59, align 8, !tbaa !5
  %320 = load i32, ptr %54, align 4, !tbaa !9
  %321 = zext i32 %320 to i64
  %322 = getelementptr inbounds double, ptr %319, i64 %321
  %323 = load double, ptr %322, align 8, !tbaa !11
  %324 = fmul double %318, %323
  %325 = load ptr, ptr %61, align 8, !tbaa !5
  %326 = load i32, ptr %54, align 4, !tbaa !9
  %327 = zext i32 %326 to i64
  %328 = getelementptr inbounds double, ptr %325, i64 %327
  store double %324, ptr %328, align 8, !tbaa !11
  %329 = load ptr, ptr %61, align 8, !tbaa !5
  %330 = load i32, ptr %54, align 4, !tbaa !9
  %331 = zext i32 %330 to i64
  %332 = getelementptr inbounds double, ptr %329, i64 %331
  %333 = load double, ptr %332, align 8, !tbaa !11
  %334 = load ptr, ptr %43, align 8, !tbaa !5
  %335 = load i32, ptr %54, align 4, !tbaa !9
  %336 = zext i32 %335 to i64
  %337 = getelementptr inbounds double, ptr %334, i64 %336
  %338 = load double, ptr %337, align 8, !tbaa !11
  %339 = fadd double %338, %333
  store double %339, ptr %337, align 8, !tbaa !11
  %340 = load ptr, ptr %45, align 8, !tbaa !5
  %341 = load ptr, ptr %43, align 8, !tbaa !5
  %342 = load i32, ptr %54, align 4, !tbaa !9
  %343 = zext i32 %342 to i64
  %344 = getelementptr inbounds double, ptr %341, i64 %343
  %345 = load double, ptr %344, align 8, !tbaa !11
  %346 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %340, ptr noundef @.str.1, double noundef %345) #5
  br label %347

347:                                              ; preds = %297
  %348 = load i32, ptr %54, align 4, !tbaa !9
  %349 = add i32 %348, 1
  store i32 %349, ptr %54, align 4, !tbaa !9
  br label %211, !llvm.loop !15

350:                                              ; preds = %211
  %351 = load ptr, ptr %45, align 8, !tbaa !5
  %352 = load double, ptr %55, align 8, !tbaa !11
  %353 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %351, ptr noundef @.str.2, double noundef %352) #5
  br label %354

354:                                              ; preds = %350
  %355 = load i32, ptr %53, align 4, !tbaa !9
  %356 = add i32 %355, 1
  store i32 %356, ptr %53, align 4, !tbaa !9
  br label %116, !llvm.loop !16

357:                                              ; preds = %116
  store i32 0, ptr %54, align 4, !tbaa !9
  br label %358

358:                                              ; preds = %375, %357
  %359 = load i32, ptr %54, align 4, !tbaa !9
  %360 = load i32, ptr %28, align 4, !tbaa !9
  %361 = icmp ult i32 %359, %360
  br i1 %361, label %362, label %378

362:                                              ; preds = %358
  %363 = load i32, ptr %41, align 4, !tbaa !9
  %364 = uitofp i32 %363 to double
  %365 = load ptr, ptr %62, align 8, !tbaa !5
  %366 = load i32, ptr %54, align 4, !tbaa !9
  %367 = zext i32 %366 to i64
  %368 = getelementptr inbounds double, ptr %365, i64 %367
  %369 = load double, ptr %368, align 8, !tbaa !11
  %370 = fdiv double %364, %369
  %371 = load ptr, ptr %44, align 8, !tbaa !5
  %372 = load i32, ptr %54, align 4, !tbaa !9
  %373 = zext i32 %372 to i64
  %374 = getelementptr inbounds double, ptr %371, i64 %373
  store double %370, ptr %374, align 8, !tbaa !11
  br label %375

375:                                              ; preds = %362
  %376 = load i32, ptr %54, align 4, !tbaa !9
  %377 = add i32 %376, 1
  store i32 %377, ptr %54, align 4, !tbaa !9
  br label %358, !llvm.loop !17

378:                                              ; preds = %358
  %379 = load ptr, ptr %62, align 8, !tbaa !5
  call void @free(ptr noundef %379) #5
  %380 = load ptr, ptr %61, align 8, !tbaa !5
  call void @free(ptr noundef %380) #5
  %381 = load ptr, ptr %60, align 8, !tbaa !5
  call void @free(ptr noundef %381) #5
  %382 = load ptr, ptr %59, align 8, !tbaa !5
  call void @free(ptr noundef %382) #5
  %383 = load ptr, ptr %58, align 8, !tbaa !5
  call void @free(ptr noundef %383) #5
  %384 = load ptr, ptr %57, align 8, !tbaa !5
  call void @free(ptr noundef %384) #5
  %385 = load ptr, ptr %56, align 8, !tbaa !5
  call void @free(ptr noundef %385) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #5
  ret void
}

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

declare ptr @safe_malloc(i64 noundef) #2

declare ptr @safe_calloc(i64 noundef, i64 noundef) #2

declare double @arcCorrection(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

declare double @ifdSampler(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef, double noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

declare double @tntSampler(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

declare double @basicSampler(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

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

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

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

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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/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}
!17 = distinct !{!17, !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 [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @algorithm_S(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, i32 noundef %13, i32 noundef %14, double noundef %15, ptr noundef %16, ptr nocapture noundef writeonly %17, ptr nocapture noundef %18, i32 noundef %19, double noundef %20, i32 noundef %21, i32 noundef %22, i32 noundef %23, i32 noundef %24, i32 noundef %25) local_unnamed_addr #0 {
  %27 = ptrtoint ptr %17 to i64
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = zext i32 %1 to i64
  %31 = shl nuw nsw i64 %30, 3
  %32 = tail call ptr @safe_malloc(i64 noundef %31) #7
  %33 = tail call ptr @safe_malloc(i64 noundef %31) #7
  %34 = tail call ptr @safe_malloc(i64 noundef %31) #7
  %35 = tail call ptr @safe_malloc(i64 noundef %31) #7
  %36 = tail call ptr @safe_malloc(i64 noundef %31) #7
  %37 = tail call ptr @safe_malloc(i64 noundef %31) #7
  %38 = tail call ptr @safe_calloc(i64 noundef %30, i64 noundef 8) #7
  %39 = ptrtoint ptr %38 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #7
  store double 0.000000e+00, ptr %29, align 8, !tbaa !5
  %.not = icmp eq i32 %19, 0
  br i1 %.not, label %42, label %40

40:                                               ; preds = %26
  %41 = tail call double @arcCorrection(ptr noundef %0, i32 noundef %21, i32 noundef %24, i32 noundef %22, i32 noundef %25) #7
  br label %42

42:                                               ; preds = %40, %26
  %.0 = phi double [ %41, %40 ], [ undef, %26 ]
  %.not175 = icmp eq i32 %1, 0
  br i1 %.not175, label %.preheader166, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %42
  tail call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 %31, i1 false), !tbaa !5
  br label %.preheader166

.preheader166:                                    ; preds = %.lr.ph.preheader, %42
  %.not176 = icmp eq i32 %13, 0
  br i1 %.not176, label %.preheader, label %.lr.ph171

.lr.ph171:                                        ; preds = %.preheader166
  %43 = zext i32 %14 to i64
  %.not165 = icmp eq i32 %23, 0
  br label %57

.preheader:                                       ; preds = %._crit_edge, %.preheader166
  br i1 %.not175, label %._crit_edge174, label %.lr.ph173

.lr.ph173:                                        ; preds = %.preheader
  %44 = uitofp i32 %14 to double
  %min.iters.check = icmp eq i32 %1, 1
  %45 = sub i64 %27, %39
  %diff.check = icmp ult i64 %45, 16
  %or.cond187 = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond187, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph173
  %indvars.iv182.ph = phi i64 [ 0, %.lr.ph173 ], [ %n.vec, %middle.block ]
  %46 = sub nsw i64 %30, %indvars.iv182.ph
  %xtraiter = and i64 %46, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv182.prol = phi i64 [ %indvars.iv.next183.prol, %scalar.ph.prol ], [ %indvars.iv182.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %47 = getelementptr inbounds double, ptr %38, i64 %indvars.iv182.prol
  %48 = load double, ptr %47, align 8, !tbaa !5
  %49 = fdiv double %44, %48
  %50 = getelementptr inbounds double, ptr %17, i64 %indvars.iv182.prol
  store double %49, ptr %50, align 8, !tbaa !5
  %indvars.iv.next183.prol = add nuw nsw i64 %indvars.iv182.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !9

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv182.unr = phi i64 [ %indvars.iv182.ph, %scalar.ph.preheader ], [ %indvars.iv.next183.prol, %scalar.ph.prol ]
  %51 = sub nsw i64 %indvars.iv182.ph, %30
  %52 = icmp ugt i64 %51, -4
  br i1 %52, label %._crit_edge174, label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph173
  %n.vec = and i64 %30, 4294967294
  %broadcast.splatinsert = insertelement <2 x double> poison, double %44, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %53 = getelementptr inbounds double, ptr %38, i64 %index
  %wide.load = load <2 x double>, ptr %53, align 8, !tbaa !5
  %54 = fdiv <2 x double> %broadcast.splat, %wide.load
  %55 = getelementptr inbounds double, ptr %17, i64 %index
  store <2 x double> %54, ptr %55, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 2
  %56 = icmp eq i64 %index.next, %n.vec
  br i1 %56, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %30
  br i1 %cmp.n, label %._crit_edge174, label %scalar.ph.preheader

57:                                               ; preds = %.lr.ph171, %._crit_edge
  %.0159170 = phi i32 [ 0, %.lr.ph171 ], [ %104, %._crit_edge ]
  %58 = sub i32 %.0159170, %13
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str, i32 noundef %58) #7
  br i1 %.not, label %65, label %60

60:                                               ; preds = %57
  %61 = call double @ifdSampler(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %16, ptr noundef %32, ptr noundef %33, i64 noundef %43, i32 noundef 0, double noundef %20, ptr noundef nonnull %28, ptr noundef nonnull %29, i32 noundef %21, i32 noundef %22, i32 noundef %24, i32 noundef %25) #7
  %62 = load double, ptr %29, align 8, !tbaa !5
  %63 = fsub double %62, %.0
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.1, double noundef %63) #7
  br label %70

65:                                               ; preds = %57
  br i1 %.not165, label %68, label %66

66:                                               ; preds = %65
  %67 = call double @tntSampler(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %16, ptr noundef %32, ptr noundef %33, i64 noundef %43, i32 noundef 0, i32 noundef %21, i32 noundef %22, i32 noundef %24, i32 noundef %25) #7
  br label %70

68:                                               ; preds = %65
  %69 = call double @basicSampler(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %16, ptr noundef %32, ptr noundef %33, i64 noundef %43, i32 noundef 0, i32 noundef %21, i32 noundef %22, i32 noundef %24, i32 noundef %25) #7
  br label %70

70:                                               ; preds = %66, %68, %60
  %.0161 = phi double [ %61, %60 ], [ %67, %66 ], [ %69, %68 ]
  br i1 %.not175, label %._crit_edge, label %.lr.ph169

.lr.ph169:                                        ; preds = %70, %90
  %indvars.iv = phi i64 [ %indvars.iv.next, %90 ], [ 0, %70 ]
  %71 = getelementptr inbounds double, ptr %33, i64 %indvars.iv
  %72 = load double, ptr %71, align 8, !tbaa !5
  %73 = getelementptr inbounds double, ptr %32, i64 %indvars.iv
  %74 = load double, ptr %73, align 8, !tbaa !5
  %75 = fsub double %72, %74
  %76 = getelementptr inbounds double, ptr %35, i64 %indvars.iv
  store double %75, ptr %76, align 8, !tbaa !5
  %77 = load double, ptr %73, align 8, !tbaa !5
  %78 = load double, ptr %71, align 8, !tbaa !5
  %79 = fadd double %77, %78
  %80 = getelementptr inbounds double, ptr %34, i64 %indvars.iv
  store double %79, ptr %80, align 8, !tbaa !5
  %81 = load double, ptr %76, align 8, !tbaa !5
  %82 = getelementptr inbounds double, ptr %38, i64 %indvars.iv
  %83 = load double, ptr %82, align 8, !tbaa !5
  %84 = call double @llvm.fmuladd.f64(double %81, double %81, double %83)
  store double %84, ptr %82, align 8, !tbaa !5
  %85 = getelementptr inbounds double, ptr %36, i64 %indvars.iv
  store double 0.000000e+00, ptr %85, align 8, !tbaa !5
  %86 = load double, ptr %80, align 8, !tbaa !5
  %or.cond = fcmp ueq double %86, 0.000000e+00
  br i1 %or.cond, label %90, label %87

87:                                               ; preds = %.lr.ph169
  %88 = fmul double %86, %86
  %89 = fdiv double %15, %88
  store double %89, ptr %85, align 8, !tbaa !5
  br label %90

90:                                               ; preds = %.lr.ph169, %87
  %91 = phi double [ 0.000000e+00, %.lr.ph169 ], [ %89, %87 ]
  %92 = load double, ptr %76, align 8, !tbaa !5
  %93 = fcmp olt double %92, 0.000000e+00
  %94 = fneg double %91
  %95 = select i1 %93, double %94, double %91
  %96 = fmul double %92, %95
  %97 = fmul double %92, %96
  %98 = getelementptr inbounds double, ptr %37, i64 %indvars.iv
  store double %97, ptr %98, align 8, !tbaa !5
  %99 = getelementptr inbounds double, ptr %16, i64 %indvars.iv
  %100 = load double, ptr %99, align 8, !tbaa !5
  %101 = fadd double %100, %97
  store double %101, ptr %99, align 8, !tbaa !5
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.1, double noundef %101) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %30
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph169, !llvm.loop !15

._crit_edge:                                      ; preds = %90, %70
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.2, double noundef %.0161) #7
  %104 = add nuw i32 %.0159170, 1
  %exitcond181.not = icmp eq i32 %104, %13
  br i1 %exitcond181.not, label %.preheader, label %57, !llvm.loop !16

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv182 = phi i64 [ %indvars.iv.next183.3, %scalar.ph ], [ %indvars.iv182.unr, %scalar.ph.prol.loopexit ]
  %105 = getelementptr inbounds double, ptr %38, i64 %indvars.iv182
  %106 = load double, ptr %105, align 8, !tbaa !5
  %107 = fdiv double %44, %106
  %108 = getelementptr inbounds double, ptr %17, i64 %indvars.iv182
  store double %107, ptr %108, align 8, !tbaa !5
  %indvars.iv.next183 = add nuw nsw i64 %indvars.iv182, 1
  %109 = getelementptr inbounds double, ptr %38, i64 %indvars.iv.next183
  %110 = load double, ptr %109, align 8, !tbaa !5
  %111 = fdiv double %44, %110
  %112 = getelementptr inbounds double, ptr %17, i64 %indvars.iv.next183
  store double %111, ptr %112, align 8, !tbaa !5
  %indvars.iv.next183.1 = add nuw nsw i64 %indvars.iv182, 2
  %113 = getelementptr inbounds double, ptr %38, i64 %indvars.iv.next183.1
  %114 = load double, ptr %113, align 8, !tbaa !5
  %115 = fdiv double %44, %114
  %116 = getelementptr inbounds double, ptr %17, i64 %indvars.iv.next183.1
  store double %115, ptr %116, align 8, !tbaa !5
  %indvars.iv.next183.2 = add nuw nsw i64 %indvars.iv182, 3
  %117 = getelementptr inbounds double, ptr %38, i64 %indvars.iv.next183.2
  %118 = load double, ptr %117, align 8, !tbaa !5
  %119 = fdiv double %44, %118
  %120 = getelementptr inbounds double, ptr %17, i64 %indvars.iv.next183.2
  store double %119, ptr %120, align 8, !tbaa !5
  %indvars.iv.next183.3 = add nuw nsw i64 %indvars.iv182, 4
  %exitcond186.not.3 = icmp eq i64 %indvars.iv.next183.3, %30
  br i1 %exitcond186.not.3, label %._crit_edge174, label %scalar.ph, !llvm.loop !17

._crit_edge174:                                   ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %.preheader
  call void @free(ptr noundef %38) #7
  call void @free(ptr noundef %37) #7
  call void @free(ptr noundef %36) #7
  call void @free(ptr noundef %35) #7
  call void @free(ptr noundef %34) #7
  call void @free(ptr noundef %33) #7
  call void @free(ptr noundef %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #7
  ret void
}

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

declare ptr @safe_malloc(i64 noundef) local_unnamed_addr #2

declare ptr @safe_calloc(i64 noundef, i64 noundef) local_unnamed_addr #2

declare double @arcCorrection(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

declare double @ifdSampler(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef, double noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare double @tntSampler(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare double @basicSampler(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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 = { "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 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass