; LLVM IR from jpvt/Computer_Graphics :: Assignment #3/third_party/glm/test/core/core_func_packing.ll (Z17test_packSnorm4x8v)

; 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.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = 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.4" = type { %union.anon.5, %union.anon.6, %union.anon.7, %union.anon.8 }
%union.anon.5 = type { float }
%union.anon.6 = type { float }
%union.anon.7 = type { float }
%union.anon.8 = type { float }
%"struct.glm::vec.19" = type { %union.anon.20, %union.anon.21, %union.anon.22, %union.anon.23 }
%union.anon.20 = type { i8 }
%union.anon.21 = type { i8 }
%union.anon.22 = type { i8 }
%union.anon.23 = type { i8 }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [118 x i8], align 1
@__PRETTY_FUNCTION__._Z17test_packSnorm4x8v = external hidden unnamed_addr constant [24 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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 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) #4 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)) #6

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z17test_packSnorm4x8v() #8 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector.14", align 8
  %3 = alloca %"struct.glm::vec.4", align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.glm::vec.4", align 4
  %7 = alloca i64, align 8
  %8 = alloca %"struct.glm::vec.4", align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.glm::vec.4", align 4
  %11 = alloca %"struct.glm::vec.19", 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 @_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_9qualifierE0EEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %3, float noundef 1.000000e+00, float noundef 0.000000e+00, float noundef -5.000000e-01, float noundef -1.000000e+00)
          to label %13 unwind label %22

13:                                               ; 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 %14 unwind label %22

14:                                               ; preds = %13
  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_9qualifierE0EEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %6, float noundef 0xBFE6666660000000, float noundef 0xBFB99999A0000000, float noundef 0x3FB99999A0000000, float noundef 0x3FE6666660000000)
          to label %15 unwind label %26

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

16:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 16, 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 = %69, %16
  %18 = load i64, ptr %7, align 8, !tbaa !9
  %19 = call noundef i64 @_ZNKSt6vectorIN3glm3vecILi4EfLNS0_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 %74

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 16, ptr %3) #9
  br label %76

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 16, ptr %6) #9
  br label %76

30:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #9
  %31 = load i64, ptr %7, align 8, !tbaa !9
  %32 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN3glm3vecILi4EfLNS0_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 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %33 = invoke noundef i32 @_ZN3glm12packSnorm4x8ERKNS_3vecILi4EfLNS_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(16) %8)
          to label %34 unwind label %55

34:                                               ; preds = %30
  store i32 %33, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #9
  %35 = load i32, ptr %9, align 4, !tbaa !5
  %36 = invoke { <2 x float>, <2 x float> } @_ZN3glm14unpackSnorm4x8Ej(i32 noundef %35)
          to label %37 unwind label %59

37:                                               ; preds = %34
  %38 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %10, i32 0, i32 0
  %39 = extractvalue { <2 x float>, <2 x float> } %36, 0
  store <2 x float> %39, ptr %38, align 4
  %40 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %10, i32 0, i32 1
  %41 = extractvalue { <2 x float>, <2 x float> } %36, 1
  store <2 x float> %41, ptr %40, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store float 0x3F80204080000000, ptr %12, align 4, !tbaa !13
  %42 = invoke i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %43 unwind label %63

43:                                               ; preds = %37
  store i32 %42, ptr %11, align 1
  %44 = invoke noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %11)
          to label %45 unwind label %63

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

53:                                               ; preds = %45
  br label %68

54:                                               ; preds = %45
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 89, ptr noundef @__PRETTY_FUNCTION__._Z17test_packSnorm4x8v) #10
  unreachable

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

59:                                               ; preds = %34
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %4, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %5, align 4
  br label %72

63:                                               ; preds = %43, %37
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %4, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %72

67:                                               ; No predecessors!
  br label %68

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

69:                                               ; preds = %68
  %70 = load i64, ptr %7, align 8, !tbaa !9
  %71 = add i64 %70, 1
  store i64 %71, ptr %7, align 8, !tbaa !9
  br label %17, !llvm.loop !15

72:                                               ; preds = %63, %59
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #9
  br label %73

73:                                               ; preds = %72, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %76

74:                                               ; preds = %21
  %75 = 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 %75

76:                                               ; preds = %73, %26, %22
  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 %77

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3glm14unpackSnorm4x8Ej(i32 noundef) #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 = { 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 = { 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 = { 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"="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, i64 8, i64 4, !12, i64 12, 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.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = 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.4" = type { %union.anon.5, %union.anon.6, %union.anon.7, %union.anon.8 }
%union.anon.5 = type { float }
%union.anon.6 = type { float }
%union.anon.7 = type { float }
%union.anon.8 = type { float }
%"struct.glm::vec.19" = type { %union.anon.20, %union.anon.21, %union.anon.22, %union.anon.23 }
%union.anon.20 = type { i8 }
%union.anon.21 = type { i8 }
%union.anon.22 = type { i8 }
%union.anon.23 = type { i8 }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [118 x i8], align 1
@__PRETTY_FUNCTION__._Z17test_packSnorm4x8v = external hidden unnamed_addr constant [24 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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 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 #5 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 #4 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 #4 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 #6

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z17test_packSnorm4x8v() local_unnamed_addr #8 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.14", align 8
  %2 = alloca %"struct.glm::vec.4", align 4
  %3 = alloca %"struct.glm::vec.4", align 4
  %4 = alloca %"struct.glm::vec.4", align 4
  %5 = alloca %"struct.glm::vec.4", align 8
  %6 = alloca %"struct.glm::vec.19", align 4
  %7 = 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_9qualifierE0EEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %2, float noundef 1.000000e+00, float noundef 0.000000e+00, float noundef -5.000000e-01, 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 %8 unwind label %12

8:                                                ; 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_9qualifierE0EEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %3, float noundef 0xBFE6666660000000, float noundef 0xBFB99999A0000000, float noundef 0x3FB99999A0000000, float noundef 0x3FE6666660000000)
  invoke void @_ZNSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(16) %3)
          to label %9 unwind label %14

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

.lr.ph:                                           ; preds = %9
  %11 = getelementptr inbounds i8, ptr %5, i64 8
  br label %16

._crit_edge:                                      ; preds = %35, %9
  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

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

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

16:                                               ; preds = %.lr.ph, %35
  %.0816 = phi i64 [ 0, %.lr.ph ], [ %36, %35 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #9
  %17 = 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) %4, ptr noundef nonnull align 4 dereferenceable(16) %17, i64 16, i1 false), !tbaa.struct !5
  %18 = invoke noundef i32 @_ZN3glm12packSnorm4x8ERKNS_3vecILi4EfLNS_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(16) %4)
          to label %19 unwind label %29

19:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  %20 = invoke { <2 x float>, <2 x float> } @_ZN3glm14unpackSnorm4x8Ej(i32 noundef %18)
          to label %21 unwind label %31

21:                                               ; preds = %19
  %22 = extractvalue { <2 x float>, <2 x float> } %20, 0
  store <2 x float> %22, ptr %5, align 8
  %23 = extractvalue { <2 x float>, <2 x float> } %20, 1
  store <2 x float> %23, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  store float 0x3F80204080000000, ptr %7, align 4, !tbaa !9
  %24 = invoke i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %25 unwind label %33

25:                                               ; preds = %21
  store i32 %24, ptr %6, align 4
  %26 = invoke noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %6)
          to label %27 unwind label %33

27:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  br i1 %26, label %35, label %28

28:                                               ; preds = %27
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 89, ptr noundef nonnull @__PRETTY_FUNCTION__._Z17test_packSnorm4x8v) #10
  unreachable

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

31:                                               ; preds = %19
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %39

33:                                               ; preds = %25, %21
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  br label %39

35:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  %36 = add nuw i64 %.0816, 1
  %37 = call noundef i64 @_ZNKSt6vectorIN3glm3vecILi4EfLNS0_9qualifierE0EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #9
  %38 = icmp ult i64 %36, %37
  br i1 %38, label %16, label %._crit_edge, !llvm.loop !11

39:                                               ; preds = %33, %31
  %.pn = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  br label %40

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

41:                                               ; preds = %40, %14, %12
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %40 ], [ %15, %14 ], [ %13, %12 ]
  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 i32 @_ZN3glm12packSnorm4x8ERKNS_3vecILi4EfLNS_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3glm14unpackSnorm4x8Ej(i32 noundef) local_unnamed_addr #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { 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 = { 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 = { 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"="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 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6, i64 12, i64 4, !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