; LLVM IR from frozein/DoonEngine :: src/DoonEngine (voxel)

; 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.DNvoxel = type { i8, %union.QMvec3, %struct.DNcolor }
%union.QMvec3 = type { [3 x float] }
%struct.DNcolor = type { i8, i8, i8 }
%struct.DNivec3 = type { i32, i32, i32 }
%struct.anon = type { float, float, float }

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @DN_in_map_bounds(ptr noundef, i64, i32) #2

; Function Attrs: nounwind uwtable
declare dso_local void @DN_get_voxel(ptr dead_on_unwind noalias writable sret(%struct.DNvoxel) align 4, ptr noundef, i64, i32, i64, i32) #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @DN_does_voxel_exist(ptr noundef, i64, i32, i64, i32) #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @DN_does_chunk_exist(ptr noundef, i64, i32) #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @DN_step_map(ptr noundef %0, <2 x float> %1, float %2, <2 x float> %3, float %4, i32 noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #3 {
  %10 = alloca i1, align 1
  %11 = alloca %union.QMvec3, align 4
  %12 = alloca { <2 x float>, float }, align 4
  %13 = alloca %union.QMvec3, align 4
  %14 = alloca { <2 x float>, float }, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %struct.DNivec3, align 4
  %21 = alloca %union.QMvec3, align 4
  %22 = alloca { <2 x float>, float }, align 4
  %23 = alloca { <2 x float>, float }, align 8
  %24 = alloca %union.QMvec3, align 4
  %25 = alloca %union.QMvec3, align 4
  %26 = alloca %struct.DNivec3, align 4
  %27 = alloca %union.QMvec3, align 4
  %28 = alloca %struct.DNivec3, align 4
  %29 = alloca %union.QMvec3, align 4
  %30 = alloca i32, align 4
  %31 = alloca %struct.DNivec3, align 4
  %32 = alloca %struct.DNivec3, align 4
  %33 = alloca { i64, i32 }, align 4
  %34 = alloca { i64, i32 }, align 4
  %35 = alloca { i64, i32 }, align 4
  %36 = alloca { i64, i32 }, align 4
  %37 = alloca { i64, i32 }, align 4
  %38 = alloca %struct.DNvoxel, align 4
  %39 = alloca { i64, i32 }, align 4
  %40 = alloca { i64, i32 }, align 4
  %41 = alloca i32, align 4
  %42 = alloca %struct.DNivec3, align 4
  %43 = alloca %struct.DNivec3, align 4
  %44 = alloca %struct.DNivec3, align 4
  %45 = alloca %struct.DNivec3, align 4
  %46 = getelementptr inbounds { <2 x float>, float }, ptr %12, i32 0, i32 0
  store <2 x float> %1, ptr %46, align 4
  %47 = getelementptr inbounds { <2 x float>, float }, ptr %12, i32 0, i32 1
  store float %2, ptr %47, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %12, i64 12, i1 false)
  %48 = getelementptr inbounds { <2 x float>, float }, ptr %14, i32 0, i32 0
  store <2 x float> %3, ptr %48, align 4
  %49 = getelementptr inbounds { <2 x float>, float }, ptr %14, i32 0, i32 1
  store float %4, ptr %49, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %14, i64 12, i1 false)
  store ptr %0, ptr %15, align 8, !tbaa !5
  store i32 %5, ptr %16, align 4, !tbaa !9
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  %50 = load ptr, ptr %19, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.DNivec3, ptr %20, i32 0, i32 0
  store i32 -1000, ptr %51, align 4, !tbaa !11
  %52 = getelementptr inbounds %struct.DNivec3, ptr %20, i32 0, i32 1
  store i32 -1000, ptr %52, align 4, !tbaa !13
  %53 = getelementptr inbounds %struct.DNivec3, ptr %20, i32 0, i32 2
  store i32 -1000, ptr %53, align 4, !tbaa !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %50, ptr align 4 %20, i64 12, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %13, i64 12, i1 false)
  %54 = getelementptr inbounds { <2 x float>, float }, ptr %22, i32 0, i32 0
  %55 = load <2 x float>, ptr %54, align 4
  %56 = getelementptr inbounds { <2 x float>, float }, ptr %22, i32 0, i32 1
  %57 = load float, ptr %56, align 4
  %58 = call { <2 x float>, float } @DN_vec3_scale(<2 x float> %55, float %57, float noundef 8.000000e+00)
  %59 = getelementptr inbounds %union.QMvec3, ptr %21, i32 0, i32 0
  store { <2 x float>, float } %58, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %59, ptr align 8 %23, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %21, i64 12, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #6
  %60 = getelementptr inbounds %struct.anon, ptr %11, i32 0, i32 0
  %61 = load float, ptr %60, align 4, !tbaa !17
  %62 = fdiv float 1.000000e+00, %61
  store float %62, ptr %24, align 4, !tbaa !18
  %63 = getelementptr inbounds float, ptr %24, i64 1
  %64 = getelementptr inbounds %struct.anon, ptr %11, i32 0, i32 1
  %65 = load float, ptr %64, align 4, !tbaa !17
  %66 = fdiv float 1.000000e+00, %65
  store float %66, ptr %63, align 4, !tbaa !18
  %67 = getelementptr inbounds float, ptr %24, i64 2
  %68 = getelementptr inbounds %struct.anon, ptr %11, i32 0, i32 2
  %69 = load float, ptr %68, align 4, !tbaa !17
  %70 = fdiv float 1.000000e+00, %69
  store float %70, ptr %67, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #6
  %71 = getelementptr inbounds %struct.anon, ptr %11, i32 0, i32 0
  %72 = load float, ptr %71, align 4, !tbaa !17
  %73 = fcmp ogt float %72, 0.000000e+00
  br i1 %73, label %74, label %75

74:                                               ; preds = %9
  br label %81

75:                                               ; preds = %9
  %76 = getelementptr inbounds %struct.anon, ptr %11, i32 0, i32 0
  %77 = load float, ptr %76, align 4, !tbaa !17
  %78 = fcmp olt float %77, 0.000000e+00
  %79 = zext i1 %78 to i64
  %80 = select i1 %78, i32 -1, i32 0
  br label %81

81:                                               ; preds = %75, %74
  %82 = phi i32 [ 1, %74 ], [ %80, %75 ]
  %83 = sitofp i32 %82 to float
  store float %83, ptr %25, align 4, !tbaa !18
  %84 = getelementptr inbounds float, ptr %25, i64 1
  %85 = getelementptr inbounds %struct.anon, ptr %11, i32 0, i32 1
  %86 = load float, ptr %85, align 4, !tbaa !17
  %87 = fcmp ogt float %86, 0.000000e+00
  br i1 %87, label %88, label %89

88:                                               ; preds = %81
  br label %95

89:                                               ; preds = %81
  %90 = getelementptr inbounds %struct.anon, ptr %11, i32 0, i32 1
  %91 = load float, ptr %90, align 4, !tbaa !17
  %92 = fcmp olt float %91, 0.000000e+00
  %93 = zext i1 %92 to i64
  %94 = select i1 %92, i32 -1, i32 0
  br label %95

95:                                               ; preds = %89, %88
  %96 = phi i32 [ 1, %88 ], [ %94, %89 ]
  %97 = sitofp i32 %96 to float
  store float %97, ptr %84, align 4, !tbaa !18
  %98 = getelementptr inbounds float, ptr %25, i64 2
  %99 = getelementptr inbounds %struct.anon, ptr %11, i32 0, i32 2
  %100 = load float, ptr %99, align 4, !tbaa !17
  %101 = fcmp ogt float %100, 0.000000e+00
  br i1 %101, label %102, label %103

102:                                              ; preds = %95
  br label %109

103:                                              ; preds = %95
  %104 = getelementptr inbounds %struct.anon, ptr %11, i32 0, i32 2
  %105 = load float, ptr %104, align 4, !tbaa !17
  %106 = fcmp olt float %105, 0.000000e+00
  %107 = zext i1 %106 to i64
  %108 = select i1 %106, i32 -1, i32 0
  br label %109

109:                                              ; preds = %103, %102
  %110 = phi i32 [ 1, %102 ], [ %108, %103 ]
  %111 = sitofp i32 %110 to float
  store float %111, ptr %98, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #6
  %112 = getelementptr inbounds %struct.DNivec3, ptr %26, i32 0, i32 0
  %113 = getelementptr inbounds %struct.anon, ptr %13, i32 0, i32 0
  %114 = load float, ptr %113, align 4, !tbaa !17
  %115 = fpext float %114 to double
  %116 = call double @llvm.floor.f64(double %115)
  %117 = fptosi double %116 to i32
  store i32 %117, ptr %112, align 4, !tbaa !11
  %118 = getelementptr inbounds %struct.DNivec3, ptr %26, i32 0, i32 1
  %119 = getelementptr inbounds %struct.anon, ptr %13, i32 0, i32 1
  %120 = load float, ptr %119, align 4, !tbaa !17
  %121 = fpext float %120 to double
  %122 = call double @llvm.floor.f64(double %121)
  %123 = fptosi double %122 to i32
  store i32 %123, ptr %118, align 4, !tbaa !13
  %124 = getelementptr inbounds %struct.DNivec3, ptr %26, i32 0, i32 2
  %125 = getelementptr inbounds %struct.anon, ptr %13, i32 0, i32 2
  %126 = load float, ptr %125, align 4, !tbaa !17
  %127 = fpext float %126 to double
  %128 = call double @llvm.floor.f64(double %127)
  %129 = fptosi double %128 to i32
  store i32 %129, ptr %124, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #6
  %130 = getelementptr inbounds %struct.anon, ptr %24, i32 0, i32 0
  %131 = load float, ptr %130, align 4, !tbaa !17
  %132 = call float @llvm.fabs.f32(float %131)
  store float %132, ptr %27, align 4, !tbaa !18
  %133 = getelementptr inbounds float, ptr %27, i64 1
  %134 = getelementptr inbounds %struct.anon, ptr %24, i32 0, i32 1
  %135 = load float, ptr %134, align 4, !tbaa !17
  %136 = call float @llvm.fabs.f32(float %135)
  store float %136, ptr %133, align 4, !tbaa !18
  %137 = getelementptr inbounds float, ptr %27, i64 2
  %138 = getelementptr inbounds %struct.anon, ptr %24, i32 0, i32 2
  %139 = load float, ptr %138, align 4, !tbaa !17
  %140 = call float @llvm.fabs.f32(float %139)
  store float %140, ptr %137, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 12, ptr %28) #6
  %141 = getelementptr inbounds %struct.DNivec3, ptr %28, i32 0, i32 0
  %142 = getelementptr inbounds %struct.anon, ptr %25, i32 0, i32 0
  %143 = load float, ptr %142, align 4, !tbaa !17
  %144 = fptosi float %143 to i32
  store i32 %144, ptr %141, align 4, !tbaa !11
  %145 = getelementptr inbounds %struct.DNivec3, ptr %28, i32 0, i32 1
  %146 = getelementptr inbounds %struct.anon, ptr %25, i32 0, i32 1
  %147 = load float, ptr %146, align 4, !tbaa !17
  %148 = fptosi float %147 to i32
  store i32 %148, ptr %145, align 4, !tbaa !13
  %149 = getelementptr inbounds %struct.DNivec3, ptr %28, i32 0, i32 2
  %150 = getelementptr inbounds %struct.anon, ptr %25, i32 0, i32 2
  %151 = load float, ptr %150, align 4, !tbaa !17
  %152 = fptosi float %151 to i32
  store i32 %152, ptr %149, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #6
  %153 = getelementptr inbounds %struct.anon, ptr %25, i32 0, i32 0
  %154 = load float, ptr %153, align 4, !tbaa !17
  %155 = getelementptr inbounds %struct.DNivec3, ptr %26, i32 0, i32 0
  %156 = load i32, ptr %155, align 4, !tbaa !11
  %157 = sitofp i32 %156 to float
  %158 = getelementptr inbounds %struct.anon, ptr %13, i32 0, i32 0
  %159 = load float, ptr %158, align 4, !tbaa !17
  %160 = fsub float %157, %159
  %161 = fmul float %154, %160
  %162 = fpext float %161 to double
  %163 = getelementptr inbounds %struct.anon, ptr %25, i32 0, i32 0
  %164 = load float, ptr %163, align 4, !tbaa !17
  %165 = fpext float %164 to double
  %166 = call double @llvm.fmuladd.f64(double %165, double 5.000000e-01, double %162)
  %167 = fadd double %166, 5.000000e-01
  %168 = getelementptr inbounds %struct.anon, ptr %27, i32 0, i32 0
  %169 = load float, ptr %168, align 4, !tbaa !17
  %170 = fpext float %169 to double
  %171 = fmul double %167, %170
  %172 = fptrunc double %171 to float
  %173 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 0
  store float %172, ptr %173, align 4, !tbaa !17
  %174 = getelementptr inbounds %struct.anon, ptr %25, i32 0, i32 1
  %175 = load float, ptr %174, align 4, !tbaa !17
  %176 = getelementptr inbounds %struct.DNivec3, ptr %26, i32 0, i32 1
  %177 = load i32, ptr %176, align 4, !tbaa !13
  %178 = sitofp i32 %177 to float
  %179 = getelementptr inbounds %struct.anon, ptr %13, i32 0, i32 1
  %180 = load float, ptr %179, align 4, !tbaa !17
  %181 = fsub float %178, %180
  %182 = fmul float %175, %181
  %183 = fpext float %182 to double
  %184 = getelementptr inbounds %struct.anon, ptr %25, i32 0, i32 1
  %185 = load float, ptr %184, align 4, !tbaa !17
  %186 = fpext float %185 to double
  %187 = call double @llvm.fmuladd.f64(double %186, double 5.000000e-01, double %183)
  %188 = fadd double %187, 5.000000e-01
  %189 = getelementptr inbounds %struct.anon, ptr %27, i32 0, i32 1
  %190 = load float, ptr %189, align 4, !tbaa !17
  %191 = fpext float %190 to double
  %192 = fmul double %188, %191
  %193 = fptrunc double %192 to float
  %194 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 1
  store float %193, ptr %194, align 4, !tbaa !17
  %195 = getelementptr inbounds %struct.anon, ptr %25, i32 0, i32 2
  %196 = load float, ptr %195, align 4, !tbaa !17
  %197 = getelementptr inbounds %struct.DNivec3, ptr %26, i32 0, i32 2
  %198 = load i32, ptr %197, align 4, !tbaa !14
  %199 = sitofp i32 %198 to float
  %200 = getelementptr inbounds %struct.anon, ptr %13, i32 0, i32 2
  %201 = load float, ptr %200, align 4, !tbaa !17
  %202 = fsub float %199, %201
  %203 = fmul float %196, %202
  %204 = fpext float %203 to double
  %205 = getelementptr inbounds %struct.anon, ptr %25, i32 0, i32 2
  %206 = load float, ptr %205, align 4, !tbaa !17
  %207 = fpext float %206 to double
  %208 = call double @llvm.fmuladd.f64(double %207, double 5.000000e-01, double %204)
  %209 = fadd double %208, 5.000000e-01
  %210 = getelementptr inbounds %struct.anon, ptr %27, i32 0, i32 2
  %211 = load float, ptr %210, align 4, !tbaa !17
  %212 = fpext float %211 to double
  %213 = fmul double %209, %212
  %214 = fptrunc double %213 to float
  %215 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 2
  store float %214, ptr %215, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %216

216:                                              ; preds = %382, %109
  %217 = load i32, ptr %30, align 4, !tbaa !9
  %218 = load i32, ptr %16, align 4, !tbaa !9
  %219 = icmp slt i32 %217, %218
  br i1 %219, label %220, label %383

220:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %26, i64 12, i1 false)
  %221 = getelementptr inbounds { i64, i32 }, ptr %33, i32 0, i32 0
  %222 = load i64, ptr %221, align 4
  %223 = getelementptr inbounds { i64, i32 }, ptr %33, i32 0, i32 1
  %224 = load i32, ptr %223, align 4
  call void @DN_separate_position(i64 %222, i32 %224, ptr noundef %31, ptr noundef %32)
  %225 = getelementptr inbounds %struct.DNivec3, ptr %26, i32 0, i32 0
  %226 = load i32, ptr %225, align 4, !tbaa !11
  %227 = icmp slt i32 %226, 0
  br i1 %227, label %228, label %232

228:                                              ; preds = %220
  %229 = getelementptr inbounds %struct.DNivec3, ptr %31, i32 0, i32 0
  %230 = load i32, ptr %229, align 4, !tbaa !11
  %231 = add nsw i32 %230, -1
  store i32 %231, ptr %229, align 4, !tbaa !11
  br label %232

232:                                              ; preds = %228, %220
  %233 = getelementptr inbounds %struct.DNivec3, ptr %26, i32 0, i32 1
  %234 = load i32, ptr %233, align 4, !tbaa !13
  %235 = icmp slt i32 %234, 0
  br i1 %235, label %236, label %240

236:                                              ; preds = %232
  %237 = getelementptr inbounds %struct.DNivec3, ptr %31, i32 0, i32 1
  %238 = load i32, ptr %237, align 4, !tbaa !13
  %239 = add nsw i32 %238, -1
  store i32 %239, ptr %237, align 4, !tbaa !13
  br label %240

240:                                              ; preds = %236, %232
  %241 = getelementptr inbounds %struct.DNivec3, ptr %26, i32 0, i32 2
  %242 = load i32, ptr %241, align 4, !tbaa !14
  %243 = icmp slt i32 %242, 0
  br i1 %243, label %244, label %248

244:                                              ; preds = %240
  %245 = getelementptr inbounds %struct.DNivec3, ptr %31, i32 0, i32 2
  %246 = load i32, ptr %245, align 4, !tbaa !14
  %247 = add nsw i32 %246, -1
  store i32 %247, ptr %245, align 4, !tbaa !14
  br label %248

248:                                              ; preds = %244, %240
  %249 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %31, i64 12, i1 false)
  %250 = getelementptr inbounds { i64, i32 }, ptr %34, i32 0, i32 0
  %251 = load i64, ptr %250, align 4
  %252 = getelementptr inbounds { i64, i32 }, ptr %34, i32 0, i32 1
  %253 = load i32, ptr %252, align 4
  %254 = call zeroext i1 @DN_in_map_bounds(ptr noundef %249, i64 %251, i32 %253)
  br i1 %254, label %255, label %285

255:                                              ; preds = %248
  %256 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %31, i64 12, i1 false)
  %257 = getelementptr inbounds { i64, i32 }, ptr %35, i32 0, i32 0
  %258 = load i64, ptr %257, align 4
  %259 = getelementptr inbounds { i64, i32 }, ptr %35, i32 0, i32 1
  %260 = load i32, ptr %259, align 4
  %261 = call zeroext i1 @DN_does_chunk_exist(ptr noundef %256, i64 %258, i32 %260)
  br i1 %261, label %262, label %285

262:                                              ; preds = %255
  %263 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %31, i64 12, i1 false)
  %264 = getelementptr inbounds { i64, i32 }, ptr %36, i32 0, i32 0
  %265 = load i64, ptr %264, align 4
  %266 = getelementptr inbounds { i64, i32 }, ptr %36, i32 0, i32 1
  %267 = load i32, ptr %266, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %32, i64 12, i1 false)
  %268 = getelementptr inbounds { i64, i32 }, ptr %37, i32 0, i32 0
  %269 = load i64, ptr %268, align 4
  %270 = getelementptr inbounds { i64, i32 }, ptr %37, i32 0, i32 1
  %271 = load i32, ptr %270, align 4
  %272 = call zeroext i1 @DN_does_voxel_exist(ptr noundef %263, i64 %265, i32 %267, i64 %269, i32 %271)
  br i1 %272, label %273, label %285

273:                                              ; preds = %262
  %274 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 20, ptr %38) #6
  %275 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %31, i64 12, i1 false)
  %276 = getelementptr inbounds { i64, i32 }, ptr %39, i32 0, i32 0
  %277 = load i64, ptr %276, align 4
  %278 = getelementptr inbounds { i64, i32 }, ptr %39, i32 0, i32 1
  %279 = load i32, ptr %278, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %32, i64 12, i1 false)
  %280 = getelementptr inbounds { i64, i32 }, ptr %40, i32 0, i32 0
  %281 = load i64, ptr %280, align 4
  %282 = getelementptr inbounds { i64, i32 }, ptr %40, i32 0, i32 1
  %283 = load i32, ptr %282, align 4
  call void @DN_get_voxel(ptr dead_on_unwind writable sret(%struct.DNvoxel) align 4 %38, ptr noundef %275, i64 %277, i32 %279, i64 %281, i32 %283)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %274, ptr align 4 %38, i64 20, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 20, ptr %38) #6
  %284 = load ptr, ptr %17, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %284, ptr align 4 %26, i64 12, i1 false), !tbaa.struct !15
  store i1 true, ptr %10, align 1
  store i32 1, ptr %41, align 4
  br label %380

285:                                              ; preds = %262, %255, %248
  %286 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 0
  %287 = load float, ptr %286, align 4, !tbaa !17
  %288 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 1
  %289 = load float, ptr %288, align 4, !tbaa !17
  %290 = fcmp olt float %287, %289
  br i1 %290, label %291, label %334

291:                                              ; preds = %285
  %292 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 0
  %293 = load float, ptr %292, align 4, !tbaa !17
  %294 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 2
  %295 = load float, ptr %294, align 4, !tbaa !17
  %296 = fcmp olt float %293, %295
  br i1 %296, label %297, label %315

297:                                              ; preds = %291
  %298 = getelementptr inbounds %struct.anon, ptr %27, i32 0, i32 0
  %299 = load float, ptr %298, align 4, !tbaa !17
  %300 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 0
  %301 = load float, ptr %300, align 4, !tbaa !17
  %302 = fadd float %301, %299
  store float %302, ptr %300, align 4, !tbaa !17
  %303 = getelementptr inbounds %struct.DNivec3, ptr %28, i32 0, i32 0
  %304 = load i32, ptr %303, align 4, !tbaa !11
  %305 = getelementptr inbounds %struct.DNivec3, ptr %26, i32 0, i32 0
  %306 = load i32, ptr %305, align 4, !tbaa !11
  %307 = add nsw i32 %306, %304
  store i32 %307, ptr %305, align 4, !tbaa !11
  %308 = load ptr, ptr %19, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.DNivec3, ptr %42, i32 0, i32 0
  %310 = getelementptr inbounds %struct.DNivec3, ptr %28, i32 0, i32 0
  %311 = load i32, ptr %310, align 4, !tbaa !11
  %312 = sub nsw i32 0, %311
  store i32 %312, ptr %309, align 4, !tbaa !11
  %313 = getelementptr inbounds %struct.DNivec3, ptr %42, i32 0, i32 1
  store i32 0, ptr %313, align 4, !tbaa !13
  %314 = getelementptr inbounds %struct.DNivec3, ptr %42, i32 0, i32 2
  store i32 0, ptr %314, align 4, !tbaa !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %308, ptr align 4 %42, i64 12, i1 false), !tbaa.struct !15
  br label %333

315:                                              ; preds = %291
  %316 = getelementptr inbounds %struct.anon, ptr %27, i32 0, i32 2
  %317 = load float, ptr %316, align 4, !tbaa !17
  %318 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 2
  %319 = load float, ptr %318, align 4, !tbaa !17
  %320 = fadd float %319, %317
  store float %320, ptr %318, align 4, !tbaa !17
  %321 = getelementptr inbounds %struct.DNivec3, ptr %28, i32 0, i32 2
  %322 = load i32, ptr %321, align 4, !tbaa !14
  %323 = getelementptr inbounds %struct.DNivec3, ptr %26, i32 0, i32 2
  %324 = load i32, ptr %323, align 4, !tbaa !14
  %325 = add nsw i32 %324, %322
  store i32 %325, ptr %323, align 4, !tbaa !14
  %326 = load ptr, ptr %19, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct.DNivec3, ptr %43, i32 0, i32 0
  store i32 0, ptr %327, align 4, !tbaa !11
  %328 = getelementptr inbounds %struct.DNivec3, ptr %43, i32 0, i32 1
  store i32 0, ptr %328, align 4, !tbaa !13
  %329 = getelementptr inbounds %struct.DNivec3, ptr %43, i32 0, i32 2
  %330 = getelementptr inbounds %struct.DNivec3, ptr %28, i32 0, i32 2
  %331 = load i32, ptr %330, align 4, !tbaa !14
  %332 = sub nsw i32 0, %331
  store i32 %332, ptr %329, align 4, !tbaa !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %326, ptr align 4 %43, i64 12, i1 false), !tbaa.struct !15
  br label %333

333:                                              ; preds = %315, %297
  br label %377

334:                                              ; preds = %285
  %335 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 1
  %336 = load float, ptr %335, align 4, !tbaa !17
  %337 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 2
  %338 = load float, ptr %337, align 4, !tbaa !17
  %339 = fcmp olt float %336, %338
  br i1 %339, label %340, label %358

340:                                              ; preds = %334
  %341 = getelementptr inbounds %struct.anon, ptr %27, i32 0, i32 1
  %342 = load float, ptr %341, align 4, !tbaa !17
  %343 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 1
  %344 = load float, ptr %343, align 4, !tbaa !17
  %345 = fadd float %344, %342
  store float %345, ptr %343, align 4, !tbaa !17
  %346 = getelementptr inbounds %struct.DNivec3, ptr %28, i32 0, i32 1
  %347 = load i32, ptr %346, align 4, !tbaa !13
  %348 = getelementptr inbounds %struct.DNivec3, ptr %26, i32 0, i32 1
  %349 = load i32, ptr %348, align 4, !tbaa !13
  %350 = add nsw i32 %349, %347
  store i32 %350, ptr %348, align 4, !tbaa !13
  %351 = load ptr, ptr %19, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.DNivec3, ptr %44, i32 0, i32 0
  store i32 0, ptr %352, align 4, !tbaa !11
  %353 = getelementptr inbounds %struct.DNivec3, ptr %44, i32 0, i32 1
  %354 = getelementptr inbounds %struct.DNivec3, ptr %28, i32 0, i32 1
  %355 = load i32, ptr %354, align 4, !tbaa !13
  %356 = sub nsw i32 0, %355
  store i32 %356, ptr %353, align 4, !tbaa !13
  %357 = getelementptr inbounds %struct.DNivec3, ptr %44, i32 0, i32 2
  store i32 0, ptr %357, align 4, !tbaa !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %351, ptr align 4 %44, i64 12, i1 false), !tbaa.struct !15
  br label %376

358:                                              ; preds = %334
  %359 = getelementptr inbounds %struct.anon, ptr %27, i32 0, i32 2
  %360 = load float, ptr %359, align 4, !tbaa !17
  %361 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 2
  %362 = load float, ptr %361, align 4, !tbaa !17
  %363 = fadd float %362, %360
  store float %363, ptr %361, align 4, !tbaa !17
  %364 = getelementptr inbounds %struct.DNivec3, ptr %28, i32 0, i32 2
  %365 = load i32, ptr %364, align 4, !tbaa !14
  %366 = getelementptr inbounds %struct.DNivec3, ptr %26, i32 0, i32 2
  %367 = load i32, ptr %366, align 4, !tbaa !14
  %368 = add nsw i32 %367, %365
  store i32 %368, ptr %366, align 4, !tbaa !14
  %369 = load ptr, ptr %19, align 8, !tbaa !5
  %370 = getelementptr inbounds %struct.DNivec3, ptr %45, i32 0, i32 0
  store i32 0, ptr %370, align 4, !tbaa !11
  %371 = getelementptr inbounds %struct.DNivec3, ptr %45, i32 0, i32 1
  store i32 0, ptr %371, align 4, !tbaa !13
  %372 = getelementptr inbounds %struct.DNivec3, ptr %45, i32 0, i32 2
  %373 = getelementptr inbounds %struct.DNivec3, ptr %28, i32 0, i32 2
  %374 = load i32, ptr %373, align 4, !tbaa !14
  %375 = sub nsw i32 0, %374
  store i32 %375, ptr %372, align 4, !tbaa !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %369, ptr align 4 %45, i64 12, i1 false), !tbaa.struct !15
  br label %376

376:                                              ; preds = %358, %340
  br label %377

377:                                              ; preds = %376, %333
  %378 = load i32, ptr %30, align 4, !tbaa !9
  %379 = add nsw i32 %378, 1
  store i32 %379, ptr %30, align 4, !tbaa !9
  store i32 0, ptr %41, align 4
  br label %380

380:                                              ; preds = %377, %273
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #6
  %381 = load i32, ptr %41, align 4
  switch i32 %381, label %384 [
    i32 0, label %382
  ]

382:                                              ; preds = %380
  br label %216, !llvm.loop !21

383:                                              ; preds = %216
  store i1 false, ptr %10, align 1
  store i32 1, ptr %41, align 4
  br label %384

384:                                              ; preds = %383, %380
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #6
  %385 = load i1, ptr %10, align 1
  ret i1 %385
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden { <2 x float>, float } @DN_vec3_scale(<2 x float>, float, float noundef) #4

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #5

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

; Function Attrs: nounwind uwtable
declare dso_local void @DN_separate_position(i64, i32, ptr noundef, ptr noundef) #2

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

!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, !10, i64 0}
!12 = !{!"DNivec3", !10, i64 0, !10, i64 4, !10, i64 8}
!13 = !{!12, !10, i64 4}
!14 = !{!12, !10, i64 8}
!15 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9}
!16 = !{i64 0, i64 12, !17}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"float", !7, i64 0}
!20 = !{i64 0, i64 1, !17, i64 4, i64 12, !17, i64 16, i64 1, !17, i64 17, i64 1, !17, i64 18, i64 1, !17}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


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

%struct.DNvoxel = type { i8, %union.QMvec3, %struct.DNcolor }
%union.QMvec3 = type { [3 x float] }
%struct.DNcolor = type { i8, i8, i8 }
%struct.DNivec3 = type { i32, i32, i32 }

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @DN_in_map_bounds(ptr noundef, i64, i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @DN_get_voxel(ptr dead_on_unwind noalias writable sret(%struct.DNvoxel) align 4, ptr noundef, i64, i32, i64, i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @DN_does_voxel_exist(ptr noundef, i64, i32, i64, i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @DN_does_chunk_exist(ptr noundef, i64, i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @DN_step_map(ptr noundef %0, <2 x float> %1, float %2, <2 x float> %3, float %4, i32 noundef %5, ptr nocapture noundef writeonly %6, ptr nocapture noundef writeonly %7, ptr nocapture noundef writeonly %8) local_unnamed_addr #3 {
  %10 = alloca %struct.DNivec3, align 8
  %11 = alloca %struct.DNivec3, align 8
  %12 = alloca %struct.DNvoxel, align 4
  store i32 -1000, ptr %8, align 4, !tbaa !5
  %.sroa.283.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 4
  store i32 -1000, ptr %.sroa.283.0..sroa_idx, align 4, !tbaa !5
  %.sroa.384.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  store i32 -1000, ptr %.sroa.384.0..sroa_idx, align 4, !tbaa !5
  %13 = tail call { <2 x float>, float } @DN_vec3_scale(<2 x float> %3, float %4, float noundef 8.000000e+00)
  %.sroa.0108.0.vec.extract = extractelement <2 x float> %1, i64 0
  %14 = fdiv float 1.000000e+00, %.sroa.0108.0.vec.extract
  %15 = fcmp ogt float %.sroa.0108.0.vec.extract, 0.000000e+00
  %16 = fcmp olt float %.sroa.0108.0.vec.extract, 0.000000e+00
  %17 = sitofp i1 %16 to float
  %18 = select i1 %15, float 1.000000e+00, float %17
  %19 = shufflevector <2 x float> %1, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %20 = insertelement <2 x float> %19, float %2, i64 1
  %21 = fdiv <2 x float> <float 1.000000e+00, float 1.000000e+00>, %20
  %22 = fcmp ogt <2 x float> %20, zeroinitializer
  %23 = fcmp olt <2 x float> %20, zeroinitializer
  %24 = sitofp <2 x i1> %23 to <2 x float>
  %25 = select <2 x i1> %22, <2 x float> <float 1.000000e+00, float 1.000000e+00>, <2 x float> %24
  %26 = tail call float @llvm.fabs.f32(float %14)
  %27 = tail call <2 x float> @llvm.fabs.v2f32(<2 x float> %21)
  %28 = fptosi float %18 to i32
  %29 = extractelement <2 x float> %25, i64 0
  %30 = fptosi float %29 to i32
  %31 = extractelement <2 x float> %25, i64 1
  %32 = fptosi float %31 to i32
  %33 = icmp sgt i32 %5, 0
  br i1 %33, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %9
  %34 = fpext <2 x float> %25 to <2 x double>
  %.fca.1.extract = extractvalue { <2 x float>, float } %13, 1
  %35 = fpext <2 x float> %27 to <2 x double>
  %.fca.0.extract = extractvalue { <2 x float>, float } %13, 0
  %36 = shufflevector <2 x float> %.fca.0.extract, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %37 = insertelement <2 x float> %36, float %.fca.1.extract, i64 1
  %38 = tail call <2 x float> @llvm.floor.v2f32(<2 x float> %37)
  %39 = fptosi <2 x float> %38 to <2 x i32>
  %40 = sitofp <2 x i32> %39 to <2 x float>
  %41 = fsub <2 x float> %40, %37
  %42 = fmul <2 x float> %25, %41
  %43 = fpext <2 x float> %42 to <2 x double>
  %44 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %34, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> %43)
  %45 = fadd <2 x double> %44, <double 5.000000e-01, double 5.000000e-01>
  %46 = fmul <2 x double> %45, %35
  %47 = fptrunc <2 x double> %46 to <2 x float>
  %48 = fpext float %18 to double
  %.sroa.098.0.vec.extract = extractelement <2 x float> %.fca.0.extract, i64 0
  %49 = tail call float @llvm.floor.f32(float %.sroa.098.0.vec.extract)
  %50 = fptosi float %49 to i32
  %51 = sitofp i32 %50 to float
  %52 = fsub float %51, %.sroa.098.0.vec.extract
  %53 = fmul float %18, %52
  %54 = fpext float %53 to double
  %55 = tail call double @llvm.fmuladd.f64(double %48, double 5.000000e-01, double %54)
  %56 = fadd double %55, 5.000000e-01
  %57 = fpext float %26 to double
  %58 = fmul double %56, %57
  %59 = fptrunc double %58 to float
  %60 = getelementptr inbounds i8, ptr %10, i64 4
  %61 = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.215.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  %62 = sub nsw i32 0, %32
  %63 = sub nsw i32 0, %30
  %64 = sub nsw i32 0, %28
  %65 = extractelement <2 x i32> %39, i64 0
  %66 = extractelement <2 x i32> %39, i64 1
  %67 = extractelement <2 x float> %27, i64 1
  br label %68

68:                                               ; preds = %.lr.ph, %114
  %69 = phi i1 [ true, %.lr.ph ], [ %117, %114 ]
  %.sroa.047.sroa.9.0141 = phi i32 [ %65, %.lr.ph ], [ %.sroa.047.sroa.9.1, %114 ]
  %.sroa.047.sroa.0.0140 = phi i32 [ %50, %.lr.ph ], [ %.sroa.047.sroa.0.1, %114 ]
  %.sroa.14.0139 = phi i32 [ %66, %.lr.ph ], [ %.sroa.14.1, %114 ]
  %.sroa.026.0136 = phi float [ %59, %.lr.ph ], [ %.sroa.026.1, %114 ]
  %.0121135 = phi i32 [ 0, %.lr.ph ], [ %116, %114 ]
  %70 = phi <2 x float> [ %47, %.lr.ph ], [ %115, %114 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  %.sroa.047.sroa.9.0.insert.ext = zext i32 %.sroa.047.sroa.9.0141 to i64
  %.sroa.047.sroa.9.0.insert.shift = shl nuw i64 %.sroa.047.sroa.9.0.insert.ext, 32
  %.sroa.047.sroa.0.0.insert.ext = zext i32 %.sroa.047.sroa.0.0140 to i64
  %.sroa.047.sroa.0.0.insert.insert = or disjoint i64 %.sroa.047.sroa.9.0.insert.shift, %.sroa.047.sroa.0.0.insert.ext
  call void @DN_separate_position(i64 %.sroa.047.sroa.0.0.insert.insert, i32 %.sroa.14.0139, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %71 = icmp slt i32 %.sroa.047.sroa.0.0140, 0
  br i1 %71, label %72, label %75

72:                                               ; preds = %68
  %73 = load i32, ptr %10, align 8, !tbaa !9
  %74 = add nsw i32 %73, -1
  store i32 %74, ptr %10, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %72, %68
  %76 = icmp slt i32 %.sroa.047.sroa.9.0141, 0
  br i1 %76, label %77, label %80

77:                                               ; preds = %75
  %78 = load i32, ptr %60, align 4, !tbaa !11
  %79 = add nsw i32 %78, -1
  store i32 %79, ptr %60, align 4, !tbaa !11
  br label %80

80:                                               ; preds = %77, %75
  %81 = icmp slt i32 %.sroa.14.0139, 0
  %.sroa.221.0.copyload.pre = load i32, ptr %61, align 8
  br i1 %81, label %82, label %84

82:                                               ; preds = %80
  %83 = add nsw i32 %.sroa.221.0.copyload.pre, -1
  store i32 %83, ptr %61, align 8, !tbaa !12
  br label %84

84:                                               ; preds = %82, %80
  %.sroa.221.0.copyload = phi i32 [ %83, %82 ], [ %.sroa.221.0.copyload.pre, %80 ]
  %.sroa.020.0.copyload = load i64, ptr %10, align 8
  %85 = call zeroext i1 @DN_in_map_bounds(ptr noundef %0, i64 %.sroa.020.0.copyload, i32 %.sroa.221.0.copyload)
  br i1 %85, label %86, label %90

86:                                               ; preds = %84
  %.sroa.018.0.copyload = load i64, ptr %10, align 8
  %.sroa.219.0.copyload = load i32, ptr %61, align 8
  %87 = call zeroext i1 @DN_does_chunk_exist(ptr noundef %0, i64 %.sroa.018.0.copyload, i32 %.sroa.219.0.copyload)
  br i1 %87, label %88, label %90

88:                                               ; preds = %86
  %.sroa.016.0.copyload = load i64, ptr %10, align 8
  %.sroa.217.0.copyload = load i32, ptr %61, align 8
  %.sroa.014.0.copyload = load i64, ptr %11, align 8
  %.sroa.215.0.copyload = load i32, ptr %.sroa.215.0..sroa_idx, align 8
  %89 = call zeroext i1 @DN_does_voxel_exist(ptr noundef %0, i64 %.sroa.016.0.copyload, i32 %.sroa.217.0.copyload, i64 %.sroa.014.0.copyload, i32 %.sroa.215.0.copyload)
  br i1 %89, label %.thread, label %90

.thread:                                          ; preds = %88
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %12) #7
  %.sroa.012.0.copyload = load i64, ptr %10, align 8
  %.sroa.213.0.copyload = load i32, ptr %61, align 8
  %.sroa.010.0.copyload = load i64, ptr %11, align 8
  %.sroa.211.0.copyload = load i32, ptr %.sroa.215.0..sroa_idx, align 8
  call void @DN_get_voxel(ptr dead_on_unwind nonnull writable sret(%struct.DNvoxel) align 4 %12, ptr noundef %0, i64 %.sroa.012.0.copyload, i32 %.sroa.213.0.copyload, i64 %.sroa.010.0.copyload, i32 %.sroa.211.0.copyload)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %7, ptr noundef nonnull align 4 dereferenceable(20) %12, i64 20, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %12) #7
  store i64 %.sroa.047.sroa.0.0.insert.insert, ptr %6, align 4
  %.sroa.14.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  store i32 %.sroa.14.0139, ptr %.sroa.14.0..sroa_idx, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  br label %.loopexit

90:                                               ; preds = %88, %86, %84
  %91 = extractelement <2 x float> %70, i64 0
  %92 = fcmp olt float %.sroa.026.0136, %91
  br i1 %92, label %93, label %103

93:                                               ; preds = %90
  %94 = extractelement <2 x float> %70, i64 1
  %95 = fcmp olt float %.sroa.026.0136, %94
  br i1 %95, label %96, label %99

96:                                               ; preds = %93
  %97 = fadd float %26, %.sroa.026.0136
  %98 = add nsw i32 %.sroa.047.sroa.0.0140, %28
  store i32 %64, ptr %8, align 4, !tbaa !5
  br label %114

99:                                               ; preds = %93
  %100 = fadd float %67, %94
  %101 = add nsw i32 %.sroa.14.0139, %32
  store i32 0, ptr %8, align 4, !tbaa !5
  %102 = insertelement <2 x float> %70, float %100, i64 1
  br label %114

103:                                              ; preds = %90
  %104 = extractelement <2 x float> %70, i64 1
  %105 = fcmp olt float %91, %104
  store i32 0, ptr %8, align 4, !tbaa !5
  br i1 %105, label %106, label %110

106:                                              ; preds = %103
  %107 = fadd <2 x float> %27, %70
  %108 = add nsw i32 %.sroa.047.sroa.9.0141, %30
  %109 = shufflevector <2 x float> %107, <2 x float> %70, <2 x i32> <i32 0, i32 3>
  br label %114

110:                                              ; preds = %103
  %111 = fadd float %67, %104
  %112 = add nsw i32 %.sroa.14.0139, %32
  %113 = insertelement <2 x float> %70, float %111, i64 1
  br label %114

114:                                              ; preds = %99, %96, %110, %106
  %.sink151 = phi i32 [ 0, %99 ], [ 0, %96 ], [ 0, %110 ], [ %63, %106 ]
  %.sink = phi i32 [ %62, %99 ], [ 0, %96 ], [ %62, %110 ], [ 0, %106 ]
  %.sroa.026.1 = phi float [ %.sroa.026.0136, %99 ], [ %97, %96 ], [ %.sroa.026.0136, %110 ], [ %.sroa.026.0136, %106 ]
  %.sroa.14.1 = phi i32 [ %101, %99 ], [ %.sroa.14.0139, %96 ], [ %112, %110 ], [ %.sroa.14.0139, %106 ]
  %.sroa.047.sroa.0.1 = phi i32 [ %.sroa.047.sroa.0.0140, %99 ], [ %98, %96 ], [ %.sroa.047.sroa.0.0140, %110 ], [ %.sroa.047.sroa.0.0140, %106 ]
  %.sroa.047.sroa.9.1 = phi i32 [ %.sroa.047.sroa.9.0141, %99 ], [ %.sroa.047.sroa.9.0141, %96 ], [ %.sroa.047.sroa.9.0141, %110 ], [ %108, %106 ]
  %115 = phi <2 x float> [ %102, %99 ], [ %70, %96 ], [ %113, %110 ], [ %109, %106 ]
  store i32 %.sink151, ptr %.sroa.283.0..sroa_idx, align 4, !tbaa !5
  store i32 %.sink, ptr %.sroa.384.0..sroa_idx, align 4, !tbaa !5
  %116 = add nuw nsw i32 %.0121135, 1
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  %117 = icmp slt i32 %116, %5
  %exitcond.not = icmp eq i32 %116, %5
  br i1 %exitcond.not, label %.loopexit, label %68, !llvm.loop !15

.loopexit:                                        ; preds = %114, %9, %.thread
  %118 = phi i1 [ %69, %.thread ], [ false, %9 ], [ %117, %114 ]
  ret i1 %118
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden { <2 x float>, float } @DN_vec3_scale(<2 x float>, float, float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #5

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

; Function Attrs: nounwind uwtable
declare dso_local void @DN_separate_position(i64, i32, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.floor.f32(float) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.floor.v2f32(<2 x float>) #6

; 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>) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fabs.v2f32(<2 x float>) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="64" "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 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"DNivec3", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 4}
!12 = !{!10, !6, i64 8}
!13 = !{i64 0, i64 1, !14, i64 4, i64 12, !14, i64 16, i64 1, !14, i64 17, i64 1, !14, i64 18, i64 1, !14}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass