; LLVM IR from tangjz/acm-icpc :: codeforces/complete (1033E)

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

@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@n = external dso_local global i32, align 4
@col = external dso_local global [601 x i32], align 16
@seq = external dso_local global [3 x [601 x i32]], align 16
@_ZZ4mainE3rem = external hidden global [601 x i32], align 16
@_ZZ4mainE3dep = external hidden global [601 x i32], align 16
@_ZZ4mainE3que = external hidden global [601 x i32], align 16
@_ZZ4mainE3pre = external hidden global [601 x i32], align 16
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5checkiPiiS_(i32 noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z7getNodeiPiiS_(i32 noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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 i32, align 4
  %7 = alloca i32, 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 i32, align 4
  %16 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef @n)
  store i32 1, ptr getelementptr inbounds ([601 x i32], ptr @col, i64 0, i64 1), align 4, !tbaa !5
  %18 = load i32, ptr @seq, align 16, !tbaa !5
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr @seq, align 16, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [601 x i32], ptr @seq, i64 0, i64 %20
  store i32 1, ptr %21, align 4, !tbaa !5
  %22 = load i32, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 1), align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 1), align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [601 x i32], ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 1), i64 0, i64 %24
  store i32 1, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %269, %0
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = icmp sle i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 2, ptr %3, align 4
  br label %272

31:                                               ; preds = %26
  store i32 0, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %50, %31
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = icmp sle i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %53

37:                                               ; preds = %32
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %49, label %43

43:                                               ; preds = %37
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3rem, i64 0, i64 %47
  store i32 %44, ptr %48, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %43, %37
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %4, align 4, !tbaa !5
  br label %32, !llvm.loop !9

53:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %54 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %55 = load i32, ptr @seq, align 16, !tbaa !5
  %56 = call noundef i32 @_Z7getNodeiPiiS_(i32 noundef %54, ptr noundef getelementptr inbounds (i32, ptr @_ZZ4mainE3rem, i64 1), i32 noundef %55, ptr noundef getelementptr inbounds (i32, ptr @seq, i64 1))
  store i32 %56, ptr %5, align 4, !tbaa !5
  %57 = load i32, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 1), align 4, !tbaa !5
  %58 = call noundef zeroext i1 @_Z5checkiPiiS_(i32 noundef 1, ptr noundef %5, i32 noundef %57, ptr noundef getelementptr inbounds (i32, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 1), i64 1))
  br i1 %58, label %68, label %59

59:                                               ; preds = %53
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %61
  store i32 1, ptr %62, align 4, !tbaa !5
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = load i32, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 1), align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 1), align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [601 x i32], ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 1), i64 0, i64 %66
  store i32 %63, ptr %67, align 4, !tbaa !5
  br label %260

68:                                               ; preds = %53
  %69 = load i32, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 2), align 8, !tbaa !5
  %70 = call noundef zeroext i1 @_Z5checkiPiiS_(i32 noundef 1, ptr noundef %5, i32 noundef %69, ptr noundef getelementptr inbounds (i32, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 2), i64 1))
  br i1 %70, label %80, label %71

71:                                               ; preds = %68
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %73
  store i32 2, ptr %74, align 4, !tbaa !5
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = load i32, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 2), align 8, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 2), align 8, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [601 x i32], ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 2), i64 0, i64 %78
  store i32 %75, ptr %79, align 4, !tbaa !5
  br label %259

80:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %81 = load i32, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 1), align 4, !tbaa !5
  %82 = call noundef i32 @_Z7getNodeiPiiS_(i32 noundef %81, ptr noundef getelementptr inbounds (i32, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 1), i64 1), i32 noundef 1, ptr noundef %5)
  store i32 %82, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %83 = load i32, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 2), align 8, !tbaa !5
  %84 = call noundef i32 @_Z7getNodeiPiiS_(i32 noundef %83, ptr noundef getelementptr inbounds (i32, ptr getelementptr inbounds ([3 x [601 x i32]], ptr @seq, i64 0, i64 2), i64 1), i32 noundef 1, ptr noundef %5)
  store i32 %84, ptr %7, align 4, !tbaa !5
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %86
  store i32 1, ptr %87, align 4, !tbaa !5
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = load i32, ptr %6, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3pre, i64 0, i64 %90
  store i32 %88, ptr %91, align 4, !tbaa !5
  store i32 0, ptr @_ZZ4mainE3que, align 16, !tbaa !5
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = load i32, ptr @_ZZ4mainE3que, align 16, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr @_ZZ4mainE3que, align 16, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3que, i64 0, i64 %95
  store i32 %92, ptr %96, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %230, %80
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = load i32, ptr @_ZZ4mainE3que, align 16, !tbaa !5
  %100 = icmp sle i32 %98, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %97
  store i32 8, ptr %3, align 4
  br label %233

102:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3que, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !5
  store i32 %106, ptr %9, align 4, !tbaa !5
  store i32 0, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %141, %102
  %108 = load i32, ptr %10, align 4, !tbaa !5
  %109 = load i32, ptr @n, align 4, !tbaa !5
  %110 = icmp sle i32 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %144

112:                                              ; preds = %107
  %113 = load i32, ptr %10, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = icmp sgt i32 %116, 0
  br i1 %117, label %118, label %140

118:                                              ; preds = %112
  %119 = load i32, ptr %9, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = load i32, ptr %10, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = icmp ne i32 %122, %126
  br i1 %127, label %128, label %140

128:                                              ; preds = %118
  %129 = load i32, ptr %10, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %140, label %134

134:                                              ; preds = %128
  %135 = load i32, ptr %10, align 4, !tbaa !5
  %136 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3rem, i64 0, i64 %138
  store i32 %135, ptr %139, align 4, !tbaa !5
  br label %140

140:                                              ; preds = %134, %128, %118, %112
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %10, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %10, align 4, !tbaa !5
  br label %107, !llvm.loop !11

144:                                              ; preds = %111
  br label %145

145:                                              ; preds = %218, %144
  %146 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %151

148:                                              ; preds = %145
  %149 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %150 = call noundef zeroext i1 @_Z5checkiPiiS_(i32 noundef %149, ptr noundef getelementptr inbounds (i32, ptr @_ZZ4mainE3rem, i64 1), i32 noundef 1, ptr noundef %9)
  br label %151

151:                                              ; preds = %148, %145
  %152 = phi i1 [ false, %145 ], [ %150, %148 ]
  br i1 %152, label %153, label %219

153:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %154 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %155 = call noundef i32 @_Z7getNodeiPiiS_(i32 noundef %154, ptr noundef getelementptr inbounds (i32, ptr @_ZZ4mainE3rem, i64 1), i32 noundef 1, ptr noundef %9)
  store i32 %155, ptr %11, align 4, !tbaa !5
  %156 = load i32, ptr %9, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %157
  %159 = load i32, ptr %158, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  %161 = load i32, ptr %11, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %162
  store i32 %160, ptr %163, align 4, !tbaa !5
  %164 = load i32, ptr %9, align 4, !tbaa !5
  %165 = load i32, ptr %11, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3pre, i64 0, i64 %166
  store i32 %164, ptr %167, align 4, !tbaa !5
  %168 = load i32, ptr %11, align 4, !tbaa !5
  %169 = load i32, ptr @_ZZ4mainE3que, align 16, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr @_ZZ4mainE3que, align 16, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3que, i64 0, i64 %171
  store i32 %168, ptr %172, align 4, !tbaa !5
  %173 = load i32, ptr %11, align 4, !tbaa !5
  %174 = load i32, ptr %7, align 4, !tbaa !5
  %175 = icmp eq i32 %173, %174
  br i1 %175, label %176, label %177

176:                                              ; preds = %153
  store i32 15, ptr %3, align 4
  br label %216

177:                                              ; preds = %153
  store i32 0, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %212, %177
  %179 = load i32, ptr %12, align 4, !tbaa !5
  %180 = load i32, ptr @n, align 4, !tbaa !5
  %181 = icmp sle i32 %179, %180
  br i1 %181, label %183, label %182

182:                                              ; preds = %178
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %215

183:                                              ; preds = %178
  %184 = load i32, ptr %12, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !5
  %188 = icmp sgt i32 %187, 0
  br i1 %188, label %189, label %211

189:                                              ; preds = %183
  %190 = load i32, ptr %9, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !5
  %194 = load i32, ptr %12, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = icmp ne i32 %193, %197
  br i1 %198, label %199, label %211

199:                                              ; preds = %189
  %200 = load i32, ptr %12, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %201
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = icmp ne i32 %203, 0
  br i1 %204, label %211, label %205

205:                                              ; preds = %199
  %206 = load i32, ptr %12, align 4, !tbaa !5
  %207 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3rem, i64 0, i64 %209
  store i32 %206, ptr %210, align 4, !tbaa !5
  br label %211

211:                                              ; preds = %205, %199, %189, %183
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %12, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %12, align 4, !tbaa !5
  br label %178, !llvm.loop !12

215:                                              ; preds = %182
  store i32 0, ptr %3, align 4
  br label %216

216:                                              ; preds = %215, %176
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  %217 = load i32, ptr %3, align 4
  switch i32 %217, label %324 [
    i32 0, label %218
    i32 15, label %219
  ]

218:                                              ; preds = %216
  br label %145, !llvm.loop !13

219:                                              ; preds = %216, %151
  %220 = load i32, ptr %7, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = icmp sgt i32 %223, 0
  br i1 %224, label %225, label %226

225:                                              ; preds = %219
  store i32 8, ptr %3, align 4
  br label %227

226:                                              ; preds = %219
  store i32 0, ptr %3, align 4
  br label %227

227:                                              ; preds = %226, %225
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %228 = load i32, ptr %3, align 4
  switch i32 %228, label %233 [
    i32 0, label %229
  ]

229:                                              ; preds = %227
  br label %230

230:                                              ; preds = %229
  %231 = load i32, ptr %8, align 4, !tbaa !5
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %8, align 4, !tbaa !5
  br label %97, !llvm.loop !14

233:                                              ; preds = %227, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %234

234:                                              ; preds = %233
  %235 = call i32 @puts(ptr noundef @.str.5)
  %236 = load i32, ptr %7, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = add nsw i32 %239, 1
  %241 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %240)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %242 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %242, ptr %13, align 4, !tbaa !5
  br label %243

243:                                              ; preds = %251, %234
  %244 = load i32, ptr %13, align 4, !tbaa !5
  %245 = load i32, ptr %5, align 4, !tbaa !5
  %246 = icmp ne i32 %244, %245
  br i1 %246, label %248, label %247

247:                                              ; preds = %243
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %256

248:                                              ; preds = %243
  %249 = load i32, ptr %13, align 4, !tbaa !5
  %250 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %249)
  br label %251

251:                                              ; preds = %248
  %252 = load i32, ptr %13, align 4, !tbaa !5
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3pre, i64 0, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !5
  store i32 %255, ptr %13, align 4, !tbaa !5
  br label %243, !llvm.loop !15

256:                                              ; preds = %247
  %257 = load i32, ptr %5, align 4, !tbaa !5
  %258 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %257)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %266

259:                                              ; preds = %71
  br label %260

260:                                              ; preds = %259, %59
  %261 = load i32, ptr %5, align 4, !tbaa !5
  %262 = load i32, ptr @seq, align 16, !tbaa !5
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr @seq, align 16, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [601 x i32], ptr @seq, i64 0, i64 %264
  store i32 %261, ptr %265, align 4, !tbaa !5
  store i32 0, ptr %3, align 4
  br label %266

266:                                              ; preds = %260, %256
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  %267 = load i32, ptr %3, align 4
  switch i32 %267, label %272 [
    i32 0, label %268
  ]

268:                                              ; preds = %266
  br label %269

269:                                              ; preds = %268
  %270 = load i32, ptr %2, align 4, !tbaa !5
  %271 = add nsw i32 %270, 1
  store i32 %271, ptr %2, align 4, !tbaa !5
  br label %26, !llvm.loop !16

272:                                              ; preds = %266, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %273 = load i32, ptr %3, align 4
  switch i32 %273, label %324 [
    i32 2, label %274
    i32 1, label %322
  ]

274:                                              ; preds = %272
  %275 = call i32 @puts(ptr noundef @.str.8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %276

276:                                              ; preds = %290, %274
  %277 = load i32, ptr %15, align 4, !tbaa !5
  %278 = load i32, ptr @n, align 4, !tbaa !5
  %279 = icmp sle i32 %277, %278
  br i1 %279, label %281, label %280

280:                                              ; preds = %276
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %293

281:                                              ; preds = %276
  %282 = load i32, ptr %15, align 4, !tbaa !5
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %283
  %285 = load i32, ptr %284, align 4, !tbaa !5
  %286 = icmp eq i32 %285, 1
  %287 = zext i1 %286 to i32
  %288 = load i32, ptr %14, align 4, !tbaa !5
  %289 = add nsw i32 %288, %287
  store i32 %289, ptr %14, align 4, !tbaa !5
  br label %290

290:                                              ; preds = %281
  %291 = load i32, ptr %15, align 4, !tbaa !5
  %292 = add nsw i32 %291, 1
  store i32 %292, ptr %15, align 4, !tbaa !5
  br label %276, !llvm.loop !17

293:                                              ; preds = %280
  %294 = load i32, ptr %14, align 4, !tbaa !5
  %295 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %294)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %296

296:                                              ; preds = %318, %293
  %297 = load i32, ptr %16, align 4, !tbaa !5
  %298 = load i32, ptr @n, align 4, !tbaa !5
  %299 = icmp sle i32 %297, %298
  br i1 %299, label %301, label %300

300:                                              ; preds = %296
  store i32 25, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %321

301:                                              ; preds = %296
  %302 = load i32, ptr %16, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %303
  %305 = load i32, ptr %304, align 4, !tbaa !5
  %306 = icmp eq i32 %305, 1
  br i1 %306, label %307, label %317

307:                                              ; preds = %301
  %308 = load i32, ptr %16, align 4, !tbaa !5
  %309 = load i32, ptr %14, align 4, !tbaa !5
  %310 = add nsw i32 %309, -1
  store i32 %310, ptr %14, align 4, !tbaa !5
  %311 = icmp eq i32 %310, 0
  %312 = zext i1 %311 to i64
  %313 = getelementptr inbounds [3 x i8], ptr @.str.3, i64 0, i64 %312
  %314 = load i8, ptr %313, align 1, !tbaa !18
  %315 = sext i8 %314 to i32
  %316 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %308, i32 noundef %315)
  br label %317

317:                                              ; preds = %307, %301
  br label %318

318:                                              ; preds = %317
  %319 = load i32, ptr %16, align 4, !tbaa !5
  %320 = add nsw i32 %319, 1
  store i32 %320, ptr %16, align 4, !tbaa !5
  br label %296, !llvm.loop !19

321:                                              ; preds = %300
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %322

322:                                              ; preds = %321, %272
  %323 = load i32, ptr %1, align 4
  ret i32 %323

324:                                              ; preds = %272, %216
  unreachable
}

declare i32 @puts(ptr noundef) #1

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

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

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

@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@n = external dso_local global i32, align 4
@col = external dso_local local_unnamed_addr global [601 x i32], align 16
@seq = external dso_local global [3 x [601 x i32]], align 16
@_ZZ4mainE3rem = external hidden global [601 x i32], align 16
@_ZZ4mainE3dep = external hidden local_unnamed_addr global [601 x i32], align 16
@_ZZ4mainE3que = external hidden local_unnamed_addr global [601 x i32], align 16
@_ZZ4mainE3pre = external hidden local_unnamed_addr global [601 x i32], align 16
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5checkiPiiS_(i32 noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z7getNodeiPiiS_(i32 noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull @n)
  store i32 1, ptr getelementptr inbounds (i8, ptr @col, i64 4), align 4, !tbaa !5
  %4 = load i32, ptr @seq, align 16, !tbaa !5
  %5 = add nsw i32 %4, 1
  store i32 %5, ptr @seq, align 16, !tbaa !5
  %6 = sext i32 %5 to i64
  %7 = getelementptr inbounds [601 x i32], ptr @seq, i64 0, i64 %6
  store i32 1, ptr %7, align 4, !tbaa !5
  %8 = load i32, ptr getelementptr inbounds (i8, ptr @seq, i64 2404), align 4, !tbaa !5
  %9 = add nsw i32 %8, 1
  store i32 %9, ptr getelementptr inbounds (i8, ptr @seq, i64 2404), align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds [601 x i32], ptr getelementptr inbounds (i8, ptr @seq, i64 2404), i64 0, i64 %10
  store i32 1, ptr %11, align 4, !tbaa !5
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %.not96 = icmp slt i32 %12, 2
  br i1 %.not96, label %._crit_edge100, label %.lr.ph99

.lr.ph99:                                         ; preds = %0, %148
  %13 = phi i32 [ %156, %148 ], [ %12, %0 ]
  %.06097 = phi i32 [ %155, %148 ], [ 2, %0 ]
  store i32 0, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %.not7094 = icmp slt i32 %13, 1
  br i1 %.not7094, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph99
  %14 = zext nneg i32 %13 to i64
  %xtraiter = and i64 %14, 1
  %15 = icmp eq i32 %13, 1
  br i1 %15, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %14, 2147483646
  br label %.lr.ph

._crit_edge.loopexit.unr-lcssa:                   ; preds = %45, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next.1, %45 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge.loopexit, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa
  %16 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %indvars.iv.unr
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %.not82.epil = icmp eq i32 %17, 0
  br i1 %.not82.epil, label %18, label %._crit_edge.loopexit

18:                                               ; preds = %.lr.ph.epil
  %19 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %20 = add nsw i32 %19, 1
  store i32 %20, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3rem, i64 0, i64 %21
  %23 = trunc nuw nsw i64 %indvars.iv.unr to i32
  store i32 %23, ptr %22, align 4, !tbaa !5
  br label %._crit_edge.loopexit

._crit_edge.loopexit:                             ; preds = %.lr.ph.epil, %18, %._crit_edge.loopexit.unr-lcssa
  %.pre = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph99
  %24 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ 0, %.lr.ph99 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %25 = load i32, ptr @seq, align 16, !tbaa !5
  %26 = call noundef i32 @_Z7getNodeiPiiS_(i32 noundef %24, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ4mainE3rem, i64 4), i32 noundef %25, ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 4))
  store i32 %26, ptr %1, align 4, !tbaa !5
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @seq, i64 2404), align 4, !tbaa !5
  %28 = call noundef zeroext i1 @_Z5checkiPiiS_(i32 noundef 1, ptr noundef nonnull %1, i32 noundef %27, ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 2408))
  br i1 %28, label %52, label %46

.lr.ph:                                           ; preds = %45, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %45 ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %45 ]
  %29 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %indvars.iv
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %.not82 = icmp eq i32 %30, 0
  br i1 %.not82, label %31, label %.lr.ph.1

31:                                               ; preds = %.lr.ph
  %32 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3rem, i64 0, i64 %34
  %36 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %36, ptr %35, align 4, !tbaa !5
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.lr.ph, %31
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %37 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %indvars.iv.next
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %.not82.1 = icmp eq i32 %38, 0
  br i1 %.not82.1, label %39, label %45

39:                                               ; preds = %.lr.ph.1
  %40 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3rem, i64 0, i64 %42
  %44 = trunc nuw nsw i64 %indvars.iv.next to i32
  store i32 %44, ptr %43, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %39, %.lr.ph.1
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !9

46:                                               ; preds = %._crit_edge
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %48
  store i32 1, ptr %49, align 4, !tbaa !5
  %50 = load i32, ptr getelementptr inbounds (i8, ptr @seq, i64 2404), align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr getelementptr inbounds (i8, ptr @seq, i64 2404), align 4, !tbaa !5
  br label %148

52:                                               ; preds = %._crit_edge
  %53 = load i32, ptr getelementptr inbounds (i8, ptr @seq, i64 4808), align 8, !tbaa !5
  %54 = call noundef zeroext i1 @_Z5checkiPiiS_(i32 noundef 1, ptr noundef nonnull %1, i32 noundef %53, ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 4812))
  br i1 %54, label %.lr.ph116, label %55

55:                                               ; preds = %52
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %57
  store i32 2, ptr %58, align 4, !tbaa !5
  %59 = load i32, ptr getelementptr inbounds (i8, ptr @seq, i64 4808), align 8, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr getelementptr inbounds (i8, ptr @seq, i64 4808), align 8, !tbaa !5
  br label %148

.lr.ph116:                                        ; preds = %52
  %61 = load i32, ptr getelementptr inbounds (i8, ptr @seq, i64 2404), align 4, !tbaa !5
  %62 = call noundef i32 @_Z7getNodeiPiiS_(i32 noundef %61, ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 2408), i32 noundef 1, ptr noundef nonnull %1)
  %63 = load i32, ptr getelementptr inbounds (i8, ptr @seq, i64 4808), align 8, !tbaa !5
  %64 = call noundef i32 @_Z7getNodeiPiiS_(i32 noundef %63, ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 4812), i32 noundef 1, ptr noundef nonnull %1)
  %65 = sext i32 %62 to i64
  %66 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %65
  store i32 1, ptr %66, align 4, !tbaa !5
  %67 = load i32, ptr %1, align 4, !tbaa !5
  %68 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3pre, i64 0, i64 %65
  store i32 %67, ptr %68, align 4, !tbaa !5
  store i32 1, ptr @_ZZ4mainE3que, align 16, !tbaa !5
  store i32 %62, ptr getelementptr inbounds (i8, ptr @_ZZ4mainE3que, i64 4), align 4, !tbaa !5
  %69 = sext i32 %64 to i64
  %70 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %69
  br label %74

71:                                               ; preds = %.critedge
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %72 = load i32, ptr @_ZZ4mainE3que, align 16, !tbaa !5
  %73 = sext i32 %72 to i64
  %.not71.not = icmp slt i64 %indvars.iv148, %73
  br i1 %.not71.not, label %74, label %._crit_edge117, !llvm.loop !11

74:                                               ; preds = %.lr.ph116, %71
  %indvars.iv148 = phi i64 [ 1, %.lr.ph116 ], [ %indvars.iv.next149, %71 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %75 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3que, i64 0, i64 %indvars.iv148
  %76 = load i32, ptr %75, align 4, !tbaa !5
  store i32 %76, ptr %2, align 4, !tbaa !5
  store i32 0, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %77 = load i32, ptr @n, align 4, !tbaa !5
  %.not72101 = icmp slt i32 %77, 1
  br i1 %.not72101, label %.critedge, label %.lr.ph104

.lr.ph104:                                        ; preds = %74
  %78 = sext i32 %76 to i64
  %79 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %78
  %80 = add nuw i32 %77, 1
  %wide.trip.count141 = zext i32 %80 to i64
  br label %81

.preheader:                                       ; preds = %96
  %.pre159 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %.not73109 = icmp eq i32 %.pre159, 0
  br i1 %.not73109, label %.critedge, label %.lr.ph110

81:                                               ; preds = %.lr.ph104, %96
  %indvars.iv138 = phi i64 [ 1, %.lr.ph104 ], [ %indvars.iv.next139, %96 ]
  %82 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %indvars.iv138
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = icmp sgt i32 %83, 0
  br i1 %84, label %85, label %96

85:                                               ; preds = %81
  %86 = load i32, ptr %79, align 4, !tbaa !5
  %.not80 = icmp eq i32 %86, %83
  br i1 %.not80, label %96, label %87

87:                                               ; preds = %85
  %88 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %indvars.iv138
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %.not81 = icmp eq i32 %89, 0
  br i1 %.not81, label %90, label %96

90:                                               ; preds = %87
  %91 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3rem, i64 0, i64 %93
  %95 = trunc nuw nsw i64 %indvars.iv138 to i32
  store i32 %95, ptr %94, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %81, %85, %87, %90
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %exitcond142.not = icmp eq i64 %indvars.iv.next139, %wide.trip.count141
  br i1 %exitcond142.not, label %.preheader, label %81, !llvm.loop !12

.loopexit93:                                      ; preds = %134
  %.pre160 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %.not73 = icmp eq i32 %.pre160, 0
  br i1 %.not73, label %.critedge, label %.lr.ph110

.lr.ph110:                                        ; preds = %.preheader, %.loopexit93
  %97 = phi i32 [ %.pre160, %.loopexit93 ], [ %.pre159, %.preheader ]
  %98 = call noundef zeroext i1 @_Z5checkiPiiS_(i32 noundef %97, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ4mainE3rem, i64 4), i32 noundef 1, ptr noundef nonnull %2)
  br i1 %98, label %99, label %.critedge

99:                                               ; preds = %.lr.ph110
  %100 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %101 = call noundef i32 @_Z7getNodeiPiiS_(i32 noundef %100, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ4mainE3rem, i64 4), i32 noundef 1, ptr noundef nonnull %2)
  %102 = load i32, ptr %2, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  %107 = sext i32 %101 to i64
  %108 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %107
  store i32 %106, ptr %108, align 4, !tbaa !5
  %109 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3pre, i64 0, i64 %107
  store i32 %102, ptr %109, align 4, !tbaa !5
  %110 = load i32, ptr @_ZZ4mainE3que, align 16, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr @_ZZ4mainE3que, align 16, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3que, i64 0, i64 %112
  store i32 %101, ptr %113, align 4, !tbaa !5
  %114 = icmp eq i32 %101, %64
  br i1 %114, label %.critedge, label %115

115:                                              ; preds = %99
  store i32 0, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %116 = load i32, ptr @n, align 4, !tbaa !5
  %.not74105 = icmp slt i32 %116, 1
  br i1 %.not74105, label %.critedge, label %.lr.ph108

.lr.ph108:                                        ; preds = %115
  %117 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %103
  %118 = add nuw i32 %116, 1
  %wide.trip.count146 = zext i32 %118 to i64
  br label %119

119:                                              ; preds = %.lr.ph108, %134
  %indvars.iv143 = phi i64 [ 1, %.lr.ph108 ], [ %indvars.iv.next144, %134 ]
  %120 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %indvars.iv143
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = icmp sgt i32 %121, 0
  br i1 %122, label %123, label %134

123:                                              ; preds = %119
  %124 = load i32, ptr %117, align 4, !tbaa !5
  %.not75 = icmp eq i32 %124, %121
  br i1 %.not75, label %134, label %125

125:                                              ; preds = %123
  %126 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %indvars.iv143
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %.not76 = icmp eq i32 %127, 0
  br i1 %.not76, label %128, label %134

128:                                              ; preds = %125
  %129 = load i32, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr @_ZZ4mainE3rem, align 16, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3rem, i64 0, i64 %131
  %133 = trunc nuw nsw i64 %indvars.iv143 to i32
  store i32 %133, ptr %132, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %119, %123, %125, %128
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  %exitcond147.not = icmp eq i64 %indvars.iv.next144, %wide.trip.count146
  br i1 %exitcond147.not, label %.loopexit93, label %119, !llvm.loop !13

.critedge:                                        ; preds = %.lr.ph110, %.loopexit93, %99, %115, %74, %.preheader
  %135 = load i32, ptr %70, align 4, !tbaa !5
  %136 = icmp slt i32 %135, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  br i1 %136, label %71, label %._crit_edge117

._crit_edge117:                                   ; preds = %.critedge, %71
  %137 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.5)
  %138 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3dep, i64 0, i64 %69
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  %141 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %140)
  %142 = load i32, ptr %1, align 4, !tbaa !5
  %.not77118 = icmp eq i32 %64, %142
  br i1 %.not77118, label %._crit_edge122, label %.lr.ph121

.lr.ph121:                                        ; preds = %._crit_edge117, %.lr.ph121
  %.053119 = phi i32 [ %146, %.lr.ph121 ], [ %64, %._crit_edge117 ]
  %143 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %.053119)
  %144 = sext i32 %.053119 to i64
  %145 = getelementptr inbounds [601 x i32], ptr @_ZZ4mainE3pre, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = load i32, ptr %1, align 4, !tbaa !5
  %.not77 = icmp eq i32 %146, %147
  br i1 %.not77, label %._crit_edge122, label %.lr.ph121, !llvm.loop !14

148:                                              ; preds = %55, %46
  %.sink170 = phi i32 [ %60, %55 ], [ %51, %46 ]
  %.sink168 = phi ptr [ getelementptr inbounds (i8, ptr @seq, i64 4808), %55 ], [ getelementptr inbounds (i8, ptr @seq, i64 2404), %46 ]
  %.sink = phi i32 [ %56, %55 ], [ %47, %46 ]
  %149 = sext i32 %.sink170 to i64
  %150 = getelementptr inbounds [601 x i32], ptr %.sink168, i64 0, i64 %149
  store i32 %.sink, ptr %150, align 4, !tbaa !5
  %151 = load i32, ptr @seq, align 16, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr @seq, align 16, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [601 x i32], ptr @seq, i64 0, i64 %153
  store i32 %.sink, ptr %154, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %155 = add nuw nsw i32 %.06097, 1
  %156 = load i32, ptr @n, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.06097, %156
  br i1 %.not.not, label %.lr.ph99, label %._crit_edge100, !llvm.loop !15

._crit_edge122:                                   ; preds = %.lr.ph121, %._crit_edge117
  %.lcssa = phi i32 [ %64, %._crit_edge117 ], [ %146, %.lr.ph121 ]
  %157 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  br label %.loopexit

._crit_edge100:                                   ; preds = %148, %0
  %158 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.8)
  %159 = load i32, ptr @n, align 4, !tbaa !5
  %.not78123 = icmp slt i32 %159, 1
  br i1 %.not78123, label %._crit_edge128, label %.lr.ph127.preheader

.lr.ph127.preheader:                              ; preds = %._crit_edge100
  %160 = add nuw i32 %159, 1
  %wide.trip.count154 = zext i32 %160 to i64
  %161 = zext nneg i32 %159 to i64
  %min.iters.check = icmp ult i32 %159, 8
  br i1 %min.iters.check, label %.lr.ph127.preheader175, label %vector.ph

.lr.ph127.preheader175:                           ; preds = %middle.block, %.lr.ph127.preheader
  %indvars.iv151.ph = phi i64 [ 1, %.lr.ph127.preheader ], [ %ind.end, %middle.block ]
  %.052124.ph = phi i32 [ 0, %.lr.ph127.preheader ], [ %171, %middle.block ]
  br label %.lr.ph127

vector.ph:                                        ; preds = %.lr.ph127.preheader
  %n.vec = and i64 %161, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %168, %vector.body ]
  %vec.phi173 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %169, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %162 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %offset.idx
  %163 = getelementptr inbounds i8, ptr %162, i64 16
  %wide.load = load <4 x i32>, ptr %162, align 4, !tbaa !5
  %wide.load174 = load <4 x i32>, ptr %163, align 4, !tbaa !5
  %164 = icmp eq <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %165 = icmp eq <4 x i32> %wide.load174, <i32 1, i32 1, i32 1, i32 1>
  %166 = zext <4 x i1> %164 to <4 x i32>
  %167 = zext <4 x i1> %165 to <4 x i32>
  %168 = add <4 x i32> %vec.phi, %166
  %169 = add <4 x i32> %vec.phi173, %167
  %index.next = add nuw i64 %index, 8
  %170 = icmp eq i64 %index.next, %n.vec
  br i1 %170, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %169, %168
  %171 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %161
  br i1 %cmp.n, label %._crit_edge128, label %.lr.ph127.preheader175

._crit_edge128:                                   ; preds = %.lr.ph127, %middle.block, %._crit_edge100
  %.052.lcssa = phi i32 [ 0, %._crit_edge100 ], [ %171, %middle.block ], [ %178, %.lr.ph127 ]
  %172 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %.052.lcssa)
  %173 = load i32, ptr @n, align 4, !tbaa !5
  %.not79130 = icmp slt i32 %173, 1
  br i1 %.not79130, label %.loopexit, label %.lr.ph134

.lr.ph127:                                        ; preds = %.lr.ph127.preheader175, %.lr.ph127
  %indvars.iv151 = phi i64 [ %indvars.iv.next152, %.lr.ph127 ], [ %indvars.iv151.ph, %.lr.ph127.preheader175 ]
  %.052124 = phi i32 [ %178, %.lr.ph127 ], [ %.052124.ph, %.lr.ph127.preheader175 ]
  %174 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %indvars.iv151
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = icmp eq i32 %175, 1
  %177 = zext i1 %176 to i32
  %178 = add nuw nsw i32 %.052124, %177
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %exitcond155.not = icmp eq i64 %indvars.iv.next152, %wide.trip.count154
  br i1 %exitcond155.not, label %._crit_edge128, label %.lr.ph127, !llvm.loop !19

.lr.ph134:                                        ; preds = %._crit_edge128, %192
  %179 = phi i32 [ %193, %192 ], [ %173, %._crit_edge128 ]
  %indvars.iv156 = phi i64 [ %indvars.iv.next157, %192 ], [ 1, %._crit_edge128 ]
  %.1131 = phi i32 [ %.2, %192 ], [ %.052.lcssa, %._crit_edge128 ]
  %180 = getelementptr inbounds [601 x i32], ptr @col, i64 0, i64 %indvars.iv156
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = icmp eq i32 %181, 1
  br i1 %182, label %183, label %192

183:                                              ; preds = %.lr.ph134
  %184 = add nsw i32 %.1131, -1
  %185 = icmp eq i32 %184, 0
  %186 = zext i1 %185 to i64
  %187 = getelementptr inbounds [3 x i8], ptr @.str.3, i64 0, i64 %186
  %188 = load i8, ptr %187, align 1, !tbaa !20
  %189 = sext i8 %188 to i32
  %190 = trunc nuw nsw i64 %indvars.iv156 to i32
  %191 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %190, i32 noundef %189)
  %.pre161 = load i32, ptr @n, align 4, !tbaa !5
  br label %192

192:                                              ; preds = %.lr.ph134, %183
  %193 = phi i32 [ %.pre161, %183 ], [ %179, %.lr.ph134 ]
  %.2 = phi i32 [ %184, %183 ], [ %.1131, %.lr.ph134 ]
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %194 = sext i32 %193 to i64
  %.not79.not = icmp slt i64 %indvars.iv156, %194
  br i1 %.not79.not, label %.lr.ph134, label %.loopexit, !llvm.loop !21

.loopexit:                                        ; preds = %192, %._crit_edge128, %._crit_edge122
  ret i32 0
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4

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


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