; LLVM IR from Dovyski/opengl-demos :: libs/glm-0.9.9.3/test/gtc/gtc_packing.ll (Z18test_packUnorm4x16v)

; 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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<glm::vec<4, float>, std::allocator<glm::vec<4, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<glm::vec<4, float>, std::allocator<glm::vec<4, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<glm::vec<4, float>, std::allocator<glm::vec<4, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<glm::vec<4, float>, std::allocator<glm::vec<4, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.glm::vec" = type { %union.anon.5 }
%union.anon.5 = type { %struct.anon }
%struct.anon = type { float, float, float, float }
%"struct.glm::vec.13" = type { %union.anon.14 }
%union.anon.14 = type { %struct.anon.15 }
%struct.anon.15 = type { i8, i8, i8, i8 }

@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [96 x i8], align 1
@__PRETTY_FUNCTION__._Z18test_packUnorm4x16v = external hidden unnamed_addr constant [25 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

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

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

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

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

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

; 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) #6

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z18test_packUnorm4x16v() #8 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector.0", align 8
  %3 = alloca %"struct.glm::vec", align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.glm::vec", align 4
  %7 = alloca %"struct.glm::vec", align 4
  %8 = alloca %"struct.glm::vec", align 4
  %9 = alloca i64, align 8
  %10 = alloca %"struct.glm::vec", align 4
  %11 = alloca i64, align 8
  %12 = alloca %"struct.glm::vec", align 4
  %13 = alloca %"struct.glm::vec.13", align 1
  %14 = 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 @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #9
  invoke void @_ZN3glm3vecILi4EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(16) %3, float noundef 1.000000e+00)
          to label %15 unwind label %28

15:                                               ; preds = %0
  invoke void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(16) %3)
          to label %16 unwind label %28

16:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #9
  invoke void @_ZN3glm3vecILi4EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(16) %6, float noundef 5.000000e-01)
          to label %17 unwind label %32

17:                                               ; preds = %16
  invoke void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(16) %6)
          to label %18 unwind label %32

18:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #9
  invoke void @_ZN3glm3vecILi4EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(16) %7, float noundef 0x3FB99999A0000000)
          to label %19 unwind label %36

19:                                               ; preds = %18
  invoke void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(16) %7)
          to label %20 unwind label %36

20:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #9
  invoke void @_ZN3glm3vecILi4EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(16) %8, float noundef 0.000000e+00)
          to label %21 unwind label %40

21:                                               ; preds = %20
  invoke void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(16) %8)
          to label %22 unwind label %40

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

23:                                               ; preds = %87, %22
  %24 = load i64, ptr %9, align 8, !tbaa !9
  %25 = call noundef i64 @_ZNKSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  %26 = icmp ult i64 %24, %25
  br i1 %26, label %44, label %27

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  br label %92

28:                                               ; preds = %15, %0
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %4, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #9
  br label %94

32:                                               ; preds = %17, %16
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %4, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #9
  br label %94

36:                                               ; preds = %19, %18
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %4, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #9
  br label %94

40:                                               ; preds = %21, %20
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %4, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  br label %94

44:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #9
  %45 = load i64, ptr %9, align 8, !tbaa !9
  %46 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %45) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %46, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %47 = invoke noundef i64 @_ZN3glm13packUnorm4x16ERKNS_3vecILi4EfLNS_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(16) %10)
          to label %48 unwind label %73

48:                                               ; preds = %44
  store i64 %47, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #9
  %49 = load i64, ptr %11, align 8, !tbaa !9
  %50 = invoke { <2 x float>, <2 x float> } @_ZN3glm15unpackUnorm4x16Em(i64 noundef %49)
          to label %51 unwind label %77

51:                                               ; preds = %48
  %52 = getelementptr inbounds %"struct.glm::vec", ptr %12, i32 0, i32 0
  %53 = getelementptr inbounds %union.anon.5, ptr %52, i32 0, i32 0
  %54 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %53, i32 0, i32 0
  %55 = extractvalue { <2 x float>, <2 x float> } %50, 0
  store <2 x float> %55, ptr %54, align 4
  %56 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %53, i32 0, i32 1
  %57 = extractvalue { <2 x float>, <2 x float> } %50, 1
  store <2 x float> %57, ptr %56, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store float 0x3EF0001000000000, ptr %14, align 4, !tbaa !13
  %58 = invoke i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %59 unwind label %81

59:                                               ; preds = %51
  %60 = getelementptr inbounds %"struct.glm::vec.13", ptr %13, i32 0, i32 0
  %61 = getelementptr inbounds %union.anon.14, ptr %60, i32 0, i32 0
  store i32 %58, ptr %61, align 1
  %62 = invoke noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %13)
          to label %63 unwind label %81

63:                                               ; preds = %59
  %64 = zext i1 %62 to i64
  %65 = select i1 %62, i32 0, i32 1
  %66 = load i32, ptr %1, align 4, !tbaa !5
  %67 = add nsw i32 %66, %65
  store i32 %67, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  %68 = load i32, ptr %1, align 4, !tbaa !5
  %69 = icmp ne i32 %68, 0
  %70 = xor i1 %69, true
  br i1 %70, label %71, label %72

71:                                               ; preds = %63
  br label %86

72:                                               ; preds = %63
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.9, i32 noundef 387, ptr noundef @__PRETTY_FUNCTION__._Z18test_packUnorm4x16v) #10
  unreachable

73:                                               ; preds = %44
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %4, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %5, align 4
  br label %91

77:                                               ; preds = %48
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %4, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %5, align 4
  br label %90

81:                                               ; preds = %59, %51
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %4, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %90

85:                                               ; No predecessors!
  br label %86

86:                                               ; preds = %85, %71
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #9
  br label %87

87:                                               ; preds = %86
  %88 = load i64, ptr %9, align 8, !tbaa !9
  %89 = add i64 %88, 1
  store i64 %89, ptr %9, align 8, !tbaa !9
  br label %23, !llvm.loop !15

90:                                               ; preds = %81, %77
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  br label %91

91:                                               ; preds = %90, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  br label %94

92:                                               ; preds = %27
  %93 = load i32, ptr %1, align 4, !tbaa !5
  call void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_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 %93

94:                                               ; preds = %91, %40, %36, %32, %28
  call void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_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 %95

95:                                               ; preds = %94
  %96 = load ptr, ptr %4, align 8
  %97 = load i32, ptr %5, align 4
  %98 = insertvalue { ptr, i32 } poison, ptr %96, 0
  %99 = insertvalue { ptr, i32 } %98, i32 %97, 1
  resume { ptr, i32 } %99
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN3glm13packUnorm4x16ERKNS_3vecILi4EfLNS_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(16)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3glm15unpackUnorm4x16Em(i64 noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #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 16, !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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<glm::vec<4, float>, std::allocator<glm::vec<4, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<glm::vec<4, float>, std::allocator<glm::vec<4, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<glm::vec<4, float>, std::allocator<glm::vec<4, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<glm::vec<4, float>, std::allocator<glm::vec<4, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.glm::vec" = type { %union.anon.5 }
%union.anon.5 = type { %struct.anon }
%struct.anon = type { float, float, float, float }
%"struct.glm::vec.13" = type { %union.anon.14 }
%union.anon.14 = type { %struct.anon.15 }
%struct.anon.15 = type { i8, i8, i8, i8 }

@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [96 x i8], align 1
@__PRETTY_FUNCTION__._Z18test_packUnorm4x16v = external hidden unnamed_addr constant [25 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress 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) #6

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z18test_packUnorm4x16v() local_unnamed_addr #8 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.0", align 8
  %2 = alloca %"struct.glm::vec", align 4
  %3 = alloca %"struct.glm::vec", align 4
  %4 = alloca %"struct.glm::vec", align 4
  %5 = alloca %"struct.glm::vec", align 4
  %6 = alloca %"struct.glm::vec", align 4
  %7 = alloca %"struct.glm::vec", align 8
  %8 = alloca %"struct.glm::vec.13", align 4
  %9 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #9
  call void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #9
  call void @_ZN3glm3vecILi4EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(16) %2, float noundef 1.000000e+00)
  invoke void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(16) %2)
          to label %10 unwind label %16

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

11:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #9
  call void @_ZN3glm3vecILi4EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(16) %4, float noundef 0x3FB99999A0000000)
  invoke void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(16) %4)
          to label %12 unwind label %20

12:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  call void @_ZN3glm3vecILi4EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(16) %5, float noundef 0.000000e+00)
  invoke void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(16) %5)
          to label %13 unwind label %22

13:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  %14 = call noundef i64 @_ZNKSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #9
  %.not = icmp eq i64 %14, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %13
  %15 = getelementptr inbounds i8, ptr %7, i64 8
  br label %24

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

16:                                               ; preds = %0
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #9
  br label %49

18:                                               ; preds = %10
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  br label %49

20:                                               ; preds = %11
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  br label %49

22:                                               ; preds = %12
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  br label %49

24:                                               ; preds = %.lr.ph, %43
  %.0816 = phi i64 [ 0, %.lr.ph ], [ %44, %43 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #9
  %25 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.0816) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(16) %25, i64 16, i1 false), !tbaa.struct !5
  %26 = invoke noundef i64 @_ZN3glm13packUnorm4x16ERKNS_3vecILi4EfLNS_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(16) %6)
          to label %27 unwind label %37

27:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #9
  %28 = invoke { <2 x float>, <2 x float> } @_ZN3glm15unpackUnorm4x16Em(i64 noundef %26)
          to label %29 unwind label %39

29:                                               ; preds = %27
  %30 = extractvalue { <2 x float>, <2 x float> } %28, 0
  store <2 x float> %30, ptr %7, align 8
  %31 = extractvalue { <2 x float>, <2 x float> } %28, 1
  store <2 x float> %31, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #9
  store float 0x3EF0001000000000, ptr %9, align 4, !tbaa !9
  %32 = invoke i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %33 unwind label %41

33:                                               ; preds = %29
  store i32 %32, ptr %8, align 4
  %34 = invoke noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %8)
          to label %35 unwind label %41

35:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  br i1 %34, label %43, label %36

36:                                               ; preds = %35
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.9, i32 noundef 387, ptr noundef nonnull @__PRETTY_FUNCTION__._Z18test_packUnorm4x16v) #10
  unreachable

37:                                               ; preds = %24
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %48

39:                                               ; preds = %27
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %47

41:                                               ; preds = %33, %29
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  br label %47

43:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #9
  %44 = add nuw i64 %.0816, 1
  %45 = call noundef i64 @_ZNKSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #9
  %46 = icmp ult i64 %44, %45
  br i1 %46, label %24, label %._crit_edge, !llvm.loop !11

47:                                               ; preds = %41, %39
  %.pn = phi { ptr, i32 } [ %42, %41 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #9
  br label %48

48:                                               ; preds = %47, %37
  %.pn.pn = phi { ptr, i32 } [ %.pn, %47 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #9
  br label %49

49:                                               ; preds = %48, %22, %20, %18, %16
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %48 ], [ %23, %22 ], [ %21, %20 ], [ %19, %18 ], [ %17, %16 ]
  call void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #9
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN3glm13packUnorm4x16ERKNS_3vecILi4EfLNS_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3glm15unpackUnorm4x16Em(i64 noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #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 = !{i64 0, i64 16, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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