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

; 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.TINY::TinyVector3" = type { float, float, float, i32 }
%"struct.TINY::TinyQuaternion" = type { float, float, float, float }
%struct.TinyOpenGL3App = type { %struct.TinyCommonGraphicsApp.base, ptr, ptr, ptr }
%struct.TinyCommonGraphicsApp.base = type <{ ptr, ptr, ptr, ptr, ptr, i8, i8, i8, i8, float, float, float, float, i8, [3 x i8], [3 x float] }>
%struct.TinyOpenGL3AppInternalData = type { i32, i32, ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32 }

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14TinyOpenGL3App13register_gridEiiRKN4TINY11TinyVector3IfNS0_10FloatUtilsEEES5_(ptr noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 4 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(16) %4) unnamed_addr #2 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.TINY::TinyVector3", align 4
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.TINY::TinyQuaternion", align 4
  %15 = alloca %"struct.TINY::TinyVector3", align 4
  %16 = alloca %"struct.TINY::TinyVector3", align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.TINY::TinyVector3", align 4
  %21 = alloca %"struct.TINY::TinyVector3", align 4
  %22 = alloca %"struct.TINY::TinyVector3", 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 ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %23 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %11, float noundef 5.000000e-01, float noundef 5.000000e-01, float noundef 5.000000e-01)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store double 1.000000e-01, ptr %12, align 8, !tbaa !11
  %24 = load double, ptr %12, align 8, !tbaa !11
  %25 = fptrunc double %24 to float
  %26 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %23, i32 0, i32 1
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %27, i32 0, i32 13
  %29 = load i32, ptr %28, align 8, !tbaa !18
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %11, i32 noundef %29)
  store float %25, ptr %30, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %11, i32 noundef 0)
  %32 = load float, ptr %31, align 4, !tbaa !20
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %11, i32 noundef 1)
  %34 = load float, ptr %33, align 4, !tbaa !20
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %11, i32 noundef 2)
  %36 = load float, ptr %35, align 4, !tbaa !20
  %37 = load ptr, ptr %23, align 8, !tbaa !21
  %38 = getelementptr inbounds ptr, ptr %37, i64 23
  %39 = load ptr, ptr %38, align 8
  %40 = call noundef i32 %39(ptr noundef nonnull align 8 dereferenceable(104) %23, float noundef %32, float noundef %34, float noundef %36, i32 noundef -1, float noundef 1.000000e+00)
  store i32 %40, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  call void @_ZN4TINY14TinyQuaternionIfNS_10FloatUtilsEEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %14, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %15, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %16, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %120, %5
  %42 = load i32, ptr %17, align 4, !tbaa !9
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %123

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %116, %46
  %48 = load i32, ptr %19, align 4, !tbaa !9
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %119

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Ei(ptr noundef nonnull align 4 dereferenceable(16) %20, i32 noundef 0)
  %53 = load i32, ptr %17, align 4, !tbaa !9
  %54 = load i32, ptr %19, align 4, !tbaa !9
  %55 = add nsw i32 %53, %54
  %56 = srem i32 %55, 2
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %61

58:                                               ; preds = %52
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(16) %59)
  br label %64

61:                                               ; preds = %52
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(16) %62)
  br label %64

64:                                               ; preds = %61, %58
  %65 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %23, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !13
  %67 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %66, i32 0, i32 13
  %68 = load i32, ptr %67, align 8, !tbaa !18
  %69 = icmp eq i32 %68, 1
  br i1 %69, label %70, label %89

70:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  %71 = load i32, ptr %17, align 4, !tbaa !9
  %72 = sitofp i32 %71 to float
  %73 = fadd float %72, 5.000000e-01
  %74 = load i32, ptr %7, align 4, !tbaa !9
  %75 = sitofp i32 %74 to float
  %76 = fneg float %75
  %77 = call float @llvm.fmuladd.f32(float %76, float 5.000000e-01, float %73)
  %78 = load double, ptr %12, align 8, !tbaa !11
  %79 = fneg double %78
  %80 = fptrunc double %79 to float
  %81 = load i32, ptr %19, align 4, !tbaa !9
  %82 = sitofp i32 %81 to float
  %83 = fadd float %82, 5.000000e-01
  %84 = load i32, ptr %8, align 4, !tbaa !9
  %85 = sitofp i32 %84 to float
  %86 = fneg float %85
  %87 = call float @llvm.fmuladd.f32(float %86, float 5.000000e-01, float %83)
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %21, float noundef %77, float noundef %80, float noundef %87)
  %88 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(16) %21)
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br label %108

89:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %90 = load i32, ptr %17, align 4, !tbaa !9
  %91 = sitofp i32 %90 to float
  %92 = fadd float %91, 5.000000e-01
  %93 = load i32, ptr %7, align 4, !tbaa !9
  %94 = sitofp i32 %93 to float
  %95 = fneg float %94
  %96 = call float @llvm.fmuladd.f32(float %95, float 5.000000e-01, float %92)
  %97 = load i32, ptr %19, align 4, !tbaa !9
  %98 = sitofp i32 %97 to float
  %99 = fadd float %98, 5.000000e-01
  %100 = load i32, ptr %8, align 4, !tbaa !9
  %101 = sitofp i32 %100 to float
  %102 = fneg float %101
  %103 = call float @llvm.fmuladd.f32(float %102, float 5.000000e-01, float %99)
  %104 = load double, ptr %12, align 8, !tbaa !11
  %105 = fneg double %104
  %106 = fptrunc double %105 to float
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %22, float noundef %96, float noundef %103, float noundef %106)
  %107 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(16) %22)
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br label %108

108:                                              ; preds = %89, %70
  %109 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %23, i32 0, i32 3
  %110 = load ptr, ptr %109, align 8, !tbaa !23
  %111 = load i32, ptr %13, align 4, !tbaa !9
  %112 = load ptr, ptr %110, align 8, !tbaa !21
  %113 = getelementptr inbounds ptr, ptr %112, i64 17
  %114 = load ptr, ptr %113, align 8
  %115 = call noundef i32 %114(ptr noundef nonnull align 8 dereferenceable(60) %110, i32 noundef %111, ptr noundef nonnull align 4 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(16) %16, float noundef 1.000000e+00, i1 noundef zeroext true)
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  br label %116

116:                                              ; preds = %108
  %117 = load i32, ptr %19, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %19, align 4, !tbaa !9
  br label %47, !llvm.loop !24

119:                                              ; preds = %51
  br label %120

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

123:                                              ; preds = %45
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { 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 = { 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 }

!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 = !{!"double", !7, i64 0}
!13 = !{!14, !6, i64 80}
!14 = !{!"_ZTS14TinyOpenGL3App", !15, i64 0, !6, i64 80, !6, i64 88, !6, i64 96}
!15 = !{!"_ZTS21TinyCommonGraphicsApp", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !16, i64 40, !16, i64 41, !16, i64 42, !17, i64 44, !17, i64 48, !17, i64 52, !17, i64 56, !16, i64 60, !7, i64 64}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!19, !10, i64 88}
!19 = !{!"_ZTS26TinyOpenGL3AppInternalData", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100}
!20 = !{!17, !17, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, i64 0}
!23 = !{!14, !6, i64 96}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.TINY::TinyVector3" = type { float, float, float, i32 }
%"struct.TINY::TinyQuaternion" = type { float, float, float, float }

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14TinyOpenGL3App13register_gridEiiRKN4TINY11TinyVector3IfNS0_10FloatUtilsEEES5_(ptr noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 4 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(16) %4) unnamed_addr #2 align 2 {
  %6 = alloca %"struct.TINY::TinyVector3", align 4
  %7 = alloca %"struct.TINY::TinyQuaternion", align 4
  %8 = alloca %"struct.TINY::TinyVector3", align 4
  %9 = alloca %"struct.TINY::TinyVector3", align 4
  %10 = alloca %"struct.TINY::TinyVector3", align 4
  %11 = alloca %"struct.TINY::TinyVector3", align 4
  %12 = alloca %"struct.TINY::TinyVector3", align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %6, float noundef 5.000000e-01, float noundef 5.000000e-01, float noundef 5.000000e-01)
  %13 = getelementptr inbounds i8, ptr %0, i64 80
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %14, i64 88
  %16 = load i32, ptr %15, align 8, !tbaa !13
  %17 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %6, i32 noundef %16)
  store float 0x3FB99999A0000000, ptr %17, align 4, !tbaa !16
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %6, i32 noundef 0)
  %19 = load float, ptr %18, align 4, !tbaa !16
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %6, i32 noundef 1)
  %21 = load float, ptr %20, align 4, !tbaa !16
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %6, i32 noundef 2)
  %23 = load float, ptr %22, align 4, !tbaa !16
  %24 = load ptr, ptr %0, align 8, !tbaa !17
  %25 = getelementptr inbounds i8, ptr %24, i64 184
  %26 = load ptr, ptr %25, align 8
  %27 = call noundef i32 %26(ptr noundef nonnull align 8 dereferenceable(104) %0, float noundef %19, float noundef %21, float noundef %23, i32 noundef -1, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  call void @_ZN4TINY14TinyQuaternionIfNS_10FloatUtilsEEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %7, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %8, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %9, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
  %28 = icmp sgt i32 %1, 0
  br i1 %28, label %.preheader.lr.ph, label %._crit_edge27

.preheader.lr.ph:                                 ; preds = %5
  %29 = icmp sgt i32 %2, 0
  %30 = uitofp nneg i32 %1 to float
  %31 = fneg float %30
  %32 = sitofp i32 %2 to float
  %33 = fneg float %32
  %34 = getelementptr inbounds i8, ptr %0, i64 96
  br i1 %29, label %.preheader.us, label %._crit_edge27

.preheader.us:                                    ; preds = %.preheader.lr.ph, %._crit_edge.us
  %.02226.us = phi i32 [ %61, %._crit_edge.us ], [ 0, %.preheader.lr.ph ]
  %35 = uitofp nneg i32 %.02226.us to float
  %36 = fadd float %35, 5.000000e-01
  %37 = call float @llvm.fmuladd.f32(float %31, float 5.000000e-01, float %36)
  br label %38

38:                                               ; preds = %.preheader.us, %54
  %.025.us = phi i32 [ 0, %.preheader.us ], [ %60, %54 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Ei(ptr noundef nonnull align 4 dereferenceable(16) %10, i32 noundef 0)
  %39 = add nuw nsw i32 %.025.us, %.02226.us
  %40 = and i32 %39, 1
  %41 = icmp eq i32 %40, 0
  %. = select i1 %41, ptr %3, ptr %4
  %42 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(16) %.)
  %43 = load ptr, ptr %13, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 88
  %45 = load i32, ptr %44, align 8, !tbaa !13
  %46 = icmp eq i32 %45, 1
  %47 = uitofp nneg i32 %.025.us to float
  %48 = fadd float %47, 5.000000e-01
  %49 = call float @llvm.fmuladd.f32(float %33, float 5.000000e-01, float %48)
  br i1 %46, label %52, label %50

50:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %12, float noundef %37, float noundef %49, float noundef 0xBFB99999A0000000)
  %51 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(16) %12)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %54

52:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %11, float noundef %37, float noundef 0xBFB99999A0000000, float noundef %49)
  %53 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  br label %54

54:                                               ; preds = %52, %50
  %55 = load ptr, ptr %34, align 8, !tbaa !19
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  %57 = getelementptr inbounds i8, ptr %56, i64 136
  %58 = load ptr, ptr %57, align 8
  %59 = call noundef i32 %58(ptr noundef nonnull align 8 dereferenceable(60) %55, i32 noundef %27, ptr noundef nonnull align 4 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(16) %9, float noundef 1.000000e+00, i1 noundef zeroext true)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  %60 = add nuw nsw i32 %.025.us, 1
  %exitcond.not = icmp eq i32 %60, %2
  br i1 %exitcond.not, label %._crit_edge.us, label %38, !llvm.loop !20

._crit_edge.us:                                   ; preds = %54
  %61 = add nuw nsw i32 %.02226.us, 1
  %exitcond29.not = icmp eq i32 %61, %1
  br i1 %exitcond29.not, label %._crit_edge27, label %.preheader.us, !llvm.loop !22

._crit_edge27:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph, %5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { 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 = { 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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 80}
!6 = !{!"_ZTS14TinyOpenGL3App", !7, i64 0, !8, i64 80, !8, i64 88, !8, i64 96}
!7 = !{!"_ZTS21TinyCommonGraphicsApp", !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32, !11, i64 40, !11, i64 41, !11, i64 42, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !11, i64 60, !9, i64 64}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"bool", !9, i64 0}
!12 = !{!"float", !9, i64 0}
!13 = !{!14, !15, i64 88}
!14 = !{!"_ZTS26TinyOpenGL3AppInternalData", !15, i64 0, !15, i64 4, !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32, !15, i64 40, !15, i64 44, !15, i64 48, !8, i64 56, !8, i64 64, !8, i64 72, !8, i64 80, !15, i64 88, !15, i64 92, !15, i64 96, !15, i64 100}
!15 = !{!"int", !9, i64 0}
!16 = !{!12, !12, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !10, i64 0}
!19 = !{!6, !8, i64 96}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}


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