; LLVM IR from blat-blatnik/Painted-Portal-Ray-Tracing :: src/game.ll (Z17gameOnMouseButtonP10GLFWwindowiii)

; 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.GpuSyncedList.22 = type { i32, i64, %"class.std::vector.23", %"class.std::vector.0" }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<Voxel, std::allocator<Voxel>>::_Vector_impl" }
%"struct.std::_Vector_base<Voxel, std::allocator<Voxel>>::_Vector_impl" = type { %"struct.std::_Vector_base<Voxel, std::allocator<Voxel>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Voxel, std::allocator<Voxel>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%struct.GpuSyncedList.28 = type { i32, i64, %"class.std::vector.29", %"class.std::vector.0" }
%"class.std::vector.29" = type { %"struct.std::_Vector_base.30" }
%"struct.std::_Vector_base.30" = type { %"struct.std::_Vector_base<Portal, std::allocator<Portal>>::_Vector_impl" }
%"struct.std::_Vector_base<Portal, std::allocator<Portal>>::_Vector_impl" = type { %"struct.std::_Vector_base<Portal, std::allocator<Portal>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Portal, std::allocator<Portal>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.vector = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float }
%struct.Ray = type { %struct.vector, %struct.vector }
%struct.Portal = type { %struct.vector, [4 x i8], %struct.vector, float }
%"struct.GpuSyncedList<Portal>::Wrapper" = type { ptr, i64 }
%struct.Voxel = type { %struct.vector.46, i32 }
%struct.vector.46 = type { %union.anon.47 }
%union.anon.47 = type { %struct.anon.48 }
%struct.anon.48 = type { i32, i32, i32 }
%"struct.GpuSyncedList<Voxel>::Wrapper" = type { ptr, i64 }

@_ZL6voxels = external hidden global %struct.GpuSyncedList.22, align 8
@_ZL7portals = external hidden global %struct.GpuSyncedList.28, align 8
@_ZL9cameraPos = external hidden global %struct.vector, align 4
@_ZL9cameraDir = external hidden global %struct.vector, align 4
@_ZL8gameMode = external hidden global i32, align 4
@_ZL8material = external hidden global i32, align 4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6vectorIfLi3EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #0 align 2

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

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

; Function Attrs: 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) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17gameOnMouseButtonP10GLFWwindowiii(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.Ray, align 4
  %10 = alloca %struct.Ray, align 4
  %11 = alloca %struct.Ray, align 4
  %12 = alloca %struct.Portal, align 16
  %13 = alloca %struct.vector, align 4
  %14 = alloca %struct.vector, align 4
  %15 = alloca %struct.Portal, align 16
  %16 = alloca %"struct.GpuSyncedList<Portal>::Wrapper", align 8
  %17 = alloca %struct.Portal, align 16
  %18 = alloca %"struct.GpuSyncedList<Portal>::Wrapper", align 8
  %19 = alloca %struct.Voxel, align 16
  %20 = alloca %struct.vector.46, align 4
  %21 = alloca %struct.vector, align 4
  %22 = alloca %struct.vector, align 4
  %23 = alloca %struct.vector, align 4
  %24 = alloca %struct.vector, align 4
  %25 = alloca %struct.vector, align 4
  %26 = alloca %struct.Voxel, align 16
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca %struct.Voxel, align 16
  %32 = alloca %"struct.GpuSyncedList<Voxel>::Wrapper", align 8
  %33 = alloca float, align 4
  %34 = alloca %struct.Ray, align 4
  %35 = alloca %struct.Voxel, align 16
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  %36 = load i32, ptr %7, align 4, !tbaa !9
  %37 = icmp eq i32 %36, 1
  br i1 %37, label %38, label %131

38:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #6
  %39 = getelementptr inbounds %struct.Ray, ptr %9, i32 0, i32 0
  call void @_ZN6vectorIfLi3EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %39, ptr noundef nonnull align 4 dereferenceable(12) @_ZL9cameraPos)
  %40 = getelementptr inbounds %struct.Ray, ptr %9, i32 0, i32 1
  call void @_ZN6vectorIfLi3EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(12) @_ZL9cameraDir)
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #6
  call void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(24) %9)
  call void @_ZL5trace3Ray(ptr dead_on_unwind writable sret(%struct.Ray) align 4 %10, ptr noundef %11)
  %41 = load i32, ptr @_ZL8gameMode, align 4, !tbaa !11
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %72

43:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  call void @_ZN6PortalC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %12)
  %44 = getelementptr inbounds %struct.Ray, ptr %10, i32 0, i32 0
  %45 = getelementptr inbounds %struct.Portal, ptr %12, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %45, ptr align 4 %44, i64 12, i1 false), !tbaa.struct !13
  %46 = getelementptr inbounds %struct.Ray, ptr %10, i32 0, i32 1
  %47 = getelementptr inbounds %struct.Portal, ptr %12, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %47, ptr align 4 %46, i64 12, i1 false), !tbaa.struct !13
  %48 = getelementptr inbounds %struct.Ray, ptr %10, i32 0, i32 1
  call void @_ZN6vectorIfLi3EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %48)
  call void @_ZmlIfLi3EE6vectorIT_XT0_EES1_S2_(ptr dead_on_unwind writable sret(%struct.vector) align 4 %13, float noundef 0x3F50624DE0000000, ptr noundef %14)
  %49 = getelementptr inbounds %struct.Portal, ptr %12, i32 0, i32 0
  %50 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZpLIfLi3EER6vectorIT_XT0_EES3_S2_(ptr noundef nonnull align 4 dereferenceable(12) %49, ptr noundef %13)
  %51 = getelementptr inbounds %struct.Portal, ptr %12, i32 0, i32 3
  store float 0x3FE6666660000000, ptr %51, align 4, !tbaa !15
  %52 = load i32, ptr %6, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %61

54:                                               ; preds = %43
  call void @_ZN6PortalC2ERKS_(ptr noundef nonnull align 16 dereferenceable(32) %15, ptr noundef nonnull align 16 dereferenceable(32) %12)
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %55 = call { ptr, i64 } @_ZN13GpuSyncedListI6PortalEixEm(ptr noundef nonnull align 8 dereferenceable(80) @_ZL7portals, i64 noundef 0)
  %56 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 0
  %57 = extractvalue { ptr, i64 } %55, 0
  store ptr %57, ptr %56, align 8
  %58 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 1
  %59 = extractvalue { ptr, i64 } %55, 1
  store i64 %59, ptr %58, align 8
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN13GpuSyncedListI6PortalE7WrapperaSES0_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef %15)
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  br label %61

61:                                               ; preds = %54, %43
  %62 = load i32, ptr %6, align 4, !tbaa !9
  %63 = icmp eq i32 %62, 1
  br i1 %63, label %64, label %71

64:                                               ; preds = %61
  call void @_ZN6PortalC2ERKS_(ptr noundef nonnull align 16 dereferenceable(32) %17, ptr noundef nonnull align 16 dereferenceable(32) %12)
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %65 = call { ptr, i64 } @_ZN13GpuSyncedListI6PortalEixEm(ptr noundef nonnull align 8 dereferenceable(80) @_ZL7portals, i64 noundef 1)
  %66 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %67 = extractvalue { ptr, i64 } %65, 0
  store ptr %67, ptr %66, align 8
  %68 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %69 = extractvalue { ptr, i64 } %65, 1
  store i64 %69, ptr %68, align 8
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN13GpuSyncedListI6PortalE7WrapperaSES0_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef %17)
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  br label %71

71:                                               ; preds = %64, %61
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  br label %130

72:                                               ; preds = %38
  %73 = load i32, ptr @_ZL8gameMode, align 4, !tbaa !11
  %74 = icmp eq i32 %73, 1
  br i1 %74, label %75, label %129

75:                                               ; preds = %72
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %84

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  call void @_ZN5VoxelC2Ev(ptr noundef nonnull align 16 dereferenceable(16) %19)
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #6
  %79 = getelementptr inbounds %struct.Ray, ptr %10, i32 0, i32 0
  call void @_ZN6vectorIfLi3EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %23, ptr noundef nonnull align 4 dereferenceable(12) %79)
  %80 = getelementptr inbounds %struct.Ray, ptr %10, i32 0, i32 1
  call void @_ZN6vectorIfLi3EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %80)
  call void @_ZmlIfLi3EE6vectorIT_XT0_EES1_S2_(ptr dead_on_unwind writable sret(%struct.vector) align 4 %24, float noundef 5.000000e-01, ptr noundef %25)
  call void @_ZplIfE6vectorIT_Li3EES2_S2_(ptr dead_on_unwind writable sret(%struct.vector) align 4 %22, ptr noundef %23, ptr noundef %24)
  call void @_Z5floorIfE6vectorIT_Li3EES2_(ptr dead_on_unwind writable sret(%struct.vector) align 4 %21, ptr noundef %22)
  call void @_ZN6vectorIiLi3EEC2IfEES_IT_Li3EE(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef %21)
  %81 = getelementptr inbounds %struct.Voxel, ptr %19, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %81, ptr align 4 %20, i64 12, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #6
  %82 = load i32, ptr @_ZL8material, align 4, !tbaa !9
  %83 = getelementptr inbounds %struct.Voxel, ptr %19, i32 0, i32 1
  store i32 %82, ptr %83, align 4, !tbaa !19
  call void @_ZN5VoxelC2ERKS_(ptr noundef nonnull align 16 dereferenceable(16) %26, ptr noundef nonnull align 16 dereferenceable(16) %19)
  call void @_ZN13GpuSyncedListI5VoxelE4pushES0_(ptr noundef nonnull align 8 dereferenceable(80) @_ZL6voxels, ptr noundef %26)
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  br label %84

84:                                               ; preds = %78, %75
  %85 = load i32, ptr %6, align 4, !tbaa !9
  %86 = icmp eq i32 %85, 1
  br i1 %86, label %87, label %128

87:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  store float 0x47EFFFFFE0000000, ptr %27, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  %88 = load float, ptr %27, align 4, !tbaa !22
  store float %88, ptr %28, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %89 = call noundef i64 @_ZN13GpuSyncedListI5VoxelE6lengthEv(ptr noundef nonnull align 8 dereferenceable(80) @_ZL6voxels)
  store i64 %89, ptr %29, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  store i64 0, ptr %30, align 8, !tbaa !23
  br label %90

90:                                               ; preds = %118, %87
  %91 = load i64, ptr %30, align 8, !tbaa !23
  %92 = call noundef i64 @_ZN13GpuSyncedListI5VoxelE6lengthEv(ptr noundef nonnull align 8 dereferenceable(80) @_ZL6voxels)
  %93 = icmp ult i64 %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %121

95:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #6
  %96 = load i64, ptr %30, align 8, !tbaa !23
  %97 = call { ptr, i64 } @_ZN13GpuSyncedListI5VoxelEixEm(ptr noundef nonnull align 8 dereferenceable(80) @_ZL6voxels, i64 noundef %96)
  %98 = getelementptr inbounds { ptr, i64 }, ptr %32, i32 0, i32 0
  %99 = extractvalue { ptr, i64 } %97, 0
  store ptr %99, ptr %98, align 8
  %100 = getelementptr inbounds { ptr, i64 }, ptr %32, i32 0, i32 1
  %101 = extractvalue { ptr, i64 } %97, 1
  store i64 %101, ptr %100, align 8
  call void @_ZN13GpuSyncedListI5VoxelE7WrappercvS0_Ev(ptr dead_on_unwind writable sret(%struct.Voxel) align 16 %31, ptr noundef nonnull align 8 dereferenceable(16) %32)
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  call void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24) %34, ptr noundef nonnull align 4 dereferenceable(24) %9)
  call void @_ZN5VoxelC2ERKS_(ptr noundef nonnull align 16 dereferenceable(16) %35, ptr noundef nonnull align 16 dereferenceable(16) %31)
  %102 = call noundef float @_ZL9intersect3Ray5Voxel(ptr noundef %34, ptr noundef %35)
  store float %102, ptr %33, align 4, !tbaa !22
  %103 = load float, ptr %33, align 4, !tbaa !22
  %104 = fcmp ogt float %103, 0.000000e+00
  br i1 %104, label %105, label %117

105:                                              ; preds = %95
  %106 = load float, ptr %33, align 4, !tbaa !22
  %107 = load float, ptr %27, align 4, !tbaa !22
  %108 = fcmp olt float %106, %107
  br i1 %108, label %109, label %117

109:                                              ; preds = %105
  %110 = load float, ptr %28, align 4, !tbaa !22
  %111 = load float, ptr %33, align 4, !tbaa !22
  %112 = fcmp ogt float %110, %111
  br i1 %112, label %113, label %116

113:                                              ; preds = %109
  %114 = load float, ptr %33, align 4, !tbaa !22
  store float %114, ptr %28, align 4, !tbaa !22
  %115 = load i64, ptr %30, align 8, !tbaa !23
  store i64 %115, ptr %29, align 8, !tbaa !23
  br label %116

116:                                              ; preds = %113, %109
  br label %117

117:                                              ; preds = %116, %105, %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #6
  br label %118

118:                                              ; preds = %117
  %119 = load i64, ptr %30, align 8, !tbaa !23
  %120 = add i64 %119, 1
  store i64 %120, ptr %30, align 8, !tbaa !23
  br label %90, !llvm.loop !25

121:                                              ; preds = %94
  %122 = load i64, ptr %29, align 8, !tbaa !23
  %123 = call noundef i64 @_ZN13GpuSyncedListI5VoxelE6lengthEv(ptr noundef nonnull align 8 dereferenceable(80) @_ZL6voxels)
  %124 = icmp ult i64 %122, %123
  br i1 %124, label %125, label %127

125:                                              ; preds = %121
  %126 = load i64, ptr %29, align 8, !tbaa !23
  call void @_ZN13GpuSyncedListI5VoxelE6removeEm(ptr noundef nonnull align 8 dereferenceable(80) @_ZL6voxels, i64 noundef %126)
  br label %127

127:                                              ; preds = %125, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %128

128:                                              ; preds = %127, %84
  br label %129

129:                                              ; preds = %128, %72
  br label %130

130:                                              ; preds = %129, %71
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  br label %131

131:                                              ; preds = %130, %4
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL5trace3Ray(ptr dead_on_unwind noalias writable sret(%struct.Ray) align 4, ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6PortalC2Ev(ptr noundef nonnull align 16 dereferenceable(32)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZpLIfLi3EER6vectorIT_XT0_EES3_S2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmlIfLi3EE6vectorIT_XT0_EES1_S2_(ptr dead_on_unwind noalias writable sret(%struct.vector) align 4, float noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6PortalC2ERKS_(ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZN13GpuSyncedListI6PortalEixEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN13GpuSyncedListI6PortalE7WrapperaSES0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5VoxelC2Ev(ptr noundef nonnull align 16 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z5floorIfE6vectorIT_Li3EES2_(ptr dead_on_unwind noalias writable sret(%struct.vector) align 4, ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZplIfE6vectorIT_Li3EES2_S2_(ptr dead_on_unwind noalias writable sret(%struct.vector) align 4, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6vectorIiLi3EEC2IfEES_IT_Li3EE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13GpuSyncedListI5VoxelE4pushES0_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5VoxelC2ERKS_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN13GpuSyncedListI5VoxelE6lengthEv(ptr noundef nonnull align 8 dereferenceable(80)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZN13GpuSyncedListI5VoxelEixEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13GpuSyncedListI5VoxelE7WrappercvS0_Ev(ptr dead_on_unwind noalias writable sret(%struct.Voxel) align 16, ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef float @_ZL9intersect3Ray5Voxel(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13GpuSyncedListI5VoxelE6removeEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) #3 align 2

attributes #0 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS8GameMode", !7, i64 0}
!13 = !{i64 0, i64 12, !14}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !18, i64 28}
!16 = !{!"_ZTS6Portal", !17, i64 0, !17, i64 16, !18, i64 28}
!17 = !{!"_ZTS6vectorIfLi3EE", !7, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{!20, !10, i64 12}
!20 = !{!"_ZTS5Voxel", !21, i64 0, !10, i64 12}
!21 = !{!"_ZTS6vectorIiLi3EE", !7, i64 0}
!22 = !{!18, !18, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"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.GpuSyncedList.22 = type { i32, i64, %"class.std::vector.23", %"class.std::vector.0" }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<Voxel, std::allocator<Voxel>>::_Vector_impl" }
%"struct.std::_Vector_base<Voxel, std::allocator<Voxel>>::_Vector_impl" = type { %"struct.std::_Vector_base<Voxel, std::allocator<Voxel>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Voxel, std::allocator<Voxel>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%struct.GpuSyncedList.28 = type { i32, i64, %"class.std::vector.29", %"class.std::vector.0" }
%"class.std::vector.29" = type { %"struct.std::_Vector_base.30" }
%"struct.std::_Vector_base.30" = type { %"struct.std::_Vector_base<Portal, std::allocator<Portal>>::_Vector_impl" }
%"struct.std::_Vector_base<Portal, std::allocator<Portal>>::_Vector_impl" = type { %"struct.std::_Vector_base<Portal, std::allocator<Portal>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Portal, std::allocator<Portal>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.vector = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float }
%struct.Ray = type { %struct.vector, %struct.vector }
%struct.Portal = type { %struct.vector, [4 x i8], %struct.vector, float }
%"struct.GpuSyncedList<Portal>::Wrapper" = type { ptr, i64 }
%struct.Voxel = type { %struct.vector.46, i32 }
%struct.vector.46 = type { %union.anon.47 }
%union.anon.47 = type { %struct.anon.48 }
%struct.anon.48 = type { i32, i32, i32 }
%"struct.GpuSyncedList<Voxel>::Wrapper" = type { ptr, i64 }

@_ZL6voxels = external hidden global %struct.GpuSyncedList.22, align 8
@_ZL7portals = external hidden global %struct.GpuSyncedList.28, align 8
@_ZL9cameraPos = external hidden global %struct.vector, align 4
@_ZL9cameraDir = external hidden global %struct.vector, align 4
@_ZL8gameMode = external hidden local_unnamed_addr global i32, align 4
@_ZL8material = external hidden local_unnamed_addr global i32, align 4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6vectorIfLi3EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress 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) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17gameOnMouseButtonP10GLFWwindowiii(ptr nocapture noundef readnone %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #3 {
  %5 = alloca %struct.Ray, align 4
  %6 = alloca %struct.Ray, align 4
  %7 = alloca %struct.Ray, align 4
  %8 = alloca %struct.Portal, align 16
  %9 = alloca %struct.vector, align 4
  %10 = alloca %struct.vector, align 4
  %11 = alloca %struct.Portal, align 16
  %12 = alloca %"struct.GpuSyncedList<Portal>::Wrapper", align 8
  %13 = alloca %struct.Portal, align 16
  %14 = alloca %"struct.GpuSyncedList<Portal>::Wrapper", align 8
  %15 = alloca %struct.Voxel, align 16
  %16 = alloca %struct.vector.46, align 4
  %17 = alloca %struct.vector, align 4
  %18 = alloca %struct.vector, align 4
  %19 = alloca %struct.vector, align 4
  %20 = alloca %struct.vector, align 4
  %21 = alloca %struct.vector, align 4
  %22 = alloca %struct.Voxel, align 16
  %23 = alloca %struct.Voxel, align 16
  %24 = alloca %"struct.GpuSyncedList<Voxel>::Wrapper", align 8
  %25 = alloca %struct.Ray, align 4
  %26 = alloca %struct.Voxel, align 16
  %27 = icmp eq i32 %2, 1
  br i1 %27, label %28, label %73

28:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZN6vectorIfLi3EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) @_ZL9cameraPos)
  %29 = getelementptr inbounds i8, ptr %5, i64 12
  call void @_ZN6vectorIfLi3EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %29, ptr noundef nonnull align 4 dereferenceable(12) @_ZL9cameraDir)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(24) %5)
  call void @_ZL5trace3Ray(ptr dead_on_unwind nonnull writable sret(%struct.Ray) align 4 %6, ptr noundef nonnull %7)
  %30 = load i32, ptr @_ZL8gameMode, align 4, !tbaa !5
  switch i32 %30, label %72 [
    i32 0, label %31
    i32 1, label %49
  ]

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  call void @_ZN6PortalC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %8)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %6, i64 12, i1 false), !tbaa.struct !9
  %32 = getelementptr inbounds i8, ptr %6, i64 12
  %33 = getelementptr inbounds i8, ptr %8, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(12) %33, ptr noundef nonnull align 4 dereferenceable(12) %32, i64 12, i1 false), !tbaa.struct !9
  call void @_ZN6vectorIfLi3EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %32)
  call void @_ZmlIfLi3EE6vectorIT_XT0_EES1_S2_(ptr dead_on_unwind nonnull writable sret(%struct.vector) align 4 %9, float noundef 0x3F50624DE0000000, ptr noundef nonnull %10)
  %34 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZpLIfLi3EER6vectorIT_XT0_EES3_S2_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull %9)
  %35 = getelementptr inbounds i8, ptr %8, i64 28
  store float 0x3FE6666660000000, ptr %35, align 4, !tbaa !11
  switch i32 %1, label %48 [
    i32 0, label %36
    i32 1, label %42
  ]

36:                                               ; preds = %31
  call void @_ZN6PortalC2ERKS_(ptr noundef nonnull align 16 dereferenceable(32) %11, ptr noundef nonnull align 16 dereferenceable(32) %8)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #6
  %37 = call { ptr, i64 } @_ZN13GpuSyncedListI6PortalEixEm(ptr noundef nonnull align 8 dereferenceable(80) @_ZL7portals, i64 noundef 0)
  %38 = extractvalue { ptr, i64 } %37, 0
  store ptr %38, ptr %12, align 8
  %39 = getelementptr inbounds i8, ptr %12, i64 8
  %40 = extractvalue { ptr, i64 } %37, 1
  store i64 %40, ptr %39, align 8
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN13GpuSyncedListI6PortalE7WrapperaSES0_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #6
  br label %48

42:                                               ; preds = %31
  call void @_ZN6PortalC2ERKS_(ptr noundef nonnull align 16 dereferenceable(32) %13, ptr noundef nonnull align 16 dereferenceable(32) %8)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  %43 = call { ptr, i64 } @_ZN13GpuSyncedListI6PortalEixEm(ptr noundef nonnull align 8 dereferenceable(80) @_ZL7portals, i64 noundef 1)
  %44 = extractvalue { ptr, i64 } %43, 0
  store ptr %44, ptr %14, align 8
  %45 = getelementptr inbounds i8, ptr %14, i64 8
  %46 = extractvalue { ptr, i64 } %43, 1
  store i64 %46, ptr %45, align 8
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN13GpuSyncedListI6PortalE7WrapperaSES0_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  br label %48

48:                                               ; preds = %36, %31, %42
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %72

49:                                               ; preds = %28
  switch i32 %1, label %72 [
    i32 0, label %50
    i32 1, label %54
  ]

50:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #6
  call void @_ZN5VoxelC2Ev(ptr noundef nonnull align 16 dereferenceable(16) %15)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #6
  call void @_ZN6vectorIfLi3EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %51 = getelementptr inbounds i8, ptr %6, i64 12
  call void @_ZN6vectorIfLi3EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %21, ptr noundef nonnull align 4 dereferenceable(12) %51)
  call void @_ZmlIfLi3EE6vectorIT_XT0_EES1_S2_(ptr dead_on_unwind nonnull writable sret(%struct.vector) align 4 %20, float noundef 5.000000e-01, ptr noundef nonnull %21)
  call void @_ZplIfE6vectorIT_Li3EES2_S2_(ptr dead_on_unwind nonnull writable sret(%struct.vector) align 4 %18, ptr noundef nonnull %19, ptr noundef nonnull %20)
  call void @_Z5floorIfE6vectorIT_Li3EES2_(ptr dead_on_unwind nonnull writable sret(%struct.vector) align 4 %17, ptr noundef nonnull %18)
  call void @_ZN6vectorIiLi3EEC2IfEES_IT_Li3EE(ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull %17)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(12) %16, i64 12, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #6
  %52 = load i32, ptr @_ZL8material, align 4, !tbaa !15
  %53 = getelementptr inbounds i8, ptr %15, i64 12
  store i32 %52, ptr %53, align 4, !tbaa !17
  call void @_ZN5VoxelC2ERKS_(ptr noundef nonnull align 16 dereferenceable(16) %22, ptr noundef nonnull align 16 dereferenceable(16) %15)
  call void @_ZN13GpuSyncedListI5VoxelE4pushES0_(ptr noundef nonnull align 8 dereferenceable(80) @_ZL6voxels, ptr noundef nonnull %22)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  br label %72

54:                                               ; preds = %49
  %55 = call noundef i64 @_ZN13GpuSyncedListI5VoxelE6lengthEv(ptr noundef nonnull align 8 dereferenceable(80) @_ZL6voxels)
  %56 = call noundef i64 @_ZN13GpuSyncedListI5VoxelE6lengthEv(ptr noundef nonnull align 8 dereferenceable(80) @_ZL6voxels)
  %.not = icmp eq i64 %56, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %54
  %57 = getelementptr inbounds i8, ptr %24, i64 8
  br label %60

._crit_edge:                                      ; preds = %60, %54
  %.018.lcssa = phi i64 [ %55, %54 ], [ %.119, %60 ]
  %58 = call noundef i64 @_ZN13GpuSyncedListI5VoxelE6lengthEv(ptr noundef nonnull align 8 dereferenceable(80) @_ZL6voxels)
  %59 = icmp ult i64 %.018.lcssa, %58
  br i1 %59, label %71, label %72

60:                                               ; preds = %.lr.ph, %60
  %.025 = phi float [ 0x47EFFFFFE0000000, %.lr.ph ], [ %.1, %60 ]
  %.01724 = phi i64 [ 0, %.lr.ph ], [ %68, %60 ]
  %.01823 = phi i64 [ %55, %.lr.ph ], [ %.119, %60 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %24) #6
  %61 = call { ptr, i64 } @_ZN13GpuSyncedListI5VoxelEixEm(ptr noundef nonnull align 8 dereferenceable(80) @_ZL6voxels, i64 noundef %.01724)
  %62 = extractvalue { ptr, i64 } %61, 0
  store ptr %62, ptr %24, align 8
  %63 = extractvalue { ptr, i64 } %61, 1
  store i64 %63, ptr %57, align 8
  call void @_ZN13GpuSyncedListI5VoxelE7WrappercvS0_Ev(ptr dead_on_unwind nonnull writable sret(%struct.Voxel) align 16 %23, ptr noundef nonnull align 8 dereferenceable(16) %24)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #6
  call void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24) %25, ptr noundef nonnull align 4 dereferenceable(24) %5)
  call void @_ZN5VoxelC2ERKS_(ptr noundef nonnull align 16 dereferenceable(16) %26, ptr noundef nonnull align 16 dereferenceable(16) %23)
  %64 = call noundef float @_ZL9intersect3Ray5Voxel(ptr noundef nonnull %25, ptr noundef nonnull %26)
  %65 = fcmp ogt float %64, 0.000000e+00
  %66 = fcmp olt float %64, 0x47EFFFFFE0000000
  %or.cond = and i1 %65, %66
  %67 = fcmp ogt float %.025, %64
  %or.cond22 = select i1 %or.cond, i1 %67, i1 false
  %.119 = select i1 %or.cond22, i64 %.01724, i64 %.01823
  %.1 = select i1 %or.cond22, float %64, float %.025
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #6
  %68 = add nuw i64 %.01724, 1
  %69 = call noundef i64 @_ZN13GpuSyncedListI5VoxelE6lengthEv(ptr noundef nonnull align 8 dereferenceable(80) @_ZL6voxels)
  %70 = icmp ult i64 %68, %69
  br i1 %70, label %60, label %._crit_edge, !llvm.loop !20

71:                                               ; preds = %._crit_edge
  call void @_ZN13GpuSyncedListI5VoxelE6removeEm(ptr noundef nonnull align 8 dereferenceable(80) @_ZL6voxels, i64 noundef %.018.lcssa)
  br label %72

72:                                               ; preds = %50, %._crit_edge, %71, %49, %28, %48
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %73

73:                                               ; preds = %72, %4
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL5trace3Ray(ptr dead_on_unwind noalias writable sret(%struct.Ray) align 4, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6PortalC2Ev(ptr noundef nonnull align 16 dereferenceable(32)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZpLIfLi3EER6vectorIT_XT0_EES3_S2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmlIfLi3EE6vectorIT_XT0_EES1_S2_(ptr dead_on_unwind noalias writable sret(%struct.vector) align 4, float noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6PortalC2ERKS_(ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZN13GpuSyncedListI6PortalEixEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN13GpuSyncedListI6PortalE7WrapperaSES0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5VoxelC2Ev(ptr noundef nonnull align 16 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z5floorIfE6vectorIT_Li3EES2_(ptr dead_on_unwind noalias writable sret(%struct.vector) align 4, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZplIfE6vectorIT_Li3EES2_S2_(ptr dead_on_unwind noalias writable sret(%struct.vector) align 4, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6vectorIiLi3EEC2IfEES_IT_Li3EE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13GpuSyncedListI5VoxelE4pushES0_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5VoxelC2ERKS_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN13GpuSyncedListI5VoxelE6lengthEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZN13GpuSyncedListI5VoxelEixEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13GpuSyncedListI5VoxelE7WrappercvS0_Ev(ptr dead_on_unwind noalias writable sret(%struct.Voxel) align 16, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef float @_ZL9intersect3Ray5Voxel(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13GpuSyncedListI5VoxelE6removeEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) local_unnamed_addr #3 align 2

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass