; LLVM IR from tangjz/acm-icpc :: lydsy (1167)

; 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.Edge = type { i32, i32 }
%struct.Node = type { i32, i32, i32 }

@n = external dso_local global i32, align 4
@a = external dso_local global [300001 x i32], align 16
@lnk = external dso_local global [300001 x i32], align 16
@fa = external dso_local global [300001 x i32], align 16
@ord = external dso_local global [300001 x i32], align 16
@idx = external dso_local global [300001 x i32], align 16
@m = external dso_local global i64, align 8
@e = external dso_local global [600003 x %struct.Edge], align 16
@f = external dso_local global [2 x [300001 x %struct.Node]], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 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 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 %struct.Edge, align 4
  %7 = alloca %struct.Edge, align 4
  %8 = alloca i32, align 4
  %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
  %14 = alloca i32, align 4
  %15 = alloca %struct.Node, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.Node, align 4
  %19 = alloca %struct.Node, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %struct.Node, align 4
  %25 = alloca %struct.Node, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %39, %0
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %42

34:                                               ; preds = %29
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i32, ptr @a, i64 %36
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %37)
  br label %39

39:                                               ; preds = %34
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %2, align 4, !tbaa !5
  br label %29, !llvm.loop !9

42:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %84, %42
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = load i32, ptr @n, align 4, !tbaa !5
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %87

48:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %49 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %4, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %50 = getelementptr inbounds %struct.Edge, ptr %6, i32 0, i32 0
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [300001 x i32], ptr @lnk, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  store i32 %54, ptr %50, align 4, !tbaa !11
  %55 = getelementptr inbounds %struct.Edge, ptr %6, i32 0, i32 1
  %56 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %56, ptr %55, align 4, !tbaa !13
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = shl i32 %57, 1
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %59
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %60, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = shl i32 %61, 1
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [300001 x i32], ptr @lnk, i64 0, i64 %64
  store i32 %62, ptr %65, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %66 = getelementptr inbounds %struct.Edge, ptr %7, i32 0, i32 0
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [300001 x i32], ptr @lnk, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  store i32 %70, ptr %66, align 4, !tbaa !11
  %71 = getelementptr inbounds %struct.Edge, ptr %7, i32 0, i32 1
  %72 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %72, ptr %71, align 4, !tbaa !13
  %73 = load i32, ptr %3, align 4, !tbaa !5
  %74 = shl i32 %73, 1
  %75 = or i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %76
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %77, ptr align 4 %7, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = shl i32 %78, 1
  %80 = or i32 %79, 1
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [300001 x i32], ptr @lnk, i64 0, i64 %82
  store i32 %80, ptr %83, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %84

84:                                               ; preds = %48
  %85 = load i32, ptr %3, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %3, align 4, !tbaa !5
  br label %43, !llvm.loop !15

87:                                               ; preds = %47
  store i32 1, ptr getelementptr inbounds ([300001 x i32], ptr @ord, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %143, %87
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = load i32, ptr %9, align 4, !tbaa !5
  %91 = icmp sle i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %146

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %94 = load i32, ptr %8, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [300001 x i32], ptr @ord, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  store i32 %97, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [300001 x i32], ptr @lnk, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  store i32 %101, ptr %12, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %136, %93
  %103 = load i32, ptr %12, align 4, !tbaa !5
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %106, label %105

105:                                              ; preds = %102
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %142

106:                                              ; preds = %102
  %107 = load i32, ptr %12, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %108
  %110 = getelementptr inbounds %struct.Edge, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !13
  %112 = load i32, ptr %11, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [300001 x i32], ptr @fa, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = icmp ne i32 %111, %115
  br i1 %116, label %117, label %135

117:                                              ; preds = %106
  %118 = load i32, ptr %11, align 4, !tbaa !5
  %119 = load i32, ptr %12, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %120
  %122 = getelementptr inbounds %struct.Edge, ptr %121, i32 0, i32 1
  %123 = load i32, ptr %122, align 4, !tbaa !13
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [300001 x i32], ptr @fa, i64 0, i64 %124
  store i32 %118, ptr %125, align 4, !tbaa !5
  %126 = load i32, ptr %12, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %127
  %129 = getelementptr inbounds %struct.Edge, ptr %128, i32 0, i32 1
  %130 = load i32, ptr %129, align 4, !tbaa !13
  %131 = load i32, ptr %9, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %9, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [300001 x i32], ptr @ord, i64 0, i64 %133
  store i32 %130, ptr %134, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %117, %106
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %12, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %138
  %140 = getelementptr inbounds %struct.Edge, ptr %139, i32 0, i32 0
  %141 = load i32, ptr %140, align 8, !tbaa !11
  store i32 %141, ptr %12, align 4, !tbaa !5
  br label %102, !llvm.loop !16

142:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %8, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %8, align 4, !tbaa !5
  br label %88, !llvm.loop !17

146:                                              ; preds = %92
  store i32 -300001, ptr @a, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %147 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %147, ptr %13, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %235, %146
  %149 = load i32, ptr %13, align 4, !tbaa !5
  %150 = icmp sge i32 %149, 1
  br i1 %150, label %152, label %151

151:                                              ; preds = %148
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %238

152:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %153 = load i32, ptr %13, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [300001 x i32], ptr @ord, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !5
  store i32 %156, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #7
  %157 = getelementptr inbounds %struct.Node, ptr %15, i32 0, i32 0
  %158 = load i32, ptr @a, align 16, !tbaa !5
  store i32 %158, ptr %157, align 4, !tbaa !18
  %159 = getelementptr inbounds %struct.Node, ptr %15, i32 0, i32 1
  store i32 0, ptr %159, align 4, !tbaa !20
  %160 = getelementptr inbounds %struct.Node, ptr %15, i32 0, i32 2
  store i32 0, ptr %160, align 4, !tbaa !21
  %161 = load i32, ptr %14, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [300001 x %struct.Node], ptr getelementptr inbounds ([2 x [300001 x %struct.Node]], ptr @f, i64 0, i64 1), i64 0, i64 %162
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %163, ptr align 4 %15, i64 12, i1 false), !tbaa.struct !22
  %164 = load i32, ptr %14, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %165
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %166, ptr align 4 %163, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %167 = load i32, ptr %14, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [300001 x i32], ptr @lnk, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  store i32 %170, ptr %16, align 4, !tbaa !5
  br label %171

171:                                              ; preds = %228, %152
  %172 = load i32, ptr %16, align 4, !tbaa !5
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %175, label %174

174:                                              ; preds = %171
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %234

175:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %176 = load i32, ptr %16, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %177
  %179 = getelementptr inbounds %struct.Edge, ptr %178, i32 0, i32 1
  %180 = load i32, ptr %179, align 4, !tbaa !13
  store i32 %180, ptr %17, align 4, !tbaa !5
  %181 = load i32, ptr %17, align 4, !tbaa !5
  %182 = load i32, ptr %14, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [300001 x i32], ptr @fa, i64 0, i64 %183
  %185 = load i32, ptr %184, align 4, !tbaa !5
  %186 = icmp eq i32 %181, %185
  br i1 %186, label %187, label %188

187:                                              ; preds = %175
  store i32 19, ptr %10, align 4
  br label %225

188:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #7
  %189 = load i32, ptr %17, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %190
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #7
  %192 = getelementptr inbounds %struct.Node, ptr %19, i32 0, i32 0
  %193 = load i32, ptr %17, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [300001 x i32], ptr @a, i64 0, i64 %194
  %196 = load i32, ptr %195, align 4, !tbaa !5
  store i32 %196, ptr %192, align 4, !tbaa !18
  %197 = getelementptr inbounds %struct.Node, ptr %19, i32 0, i32 1
  %198 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %198, ptr %197, align 4, !tbaa !20
  %199 = getelementptr inbounds %struct.Node, ptr %19, i32 0, i32 2
  %200 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %200, ptr %199, align 4, !tbaa !21
  %201 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZSt3maxI4NodeERKT_S3_S3_(ptr noundef nonnull align 4 dereferenceable(12) %191, ptr noundef nonnull align 4 dereferenceable(12) %19)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %201, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #7
  %202 = getelementptr inbounds %struct.Node, ptr %18, i32 0, i32 0
  %203 = load i32, ptr %202, align 4, !tbaa !18
  %204 = add nsw i32 %203, -1
  store i32 %204, ptr %202, align 4, !tbaa !18
  %205 = load i32, ptr %17, align 4, !tbaa !5
  %206 = getelementptr inbounds %struct.Node, ptr %18, i32 0, i32 1
  store i32 %205, ptr %206, align 4, !tbaa !20
  %207 = load i32, ptr %14, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %208
  %210 = call noundef zeroext i1 @_ZNK4NodeltERKS_(ptr noundef nonnull align 4 dereferenceable(12) %209, ptr noundef nonnull align 4 dereferenceable(12) %18)
  br i1 %210, label %211, label %215

211:                                              ; preds = %188
  %212 = load i32, ptr %14, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %213
  call void @_ZSt4swapI4NodeENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(12) %214, ptr noundef nonnull align 4 dereferenceable(12) %18) #7
  br label %215

215:                                              ; preds = %211, %188
  %216 = load i32, ptr %14, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [300001 x %struct.Node], ptr getelementptr inbounds ([2 x [300001 x %struct.Node]], ptr @f, i64 0, i64 1), i64 0, i64 %217
  %219 = call noundef zeroext i1 @_ZNK4NodeltERKS_(ptr noundef nonnull align 4 dereferenceable(12) %218, ptr noundef nonnull align 4 dereferenceable(12) %18)
  br i1 %219, label %220, label %224

220:                                              ; preds = %215
  %221 = load i32, ptr %14, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [300001 x %struct.Node], ptr getelementptr inbounds ([2 x [300001 x %struct.Node]], ptr @f, i64 0, i64 1), i64 0, i64 %222
  call void @_ZSt4swapI4NodeENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(12) %223, ptr noundef nonnull align 4 dereferenceable(12) %18) #7
  br label %224

224:                                              ; preds = %220, %215
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #7
  store i32 0, ptr %10, align 4
  br label %225

225:                                              ; preds = %224, %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  %226 = load i32, ptr %10, align 4
  switch i32 %226, label %403 [
    i32 0, label %227
    i32 19, label %228
  ]

227:                                              ; preds = %225
  br label %228

228:                                              ; preds = %227, %225
  %229 = load i32, ptr %16, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %230
  %232 = getelementptr inbounds %struct.Edge, ptr %231, i32 0, i32 0
  %233 = load i32, ptr %232, align 8, !tbaa !11
  store i32 %233, ptr %16, align 4, !tbaa !5
  br label %171, !llvm.loop !23

234:                                              ; preds = %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %235

235:                                              ; preds = %234
  %236 = load i32, ptr %13, align 4, !tbaa !5
  %237 = add nsw i32 %236, -1
  store i32 %237, ptr %13, align 4, !tbaa !5
  br label %148, !llvm.loop !24

238:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 1, ptr %20, align 4, !tbaa !5
  br label %239

239:                                              ; preds = %331, %238
  %240 = load i32, ptr %20, align 4, !tbaa !5
  %241 = load i32, ptr @n, align 4, !tbaa !5
  %242 = icmp sle i32 %240, %241
  br i1 %242, label %244, label %243

243:                                              ; preds = %239
  store i32 20, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %334

244:                                              ; preds = %239
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %245 = load i32, ptr %20, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [300001 x i32], ptr @ord, i64 0, i64 %246
  %248 = load i32, ptr %247, align 4, !tbaa !5
  store i32 %248, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %249 = load i32, ptr %21, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [300001 x i32], ptr @lnk, i64 0, i64 %250
  %252 = load i32, ptr %251, align 4, !tbaa !5
  store i32 %252, ptr %22, align 4, !tbaa !5
  br label %253

253:                                              ; preds = %324, %244
  %254 = load i32, ptr %22, align 4, !tbaa !5
  %255 = icmp ne i32 %254, 0
  br i1 %255, label %257, label %256

256:                                              ; preds = %253
  store i32 23, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %330

257:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %258 = load i32, ptr %22, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %259
  %261 = getelementptr inbounds %struct.Edge, ptr %260, i32 0, i32 1
  %262 = load i32, ptr %261, align 4, !tbaa !13
  store i32 %262, ptr %23, align 4, !tbaa !5
  %263 = load i32, ptr %23, align 4, !tbaa !5
  %264 = load i32, ptr %21, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [300001 x i32], ptr @fa, i64 0, i64 %265
  %267 = load i32, ptr %266, align 4, !tbaa !5
  %268 = icmp eq i32 %263, %267
  br i1 %268, label %269, label %270

269:                                              ; preds = %257
  store i32 25, ptr %10, align 4
  br label %321

270:                                              ; preds = %257
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #7
  %271 = load i32, ptr %21, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %272
  %274 = getelementptr inbounds %struct.Node, ptr %273, i32 0, i32 1
  %275 = load i32, ptr %274, align 4, !tbaa !20
  %276 = load i32, ptr %23, align 4, !tbaa !5
  %277 = icmp eq i32 %275, %276
  br i1 %277, label %278, label %282

278:                                              ; preds = %270
  %279 = load i32, ptr %21, align 4, !tbaa !5
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [300001 x %struct.Node], ptr getelementptr inbounds ([2 x [300001 x %struct.Node]], ptr @f, i64 0, i64 1), i64 0, i64 %280
  br label %286

282:                                              ; preds = %270
  %283 = load i32, ptr %21, align 4, !tbaa !5
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %284
  br label %286

286:                                              ; preds = %282, %278
  %287 = phi ptr [ %281, %278 ], [ %285, %282 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #7
  %288 = getelementptr inbounds %struct.Node, ptr %25, i32 0, i32 0
  %289 = load i32, ptr %21, align 4, !tbaa !5
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [300001 x i32], ptr @a, i64 0, i64 %290
  %292 = load i32, ptr %291, align 4, !tbaa !5
  store i32 %292, ptr %288, align 4, !tbaa !18
  %293 = getelementptr inbounds %struct.Node, ptr %25, i32 0, i32 1
  %294 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %294, ptr %293, align 4, !tbaa !20
  %295 = getelementptr inbounds %struct.Node, ptr %25, i32 0, i32 2
  %296 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %296, ptr %295, align 4, !tbaa !21
  %297 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZSt3maxI4NodeERKT_S3_S3_(ptr noundef nonnull align 4 dereferenceable(12) %287, ptr noundef nonnull align 4 dereferenceable(12) %25)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %297, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #7
  %298 = getelementptr inbounds %struct.Node, ptr %24, i32 0, i32 0
  %299 = load i32, ptr %298, align 4, !tbaa !18
  %300 = add nsw i32 %299, -1
  store i32 %300, ptr %298, align 4, !tbaa !18
  %301 = load i32, ptr %21, align 4, !tbaa !5
  %302 = getelementptr inbounds %struct.Node, ptr %24, i32 0, i32 1
  store i32 %301, ptr %302, align 4, !tbaa !20
  %303 = load i32, ptr %23, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %304
  %306 = call noundef zeroext i1 @_ZNK4NodeltERKS_(ptr noundef nonnull align 4 dereferenceable(12) %305, ptr noundef nonnull align 4 dereferenceable(12) %24)
  br i1 %306, label %307, label %311

307:                                              ; preds = %286
  %308 = load i32, ptr %23, align 4, !tbaa !5
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %309
  call void @_ZSt4swapI4NodeENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(12) %310, ptr noundef nonnull align 4 dereferenceable(12) %24) #7
  br label %311

311:                                              ; preds = %307, %286
  %312 = load i32, ptr %23, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [300001 x %struct.Node], ptr getelementptr inbounds ([2 x [300001 x %struct.Node]], ptr @f, i64 0, i64 1), i64 0, i64 %313
  %315 = call noundef zeroext i1 @_ZNK4NodeltERKS_(ptr noundef nonnull align 4 dereferenceable(12) %314, ptr noundef nonnull align 4 dereferenceable(12) %24)
  br i1 %315, label %316, label %320

316:                                              ; preds = %311
  %317 = load i32, ptr %23, align 4, !tbaa !5
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds [300001 x %struct.Node], ptr getelementptr inbounds ([2 x [300001 x %struct.Node]], ptr @f, i64 0, i64 1), i64 0, i64 %318
  call void @_ZSt4swapI4NodeENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(12) %319, ptr noundef nonnull align 4 dereferenceable(12) %24) #7
  br label %320

320:                                              ; preds = %316, %311
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #7
  store i32 0, ptr %10, align 4
  br label %321

321:                                              ; preds = %320, %269
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  %322 = load i32, ptr %10, align 4
  switch i32 %322, label %403 [
    i32 0, label %323
    i32 25, label %324
  ]

323:                                              ; preds = %321
  br label %324

324:                                              ; preds = %323, %321
  %325 = load i32, ptr %22, align 4, !tbaa !5
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %326
  %328 = getelementptr inbounds %struct.Edge, ptr %327, i32 0, i32 0
  %329 = load i32, ptr %328, align 8, !tbaa !11
  store i32 %329, ptr %22, align 4, !tbaa !5
  br label %253, !llvm.loop !25

330:                                              ; preds = %256
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %331

331:                                              ; preds = %330
  %332 = load i32, ptr %20, align 4, !tbaa !5
  %333 = add nsw i32 %332, 1
  store i32 %333, ptr %20, align 4, !tbaa !5
  br label %239, !llvm.loop !26

334:                                              ; preds = %243
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 1, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %335 = load i32, ptr getelementptr inbounds (%struct.Node, ptr getelementptr inbounds ([300001 x %struct.Node], ptr @f, i64 0, i64 1), i32 0, i32 2), align 4, !tbaa !21
  store i32 %335, ptr %27, align 4, !tbaa !5
  br label %336

336:                                              ; preds = %393, %334
  %337 = load i32, ptr %26, align 4, !tbaa !5
  %338 = load i32, ptr @n, align 4, !tbaa !5
  %339 = icmp sle i32 %337, %338
  br i1 %339, label %341, label %340

340:                                              ; preds = %336
  store i32 26, ptr %10, align 4
  br label %401

341:                                              ; preds = %336
  %342 = load i32, ptr %26, align 4, !tbaa !5
  %343 = sext i32 %342 to i64
  %344 = load i64, ptr @m, align 8, !tbaa !27
  %345 = icmp eq i64 %343, %344
  br i1 %345, label %346, label %349

346:                                              ; preds = %341
  %347 = load i32, ptr %27, align 4, !tbaa !5
  %348 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %347)
  store i32 26, ptr %10, align 4
  br label %401

349:                                              ; preds = %341
  %350 = load i32, ptr %27, align 4, !tbaa !5
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds [300001 x i32], ptr @idx, i64 0, i64 %351
  %353 = load i32, ptr %352, align 4, !tbaa !5
  %354 = icmp ne i32 %353, 0
  br i1 %354, label %355, label %388

355:                                              ; preds = %349
  %356 = load i64, ptr @m, align 8, !tbaa !27
  %357 = load i32, ptr %26, align 4, !tbaa !5
  %358 = sext i32 %357 to i64
  %359 = sub nsw i64 %356, %358
  %360 = load i32, ptr %26, align 4, !tbaa !5
  %361 = load i32, ptr %27, align 4, !tbaa !5
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds [300001 x i32], ptr @idx, i64 0, i64 %362
  %364 = load i32, ptr %363, align 4, !tbaa !5
  %365 = sub nsw i32 %360, %364
  %366 = sext i32 %365 to i64
  %367 = srem i64 %359, %366
  %368 = load i32, ptr %26, align 4, !tbaa !5
  %369 = sext i32 %368 to i64
  %370 = add nsw i64 %367, %369
  store i64 %370, ptr @m, align 8, !tbaa !27
  br label %371

371:                                              ; preds = %377, %355
  %372 = load i32, ptr %26, align 4, !tbaa !5
  %373 = sext i32 %372 to i64
  %374 = load i64, ptr @m, align 8, !tbaa !27
  %375 = icmp slt i64 %373, %374
  br i1 %375, label %376, label %385

376:                                              ; preds = %371
  br label %377

377:                                              ; preds = %376
  %378 = load i32, ptr %26, align 4, !tbaa !5
  %379 = add nsw i32 %378, 1
  store i32 %379, ptr %26, align 4, !tbaa !5
  %380 = load i32, ptr %27, align 4, !tbaa !5
  %381 = sext i32 %380 to i64
  %382 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %381
  %383 = getelementptr inbounds %struct.Node, ptr %382, i32 0, i32 2
  %384 = load i32, ptr %383, align 4, !tbaa !21
  store i32 %384, ptr %27, align 4, !tbaa !5
  br label %371, !llvm.loop !29

385:                                              ; preds = %371
  %386 = load i32, ptr %27, align 4, !tbaa !5
  %387 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %386)
  store i32 26, ptr %10, align 4
  br label %401

388:                                              ; preds = %349
  %389 = load i32, ptr %26, align 4, !tbaa !5
  %390 = load i32, ptr %27, align 4, !tbaa !5
  %391 = sext i32 %390 to i64
  %392 = getelementptr inbounds [300001 x i32], ptr @idx, i64 0, i64 %391
  store i32 %389, ptr %392, align 4, !tbaa !5
  br label %393

393:                                              ; preds = %388
  %394 = load i32, ptr %26, align 4, !tbaa !5
  %395 = add nsw i32 %394, 1
  store i32 %395, ptr %26, align 4, !tbaa !5
  %396 = load i32, ptr %27, align 4, !tbaa !5
  %397 = sext i32 %396 to i64
  %398 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %397
  %399 = getelementptr inbounds %struct.Node, ptr %398, i32 0, i32 2
  %400 = load i32, ptr %399, align 4, !tbaa !21
  store i32 %400, ptr %27, align 4, !tbaa !5
  br label %336, !llvm.loop !30

401:                                              ; preds = %385, %346, %340
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %402

402:                                              ; preds = %401
  ret i32 0

403:                                              ; preds = %321, %225
  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: 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) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4NodeltERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapI4NodeENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #6

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { 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 #7 = { 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 = !{!12, !6, i64 0}
!12 = !{!"_ZTS4Edge", !6, i64 0, !6, i64 4}
!13 = !{!12, !6, i64 4}
!14 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4, !6, i64 8}
!20 = !{!19, !6, i64 4}
!21 = !{!19, !6, i64 8}
!22 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = !{!28, !28, i64 0}
!28 = !{!"long long", !7, i64 0}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !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"

%struct.Edge = type { i32, i32 }
%struct.Node = type { i32, i32, i32 }

@n = external dso_local global i32, align 4
@a = external dso_local global [300001 x i32], align 16
@lnk = external dso_local local_unnamed_addr global [300001 x i32], align 16
@fa = external dso_local local_unnamed_addr global [300001 x i32], align 16
@ord = external dso_local local_unnamed_addr global [300001 x i32], align 16
@idx = external dso_local local_unnamed_addr global [300001 x i32], align 16
@m = external dso_local global i64, align 8
@e = external dso_local local_unnamed_addr global [600003 x %struct.Edge], align 16
@f = external dso_local global [2 x [300001 x %struct.Node]], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %struct.Node, align 4
  %4 = alloca %struct.Node, align 4
  %5 = alloca %struct.Node, align 4
  %6 = alloca %struct.Node, align 4
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %.not120 = icmp slt i32 %8, 1
  br i1 %.not120, label %._crit_edge, label %.lr.ph

.preheader110:                                    ; preds = %.lr.ph
  %9 = icmp sgt i32 %12, 1
  br i1 %9, label %.lr.ph123, label %._crit_edge

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

._crit_edge:                                      ; preds = %.lr.ph123, %0, %.preheader110
  %.lcssa119 = phi i32 [ %12, %.preheader110 ], [ %8, %0 ], [ %31, %.lr.ph123 ]
  store i32 1, ptr getelementptr inbounds (i8, ptr @ord, i64 4), align 4, !tbaa !5
  br label %40

.lr.ph123:                                        ; preds = %.preheader110, %.lr.ph123
  %indvars.iv177 = phi i64 [ %indvars.iv.next178, %.lr.ph123 ], [ 1, %.preheader110 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [300001 x i32], ptr @lnk, i64 0, i64 %16
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = shl nuw i64 %indvars.iv177, 1
  %21 = trunc nuw i64 %20 to i32
  %sext = shl i64 %indvars.iv177, 33
  %22 = ashr exact i64 %sext, 32
  %23 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %22
  store i32 %18, ptr %23, align 16, !tbaa !5
  %.sroa.473.0..sroa_idx = getelementptr inbounds i8, ptr %23, i64 4
  store i32 %19, ptr %.sroa.473.0..sroa_idx, align 4, !tbaa !5
  store i32 %21, ptr %17, align 4, !tbaa !5
  %24 = sext i32 %19 to i64
  %25 = getelementptr inbounds [300001 x i32], ptr @lnk, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = trunc i64 %20 to i32
  %28 = or disjoint i32 %27, 1
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %29
  store i32 %26, ptr %30, align 8, !tbaa !5
  %.sroa.471.0..sroa_idx = getelementptr inbounds i8, ptr %30, i64 4
  store i32 %15, ptr %.sroa.471.0..sroa_idx, align 4, !tbaa !5
  store i32 %28, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %indvars.iv.next178 = add nuw nsw i64 %indvars.iv177, 1
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next178, %32
  br i1 %33, label %.lr.ph123, label %._crit_edge, !llvm.loop !11

34:                                               ; preds = %._crit_edge130
  store i32 -300001, ptr @a, align 16, !tbaa !5
  %35 = icmp sgt i32 %.lcssa119, 0
  br i1 %35, label %.lr.ph142, label %.loopexit

.lr.ph142:                                        ; preds = %34
  %36 = getelementptr inbounds i8, ptr %4, i64 4
  %37 = getelementptr inbounds i8, ptr %4, i64 8
  %38 = getelementptr inbounds i8, ptr %3, i64 4
  %39 = zext nneg i32 %.lcssa119 to i64
  br label %63

40:                                               ; preds = %._crit_edge, %._crit_edge130
  %indvars.iv180 = phi i64 [ 1, %._crit_edge ], [ %indvars.iv.next181, %._crit_edge130 ]
  %.091132 = phi i32 [ 1, %._crit_edge ], [ %.192.lcssa, %._crit_edge130 ]
  %41 = getelementptr inbounds [300001 x i32], ptr @ord, i64 0, i64 %indvars.iv180
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [300001 x i32], ptr @lnk, i64 0, i64 %43
  %.093124 = load i32, ptr %44, align 4, !tbaa !5
  %.not107125 = icmp eq i32 %.093124, 0
  br i1 %.not107125, label %._crit_edge130, label %.lr.ph129

.lr.ph129:                                        ; preds = %40
  %45 = getelementptr inbounds [300001 x i32], ptr @fa, i64 0, i64 %43
  br label %47

._crit_edge130:                                   ; preds = %59, %40
  %.192.lcssa = phi i32 [ %.091132, %40 ], [ %.2, %59 ]
  %indvars.iv.next181 = add nuw nsw i64 %indvars.iv180, 1
  %46 = sext i32 %.192.lcssa to i64
  %.not101.not = icmp slt i64 %indvars.iv180, %46
  br i1 %.not101.not, label %40, label %34, !llvm.loop !12

47:                                               ; preds = %.lr.ph129, %59
  %.093127 = phi i32 [ %.093124, %.lr.ph129 ], [ %.093, %59 ]
  %.192126 = phi i32 [ %.091132, %.lr.ph129 ], [ %.2, %59 ]
  %48 = sext i32 %.093127 to i64
  %49 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %48
  %50 = getelementptr inbounds i8, ptr %49, i64 4
  %51 = load i32, ptr %50, align 4, !tbaa !13
  %52 = load i32, ptr %45, align 4, !tbaa !5
  %.not108 = icmp eq i32 %51, %52
  br i1 %.not108, label %59, label %53

53:                                               ; preds = %47
  %54 = sext i32 %51 to i64
  %55 = getelementptr inbounds [300001 x i32], ptr @fa, i64 0, i64 %54
  store i32 %42, ptr %55, align 4, !tbaa !5
  %56 = add nsw i32 %.192126, 1
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [300001 x i32], ptr @ord, i64 0, i64 %57
  store i32 %51, ptr %58, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %47, %53
  %.2 = phi i32 [ %56, %53 ], [ %.192126, %47 ]
  %.093 = load i32, ptr %49, align 8, !tbaa !5
  %.not107 = icmp eq i32 %.093, 0
  br i1 %.not107, label %._crit_edge130, label %47, !llvm.loop !15

.preheader109:                                    ; preds = %._crit_edge139
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  %.not102149 = icmp slt i32 %.pre, 1
  br i1 %.not102149, label %.loopexit, label %.lr.ph151

.lr.ph151:                                        ; preds = %.preheader109
  %60 = getelementptr inbounds i8, ptr %6, i64 4
  %61 = getelementptr inbounds i8, ptr %6, i64 8
  %62 = getelementptr inbounds i8, ptr %5, i64 4
  br label %97

63:                                               ; preds = %.lr.ph142, %._crit_edge139
  %indvars.iv183 = phi i64 [ %39, %.lr.ph142 ], [ %indvars.iv.next184, %._crit_edge139 ]
  %64 = getelementptr inbounds [300001 x i32], ptr @ord, i64 0, i64 %indvars.iv183
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = load i32, ptr @a, align 16, !tbaa !5
  %67 = sext i32 %65 to i64
  %68 = getelementptr inbounds [300001 x %struct.Node], ptr getelementptr inbounds (i8, ptr @f, i64 3600012), i64 0, i64 %67
  store i32 %66, ptr %68, align 4, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %68, i64 4
  store i32 0, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !5
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %68, i64 8
  store i32 0, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !5
  %69 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %67
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %69, ptr noundef nonnull align 4 dereferenceable(12) %68, i64 12, i1 false), !tbaa.struct !16
  %70 = getelementptr inbounds [300001 x i32], ptr @lnk, i64 0, i64 %67
  %.090134 = load i32, ptr %70, align 4, !tbaa !5
  %.not106135 = icmp eq i32 %.090134, 0
  br i1 %.not106135, label %._crit_edge139, label %.lr.ph138

.lr.ph138:                                        ; preds = %63
  %71 = getelementptr inbounds [300001 x i32], ptr @fa, i64 0, i64 %67
  br label %73

._crit_edge139:                                   ; preds = %94, %63
  %indvars.iv.next184 = add nsw i64 %indvars.iv183, -1
  %72 = icmp sgt i64 %indvars.iv183, 1
  br i1 %72, label %63, label %.preheader109, !llvm.loop !17

73:                                               ; preds = %.lr.ph138, %94
  %.090136 = phi i32 [ %.090134, %.lr.ph138 ], [ %.090, %94 ]
  %74 = sext i32 %.090136 to i64
  %75 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %74
  %76 = getelementptr inbounds i8, ptr %75, i64 4
  %77 = load i32, ptr %76, align 4, !tbaa !13
  %78 = load i32, ptr %71, align 4, !tbaa !5
  %79 = icmp eq i32 %77, %78
  br i1 %79, label %94, label %80

80:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #7
  %81 = sext i32 %77 to i64
  %82 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %81
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #7
  %83 = getelementptr inbounds [300001 x i32], ptr @a, i64 0, i64 %81
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr %4, align 4, !tbaa !18
  store i32 %77, ptr %36, align 4, !tbaa !20
  store i32 %77, ptr %37, align 4, !tbaa !21
  %85 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZSt3maxI4NodeERKT_S3_S3_(ptr noundef nonnull align 4 dereferenceable(12) %82, ptr noundef nonnull align 4 dereferenceable(12) %4)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %85, i64 12, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #7
  %86 = load i32, ptr %3, align 4, !tbaa !18
  %87 = add nsw i32 %86, -1
  store i32 %87, ptr %3, align 4, !tbaa !18
  store i32 %77, ptr %38, align 4, !tbaa !20
  %88 = call noundef zeroext i1 @_ZNK4NodeltERKS_(ptr noundef nonnull align 4 dereferenceable(12) %69, ptr noundef nonnull align 4 dereferenceable(12) %3)
  br i1 %88, label %89, label %90

89:                                               ; preds = %80
  call void @_ZSt4swapI4NodeENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(12) %69, ptr noundef nonnull align 4 dereferenceable(12) %3) #7
  br label %90

90:                                               ; preds = %89, %80
  %91 = call noundef zeroext i1 @_ZNK4NodeltERKS_(ptr noundef nonnull align 4 dereferenceable(12) %68, ptr noundef nonnull align 4 dereferenceable(12) %3)
  br i1 %91, label %92, label %93

92:                                               ; preds = %90
  call void @_ZSt4swapI4NodeENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(12) %68, ptr noundef nonnull align 4 dereferenceable(12) %3) #7
  br label %93

93:                                               ; preds = %92, %90
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #7
  br label %94

94:                                               ; preds = %73, %93
  %.090 = load i32, ptr %75, align 8, !tbaa !5
  %.not106 = icmp eq i32 %.090, 0
  br i1 %.not106, label %._crit_edge139, label %73, !llvm.loop !22

.preheader:                                       ; preds = %._crit_edge148
  %.not103154 = icmp slt i32 %108, 1
  br i1 %.not103154, label %.loopexit, label %.lr.ph157

.lr.ph157:                                        ; preds = %.preheader
  %95 = load i64, ptr @m, align 8, !tbaa !23
  %96 = add nuw i32 %108, 1
  %wide.trip.count = zext i32 %96 to i64
  br label %135

97:                                               ; preds = %.lr.ph151, %._crit_edge148
  %98 = phi i32 [ %.pre, %.lr.ph151 ], [ %108, %._crit_edge148 ]
  %indvars.iv186 = phi i64 [ 1, %.lr.ph151 ], [ %indvars.iv.next187, %._crit_edge148 ]
  %99 = getelementptr inbounds [300001 x i32], ptr @ord, i64 0, i64 %indvars.iv186
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [300001 x i32], ptr @lnk, i64 0, i64 %101
  %.086143 = load i32, ptr %102, align 4, !tbaa !5
  %.not105144 = icmp eq i32 %.086143, 0
  br i1 %.not105144, label %._crit_edge148, label %.lr.ph147

.lr.ph147:                                        ; preds = %97
  %103 = getelementptr inbounds [300001 x i32], ptr @fa, i64 0, i64 %101
  %104 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %101
  %105 = getelementptr inbounds i8, ptr %104, i64 4
  %106 = getelementptr inbounds [300001 x %struct.Node], ptr getelementptr inbounds (i8, ptr @f, i64 3600012), i64 0, i64 %101
  %107 = getelementptr inbounds [300001 x i32], ptr @a, i64 0, i64 %101
  br label %110

._crit_edge148.loopexit:                          ; preds = %134
  %.pre198 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge148

._crit_edge148:                                   ; preds = %._crit_edge148.loopexit, %97
  %108 = phi i32 [ %.pre198, %._crit_edge148.loopexit ], [ %98, %97 ]
  %indvars.iv.next187 = add nuw nsw i64 %indvars.iv186, 1
  %109 = sext i32 %108 to i64
  %.not102.not = icmp slt i64 %indvars.iv186, %109
  br i1 %.not102.not, label %97, label %.preheader, !llvm.loop !25

110:                                              ; preds = %.lr.ph147, %134
  %.086145 = phi i32 [ %.086143, %.lr.ph147 ], [ %.086, %134 ]
  %111 = sext i32 %.086145 to i64
  %112 = getelementptr inbounds [600003 x %struct.Edge], ptr @e, i64 0, i64 %111
  %113 = getelementptr inbounds i8, ptr %112, i64 4
  %114 = load i32, ptr %113, align 4, !tbaa !13
  %115 = load i32, ptr %103, align 4, !tbaa !5
  %116 = icmp eq i32 %114, %115
  br i1 %116, label %134, label %117

117:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #7
  %118 = load i32, ptr %105, align 4, !tbaa !20
  %119 = icmp eq i32 %118, %114
  %120 = select i1 %119, ptr %106, ptr %104
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %121 = load i32, ptr %107, align 4, !tbaa !5
  store i32 %121, ptr %6, align 4, !tbaa !18
  store i32 %100, ptr %60, align 4, !tbaa !20
  store i32 %100, ptr %61, align 4, !tbaa !21
  %122 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZSt3maxI4NodeERKT_S3_S3_(ptr noundef nonnull align 4 dereferenceable(12) %120, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %122, i64 12, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  %123 = load i32, ptr %5, align 4, !tbaa !18
  %124 = add nsw i32 %123, -1
  store i32 %124, ptr %5, align 4, !tbaa !18
  store i32 %100, ptr %62, align 4, !tbaa !20
  %125 = sext i32 %114 to i64
  %126 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %125
  %127 = call noundef zeroext i1 @_ZNK4NodeltERKS_(ptr noundef nonnull align 4 dereferenceable(12) %126, ptr noundef nonnull align 4 dereferenceable(12) %5)
  br i1 %127, label %128, label %129

128:                                              ; preds = %117
  call void @_ZSt4swapI4NodeENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(12) %126, ptr noundef nonnull align 4 dereferenceable(12) %5) #7
  br label %129

129:                                              ; preds = %128, %117
  %130 = getelementptr inbounds [300001 x %struct.Node], ptr getelementptr inbounds (i8, ptr @f, i64 3600012), i64 0, i64 %125
  %131 = call noundef zeroext i1 @_ZNK4NodeltERKS_(ptr noundef nonnull align 4 dereferenceable(12) %130, ptr noundef nonnull align 4 dereferenceable(12) %5)
  br i1 %131, label %132, label %133

132:                                              ; preds = %129
  call void @_ZSt4swapI4NodeENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(12) %130, ptr noundef nonnull align 4 dereferenceable(12) %5) #7
  br label %133

133:                                              ; preds = %132, %129
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  br label %134

134:                                              ; preds = %110, %133
  %.086 = load i32, ptr %112, align 8, !tbaa !5
  %.not105 = icmp eq i32 %.086, 0
  br i1 %.not105, label %._crit_edge148.loopexit, label %110, !llvm.loop !26

135:                                              ; preds = %.lr.ph157, %167
  %indvars.iv189 = phi i64 [ 1, %.lr.ph157 ], [ %indvars.iv.next190, %167 ]
  %.0156.in = phi ptr [ getelementptr inbounds (i8, ptr @f, i64 20), %.lr.ph157 ], [ %168, %167 ]
  %.0156 = load i32, ptr %.0156.in, align 4, !tbaa !21
  %136 = icmp eq i64 %95, %indvars.iv189
  br i1 %136, label %.loopexit.sink.split, label %137

137:                                              ; preds = %135
  %138 = sext i32 %.0156 to i64
  %139 = getelementptr inbounds [300001 x i32], ptr @idx, i64 0, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %.not104 = icmp eq i32 %140, 0
  %141 = trunc nuw nsw i64 %indvars.iv189 to i32
  br i1 %.not104, label %167, label %142

142:                                              ; preds = %137
  %143 = sub nsw i64 %95, %indvars.iv189
  %144 = sub nsw i32 %141, %140
  %145 = sext i32 %144 to i64
  %146 = srem i64 %143, %145
  %147 = add nsw i64 %146, %indvars.iv189
  store i64 %147, ptr @m, align 8, !tbaa !23
  %148 = and i64 %indvars.iv189, 4294967295
  %149 = icmp sgt i64 %147, %148
  br i1 %149, label %.lr.ph161.preheader, label %.loopexit.sink.split

.lr.ph161.preheader:                              ; preds = %142
  %150 = add i64 %146, -1
  %xtraiter = and i64 %146, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph161.prol.loopexit, label %.lr.ph161.prol

.lr.ph161.prol:                                   ; preds = %.lr.ph161.preheader, %.lr.ph161.prol
  %indvars.iv194.prol = phi i64 [ %indvars.iv.next195.prol, %.lr.ph161.prol ], [ %indvars.iv189, %.lr.ph161.preheader ]
  %.1159.prol = phi i32 [ %153, %.lr.ph161.prol ], [ %.0156, %.lr.ph161.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph161.prol ], [ 0, %.lr.ph161.preheader ]
  %indvars.iv.next195.prol = add nuw nsw i64 %indvars.iv194.prol, 1
  %151 = sext i32 %.1159.prol to i64
  %152 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %151, i32 2
  %153 = load i32, ptr %152, align 4, !tbaa !21
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph161.prol.loopexit, label %.lr.ph161.prol, !llvm.loop !27

.lr.ph161.prol.loopexit:                          ; preds = %.lr.ph161.prol, %.lr.ph161.preheader
  %.lcssa.unr = phi i32 [ poison, %.lr.ph161.preheader ], [ %153, %.lr.ph161.prol ]
  %indvars.iv194.unr = phi i64 [ %indvars.iv189, %.lr.ph161.preheader ], [ %indvars.iv.next195.prol, %.lr.ph161.prol ]
  %.1159.unr = phi i32 [ %.0156, %.lr.ph161.preheader ], [ %153, %.lr.ph161.prol ]
  %154 = icmp ult i64 %150, 3
  br i1 %154, label %.loopexit.sink.split, label %.lr.ph161

.lr.ph161:                                        ; preds = %.lr.ph161.prol.loopexit, %.lr.ph161
  %indvars.iv194 = phi i64 [ %indvars.iv.next195.3, %.lr.ph161 ], [ %indvars.iv194.unr, %.lr.ph161.prol.loopexit ]
  %.1159 = phi i32 [ %166, %.lr.ph161 ], [ %.1159.unr, %.lr.ph161.prol.loopexit ]
  %155 = sext i32 %.1159 to i64
  %156 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %155, i32 2
  %157 = load i32, ptr %156, align 4, !tbaa !21
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %158, i32 2
  %160 = load i32, ptr %159, align 4, !tbaa !21
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %161, i32 2
  %163 = load i32, ptr %162, align 4, !tbaa !21
  %indvars.iv.next195.3 = add nuw nsw i64 %indvars.iv194, 4
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %164, i32 2
  %166 = load i32, ptr %165, align 4, !tbaa !21
  %exitcond197.not.3 = icmp eq i64 %indvars.iv.next195.3, %147
  br i1 %exitcond197.not.3, label %.loopexit.sink.split, label %.lr.ph161, !llvm.loop !29

167:                                              ; preds = %137
  store i32 %141, ptr %139, align 4, !tbaa !5
  %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1
  %168 = getelementptr inbounds [300001 x %struct.Node], ptr @f, i64 0, i64 %138, i32 2
  %exitcond.not = icmp eq i64 %indvars.iv.next190, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %135, !llvm.loop !30

.loopexit.sink.split:                             ; preds = %135, %.lr.ph161.prol.loopexit, %.lr.ph161, %142
  %.1.lcssa.sink = phi i32 [ %.0156, %142 ], [ %.lcssa.unr, %.lr.ph161.prol.loopexit ], [ %166, %.lr.ph161 ], [ %.0156, %135 ]
  %169 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %.1.lcssa.sink)
  br label %.loopexit

.loopexit:                                        ; preds = %167, %.loopexit.sink.split, %34, %.preheader109, %.preheader
  ret i32 0
}

; 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 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) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4NodeltERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapI4NodeENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #6

; 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { 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 #7 = { 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 = distinct !{!12, !10}
!13 = !{!14, !6, i64 4}
!14 = !{!"_ZTS4Edge", !6, i64 0, !6, i64 4}
!15 = distinct !{!15, !10}
!16 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!17 = distinct !{!17, !10}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4, !6, i64 8}
!20 = !{!19, !6, i64 4}
!21 = !{!19, !6, i64 8}
!22 = distinct !{!22, !10}
!23 = !{!24, !24, i64 0}
!24 = !{!"long long", !7, i64 0}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.unroll.disable"}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10}


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