; LLVM IR from Discngine/fpocket :: src (mdpbase)

; 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.s_min_max_pockets = type { float, float, float, float, float, float }
%struct.s_mdparams = type { ptr, [2000 x i8], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, i32, i32, [3 x float], float, i16, [3 x i16] }
%struct.s_mdgrid = type { ptr, ptr, i32, i32, i32, float, i32 }

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @float_get_min_max_from_pockets(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local ptr @init_md_grid(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca ptr, align 8
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %19 = call noalias ptr @malloc(i64 noundef 40) #6
  store ptr %19, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store float 1.000000e+00, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = call i32 @grid_user_data_missing(ptr noundef %20)
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %26

23:                                               ; preds = %2
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = call ptr @float_get_min_max_from_pockets(ptr noundef %24)
  store ptr %25, ptr %7, align 8, !tbaa !5
  br label %29

26:                                               ; preds = %2
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call ptr @assign_min_max_from_user_input(ptr noundef %27)
  store ptr %28, ptr %7, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %26, %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.s_min_max_pockets, ptr %30, i32 0, i32 3
  %32 = load float, ptr %31, align 4, !tbaa !11
  store float %32, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.s_min_max_pockets, ptr %33, i32 0, i32 4
  %35 = load float, ptr %34, align 4, !tbaa !13
  store float %35, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.s_min_max_pockets, ptr %36, i32 0, i32 5
  %38 = load float, ptr %37, align 4, !tbaa !14
  store float %38, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.s_min_max_pockets, ptr %39, i32 0, i32 0
  %41 = load float, ptr %40, align 4, !tbaa !15
  store float %41, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.s_min_max_pockets, ptr %42, i32 0, i32 1
  %44 = load float, ptr %43, align 4, !tbaa !16
  store float %44, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.s_min_max_pockets, ptr %45, i32 0, i32 2
  %47 = load float, ptr %46, align 4, !tbaa !17
  store float %47, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store float 0.000000e+00, ptr %14, align 4, !tbaa !9
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  call void @my_free(ptr noundef %48)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.s_mdparams, ptr %49, i32 0, i32 22
  %51 = load float, ptr %50, align 4, !tbaa !18
  %52 = fpext float %51 to double
  %53 = fcmp ogt double %52, 0.000000e+00
  br i1 %53, label %54, label %58

54:                                               ; preds = %29
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.s_mdparams, ptr %55, i32 0, i32 22
  %57 = load float, ptr %56, align 4, !tbaa !18
  store float %57, ptr %6, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %54, %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = call i32 @grid_user_data_missing(ptr noundef %59)
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %58
  store float 1.000000e+00, ptr %18, align 4, !tbaa !9
  br label %64

63:                                               ; preds = %58
  store float 0.000000e+00, ptr %18, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %63, %62
  %65 = load float, ptr %6, align 4, !tbaa !9
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.s_mdgrid, ptr %66, i32 0, i32 5
  store float %65, ptr %67, align 4, !tbaa !22
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = call i32 @grid_user_data_missing(ptr noundef %68)
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %126

71:                                               ; preds = %64
  %72 = load float, ptr %8, align 4, !tbaa !9
  %73 = fpext float %72 to double
  %74 = load float, ptr %18, align 4, !tbaa !9
  %75 = fpext float %74 to double
  %76 = call double @llvm.fmuladd.f64(double 3.000000e+01, double %75, double %73)
  %77 = load float, ptr %11, align 4, !tbaa !9
  %78 = fpext float %77 to double
  %79 = fsub double %76, %78
  %80 = fptosi double %79 to i32
  %81 = sitofp i32 %80 to float
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.s_mdgrid, ptr %82, i32 0, i32 5
  %84 = load float, ptr %83, align 4, !tbaa !22
  %85 = fdiv float %81, %84
  %86 = fadd float 1.000000e+00, %85
  %87 = fptosi float %86 to i32
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.s_mdgrid, ptr %88, i32 0, i32 2
  store i32 %87, ptr %89, align 8, !tbaa !24
  %90 = load float, ptr %9, align 4, !tbaa !9
  %91 = fpext float %90 to double
  %92 = load float, ptr %18, align 4, !tbaa !9
  %93 = fpext float %92 to double
  %94 = call double @llvm.fmuladd.f64(double 3.000000e+01, double %93, double %91)
  %95 = load float, ptr %12, align 4, !tbaa !9
  %96 = fpext float %95 to double
  %97 = fsub double %94, %96
  %98 = fptosi double %97 to i32
  %99 = sitofp i32 %98 to float
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.s_mdgrid, ptr %100, i32 0, i32 5
  %102 = load float, ptr %101, align 4, !tbaa !22
  %103 = fdiv float %99, %102
  %104 = fadd float 1.000000e+00, %103
  %105 = fptosi float %104 to i32
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.s_mdgrid, ptr %106, i32 0, i32 3
  store i32 %105, ptr %107, align 4, !tbaa !25
  %108 = load float, ptr %10, align 4, !tbaa !9
  %109 = fpext float %108 to double
  %110 = load float, ptr %18, align 4, !tbaa !9
  %111 = fpext float %110 to double
  %112 = call double @llvm.fmuladd.f64(double 3.000000e+01, double %111, double %109)
  %113 = load float, ptr %13, align 4, !tbaa !9
  %114 = fpext float %113 to double
  %115 = fsub double %112, %114
  %116 = fptosi double %115 to i32
  %117 = sitofp i32 %116 to float
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.s_mdgrid, ptr %118, i32 0, i32 5
  %120 = load float, ptr %119, align 4, !tbaa !22
  %121 = fdiv float %117, %120
  %122 = fadd float 1.000000e+00, %121
  %123 = fptosi float %122 to i32
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.s_mdgrid, ptr %124, i32 0, i32 4
  store i32 %123, ptr %125, align 8, !tbaa !26
  br label %148

126:                                              ; preds = %64
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.s_mdparams, ptr %127, i32 0, i32 24
  %129 = getelementptr inbounds [3 x i16], ptr %128, i64 0, i64 0
  %130 = load i16, ptr %129, align 2, !tbaa !27
  %131 = zext i16 %130 to i32
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.s_mdgrid, ptr %132, i32 0, i32 2
  store i32 %131, ptr %133, align 8, !tbaa !24
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.s_mdparams, ptr %134, i32 0, i32 24
  %136 = getelementptr inbounds [3 x i16], ptr %135, i64 0, i64 1
  %137 = load i16, ptr %136, align 2, !tbaa !27
  %138 = zext i16 %137 to i32
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.s_mdgrid, ptr %139, i32 0, i32 3
  store i32 %138, ptr %140, align 4, !tbaa !25
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.s_mdparams, ptr %141, i32 0, i32 24
  %143 = getelementptr inbounds [3 x i16], ptr %142, i64 0, i64 2
  %144 = load i16, ptr %143, align 2, !tbaa !27
  %145 = zext i16 %144 to i32
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.s_mdgrid, ptr %146, i32 0, i32 4
  store i32 %145, ptr %147, align 8, !tbaa !26
  br label %148

148:                                              ; preds = %126, %71
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.s_mdgrid, ptr %149, i32 0, i32 2
  %151 = load i32, ptr %150, align 8, !tbaa !24
  %152 = sext i32 %151 to i64
  %153 = mul i64 8, %152
  %154 = call noalias ptr @malloc(i64 noundef %153) #6
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.s_mdgrid, ptr %155, i32 0, i32 0
  store ptr %154, ptr %156, align 8, !tbaa !28
  store i32 0, ptr %15, align 4, !tbaa !29
  br label %157

157:                                              ; preds = %229, %148
  %158 = load i32, ptr %15, align 4, !tbaa !29
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.s_mdgrid, ptr %159, i32 0, i32 2
  %161 = load i32, ptr %160, align 8, !tbaa !24
  %162 = icmp slt i32 %158, %161
  br i1 %162, label %163, label %232

163:                                              ; preds = %157
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.s_mdgrid, ptr %164, i32 0, i32 3
  %166 = load i32, ptr %165, align 4, !tbaa !25
  %167 = sext i32 %166 to i64
  %168 = mul i64 8, %167
  %169 = call noalias ptr @malloc(i64 noundef %168) #6
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.s_mdgrid, ptr %170, i32 0, i32 0
  %172 = load ptr, ptr %171, align 8, !tbaa !28
  %173 = load i32, ptr %15, align 4, !tbaa !29
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds ptr, ptr %172, i64 %174
  store ptr %169, ptr %175, align 8, !tbaa !5
  store i32 0, ptr %16, align 4, !tbaa !29
  br label %176

176:                                              ; preds = %225, %163
  %177 = load i32, ptr %16, align 4, !tbaa !29
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.s_mdgrid, ptr %178, i32 0, i32 3
  %180 = load i32, ptr %179, align 4, !tbaa !25
  %181 = icmp slt i32 %177, %180
  br i1 %181, label %182, label %228

182:                                              ; preds = %176
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.s_mdgrid, ptr %183, i32 0, i32 4
  %185 = load i32, ptr %184, align 8, !tbaa !26
  %186 = sext i32 %185 to i64
  %187 = mul i64 4, %186
  %188 = call noalias ptr @malloc(i64 noundef %187) #6
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.s_mdgrid, ptr %189, i32 0, i32 0
  %191 = load ptr, ptr %190, align 8, !tbaa !28
  %192 = load i32, ptr %15, align 4, !tbaa !29
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds ptr, ptr %191, i64 %193
  %195 = load ptr, ptr %194, align 8, !tbaa !5
  %196 = load i32, ptr %16, align 4, !tbaa !29
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds ptr, ptr %195, i64 %197
  store ptr %188, ptr %198, align 8, !tbaa !5
  store i32 0, ptr %17, align 4, !tbaa !29
  br label %199

199:                                              ; preds = %221, %182
  %200 = load i32, ptr %17, align 4, !tbaa !29
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.s_mdgrid, ptr %201, i32 0, i32 4
  %203 = load i32, ptr %202, align 8, !tbaa !26
  %204 = icmp slt i32 %200, %203
  br i1 %204, label %205, label %224

205:                                              ; preds = %199
  %206 = load float, ptr %14, align 4, !tbaa !9
  %207 = load ptr, ptr %5, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.s_mdgrid, ptr %207, i32 0, i32 0
  %209 = load ptr, ptr %208, align 8, !tbaa !28
  %210 = load i32, ptr %15, align 4, !tbaa !29
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds ptr, ptr %209, i64 %211
  %213 = load ptr, ptr %212, align 8, !tbaa !5
  %214 = load i32, ptr %16, align 4, !tbaa !29
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds ptr, ptr %213, i64 %215
  %217 = load ptr, ptr %216, align 8, !tbaa !5
  %218 = load i32, ptr %17, align 4, !tbaa !29
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds float, ptr %217, i64 %219
  store float %206, ptr %220, align 4, !tbaa !9
  br label %221

221:                                              ; preds = %205
  %222 = load i32, ptr %17, align 4, !tbaa !29
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %17, align 4, !tbaa !29
  br label %199, !llvm.loop !30

224:                                              ; preds = %199
  br label %225

225:                                              ; preds = %224
  %226 = load i32, ptr %16, align 4, !tbaa !29
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %16, align 4, !tbaa !29
  br label %176, !llvm.loop !32

228:                                              ; preds = %176
  br label %229

229:                                              ; preds = %228
  %230 = load i32, ptr %15, align 4, !tbaa !29
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %15, align 4, !tbaa !29
  br label %157, !llvm.loop !33

232:                                              ; preds = %157
  %233 = call noalias ptr @malloc(i64 noundef 12) #6
  %234 = load ptr, ptr %5, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.s_mdgrid, ptr %234, i32 0, i32 1
  store ptr %233, ptr %235, align 8, !tbaa !34
  %236 = load float, ptr %11, align 4, !tbaa !9
  %237 = fpext float %236 to double
  %238 = load float, ptr %18, align 4, !tbaa !9
  %239 = fpext float %238 to double
  %240 = call double @llvm.fmuladd.f64(double -1.500000e+01, double %239, double %237)
  %241 = fptrunc double %240 to float
  %242 = load ptr, ptr %5, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.s_mdgrid, ptr %242, i32 0, i32 1
  %244 = load ptr, ptr %243, align 8, !tbaa !34
  %245 = getelementptr inbounds float, ptr %244, i64 0
  store float %241, ptr %245, align 4, !tbaa !9
  %246 = load float, ptr %12, align 4, !tbaa !9
  %247 = fpext float %246 to double
  %248 = load float, ptr %18, align 4, !tbaa !9
  %249 = fpext float %248 to double
  %250 = call double @llvm.fmuladd.f64(double -1.500000e+01, double %249, double %247)
  %251 = fptrunc double %250 to float
  %252 = load ptr, ptr %5, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.s_mdgrid, ptr %252, i32 0, i32 1
  %254 = load ptr, ptr %253, align 8, !tbaa !34
  %255 = getelementptr inbounds float, ptr %254, i64 1
  store float %251, ptr %255, align 4, !tbaa !9
  %256 = load float, ptr %13, align 4, !tbaa !9
  %257 = fpext float %256 to double
  %258 = load float, ptr %18, align 4, !tbaa !9
  %259 = fpext float %258 to double
  %260 = call double @llvm.fmuladd.f64(double -1.500000e+01, double %259, double %257)
  %261 = fptrunc double %260 to float
  %262 = load ptr, ptr %5, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.s_mdgrid, ptr %262, i32 0, i32 1
  %264 = load ptr, ptr %263, align 8, !tbaa !34
  %265 = getelementptr inbounds float, ptr %264, i64 2
  store float %261, ptr %265, align 4, !tbaa !9
  %266 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret ptr %266
}

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

declare i32 @grid_user_data_missing(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local ptr @assign_min_max_from_user_input(ptr noundef) #1

declare void @my_free(ptr noundef) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !10, i64 12}
!12 = !{!"s_min_max_pockets", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!13 = !{!12, !10, i64 16}
!14 = !{!12, !10, i64 20}
!15 = !{!12, !10, i64 0}
!16 = !{!12, !10, i64 4}
!17 = !{!12, !10, i64 8}
!18 = !{!19, !10, i64 2164}
!19 = !{!"s_mdparams", !6, i64 0, !7, i64 8, !6, i64 2008, !6, i64 2016, !6, i64 2024, !6, i64 2032, !6, i64 2040, !6, i64 2048, !6, i64 2056, !6, i64 2064, !6, i64 2072, !6, i64 2080, !6, i64 2088, !6, i64 2096, !6, i64 2104, !6, i64 2112, !6, i64 2120, !20, i64 2128, !6, i64 2136, !20, i64 2144, !20, i64 2148, !7, i64 2152, !10, i64 2164, !21, i64 2168, !7, i64 2170}
!20 = !{!"int", !7, i64 0}
!21 = !{!"short", !7, i64 0}
!22 = !{!23, !10, i64 28}
!23 = !{!"s_mdgrid", !6, i64 0, !6, i64 8, !20, i64 16, !20, i64 20, !20, i64 24, !10, i64 28, !20, i64 32}
!24 = !{!23, !20, i64 16}
!25 = !{!23, !20, i64 20}
!26 = !{!23, !20, i64 24}
!27 = !{!21, !21, i64 0}
!28 = !{!23, !6, i64 0}
!29 = !{!20, !20, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = distinct !{!33, !31}
!34 = !{!23, !6, i64 8}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nounwind uwtable
declare dso_local ptr @float_get_min_max_from_pockets(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noalias noundef ptr @init_md_grid(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = tail call noalias dereferenceable_or_null(40) ptr @malloc(i64 noundef 40) #6
  %4 = tail call i32 @grid_user_data_missing(ptr noundef %1) #7
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %7, label %5

5:                                                ; preds = %2
  %6 = tail call ptr @float_get_min_max_from_pockets(ptr noundef %0)
  br label %9

7:                                                ; preds = %2
  %8 = tail call ptr @assign_min_max_from_user_input(ptr noundef %1)
  br label %9

9:                                                ; preds = %7, %5
  %.074 = phi ptr [ %6, %5 ], [ %8, %7 ]
  %10 = getelementptr inbounds i8, ptr %.074, i64 12
  %11 = load <2 x float>, ptr %10, align 4, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %.074, i64 20
  %13 = load float, ptr %12, align 4, !tbaa !9
  %14 = load <2 x float>, ptr %.074, align 4, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %.074, i64 8
  %16 = load float, ptr %15, align 4, !tbaa !11
  tail call void @my_free(ptr noundef nonnull %.074) #7
  %17 = getelementptr inbounds i8, ptr %1, i64 2164
  %18 = load float, ptr %17, align 4, !tbaa !12
  %19 = fcmp ogt float %18, 0.000000e+00
  %.073 = select i1 %19, float %18, float 1.000000e+00
  %20 = tail call i32 @grid_user_data_missing(ptr noundef %1) #7
  %.not75 = icmp eq i32 %20, 0
  %.0 = select i1 %.not75, double 0.000000e+00, double 1.000000e+00
  %21 = getelementptr inbounds i8, ptr %3, i64 28
  store float %.073, ptr %21, align 4, !tbaa !17
  %22 = tail call i32 @grid_user_data_missing(ptr noundef %1) #7
  %.not76 = icmp eq i32 %22, 0
  br i1 %.not76, label %46, label %23

23:                                               ; preds = %9
  %24 = fpext <2 x float> %11 to <2 x double>
  %25 = insertelement <2 x double> poison, double %.0, i64 0
  %26 = shufflevector <2 x double> %25, <2 x double> poison, <2 x i32> zeroinitializer
  %27 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> <double 3.000000e+01, double 3.000000e+01>, <2 x double> %24)
  %28 = fpext <2 x float> %14 to <2 x double>
  %29 = fsub <2 x double> %27, %28
  %30 = fptosi <2 x double> %29 to <2 x i32>
  %31 = sitofp <2 x i32> %30 to <2 x float>
  %32 = insertelement <2 x float> poison, float %.073, i64 0
  %33 = shufflevector <2 x float> %32, <2 x float> poison, <2 x i32> zeroinitializer
  %34 = fdiv <2 x float> %31, %33
  %35 = fadd <2 x float> %34, <float 1.000000e+00, float 1.000000e+00>
  %36 = fptosi <2 x float> %35 to <2 x i32>
  %37 = fpext float %13 to double
  %38 = tail call double @llvm.fmuladd.f64(double %.0, double 3.000000e+01, double %37)
  %39 = fpext float %16 to double
  %40 = fsub double %38, %39
  %41 = fptosi double %40 to i32
  %42 = sitofp i32 %41 to float
  %43 = fdiv float %42, %.073
  %44 = fadd float %43, 1.000000e+00
  %45 = fptosi float %44 to i32
  br label %53

46:                                               ; preds = %9
  %47 = getelementptr inbounds i8, ptr %1, i64 2170
  %48 = load <2 x i16>, ptr %47, align 2, !tbaa !19
  %49 = zext <2 x i16> %48 to <2 x i32>
  %50 = getelementptr inbounds i8, ptr %1, i64 2174
  %51 = load i16, ptr %50, align 2, !tbaa !19
  %52 = zext i16 %51 to i32
  br label %53

53:                                               ; preds = %46, %23
  %54 = phi i32 [ %52, %46 ], [ %45, %23 ]
  %55 = phi <2 x i32> [ %49, %46 ], [ %36, %23 ]
  %56 = getelementptr inbounds i8, ptr %3, i64 16
  store <2 x i32> %55, ptr %56, align 8
  %57 = getelementptr inbounds i8, ptr %3, i64 24
  store i32 %54, ptr %57, align 8
  %58 = extractelement <2 x i32> %55, i64 0
  %59 = sext i32 %58 to i64
  %60 = shl nsw i64 %59, 3
  %61 = tail call noalias ptr @malloc(i64 noundef %60) #6
  store ptr %61, ptr %3, align 8, !tbaa !20
  %62 = icmp sgt i32 %58, 0
  br i1 %62, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %53
  %63 = extractelement <2 x i32> %55, i64 1
  %64 = sext i32 %63 to i64
  %65 = shl nsw i64 %64, 3
  %66 = icmp sgt i32 %63, 0
  br i1 %66, label %.lr.ph.split.us, label %.lr.ph.split.preheader

.lr.ph.split.preheader:                           ; preds = %.lr.ph
  %wide.trip.count = zext nneg i32 %58 to i64
  br label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph
  %67 = sext i32 %54 to i64
  %68 = shl nsw i64 %67, 2
  %69 = icmp sgt i32 %54, 0
  br i1 %69, label %.lr.ph80.us.us.preheader, label %.lr.ph80.us.preheader

.lr.ph80.us.preheader:                            ; preds = %.lr.ph.split.us
  %wide.trip.count97 = zext nneg i32 %58 to i64
  %wide.trip.count92 = zext nneg i32 %63 to i64
  br label %.lr.ph80.us

.lr.ph80.us.us.preheader:                         ; preds = %.lr.ph.split.us
  %70 = zext nneg i32 %54 to i64
  %71 = shl nuw nsw i64 %70, 2
  %wide.trip.count110 = zext nneg i32 %58 to i64
  %wide.trip.count105 = zext nneg i32 %63 to i64
  br label %.lr.ph80.us.us

.lr.ph80.us.us:                                   ; preds = %.lr.ph80.us.us.preheader, %._crit_edge81.split.us.us.us
  %indvars.iv107 = phi i64 [ 0, %.lr.ph80.us.us.preheader ], [ %indvars.iv.next108, %._crit_edge81.split.us.us.us ]
  %72 = tail call noalias ptr @malloc(i64 noundef %65) #6
  %73 = getelementptr inbounds ptr, ptr %61, i64 %indvars.iv107
  store ptr %72, ptr %73, align 8, !tbaa !21
  br label %.lr.ph.us.us.us

.lr.ph.us.us.us:                                  ; preds = %.lr.ph.us.us.us, %.lr.ph80.us.us
  %74 = phi ptr [ %77, %.lr.ph.us.us.us ], [ %72, %.lr.ph80.us.us ]
  %indvars.iv102 = phi i64 [ %indvars.iv.next103, %.lr.ph.us.us.us ], [ 0, %.lr.ph80.us.us ]
  %75 = tail call noalias ptr @malloc(i64 noundef %68) #6
  %76 = getelementptr inbounds ptr, ptr %74, i64 %indvars.iv102
  store ptr %75, ptr %76, align 8, !tbaa !21
  %77 = load ptr, ptr %73, align 8, !tbaa !21
  %78 = getelementptr inbounds ptr, ptr %77, i64 %indvars.iv102
  %79 = load ptr, ptr %78, align 8, !tbaa !21
  tail call void @llvm.memset.p0.i64(ptr align 4 %79, i8 0, i64 %71, i1 false), !tbaa !5
  %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 %._crit_edge81.split.us.us.us, label %.lr.ph.us.us.us, !llvm.loop !22

._crit_edge81.split.us.us.us:                     ; preds = %.lr.ph.us.us.us
  %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.ph80.us.us, !llvm.loop !24

.lr.ph80.us:                                      ; preds = %.lr.ph80.us.preheader, %._crit_edge81.split.us84
  %indvars.iv94 = phi i64 [ 0, %.lr.ph80.us.preheader ], [ %indvars.iv.next95, %._crit_edge81.split.us84 ]
  %80 = tail call noalias ptr @malloc(i64 noundef %65) #6
  %81 = getelementptr inbounds ptr, ptr %61, i64 %indvars.iv94
  store ptr %80, ptr %81, align 8, !tbaa !21
  br label %82

82:                                               ; preds = %.lr.ph80.us, %82
  %indvars.iv89 = phi i64 [ 0, %.lr.ph80.us ], [ %indvars.iv.next90, %82 ]
  %83 = tail call noalias ptr @malloc(i64 noundef %68) #6
  %84 = load ptr, ptr %81, align 8, !tbaa !21
  %85 = getelementptr inbounds ptr, ptr %84, i64 %indvars.iv89
  store ptr %83, ptr %85, align 8, !tbaa !21
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count92
  br i1 %exitcond93.not, label %._crit_edge81.split.us84, label %82, !llvm.loop !22

._crit_edge81.split.us84:                         ; preds = %82
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %exitcond98.not = icmp eq i64 %indvars.iv.next95, %wide.trip.count97
  br i1 %exitcond98.not, label %._crit_edge, label %.lr.ph80.us, !llvm.loop !24

.lr.ph.split:                                     ; preds = %.lr.ph.split.preheader, %.lr.ph.split
  %indvars.iv = phi i64 [ 0, %.lr.ph.split.preheader ], [ %indvars.iv.next, %.lr.ph.split ]
  %86 = tail call noalias ptr @malloc(i64 noundef %65) #6
  %87 = getelementptr inbounds ptr, ptr %61, i64 %indvars.iv
  store ptr %86, ptr %87, align 8, !tbaa !21
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !24

._crit_edge:                                      ; preds = %.lr.ph.split, %._crit_edge81.split.us84, %._crit_edge81.split.us.us.us, %53
  %88 = tail call noalias dereferenceable_or_null(12) ptr @malloc(i64 noundef 12) #6
  %89 = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %88, ptr %89, align 8, !tbaa !25
  %90 = fpext <2 x float> %14 to <2 x double>
  %91 = insertelement <2 x double> poison, double %.0, i64 0
  %92 = shufflevector <2 x double> %91, <2 x double> poison, <2 x i32> zeroinitializer
  %93 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %92, <2 x double> <double -1.500000e+01, double -1.500000e+01>, <2 x double> %90)
  %94 = fptrunc <2 x double> %93 to <2 x float>
  store <2 x float> %94, ptr %88, align 4, !tbaa !5
  %95 = fpext float %16 to double
  %96 = tail call double @llvm.fmuladd.f64(double %.0, double -1.500000e+01, double %95)
  %97 = fptrunc double %96 to float
  %98 = getelementptr inbounds i8, ptr %88, i64 8
  store float %97, ptr %98, align 4, !tbaa !5
  ret ptr %3
}

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

declare i32 @grid_user_data_missing(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @assign_min_max_from_user_input(ptr noundef) local_unnamed_addr #0

declare void @my_free(ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #5

attributes #0 = { 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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 20}
!10 = !{!"s_min_max_pockets", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20}
!11 = !{!10, !6, i64 8}
!12 = !{!13, !6, i64 2164}
!13 = !{!"s_mdparams", !14, i64 0, !7, i64 8, !14, i64 2008, !14, i64 2016, !14, i64 2024, !14, i64 2032, !14, i64 2040, !14, i64 2048, !14, i64 2056, !14, i64 2064, !14, i64 2072, !14, i64 2080, !14, i64 2088, !14, i64 2096, !14, i64 2104, !14, i64 2112, !14, i64 2120, !15, i64 2128, !14, i64 2136, !15, i64 2144, !15, i64 2148, !7, i64 2152, !6, i64 2164, !16, i64 2168, !7, i64 2170}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!18, !6, i64 28}
!18 = !{!"s_mdgrid", !14, i64 0, !14, i64 8, !15, i64 16, !15, i64 20, !15, i64 24, !6, i64 28, !15, i64 32}
!19 = !{!16, !16, i64 0}
!20 = !{!18, !14, i64 0}
!21 = !{!14, !14, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!18, !14, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass