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

; 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.DNvoxelModel = type { %struct.DNuvec3, ptr }
%struct.DNuvec3 = type { i32, i32, i32 }
%struct.DNivec3 = type { i32, i32, i32 }
%struct.DNcompressedVoxel = type { i32, i32 }

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

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

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

declare void @DN_decompress_voxel(ptr dead_on_unwind writable sret(%struct.DNvoxel) align 4, i64) #2

; Function Attrs: nounwind uwtable
define dso_local void @DN_place_model_into_volume(ptr noundef %0, ptr noundef byval(%struct.DNvoxelModel) align 8 %1, i64 %2, i32 %3) #3 {
  %5 = alloca %struct.DNivec3, align 4
  %6 = alloca { i64, i32 }, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.DNivec3, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.DNvoxel, align 4
  %15 = alloca %struct.DNivec3, align 4
  %16 = alloca %struct.DNivec3, align 4
  %17 = alloca { i64, i32 }, align 4
  %18 = alloca %struct.DNivec3, align 4
  %19 = alloca { i64, i32 }, align 4
  %20 = alloca { i64, i32 }, align 4
  %21 = getelementptr inbounds { i64, i32 }, ptr %6, i32 0, i32 0
  store i64 %2, ptr %21, align 4
  %22 = getelementptr inbounds { i64, i32 }, ptr %6, i32 0, i32 1
  store i32 %3, ptr %22, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %6, i64 12, i1 false)
  store ptr %0, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %154, %4
  %24 = load i32, ptr %8, align 4, !tbaa !9
  %25 = getelementptr inbounds %struct.DNvoxelModel, ptr %1, i32 0, i32 0
  %26 = getelementptr inbounds %struct.DNuvec3, ptr %25, i32 0, i32 2
  %27 = load i32, ptr %26, align 8, !tbaa !11
  %28 = icmp ult i32 %24, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %23
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %157

30:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %150, %30
  %32 = load i32, ptr %10, align 4, !tbaa !9
  %33 = getelementptr inbounds %struct.DNvoxelModel, ptr %1, i32 0, i32 0
  %34 = getelementptr inbounds %struct.DNuvec3, ptr %33, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !14
  %36 = icmp ult i32 %32, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %31
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %153

38:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %146, %38
  %40 = load i32, ptr %11, align 4, !tbaa !9
  %41 = getelementptr inbounds %struct.DNvoxelModel, ptr %1, i32 0, i32 0
  %42 = getelementptr inbounds %struct.DNuvec3, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !15
  %44 = icmp ult i32 %40, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %39
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %149

46:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #4
  %47 = getelementptr inbounds %struct.DNivec3, ptr %12, i32 0, i32 0
  %48 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %48, ptr %47, align 4, !tbaa !16
  %49 = getelementptr inbounds %struct.DNivec3, ptr %12, i32 0, i32 1
  %50 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %50, ptr %49, align 4, !tbaa !18
  %51 = getelementptr inbounds %struct.DNivec3, ptr %12, i32 0, i32 2
  %52 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %52, ptr %51, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %53 = getelementptr inbounds %struct.DNivec3, ptr %12, i32 0, i32 0
  %54 = load i32, ptr %53, align 4, !tbaa !16
  %55 = getelementptr inbounds %struct.DNvoxelModel, ptr %1, i32 0, i32 0
  %56 = getelementptr inbounds %struct.DNuvec3, ptr %55, i32 0, i32 0
  %57 = load i32, ptr %56, align 8, !tbaa !15
  %58 = getelementptr inbounds %struct.DNivec3, ptr %12, i32 0, i32 1
  %59 = load i32, ptr %58, align 4, !tbaa !18
  %60 = getelementptr inbounds %struct.DNivec3, ptr %12, i32 0, i32 2
  %61 = load i32, ptr %60, align 4, !tbaa !19
  %62 = getelementptr inbounds %struct.DNvoxelModel, ptr %1, i32 0, i32 0
  %63 = getelementptr inbounds %struct.DNuvec3, ptr %62, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !14
  %65 = mul i32 %61, %64
  %66 = add i32 %59, %65
  %67 = mul i32 %57, %66
  %68 = add i32 %54, %67
  store i32 %68, ptr %13, align 4, !tbaa !9
  %69 = getelementptr inbounds %struct.DNvoxelModel, ptr %1, i32 0, i32 1
  %70 = load ptr, ptr %69, align 8, !tbaa !20
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds %struct.DNcompressedVoxel, ptr %70, i64 %72
  %74 = load i64, ptr %73, align 4
  call void @DN_decompress_voxel(ptr dead_on_unwind writable sret(%struct.DNvoxel) align 4 %14, i64 %74)
  %75 = getelementptr inbounds %struct.DNvoxel, ptr %14, i32 0, i32 0
  %76 = load i8, ptr %75, align 4, !tbaa !21
  %77 = zext i8 %76 to i32
  %78 = icmp eq i32 %77, 255
  br i1 %78, label %79, label %80

79:                                               ; preds = %46
  store i32 10, ptr %9, align 4
  br label %143

80:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #4
  %81 = getelementptr inbounds %struct.DNivec3, ptr %15, i32 0, i32 0
  %82 = getelementptr inbounds %struct.DNivec3, ptr %5, i32 0, i32 0
  %83 = load i32, ptr %82, align 4, !tbaa !16
  %84 = load i32, ptr %11, align 4, !tbaa !9
  %85 = add nsw i32 %83, %84
  store i32 %85, ptr %81, align 4, !tbaa !16
  %86 = getelementptr inbounds %struct.DNivec3, ptr %15, i32 0, i32 1
  %87 = getelementptr inbounds %struct.DNivec3, ptr %5, i32 0, i32 1
  %88 = load i32, ptr %87, align 4, !tbaa !18
  %89 = load i32, ptr %10, align 4, !tbaa !9
  %90 = add nsw i32 %88, %89
  store i32 %90, ptr %86, align 4, !tbaa !18
  %91 = getelementptr inbounds %struct.DNivec3, ptr %15, i32 0, i32 2
  %92 = getelementptr inbounds %struct.DNivec3, ptr %5, i32 0, i32 2
  %93 = load i32, ptr %92, align 4, !tbaa !19
  %94 = load i32, ptr %8, align 4, !tbaa !9
  %95 = add nsw i32 %93, %94
  store i32 %95, ptr %91, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #4
  %96 = getelementptr inbounds %struct.DNivec3, ptr %16, i32 0, i32 0
  %97 = getelementptr inbounds %struct.DNivec3, ptr %15, i32 0, i32 0
  %98 = load i32, ptr %97, align 4, !tbaa !16
  %99 = sdiv i32 %98, 8
  store i32 %99, ptr %96, align 4, !tbaa !16
  %100 = getelementptr inbounds %struct.DNivec3, ptr %16, i32 0, i32 1
  %101 = getelementptr inbounds %struct.DNivec3, ptr %15, i32 0, i32 1
  %102 = load i32, ptr %101, align 4, !tbaa !18
  %103 = sdiv i32 %102, 8
  store i32 %103, ptr %100, align 4, !tbaa !18
  %104 = getelementptr inbounds %struct.DNivec3, ptr %16, i32 0, i32 2
  %105 = getelementptr inbounds %struct.DNivec3, ptr %15, i32 0, i32 2
  %106 = load i32, ptr %105, align 4, !tbaa !19
  %107 = sdiv i32 %106, 8
  store i32 %107, ptr %104, align 4, !tbaa !19
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %16, i64 12, i1 false)
  %109 = getelementptr inbounds { i64, i32 }, ptr %17, i32 0, i32 0
  %110 = load i64, ptr %109, align 4
  %111 = getelementptr inbounds { i64, i32 }, ptr %17, i32 0, i32 1
  %112 = load i32, ptr %111, align 4
  %113 = call zeroext i1 @DN_in_map_bounds(ptr noundef %108, i64 %110, i32 %112)
  br i1 %113, label %114, label %142

114:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #4
  %115 = getelementptr inbounds %struct.DNivec3, ptr %18, i32 0, i32 0
  %116 = getelementptr inbounds %struct.DNivec3, ptr %15, i32 0, i32 0
  %117 = load i32, ptr %116, align 4, !tbaa !16
  %118 = srem i32 %117, 8
  store i32 %118, ptr %115, align 4, !tbaa !16
  %119 = getelementptr inbounds %struct.DNivec3, ptr %18, i32 0, i32 1
  %120 = getelementptr inbounds %struct.DNivec3, ptr %15, i32 0, i32 1
  %121 = load i32, ptr %120, align 4, !tbaa !18
  %122 = srem i32 %121, 8
  store i32 %122, ptr %119, align 4, !tbaa !18
  %123 = getelementptr inbounds %struct.DNivec3, ptr %18, i32 0, i32 2
  %124 = getelementptr inbounds %struct.DNivec3, ptr %15, i32 0, i32 2
  %125 = load i32, ptr %124, align 4, !tbaa !19
  %126 = srem i32 %125, 8
  store i32 %126, ptr %123, align 4, !tbaa !19
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.DNvoxelModel, ptr %1, i32 0, i32 1
  %129 = load ptr, ptr %128, align 8, !tbaa !20
  %130 = load i32, ptr %13, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds %struct.DNcompressedVoxel, ptr %129, i64 %131
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %16, i64 12, i1 false)
  %133 = getelementptr inbounds { i64, i32 }, ptr %19, i32 0, i32 0
  %134 = load i64, ptr %133, align 4
  %135 = getelementptr inbounds { i64, i32 }, ptr %19, i32 0, i32 1
  %136 = load i32, ptr %135, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %18, i64 12, i1 false)
  %137 = getelementptr inbounds { i64, i32 }, ptr %20, i32 0, i32 0
  %138 = load i64, ptr %137, align 4
  %139 = getelementptr inbounds { i64, i32 }, ptr %20, i32 0, i32 1
  %140 = load i32, ptr %139, align 4
  %141 = load i64, ptr %132, align 4
  call void @DN_set_compressed_voxel(ptr noundef %127, i64 %134, i32 %136, i64 %138, i32 %140, i64 %141)
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #4
  br label %142

142:                                              ; preds = %114, %80
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #4
  store i32 0, ptr %9, align 4
  br label %143

143:                                              ; preds = %142, %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #4
  %144 = load i32, ptr %9, align 4
  switch i32 %144, label %158 [
    i32 0, label %145
    i32 10, label %146
  ]

145:                                              ; preds = %143
  br label %146

146:                                              ; preds = %145, %143
  %147 = load i32, ptr %11, align 4, !tbaa !9
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %11, align 4, !tbaa !9
  br label %39, !llvm.loop !24

149:                                              ; preds = %45
  br label %150

150:                                              ; preds = %149
  %151 = load i32, ptr %10, align 4, !tbaa !9
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %10, align 4, !tbaa !9
  br label %31, !llvm.loop !26

153:                                              ; preds = %37
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %8, align 4, !tbaa !9
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %8, align 4, !tbaa !9
  br label %23, !llvm.loop !27

157:                                              ; preds = %29
  ret void

158:                                              ; preds = %143
  unreachable
}

declare zeroext i1 @DN_in_map_bounds(ptr noundef, i64, i32) #2

declare void @DN_set_compressed_voxel(ptr noundef, i64, i32, i64, i32, i64) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"DNvoxelModel", !13, i64 0, !6, i64 16}
!13 = !{!"DNuvec3", !10, i64 0, !10, i64 4, !10, i64 8}
!14 = !{!12, !10, i64 4}
!15 = !{!12, !10, i64 0}
!16 = !{!17, !10, i64 0}
!17 = !{!"DNivec3", !10, i64 0, !10, i64 4, !10, i64 8}
!18 = !{!17, !10, i64 4}
!19 = !{!17, !10, i64 8}
!20 = !{!12, !6, i64 16}
!21 = !{!22, !7, i64 0}
!22 = !{!"DNvoxel", !7, i64 0, !7, i64 4, !23, i64 16}
!23 = !{!"DNcolor", !7, i64 0, !7, i64 1, !7, i64 2}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}


; 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.DNvoxelModel = type { %struct.DNuvec3, ptr }
%struct.DNuvec3 = type { i32, i32, i32 }
%struct.DNcompressedVoxel = type { i32, i32 }

declare void @DN_decompress_voxel(ptr dead_on_unwind writable sret(%struct.DNvoxel) align 4, i64) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @DN_place_model_into_volume(ptr noundef %0, ptr nocapture noundef readonly byval(%struct.DNvoxelModel) align 8 %1, i64 %2, i32 %3) local_unnamed_addr #1 {
  %5 = alloca %struct.DNvoxel, align 4
  %.sroa.233.0.extract.shift = lshr i64 %2, 32
  %.sroa.233.0.extract.trunc = trunc nuw i64 %.sroa.233.0.extract.shift to i32
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %._crit_edge, label %.preheader37.lr.ph

.preheader37.lr.ph:                               ; preds = %4
  %8 = getelementptr inbounds i8, ptr %1, i64 4
  %9 = load i32, ptr %8, align 4, !tbaa !12
  %.not56 = icmp eq i32 %9, 0
  %10 = load i32, ptr %1, align 8
  %11 = getelementptr inbounds i8, ptr %1, i64 16
  %12 = load ptr, ptr %11, align 8
  %.not57 = icmp eq i32 %10, 0
  %or.cond = select i1 %.not56, i1 true, i1 %.not57
  br i1 %or.cond, label %._crit_edge, label %.preheader37.us.us.preheader

.preheader37.us.us.preheader:                     ; preds = %.preheader37.lr.ph
  %wide.trip.count = zext i32 %10 to i64
  br label %.preheader37.us.us

.preheader37.us.us:                               ; preds = %.preheader37.us.us.preheader, %._crit_edge45.split.us.us.us
  %.051.us.us = phi i32 [ %40, %._crit_edge45.split.us.us.us ], [ 0, %.preheader37.us.us.preheader ]
  %13 = mul i32 %9, %.051.us.us
  %14 = add nsw i32 %.051.us.us, %3
  %15 = sdiv i32 %14, 8
  %16 = srem i32 %14, 8
  br label %.preheader.us.us.us

.preheader.us.us.us:                              ; preds = %._crit_edge.us.us.us, %.preheader37.us.us
  %.03444.us.us.us = phi i32 [ 0, %.preheader37.us.us ], [ %39, %._crit_edge.us.us.us ]
  %17 = add i32 %13, %.03444.us.us.us
  %18 = mul i32 %10, %17
  %19 = add nsw i32 %.03444.us.us.us, %.sroa.233.0.extract.trunc
  %20 = sdiv i32 %19, 8
  %.sroa.06.4.insert.ext.us.us.us = zext i32 %20 to i64
  %.sroa.06.4.insert.shift.us.us.us = shl nuw i64 %.sroa.06.4.insert.ext.us.us.us, 32
  %21 = srem i32 %19, 8
  %.sroa.03.4.insert.ext.us.us.us = zext i32 %21 to i64
  %.sroa.03.4.insert.shift.us.us.us = shl nuw i64 %.sroa.03.4.insert.ext.us.us.us, 32
  br label %22

22:                                               ; preds = %38, %.preheader.us.us.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %38 ], [ 0, %.preheader.us.us.us ]
  %23 = trunc nuw nsw i64 %indvars.iv to i32
  %24 = add i32 %18, %23
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds %struct.DNcompressedVoxel, ptr %12, i64 %25
  %27 = load i64, ptr %26, align 4
  call void @DN_decompress_voxel(ptr dead_on_unwind nonnull writable sret(%struct.DNvoxel) align 4 %5, i64 %27) #2
  %28 = load i8, ptr %5, align 4, !tbaa !13
  %29 = icmp eq i8 %28, -1
  br i1 %29, label %38, label %30

30:                                               ; preds = %22
  %31 = add i64 %indvars.iv, %2
  %32 = trunc i64 %31 to i32
  %33 = sdiv i32 %32, 8
  %34 = srem i32 %32, 8
  %.sroa.06.0.insert.ext.us.us.us = zext i32 %33 to i64
  %.sroa.06.4.insert.insert.us.us.us = or disjoint i64 %.sroa.06.4.insert.shift.us.us.us, %.sroa.06.0.insert.ext.us.us.us
  %35 = call zeroext i1 @DN_in_map_bounds(ptr noundef %0, i64 %.sroa.06.4.insert.insert.us.us.us, i32 %15) #2
  br i1 %35, label %36, label %38

36:                                               ; preds = %30
  %.sroa.03.0.insert.ext.us.us.us = zext i32 %34 to i64
  %.sroa.03.4.insert.insert.us.us.us = or disjoint i64 %.sroa.03.4.insert.shift.us.us.us, %.sroa.03.0.insert.ext.us.us.us
  %37 = load i64, ptr %26, align 4
  call void @DN_set_compressed_voxel(ptr noundef %0, i64 %.sroa.06.4.insert.insert.us.us.us, i32 %15, i64 %.sroa.03.4.insert.insert.us.us.us, i32 %16, i64 %37) #2
  br label %38

38:                                               ; preds = %36, %30, %22
  %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.us.us.us, label %22, !llvm.loop !16

._crit_edge.us.us.us:                             ; preds = %38
  %39 = add nuw i32 %.03444.us.us.us, 1
  %exitcond61.not = icmp eq i32 %39, %9
  br i1 %exitcond61.not, label %._crit_edge45.split.us.us.us, label %.preheader.us.us.us, !llvm.loop !18

._crit_edge45.split.us.us.us:                     ; preds = %._crit_edge.us.us.us
  %40 = add nuw i32 %.051.us.us, 1
  %exitcond62.not = icmp eq i32 %40, %7
  br i1 %exitcond62.not, label %._crit_edge, label %.preheader37.us.us, !llvm.loop !19

._crit_edge:                                      ; preds = %._crit_edge45.split.us.us.us, %.preheader37.lr.ph, %4
  ret void
}

declare zeroext i1 @DN_in_map_bounds(ptr noundef, i64, i32) local_unnamed_addr #0

declare void @DN_set_compressed_voxel(ptr noundef, i64, i32, i64, i32, i64) local_unnamed_addr #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 }

!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, !8, i64 8}
!6 = !{!"DNvoxelModel", !7, i64 0, !11, i64 16}
!7 = !{!"DNuvec3", !8, i64 0, !8, i64 4, !8, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!6, !8, i64 4}
!13 = !{!14, !9, i64 0}
!14 = !{!"DNvoxel", !9, i64 0, !9, i64 4, !15, i64 16}
!15 = !{!"DNcolor", !9, i64 0, !9, i64 1, !9, i64 2}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


; Effective O3 passes: BDCEPass,DivRemPairsPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass