; LLVM IR from tangjz/acm-icpc :: codeforces/complete (1034C)

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

%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, std::pair<const long long, int>, std::_Select1st<std::pair<const long long, int>>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, std::pair<const long long, int>, std::_Select1st<std::pair<const long long, int>>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair" = type <{ i64, i32, [4 x i8] }>

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [1000001 x i32], align 16
@fa = external dso_local global [1000001 x i32], align 16
@lnk = external dso_local global [1000001 x i32], align 16
@nxt = external dso_local global [1000001 x i32], align 16
@c = external dso_local global [1000001 x i32], align 16
@f = external dso_local global [1000001 x i32], align 16
@s = external dso_local global [1000001 x i64], align 16
@que = external dso_local global [1000001 x i64], align 16
@Hash = external dso_local global %"class.std::map", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

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

17:                                               ; preds = %36, %0
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = icmp sle i32 %18, %19
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds i32, ptr @a, i64 %24
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %25)
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [1000001 x i32], ptr @nxt, i64 0, i64 %28
  store i32 -1, ptr %29, align 4, !tbaa !5
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [1000001 x i32], ptr @lnk, i64 0, i64 %31
  store i32 -1, ptr %32, align 4, !tbaa !5
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [1000001 x i32], ptr @fa, i64 0, i64 %34
  store i32 -1, ptr %35, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %22
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %2, align 4, !tbaa !5
  br label %17, !llvm.loop !9

39:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 2, ptr %3, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %67, %39
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = load i32, ptr @n, align 4, !tbaa !5
  %43 = icmp sle i32 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %70

45:                                               ; preds = %40
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr @fa, i64 %47
  %49 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %48)
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [1000001 x i32], ptr @fa, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [1000001 x i32], ptr @lnk, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [1000001 x i32], ptr @nxt, i64 0, i64 %58
  store i32 %56, ptr %59, align 4, !tbaa !5
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [1000001 x i32], ptr @fa, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [1000001 x i32], ptr @lnk, i64 0, i64 %65
  store i32 %60, ptr %66, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %45
  %68 = load i32, ptr %3, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %3, align 4, !tbaa !5
  br label %40, !llvm.loop !11

70:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %71 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %71, ptr %4, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %106, %70
  %73 = load i32, ptr %4, align 4, !tbaa !5
  %74 = icmp sge i32 %73, 1
  br i1 %74, label %76, label %75

75:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %109

76:                                               ; preds = %72
  %77 = load i32, ptr %4, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [1000001 x i32], ptr @a, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = load i32, ptr %4, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [1000001 x i64], ptr @s, i64 0, i64 %83
  %85 = load i64, ptr %84, align 8, !tbaa !12
  %86 = add nsw i64 %85, %81
  store i64 %86, ptr %84, align 8, !tbaa !12
  %87 = load i32, ptr %4, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [1000001 x i32], ptr @fa, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %92, label %105

92:                                               ; preds = %76
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [1000001 x i64], ptr @s, i64 0, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !12
  %97 = load i32, ptr %4, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [1000001 x i32], ptr @fa, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [1000001 x i64], ptr @s, i64 0, i64 %101
  %103 = load i64, ptr %102, align 8, !tbaa !12
  %104 = add nsw i64 %103, %96
  store i64 %104, ptr %102, align 8, !tbaa !12
  br label %105

105:                                              ; preds = %92, %76
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %4, align 4, !tbaa !5
  %108 = add nsw i32 %107, -1
  store i32 %108, ptr %4, align 4, !tbaa !5
  br label %72, !llvm.loop !14

109:                                              ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %125, %109
  %111 = load i32, ptr %5, align 4, !tbaa !5
  %112 = load i32, ptr @n, align 4, !tbaa !5
  %113 = icmp sle i32 %111, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %128

115:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %116 = load i32, ptr %5, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [1000001 x i64], ptr @s, i64 0, i64 %117
  %119 = load i64, ptr %118, align 8, !tbaa !12
  %120 = load i64, ptr getelementptr inbounds ([1000001 x i64], ptr @s, i64 0, i64 1), align 8, !tbaa !12
  %121 = call noundef i64 @_ZSt5__gcdIxET_S0_S0_(i64 noundef %119, i64 noundef %120)
  store i64 %121, ptr %6, align 8, !tbaa !12
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48) @Hash, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %122, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %125

125:                                              ; preds = %115
  %126 = load i32, ptr %5, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %5, align 4, !tbaa !5
  br label %110, !llvm.loop !15

128:                                              ; preds = %114
  store i32 0, ptr @m, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store ptr @Hash, ptr %7, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %129 = call ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @Hash) #5
  %130 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %8, i32 0, i32 0
  store ptr %129, ptr %130, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %131 = call ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @Hash) #5
  %132 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %9, i32 0, i32 0
  store ptr %131, ptr %132, align 8
  br label %133

133:                                              ; preds = %151, %128
  %134 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKxiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %134, label %136, label %135

135:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %153

136:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %137 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  store ptr %137, ptr %10, align 8, !tbaa !16
  %138 = load ptr, ptr %10, align 8, !tbaa !16
  %139 = getelementptr inbounds %"struct.std::pair", ptr %138, i32 0, i32 0
  %140 = load i64, ptr %139, align 8, !tbaa !18
  %141 = load i32, ptr @m, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [1000001 x i64], ptr @que, i64 0, i64 %142
  store i64 %140, ptr %143, align 8, !tbaa !12
  %144 = load ptr, ptr %10, align 8, !tbaa !16
  %145 = getelementptr inbounds %"struct.std::pair", ptr %144, i32 0, i32 1
  %146 = load i32, ptr %145, align 8, !tbaa !20
  %147 = load i32, ptr @m, align 4, !tbaa !5
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr @m, align 4, !tbaa !5
  %149 = sext i32 %147 to i64
  %150 = getelementptr inbounds [1000001 x i32], ptr @c, i64 0, i64 %149
  store i32 %146, ptr %150, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %151

151:                                              ; preds = %136
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKxiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br label %133

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

154:                                              ; preds = %252, %153
  %155 = load i32, ptr %11, align 4, !tbaa !5
  %156 = load i32, ptr @m, align 4, !tbaa !5
  %157 = icmp slt i32 %155, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  store i32 16, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %255

159:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %160 = load i32, ptr %11, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [1000001 x i32], ptr @c, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  store i32 %163, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %164 = load i32, ptr %11, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %14, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %190, %159
  %167 = load i32, ptr %14, align 4, !tbaa !5
  %168 = load i32, ptr @m, align 4, !tbaa !5
  %169 = icmp slt i32 %167, %168
  br i1 %169, label %171, label %170

170:                                              ; preds = %166
  store i32 19, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %193

171:                                              ; preds = %166
  %172 = load i32, ptr %14, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [1000001 x i64], ptr @que, i64 0, i64 %173
  %175 = load i64, ptr %174, align 8, !tbaa !12
  %176 = load i32, ptr %11, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [1000001 x i64], ptr @que, i64 0, i64 %177
  %179 = load i64, ptr %178, align 8, !tbaa !12
  %180 = srem i64 %175, %179
  %181 = icmp eq i64 %180, 0
  br i1 %181, label %182, label %189

182:                                              ; preds = %171
  %183 = load i32, ptr %14, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [1000001 x i32], ptr @c, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = load i32, ptr %13, align 4, !tbaa !5
  %188 = add nsw i32 %187, %186
  store i32 %188, ptr %13, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %182, %171
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %14, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %14, align 4, !tbaa !5
  br label %166, !llvm.loop !21

193:                                              ; preds = %170
  %194 = load i32, ptr %13, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = load i32, ptr %11, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [1000001 x i64], ptr @que, i64 0, i64 %197
  %199 = load i64, ptr %198, align 8, !tbaa !12
  %200 = mul nsw i64 %195, %199
  %201 = load i64, ptr getelementptr inbounds ([1000001 x i64], ptr @s, i64 0, i64 1), align 8, !tbaa !12
  %202 = icmp ne i64 %200, %201
  br i1 %202, label %203, label %204

203:                                              ; preds = %193
  store i32 18, ptr %12, align 4
  br label %249

204:                                              ; preds = %193
  %205 = load i32, ptr %11, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %206
  store i32 1, ptr %207, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %208

208:                                              ; preds = %245, %204
  %209 = load i32, ptr %15, align 4, !tbaa !5
  %210 = load i32, ptr %11, align 4, !tbaa !5
  %211 = icmp slt i32 %209, %210
  br i1 %211, label %213, label %212

212:                                              ; preds = %208
  store i32 22, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %248

213:                                              ; preds = %208
  %214 = load i32, ptr %11, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [1000001 x i64], ptr @que, i64 0, i64 %215
  %217 = load i64, ptr %216, align 8, !tbaa !12
  %218 = load i32, ptr %15, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [1000001 x i64], ptr @que, i64 0, i64 %219
  %221 = load i64, ptr %220, align 8, !tbaa !12
  %222 = srem i64 %217, %221
  %223 = icmp eq i64 %222, 0
  br i1 %223, label %224, label %244

224:                                              ; preds = %213
  %225 = load i32, ptr %15, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %226
  %228 = load i32, ptr %227, align 4, !tbaa !5
  %229 = load i32, ptr %11, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %230
  %232 = load i32, ptr %231, align 4, !tbaa !5
  %233 = add nsw i32 %232, %228
  store i32 %233, ptr %231, align 4, !tbaa !5
  %234 = icmp sge i32 %233, 1000000007
  br i1 %234, label %235, label %242

235:                                              ; preds = %224
  %236 = load i32, ptr %11, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = sub nsw i32 %239, 1000000007
  store i32 %240, ptr %238, align 4, !tbaa !5
  %241 = icmp ne i32 %240, 0
  br label %242

242:                                              ; preds = %235, %224
  %243 = phi i1 [ false, %224 ], [ %241, %235 ]
  br label %244

244:                                              ; preds = %242, %213
  br label %245

245:                                              ; preds = %244
  %246 = load i32, ptr %15, align 4, !tbaa !5
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %15, align 4, !tbaa !5
  br label %208, !llvm.loop !22

248:                                              ; preds = %212
  store i32 0, ptr %12, align 4
  br label %249

249:                                              ; preds = %248, %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  %250 = load i32, ptr %12, align 4
  switch i32 %250, label %262 [
    i32 0, label %251
    i32 18, label %252
  ]

251:                                              ; preds = %249
  br label %252

252:                                              ; preds = %251, %249
  %253 = load i32, ptr %11, align 4, !tbaa !5
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %11, align 4, !tbaa !5
  br label %154, !llvm.loop !23

255:                                              ; preds = %158
  %256 = load i32, ptr @m, align 4, !tbaa !5
  %257 = sub nsw i32 %256, 1
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %258
  %260 = load i32, ptr %259, align 4, !tbaa !5
  %261 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %260)
  ret i32 0

262:                                              ; preds = %249
  unreachable
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt5__gcdIxET_S0_S0_(i64 noundef, i64 noundef) #4

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

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

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

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

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

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

attributes #0 = { 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 #1 = { "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 nosync 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!19, !13, i64 0}
!19 = !{!"_ZTSSt4pairIKxiE", !13, i64 0, !6, i64 8}
!20 = !{!19, !6, i64 8}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}


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

%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, std::pair<const long long, int>, std::_Select1st<std::pair<const long long, int>>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, std::pair<const long long, int>, std::_Select1st<std::pair<const long long, int>>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4
@a = external dso_local global [1000001 x i32], align 16
@fa = external dso_local global [1000001 x i32], align 16
@lnk = external dso_local local_unnamed_addr global [1000001 x i32], align 16
@nxt = external dso_local local_unnamed_addr global [1000001 x i32], align 16
@c = external dso_local local_unnamed_addr global [1000001 x i32], align 16
@f = external dso_local local_unnamed_addr global [1000001 x i32], align 16
@s = external dso_local local_unnamed_addr global [1000001 x i64], align 16
@que = external dso_local local_unnamed_addr global [1000001 x i64], align 16
@Hash = external dso_local global %"class.std::map", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %3 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %.not62 = icmp slt i32 %5, 1
  br i1 %.not62, label %._crit_edge, label %.lr.ph

.preheader60:                                     ; preds = %.lr.ph
  %.not5664 = icmp slt i32 %11, 2
  br i1 %.not5664, label %.preheader59, label %.lr.ph66

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %6 = getelementptr inbounds i32, ptr @a, i64 %indvars.iv
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %6)
  %8 = getelementptr inbounds [1000001 x i32], ptr @nxt, i64 0, i64 %indvars.iv
  store i32 -1, ptr %8, align 4, !tbaa !5
  %9 = getelementptr inbounds [1000001 x i32], ptr @lnk, i64 0, i64 %indvars.iv
  store i32 -1, ptr %9, align 4, !tbaa !5
  %10 = getelementptr inbounds [1000001 x i32], ptr @fa, i64 0, i64 %indvars.iv
  store i32 -1, ptr %10, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %.not.not = icmp slt i64 %indvars.iv, %12
  br i1 %.not.not, label %.lr.ph, label %.preheader60, !llvm.loop !9

.preheader59:                                     ; preds = %.lr.ph66, %.preheader60
  %13 = phi i32 [ %11, %.preheader60 ], [ %24, %.lr.ph66 ]
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph68.preheader, label %._crit_edge

.lr.ph68.preheader:                               ; preds = %.preheader59
  %15 = zext nneg i32 %13 to i64
  br label %.lr.ph68

.lr.ph66:                                         ; preds = %.preheader60, %.lr.ph66
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %.lr.ph66 ], [ 2, %.preheader60 ]
  %16 = getelementptr inbounds i32, ptr @fa, i64 %indvars.iv90
  %17 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %16)
  %18 = load i32, ptr %16, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [1000001 x i32], ptr @lnk, i64 0, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = getelementptr inbounds [1000001 x i32], ptr @nxt, i64 0, i64 %indvars.iv90
  store i32 %21, ptr %22, align 4, !tbaa !5
  %23 = trunc nuw nsw i64 %indvars.iv90 to i32
  store i32 %23, ptr %20, align 4, !tbaa !5
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %.not56.not = icmp slt i64 %indvars.iv90, %25
  br i1 %.not56.not, label %.lr.ph66, label %.preheader59, !llvm.loop !11

.lr.ph68:                                         ; preds = %.lr.ph68.preheader, %40
  %indvars.iv93 = phi i64 [ %15, %.lr.ph68.preheader ], [ %indvars.iv.next94, %40 ]
  %26 = getelementptr inbounds [1000001 x i32], ptr @a, i64 0, i64 %indvars.iv93
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [1000001 x i64], ptr @s, i64 0, i64 %indvars.iv93
  %30 = load i64, ptr %29, align 8, !tbaa !12
  %31 = add nsw i64 %30, %28
  store i64 %31, ptr %29, align 8, !tbaa !12
  %32 = getelementptr inbounds [1000001 x i32], ptr @fa, i64 0, i64 %indvars.iv93
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %35, label %40

35:                                               ; preds = %.lr.ph68
  %36 = zext nneg i32 %33 to i64
  %37 = getelementptr inbounds [1000001 x i64], ptr @s, i64 0, i64 %36
  %38 = load i64, ptr %37, align 8, !tbaa !12
  %39 = add nsw i64 %38, %31
  store i64 %39, ptr %37, align 8, !tbaa !12
  br label %40

40:                                               ; preds = %.lr.ph68, %35
  %indvars.iv.next94 = add nsw i64 %indvars.iv93, -1
  %41 = icmp sgt i64 %indvars.iv93, 1
  br i1 %41, label %.lr.ph68, label %.lr.ph71, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph71, %0, %.preheader59
  store i32 0, ptr @m, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %42 = call ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @Hash) #5
  store ptr %42, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %43 = call ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @Hash) #5
  store ptr %43, ptr %3, align 8
  %44 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKxiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %44, label %.lr.ph73, label %._crit_edge74

.lr.ph71:                                         ; preds = %40, %.lr.ph71
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %.lr.ph71 ], [ 1, %40 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %45 = getelementptr inbounds [1000001 x i64], ptr @s, i64 0, i64 %indvars.iv96
  %46 = load i64, ptr %45, align 8, !tbaa !12
  %47 = load i64, ptr getelementptr inbounds (i8, ptr @s, i64 8), align 8, !tbaa !12
  %48 = call noundef i64 @_ZSt5__gcdIxET_S0_S0_(i64 noundef %46, i64 noundef %47)
  store i64 %48, ptr %1, align 8, !tbaa !12
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48) @Hash, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %49, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %52 = load i32, ptr @n, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %.not57.not = icmp slt i64 %indvars.iv96, %53
  br i1 %.not57.not, label %.lr.ph71, label %._crit_edge, !llvm.loop !15

._crit_edge74:                                    ; preds = %.lr.ph73, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %54 = load i32, ptr @m, align 4, !tbaa !5
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %.lr.ph86, label %._crit_edge87

.lr.ph86:                                         ; preds = %._crit_edge74
  %56 = load i64, ptr getelementptr inbounds (i8, ptr @s, i64 8), align 8, !tbaa !12
  %57 = zext nneg i32 %54 to i64
  %wide.trip.count112 = zext nneg i32 %54 to i64
  br label %74

.lr.ph73:                                         ; preds = %._crit_edge, %.lr.ph73
  %58 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %59 = load i64, ptr %58, align 8, !tbaa !16
  %60 = load i32, ptr @m, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [1000001 x i64], ptr @que, i64 0, i64 %61
  store i64 %59, ptr %62, align 8, !tbaa !12
  %63 = getelementptr inbounds i8, ptr %58, i64 8
  %64 = load i32, ptr %63, align 8, !tbaa !18
  %65 = add nsw i32 %60, 1
  store i32 %65, ptr @m, align 4, !tbaa !5
  %66 = getelementptr inbounds [1000001 x i32], ptr @c, i64 0, i64 %61
  store i32 %64, ptr %66, align 4, !tbaa !5
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKxiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %68 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKxiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %68, label %.lr.ph73, label %._crit_edge74

._crit_edge87:                                    ; preds = %.loopexit, %._crit_edge74
  %69 = add nsw i32 %54, -1
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %72)
  ret i32 0

74:                                               ; preds = %.lr.ph86, %.loopexit
  %indvars.iv109 = phi i64 [ 0, %.lr.ph86 ], [ %indvars.iv.next110, %.loopexit ]
  %indvars.iv99 = phi i64 [ 1, %.lr.ph86 ], [ %indvars.iv.next100, %.loopexit ]
  %75 = getelementptr inbounds [1000001 x i32], ptr @c, i64 0, i64 %indvars.iv109
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %77 = icmp ult i64 %indvars.iv.next110, %57
  %78 = getelementptr inbounds [1000001 x i64], ptr @que, i64 0, i64 %indvars.iv109
  %79 = load i64, ptr %78, align 8, !tbaa !12
  br i1 %77, label %.lr.ph78, label %._crit_edge79

._crit_edge79:                                    ; preds = %90, %74
  %.046.lcssa = phi i32 [ %76, %74 ], [ %.1, %90 ]
  %80 = sext i32 %.046.lcssa to i64
  %81 = mul nsw i64 %79, %80
  %.not58 = icmp eq i64 %81, %56
  br i1 %.not58, label %91, label %.loopexit

.lr.ph78:                                         ; preds = %74, %90
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %90 ], [ %indvars.iv99, %74 ]
  %.04675 = phi i32 [ %.1, %90 ], [ %76, %74 ]
  %82 = getelementptr inbounds [1000001 x i64], ptr @que, i64 0, i64 %indvars.iv101
  %83 = load i64, ptr %82, align 8, !tbaa !12
  %84 = srem i64 %83, %79
  %85 = icmp eq i64 %84, 0
  br i1 %85, label %86, label %90

86:                                               ; preds = %.lr.ph78
  %87 = getelementptr inbounds [1000001 x i32], ptr @c, i64 0, i64 %indvars.iv101
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = add nsw i32 %88, %.04675
  br label %90

90:                                               ; preds = %.lr.ph78, %86
  %.1 = phi i32 [ %89, %86 ], [ %.04675, %.lr.ph78 ]
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next102, %wide.trip.count112
  br i1 %exitcond.not, label %._crit_edge79, label %.lr.ph78, !llvm.loop !19

91:                                               ; preds = %._crit_edge79
  %92 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %indvars.iv109
  store i32 1, ptr %92, align 4, !tbaa !5
  %.not = icmp eq i64 %indvars.iv109, 0
  br i1 %.not, label %.loopexit, label %.lr.ph83

.lr.ph83:                                         ; preds = %91, %105
  %93 = phi i32 [ %106, %105 ], [ 1, %91 ]
  %indvars.iv104 = phi i64 [ %indvars.iv.next105, %105 ], [ 0, %91 ]
  %94 = getelementptr inbounds [1000001 x i64], ptr @que, i64 0, i64 %indvars.iv104
  %95 = load i64, ptr %94, align 8, !tbaa !12
  %96 = srem i64 %79, %95
  %97 = icmp eq i64 %96, 0
  br i1 %97, label %98, label %105

98:                                               ; preds = %.lr.ph83
  %99 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %indvars.iv104
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = add nsw i32 %93, %100
  store i32 %101, ptr %92, align 4, !tbaa !5
  %102 = icmp sgt i32 %101, 1000000006
  br i1 %102, label %103, label %105

103:                                              ; preds = %98
  %104 = add nsw i32 %101, -1000000007
  store i32 %104, ptr %92, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %.lr.ph83, %103, %98
  %106 = phi i32 [ %93, %.lr.ph83 ], [ %104, %103 ], [ %101, %98 ]
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %exitcond108.not = icmp eq i64 %indvars.iv.next105, %indvars.iv109
  br i1 %exitcond108.not, label %.loopexit, label %.lr.ph83, !llvm.loop !20

.loopexit:                                        ; preds = %105, %91, %._crit_edge79
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %exitcond113.not = icmp eq i64 %indvars.iv.next110, %wide.trip.count112
  br i1 %exitcond113.not, label %._crit_edge87, label %74, !llvm.loop !21
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt5__gcdIxET_S0_S0_(i64 noundef, i64 noundef) local_unnamed_addr #4

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = !{!17, !13, i64 0}
!17 = !{!"_ZTSSt4pairIKxiE", !13, i64 0, !6, i64 8}
!18 = !{!17, !6, i64 8}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


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