; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/313 Division 1/Problem C (C)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.__gnu_cxx::__normal_iterator" = type { ptr }

@h = external dso_local global i32, align 4
@w = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@f = external dso_local global [205100 x i64], align 16
@invf = external dso_local global [205100 x i64], align 16
@MOD = external dso_local global i64, align 8
@ways = external dso_local global [3010 x i64], align 16
@b = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3invx(i64 noundef) #0

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair", align 4
  %6 = alloca %"struct.std::pair", align 4
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  store i64 1, ptr @f, align 16, !tbaa !5
  store i64 1, ptr @invf, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %32, %0
  %15 = load i32, ptr %2, align 4, !tbaa !9
  %16 = icmp sle i32 %15, 200010
  br i1 %16, label %18, label %17

17:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %35

18:                                               ; preds = %14
  %19 = load i32, ptr %2, align 4, !tbaa !9
  %20 = sub nsw i32 %19, 1
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [205100 x i64], ptr @f, i64 0, i64 %21
  %23 = load i64, ptr %22, align 8, !tbaa !5
  %24 = load i32, ptr %2, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = mul nsw i64 %23, %25
  %27 = load i64, ptr @MOD, align 8, !tbaa !5
  %28 = srem i64 %26, %27
  %29 = load i32, ptr %2, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [205100 x i64], ptr @f, i64 0, i64 %30
  store i64 %28, ptr %31, align 8, !tbaa !5
  br label %32

32:                                               ; preds = %18
  %33 = load i32, ptr %2, align 4, !tbaa !9
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %2, align 4, !tbaa !9
  br label %14, !llvm.loop !11

35:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %49, %35
  %37 = load i32, ptr %3, align 4, !tbaa !9
  %38 = icmp sle i32 %37, 200010
  br i1 %38, label %40, label %39

39:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %52

40:                                               ; preds = %36
  %41 = load i32, ptr %3, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [205100 x i64], ptr @f, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = call noundef i64 @_Z3invx(i64 noundef %44)
  %46 = load i32, ptr %3, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [205100 x i64], ptr @invf, i64 0, i64 %47
  store i64 %45, ptr %48, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %40
  %50 = load i32, ptr %3, align 4, !tbaa !9
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %3, align 4, !tbaa !9
  br label %36, !llvm.loop !13

52:                                               ; preds = %39
  %53 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @h, ptr noundef @w, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %62, %52
  %55 = load i32, ptr %4, align 4, !tbaa !9
  %56 = load i32, ptr @n, align 4, !tbaa !9
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %65

59:                                               ; preds = %54
  %60 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @x, ptr noundef @y)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %61 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @x, ptr noundef nonnull align 4 dereferenceable(4) @y)
  store i64 %61, ptr %5, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @b, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %62

62:                                               ; preds = %59
  %63 = load i32, ptr %4, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %4, align 4, !tbaa !9
  br label %54, !llvm.loop !14

65:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %66 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @h, ptr noundef nonnull align 4 dereferenceable(4) @w)
  store i64 %66, ptr %6, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @b, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %67 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #6
  %68 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %67, ptr %68, align 8
  %69 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #6
  %70 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %69, ptr %70, align 8
  %71 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8
  %73 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %72, ptr %74)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %75 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #6
  %76 = trunc i64 %75 to i32
  store i32 %76, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %132, %65
  %78 = load i32, ptr %10, align 4, !tbaa !9
  %79 = load i32, ptr %9, align 4, !tbaa !9
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %135

82:                                               ; preds = %77
  %83 = load i32, ptr %10, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %84) #6
  %86 = getelementptr inbounds %"struct.std::pair", ptr %85, i32 0, i32 0
  %87 = load i32, ptr %86, align 4, !tbaa !15
  %88 = load i32, ptr %10, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %89) #6
  %91 = getelementptr inbounds %"struct.std::pair", ptr %90, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !17
  %93 = add nsw i32 %87, %92
  %94 = sub nsw i32 %93, 2
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [205100 x i64], ptr @f, i64 0, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !5
  %98 = load i32, ptr %10, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %99) #6
  %101 = getelementptr inbounds %"struct.std::pair", ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 4, !tbaa !15
  %103 = sub nsw i32 %102, 1
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [205100 x i64], ptr @invf, i64 0, i64 %104
  %106 = load i64, ptr %105, align 8, !tbaa !5
  %107 = mul nsw i64 %97, %106
  %108 = load i64, ptr @MOD, align 8, !tbaa !5
  %109 = srem i64 %107, %108
  %110 = load i32, ptr %10, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [3010 x i64], ptr @ways, i64 0, i64 %111
  store i64 %109, ptr %112, align 8, !tbaa !5
  %113 = load i32, ptr %10, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [3010 x i64], ptr @ways, i64 0, i64 %114
  %116 = load i64, ptr %115, align 8, !tbaa !5
  %117 = load i32, ptr %10, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %118) #6
  %120 = getelementptr inbounds %"struct.std::pair", ptr %119, i32 0, i32 1
  %121 = load i32, ptr %120, align 4, !tbaa !17
  %122 = sub nsw i32 %121, 1
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [205100 x i64], ptr @invf, i64 0, i64 %123
  %125 = load i64, ptr %124, align 8, !tbaa !5
  %126 = mul nsw i64 %116, %125
  %127 = load i64, ptr @MOD, align 8, !tbaa !5
  %128 = srem i64 %126, %127
  %129 = load i32, ptr %10, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [3010 x i64], ptr @ways, i64 0, i64 %130
  store i64 %128, ptr %131, align 8, !tbaa !5
  br label %132

132:                                              ; preds = %82
  %133 = load i32, ptr %10, align 4, !tbaa !9
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %10, align 4, !tbaa !9
  br label %77, !llvm.loop !18

135:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %136

136:                                              ; preds = %224, %135
  %137 = load i32, ptr %11, align 4, !tbaa !9
  %138 = load i32, ptr %9, align 4, !tbaa !9
  %139 = sub nsw i32 %138, 1
  %140 = icmp slt i32 %137, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %136
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %227

142:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %143 = load i32, ptr %11, align 4, !tbaa !9
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %13, align 4, !tbaa !9
  br label %145

145:                                              ; preds = %220, %142
  %146 = load i32, ptr %13, align 4, !tbaa !9
  %147 = load i32, ptr %9, align 4, !tbaa !9
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  store i32 17, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %223

150:                                              ; preds = %145
  %151 = load i32, ptr %13, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %152) #6
  %154 = getelementptr inbounds %"struct.std::pair", ptr %153, i32 0, i32 0
  %155 = load i32, ptr %154, align 4, !tbaa !15
  %156 = load i32, ptr %11, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %157) #6
  %159 = getelementptr inbounds %"struct.std::pair", ptr %158, i32 0, i32 0
  %160 = load i32, ptr %159, align 4, !tbaa !15
  %161 = icmp slt i32 %155, %160
  br i1 %161, label %174, label %162

162:                                              ; preds = %150
  %163 = load i32, ptr %13, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %164) #6
  %166 = getelementptr inbounds %"struct.std::pair", ptr %165, i32 0, i32 1
  %167 = load i32, ptr %166, align 4, !tbaa !17
  %168 = load i32, ptr %11, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %169) #6
  %171 = getelementptr inbounds %"struct.std::pair", ptr %170, i32 0, i32 1
  %172 = load i32, ptr %171, align 4, !tbaa !17
  %173 = icmp slt i32 %167, %172
  br i1 %173, label %174, label %175

174:                                              ; preds = %162, %150
  br label %220

175:                                              ; preds = %162
  %176 = load i32, ptr %11, align 4, !tbaa !9
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [3010 x i64], ptr @ways, i64 0, i64 %177
  %179 = load i64, ptr %178, align 8, !tbaa !5
  %180 = load i32, ptr %11, align 4, !tbaa !9
  %181 = sext i32 %180 to i64
  %182 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %181) #6
  %183 = getelementptr inbounds %"struct.std::pair", ptr %182, i32 0, i32 0
  %184 = load i32, ptr %183, align 4, !tbaa !15
  %185 = load i32, ptr %11, align 4, !tbaa !9
  %186 = sext i32 %185 to i64
  %187 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %186) #6
  %188 = getelementptr inbounds %"struct.std::pair", ptr %187, i32 0, i32 1
  %189 = load i32, ptr %188, align 4, !tbaa !17
  %190 = load i32, ptr %13, align 4, !tbaa !9
  %191 = sext i32 %190 to i64
  %192 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %191) #6
  %193 = getelementptr inbounds %"struct.std::pair", ptr %192, i32 0, i32 0
  %194 = load i32, ptr %193, align 4, !tbaa !15
  %195 = load i32, ptr %13, align 4, !tbaa !9
  %196 = sext i32 %195 to i64
  %197 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %196) #6
  %198 = getelementptr inbounds %"struct.std::pair", ptr %197, i32 0, i32 1
  %199 = load i32, ptr %198, align 4, !tbaa !17
  %200 = call noundef i64 @_Z4helpiiii(i32 noundef %184, i32 noundef %189, i32 noundef %194, i32 noundef %199)
  %201 = mul nsw i64 %179, %200
  %202 = load i64, ptr @MOD, align 8, !tbaa !5
  %203 = srem i64 %201, %202
  %204 = load i32, ptr %13, align 4, !tbaa !9
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [3010 x i64], ptr @ways, i64 0, i64 %205
  %207 = load i64, ptr %206, align 8, !tbaa !5
  %208 = sub nsw i64 %207, %203
  store i64 %208, ptr %206, align 8, !tbaa !5
  %209 = load i32, ptr %13, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [3010 x i64], ptr @ways, i64 0, i64 %210
  %212 = load i64, ptr %211, align 8, !tbaa !5
  %213 = load i64, ptr @MOD, align 8, !tbaa !5
  %214 = add nsw i64 %212, %213
  %215 = load i64, ptr @MOD, align 8, !tbaa !5
  %216 = srem i64 %214, %215
  %217 = load i32, ptr %13, align 4, !tbaa !9
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [3010 x i64], ptr @ways, i64 0, i64 %218
  store i64 %216, ptr %219, align 8, !tbaa !5
  br label %220

220:                                              ; preds = %175, %174
  %221 = load i32, ptr %13, align 4, !tbaa !9
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %13, align 4, !tbaa !9
  br label %145, !llvm.loop !19

223:                                              ; preds = %149
  br label %224

224:                                              ; preds = %223
  %225 = load i32, ptr %11, align 4, !tbaa !9
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %11, align 4, !tbaa !9
  br label %136, !llvm.loop !20

227:                                              ; preds = %141
  %228 = load i32, ptr %9, align 4, !tbaa !9
  %229 = sub nsw i32 %228, 1
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [3010 x i64], ptr @ways, i64 0, i64 %230
  %232 = load i64, ptr %231, align 8, !tbaa !5
  %233 = trunc i64 %232 to i32
  %234 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %233)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  %235 = load i32, ptr %1, align 4
  ret i32 %235
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

; 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)) #4 align 2

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

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

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

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

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

declare i32 @printf(ptr noundef, ...) #3

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }

@h = external dso_local global i32, align 4
@w = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@f = external dso_local local_unnamed_addr global [205100 x i64], align 16
@invf = external dso_local local_unnamed_addr global [205100 x i64], align 16
@MOD = external dso_local local_unnamed_addr global i64, align 8
@ways = external dso_local local_unnamed_addr global [3010 x i64], align 16
@b = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3invx(i64 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca %"struct.std::pair", align 8
  %2 = alloca %"struct.std::pair", align 8
  store i64 1, ptr @f, align 16, !tbaa !5
  store i64 1, ptr @invf, align 16, !tbaa !5
  %3 = load i64, ptr @MOD, align 8, !tbaa !5
  br label %4

4:                                                ; preds = %4, %0
  %5 = phi i64 [ 1, %0 ], [ %13, %4 ]
  %indvars.iv = phi i64 [ 1, %0 ], [ %indvars.iv.next.2, %4 ]
  %6 = mul nsw i64 %5, %indvars.iv
  %7 = srem i64 %6, %3
  %8 = getelementptr inbounds [205100 x i64], ptr @f, i64 0, i64 %indvars.iv
  store i64 %7, ptr %8, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %9 = mul nsw i64 %7, %indvars.iv.next
  %10 = srem i64 %9, %3
  %11 = getelementptr inbounds [205100 x i64], ptr @f, i64 0, i64 %indvars.iv.next
  store i64 %10, ptr %11, align 8, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %12 = mul nsw i64 %10, %indvars.iv.next.1
  %13 = srem i64 %12, %3
  %14 = getelementptr inbounds [205100 x i64], ptr @f, i64 0, i64 %indvars.iv.next.1
  store i64 %13, ptr %14, align 8, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %exitcond.not.2 = icmp eq i64 %indvars.iv.next.2, 200011
  br i1 %exitcond.not.2, label %.preheader50, label %4, !llvm.loop !9

15:                                               ; preds = %.preheader50
  %16 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @h, ptr noundef nonnull @w, ptr noundef nonnull @n)
  %17 = load i32, ptr @n, align 4, !tbaa !11
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph, label %._crit_edge

.preheader50:                                     ; preds = %4, %.preheader50
  %indvars.iv64 = phi i64 [ %indvars.iv.next65, %.preheader50 ], [ 1, %4 ]
  %19 = getelementptr inbounds [205100 x i64], ptr @f, i64 0, i64 %indvars.iv64
  %20 = load i64, ptr %19, align 8, !tbaa !5
  %21 = tail call noundef i64 @_Z3invx(i64 noundef %20)
  %22 = getelementptr inbounds [205100 x i64], ptr @invf, i64 0, i64 %indvars.iv64
  store i64 %21, ptr %22, align 8, !tbaa !5
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %exitcond67.not = icmp eq i64 %indvars.iv.next65, 200011
  br i1 %exitcond67.not, label %15, label %.preheader50, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph, %15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %23 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @h, ptr noundef nonnull align 4 dereferenceable(4) @w)
  store i64 %23, ptr %2, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @b, ptr noundef nonnull align 4 dereferenceable(8) %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  %24 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #6
  %25 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #6
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %24, ptr %25)
  %26 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #6
  %27 = trunc i64 %26 to i32
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph56.preheader, label %.preheader.thread

.preheader.thread:                                ; preds = %._crit_edge
  %29 = add i32 %27, -1
  br label %._crit_edge62

.lr.ph56.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = and i64 %26, 2147483647
  br label %.lr.ph56

.lr.ph:                                           ; preds = %15, %.lr.ph
  %.04753 = phi i32 [ %32, %.lr.ph ], [ 0, %15 ]
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @x, ptr noundef nonnull @y)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %31 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @x, ptr noundef nonnull align 4 dereferenceable(4) @y)
  store i64 %31, ptr %1, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @b, ptr noundef nonnull align 4 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  %32 = add nuw nsw i32 %.04753, 1
  %33 = load i32, ptr @n, align 4, !tbaa !11
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !14

.preheader:                                       ; preds = %.lr.ph56
  %35 = add nsw i32 %27, -1
  %.not = icmp eq i32 %27, 1
  br i1 %.not, label %._crit_edge62, label %.lr.ph61.preheader

.lr.ph61.preheader:                               ; preds = %.preheader
  %wide.trip.count82 = zext nneg i32 %35 to i64
  %wide.trip.count77 = and i64 %26, 2147483647
  br label %.lr.ph59

.lr.ph56:                                         ; preds = %.lr.ph56.preheader, %.lr.ph56
  %indvars.iv68 = phi i64 [ 0, %.lr.ph56.preheader ], [ %indvars.iv.next69, %.lr.ph56 ]
  %36 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv68) #6
  %37 = load i32, ptr %36, align 4, !tbaa !15
  %38 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv68) #6
  %39 = getelementptr inbounds i8, ptr %38, i64 4
  %40 = load i32, ptr %39, align 4, !tbaa !17
  %41 = add i32 %37, -2
  %42 = add i32 %41, %40
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [205100 x i64], ptr @f, i64 0, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv68) #6
  %47 = load i32, ptr %46, align 4, !tbaa !15
  %48 = add nsw i32 %47, -1
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [205100 x i64], ptr @invf, i64 0, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !5
  %52 = mul nsw i64 %51, %45
  %53 = load i64, ptr @MOD, align 8, !tbaa !5
  %54 = srem i64 %52, %53
  %55 = getelementptr inbounds [3010 x i64], ptr @ways, i64 0, i64 %indvars.iv68
  store i64 %54, ptr %55, align 8, !tbaa !5
  %56 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv68) #6
  %57 = getelementptr inbounds i8, ptr %56, i64 4
  %58 = load i32, ptr %57, align 4, !tbaa !17
  %59 = add nsw i32 %58, -1
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [205100 x i64], ptr @invf, i64 0, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = mul nsw i64 %62, %54
  %64 = load i64, ptr @MOD, align 8, !tbaa !5
  %65 = srem i64 %63, %64
  store i64 %65, ptr %55, align 8, !tbaa !5
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %exitcond71.not = icmp eq i64 %indvars.iv.next69, %wide.trip.count
  br i1 %exitcond71.not, label %.preheader, label %.lr.ph56, !llvm.loop !18

.loopexit:                                        ; preds = %108
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next80, %wide.trip.count82
  br i1 %exitcond83.not, label %._crit_edge62, label %.lr.ph59, !llvm.loop !19

._crit_edge62:                                    ; preds = %.loopexit, %.preheader.thread, %.preheader
  %66 = phi i32 [ %29, %.preheader.thread ], [ %35, %.preheader ], [ %35, %.loopexit ]
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [3010 x i64], ptr @ways, i64 0, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %70 = trunc i64 %69 to i32
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %70)
  ret i32 0

.lr.ph59:                                         ; preds = %.loopexit, %.lr.ph61.preheader
  %indvars.iv79 = phi i64 [ 0, %.lr.ph61.preheader ], [ %indvars.iv.next80, %.loopexit ]
  %indvars.iv72 = phi i64 [ 1, %.lr.ph61.preheader ], [ %indvars.iv.next73, %.loopexit ]
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %72 = getelementptr inbounds [3010 x i64], ptr @ways, i64 0, i64 %indvars.iv79
  br label %73

73:                                               ; preds = %.lr.ph59, %108
  %indvars.iv74 = phi i64 [ %indvars.iv72, %.lr.ph59 ], [ %indvars.iv.next75, %108 ]
  %74 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv74) #6
  %75 = load i32, ptr %74, align 4, !tbaa !15
  %76 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv79) #6
  %77 = load i32, ptr %76, align 4, !tbaa !15
  %78 = icmp slt i32 %75, %77
  br i1 %78, label %108, label %79

79:                                               ; preds = %73
  %80 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv74) #6
  %81 = getelementptr inbounds i8, ptr %80, i64 4
  %82 = load i32, ptr %81, align 4, !tbaa !17
  %83 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv79) #6
  %84 = getelementptr inbounds i8, ptr %83, i64 4
  %85 = load i32, ptr %84, align 4, !tbaa !17
  %86 = icmp slt i32 %82, %85
  br i1 %86, label %108, label %87

87:                                               ; preds = %79
  %88 = load i64, ptr %72, align 8, !tbaa !5
  %89 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv79) #6
  %90 = load i32, ptr %89, align 4, !tbaa !15
  %91 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv79) #6
  %92 = getelementptr inbounds i8, ptr %91, i64 4
  %93 = load i32, ptr %92, align 4, !tbaa !17
  %94 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv74) #6
  %95 = load i32, ptr %94, align 4, !tbaa !15
  %96 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @b, i64 noundef %indvars.iv74) #6
  %97 = getelementptr inbounds i8, ptr %96, i64 4
  %98 = load i32, ptr %97, align 4, !tbaa !17
  %99 = call noundef i64 @_Z4helpiiii(i32 noundef %90, i32 noundef %93, i32 noundef %95, i32 noundef %98)
  %100 = mul nsw i64 %99, %88
  %101 = load i64, ptr @MOD, align 8, !tbaa !5
  %102 = srem i64 %100, %101
  %103 = getelementptr inbounds [3010 x i64], ptr @ways, i64 0, i64 %indvars.iv74
  %104 = load i64, ptr %103, align 8, !tbaa !5
  %105 = sub i64 %101, %102
  %106 = add i64 %105, %104
  %107 = srem i64 %106, %101
  store i64 %107, ptr %103, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %73, %79, %87
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond78.not = icmp eq i64 %indvars.iv.next75, %wide.trip.count77
  br i1 %exitcond78.not, label %.loopexit, label %73, !llvm.loop !20
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; 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 #4 align 2

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

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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


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