; LLVM IR from jpvt/Computer_Graphics :: Assignment #3/third_party/glm/test/gtc/gtc_packing.ll (Z14test_packUnormv)

; 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.std::vector.66" = type { %"struct.std::_Vector_base.67" }
%"struct.std::_Vector_base.67" = type { %"struct.std::_Vector_base<glm::vec<2, float>, std::allocator<glm::vec<2, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<glm::vec<2, float>, std::allocator<glm::vec<2, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<glm::vec<2, float>, std::allocator<glm::vec<2, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<glm::vec<2, float>, std::allocator<glm::vec<2, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.glm::vec.71" = type { %union.anon.72, %union.anon.73 }
%union.anon.72 = type { float }
%union.anon.73 = type { float }
%"struct.glm::vec.77" = type { %union.anon.78, %union.anon.79 }
%union.anon.78 = type { i16 }
%union.anon.79 = type { i16 }
%"struct.glm::vec.74" = type { %union.anon.75, %union.anon.76 }
%union.anon.75 = type { i8 }
%union.anon.76 = type { i8 }

@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [111 x i8], align 1
@__PRETTY_FUNCTION__._Z14test_packUnormv = external hidden unnamed_addr constant [21 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3glm3vecILi2EfLNS_9qualifierE0EEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #5 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3glm3allILi2ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(2)) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i16 @_ZN3glm12epsilonEqualILi2EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #7

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z14test_packUnormv() #8 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector.66", align 8
  %3 = alloca %"struct.glm::vec.71", align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.glm::vec.71", align 4
  %7 = alloca i64, align 8
  %8 = alloca %"struct.glm::vec.71", align 4
  %9 = alloca %"struct.glm::vec.77", align 2
  %10 = alloca %"struct.glm::vec.71", align 4
  %11 = alloca %"struct.glm::vec.74", align 1
  %12 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #9
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %2) #9
  call void @_ZNSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #9
  invoke void @_ZN3glm3vecILi2EfLNS_9qualifierE0EEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %3, float noundef 1.000000e+00, float noundef 0x3FE6666660000000)
          to label %13 unwind label %22

13:                                               ; preds = %0
  invoke void @_ZNSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(8) %3)
          to label %14 unwind label %22

14:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  invoke void @_ZN3glm3vecILi2EfLNS_9qualifierE0EEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef 5.000000e-01, float noundef 0x3FB99999A0000000)
          to label %15 unwind label %26

15:                                               ; preds = %14
  invoke void @_ZNSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(8) %6)
          to label %16 unwind label %26

16:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %17

17:                                               ; preds = %64, %16
  %18 = load i64, ptr %7, align 8, !tbaa !9
  %19 = call noundef i64 @_ZNKSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  %20 = icmp ult i64 %18, %19
  br i1 %20, label %30, label %21

21:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %69

22:                                               ; preds = %13, %0
  %23 = landingpad { ptr, i32 }
          cleanup
  %24 = extractvalue { ptr, i32 } %23, 0
  store ptr %24, ptr %4, align 8
  %25 = extractvalue { ptr, i32 } %23, 1
  store i32 %25, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  br label %71

26:                                               ; preds = %15, %14
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %4, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  br label %71

30:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %31 = load i64, ptr %7, align 8, !tbaa !9
  %32 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %31) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %32, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %33 = invoke i32 @_ZN3glm9packUnormItLi2EfLNS_9qualifierE0EEENS_3vecIXT0_ET_XT2_EEERKNS2_IXT0_ET1_XT2_EEE(ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %34 unwind label %50

34:                                               ; preds = %30
  store i32 %33, ptr %9, align 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %35 = invoke <2 x float> @_ZN3glm11unpackUnormIfLi2EtLNS_9qualifierE0EEENS_3vecIXT0_ET_XT2_EEERKNS2_IXT0_ET1_XT2_EEE(ptr noundef nonnull align 2 dereferenceable(4) %9)
          to label %36 unwind label %54

36:                                               ; preds = %34
  store <2 x float> %35, ptr %10, align 4
  call void @llvm.lifetime.start.p0(i64 2, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store float 0x3F70101020000000, ptr %12, align 4, !tbaa !13
  %37 = invoke i16 @_ZN3glm12epsilonEqualILi2EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %38 unwind label %58

38:                                               ; preds = %36
  store i16 %37, ptr %11, align 1
  %39 = invoke noundef zeroext i1 @_ZN3glm3allILi2ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(2) %11)
          to label %40 unwind label %58

40:                                               ; preds = %38
  %41 = zext i1 %39 to i64
  %42 = select i1 %39, i32 0, i32 1
  %43 = load i32, ptr %1, align 4, !tbaa !5
  %44 = add nsw i32 %43, %42
  store i32 %44, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 2, ptr %11) #9
  %45 = load i32, ptr %1, align 4, !tbaa !5
  %46 = icmp ne i32 %45, 0
  %47 = xor i1 %46, true
  br i1 %47, label %48, label %49

48:                                               ; preds = %40
  br label %63

49:                                               ; preds = %40
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.9, i32 noundef 548, ptr noundef @__PRETTY_FUNCTION__._Z14test_packUnormv) #10
  unreachable

50:                                               ; preds = %30
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %4, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %5, align 4
  br label %68

54:                                               ; preds = %34
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %4, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %5, align 4
  br label %67

58:                                               ; preds = %38, %36
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %4, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 2, ptr %11) #9
  br label %67

62:                                               ; No predecessors!
  br label %63

63:                                               ; preds = %62, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  br label %64

64:                                               ; preds = %63
  %65 = load i64, ptr %7, align 8, !tbaa !9
  %66 = add i64 %65, 1
  store i64 %66, ptr %7, align 8, !tbaa !9
  br label %17, !llvm.loop !15

67:                                               ; preds = %58, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  br label %68

68:                                               ; preds = %67, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %71

69:                                               ; preds = %21
  %70 = load i32, ptr %1, align 4, !tbaa !5
  call void @_ZNSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #9
  ret i32 %70

71:                                               ; preds = %68, %26, %22
  call void @_ZNSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #9
  br label %72

72:                                               ; preds = %71
  %73 = load ptr, ptr %4, align 8
  %74 = load i32, ptr %5, align 4
  %75 = insertvalue { ptr, i32 } poison, ptr %73, 0
  %76 = insertvalue { ptr, i32 } %75, i32 %74, 1
  resume { ptr, i32 } %76
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN3glm9packUnormItLi2EfLNS_9qualifierE0EEENS_3vecIXT0_ET_XT2_EEERKNS2_IXT0_ET1_XT2_EEE(ptr noundef nonnull align 4 dereferenceable(8)) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZN3glm11unpackUnormIfLi2EtLNS_9qualifierE0EEENS_3vecIXT0_ET_XT2_EEERKNS2_IXT0_ET1_XT2_EEE(ptr noundef nonnull align 2 dereferenceable(4)) #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = { 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 #6 = { 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 #7 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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 #8 = { mustprogress uwtable "min-legal-vector-width"="64" "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 #9 = { nounwind }
attributes #10 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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

%"class.std::vector.66" = type { %"struct.std::_Vector_base.67" }
%"struct.std::_Vector_base.67" = type { %"struct.std::_Vector_base<glm::vec<2, float>, std::allocator<glm::vec<2, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<glm::vec<2, float>, std::allocator<glm::vec<2, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<glm::vec<2, float>, std::allocator<glm::vec<2, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<glm::vec<2, float>, std::allocator<glm::vec<2, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.glm::vec.71" = type { %union.anon.72, %union.anon.73 }
%union.anon.72 = type { float }
%union.anon.73 = type { float }
%"struct.glm::vec.77" = type { %union.anon.78, %union.anon.79 }
%union.anon.78 = type { i16 }
%union.anon.79 = type { i16 }
%"struct.glm::vec.74" = type { %union.anon.75, %union.anon.76 }
%union.anon.75 = type { i8 }
%union.anon.76 = type { i8 }

@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [111 x i8], align 1
@__PRETTY_FUNCTION__._Z14test_packUnormv = external hidden unnamed_addr constant [21 x i8], align 1

; 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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3glm3allILi2ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(2)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i16 @_ZN3glm12epsilonEqualILi2EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z14test_packUnormv() local_unnamed_addr #7 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.66", align 8
  %2 = alloca %"struct.glm::vec.71", align 4
  %3 = alloca %"struct.glm::vec.71", align 4
  %4 = alloca %"struct.glm::vec.71", align 8
  %5 = alloca %"struct.glm::vec.77", align 4
  %6 = alloca %"struct.glm::vec.71", align 8
  %7 = alloca %"struct.glm::vec.74", align 2
  %8 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #8
  call void @_ZNSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  call void @_ZN3glm3vecILi2EfLNS_9qualifierE0EEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %2, float noundef 1.000000e+00, float noundef 0x3FE6666660000000)
  invoke void @_ZNSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(8) %2)
          to label %9 unwind label %12

9:                                                ; preds = %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @_ZN3glm3vecILi2EfLNS_9qualifierE0EEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %3, float noundef 5.000000e-01, float noundef 0x3FB99999A0000000)
  invoke void @_ZNSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(8) %3)
          to label %10 unwind label %14

10:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %11 = call noundef i64 @_ZNKSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  %.not = icmp eq i64 %11, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %33, %10
  call void @_ZNSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #8
  ret i32 0

12:                                               ; preds = %0
  %13 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  br label %39

14:                                               ; preds = %9
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %39

.lr.ph:                                           ; preds = %10, %33
  %.015 = phi i64 [ %34, %33 ], [ 0, %10 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %16 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.015) #8
  %17 = load i64, ptr %16, align 4
  store i64 %17, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %18 = invoke i32 @_ZN3glm9packUnormItLi2EfLNS_9qualifierE0EEENS_3vecIXT0_ET_XT2_EEERKNS2_IXT0_ET1_XT2_EEE(ptr noundef nonnull align 4 dereferenceable(8) %4)
          to label %19 unwind label %27

19:                                               ; preds = %.lr.ph
  store i32 %18, ptr %5, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %20 = invoke <2 x float> @_ZN3glm11unpackUnormIfLi2EtLNS_9qualifierE0EEENS_3vecIXT0_ET_XT2_EEERKNS2_IXT0_ET1_XT2_EEE(ptr noundef nonnull align 2 dereferenceable(4) %5)
          to label %21 unwind label %29

21:                                               ; preds = %19
  store <2 x float> %20, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store float 0x3F70101020000000, ptr %8, align 4, !tbaa !5
  %22 = invoke i16 @_ZN3glm12epsilonEqualILi2EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %23 unwind label %31

23:                                               ; preds = %21
  store i16 %22, ptr %7, align 2
  %24 = invoke noundef zeroext i1 @_ZN3glm3allILi2ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(2) %7)
          to label %25 unwind label %31

25:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %7) #8
  br i1 %24, label %33, label %26

26:                                               ; preds = %25
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.9, i32 noundef 548, ptr noundef nonnull @__PRETTY_FUNCTION__._Z14test_packUnormv) #9
  unreachable

27:                                               ; preds = %.lr.ph
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %38

29:                                               ; preds = %19
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %37

31:                                               ; preds = %23, %21
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %7) #8
  br label %37

33:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %34 = add nuw i64 %.015, 1
  %35 = call noundef i64 @_ZNKSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  %36 = icmp ult i64 %34, %35
  br i1 %36, label %.lr.ph, label %._crit_edge, !llvm.loop !9

37:                                               ; preds = %31, %29
  %.pn = phi { ptr, i32 } [ %32, %31 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %38

38:                                               ; preds = %37, %27
  %.pn.pn = phi { ptr, i32 } [ %.pn, %37 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %39

39:                                               ; preds = %38, %14, %12
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %38 ], [ %15, %14 ], [ %13, %12 ]
  call void @_ZNSt6vectorIN3glm3vecILi2EfLNS0_9qualifierE0EEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN3glm9packUnormItLi2EfLNS_9qualifierE0EEENS_3vecIXT0_ET_XT2_EEERKNS2_IXT0_ET1_XT2_EEE(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZN3glm11unpackUnormIfLi2EtLNS_9qualifierE0EEENS_3vecIXT0_ET_XT2_EEERKNS2_IXT0_ET1_XT2_EEE(ptr noundef nonnull align 2 dereferenceable(4)) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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 #7 = { mustprogress uwtable "min-legal-vector-width"="64" "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 #8 = { nounwind }
attributes #9 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass