; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2020-21/Dec/Plat (cowmistry)

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

%struct.mint = type { i32 }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = 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 }
%"class.std::initializer_list" = type { ptr, i64 }
%"struct.std::pair" = type { i32, i32 }
%"class.std::allocator.14" = type { i8 }
%class.anon = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@K = external dso_local global i32, align 4
@ans = external dso_local global %struct.mint, align 4

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4), i64 noundef) unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_Z2c24mintILi1000000007ELi5EE(i32) #3

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(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 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2, i32 %3) #3 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.mint, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.mint, align 4
  %10 = alloca %struct.mint, align 4
  %11 = alloca %struct.mint, align 4
  %12 = alloca %struct.mint, align 4
  %13 = alloca %"class.std::vector.12", align 8
  %14 = alloca %"class.std::initializer_list", align 8
  %15 = alloca [1 x %"struct.std::pair"], align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::allocator.14", align 1
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca %struct.mint, align 4
  %22 = alloca %struct.mint, align 4
  %23 = alloca %struct.mint, align 4
  %24 = alloca %struct.mint, align 4
  %25 = alloca %struct.mint, align 4
  %26 = alloca i32, align 4
  %27 = alloca [2 x %"class.std::vector.12"], align 16
  %28 = alloca [2 x %"class.std::vector.12"], align 16
  %29 = alloca %class.anon, align 8
  %30 = alloca ptr, align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %33 = alloca ptr, align 8
  %34 = alloca %"struct.std::pair", align 4
  %35 = alloca %"struct.std::pair", align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca ptr, align 8
  %39 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %40 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %41 = alloca ptr, align 8
  %42 = alloca %"struct.std::pair", align 4
  %43 = alloca %"struct.std::pair", align 4
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca %struct.mint, align 4
  %48 = alloca %struct.mint, align 4
  %49 = alloca %struct.mint, align 4
  %50 = alloca i32, align 4
  %51 = alloca %struct.mint, align 4
  %52 = getelementptr inbounds %struct.mint, ptr %5, i32 0, i32 0
  store i32 %3, ptr %52, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  %55 = trunc i64 %54 to i32
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %58, label %57

57:                                               ; preds = %4
  br label %323

58:                                               ; preds = %4
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %59) #6
  %61 = trunc i64 %60 to i32
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %76, label %63

63:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = call noundef i32 @_Z12total_lengthRKSt6vectorISt4pairIiiESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %64)
  %66 = sext i32 %65 to i64
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %10, i64 noundef %66)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %5, i64 4, i1 false), !tbaa.struct !11
  %67 = getelementptr inbounds %struct.mint, ptr %12, i32 0, i32 0
  %68 = load i32, ptr %67, align 4
  %69 = call i32 @_Z2c24mintILi1000000007ELi5EE(i32 %68)
  %70 = getelementptr inbounds %struct.mint, ptr %11, i32 0, i32 0
  store i32 %69, ptr %70, align 4
  %71 = getelementptr inbounds %struct.mint, ptr %10, i32 0, i32 0
  %72 = load i32, ptr %71, align 4
  %73 = call i32 @_Zml4mintILi1000000007ELi5EERKS0_(i32 %72, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %74 = getelementptr inbounds %struct.mint, ptr %9, i32 0, i32 0
  store i32 %73, ptr %74, align 4
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4mintILi1000000007ELi5EEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %323

76:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %77 = load i32, ptr %8, align 4, !tbaa !9
  %78 = sub nsw i32 %77, 1
  store i32 %78, ptr %17, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %79 = getelementptr inbounds %"class.std::initializer_list", ptr %14, i32 0, i32 0
  store ptr %15, ptr %79, align 8, !tbaa !12
  %80 = getelementptr inbounds %"class.std::initializer_list", ptr %14, i32 0, i32 1
  store i64 1, ptr %80, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  call void @_ZNSaISt4pairIiiEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  %81 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8
  %83 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %84 = load i64, ptr %83, align 8
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr %82, i64 %84, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %85 unwind label %114

85:                                               ; preds = %76
  call void @_ZNSt15__new_allocatorISt4pairIiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = invoke noundef zeroext i1 @_ZSteqISt4pairIiiESaIS1_EEbRKSt6vectorIT_T0_ES8_(ptr noundef nonnull align 8 dereferenceable(24) %86, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %88 unwind label %118

88:                                               ; preds = %85
  br i1 %87, label %89, label %135

89:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %90 = load i32, ptr %8, align 4, !tbaa !9
  %91 = sub nsw i32 %90, 1
  %92 = load i32, ptr @K, align 4, !tbaa !9
  %93 = and i32 %91, %92
  %94 = sext i32 %93 to i64
  invoke void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %21, i64 noundef %94)
          to label %95 unwind label %122

95:                                               ; preds = %89
  %96 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4mintILi1000000007ELi5EEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %97 unwind label %122

97:                                               ; preds = %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = call noundef i32 @_Z12total_lengthRKSt6vectorISt4pairIiiESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %98)
  %100 = sext i32 %99 to i64
  invoke void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %23, i64 noundef %100)
          to label %101 unwind label %126

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %5, i64 4, i1 false), !tbaa.struct !11
  %102 = getelementptr inbounds %struct.mint, ptr %25, i32 0, i32 0
  %103 = load i32, ptr %102, align 4
  %104 = invoke i32 @_Z2c24mintILi1000000007ELi5EE(i32 %103)
          to label %105 unwind label %130

105:                                              ; preds = %101
  %106 = getelementptr inbounds %struct.mint, ptr %24, i32 0, i32 0
  store i32 %104, ptr %106, align 4
  %107 = getelementptr inbounds %struct.mint, ptr %23, i32 0, i32 0
  %108 = load i32, ptr %107, align 4
  %109 = invoke i32 @_Zml4mintILi1000000007ELi5EERKS0_(i32 %108, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %110 unwind label %130

110:                                              ; preds = %105
  %111 = getelementptr inbounds %struct.mint, ptr %22, i32 0, i32 0
  store i32 %109, ptr %111, align 4
  %112 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4mintILi1000000007ELi5EEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %113 unwind label %130

113:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  store i32 1, ptr %26, align 4
  br label %321

114:                                              ; preds = %76
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %19, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %20, align 4
  call void @_ZNSt15__new_allocatorISt4pairIiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %340

118:                                              ; preds = %85
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %19, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %20, align 4
  br label %339

122:                                              ; preds = %95, %89
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %19, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %339

126:                                              ; preds = %97
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %19, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %20, align 4
  br label %134

130:                                              ; preds = %110, %105, %101
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %19, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %134

134:                                              ; preds = %130, %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %339

135:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 48, ptr %27) #6
  %136 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %27, i32 0, i32 0
  %137 = getelementptr inbounds %"class.std::vector.12", ptr %136, i64 2
  br label %138

138:                                              ; preds = %138, %135
  %139 = phi ptr [ %136, %135 ], [ %140, %138 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %139) #6
  %140 = getelementptr inbounds %"class.std::vector.12", ptr %139, i64 1
  %141 = icmp eq ptr %140, %137
  br i1 %141, label %142, label %138

142:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 48, ptr %28) #6
  %143 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %28, i32 0, i32 0
  %144 = getelementptr inbounds %"class.std::vector.12", ptr %143, i64 2
  br label %145

145:                                              ; preds = %145, %142
  %146 = phi ptr [ %143, %142 ], [ %147, %145 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %146) #6
  %147 = getelementptr inbounds %"class.std::vector.12", ptr %146, i64 1
  %148 = icmp eq ptr %147, %144
  br i1 %148, label %149, label %145

149:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %150 = getelementptr inbounds %class.anon, ptr %29, i32 0, i32 0
  store ptr %8, ptr %150, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %151, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %152 = load ptr, ptr %30, align 8, !tbaa !5
  %153 = call ptr @_ZNKSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %152) #6
  %154 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %31, i32 0, i32 0
  store ptr %153, ptr %154, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %155 = load ptr, ptr %30, align 8, !tbaa !5
  %156 = call ptr @_ZNKSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %155) #6
  %157 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %32, i32 0, i32 0
  store ptr %156, ptr %157, align 8
  br label %158

158:                                              ; preds = %183, %149
  %159 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #6
  br i1 %159, label %161, label %160

160:                                              ; preds = %158
  store i32 2, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %194

161:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %162 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #6
  store ptr %162, ptr %33, align 8, !tbaa !5
  %163 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %27, i64 0, i64 0
  %164 = load ptr, ptr %33, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %164, i64 8, i1 false)
  %165 = load i64, ptr %34, align 4
  invoke void @"_ZZ13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EEENK3$_0clERS3_S1_"(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(24) %163, i64 %165)
          to label %166 unwind label %185

166:                                              ; preds = %161
  %167 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %27, i64 0, i64 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #6
  %168 = load ptr, ptr %33, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.std::pair", ptr %168, i32 0, i32 0
  %170 = load i32, ptr %169, align 4, !tbaa !16
  %171 = load i32, ptr %8, align 4, !tbaa !9
  %172 = sdiv i32 %171, 2
  %173 = sub nsw i32 %170, %172
  store i32 %173, ptr %36, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #6
  %174 = load ptr, ptr %33, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.std::pair", ptr %174, i32 0, i32 1
  %176 = load i32, ptr %175, align 4, !tbaa !18
  %177 = load i32, ptr %8, align 4, !tbaa !9
  %178 = sdiv i32 %177, 2
  %179 = sub nsw i32 %176, %178
  store i32 %179, ptr %37, align 4, !tbaa !9
  invoke void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %35, ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 4 dereferenceable(4) %37)
          to label %180 unwind label %189

180:                                              ; preds = %166
  %181 = load i64, ptr %35, align 4
  invoke void @"_ZZ13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EEENK3$_0clERS3_S1_"(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(24) %167, i64 %181)
          to label %182 unwind label %189

182:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  br label %183

183:                                              ; preds = %182
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #6
  br label %158

185:                                              ; preds = %161
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %19, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %20, align 4
  br label %193

189:                                              ; preds = %180, %166
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %19, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  br label %193

193:                                              ; preds = %189, %185
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %324

194:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  %195 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %195, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #6
  %196 = load ptr, ptr %38, align 8, !tbaa !5
  %197 = call ptr @_ZNKSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %196) #6
  %198 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %39, i32 0, i32 0
  store ptr %197, ptr %198, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #6
  %199 = load ptr, ptr %38, align 8, !tbaa !5
  %200 = call ptr @_ZNKSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %199) #6
  %201 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %40, i32 0, i32 0
  store ptr %200, ptr %201, align 8
  br label %202

202:                                              ; preds = %227, %194
  %203 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %40) #6
  br i1 %203, label %205, label %204

204:                                              ; preds = %202
  store i32 4, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  br label %238

205:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #6
  %206 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #6
  store ptr %206, ptr %41, align 8, !tbaa !5
  %207 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %28, i64 0, i64 0
  %208 = load ptr, ptr %41, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %42, ptr align 4 %208, i64 8, i1 false)
  %209 = load i64, ptr %42, align 4
  invoke void @"_ZZ13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EEENK3$_0clERS3_S1_"(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(24) %207, i64 %209)
          to label %210 unwind label %229

210:                                              ; preds = %205
  %211 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %28, i64 0, i64 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #6
  %212 = load ptr, ptr %41, align 8, !tbaa !5
  %213 = getelementptr inbounds %"struct.std::pair", ptr %212, i32 0, i32 0
  %214 = load i32, ptr %213, align 4, !tbaa !16
  %215 = load i32, ptr %8, align 4, !tbaa !9
  %216 = sdiv i32 %215, 2
  %217 = sub nsw i32 %214, %216
  store i32 %217, ptr %44, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #6
  %218 = load ptr, ptr %41, align 8, !tbaa !5
  %219 = getelementptr inbounds %"struct.std::pair", ptr %218, i32 0, i32 1
  %220 = load i32, ptr %219, align 4, !tbaa !18
  %221 = load i32, ptr %8, align 4, !tbaa !9
  %222 = sdiv i32 %221, 2
  %223 = sub nsw i32 %220, %222
  store i32 %223, ptr %45, align 4, !tbaa !9
  invoke void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %43, ptr noundef nonnull align 4 dereferenceable(4) %44, ptr noundef nonnull align 4 dereferenceable(4) %45)
          to label %224 unwind label %233

224:                                              ; preds = %210
  %225 = load i64, ptr %43, align 4
  invoke void @"_ZZ13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EEENK3$_0clERS3_S1_"(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(24) %211, i64 %225)
          to label %226 unwind label %233

226:                                              ; preds = %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  br label %227

227:                                              ; preds = %226
  %228 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #6
  br label %202

229:                                              ; preds = %205
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %19, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %20, align 4
  br label %237

233:                                              ; preds = %224, %210
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %19, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #6
  br label %237

237:                                              ; preds = %233, %229
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  br label %324

238:                                              ; preds = %204
  %239 = load i32, ptr @K, align 4, !tbaa !9
  %240 = load i32, ptr %8, align 4, !tbaa !9
  %241 = sdiv i32 %240, 2
  %242 = and i32 %239, %241
  %243 = icmp ne i32 %242, 0
  br i1 %243, label %244, label %281

244:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #6
  store i32 0, ptr %46, align 4, !tbaa !9
  br label %245

245:                                              ; preds = %273, %244
  %246 = load i32, ptr %46, align 4, !tbaa !9
  %247 = icmp slt i32 %246, 2
  br i1 %247, label %249, label %248

248:                                              ; preds = %245
  store i32 6, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #6
  br label %280

249:                                              ; preds = %245
  %250 = load i32, ptr %46, align 4, !tbaa !9
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %27, i64 0, i64 %251
  %253 = load i32, ptr %46, align 4, !tbaa !9
  %254 = xor i32 %253, 1
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %28, i64 0, i64 %255
  %257 = load i32, ptr %8, align 4, !tbaa !9
  %258 = sdiv i32 %257, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %48, ptr align 4 %5, i64 4, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #6
  %259 = load i32, ptr %46, align 4, !tbaa !9
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %28, i64 0, i64 %260
  %262 = call noundef i32 @_Z12total_lengthRKSt6vectorISt4pairIiiESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %261)
  %263 = sext i32 %262 to i64
  invoke void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %49, i64 noundef %263)
          to label %264 unwind label %276

264:                                              ; preds = %249
  %265 = getelementptr inbounds %struct.mint, ptr %48, i32 0, i32 0
  %266 = load i32, ptr %265, align 4
  %267 = invoke i32 @_Zpl4mintILi1000000007ELi5EERKS0_(i32 %266, ptr noundef nonnull align 4 dereferenceable(4) %49)
          to label %268 unwind label %276

268:                                              ; preds = %264
  %269 = getelementptr inbounds %struct.mint, ptr %47, i32 0, i32 0
  store i32 %267, ptr %269, align 4
  %270 = getelementptr inbounds %struct.mint, ptr %47, i32 0, i32 0
  %271 = load i32, ptr %270, align 4
  invoke void @_Z13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EE(ptr noundef nonnull align 8 dereferenceable(24) %252, ptr noundef nonnull align 8 dereferenceable(24) %256, i32 noundef %258, i32 %271)
          to label %272 unwind label %276

272:                                              ; preds = %268
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #6
  br label %273

273:                                              ; preds = %272
  %274 = load i32, ptr %46, align 4, !tbaa !9
  %275 = add nsw i32 %274, 1
  store i32 %275, ptr %46, align 4, !tbaa !9
  br label %245, !llvm.loop !19

276:                                              ; preds = %268, %264, %249
  %277 = landingpad { ptr, i32 }
          cleanup
  %278 = extractvalue { ptr, i32 } %277, 0
  store ptr %278, ptr %19, align 8
  %279 = extractvalue { ptr, i32 } %277, 1
  store i32 %279, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #6
  br label %324

280:                                              ; preds = %248
  br label %306

281:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #6
  store i32 0, ptr %50, align 4, !tbaa !9
  br label %282

282:                                              ; preds = %298, %281
  %283 = load i32, ptr %50, align 4, !tbaa !9
  %284 = icmp slt i32 %283, 2
  br i1 %284, label %286, label %285

285:                                              ; preds = %282
  store i32 9, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #6
  br label %305

286:                                              ; preds = %282
  %287 = load i32, ptr %50, align 4, !tbaa !9
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %27, i64 0, i64 %288
  %290 = load i32, ptr %50, align 4, !tbaa !9
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %28, i64 0, i64 %291
  %293 = load i32, ptr %8, align 4, !tbaa !9
  %294 = sdiv i32 %293, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %51, ptr align 4 %5, i64 4, i1 false), !tbaa.struct !11
  %295 = getelementptr inbounds %struct.mint, ptr %51, i32 0, i32 0
  %296 = load i32, ptr %295, align 4
  invoke void @_Z13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EE(ptr noundef nonnull align 8 dereferenceable(24) %289, ptr noundef nonnull align 8 dereferenceable(24) %292, i32 noundef %294, i32 %296)
          to label %297 unwind label %301

297:                                              ; preds = %286
  br label %298

298:                                              ; preds = %297
  %299 = load i32, ptr %50, align 4, !tbaa !9
  %300 = add nsw i32 %299, 1
  store i32 %300, ptr %50, align 4, !tbaa !9
  br label %282, !llvm.loop !21

301:                                              ; preds = %286
  %302 = landingpad { ptr, i32 }
          cleanup
  %303 = extractvalue { ptr, i32 } %302, 0
  store ptr %303, ptr %19, align 8
  %304 = extractvalue { ptr, i32 } %302, 1
  store i32 %304, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #6
  br label %324

305:                                              ; preds = %285
  br label %306

306:                                              ; preds = %305, %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  %307 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %28, i32 0, i32 0
  %308 = getelementptr inbounds %"class.std::vector.12", ptr %307, i64 2
  br label %309

309:                                              ; preds = %309, %306
  %310 = phi ptr [ %308, %306 ], [ %311, %309 ]
  %311 = getelementptr inbounds %"class.std::vector.12", ptr %310, i64 -1
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %311) #6
  %312 = icmp eq ptr %311, %307
  br i1 %312, label %313, label %309

313:                                              ; preds = %309
  call void @llvm.lifetime.end.p0(i64 48, ptr %28) #6
  %314 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %27, i32 0, i32 0
  %315 = getelementptr inbounds %"class.std::vector.12", ptr %314, i64 2
  br label %316

316:                                              ; preds = %316, %313
  %317 = phi ptr [ %315, %313 ], [ %318, %316 ]
  %318 = getelementptr inbounds %"class.std::vector.12", ptr %317, i64 -1
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %318) #6
  %319 = icmp eq ptr %318, %314
  br i1 %319, label %320, label %316

320:                                              ; preds = %316
  call void @llvm.lifetime.end.p0(i64 48, ptr %27) #6
  store i32 0, ptr %26, align 4
  br label %321

321:                                              ; preds = %320, %113
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  %322 = load i32, ptr %26, align 4
  switch i32 %322, label %346 [
    i32 0, label %323
    i32 1, label %323
  ]

323:                                              ; preds = %321, %321, %63, %57
  ret void

324:                                              ; preds = %301, %276, %237, %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  %325 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %28, i32 0, i32 0
  %326 = getelementptr inbounds %"class.std::vector.12", ptr %325, i64 2
  br label %327

327:                                              ; preds = %327, %324
  %328 = phi ptr [ %326, %324 ], [ %329, %327 ]
  %329 = getelementptr inbounds %"class.std::vector.12", ptr %328, i64 -1
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %329) #6
  %330 = icmp eq ptr %329, %325
  br i1 %330, label %331, label %327

331:                                              ; preds = %327
  call void @llvm.lifetime.end.p0(i64 48, ptr %28) #6
  %332 = getelementptr inbounds [2 x %"class.std::vector.12"], ptr %27, i32 0, i32 0
  %333 = getelementptr inbounds %"class.std::vector.12", ptr %332, i64 2
  br label %334

334:                                              ; preds = %334, %331
  %335 = phi ptr [ %333, %331 ], [ %336, %334 ]
  %336 = getelementptr inbounds %"class.std::vector.12", ptr %335, i64 -1
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %336) #6
  %337 = icmp eq ptr %336, %332
  br i1 %337, label %338, label %334

338:                                              ; preds = %334
  call void @llvm.lifetime.end.p0(i64 48, ptr %27) #6
  br label %339

339:                                              ; preds = %338, %134, %122, %118
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  br label %340

340:                                              ; preds = %339, %114
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  br label %341

341:                                              ; preds = %340
  %342 = load ptr, ptr %19, align 8
  %343 = load i32, ptr %20, align 4
  %344 = insertvalue { ptr, i32 } poison, ptr %342, 0
  %345 = insertvalue { ptr, i32 } %344, i32 %343, 1
  resume { ptr, i32 } %345

346:                                              ; preds = %321
  unreachable
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqISt4pairIiiESaIS1_EEbRKSt6vectorIT_T0_ES8_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZ13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EEENK3$_0clERS3_S1_"(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), i64) #5 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{i64 0, i64 4, !9}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTSSt16initializer_listISt4pairIiiEE", !6, i64 0, !14, i64 8}
!14 = !{!"long", !7, i64 0}
!15 = !{!13, !14, i64 8}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ZTSSt4pairIiiE", !10, i64 0, !10, i64 4}
!18 = !{!17, !10, i64 4}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}


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

%struct.mint = type { i32 }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = 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 }
%"class.std::allocator.14" = type { i8 }
%class.anon = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@K = external dso_local local_unnamed_addr global i32, align 4
@ans = external dso_local global %struct.mint, align 4

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4), i64 noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_Z2c24mintILi1000000007ELi5EE(i32) local_unnamed_addr #2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2, i32 %3) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.mint, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.mint, align 4
  %8 = alloca %struct.mint, align 4
  %9 = alloca %struct.mint, align 4
  %10 = alloca %"class.std::vector.12", align 8
  %11 = alloca [1 x %"struct.std::pair"], align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::allocator.14", align 1
  %15 = alloca %struct.mint, align 4
  %16 = alloca %struct.mint, align 4
  %17 = alloca %struct.mint, align 4
  %18 = alloca %struct.mint, align 4
  %19 = alloca [2 x %"class.std::vector.12"], align 16
  %20 = alloca [2 x %"class.std::vector.12"], align 16
  %21 = alloca %class.anon, align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"struct.std::pair", align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca %"struct.std::pair", align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca %struct.mint, align 4
  store i32 %3, ptr %5, align 4
  store i32 %2, ptr %6, align 4, !tbaa !5
  %33 = tail call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %34 = and i64 %33, 4294967295
  %.not = icmp eq i64 %34, 0
  br i1 %.not, label %134, label %35

35:                                               ; preds = %4
  %36 = tail call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %37 = and i64 %36, 4294967295
  %.not47 = icmp eq i64 %37, 0
  br i1 %.not47, label %38, label %45

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %39 = tail call noundef i32 @_Z12total_lengthRKSt6vectorISt4pairIiiESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %40 = sext i32 %39 to i64
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %8, i64 noundef %40)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  %41 = call i32 @_Z2c24mintILi1000000007ELi5EE(i32 %3)
  store i32 %41, ptr %9, align 4
  %42 = load i32, ptr %8, align 4
  %43 = call i32 @_Zml4mintILi1000000007ELi5EERKS0_(i32 %42, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i32 %43, ptr %7, align 4
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4mintILi1000000007ELi5EEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %134

45:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  %46 = add nsw i32 %2, -1
  store i32 %46, ptr %13, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #5
  call void @_ZNSaISt4pairIiiEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr nonnull %11, i64 1, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %47 unwind label %64

47:                                               ; preds = %45
  call void @_ZNSt15__new_allocatorISt4pairIiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  %48 = invoke noundef zeroext i1 @_ZSteqISt4pairIiiESaIS1_EEbRKSt6vectorIT_T0_ES8_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %49 unwind label %66

49:                                               ; preds = %47
  br i1 %48, label %50, label %70

50:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = add nsw i32 %51, -1
  %53 = load i32, ptr @K, align 4, !tbaa !5
  %54 = and i32 %52, %53
  %55 = sext i32 %54 to i64
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %15, i64 noundef %55)
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4mintILi1000000007ELi5EEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #5
  %57 = call noundef i32 @_Z12total_lengthRKSt6vectorISt4pairIiiESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %58 = sext i32 %57 to i64
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %17, i64 noundef %58)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #5
  %.sroa.022.0.copyload = load i32, ptr %5, align 4, !tbaa !5
  %59 = invoke i32 @_Z2c24mintILi1000000007ELi5EE(i32 %.sroa.022.0.copyload)
          to label %60 unwind label %68

60:                                               ; preds = %50
  store i32 %59, ptr %18, align 4
  %61 = load i32, ptr %17, align 4
  %62 = call i32 @_Zml4mintILi1000000007ELi5EERKS0_(i32 %61, ptr noundef nonnull align 4 dereferenceable(4) %18)
  store i32 %62, ptr %16, align 4
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4mintILi1000000007ELi5EEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %16)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #5
  br label %133

64:                                               ; preds = %45
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt4pairIiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  br label %139

66:                                               ; preds = %47
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %138

68:                                               ; preds = %50
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #5
  br label %138

70:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %19) #5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  %.ptr.1 = getelementptr inbounds i8, ptr %19, i64 24
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %20) #5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  %.ptr51.1 = getelementptr inbounds i8, ptr %20, i64 24
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr51.1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #5
  store ptr %6, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #5
  %71 = call ptr @_ZNKSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %71, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #5
  %72 = call ptr @_ZNKSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %72, ptr %23, align 8
  %73 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  br i1 %73, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %86, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #5
  %74 = call ptr @_ZNKSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  store ptr %74, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #5
  %75 = call ptr @_ZNKSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  store ptr %75, ptr %28, align 8
  %76 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #5
  br i1 %76, label %.lr.ph67, label %._crit_edge68

.lr.ph:                                           ; preds = %70, %86
  %77 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  %.sroa.016.0.copyload = load i64, ptr %77, align 4
  invoke void @"_ZZ13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EEENK3$_0clERS3_S1_"(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(24) %19, i64 %.sroa.016.0.copyload)
          to label %78 unwind label %89

78:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #5
  %79 = load i32, ptr %77, align 4, !tbaa !11
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %.neg56 = sdiv i32 %80, -2
  %81 = add i32 %.neg56, %79
  store i32 %81, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #5
  %82 = getelementptr inbounds i8, ptr %77, i64 4
  %83 = load i32, ptr %82, align 4, !tbaa !13
  %84 = add i32 %83, %.neg56
  store i32 %84, ptr %26, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %26)
  %85 = load i64, ptr %24, align 8
  invoke void @"_ZZ13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EEENK3$_0clERS3_S1_"(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, i64 %85)
          to label %86 unwind label %91

86:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #5
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  %88 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  br i1 %88, label %.lr.ph, label %._crit_edge

89:                                               ; preds = %.lr.ph
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %93

91:                                               ; preds = %78
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #5
  br label %93

93:                                               ; preds = %91, %89
  %.pn58 = phi { ptr, i32 } [ %92, %91 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #5
  br label %135

._crit_edge68:                                    ; preds = %110, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #5
  %94 = load i32, ptr @K, align 4, !tbaa !5
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = sdiv i32 %95, 2
  %97 = and i32 %96, %94
  %.not53 = icmp eq i32 %97, 0
  br i1 %.not53, label %.preheader.preheader, label %.preheader64.preheader

.preheader64.preheader:                           ; preds = %._crit_edge68
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %32) #5
  %98 = call noundef i32 @_Z12total_lengthRKSt6vectorISt4pairIiiESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %99 = sext i32 %98 to i64
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %32, i64 noundef %99)
  %100 = invoke i32 @_Zpl4mintILi1000000007ELi5EERKS0_(i32 %3, ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %118 unwind label %125

.preheader.preheader:                             ; preds = %._crit_edge68
  invoke void @_Z13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EE(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %20, i32 noundef %96, i32 %3)
          to label %.preheader.1 unwind label %129

.lr.ph67:                                         ; preds = %._crit_edge, %110
  %101 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #5
  %.sroa.011.0.copyload = load i64, ptr %101, align 4
  invoke void @"_ZZ13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EEENK3$_0clERS3_S1_"(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(24) %20, i64 %.sroa.011.0.copyload)
          to label %102 unwind label %113

102:                                              ; preds = %.lr.ph67
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #5
  %103 = load i32, ptr %101, align 4, !tbaa !11
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %.neg = sdiv i32 %104, -2
  %105 = add i32 %.neg, %103
  store i32 %105, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #5
  %106 = getelementptr inbounds i8, ptr %101, i64 4
  %107 = load i32, ptr %106, align 4, !tbaa !13
  %108 = add i32 %107, %.neg
  store i32 %108, ptr %31, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %109 = load i64, ptr %29, align 8
  invoke void @"_ZZ13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EEENK3$_0clERS3_S1_"(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(24) %.ptr51.1, i64 %109)
          to label %110 unwind label %115

110:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #5
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #5
  %112 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #5
  br i1 %112, label %.lr.ph67, label %._crit_edge68

113:                                              ; preds = %.lr.ph67
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %117

115:                                              ; preds = %102
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #5
  br label %117

117:                                              ; preds = %115, %113
  %.pn = phi { ptr, i32 } [ %116, %115 ], [ %114, %113 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #5
  br label %135

118:                                              ; preds = %.preheader64.preheader
  invoke void @_Z13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EE(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %.ptr51.1, i32 noundef %96, i32 %100)
          to label %.preheader64.1 unwind label %125

.preheader64.1:                                   ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %32) #5
  %119 = load i32, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %32) #5
  %120 = call noundef i32 @_Z12total_lengthRKSt6vectorISt4pairIiiESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %.ptr51.1)
  %121 = sext i32 %120 to i64
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %32, i64 noundef %121)
  %122 = invoke i32 @_Zpl4mintILi1000000007ELi5EERKS0_(i32 %3, ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %123 unwind label %125

123:                                              ; preds = %.preheader64.1
  %124 = sdiv i32 %119, 2
  invoke void @_Z13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EE(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %20, i32 noundef %124, i32 %122)
          to label %.loopexit.loopexit71 unwind label %125

.loopexit.loopexit71:                             ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %32) #5
  br label %.loopexit

125:                                              ; preds = %123, %.preheader64.1, %118, %.preheader64.preheader
  %126 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %32) #5
  br label %135

.preheader.1:                                     ; preds = %.preheader.preheader
  %127 = load i32, ptr %6, align 4, !tbaa !5
  %128 = sdiv i32 %127, 2
  invoke void @_Z13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EE(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %.ptr51.1, i32 noundef %128, i32 %3)
          to label %.loopexit unwind label %129

129:                                              ; preds = %.preheader.1, %.preheader.preheader
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %135

.loopexit:                                        ; preds = %.preheader.1, %.loopexit.loopexit71
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #5
  %131 = getelementptr inbounds i8, ptr %20, i64 24
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %131) #5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %20) #5
  %132 = getelementptr inbounds i8, ptr %19, i64 24
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %132) #5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %19) #5
  br label %133

133:                                              ; preds = %.loopexit, %60
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %134

134:                                              ; preds = %4, %133, %38
  ret void

135:                                              ; preds = %129, %125, %117, %93
  %.pn58.pn = phi { ptr, i32 } [ %.pn58, %93 ], [ %.pn, %117 ], [ %126, %125 ], [ %130, %129 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #5
  %136 = getelementptr inbounds i8, ptr %20, i64 24
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %136) #5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %20) #5
  %137 = getelementptr inbounds i8, ptr %19, i64 24
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %137) #5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %19) #5
  br label %138

138:                                              ; preds = %135, %68, %66
  %.pn61 = phi { ptr, i32 } [ %69, %68 ], [ %.pn58.pn, %135 ], [ %67, %66 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br label %139

139:                                              ; preds = %138, %64
  %.pn61.pn = phi { ptr, i32 } [ %.pn61, %138 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  resume { ptr, i32 } %.pn61.pn
}

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZ13add_to_answerRKSt6vectorISt4pairIiiESaIS1_EES5_i4mintILi1000000007ELi5EEENK3$_0clERS3_S1_"(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), i64) local_unnamed_addr #4 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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}


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