; LLVM IR from ronan-kerviche/glip-lib :: GLIP-Lib/src/Core (Geometry)

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

%"class.Glip::CorePipeline::GeometryPrimitives::PointsGrid3D" = type <{ %"class.Glip::CorePipeline::GeometryModel", i32, i32, i32, i8, [3 x i8] }>
%"class.Glip::CorePipeline::GeometryModel" = type { ptr, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.0", i32, i8, i8, i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTVN4Glip12CorePipeline18GeometryPrimitives12PointsGrid3DE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Glip12CorePipeline13GeometryModelC2ENS1_12GeometryTypeEijbb(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress uwtable
declare dso_local void @_ZN4Glip12CorePipeline13GeometryModel15reserveVerticesEm(ptr noundef nonnull align 8 dereferenceable(128), i64 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4Glip12CorePipeline13GeometryModel11addVertex3DERKfS3_S3_S3_S3_S3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Glip12CorePipeline18GeometryPrimitives12PointsGrid3DC2Eiiib(ptr noundef nonnull align 8 dereferenceable(141) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i1 noundef zeroext %4) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca float, align 4
  %31 = alloca float, align 4
  %32 = alloca float, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  %33 = zext i1 %4 to i8
  store i8 %33, ptr %10, align 1, !tbaa !11
  %34 = load ptr, ptr %6, align 8
  call void @_ZN4Glip12CorePipeline13GeometryModelC2ENS1_12GeometryTypeEijbb(ptr noundef nonnull align 8 dereferenceable(128) %34, i32 noundef 4, i32 noundef 3, i32 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false)
  store ptr getelementptr inbounds inrange(-16, 16) ({ [4 x ptr] }, ptr @_ZTVN4Glip12CorePipeline18GeometryPrimitives12PointsGrid3DE, i32 0, i32 0, i32 2), ptr %34, align 8, !tbaa !13
  %35 = getelementptr inbounds %"class.Glip::CorePipeline::GeometryPrimitives::PointsGrid3D", ptr %34, i32 0, i32 1
  %36 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %36, ptr %35, align 8, !tbaa !15
  %37 = getelementptr inbounds %"class.Glip::CorePipeline::GeometryPrimitives::PointsGrid3D", ptr %34, i32 0, i32 2
  %38 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %38, ptr %37, align 4, !tbaa !27
  %39 = getelementptr inbounds %"class.Glip::CorePipeline::GeometryPrimitives::PointsGrid3D", ptr %34, i32 0, i32 3
  %40 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %40, ptr %39, align 8, !tbaa !28
  %41 = getelementptr inbounds %"class.Glip::CorePipeline::GeometryPrimitives::PointsGrid3D", ptr %34, i32 0, i32 4
  %42 = load i8, ptr %10, align 1, !tbaa !11, !range !29, !noundef !30
  %43 = trunc i8 %42 to i1
  %44 = zext i1 %43 to i8
  store i8 %44, ptr %41, align 4, !tbaa !31
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = mul nsw i32 %45, %46
  %48 = load i32, ptr %9, align 4, !tbaa !9
  %49 = mul nsw i32 %47, %48
  %50 = sext i32 %49 to i64
  invoke void @_ZN4Glip12CorePipeline13GeometryModel15reserveVerticesEm(ptr noundef nonnull align 8 dereferenceable(128) %34, i64 noundef %50)
          to label %51 unwind label %57

51:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %124, %51
  %53 = load i32, ptr %13, align 4, !tbaa !9
  %54 = load i32, ptr %9, align 4, !tbaa !9
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %61, label %56

56:                                               ; preds = %52
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %127

57:                                               ; preds = %5
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %11, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %12, align 4
  br label %128

61:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %120, %61
  %63 = load i32, ptr %15, align 4, !tbaa !9
  %64 = load i32, ptr %8, align 4, !tbaa !9
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %123

67:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %115, %67
  %69 = load i32, ptr %16, align 4, !tbaa !9
  %70 = load i32, ptr %7, align 4, !tbaa !9
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %68
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  br label %119

73:                                               ; preds = %68
  %74 = load i8, ptr %10, align 1, !tbaa !11, !range !29, !noundef !30
  %75 = trunc i8 %74 to i1
  br i1 %75, label %89, label %76

76:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %77 = load i32, ptr %16, align 4, !tbaa !9
  %78 = sitofp i32 %77 to float
  store float %78, ptr %17, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %79 = load i32, ptr %15, align 4, !tbaa !9
  %80 = sitofp i32 %79 to float
  store float %80, ptr %18, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %81 = load i32, ptr %13, align 4, !tbaa !9
  %82 = sitofp i32 %81 to float
  store float %82, ptr %19, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  store float 0.000000e+00, ptr %20, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  store float 0.000000e+00, ptr %21, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  store float 0.000000e+00, ptr %22, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  store float 0.000000e+00, ptr %23, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  store float 0.000000e+00, ptr %24, align 4, !tbaa !32
  %83 = invoke noundef i32 @_ZN4Glip12CorePipeline13GeometryModel11addVertex3DERKfS3_S3_S3_S3_S3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(128) %34, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %84 unwind label %85

84:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %114

85:                                               ; preds = %76
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %11, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %118

89:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  %90 = load i32, ptr %16, align 4, !tbaa !9
  %91 = sitofp i32 %90 to float
  %92 = load i32, ptr %7, align 4, !tbaa !9
  %93 = sub nsw i32 %92, 1
  %94 = sitofp i32 %93 to float
  %95 = fdiv float %91, %94
  store float %95, ptr %25, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  %96 = load i32, ptr %15, align 4, !tbaa !9
  %97 = sitofp i32 %96 to float
  %98 = load i32, ptr %8, align 4, !tbaa !9
  %99 = sub nsw i32 %98, 1
  %100 = sitofp i32 %99 to float
  %101 = fdiv float %97, %100
  store float %101, ptr %26, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #3
  %102 = load i32, ptr %13, align 4, !tbaa !9
  %103 = sitofp i32 %102 to float
  %104 = load i32, ptr %9, align 4, !tbaa !9
  %105 = sub nsw i32 %104, 1
  %106 = sitofp i32 %105 to float
  %107 = fdiv float %103, %106
  store float %107, ptr %27, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #3
  store float 0.000000e+00, ptr %28, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #3
  store float 0.000000e+00, ptr %29, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #3
  store float 0.000000e+00, ptr %30, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #3
  store float 0.000000e+00, ptr %31, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #3
  store float 0.000000e+00, ptr %32, align 4, !tbaa !32
  %108 = invoke noundef i32 @_ZN4Glip12CorePipeline13GeometryModel11addVertex3DERKfS3_S3_S3_S3_S3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(128) %34, ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %109 unwind label %110

109:                                              ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  br label %114

110:                                              ; preds = %89
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %11, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  br label %118

114:                                              ; preds = %109, %84
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %16, align 4, !tbaa !9
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %16, align 4, !tbaa !9
  br label %68, !llvm.loop !34

118:                                              ; preds = %110, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %128

119:                                              ; preds = %72
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %15, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %15, align 4, !tbaa !9
  br label %62, !llvm.loop !36

123:                                              ; preds = %66
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %13, align 4, !tbaa !9
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %13, align 4, !tbaa !9
  br label %52, !llvm.loop !37

127:                                              ; preds = %56
  ret void

128:                                              ; preds = %118, %57
  call void @_ZN4Glip12CorePipeline13GeometryModelD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %34) #3
  br label %129

129:                                              ; preds = %128
  %130 = load ptr, ptr %11, align 8
  %131 = load i32, ptr %12, align 4
  %132 = insertvalue { ptr, i32 } poison, ptr %130, 0
  %133 = insertvalue { ptr, i32 } %132, i32 %131, 1
  resume { ptr, i32 } %133
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Glip12CorePipeline13GeometryModelD2Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #2 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !10, i64 128}
!16 = !{!"_ZTSN4Glip12CorePipeline18GeometryPrimitives12PointsGrid3DE", !17, i64 0, !10, i64 128, !10, i64 132, !10, i64 136, !12, i64 140}
!17 = !{!"_ZTSN4Glip12CorePipeline13GeometryModelE", !18, i64 8, !18, i64 32, !18, i64 56, !22, i64 80, !26, i64 104, !12, i64 108, !12, i64 109, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124}
!18 = !{!"_ZTSSt6vectorIfSaIfEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSSt6vectorIjSaIjEE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSN4Glip12CorePipeline13GeometryModel12GeometryTypeE", !7, i64 0}
!27 = !{!16, !10, i64 132}
!28 = !{!16, !10, i64 136}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!16, !12, i64 140}
!32 = !{!33, !33, i64 0}
!33 = !{!"float", !7, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}
!37 = distinct !{!37, !35}


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

@_ZTVN4Glip12CorePipeline18GeometryPrimitives12PointsGrid3DE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Glip12CorePipeline13GeometryModelC2ENS1_12GeometryTypeEijbb(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; 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 uwtable
declare dso_local void @_ZN4Glip12CorePipeline13GeometryModel15reserveVerticesEm(ptr noundef nonnull align 8 dereferenceable(128), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4Glip12CorePipeline13GeometryModel11addVertex3DERKfS3_S3_S3_S3_S3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Glip12CorePipeline18GeometryPrimitives12PointsGrid3DC2Eiiib(ptr noundef nonnull align 8 dereferenceable(141) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i1 noundef zeroext %4) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = zext i1 %4 to i8
  tail call void @_ZN4Glip12CorePipeline13GeometryModelC2ENS1_12GeometryTypeEijbb(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef 4, i32 noundef 3, i32 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false)
  store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTVN4Glip12CorePipeline18GeometryPrimitives12PointsGrid3DE, i64 16), ptr %0, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %0, i64 128
  store i32 %1, ptr %23, align 8, !tbaa !8
  %24 = getelementptr inbounds i8, ptr %0, i64 132
  store i32 %2, ptr %24, align 4, !tbaa !24
  %25 = getelementptr inbounds i8, ptr %0, i64 136
  store i32 %3, ptr %25, align 8, !tbaa !25
  %26 = getelementptr inbounds i8, ptr %0, i64 140
  store i8 %22, ptr %26, align 4, !tbaa !26
  %27 = mul nsw i32 %2, %1
  %28 = mul nsw i32 %27, %3
  %29 = sext i32 %28 to i64
  invoke void @_ZN4Glip12CorePipeline13GeometryModel15reserveVerticesEm(ptr noundef nonnull align 8 dereferenceable(128) %0, i64 noundef %29)
          to label %.preheader39 unwind label %62

.preheader39:                                     ; preds = %5
  %30 = icmp sgt i32 %3, 0
  br i1 %30, label %.preheader38.lr.ph, label %._crit_edge

.preheader38.lr.ph:                               ; preds = %.preheader39
  %31 = icmp sgt i32 %2, 0
  %32 = add nsw i32 %1, -1
  %33 = sitofp i32 %32 to float
  %34 = add nsw i32 %2, -1
  %35 = sitofp i32 %34 to float
  %36 = add nsw i32 %3, -1
  %37 = uitofp nneg i32 %36 to float
  %38 = icmp sgt i32 %1, 0
  %or.cond = and i1 %31, %38
  br i1 %or.cond, label %.preheader38.lr.ph.split.us.split.us, label %._crit_edge

.preheader38.lr.ph.split.us.split.us:             ; preds = %.preheader38.lr.ph
  br i1 %4, label %.preheader38.us.us.us, label %.preheader38.us.us

.preheader38.us.us.us:                            ; preds = %.preheader38.lr.ph.split.us.split.us, %._crit_edge42.split.us.split.us.us.us.us
  %.02948.us.us.us = phi i32 [ %50, %._crit_edge42.split.us.split.us.us.us.us ], [ 0, %.preheader38.lr.ph.split.us.split.us ]
  %39 = uitofp nneg i32 %.02948.us.us.us to float
  %40 = fdiv float %39, %37
  br label %.preheader.us.us.us.us.us

.preheader.us.us.us.us.us:                        ; preds = %._crit_edge.split.us.us.us.us.us.us, %.preheader38.us.us.us
  %.02841.us.us.us.us.us = phi i32 [ 0, %.preheader38.us.us.us ], [ %49, %._crit_edge.split.us.us.us.us.us.us ]
  %41 = uitofp nneg i32 %.02841.us.us.us.us.us to float
  %42 = fdiv float %41, %35
  br label %43

43:                                               ; preds = %47, %.preheader.us.us.us.us.us
  %.040.us.us.us.us.us.us = phi i32 [ 0, %.preheader.us.us.us.us.us ], [ %48, %47 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #3
  %44 = uitofp nneg i32 %.040.us.us.us.us.us.us to float
  %45 = fdiv float %44, %33
  store float %45, ptr %14, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #3
  store float %42, ptr %15, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #3
  store float %40, ptr %16, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #3
  store float 0.000000e+00, ptr %17, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #3
  store float 0.000000e+00, ptr %18, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #3
  store float 0.000000e+00, ptr %19, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #3
  store float 0.000000e+00, ptr %20, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #3
  store float 0.000000e+00, ptr %21, align 4, !tbaa !27
  %46 = invoke noundef i32 @_ZN4Glip12CorePipeline13GeometryModel11addVertex3DERKfS3_S3_S3_S3_S3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %47 unwind label %.split.us.split.us.split.us.split.us.split.us.split.us

47:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #3
  %48 = add nuw nsw i32 %.040.us.us.us.us.us.us, 1
  %exitcond64.not = icmp eq i32 %48, %1
  br i1 %exitcond64.not, label %._crit_edge.split.us.us.us.us.us.us, label %43, !llvm.loop !29

._crit_edge.split.us.us.us.us.us.us:              ; preds = %47
  %49 = add nuw nsw i32 %.02841.us.us.us.us.us, 1
  %exitcond65.not = icmp eq i32 %49, %2
  br i1 %exitcond65.not, label %._crit_edge42.split.us.split.us.us.us.us, label %.preheader.us.us.us.us.us, !llvm.loop !31

._crit_edge42.split.us.split.us.us.us.us:         ; preds = %._crit_edge.split.us.us.us.us.us.us
  %50 = add nuw nsw i32 %.02948.us.us.us, 1
  %exitcond66.not = icmp eq i32 %50, %3
  br i1 %exitcond66.not, label %._crit_edge, label %.preheader38.us.us.us, !llvm.loop !32

.split.us.split.us.split.us.split.us.split.us.split.us: ; preds = %43
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #3
  br label %64

.preheader38.us.us:                               ; preds = %.preheader38.lr.ph.split.us.split.us, %._crit_edge42.split.us.split.us55.us
  %.02948.us.us = phi i32 [ %60, %._crit_edge42.split.us.split.us55.us ], [ 0, %.preheader38.lr.ph.split.us.split.us ]
  %52 = uitofp nneg i32 %.02948.us.us to float
  br label %.preheader.us.us53.us

.preheader.us.us53.us:                            ; preds = %.preheader38.us.us, %._crit_edge.split.us44.us.us
  %.02841.us.us54.us = phi i32 [ 0, %.preheader38.us.us ], [ %59, %._crit_edge.split.us44.us.us ]
  %53 = uitofp nneg i32 %.02841.us.us54.us to float
  br label %54

54:                                               ; preds = %57, %.preheader.us.us53.us
  %.040.us43.us.us = phi i32 [ 0, %.preheader.us.us53.us ], [ %58, %57 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %55 = uitofp nneg i32 %.040.us43.us.us to float
  store float %55, ptr %6, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  store float %53, ptr %7, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  store float %52, ptr %8, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #3
  store float 0.000000e+00, ptr %9, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  store float 0.000000e+00, ptr %10, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #3
  store float 0.000000e+00, ptr %11, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #3
  store float 0.000000e+00, ptr %12, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #3
  store float 0.000000e+00, ptr %13, align 4, !tbaa !27
  %56 = invoke noundef i32 @_ZN4Glip12CorePipeline13GeometryModel11addVertex3DERKfS3_S3_S3_S3_S3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %57 unwind label %.split.us46.split.us.split.us

57:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  %58 = add nuw nsw i32 %.040.us43.us.us, 1
  %exitcond.not = icmp eq i32 %58, %1
  br i1 %exitcond.not, label %._crit_edge.split.us44.us.us, label %54, !llvm.loop !29

._crit_edge.split.us44.us.us:                     ; preds = %57
  %59 = add nuw nsw i32 %.02841.us.us54.us, 1
  %exitcond62.not = icmp eq i32 %59, %2
  br i1 %exitcond62.not, label %._crit_edge42.split.us.split.us55.us, label %.preheader.us.us53.us, !llvm.loop !31

._crit_edge42.split.us.split.us55.us:             ; preds = %._crit_edge.split.us44.us.us
  %60 = add nuw nsw i32 %.02948.us.us, 1
  %exitcond63.not = icmp eq i32 %60, %3
  br i1 %exitcond63.not, label %._crit_edge, label %.preheader38.us.us, !llvm.loop !32

.split.us46.split.us.split.us:                    ; preds = %54
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  br label %64

._crit_edge:                                      ; preds = %._crit_edge42.split.us.split.us55.us, %._crit_edge42.split.us.split.us.us.us.us, %.preheader38.lr.ph, %.preheader39
  ret void

62:                                               ; preds = %5
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %64

64:                                               ; preds = %.split.us46.split.us.split.us, %.split.us.split.us.split.us.split.us.split.us.split.us, %62
  %.pn.pn = phi { ptr, i32 } [ %63, %62 ], [ %51, %.split.us.split.us.split.us.split.us.split.us.split.us ], [ %61, %.split.us46.split.us.split.us ]
  call void @_ZN4Glip12CorePipeline13GeometryModelD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %0) #3
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Glip12CorePipeline13GeometryModelD2Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #2 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !23, i64 128}
!9 = !{!"_ZTSN4Glip12CorePipeline18GeometryPrimitives12PointsGrid3DE", !10, i64 0, !23, i64 128, !23, i64 132, !23, i64 136, !22, i64 140}
!10 = !{!"_ZTSN4Glip12CorePipeline13GeometryModelE", !11, i64 8, !11, i64 32, !11, i64 56, !17, i64 80, !21, i64 104, !22, i64 108, !22, i64 109, !23, i64 112, !23, i64 116, !23, i64 120, !23, i64 124}
!11 = !{!"_ZTSSt6vectorIfSaIfEE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !16, i64 0}
!16 = !{!"omnipotent char", !7, i64 0}
!17 = !{!"_ZTSSt6vectorIjSaIjEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!21 = !{!"_ZTSN4Glip12CorePipeline13GeometryModel12GeometryTypeE", !16, i64 0}
!22 = !{!"bool", !16, i64 0}
!23 = !{!"int", !16, i64 0}
!24 = !{!9, !23, i64 132}
!25 = !{!9, !23, i64 136}
!26 = !{!9, !22, i64 140}
!27 = !{!28, !28, i64 0}
!28 = !{!"float", !16, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = distinct !{!32, !30}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass