; LLVM IR from erwincoumans/tiny-differentiable-simulator :: src/visualizer/opengl/tiny_camera.ll (ZN10TinyCamera6updateEv)

; 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::TinyQuaternion" = type { float, float, float, float }
%"struct.TINY::TinyVector3" = type { float, float, float, i32 }
%"class.TINY::TinyMatrix3x3" = type { [3 x %"struct.TINY::TinyVector3"], i32, i32 }
%struct.TinyCamera = type { ptr, ptr }
%struct.TinyCameraInternalData = type { %"struct.TINY::TinyVector3", float, %"struct.TINY::TinyVector3", %"struct.TINY::TinyVector3", i32, %"struct.TINY::TinyVector3", float, float, float, float, float, [16 x float], [16 x float] }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10TinyCamera6updateEv(ptr noundef nonnull align 8 dereferenceable(16) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca %"struct.TINY::TinyQuaternion", align 4
  %7 = alloca i32, 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 i32, align 4
  %13 = alloca %"struct.TINY::TinyVector3", align 4
  %14 = alloca %"struct.TINY::TinyVector3", align 4
  %15 = alloca %"class.TINY::TinyMatrix3x3", align 4
  %16 = alloca %"struct.TINY::TinyVector3", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %17 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %18 = getelementptr inbounds %struct.TinyCamera, ptr %17, i32 0, i32 1
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = getelementptr inbounds %struct.TinyCameraInternalData, ptr %19, i32 0, i32 6
  %21 = load float, ptr %20, align 4, !tbaa !11
  %22 = fmul float %21, 0x3F91DF46A0000000
  store float %22, ptr %3, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %23 = getelementptr inbounds %struct.TinyCamera, ptr %17, i32 0, i32 1
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds %struct.TinyCameraInternalData, ptr %24, i32 0, i32 7
  %26 = load float, ptr %25, align 4, !tbaa !17
  %27 = fmul float %26, 0x3F91DF46A0000000
  store float %27, ptr %4, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store float 0.000000e+00, ptr %5, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 -1, ptr %7, align 4, !tbaa !18
  %28 = getelementptr inbounds %struct.TinyCamera, ptr %17, i32 0, i32 1
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = getelementptr inbounds %struct.TinyCameraInternalData, ptr %29, i32 0, i32 4
  %31 = load i32, ptr %30, align 4, !tbaa !19
  switch i32 %31, label %47 [
    i32 1, label %32
    i32 2, label %40
  ]

32:                                               ; preds = %1
  store i32 2, ptr %7, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %8, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00)
  %33 = getelementptr inbounds %struct.TinyCamera, ptr %17, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.TinyCameraInternalData, ptr %34, i32 0, i32 2
  %36 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %35, ptr noundef nonnull align 4 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  %37 = load float, ptr %4, align 4, !tbaa !16
  %38 = fneg float %37
  %39 = load float, ptr %3, align 4, !tbaa !16
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %9, float noundef %38, float noundef %39, float noundef 0.000000e+00)
  call void @_ZN4TINY14TinyQuaternionIfNS_10FloatUtilsEE13set_euler_rpyERKNS_11TinyVector3IfS1_EE(ptr noundef nonnull align 4 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(16) %9)
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  br label %48

40:                                               ; preds = %1
  store i32 1, ptr %7, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %10, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %41 = getelementptr inbounds %struct.TinyCamera, ptr %17, i32 0, i32 1
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.TinyCameraInternalData, ptr %42, i32 0, i32 2
  %44 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %43, ptr noundef nonnull align 4 dereferenceable(16) %10)
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %45 = load float, ptr %4, align 4, !tbaa !16
  %46 = load float, ptr %3, align 4, !tbaa !16
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %11, float noundef %45, float noundef 0.000000e+00, float noundef %46)
  call void @_ZN4TINY14TinyQuaternionIfNS_10FloatUtilsEE13set_euler_rpyERKNS_11TinyVector3IfS1_EE(ptr noundef nonnull align 4 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  br label %48

47:                                               ; preds = %1
  store i32 1, ptr %12, align 4
  br label %81

48:                                               ; preds = %40, %32
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %13, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %49 = getelementptr inbounds %struct.TinyCamera, ptr %17, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.TinyCameraInternalData, ptr %50, i32 0, i32 1
  %52 = load float, ptr %51, align 4, !tbaa !20
  %53 = fneg float %52
  %54 = load i32, ptr %7, align 4, !tbaa !18
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %13, i32 noundef %54)
  store float %53, ptr %55, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %15) #5
  call void @_ZN4TINY13TinyMatrix3x3IfNS_10FloatUtilsEEC2ERKNS_14TinyQuaternionIfS1_EE(ptr noundef nonnull align 4 dereferenceable(56) %15, ptr noundef nonnull align 4 dereferenceable(16) %6)
  call void @_ZN4TINYmlIfNS_10FloatUtilsEEENS_11TinyVector3IT_T0_EERKNS_13TinyMatrix3x3IS3_S4_EERKS5_(ptr dead_on_unwind writable sret(%"struct.TINY::TinyVector3") align 4 %14, ptr noundef nonnull align 4 dereferenceable(56) %15, ptr noundef nonnull align 4 dereferenceable(16) %13)
  %56 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(16) %14)
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  %57 = getelementptr inbounds %struct.TinyCamera, ptr %17, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct.TinyCameraInternalData, ptr %58, i32 0, i32 5
  %60 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %59, ptr noundef nonnull align 4 dereferenceable(16) %13)
  %61 = getelementptr inbounds %struct.TinyCamera, ptr %17, i32 0, i32 1
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.TinyCameraInternalData, ptr %62, i32 0, i32 0
  %64 = getelementptr inbounds %struct.TinyCamera, ptr %17, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.TinyCameraInternalData, ptr %65, i32 0, i32 5
  %67 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEpLERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %66, ptr noundef nonnull align 4 dereferenceable(16) %63)
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %68 = getelementptr inbounds %struct.TinyCamera, ptr %17, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !9
  %70 = getelementptr inbounds %struct.TinyCameraInternalData, ptr %69, i32 0, i32 0
  %71 = getelementptr inbounds %struct.TinyCamera, ptr %17, i32 0, i32 1
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.TinyCameraInternalData, ptr %72, i32 0, i32 5
  call void @_ZN4TINYmiIfNS_10FloatUtilsEEENS_11TinyVector3IT_T0_EERKS5_S7_(ptr dead_on_unwind writable sret(%"struct.TINY::TinyVector3") align 4 %16, ptr noundef nonnull align 4 dereferenceable(16) %70, ptr noundef nonnull align 4 dereferenceable(16) %73)
  %74 = getelementptr inbounds %struct.TinyCamera, ptr %17, i32 0, i32 1
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct.TinyCameraInternalData, ptr %75, i32 0, i32 3
  %77 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %76, ptr noundef nonnull align 4 dereferenceable(16) %16)
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  %78 = getelementptr inbounds %struct.TinyCamera, ptr %17, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.TinyCameraInternalData, ptr %79, i32 0, i32 3
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEE9normalizeEv(ptr noundef nonnull align 4 dereferenceable(16) %80)
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  store i32 0, ptr %12, align 4
  br label %81

81:                                               ; preds = %48, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  %82 = load i32, ptr %12, align 4
  switch i32 %82, label %84 [
    i32 0, label %83
    i32 1, label %83
  ]

83:                                               ; preds = %81, %81
  ret void

84:                                               ; preds = %81
  unreachable
}

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

; 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 #2 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)) #2 align 2

; 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 @_ZN4TINY14TinyQuaternionIfNS_10FloatUtilsEE13set_euler_rpyERKNS_11TinyVector3IfS1_EE(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) #0 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) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4TINYmlIfNS_10FloatUtilsEEENS_11TinyVector3IT_T0_EERKNS_13TinyMatrix3x3IS3_S4_EERKS5_(ptr dead_on_unwind noalias writable sret(%"struct.TINY::TinyVector3") align 4, ptr noundef nonnull align 4 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(16)) #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4TINYmiIfNS_10FloatUtilsEEENS_11TinyVector3IT_T0_EERKS5_S7_(ptr dead_on_unwind noalias writable sret(%"struct.TINY::TinyVector3") align 4, ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEE9normalizeEv(ptr noundef nonnull align 4 dereferenceable(16)) #4 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 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !6, i64 8}
!10 = !{!"_ZTS10TinyCamera", !6, i64 8}
!11 = !{!12, !14, i64 72}
!12 = !{!"_ZTS22TinyCameraInternalData", !13, i64 0, !14, i64 16, !13, i64 20, !13, i64 36, !15, i64 52, !13, i64 56, !14, i64 72, !14, i64 76, !14, i64 80, !14, i64 84, !14, i64 88, !7, i64 92, !7, i64 156}
!13 = !{!"_ZTSN4TINY11TinyVector3IfNS_10FloatUtilsEEE", !14, i64 0, !14, i64 4, !14, i64 8, !15, i64 12}
!14 = !{!"float", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!14, !14, i64 0}
!17 = !{!12, !14, i64 76}
!18 = !{!15, !15, i64 0}
!19 = !{!12, !15, i64 52}
!20 = !{!12, !14, i64 16}


; 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::TinyQuaternion" = type { float, float, float, float }
%"struct.TINY::TinyVector3" = type { float, float, float, i32 }
%"class.TINY::TinyMatrix3x3" = type { [3 x %"struct.TINY::TinyVector3"], i32, i32 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10TinyCamera6updateEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(16) %0) local_unnamed_addr #0 align 2 {
  %2 = alloca %"struct.TINY::TinyQuaternion", align 4
  %3 = alloca %"struct.TINY::TinyVector3", align 4
  %4 = alloca %"struct.TINY::TinyVector3", align 4
  %5 = alloca %"struct.TINY::TinyVector3", align 4
  %6 = alloca %"struct.TINY::TinyVector3", align 4
  %7 = alloca %"struct.TINY::TinyVector3", align 4
  %8 = alloca %"struct.TINY::TinyVector3", align 4
  %9 = alloca %"class.TINY::TinyMatrix3x3", align 4
  %10 = alloca %"struct.TINY::TinyVector3", align 4
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 72
  %14 = load float, ptr %13, align 4, !tbaa !10
  %15 = fmul float %14, 0x3F91DF46A0000000
  %16 = getelementptr inbounds i8, ptr %12, i64 76
  %17 = load float, ptr %16, align 4, !tbaa !15
  %18 = fmul float %17, 0x3F91DF46A0000000
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #5
  %19 = getelementptr inbounds i8, ptr %12, i64 52
  %20 = load i32, ptr %19, align 4, !tbaa !16
  switch i32 %20, label %50 [
    i32 1, label %21
    i32 2, label %26
  ]

21:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %3, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00)
  %22 = load ptr, ptr %11, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 20
  %24 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %25 = fneg float %18
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %4, float noundef %25, float noundef %15, float noundef 0.000000e+00)
  call void @_ZN4TINY14TinyQuaternionIfNS_10FloatUtilsEE13set_euler_rpyERKNS_11TinyVector3IfS1_EE(ptr noundef nonnull align 4 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(16) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %30

26:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %5, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 20
  %29 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  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 %18, float noundef 0.000000e+00, float noundef %15)
  call void @_ZN4TINY14TinyQuaternionIfNS_10FloatUtilsEE13set_euler_rpyERKNS_11TinyVector3IfS1_EE(ptr noundef nonnull align 4 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %30

30:                                               ; preds = %26, %21
  %.0 = phi i32 [ 1, %26 ], [ 2, %21 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %7, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %31 = load ptr, ptr %11, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %33 = load float, ptr %32, align 4, !tbaa !17
  %34 = fneg float %33
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEixEi(ptr noundef nonnull align 4 dereferenceable(16) %7, i32 noundef %.0)
  store float %34, ptr %35, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #5
  call void @_ZN4TINY13TinyMatrix3x3IfNS_10FloatUtilsEEC2ERKNS_14TinyQuaternionIfS1_EE(ptr noundef nonnull align 4 dereferenceable(56) %9, ptr noundef nonnull align 4 dereferenceable(16) %2)
  call void @_ZN4TINYmlIfNS_10FloatUtilsEEENS_11TinyVector3IT_T0_EERKNS_13TinyMatrix3x3IS3_S4_EERKS5_(ptr dead_on_unwind nonnull writable sret(%"struct.TINY::TinyVector3") align 4 %8, ptr noundef nonnull align 4 dereferenceable(56) %9, ptr noundef nonnull align 4 dereferenceable(16) %7)
  %36 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %37, i64 56
  %39 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %38, ptr noundef nonnull align 4 dereferenceable(16) %7)
  %40 = load ptr, ptr %11, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 56
  %42 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEpLERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %41, ptr noundef nonnull align 4 dereferenceable(16) %40)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 56
  call void @_ZN4TINYmiIfNS_10FloatUtilsEEENS_11TinyVector3IT_T0_EERKS5_S7_(ptr dead_on_unwind nonnull writable sret(%"struct.TINY::TinyVector3") align 4 %10, ptr noundef nonnull align 4 dereferenceable(16) %43, ptr noundef nonnull align 4 dereferenceable(16) %44)
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %45, i64 36
  %47 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %46, ptr noundef nonnull align 4 dereferenceable(16) %10)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 36
  call void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEE9normalizeEv(ptr noundef nonnull align 4 dereferenceable(16) %49)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br label %50

50:                                               ; preds = %1, %30
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  ret void
}

; 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 nounwind uwtable
declare dso_local void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEEC2Efff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #2 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 #2 align 2

; 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 @_ZN4TINY14TinyQuaternionIfNS_10FloatUtilsEE13set_euler_rpyERKNS_11TinyVector3IfS1_EE(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #0 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 #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4TINYmlIfNS_10FloatUtilsEEENS_11TinyVector3IT_T0_EERKNS_13TinyMatrix3x3IS3_S4_EERKS5_(ptr dead_on_unwind noalias writable sret(%"struct.TINY::TinyVector3") align 4, ptr noundef nonnull align 4 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4TINYmiIfNS_10FloatUtilsEEENS_11TinyVector3IT_T0_EERKS5_S7_(ptr dead_on_unwind noalias writable sret(%"struct.TINY::TinyVector3") align 4, ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4TINY11TinyVector3IfNS_10FloatUtilsEE9normalizeEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #4 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 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !7, i64 8}
!6 = !{!"_ZTS10TinyCamera", !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !13, i64 72}
!11 = !{!"_ZTS22TinyCameraInternalData", !12, i64 0, !13, i64 16, !12, i64 20, !12, i64 36, !14, i64 52, !12, i64 56, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !8, i64 92, !8, i64 156}
!12 = !{!"_ZTSN4TINY11TinyVector3IfNS_10FloatUtilsEEE", !13, i64 0, !13, i64 4, !13, i64 8, !14, i64 12}
!13 = !{!"float", !8, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!11, !13, i64 76}
!16 = !{!11, !14, i64 52}
!17 = !{!11, !13, i64 16}
!18 = !{!13, !13, i64 0}


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