; LLVM IR from xirc/cp-algorithm :: aoj/JAG/2968/main.ll (Z5solveRKSt6vectorIiSaIiEE)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::unordered_map<int, long long>, std::allocator<std::unordered_map<int, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unordered_map<int, long long>, std::allocator<std::unordered_map<int, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unordered_map<int, long long>, std::allocator<std::unordered_map<int, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unordered_map<int, long long>, std::allocator<std::unordered_map<int, long long>>>::_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::allocator.2" = type { i8 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair" = type { i32, i64 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3gcdii(i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z5solveRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24) %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca %"class.std::unordered_map", align 8
  %7 = alloca %"class.std::allocator.2", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %15 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  %21 = trunc i64 %20 to i32
  store i32 %21, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 0, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  %22 = load i32, ptr %3, align 4, !tbaa !9
  %23 = add nsw i32 %22, 1
  %24 = sext i32 %23 to i64
  call void @llvm.lifetime.start.p0(i64 56, ptr %6) #5
  call void @llvm.memset.p0.i64(ptr align 8 %6, i8 0, i64 56, i1 false)
  call void @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  call void @_ZNSaISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEC2EmRKS9_RKSA_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %24, ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %25 unwind label %31

25:                                               ; preds = %1
  call void @_ZNSt15__new_allocatorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %190, %25
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = load i32, ptr %3, align 4, !tbaa !9
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %35, label %30

30:                                               ; preds = %26
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %194

31:                                               ; preds = %1
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %8, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %9, align 4
  call void @_ZNSt15__new_allocatorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #5
  br label %196

35:                                               ; preds = %26
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %38) #5
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = icmp sgt i32 %40, 1
  br i1 %41, label %42, label %93

42:                                               ; preds = %35
  %43 = load i32, ptr %10, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %45) #5
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %49) #5
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %46, ptr noundef nonnull align 4 dereferenceable(4) %50)
          to label %52 unwind label %85

52:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %55) #5
  %57 = load i32, ptr %56, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  store i64 %58, ptr %12, align 8, !tbaa !11
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %60 unwind label %89

60:                                               ; preds = %52
  %61 = load i64, ptr %59, align 8, !tbaa !11
  %62 = load i32, ptr %10, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %64) #5
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = load i32, ptr %10, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %68) #5
  %70 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %65, ptr noundef nonnull align 4 dereferenceable(4) %69)
          to label %71 unwind label %89

71:                                               ; preds = %60
  store i64 %61, ptr %70, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %72 = load i32, ptr %10, align 4, !tbaa !9
  %73 = add nsw i32 %72, 1
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %74) #5
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %78) #5
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %75, ptr noundef nonnull align 4 dereferenceable(4) %79)
          to label %81 unwind label %85

81:                                               ; preds = %71
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %80)
          to label %83 unwind label %85

83:                                               ; preds = %81
  %84 = load i64, ptr %82, align 8, !tbaa !11
  store i64 %84, ptr %4, align 8, !tbaa !11
  br label %93

85:                                               ; preds = %81, %71, %42
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %8, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %9, align 4
  br label %193

89:                                               ; preds = %60, %52
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %8, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %193

93:                                               ; preds = %83, %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %94 = load i32, ptr %10, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %95) #5
  store ptr %96, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %97 = load ptr, ptr %13, align 8, !tbaa !5
  %98 = call ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %97) #5
  %99 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %14, i32 0, i32 0
  %100 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %99, i32 0, i32 0
  store ptr %98, ptr %100, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %101 = load ptr, ptr %13, align 8, !tbaa !5
  %102 = call ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %101) #5
  %103 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %15, i32 0, i32 0
  %104 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %103, i32 0, i32 0
  store ptr %102, ptr %104, align 8
  br label %105

105:                                              ; preds = %186, %93
  %106 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKixELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br i1 %106, label %108, label %107

107:                                              ; preds = %105
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %189

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %109 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKixELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  store ptr %109, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %110 = load ptr, ptr %16, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.std::pair", ptr %110, i32 0, i32 0
  %112 = load i32, ptr %111, align 8, !tbaa !13
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  %114 = load i32, ptr %10, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %115) #5
  %117 = load i32, ptr %116, align 4, !tbaa !9
  %118 = call noundef i32 @_Z3gcdii(i32 noundef %112, i32 noundef %117)
  store i32 %118, ptr %17, align 4, !tbaa !9
  %119 = load i32, ptr %10, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  %121 = sext i32 %120 to i64
  %122 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %121) #5
  %123 = load ptr, ptr %16, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.std::pair", ptr %123, i32 0, i32 0
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %122, ptr noundef nonnull align 4 dereferenceable(4) %124)
          to label %126 unwind label %177

126:                                              ; preds = %108
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.std::pair", ptr %127, i32 0, i32 1
  %129 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef nonnull align 8 dereferenceable(8) %128)
          to label %130 unwind label %177

130:                                              ; preds = %126
  %131 = load i64, ptr %129, align 8, !tbaa !11
  %132 = load i32, ptr %10, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  %134 = sext i32 %133 to i64
  %135 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %134) #5
  %136 = load ptr, ptr %16, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.std::pair", ptr %136, i32 0, i32 0
  %138 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %135, ptr noundef nonnull align 4 dereferenceable(4) %137)
          to label %139 unwind label %177

139:                                              ; preds = %130
  store i64 %131, ptr %138, align 8, !tbaa !11
  %140 = load i32, ptr %17, align 4, !tbaa !9
  %141 = icmp sgt i32 %140, 1
  br i1 %141, label %142, label %185

142:                                              ; preds = %139
  %143 = load i32, ptr %10, align 4, !tbaa !9
  %144 = add nsw i32 %143, 1
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %145) #5
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %146, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %148 unwind label %177

148:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %149 = load ptr, ptr %16, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.std::pair", ptr %149, i32 0, i32 1
  %151 = load i64, ptr %150, align 8, !tbaa !15
  %152 = load ptr, ptr %2, align 8, !tbaa !5
  %153 = load i32, ptr %10, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %152, i64 noundef %154) #5
  %156 = load i32, ptr %155, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = add nsw i64 %151, %157
  store i64 %158, ptr %18, align 8, !tbaa !11
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %147, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %160 unwind label %181

160:                                              ; preds = %148
  %161 = load i64, ptr %159, align 8, !tbaa !11
  %162 = load i32, ptr %10, align 4, !tbaa !9
  %163 = add nsw i32 %162, 1
  %164 = sext i32 %163 to i64
  %165 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %164) #5
  %166 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %165, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %167 unwind label %181

167:                                              ; preds = %160
  store i64 %161, ptr %166, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %168 = load i32, ptr %10, align 4, !tbaa !9
  %169 = add nsw i32 %168, 1
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %170) #5
  %172 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %171, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %173 unwind label %177

173:                                              ; preds = %167
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %172)
          to label %175 unwind label %177

175:                                              ; preds = %173
  %176 = load i64, ptr %174, align 8, !tbaa !11
  store i64 %176, ptr %4, align 8, !tbaa !11
  br label %185

177:                                              ; preds = %173, %167, %142, %130, %126, %108
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %8, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %9, align 4
  br label %188

181:                                              ; preds = %160, %148
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %8, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %188

185:                                              ; preds = %175, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %186

186:                                              ; preds = %185
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKixELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br label %105

188:                                              ; preds = %181, %177
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %193

189:                                              ; preds = %107
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %10, align 4, !tbaa !9
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %10, align 4, !tbaa !9
  br label %26, !llvm.loop !16

193:                                              ; preds = %188, %89, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %196

194:                                              ; preds = %30
  %195 = load i64, ptr %4, align 8, !tbaa !11
  store i32 1, ptr %11, align 4
  call void @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret i64 %195

196:                                              ; preds = %193, %31
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %197

197:                                              ; preds = %196
  %198 = load ptr, ptr %8, align 8
  %199 = load i32, ptr %9, align 4
  %200 = insertvalue { ptr, i32 } poison, ptr %198, 0
  %201 = insertvalue { ptr, i32 } %200, i32 %199, 1
  resume { ptr, i32 } %201
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSSt4pairIKixE", !10, i64 0, !12, i64 8}
!15 = !{!14, !12, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::unordered_map<int, long long>, std::allocator<std::unordered_map<int, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unordered_map<int, long long>, std::allocator<std::unordered_map<int, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unordered_map<int, long long>, std::allocator<std::unordered_map<int, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unordered_map<int, long long>, std::allocator<std::unordered_map<int, long long>>>::_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::allocator.2" = type { i8 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3gcdii(i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z5solveRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24) %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector.0", align 8
  %4 = alloca %"class.std::unordered_map", align 8
  %5 = alloca %"class.std::allocator.2", align 1
  %6 = alloca i64, align 8
  %7 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %8 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  store i64 0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  %12 = shl i64 %11, 32
  %sext = add i64 %12, 4294967296
  %13 = ashr exact i64 %sext, 32
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %4) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %4, i8 0, i64 56, i1 false)
  call void @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEC2EmRKS9_RKSA_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %13, ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %14 unwind label %18

14:                                               ; preds = %1
  %15 = trunc i64 %11 to i32
  call void @_ZNSt15__new_allocatorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #5
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph45.preheader, label %._crit_edge46

.lr.ph45.preheader:                               ; preds = %14
  %wide.trip.count = and i64 %11, 2147483647
  br label %.lr.ph45

._crit_edge46.loopexit:                           ; preds = %._crit_edge
  %.pre = load i64, ptr %2, align 8, !tbaa !5
  br label %._crit_edge46

._crit_edge46:                                    ; preds = %._crit_edge46.loopexit, %14
  %17 = phi i64 [ %.pre, %._crit_edge46.loopexit ], [ 0, %14 ]
  call void @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  ret i64 %17

18:                                               ; preds = %1
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #5
  br label %98

.lr.ph45:                                         ; preds = %.lr.ph45.preheader, %._crit_edge
  %indvars.iv = phi i64 [ 0, %.lr.ph45.preheader ], [ %53, %._crit_edge ]
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #5
  %21 = load i32, ptr %20, align 4, !tbaa !9
  %22 = icmp sgt i32 %21, 1
  br i1 %22, label %23, label %48

23:                                               ; preds = %.lr.ph45
  %24 = add nuw nsw i64 %indvars.iv, 1
  %25 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %24) #5
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #5
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %28 unwind label %44

28:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #5
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  store i64 %31, ptr %6, align 8, !tbaa !5
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %33 = load i64, ptr %32, align 8, !tbaa !5
  %34 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %24) #5
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #5
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %34, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %37 unwind label %46

37:                                               ; preds = %28
  store i64 %33, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %38 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %24) #5
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #5
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %38, ptr noundef nonnull align 4 dereferenceable(4) %39)
          to label %41 unwind label %44

41:                                               ; preds = %37
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %40)
  %43 = load i64, ptr %42, align 8, !tbaa !5
  store i64 %43, ptr %2, align 8, !tbaa !5
  br label %48

44:                                               ; preds = %37, %23
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %97

46:                                               ; preds = %28
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %97

48:                                               ; preds = %41, %.lr.ph45
  %49 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %50 = call ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %49) #5
  store ptr %50, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %51 = call ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %49) #5
  store ptr %51, ptr %8, align 8
  %52 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKixELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %53 = add nuw nsw i64 %indvars.iv, 1
  br i1 %52, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %93, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  %exitcond.not = icmp eq i64 %53, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge46.loopexit, label %.lr.ph45, !llvm.loop !11

.lr.ph:                                           ; preds = %48, %93
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKixELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  %55 = load i32, ptr %54, align 8, !tbaa !13
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #5
  %57 = load i32, ptr %56, align 4, !tbaa !9
  %58 = call noundef i32 @_Z3gcdii(i32 noundef %55, i32 noundef %57)
  store i32 %58, ptr %9, align 4, !tbaa !9
  %59 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %53) #5
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %59, ptr noundef nonnull align 4 dereferenceable(4) %54)
          to label %61 unwind label %89

61:                                               ; preds = %.lr.ph
  %62 = getelementptr inbounds i8, ptr %54, i64 8
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull align 8 dereferenceable(8) %62)
  %64 = load i64, ptr %63, align 8, !tbaa !5
  %65 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %53) #5
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %65, ptr noundef nonnull align 4 dereferenceable(4) %54)
          to label %67 unwind label %89

67:                                               ; preds = %61
  store i64 %64, ptr %66, align 8, !tbaa !5
  %68 = load i32, ptr %9, align 4, !tbaa !9
  %69 = icmp sgt i32 %68, 1
  br i1 %69, label %70, label %93

70:                                               ; preds = %67
  %71 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %53) #5
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %71, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %73 unwind label %89

73:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %74 = load i64, ptr %62, align 8, !tbaa !15
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #5
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = add nsw i64 %74, %77
  store i64 %78, ptr %10, align 8, !tbaa !5
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %80 = load i64, ptr %79, align 8, !tbaa !5
  %81 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %53) #5
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %81, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %83 unwind label %91

83:                                               ; preds = %73
  store i64 %80, ptr %82, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %84 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %53) #5
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %84, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %86 unwind label %89

86:                                               ; preds = %83
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %85)
  %88 = load i64, ptr %87, align 8, !tbaa !5
  store i64 %88, ptr %2, align 8, !tbaa !5
  br label %93

89:                                               ; preds = %83, %70, %61, %.lr.ph
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %96

91:                                               ; preds = %73
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  br label %96

93:                                               ; preds = %86, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKixELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %95 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKixELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br i1 %95, label %.lr.ph, label %._crit_edge

96:                                               ; preds = %91, %89
  %.pn = phi { ptr, i32 } [ %90, %89 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %97

97:                                               ; preds = %96, %46, %44
  %.pn.pn = phi { ptr, i32 } [ %.pn, %96 ], [ %45, %44 ], [ %47, %46 ]
  call void @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br label %98

98:                                               ; preds = %97, %18
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %97 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn.pn.pn
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(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 nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

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

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

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

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

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

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

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

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


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