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

; 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.58" = type { %"struct.std::_Vector_base.59" }
%"struct.std::_Vector_base.59" = type { %"struct.std::_Vector_base<glm::vec<1, float>, std::allocator<glm::vec<1, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<glm::vec<1, float>, std::allocator<glm::vec<1, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<glm::vec<1, float>, std::allocator<glm::vec<1, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<glm::vec<1, float>, std::allocator<glm::vec<1, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.glm::vec.63" = type { %union.anon.64 }
%union.anon.64 = type { float }
%"struct.glm::vec.65" = type { %union.anon.66 }
%union.anon.66 = type { i8 }

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z18test_packSnorm1x16v() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector.58", align 8
  %3 = alloca %"struct.glm::vec.63", align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.glm::vec.63", align 4
  %7 = alloca %"struct.glm::vec.63", align 4
  %8 = alloca %"struct.glm::vec.63", align 4
  %9 = alloca i64, align 8
  %10 = alloca %"struct.glm::vec.63", align 4
  %11 = alloca i16, align 2
  %12 = alloca %"struct.glm::vec.63", align 4
  %13 = alloca %"struct.glm::vec.65", align 1
  %14 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %2) #6
  call void @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  invoke void @_ZN3glm3vecILi1EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %3, float noundef 1.000000e+00)
          to label %15 unwind label %28

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

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

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

18:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  invoke void @_ZN3glm3vecILi1EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %7, float noundef -5.000000e-01)
          to label %19 unwind label %36

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

20:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  invoke void @_ZN3glm3vecILi1EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %8, float noundef 0xBFB99999A0000000)
          to label %21 unwind label %40

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

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

23:                                               ; preds = %65, %22
  %24 = load i64, ptr %9, align 8, !tbaa !9
  %25 = call noundef i64 @_ZNKSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %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) #6
  br label %82

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 4, ptr %3) #6
  br label %84

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 4, ptr %6) #6
  br label %84

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 4, ptr %7) #6
  br label %84

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 4, ptr %8) #6
  br label %84

44:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %45 = load i64, ptr %9, align 8, !tbaa !9
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %45) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %46, i64 4, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 2, ptr %11) #6
  %47 = getelementptr inbounds %"struct.glm::vec.63", ptr %10, i32 0, i32 0
  %48 = load float, ptr %47, align 4, !tbaa !12
  %49 = invoke noundef zeroext i16 @_ZN3glm13packSnorm1x16Ef(float noundef %48)
          to label %50 unwind label %68

50:                                               ; preds = %44
  store i16 %49, ptr %11, align 2, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %51 = load i16, ptr %11, align 2, !tbaa !13
  %52 = invoke noundef float @_ZN3glm15unpackSnorm1x16Et(i16 noundef zeroext %51)
          to label %53 unwind label %72

53:                                               ; preds = %50
  invoke void @_ZN3glm3vecILi1EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %12, float noundef %52)
          to label %54 unwind label %72

54:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store float 0x3F10002000000000, ptr %14, align 4, !tbaa !15
  %55 = invoke i8 @_ZN3glm12epsilonEqualILi1EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %56 unwind label %76

56:                                               ; preds = %54
  %57 = getelementptr inbounds %"struct.glm::vec.65", ptr %13, i32 0, i32 0
  %58 = getelementptr inbounds %union.anon.66, ptr %57, i32 0, i32 0
  store i8 %55, ptr %58, align 1
  %59 = invoke noundef zeroext i1 @_ZN3glm3allILi1ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %60 unwind label %76

60:                                               ; preds = %56
  %61 = zext i1 %59 to i64
  %62 = select i1 %59, i32 0, i32 1
  %63 = load i32, ptr %1, align 4, !tbaa !5
  %64 = add nsw i32 %63, %62
  store i32 %64, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %65

65:                                               ; preds = %60
  %66 = load i64, ptr %9, align 8, !tbaa !9
  %67 = add i64 %66, 1
  store i64 %67, ptr %9, align 8, !tbaa !9
  br label %23, !llvm.loop !17

68:                                               ; preds = %44
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %4, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %5, align 4
  br label %81

72:                                               ; preds = %53, %50
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %4, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %5, align 4
  br label %80

76:                                               ; preds = %56, %54
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %4, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  br label %80

80:                                               ; preds = %76, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %81

81:                                               ; preds = %80, %68
  call void @llvm.lifetime.end.p0(i64 2, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %84

82:                                               ; preds = %27
  %83 = load i32, ptr %1, align 4, !tbaa !5
  call void @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret i32 %83

84:                                               ; preds = %81, %40, %36, %32, %28
  call void @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  br label %85

85:                                               ; preds = %84
  %86 = load ptr, ptr %4, align 8
  %87 = load i32, ptr %5, align 4
  %88 = insertvalue { ptr, i32 } poison, ptr %86, 0
  %89 = insertvalue { ptr, i32 } %88, i32 %87, 1
  resume { ptr, i32 } %89
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZN3glm13packSnorm1x16Ef(float noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3glm15unpackSnorm1x16Et(i16 noundef zeroext) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree 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 = { 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 = { 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}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"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.58" = type { %"struct.std::_Vector_base.59" }
%"struct.std::_Vector_base.59" = type { %"struct.std::_Vector_base<glm::vec<1, float>, std::allocator<glm::vec<1, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<glm::vec<1, float>, std::allocator<glm::vec<1, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<glm::vec<1, float>, std::allocator<glm::vec<1, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<glm::vec<1, float>, std::allocator<glm::vec<1, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.glm::vec.63" = type { %union.anon.64 }
%union.anon.64 = type { float }
%"struct.glm::vec.65" = type { %union.anon.66 }
%union.anon.66 = type { i8 }

; 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 @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3glm3vecILi1EfLNS0_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(4) ptr @_ZNSt6vectorIN3glm3vecILi1EfLNS0_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 @_ZN3glm3allILi1ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i8 @_ZN3glm12epsilonEqualILi1EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

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

10:                                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @_ZN3glm3vecILi1EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %3, float noundef 0.000000e+00)
  invoke void @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %11 unwind label %17

11:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @_ZN3glm3vecILi1EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %4, float noundef -5.000000e-01)
  invoke void @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %12 unwind label %19

12:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @_ZN3glm3vecILi1EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %5, float noundef 0xBFB99999A0000000)
  invoke void @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %13 unwind label %21

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

._crit_edge:                                      ; preds = %30, %13
  %.0.lcssa = phi i32 [ 0, %13 ], [ %32, %30 ]
  call void @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #5
  ret i32 %.0.lcssa

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

17:                                               ; preds = %10
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %38

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

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

.lr.ph:                                           ; preds = %13, %30
  %.013 = phi i32 [ %32, %30 ], [ 0, %13 ]
  %.0712 = phi i64 [ %33, %30 ], [ 0, %13 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.0712) #5
  %24 = load i32, ptr %23, align 4, !tbaa !5
  store i32 %24, ptr %6, align 4, !tbaa !5
  %.cast = bitcast i32 %24 to float
  %25 = call noundef zeroext i16 @_ZN3glm13packSnorm1x16Ef(float noundef %.cast)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %26 = call noundef float @_ZN3glm15unpackSnorm1x16Et(i16 noundef zeroext %25)
  call void @_ZN3glm3vecILi1EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %7, float noundef %26)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  store float 0x3F10002000000000, ptr %9, align 4, !tbaa !8
  %27 = invoke i8 @_ZN3glm12epsilonEqualILi1EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %28 unwind label %36

28:                                               ; preds = %.lr.ph
  store i8 %27, ptr %8, align 1
  %29 = invoke noundef zeroext i1 @_ZN3glm3allILi1ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %30 unwind label %36

30:                                               ; preds = %28
  %not. = xor i1 %29, true
  %31 = zext i1 %not. to i32
  %32 = add nuw nsw i32 %.013, %31
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %33 = add nuw i64 %.0712, 1
  %34 = call noundef i64 @_ZNKSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %35 = icmp ult i64 %33, %34
  br i1 %35, label %.lr.ph, label %._crit_edge, !llvm.loop !10

36:                                               ; preds = %28, %.lr.ph
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %38

38:                                               ; preds = %36, %21, %19, %17, %15
  %.pn = phi { ptr, i32 } [ %37, %36 ], [ %22, %21 ], [ %20, %19 ], [ %18, %17 ], [ %16, %15 ]
  call void @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZN3glm13packSnorm1x16Ef(float noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3glm15unpackSnorm1x16Et(i16 noundef zeroext) local_unnamed_addr #3

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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"float", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass