; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/SHORT/COOK70/Problem E/brute.ll (Z4calciSt6vectorISt4pairIiiESaIS1_EE)

; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, std::vector<std::pair<int, int>>>, std::pair<const std::pair<int, std::vector<std::pair<int, int>>>, int>, std::_Select1st<std::pair<const std::pair<int, std::vector<std::pair<int, int>>>, int>>, std::less<std::pair<int, std::vector<std::pair<int, int>>>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, std::vector<std::pair<int, int>>>, std::pair<const std::pair<int, std::vector<std::pair<int, int>>>, int>, std::_Select1st<std::pair<const std::pair<int, std::vector<std::pair<int, int>>>, int>>, std::less<std::pair<int, std::vector<std::pair<int, 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 }
%"struct.std::pair.8" = type { i32, %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@g = external dso_local global [14 x [10 x i32]], align 16
@h = external dso_local global [14 x i32], align 16
@f = external dso_local global %"class.std::map", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z4calciSt6vectorISt4pairIiiESaIS1_EE(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair.8", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair.8", align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.std::pair.8", align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::vector.3", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::vector.3", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"struct.std::pair", align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %"class.std::vector.3", align 8
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %33, label %62

33:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %56, %33
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %37 = trunc i64 %36 to i32
  %38 = icmp slt i32 %35, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %34
  store i32 2, ptr %7, align 4
  br label %59

40:                                               ; preds = %34
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %42) #4
  %44 = getelementptr inbounds %"struct.std::pair", ptr %43, i32 0, i32 0
  %45 = load i32, ptr %44, align 4, !tbaa !11
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %55

47:                                               ; preds = %40
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %49) #4
  %51 = getelementptr inbounds %"struct.std::pair", ptr %50, i32 0, i32 1
  %52 = load i32, ptr %51, align 4, !tbaa !13
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %47
  store i32 -100000000, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %59

55:                                               ; preds = %47, %40
  br label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %6, align 4, !tbaa !5
  br label %34, !llvm.loop !14

59:                                               ; preds = %54, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %60 = load i32, ptr %7, align 4
  switch i32 %60, label %261 [
    i32 2, label %61
    i32 1, label %254
  ]

61:                                               ; preds = %59
  store i32 0, ptr %3, align 4
  br label %254

62:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #4
  call void @_ZSt9make_pairIRiRSt6vectorISt4pairIiiESaIS3_EEES2_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind writable sret(%"struct.std::pair.8") align 8 %8, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %63 = invoke noundef i64 @_ZNKSt3mapISt4pairIiSt6vectorIS0_IiiESaIS2_EEEiSt4lessIS5_ESaIS0_IKS5_iEEE5countERS8_(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %64 unwind label %70

64:                                               ; preds = %62
  %65 = icmp ne i64 %63, 0
  call void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  br i1 %65, label %66, label %78

66:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #4
  call void @_ZSt9make_pairIRiRSt6vectorISt4pairIiiESaIS3_EEES2_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind writable sret(%"struct.std::pair.8") align 8 %11, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %67 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiSt6vectorIS0_IiiESaIS2_EEEiSt4lessIS5_ESaIS0_IKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %68 unwind label %74

68:                                               ; preds = %66
  %69 = load i32, ptr %67, align 4, !tbaa !5
  store i32 %69, ptr %3, align 4
  call void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  br label %254

70:                                               ; preds = %62
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %9, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %10, align 4
  call void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  br label %256

74:                                               ; preds = %66
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %9, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %10, align 4
  call void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  br label %256

78:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #4
  call void @_ZSt9make_pairIRiRSt6vectorISt4pairIiiESaIS3_EEES2_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind writable sret(%"struct.std::pair.8") align 8 %13, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %79 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiSt6vectorIS0_IiiESaIS2_EEEiSt4lessIS5_ESaIS0_IKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %80 unwind label %90

80:                                               ; preds = %78
  call void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  store ptr %79, ptr %12, align 8, !tbaa !9
  %81 = load ptr, ptr %12, align 8, !tbaa !9
  store i32 -100000000, ptr %81, align 4, !tbaa !5
  %82 = load i32, ptr %4, align 4, !tbaa !5
  %83 = icmp sge i32 %82, 10
  br i1 %83, label %84, label %98

84:                                               ; preds = %80
  %85 = load ptr, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %86 = invoke noundef i32 @_Z4calciSt6vectorISt4pairIiiESaIS1_EE(i32 noundef 10, ptr noundef %15)
          to label %87 unwind label %94

87:                                               ; preds = %84
  store i32 %86, ptr %14, align 4, !tbaa !5
  %88 = invoke noundef i32 @_Z6chkmaxIiEiRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %85, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %89 unwind label %94

89:                                               ; preds = %87
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %98

90:                                               ; preds = %78
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %9, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %10, align 4
  call void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  br label %253

94:                                               ; preds = %87, %84
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %9, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %10, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %253

98:                                               ; preds = %89, %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %246, %98
  %100 = load i32, ptr %16, align 4, !tbaa !5
  %101 = icmp slt i32 %100, 10
  br i1 %101, label %103, label %102

102:                                              ; preds = %99
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %250

103:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %215, %103
  %105 = load i32, ptr %19, align 4, !tbaa !5
  %106 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %107 = trunc i64 %106 to i32
  %108 = icmp slt i32 %105, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %104
  store i32 8, ptr %7, align 4
  br label %218

110:                                              ; preds = %104
  %111 = load i32, ptr %18, align 4, !tbaa !5
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %214, label %113

113:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %114 = load i32, ptr %19, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %115) #4
  %117 = getelementptr inbounds %"struct.std::pair", ptr %116, i32 0, i32 0
  %118 = load i32, ptr %117, align 4, !tbaa !11
  store i32 %118, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %119 = load i32, ptr %19, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %120) #4
  %122 = getelementptr inbounds %"struct.std::pair", ptr %121, i32 0, i32 1
  %123 = load i32, ptr %122, align 4, !tbaa !13
  store i32 %123, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %124 = load i32, ptr %16, align 4, !tbaa !5
  %125 = load i32, ptr %20, align 4, !tbaa !5
  %126 = sub nsw i32 %124, %125
  %127 = add nsw i32 %126, 10
  %128 = srem i32 %127, 10
  store i32 %128, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %129 = load i32, ptr %21, align 4, !tbaa !5
  %130 = srem i32 %129, 10
  store i32 %130, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  store i32 0, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %131

131:                                              ; preds = %202, %113
  %132 = load i32, ptr %25, align 4, !tbaa !5
  %133 = icmp slt i32 %132, 14
  br i1 %133, label %135, label %134

134:                                              ; preds = %131
  store i32 11, ptr %7, align 4
  br label %205

135:                                              ; preds = %131
  %136 = load i32, ptr %25, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [14 x i32], ptr @h, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = srem i32 %139, 10
  %141 = load i32, ptr %22, align 4, !tbaa !5
  %142 = icmp eq i32 %140, %141
  br i1 %142, label %143, label %201

143:                                              ; preds = %135
  %144 = load i32, ptr %4, align 4, !tbaa !5
  %145 = load i32, ptr %20, align 4, !tbaa !5
  %146 = sub nsw i32 %144, %145
  %147 = load i32, ptr %25, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [14 x i32], ptr @h, i64 0, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = icmp sge i32 %146, %150
  br i1 %151, label %152, label %201

152:                                              ; preds = %143
  %153 = load i32, ptr %25, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [14 x [10 x i32]], ptr @g, i64 0, i64 %154
  %156 = load i32, ptr %23, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [10 x i32], ptr %155, i64 0, i64 %157
  %159 = load i32, ptr %158, align 4, !tbaa !5
  %160 = xor i32 %159, -1
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %162, label %172

162:                                              ; preds = %152
  %163 = load i32, ptr %25, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [14 x [10 x i32]], ptr @g, i64 0, i64 %164
  %166 = load i32, ptr %23, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [10 x i32], ptr %165, i64 0, i64 %167
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = load i32, ptr %21, align 4, !tbaa !5
  %171 = icmp sgt i32 %169, %170
  br i1 %171, label %172, label %173

172:                                              ; preds = %162, %152
  store i32 1, ptr %18, align 4, !tbaa !5
  store i32 11, ptr %7, align 4
  br label %205

173:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %174 = load i32, ptr %20, align 4, !tbaa !5
  %175 = load i32, ptr %25, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [14 x i32], ptr @h, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = add nsw i32 %174, %178
  %180 = load i32, ptr %16, align 4, !tbaa !5
  %181 = sub nsw i32 %179, %180
  %182 = sdiv i32 %181, 10
  store i32 %182, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  %183 = load i32, ptr %21, align 4, !tbaa !5
  %184 = load i32, ptr %25, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [14 x [10 x i32]], ptr @g, i64 0, i64 %185
  %187 = load i32, ptr %23, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [10 x i32], ptr %186, i64 0, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !5
  %191 = sub nsw i32 %183, %190
  %192 = sdiv i32 %191, 10
  store i32 %192, ptr %28, align 4, !tbaa !5
  %193 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %194 unwind label %196

194:                                              ; preds = %173
  store i64 %193, ptr %26, align 4
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 4 dereferenceable(8) %26)
          to label %195 unwind label %196

195:                                              ; preds = %194
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  store i32 1, ptr %24, align 4, !tbaa !5
  br label %200

196:                                              ; preds = %194, %173
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %9, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %249

200:                                              ; preds = %195
  br label %201

201:                                              ; preds = %200, %143, %135
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %25, align 4, !tbaa !5
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %25, align 4, !tbaa !5
  br label %131, !llvm.loop !16

205:                                              ; preds = %172, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %24, align 4, !tbaa !5
  %208 = icmp ne i32 %207, 0
  br i1 %208, label %210, label %209

209:                                              ; preds = %206
  store i32 1, ptr %18, align 4, !tbaa !5
  store i32 8, ptr %7, align 4
  br label %211

210:                                              ; preds = %206
  store i32 0, ptr %7, align 4
  br label %211

211:                                              ; preds = %210, %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  %212 = load i32, ptr %7, align 4
  switch i32 %212, label %218 [
    i32 0, label %213
  ]

213:                                              ; preds = %211
  br label %214

214:                                              ; preds = %213, %110
  br label %215

215:                                              ; preds = %214
  %216 = load i32, ptr %19, align 4, !tbaa !5
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %19, align 4, !tbaa !5
  br label %104, !llvm.loop !17

218:                                              ; preds = %211, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %219

219:                                              ; preds = %218
  %220 = load i32, ptr %18, align 4, !tbaa !5
  %221 = icmp ne i32 %220, 0
  br i1 %221, label %245, label %222

222:                                              ; preds = %219
  %223 = load ptr, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  %224 = load i32, ptr %4, align 4, !tbaa !5
  %225 = load i32, ptr %16, align 4, !tbaa !5
  %226 = sub nsw i32 %224, %225
  %227 = sdiv i32 %226, 10
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %228 unwind label %236

228:                                              ; preds = %222
  %229 = invoke noundef i32 @_Z4calciSt6vectorISt4pairIiiESaIS1_EE(i32 noundef %227, ptr noundef %30)
          to label %230 unwind label %240

230:                                              ; preds = %228
  %231 = mul nsw i32 10, %229
  %232 = load i32, ptr %16, align 4, !tbaa !5
  %233 = add nsw i32 %231, %232
  store i32 %233, ptr %29, align 4, !tbaa !5
  %234 = invoke noundef i32 @_Z6chkmaxIiEiRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %223, ptr noundef nonnull align 4 dereferenceable(4) %29)
          to label %235 unwind label %240

235:                                              ; preds = %230
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  br label %245

236:                                              ; preds = %222
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %9, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %10, align 4
  br label %244

240:                                              ; preds = %230, %228
  %241 = landingpad { ptr, i32 }
          cleanup
  %242 = extractvalue { ptr, i32 } %241, 0
  store ptr %242, ptr %9, align 8
  %243 = extractvalue { ptr, i32 } %241, 1
  store i32 %243, ptr %10, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  br label %244

244:                                              ; preds = %240, %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  br label %249

245:                                              ; preds = %235, %219
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #4
  br label %246

246:                                              ; preds = %245
  %247 = load i32, ptr %16, align 4, !tbaa !5
  %248 = add nsw i32 %247, 1
  store i32 %248, ptr %16, align 4, !tbaa !5
  br label %99, !llvm.loop !18

249:                                              ; preds = %244, %196
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %253

250:                                              ; preds = %102
  %251 = load ptr, ptr %12, align 8, !tbaa !9
  %252 = load i32, ptr %251, align 4, !tbaa !5
  store i32 %252, ptr %3, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %254

253:                                              ; preds = %249, %94, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %256

254:                                              ; preds = %250, %68, %61, %59
  %255 = load i32, ptr %3, align 4
  ret i32 %255

256:                                              ; preds = %253, %74, %70
  %257 = load ptr, ptr %9, align 8
  %258 = load i32, ptr %10, align 4
  %259 = insertvalue { ptr, i32 } poison, ptr %257, 0
  %260 = insertvalue { ptr, i32 } %259, i32 %258, 1
  resume { ptr, i32 } %260

261:                                              ; preds = %59
  unreachable
}

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

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

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

; 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
declare dso_local noundef i64 @_ZNKSt3mapISt4pairIiSt6vectorIS0_IiiESaIS2_EEEiSt4lessIS5_ESaIS0_IKS5_iEEE5countERS8_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRiRSt6vectorISt4pairIiiESaIS3_EEES2_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.8") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(24)) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiSt6vectorIS0_IiiESaIS2_EEEiSt4lessIS5_ESaIS0_IKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!13 = !{!12, !6, i64 4}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}


; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, std::vector<std::pair<int, int>>>, std::pair<const std::pair<int, std::vector<std::pair<int, int>>>, int>, std::_Select1st<std::pair<const std::pair<int, std::vector<std::pair<int, int>>>, int>>, std::less<std::pair<int, std::vector<std::pair<int, int>>>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, std::vector<std::pair<int, int>>>, std::pair<const std::pair<int, std::vector<std::pair<int, int>>>, int>, std::_Select1st<std::pair<const std::pair<int, std::vector<std::pair<int, int>>>, int>>, std::less<std::pair<int, std::vector<std::pair<int, 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 }
%"struct.std::pair.8" = type { i32, %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@g = external dso_local local_unnamed_addr global [14 x [10 x i32]], align 16
@h = external dso_local local_unnamed_addr global [14 x i32], align 16
@f = external dso_local global %"class.std::map", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z4calciSt6vectorISt4pairIiiESaIS1_EE(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair.8", align 8
  %5 = alloca %"struct.std::pair.8", align 8
  %6 = alloca %"struct.std::pair.8", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::vector.3", align 8
  %9 = alloca %"class.std::vector.3", align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector.3", align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  %15 = icmp eq i32 %0, 0
  br i1 %15, label %.preheader, label %27

.preheader:                                       ; preds = %2
  %16 = tail call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %17 = trunc i64 %16 to i32
  %.not7483 = icmp sgt i32 %17, 0
  br i1 %.not7483, label %.lr.ph85, label %.loopexit

.lr.ph85:                                         ; preds = %.preheader, %24
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %24 ], [ 0, %.preheader ]
  %18 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv94) #4
  %19 = load i32, ptr %18, align 4, !tbaa !9
  %.not72 = icmp eq i32 %19, 0
  br i1 %.not72, label %24, label %20

20:                                               ; preds = %.lr.ph85
  %21 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv94) #4
  %22 = getelementptr inbounds i8, ptr %21, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !11
  %.not73 = icmp eq i32 %23, 0
  br i1 %.not73, label %24, label %.loopexit

24:                                               ; preds = %.lr.ph85, %20
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %25 = tail call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %sext97 = shl i64 %25, 32
  %26 = ashr exact i64 %sext97, 32
  %.not74 = icmp slt i64 %indvars.iv.next95, %26
  br i1 %.not74, label %.lr.ph85, label %.loopexit, !llvm.loop !12

27:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @_ZSt9make_pairIRiRSt6vectorISt4pairIiiESaIS3_EEES2_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.8") align 8 %4, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %28 = invoke noundef i64 @_ZNKSt3mapISt4pairIiSt6vectorIS0_IiiESaIS2_EEEiSt4lessIS5_ESaIS0_IKS5_iEEE5countERS8_(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %29 unwind label %34

29:                                               ; preds = %27
  %.not = icmp eq i64 %28, 0
  call void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  br i1 %.not, label %38, label %30

30:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @_ZSt9make_pairIRiRSt6vectorISt4pairIiiESaIS3_EEES2_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.8") align 8 %5, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %31 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiSt6vectorIS0_IiiESaIS2_EEEiSt4lessIS5_ESaIS0_IKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %32 unwind label %36

32:                                               ; preds = %30
  %33 = load i32, ptr %31, align 4, !tbaa !5
  call void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  br label %.loopexit

34:                                               ; preds = %27
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  br label %114

36:                                               ; preds = %30
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  br label %114

38:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @_ZSt9make_pairIRiRSt6vectorISt4pairIiiESaIS3_EEES2_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.8") align 8 %6, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %39 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiSt6vectorIS0_IiiESaIS2_EEEiSt4lessIS5_ESaIS0_IKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %40 unwind label %47

40:                                               ; preds = %38
  call void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  store i32 -100000000, ptr %39, align 4, !tbaa !5
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = icmp sgt i32 %41, 9
  br i1 %42, label %43, label %.preheader103

.preheader103:                                    ; preds = %45, %40
  br label %53

43:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %44 = invoke noundef i32 @_Z4calciSt6vectorISt4pairIiiESaIS1_EE(i32 noundef 10, ptr noundef nonnull %8)
          to label %45 unwind label %49

45:                                               ; preds = %43
  store i32 %44, ptr %7, align 4, !tbaa !5
  %46 = call noundef i32 @_Z6chkmaxIiEiRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %39, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br label %.preheader103

47:                                               ; preds = %38
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  br label %114

49:                                               ; preds = %43
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br label %114

51:                                               ; preds = %._crit_edge.thread100
  %52 = load i32, ptr %39, align 4, !tbaa !5
  br label %.loopexit

53:                                               ; preds = %.preheader103, %._crit_edge.thread100
  %.05682 = phi i32 [ %112, %._crit_edge.thread100 ], [ 0, %.preheader103 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  %54 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %55 = trunc i64 %54 to i32
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %53
  %57 = add nuw nsw i32 %.05682, 10
  br label %58

58:                                               ; preds = %.lr.ph, %94
  %indvars.iv90 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next91, %94 ]
  %.05278 = phi i32 [ 0, %.lr.ph ], [ %.355, %94 ]
  %.not62 = icmp eq i32 %.05278, 0
  br i1 %.not62, label %59, label %94

59:                                               ; preds = %58
  %60 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv90) #4
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv90) #4
  %63 = getelementptr inbounds i8, ptr %62, i64 4
  %64 = load i32, ptr %63, align 4, !tbaa !11
  %65 = sub i32 %57, %61
  %66 = srem i32 %65, 10
  %67 = srem i32 %64, 10
  %68 = sext i32 %67 to i64
  %69 = sub i32 %61, %.05682
  br label %70

70:                                               ; preds = %59, %92
  %indvars.iv = phi i64 [ 0, %59 ], [ %indvars.iv.next, %92 ]
  %.04376 = phi i32 [ 0, %59 ], [ %.1, %92 ]
  %71 = getelementptr inbounds [14 x i32], ptr @h, i64 0, i64 %indvars.iv
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = srem i32 %72, 10
  %74 = icmp eq i32 %73, %66
  br i1 %74, label %75, label %92

75:                                               ; preds = %70
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = sub nsw i32 %76, %61
  %.not63 = icmp slt i32 %77, %72
  br i1 %.not63, label %92, label %78

78:                                               ; preds = %75
  %79 = getelementptr inbounds [14 x [10 x i32]], ptr @g, i64 0, i64 %indvars.iv, i64 %68
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %.not64 = icmp eq i32 %80, -1
  %81 = icmp sgt i32 %80, %64
  %or.cond = select i1 %.not64, i1 true, i1 %81
  br i1 %or.cond, label %93, label %82

82:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  %83 = add i32 %69, %72
  %84 = sdiv i32 %83, 10
  store i32 %84, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #4
  %85 = sub nsw i32 %64, %80
  %86 = sdiv i32 %85, 10
  store i32 %86, ptr %12, align 4, !tbaa !5
  %87 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %88 unwind label %90

88:                                               ; preds = %82
  store i64 %87, ptr %10, align 8
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %89 unwind label %90

89:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br label %92

90:                                               ; preds = %88, %82
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br label %113

92:                                               ; preds = %70, %75, %89
  %.1 = phi i32 [ 1, %89 ], [ %.04376, %75 ], [ %.04376, %70 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 14
  br i1 %exitcond.not, label %93, label %70, !llvm.loop !14

93:                                               ; preds = %78, %92
  %.043.lcssa = phi i32 [ %.04376, %78 ], [ %.1, %92 ]
  %.153 = phi i32 [ 1, %78 ], [ 0, %92 ]
  %.not65.not = icmp eq i32 %.043.lcssa, 0
  br i1 %.not65.not, label %._crit_edge.thread100, label %94

94:                                               ; preds = %58, %93
  %.355 = phi i32 [ 1, %58 ], [ %.153, %93 ]
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %95 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %sext = shl i64 %95, 32
  %96 = ashr exact i64 %sext, 32
  %97 = icmp slt i64 %indvars.iv.next91, %96
  br i1 %97, label %58, label %._crit_edge, !llvm.loop !15

._crit_edge:                                      ; preds = %94
  %.not66 = icmp eq i32 %.355, 0
  br i1 %.not66, label %._crit_edge.thread, label %._crit_edge.thread100

._crit_edge.thread:                               ; preds = %53, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #4
  %98 = load i32, ptr %3, align 4, !tbaa !5
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %99 unwind label %107

99:                                               ; preds = %._crit_edge.thread
  %100 = sub nsw i32 %98, %.05682
  %101 = sdiv i32 %100, 10
  %102 = invoke noundef i32 @_Z4calciSt6vectorISt4pairIiiESaIS1_EE(i32 noundef %101, ptr noundef nonnull %14)
          to label %103 unwind label %109

103:                                              ; preds = %99
  %104 = mul nsw i32 %102, 10
  %105 = add nsw i32 %104, %.05682
  store i32 %105, ptr %13, align 4, !tbaa !5
  %106 = call noundef i32 @_Z6chkmaxIiEiRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %39, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  br label %._crit_edge.thread100

107:                                              ; preds = %._crit_edge.thread
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %111

109:                                              ; preds = %99
  %110 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  br label %111

111:                                              ; preds = %109, %107
  %.pn = phi { ptr, i32 } [ %110, %109 ], [ %108, %107 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  br label %113

._crit_edge.thread100:                            ; preds = %93, %103, %._crit_edge
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  %112 = add nuw nsw i32 %.05682, 1
  %exitcond93.not = icmp eq i32 %112, 10
  br i1 %exitcond93.not, label %51, label %53, !llvm.loop !16

113:                                              ; preds = %111, %90
  %.pn.pn = phi { ptr, i32 } [ %.pn, %111 ], [ %91, %90 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  br label %114

.loopexit:                                        ; preds = %20, %24, %.preheader, %51, %32
  %.145 = phi i32 [ %33, %32 ], [ %52, %51 ], [ 0, %.preheader ], [ -100000000, %20 ], [ 0, %24 ]
  ret i32 %.145

114:                                              ; preds = %47, %49, %113, %36, %34
  %.pn70 = phi { ptr, i32 } [ %37, %36 ], [ %35, %34 ], [ %.pn.pn, %113 ], [ %50, %49 ], [ %48, %47 ]
  resume { ptr, i32 } %.pn70
}

; 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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; 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
declare dso_local noundef i64 @_ZNKSt3mapISt4pairIiSt6vectorIS0_IiiESaIS2_EEEiSt4lessIS5_ESaIS0_IKS5_iEEE5countERS8_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRiRSt6vectorISt4pairIiiESaIS3_EEES2_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.8") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiSt6vectorIS_IiiESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiSt6vectorIS0_IiiESaIS2_EEEiSt4lessIS5_ESaIS0_IKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z6chkmaxIiEiRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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, !6, i64 0}
!10 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!11 = !{!10, !6, i64 4}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass