; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/207 Division 2/Problem B (B)

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@col = external dso_local global [100001 x i32], align 16
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@c = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 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
  store i32 0, ptr %1, align 4
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %5

5:                                                ; preds = %187, %0
  %6 = load i32, ptr %2, align 4, !tbaa !5
  %7 = load i32, ptr @m, align 4, !tbaa !5
  %8 = icmp slt i32 %6, %7
  br i1 %8, label %10, label %9

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

10:                                               ; preds = %5
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @a, ptr noundef @b, ptr noundef @c)
  %12 = load i32, ptr @a, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %13
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %39

17:                                               ; preds = %10
  %18 = load i32, ptr @b, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %39

23:                                               ; preds = %17
  %24 = load i32, ptr @c, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %39

29:                                               ; preds = %23
  %30 = load i32, ptr @a, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %31
  store i32 1, ptr %32, align 4, !tbaa !5
  %33 = load i32, ptr @b, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %34
  store i32 2, ptr %35, align 4, !tbaa !5
  %36 = load i32, ptr @c, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %37
  store i32 3, ptr %38, align 4, !tbaa !5
  br label %186

39:                                               ; preds = %23, %17, %10
  %40 = load i32, ptr @a, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = icmp sgt i32 %43, 0
  br i1 %44, label %45, label %87

45:                                               ; preds = %39
  %46 = load i32, ptr @a, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = icmp eq i32 %49, 1
  br i1 %50, label %51, label %58

51:                                               ; preds = %45
  %52 = load i32, ptr @b, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %53
  store i32 2, ptr %54, align 4, !tbaa !5
  %55 = load i32, ptr @c, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %56
  store i32 3, ptr %57, align 4, !tbaa !5
  br label %86

58:                                               ; preds = %45
  %59 = load i32, ptr @a, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = icmp eq i32 %62, 2
  br i1 %63, label %64, label %71

64:                                               ; preds = %58
  %65 = load i32, ptr @b, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %66
  store i32 1, ptr %67, align 4, !tbaa !5
  %68 = load i32, ptr @c, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %69
  store i32 3, ptr %70, align 4, !tbaa !5
  br label %85

71:                                               ; preds = %58
  %72 = load i32, ptr @a, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = icmp eq i32 %75, 3
  br i1 %76, label %77, label %84

77:                                               ; preds = %71
  %78 = load i32, ptr @b, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %79
  store i32 1, ptr %80, align 4, !tbaa !5
  %81 = load i32, ptr @c, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %82
  store i32 2, ptr %83, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %77, %71
  br label %85

85:                                               ; preds = %84, %64
  br label %86

86:                                               ; preds = %85, %51
  br label %185

87:                                               ; preds = %39
  %88 = load i32, ptr @b, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = icmp sgt i32 %91, 0
  br i1 %92, label %93, label %135

93:                                               ; preds = %87
  %94 = load i32, ptr @b, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = icmp eq i32 %97, 1
  br i1 %98, label %99, label %106

99:                                               ; preds = %93
  %100 = load i32, ptr @a, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %101
  store i32 2, ptr %102, align 4, !tbaa !5
  %103 = load i32, ptr @c, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %104
  store i32 3, ptr %105, align 4, !tbaa !5
  br label %134

106:                                              ; preds = %93
  %107 = load i32, ptr @b, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = icmp eq i32 %110, 2
  br i1 %111, label %112, label %119

112:                                              ; preds = %106
  %113 = load i32, ptr @a, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %114
  store i32 1, ptr %115, align 4, !tbaa !5
  %116 = load i32, ptr @c, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %117
  store i32 3, ptr %118, align 4, !tbaa !5
  br label %133

119:                                              ; preds = %106
  %120 = load i32, ptr @b, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = icmp eq i32 %123, 3
  br i1 %124, label %125, label %132

125:                                              ; preds = %119
  %126 = load i32, ptr @a, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %127
  store i32 1, ptr %128, align 4, !tbaa !5
  %129 = load i32, ptr @c, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %130
  store i32 2, ptr %131, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %125, %119
  br label %133

133:                                              ; preds = %132, %112
  br label %134

134:                                              ; preds = %133, %99
  br label %184

135:                                              ; preds = %87
  %136 = load i32, ptr @c, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = icmp sgt i32 %139, 0
  br i1 %140, label %141, label %183

141:                                              ; preds = %135
  %142 = load i32, ptr @c, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = icmp eq i32 %145, 1
  br i1 %146, label %147, label %154

147:                                              ; preds = %141
  %148 = load i32, ptr @b, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %149
  store i32 2, ptr %150, align 4, !tbaa !5
  %151 = load i32, ptr @a, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %152
  store i32 3, ptr %153, align 4, !tbaa !5
  br label %182

154:                                              ; preds = %141
  %155 = load i32, ptr @c, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = icmp eq i32 %158, 2
  br i1 %159, label %160, label %167

160:                                              ; preds = %154
  %161 = load i32, ptr @b, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %162
  store i32 1, ptr %163, align 4, !tbaa !5
  %164 = load i32, ptr @a, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %165
  store i32 3, ptr %166, align 4, !tbaa !5
  br label %181

167:                                              ; preds = %154
  %168 = load i32, ptr @c, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = icmp eq i32 %171, 3
  br i1 %172, label %173, label %180

173:                                              ; preds = %167
  %174 = load i32, ptr @b, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %175
  store i32 1, ptr %176, align 4, !tbaa !5
  %177 = load i32, ptr @a, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %178
  store i32 2, ptr %179, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %173, %167
  br label %181

181:                                              ; preds = %180, %160
  br label %182

182:                                              ; preds = %181, %147
  br label %183

183:                                              ; preds = %182, %135
  br label %184

184:                                              ; preds = %183, %134
  br label %185

185:                                              ; preds = %184, %86
  br label %186

186:                                              ; preds = %185, %29
  br label %187

187:                                              ; preds = %186
  %188 = load i32, ptr %2, align 4, !tbaa !5
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %2, align 4, !tbaa !5
  br label %5, !llvm.loop !9

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

191:                                              ; preds = %211, %190
  %192 = load i32, ptr %3, align 4, !tbaa !5
  %193 = load i32, ptr @n, align 4, !tbaa !5
  %194 = icmp sle i32 %192, %193
  br i1 %194, label %196, label %195

195:                                              ; preds = %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %214

196:                                              ; preds = %191
  %197 = load i32, ptr %3, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !5
  %201 = icmp eq i32 %200, 0
  br i1 %201, label %202, label %204

202:                                              ; preds = %196
  %203 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %210

204:                                              ; preds = %196
  %205 = load i32, ptr %3, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !5
  %209 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %208)
  br label %210

210:                                              ; preds = %204, %202
  br label %211

211:                                              ; preds = %210
  %212 = load i32, ptr %3, align 4, !tbaa !5
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %3, align 4, !tbaa !5
  br label %191, !llvm.loop !11

214:                                              ; preds = %195
  ret i32 0
}

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

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 = { 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}


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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@col = external dso_local local_unnamed_addr global [100001 x i32], align 16
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@c = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %2 = load i32, ptr @m, align 4, !tbaa !5
  %3 = icmp sgt i32 %2, 0
  br i1 %3, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %73, %0
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %.not12 = icmp slt i32 %4, 1
  br i1 %.not12, label %._crit_edge, label %.lr.ph14

.lr.ph:                                           ; preds = %0, %73
  %.0611 = phi i32 [ %74, %73 ], [ 0, %0 ]
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @a, ptr noundef nonnull @b, ptr noundef nonnull @c)
  %6 = load i32, ptr @a, align 4, !tbaa !5
  %7 = sext i32 %6 to i64
  %8 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %7
  %9 = load i32, ptr %8, align 4, !tbaa !5
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %11, label %24

11:                                               ; preds = %.lr.ph
  %12 = load i32, ptr @b, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %13
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %.thread

17:                                               ; preds = %11
  %18 = load i32, ptr @c, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %.thread.thread

23:                                               ; preds = %17
  store i32 1, ptr %8, align 4, !tbaa !5
  store i32 2, ptr %14, align 4, !tbaa !5
  store i32 3, ptr %20, align 4, !tbaa !5
  br label %73

24:                                               ; preds = %.lr.ph
  %25 = icmp sgt i32 %9, 0
  br i1 %25, label %26, label %..thread_crit_edge

..thread_crit_edge:                               ; preds = %24
  %.pre = load i32, ptr @b, align 4, !tbaa !5
  %.phi.trans.insert = sext i32 %.pre to i64
  %.phi.trans.insert16 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %.phi.trans.insert
  %.pre17 = load i32, ptr %.phi.trans.insert16, align 4, !tbaa !5
  br label %.thread

26:                                               ; preds = %24
  switch i32 %9, label %73 [
    i32 1, label %27
    i32 2, label %34
    i32 3, label %41
  ]

27:                                               ; preds = %26
  %28 = load i32, ptr @b, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %29
  store i32 2, ptr %30, align 4, !tbaa !5
  %31 = load i32, ptr @c, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %32
  store i32 3, ptr %33, align 4, !tbaa !5
  br label %73

34:                                               ; preds = %26
  %35 = load i32, ptr @b, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %36
  store i32 1, ptr %37, align 4, !tbaa !5
  %38 = load i32, ptr @c, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %39
  store i32 3, ptr %40, align 4, !tbaa !5
  br label %73

41:                                               ; preds = %26
  %42 = load i32, ptr @b, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %43
  store i32 1, ptr %44, align 4, !tbaa !5
  %45 = load i32, ptr @c, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %46
  store i32 2, ptr %47, align 4, !tbaa !5
  br label %73

.thread:                                          ; preds = %..thread_crit_edge, %11
  %.pre-phi = phi i64 [ %.phi.trans.insert, %..thread_crit_edge ], [ %13, %11 ]
  %48 = phi i32 [ %.pre17, %..thread_crit_edge ], [ %15, %11 ]
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %50, label %.thread.thread

50:                                               ; preds = %.thread
  switch i32 %48, label %73 [
    i32 1, label %51
    i32 2, label %55
    i32 3, label %59
  ]

51:                                               ; preds = %50
  store i32 2, ptr %8, align 4, !tbaa !5
  %52 = load i32, ptr @c, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %53
  store i32 3, ptr %54, align 4, !tbaa !5
  br label %73

55:                                               ; preds = %50
  store i32 1, ptr %8, align 4, !tbaa !5
  %56 = load i32, ptr @c, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %57
  store i32 3, ptr %58, align 4, !tbaa !5
  br label %73

59:                                               ; preds = %50
  store i32 1, ptr %8, align 4, !tbaa !5
  %60 = load i32, ptr @c, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %61
  store i32 2, ptr %62, align 4, !tbaa !5
  br label %73

.thread.thread:                                   ; preds = %17, %.thread
  %.pn = phi i64 [ %.pre-phi, %.thread ], [ %13, %17 ]
  %63 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %.pn
  %64 = load i32, ptr @c, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %69, label %73

69:                                               ; preds = %.thread.thread
  switch i32 %67, label %73 [
    i32 1, label %70
    i32 2, label %71
    i32 3, label %72
  ]

70:                                               ; preds = %69
  store i32 2, ptr %63, align 4, !tbaa !5
  store i32 3, ptr %8, align 4, !tbaa !5
  br label %73

71:                                               ; preds = %69
  store i32 1, ptr %63, align 4, !tbaa !5
  store i32 3, ptr %8, align 4, !tbaa !5
  br label %73

72:                                               ; preds = %69
  store i32 1, ptr %63, align 4, !tbaa !5
  store i32 2, ptr %8, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %69, %50, %26, %23, %55, %59, %51, %70, %72, %71, %.thread.thread, %27, %41, %34
  %74 = add nuw nsw i32 %.0611, 1
  %75 = load i32, ptr @m, align 4, !tbaa !5
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %.lr.ph, label %.preheader, !llvm.loop !9

._crit_edge:                                      ; preds = %84, %.preheader
  ret i32 0

.lr.ph14:                                         ; preds = %.preheader, %84
  %indvars.iv = phi i64 [ %indvars.iv.next, %84 ], [ 1, %.preheader ]
  %77 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %indvars.iv
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %82

80:                                               ; preds = %.lr.ph14
  %81 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %84

82:                                               ; preds = %.lr.ph14
  %83 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %78)
  br label %84

84:                                               ; preds = %80, %82
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %85 = load i32, ptr @n, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %.not.not = icmp slt i64 %indvars.iv, %86
  br i1 %.not.not, label %.lr.ph14, label %._crit_edge, !llvm.loop !11
}

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

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

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

!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}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass