; LLVM IR from erwincoumans/tiny-differentiable-simulator :: src/visualizer/opengl (tiny_gl_instancing_renderer)

; 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.TinyGLInstancingRenderer = type <{ ptr, %"class.std::vector", ptr, i8, i8, [2 x i8], i32, i32, i32, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<b3GraphicsInstance *, std::allocator<b3GraphicsInstance *>>::_Vector_impl" }
%"struct.std::_Vector_base<b3GraphicsInstance *, std::allocator<b3GraphicsInstance *>>::_Vector_impl" = type { %"struct.std::_Vector_base<b3GraphicsInstance *, std::allocator<b3GraphicsInstance *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<b3GraphicsInstance *, std::allocator<b3GraphicsInstance *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.InternalDataRenderer = type <{ %struct.GLInstanceRendererInternalData.base, [4 x i8], %struct.TinyCamera, ptr, [16 x float], [16 x float], [16 x float], [16 x float], [16 x float], i8, [3 x i8], %"struct.TINY::TinyVector3", %"struct.TINY::TinyVector3", i32, %"class.std::vector.5", ptr, i32, i32, %class.TinyResizablePool, i32, i32, float, i8, [3 x i8] }>
%struct.GLInstanceRendererInternalData.base = type <{ %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", i32, i32, i32, i32, i32 }>
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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 }
%struct.TinyCamera = type { ptr, ptr }
%"struct.TINY::TinyVector3" = type { float, float, float, i32 }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<InternalTextureHandle, std::allocator<InternalTextureHandle>>::_Vector_impl" }
%"struct.std::_Vector_base<InternalTextureHandle, std::allocator<InternalTextureHandle>>::_Vector_impl" = type { %"struct.std::_Vector_base<InternalTextureHandle, std::allocator<InternalTextureHandle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<InternalTextureHandle, std::allocator<InternalTextureHandle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.TinyResizablePool = type { ptr, %"class.std::vector.10", i32, i32 }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<TinyPoolBodyHandle<TinyPublicGraphicsInstanceData>, std::allocator<TinyPoolBodyHandle<TinyPublicGraphicsInstanceData>>>::_Vector_impl" }
%"struct.std::_Vector_base<TinyPoolBodyHandle<TinyPublicGraphicsInstanceData>, std::allocator<TinyPoolBodyHandle<TinyPublicGraphicsInstanceData>>>::_Vector_impl" = type { %"struct.std::_Vector_base<TinyPoolBodyHandle<TinyPublicGraphicsInstanceData>, std::allocator<TinyPoolBodyHandle<TinyPublicGraphicsInstanceData>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<TinyPoolBodyHandle<TinyPublicGraphicsInstanceData>, std::allocator<TinyPoolBodyHandle<TinyPublicGraphicsInstanceData>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.TinyPublicGraphicsInstanceData = type { i32, i32, [4 x float], [4 x float], [4 x float], [4 x float] }
%struct.GLInstanceRendererInternalData = type <{ %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", i32, i32, i32, i32, i32, [4 x i8] }>

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [130 x i8], align 1
@__PRETTY_FUNCTION__._ZN24TinyGLInstancingRenderer38write_single_instance_transform_to_cpuERKN4TINY11TinyVector3IfNS0_10FloatUtilsEEERKNS0_14TinyQuaternionIfS2_EEi = external hidden unnamed_addr constant [130 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN17TinyResizablePoolI18TinyPoolBodyHandleI30TinyPublicGraphicsInstanceDataEE10get_handleEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN24TinyGLInstancingRenderer38write_single_instance_transform_to_cpuERKN4TINY11TinyVector3IfNS0_10FloatUtilsEEERKNS0_14TinyQuaternionIfS2_EEi(ptr noundef nonnull align 8 dereferenceable(60) %0, ptr noundef nonnull align 4 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(16) %2, i32 noundef %3) unnamed_addr #1 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  %12 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %13 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %12, i32 0, i32 2
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = getelementptr inbounds %struct.InternalDataRenderer, ptr %14, i32 0, i32 18
  %16 = load i32, ptr %8, align 4, !tbaa !9
  %17 = call noundef ptr @_ZN17TinyResizablePoolI18TinyPoolBodyHandleI30TinyPublicGraphicsInstanceDataEE10get_handleEi(ptr noundef nonnull align 8 dereferenceable(40) %15, i32 noundef %16)
  store ptr %17, ptr %9, align 8, !tbaa !5
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %4
  br label %23

21:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 440, ptr noundef @__PRETTY_FUNCTION__._ZN24TinyGLInstancingRenderer38write_single_instance_transform_to_cpuERKN4TINY11TinyVector3IfNS0_10FloatUtilsEEERKNS0_14TinyQuaternionIfS2_EEi) #6
  unreachable

22:                                               ; No predecessors!
  br label %23

23:                                               ; preds = %22, %20
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %23
  store i32 1, ptr %10, align 4
  br label %132

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.TinyPublicGraphicsInstanceData, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 4, !tbaa !18
  store i32 %30, ptr %11, align 4, !tbaa !9
  %31 = load i32, ptr %11, align 4, !tbaa !9
  %32 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %12, i32 0, i32 2
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %33, i32 0, i32 6
  %35 = load i32, ptr %34, align 8, !tbaa !20
  %36 = icmp slt i32 %31, %35
  br i1 %36, label %37, label %38

37:                                               ; preds = %27
  br label %40

38:                                               ; preds = %27
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 446, ptr noundef @__PRETTY_FUNCTION__._ZN24TinyGLInstancingRenderer38write_single_instance_transform_to_cpuERKN4TINY11TinyVector3IfNS0_10FloatUtilsEEERKNS0_14TinyQuaternionIfS2_EEi) #6
  unreachable

39:                                               ; No predecessors!
  br label %40

40:                                               ; preds = %39, %37
  %41 = load i32, ptr %11, align 4, !tbaa !9
  %42 = icmp sge i32 %41, 0
  br i1 %42, label %43, label %44

43:                                               ; preds = %40
  br label %46

44:                                               ; preds = %40
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 447, ptr noundef @__PRETTY_FUNCTION__._ZN24TinyGLInstancingRenderer38write_single_instance_transform_to_cpuERKN4TINY11TinyVector3IfNS0_10FloatUtilsEEERKNS0_14TinyQuaternionIfS2_EEi) #6
  unreachable

45:                                               ; No predecessors!
  br label %46

46:                                               ; preds = %45, %43
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %47, i32 noundef 0)
  %49 = load float, ptr %48, align 4, !tbaa !26
  %50 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %12, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !11
  %52 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %51, i32 0, i32 0
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = mul nsw i32 %53, 4
  %55 = add nsw i32 %54, 0
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %56) #5
  store float %49, ptr %57, align 4, !tbaa !26
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %58, i32 noundef 1)
  %60 = load float, ptr %59, align 4, !tbaa !26
  %61 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %12, i32 0, i32 2
  %62 = load ptr, ptr %61, align 8, !tbaa !11
  %63 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %62, i32 0, i32 0
  %64 = load i32, ptr %11, align 4, !tbaa !9
  %65 = mul nsw i32 %64, 4
  %66 = add nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %67) #5
  store float %60, ptr %68, align 4, !tbaa !26
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %69, i32 noundef 2)
  %71 = load float, ptr %70, align 4, !tbaa !26
  %72 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %12, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !11
  %74 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %11, align 4, !tbaa !9
  %76 = mul nsw i32 %75, 4
  %77 = add nsw i32 %76, 2
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %78) #5
  store float %71, ptr %79, align 4, !tbaa !26
  %80 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %12, i32 0, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !11
  %82 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %11, align 4, !tbaa !9
  %84 = mul nsw i32 %83, 4
  %85 = add nsw i32 %84, 3
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %86) #5
  store float 1.000000e+00, ptr %87, align 4, !tbaa !26
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY14TinyQuaternionIfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %88, i32 noundef 0)
  %90 = load float, ptr %89, align 4, !tbaa !26
  %91 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %12, i32 0, i32 2
  %92 = load ptr, ptr %91, align 8, !tbaa !11
  %93 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %92, i32 0, i32 1
  %94 = load i32, ptr %11, align 4, !tbaa !9
  %95 = mul nsw i32 %94, 4
  %96 = add nsw i32 %95, 0
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %93, i64 noundef %97) #5
  store float %90, ptr %98, align 4, !tbaa !26
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY14TinyQuaternionIfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %99, i32 noundef 1)
  %101 = load float, ptr %100, align 4, !tbaa !26
  %102 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %12, i32 0, i32 2
  %103 = load ptr, ptr %102, align 8, !tbaa !11
  %104 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %11, align 4, !tbaa !9
  %106 = mul nsw i32 %105, 4
  %107 = add nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %104, i64 noundef %108) #5
  store float %101, ptr %109, align 4, !tbaa !26
  %110 = load ptr, ptr %7, align 8, !tbaa !5
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY14TinyQuaternionIfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %110, i32 noundef 2)
  %112 = load float, ptr %111, align 4, !tbaa !26
  %113 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %12, i32 0, i32 2
  %114 = load ptr, ptr %113, align 8, !tbaa !11
  %115 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %114, i32 0, i32 1
  %116 = load i32, ptr %11, align 4, !tbaa !9
  %117 = mul nsw i32 %116, 4
  %118 = add nsw i32 %117, 2
  %119 = sext i32 %118 to i64
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %115, i64 noundef %119) #5
  store float %112, ptr %120, align 4, !tbaa !26
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY14TinyQuaternionIfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %121, i32 noundef 3)
  %123 = load float, ptr %122, align 4, !tbaa !26
  %124 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %12, i32 0, i32 2
  %125 = load ptr, ptr %124, align 8, !tbaa !11
  %126 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %125, i32 0, i32 1
  %127 = load i32, ptr %11, align 4, !tbaa !9
  %128 = mul nsw i32 %127, 4
  %129 = add nsw i32 %128, 3
  %130 = sext i32 %129 to i64
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %126, i64 noundef %130) #5
  store float %123, ptr %131, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  store i32 0, ptr %10, align 4
  br label %132

132:                                              ; preds = %46, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %133 = load i32, ptr %10, align 4
  switch i32 %133, label %135 [
    i32 0, label %134
    i32 1, label %134
  ]

134:                                              ; preds = %132, %132
  ret void

135:                                              ; preds = %132
  unreachable
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY14TinyQuaternionIfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { noreturn nounwind "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 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 #5 = { nounwind }
attributes #6 = { noreturn 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, !6, i64 32}
!12 = !{!"_ZTS24TinyGLInstancingRenderer", !13, i64 8, !6, i64 32, !17, i64 40, !17, i64 41, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56}
!13 = !{!"_ZTSSt6vectorIP18b3GraphicsInstanceSaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIP18b3GraphicsInstanceSaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIP18b3GraphicsInstanceSaIS1_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIP18b3GraphicsInstanceSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"bool", !7, i64 0}
!18 = !{!19, !10, i64 4}
!19 = !{!"_ZTS30TinyPublicGraphicsInstanceData", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 24, !7, i64 40, !7, i64 56}
!20 = !{!21, !10, i64 104}
!21 = !{!"_ZTS30GLInstanceRendererInternalData", !22, i64 0, !22, i64 24, !22, i64 48, !22, i64 72, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112}
!22 = !{!"_ZTSSt6vectorIfSaIfEE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!27, !27, i64 0}
!27 = !{!"float", !7, i64 0}


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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [130 x i8], align 1
@__PRETTY_FUNCTION__._ZN24TinyGLInstancingRenderer38write_single_instance_transform_to_cpuERKN4TINY11TinyVector3IfNS0_10FloatUtilsEEERKNS0_14TinyQuaternionIfS2_EEi = external hidden unnamed_addr constant [130 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN24TinyGLInstancingRenderer38write_single_instance_transform_to_cpuERKN4TINY11TinyVector3IfNS0_10FloatUtilsEEERKNS0_14TinyQuaternionIfS2_EEi(ptr nocapture noundef nonnull readonly align 8 dereferenceable(60) %0, ptr noundef nonnull align 4 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(16) %2, i32 noundef %3) unnamed_addr #0 align 2 {
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 544
  %8 = tail call noundef ptr @_ZN17TinyResizablePoolI18TinyPoolBodyHandleI30TinyPublicGraphicsInstanceDataEE10get_handleEi(ptr noundef nonnull align 8 dereferenceable(40) %7, i32 noundef %3)
  %.not = icmp eq ptr %8, null
  br i1 %.not, label %9, label %10

9:                                                ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 440, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN24TinyGLInstancingRenderer38write_single_instance_transform_to_cpuERKN4TINY11TinyVector3IfNS0_10FloatUtilsEEERKNS0_14TinyQuaternionIfS2_EEi) #4
  unreachable

10:                                               ; preds = %4
  %11 = getelementptr inbounds i8, ptr %8, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !16
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %13, i64 104
  %15 = load i32, ptr %14, align 8, !tbaa !18
  %16 = icmp slt i32 %12, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %10
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 446, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN24TinyGLInstancingRenderer38write_single_instance_transform_to_cpuERKN4TINY11TinyVector3IfNS0_10FloatUtilsEEERKNS0_14TinyQuaternionIfS2_EEi) #4
  unreachable

18:                                               ; preds = %10
  %19 = icmp sgt i32 %12, -1
  br i1 %19, label %21, label %20

20:                                               ; preds = %18
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 447, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN24TinyGLInstancingRenderer38write_single_instance_transform_to_cpuERKN4TINY11TinyVector3IfNS0_10FloatUtilsEEERKNS0_14TinyQuaternionIfS2_EEi) #4
  unreachable

21:                                               ; preds = %18
  %22 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %1, i32 noundef 0)
  %23 = load float, ptr %22, align 4, !tbaa !24
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = shl nsw i32 %12, 2
  %26 = zext nneg i32 %25 to i64
  %27 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %26) #5
  store float %23, ptr %27, align 4, !tbaa !24
  %28 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %1, i32 noundef 1)
  %29 = load float, ptr %28, align 4, !tbaa !24
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = or disjoint i32 %25, 1
  %32 = zext nneg i32 %31 to i64
  %33 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %32) #5
  store float %29, ptr %33, align 4, !tbaa !24
  %34 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %1, i32 noundef 2)
  %35 = load float, ptr %34, align 4, !tbaa !24
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = or disjoint i32 %25, 2
  %38 = zext nneg i32 %37 to i64
  %39 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %38) #5
  store float %35, ptr %39, align 4, !tbaa !24
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = or disjoint i32 %25, 3
  %42 = zext nneg i32 %41 to i64
  %43 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %42) #5
  store float 1.000000e+00, ptr %43, align 4, !tbaa !24
  %44 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY14TinyQuaternionIfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %2, i32 noundef 0)
  %45 = load float, ptr %44, align 4, !tbaa !24
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 24
  %48 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %26) #5
  store float %45, ptr %48, align 4, !tbaa !24
  %49 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY14TinyQuaternionIfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %2, i32 noundef 1)
  %50 = load float, ptr %49, align 4, !tbaa !24
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %51, i64 24
  %53 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %32) #5
  store float %50, ptr %53, align 4, !tbaa !24
  %54 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY14TinyQuaternionIfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %2, i32 noundef 2)
  %55 = load float, ptr %54, align 4, !tbaa !24
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 24
  %58 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %38) #5
  store float %55, ptr %58, align 4, !tbaa !24
  %59 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY14TinyQuaternionIfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %2, i32 noundef 3)
  %60 = load float, ptr %59, align 4, !tbaa !24
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %61, i64 24
  %63 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %42) #5
  store float %60, ptr %63, align 4, !tbaa !24
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4TINY14TinyQuaternionIfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef) local_unnamed_addr #3 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 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 = { noreturn nounwind "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 = { 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 #4 = { noreturn nounwind }
attributes #5 = { 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, !11, i64 32}
!6 = !{!"_ZTS24TinyGLInstancingRenderer", !7, i64 8, !11, i64 32, !14, i64 40, !14, i64 41, !15, i64 44, !15, i64 48, !15, i64 52, !15, i64 56}
!7 = !{!"_ZTSSt6vectorIP18b3GraphicsInstanceSaIS1_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseIP18b3GraphicsInstanceSaIS1_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseIP18b3GraphicsInstanceSaIS1_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIP18b3GraphicsInstanceSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"bool", !12, i64 0}
!15 = !{!"int", !12, i64 0}
!16 = !{!17, !15, i64 4}
!17 = !{!"_ZTS30TinyPublicGraphicsInstanceData", !15, i64 0, !15, i64 4, !12, i64 8, !12, i64 24, !12, i64 40, !12, i64 56}
!18 = !{!19, !15, i64 104}
!19 = !{!"_ZTS30GLInstanceRendererInternalData", !20, i64 0, !20, i64 24, !20, i64 48, !20, i64 72, !15, i64 96, !15, i64 100, !15, i64 104, !15, i64 108, !15, i64 112}
!20 = !{!"_ZTSSt6vectorIfSaIfEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!24 = !{!25, !25, i64 0}
!25 = !{!"float", !12, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass