; LLVM IR from hbatagelo/abcg :: abcg/external/glslang/SPIRV/SPVRemapper.ll (ZN3spv10spirvbin_t5stripEv)

; 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.__gnu_cxx::__normal_iterator.176" = type { ptr }
%"class.spv::spirvbin_t" = type <{ ptr, %"class.std::vector", %"class.std::vector.2", %"class.std::unordered_map", %"class.std::vector.12", %"class.std::unordered_map.17", %"class.std::unordered_map.37", %"class.std::set", %"class.std::unordered_map.37", %"class.std::unordered_map.54", %"class.std::vector", i32, i32, %"class.std::vector.68", i32, i32, i8, [7 x i8] }>
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map.17" = type { %"class.std::_Hashtable.18" }
%"class.std::_Hashtable.18" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::unordered_map.37" = type { %"class.std::_Hashtable.38" }
%"class.std::_Hashtable.38" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.54" = type { %"class.std::_Hashtable.55" }
%"class.std::_Hashtable.55" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.68" = type { %"struct.std::_Vector_base.69" }
%"struct.std::_Vector_base.69" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

; 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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3spv10spirvbin_t5stripEv(ptr noundef nonnull align 8 dereferenceable(473) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.176", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.176", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.176", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.176", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.176", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  %11 = getelementptr inbounds %"class.spv::spirvbin_t", ptr %10, i32 0, i32 13
  %12 = call noundef zeroext i1 @_ZNKSt6vectorISt4pairIjjESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  br i1 %12, label %13, label %14

13:                                               ; preds = %1
  br label %90

14:                                               ; preds = %1
  %15 = getelementptr inbounds %"class.spv::spirvbin_t", ptr %10, i32 0, i32 13
  %16 = call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %17 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.176", ptr %3, i32 0, i32 0
  store ptr %16, ptr %17, align 8
  %18 = getelementptr inbounds %"class.spv::spirvbin_t", ptr %10, i32 0, i32 13
  %19 = call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  %20 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.176", ptr %4, i32 0, i32 0
  store ptr %19, ptr %20, align 8
  %21 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.176", ptr %3, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8
  %23 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.176", ptr %4, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %22, ptr %24)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %25 = getelementptr inbounds %"class.spv::spirvbin_t", ptr %10, i32 0, i32 13
  %26 = call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  %27 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.176", ptr %5, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %82, %14
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = getelementptr inbounds %"class.spv::spirvbin_t", ptr %10, i32 0, i32 1
  %31 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  %32 = trunc i64 %31 to i32
  %33 = icmp ult i32 %29, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %85

35:                                               ; preds = %28
  br label %36

36:                                               ; preds = %49, %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %37 = getelementptr inbounds %"class.spv::spirvbin_t", ptr %10, i32 0, i32 13
  %38 = call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #5
  %39 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.176", ptr %8, i32 0, i32 0
  store ptr %38, ptr %39, align 8
  %40 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIjjESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br i1 %40, label %41, label %47

41:                                               ; preds = %36
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %44 = getelementptr inbounds %"struct.std::pair", ptr %43, i32 0, i32 1
  %45 = load i32, ptr %44, align 4, !tbaa !11
  %46 = icmp uge i32 %42, %45
  br label %47

47:                                               ; preds = %41, %36
  %48 = phi i1 [ false, %36 ], [ %46, %41 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br i1 %48, label %49, label %51

49:                                               ; preds = %47
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br label %36, !llvm.loop !13

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %52 = getelementptr inbounds %"class.spv::spirvbin_t", ptr %10, i32 0, i32 13
  %53 = call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %52) #5
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.176", ptr %9, i32 0, i32 0
  store ptr %53, ptr %54, align 8
  %55 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPSt4pairIjjESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %55, label %68, label %56

56:                                               ; preds = %51
  %57 = load i32, ptr %7, align 4, !tbaa !9
  %58 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %59 = getelementptr inbounds %"struct.std::pair", ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 4, !tbaa !15
  %61 = icmp ult i32 %57, %60
  br i1 %61, label %68, label %62

62:                                               ; preds = %56
  %63 = load i32, ptr %7, align 4, !tbaa !9
  %64 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %65 = getelementptr inbounds %"struct.std::pair", ptr %64, i32 0, i32 1
  %66 = load i32, ptr %65, align 4, !tbaa !11
  %67 = icmp uge i32 %63, %66
  br label %68

68:                                               ; preds = %62, %56, %51
  %69 = phi i1 [ true, %56 ], [ true, %51 ], [ %67, %62 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br i1 %69, label %70, label %81

70:                                               ; preds = %68
  %71 = getelementptr inbounds %"class.spv::spirvbin_t", ptr %10, i32 0, i32 1
  %72 = load i32, ptr %7, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %73) #5
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = getelementptr inbounds %"class.spv::spirvbin_t", ptr %10, i32 0, i32 1
  %77 = load i32, ptr %6, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %6, align 4, !tbaa !9
  %79 = sext i32 %77 to i64
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %79) #5
  store i32 %75, ptr %80, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %70, %68
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %7, align 4, !tbaa !9
  %84 = add i32 %83, 1
  store i32 %84, ptr %7, align 4, !tbaa !9
  br label %28, !llvm.loop !16

