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

; 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 @_Z17test_packSnorm1x8v() #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 i64, align 8
  %9 = alloca %"struct.glm::vec.63", align 4
  %10 = alloca i8, align 1
  %11 = alloca %"struct.glm::vec.63", align 4
  %12 = alloca %"struct.glm::vec.65", align 1
  %13 = 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 %14 unwind label %25

14:                                               ; 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 %15 unwind label %25

15:                                               ; preds = %14
  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 0xBFE6666660000000)
          to label %16 unwind label %29

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

17:                                               ; preds = %16
  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 -1.000000e+00)
          to label %18 unwind label %33

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

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

20:                                               ; preds = %58, %19
  %21 = load i64, ptr %8, align 8, !tbaa !9
  %22 = call noundef i64 @_ZNKSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %23 = icmp ult i64 %21, %22
  br i1 %23, label %37, label %24

24:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %75

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

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

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

37:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %38 = load i64, ptr %8, align 8, !tbaa !9
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %38) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 %39, i64 4, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  %40 = getelementptr inbounds %"struct.glm::vec.63", ptr %9, i32 0, i32 0
  %41 = load float, ptr %40, align 4, !tbaa !12
  %42 = invoke noundef zeroext i8 @_ZN3glm12packSnorm1x8Ef(float noundef %41)
          to label %43 unwind label %61

43:                                               ; preds = %37
  store i8 %42, ptr %10, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %44 = load i8, ptr %10, align 1, !tbaa !12
  %45 = invoke noundef float @_ZN3glm14unpackSnorm1x8Eh(i8 noundef zeroext %44)
          to label %46 unwind label %65

46:                                               ; preds = %43
  invoke void @_ZN3glm3vecILi1EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %11, float noundef %45)
          to label %47 unwind label %65

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store float 0x3F80204080000000, ptr %13, align 4, !tbaa !13
  %48 = invoke i8 @_ZN3glm12epsilonEqualILi1EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %49 unwind label %69

49:                                               ; preds = %47
  %50 = getelementptr inbounds %"struct.glm::vec.65", ptr %12, i32 0, i32 0
  %51 = getelementptr inbounds %union.anon.66, ptr %50, i32 0, i32 0
  store i8 %48, ptr %51, align 1
  %52 = invoke noundef zeroext i1 @_ZN3glm3allILi1ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %53 unwind label %69

53:                                               ; preds = %49
  %54 = zext i1 %52 to i64
  %55 = select i1 %52, i32 0, i32 1
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = add nsw i32 %56, %55
  store i32 %57, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %58

58:                                               ; preds = %53
  %59 = load i64, ptr %8, align 8, !tbaa !9
  %60 = add i64 %59, 1
  store i64 %60, ptr %8, align 8, !tbaa !9
  br label %20, !llvm.loop !15

61:                                               ; preds = %37
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %4, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %5, align 4
  br label %74

65:                                               ; preds = %46, %43
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %4, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %5, align 4
  br label %73

69:                                               ; preds = %49, %47
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %4, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %73

73:                                               ; preds = %69, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %74

74:                                               ; preds = %73, %61
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %77

75:                                               ; preds = %24
  %76 = 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 %76

77:                                               ; preds = %74, %33, %29, %25
  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 %78

78:                                               ; preds = %77
  %79 = load ptr, ptr %4, align 8
  %80 = load i32, ptr %5, align 4
  %81 = insertvalue { ptr, i32 } poison, ptr %79, 0
  %82 = insertvalue { ptr, i32 } %81, i32 %80, 1
  resume { ptr, i32 } %82
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3glm14unpackSnorm1x8Eh(i8 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 = !{!"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.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 @_Z17test_packSnorm1x8v() 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.65", align 1
  %8 = 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 %9 unwind label %13

9:                                                ; 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 0xBFE6666660000000)
  invoke void @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %10 unwind label %15

10:                                               ; preds = %9
  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 -1.000000e+00)
  invoke void @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %11 unwind label %17

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

._crit_edge:                                      ; preds = %26, %11
  %.0.lcssa = phi i32 [ 0, %11 ], [ %28, %26 ]
  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

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

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

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

.lr.ph:                                           ; preds = %11, %26
  %.013 = phi i32 [ %28, %26 ], [ 0, %11 ]
  %.0712 = phi i64 [ %29, %26 ], [ 0, %11 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN3glm3vecILi1EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.0712) #5
  %20 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %20, ptr %5, align 4, !tbaa !5
  %.cast = bitcast i32 %20 to float
  %21 = call noundef zeroext i8 @_ZN3glm12packSnorm1x8Ef(float noundef %.cast)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %22 = call noundef float @_ZN3glm14unpackSnorm1x8Eh(i8 noundef zeroext %21)
  call void @_ZN3glm3vecILi1EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %6, float noundef %22)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store float 0x3F80204080000000, ptr %8, align 4, !tbaa !8
  %23 = invoke i8 @_ZN3glm12epsilonEqualILi1EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %24 unwind label %32

24:                                               ; preds = %.lr.ph
  store i8 %23, ptr %7, align 1
  %25 = invoke noundef zeroext i1 @_ZN3glm3allILi1ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %26 unwind label %32

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

32:                                               ; preds = %24, %.lr.ph
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %34

34:                                               ; preds = %32, %17, %15, %13
  %.pn = phi { ptr, i32 } [ %33, %32 ], [ %18, %17 ], [ %16, %15 ], [ %14, %13 ]
  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 i8 @_ZN3glm12packSnorm1x8Ef(float noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3glm14unpackSnorm1x8Eh(i8 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