85:                                               ; preds = %34
  %86 = getelementptr inbounds %"class.spv::spirvbin_t", ptr %10, i32 0, i32 1
  %87 = load i32, ptr %6, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  call void @_ZNSt6vectorIjSaIjEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %86, i64 noundef %88)
  %89 = getelementptr inbounds %"class.spv::spirvbin_t", ptr %10, i32 0, i32 13
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %89) #5
  call void @_ZN3spv10spirvbin_t14buildLocalMapsEv(ptr noundef nonnull align 8 dereferenceable(473) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %90

90:                                               ; preds = %85, %13
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3spv10spirvbin_t14buildLocalMapsEv(ptr noundef nonnull align 8 dereferenceable(473)) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIjjESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxeqIPSt4pairIjjESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"_ZTSSt4pairIjjE", !10, i64 0, !10, i64 4}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!12, !10, i64 0}
!16 = distinct !{!16, !14}


; 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.__gnu_cxx::__normal_iterator.176" = type { ptr }

; 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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3spv10spirvbin_t5stripEv(ptr noundef nonnull align 8 dereferenceable(473) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator.176", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.176", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.176", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 440
  %6 = tail call noundef zeroext i1 @_ZNKSt6vectorISt4pairIjjESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br i1 %6, label %47, label %7

7:                                                ; preds = %1
  %8 = tail call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %9 = tail call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  tail call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %8, ptr %9)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %10 = tail call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  store ptr %10, ptr %2, align 8
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = tail call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %13 = and i64 %12, 4294967295
  %.not19 = icmp eq i64 %13, 0
  br i1 %.not19, label %._crit_edge, label %.preheader

.preheader:                                       ; preds = %7, %43
  %indvars.iv = phi i64 [ %indvars.iv.next, %43 ], [ 0, %7 ]
  %.01113 = phi i32 [ %.1, %43 ], [ 0, %7 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %14 = call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  store ptr %14, ptr %3, align 8
  %15 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIjjESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %15, label %.lr.ph, label %.critedge

._crit_edge.loopexit:                             ; preds = %43
  %16 = sext i32 %.1 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %7
  %.011.lcssa = phi i64 [ 0, %7 ], [ %16, %._crit_edge.loopexit ]
  call void @_ZNSt6vectorIjSaIjEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %.011.lcssa)
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @_ZN3spv10spirvbin_t14buildLocalMapsEv(ptr noundef nonnull align 8 dereferenceable(473) %0)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  br label %47

.lr.ph:                                           ; preds = %.preheader, %21
  %17 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %18 = getelementptr inbounds i8, ptr %17, i64 4
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = zext i32 %19 to i64
  %.not = icmp ult i64 %indvars.iv, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br i1 %.not, label %.loopexit, label %21

21:                                               ; preds = %.lr.ph
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %23 = call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  store ptr %23, ptr %3, align 8
  %24 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIjjESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %24, label %.lr.ph, label %.critedge, !llvm.loop !10

.critedge:                                        ; preds = %21, %.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %.critedge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %25 = call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  store ptr %25, ptr %4, align 8
  %26 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPSt4pairIjjESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br i1 %26, label %.critedge2, label %27

27:                                               ; preds = %.loopexit
  %28 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %29 = load i32, ptr %28, align 4, !tbaa !12
  %30 = zext i32 %29 to i64
  %31 = icmp ult i64 %indvars.iv, %30
  br i1 %31, label %.critedge2, label %32

32:                                               ; preds = %27
  %33 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %34 = getelementptr inbounds i8, ptr %33, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = zext i32 %35 to i64
  %.not12 = icmp ult i64 %indvars.iv, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br i1 %.not12, label %43, label %37

.critedge2:                                       ; preds = %.loopexit, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %37

37:                                               ; preds = %.critedge2, %32
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv) #5
  %39 = load i32, ptr %38, align 4, !tbaa !13
  %40 = add nsw i32 %.01113, 1
  %41 = sext i32 %.01113 to i64
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %41) #5
  store i32 %39, ptr %42, align 4, !tbaa !13
  br label %43

43:                                               ; preds = %32, %37
  %.1 = phi i32 [ %40, %37 ], [ %.01113, %32 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %44 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %45 = and i64 %44, 4294967295
  %46 = icmp ult i64 %indvars.iv.next, %45
  br i1 %46, label %.preheader, label %._crit_edge.loopexit, !llvm.loop !14

47:                                               ; preds = %1, %._crit_edge
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3spv10spirvbin_t14buildLocalMapsEv(ptr noundef nonnull align 8 dereferenceable(473)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIjjESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxeqIPSt4pairIjjESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass