; LLVM IR from tangjz/acm-icpc :: TDL_training/2015-12-02 (J - Tunnels - lzy)

; 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
@x1 = external dso_local global [19 x i32], align 16
@y1 = external dso_local global [19 x i32], align 16
@x2 = external dso_local global [19 x i32], align 16
@y2 = external dso_local global [19 x i32], align 16
@g = external dso_local global [19 x [19 x i32]], align 16
@c = external dso_local global [19 x [19 x [19 x [19 x i32]]]], align 16
@vis = external dso_local global [19 x [19 x [19 x [19 x i8]]]], align 16
@map = external dso_local global [19 x [19 x i8]], align 16
@f = external dso_local global [65536 x [19 x i32]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca 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
  store i32 0, ptr %1, align 4
  br label %14

14:                                               ; preds = %240, %0
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  %16 = icmp eq i32 %15, 2
  br i1 %16, label %17, label %241

17:                                               ; preds = %14
  call void @llvm.memset.p0.i64(ptr align 16 @map, i8 0, i64 361, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %18

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

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

23:                                               ; preds = %18
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [19 x [19 x i8]], ptr @map, i64 0, i64 %25
  %27 = getelementptr inbounds [19 x i8], ptr %26, i64 0, i64 0
  %28 = getelementptr inbounds i8, ptr %27, i64 1
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %28)
  br label %30

30:                                               ; preds = %23
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %2, align 4, !tbaa !5
  br label %18, !llvm.loop !9

33:                                               ; preds = %22
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 130321, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @c, i8 31, i64 521284, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %61, %33
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = load i32, ptr @m, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %39, label %38

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

39:                                               ; preds = %34
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i32, ptr @x1, i64 %41
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr @y1, i64 %44
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr @x2, i64 %47
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr @y2, i64 %50
  %52 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %42, ptr noundef %45, ptr noundef %48, ptr noundef %51)
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [19 x i32], ptr @x2, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [19 x i32], ptr @y2, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  call void @_Z3bfsii(i32 noundef %56, i32 noundef %60)
  br label %61

61:                                               ; preds = %39
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %3, align 4, !tbaa !5
  br label %34, !llvm.loop !11

64:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %112, %64
  %66 = load i32, ptr %4, align 4, !tbaa !5
  %67 = load i32, ptr @m, align 4, !tbaa !5
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %65
  store i32 10, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %115

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

71:                                               ; preds = %108, %70
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = load i32, ptr @m, align 4, !tbaa !5
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %111

76:                                               ; preds = %71
  %77 = load i32, ptr %4, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [19 x i32], ptr @x2, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [19 x [19 x [19 x [19 x i32]]]], ptr @c, i64 0, i64 %81
  %83 = load i32, ptr %4, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [19 x i32], ptr @y2, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [19 x [19 x [19 x i32]]], ptr %82, i64 0, i64 %87
  %89 = load i32, ptr %6, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [19 x i32], ptr @x1, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [19 x [19 x i32]], ptr %88, i64 0, i64 %93
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [19 x i32], ptr @y1, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [19 x i32], ptr %94, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = load i32, ptr %4, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [19 x [19 x i32]], ptr @g, i64 0, i64 %103
  %105 = load i32, ptr %6, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [19 x i32], ptr %104, i64 0, i64 %106
  store i32 %101, ptr %107, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %76
  %109 = load i32, ptr %6, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %6, align 4, !tbaa !5
  br label %71, !llvm.loop !12

111:                                              ; preds = %75
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %4, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %4, align 4, !tbaa !5
  br label %65, !llvm.loop !13

115:                                              ; preds = %69
  call void @llvm.memset.p0.i64(ptr align 16 @f, i8 31, i64 4980736, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %129, %115
  %117 = load i32, ptr %7, align 4, !tbaa !5
  %118 = load i32, ptr @m, align 4, !tbaa !5
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %116
  store i32 16, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %132

121:                                              ; preds = %116
  %122 = load i32, ptr %7, align 4, !tbaa !5
  %123 = shl i32 1, %122
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [65536 x [19 x i32]], ptr @f, i64 0, i64 %124
  %126 = load i32, ptr %7, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [19 x i32], ptr %125, i64 0, i64 %127
  store i32 0, ptr %128, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %121
  %130 = load i32, ptr %7, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %7, align 4, !tbaa !5
  br label %116, !llvm.loop !14

132:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %209, %132
  %134 = load i32, ptr %8, align 4, !tbaa !5
  %135 = load i32, ptr @m, align 4, !tbaa !5
  %136 = shl i32 1, %135
  %137 = icmp slt i32 %134, %136
  br i1 %137, label %139, label %138

138:                                              ; preds = %133
  store i32 19, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %212

139:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %140

140:                                              ; preds = %205, %139
  %141 = load i32, ptr %9, align 4, !tbaa !5
  %142 = load i32, ptr @m, align 4, !tbaa !5
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %140
  store i32 22, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %208

145:                                              ; preds = %140
  %146 = load i32, ptr %8, align 4, !tbaa !5
  %147 = load i32, ptr %9, align 4, !tbaa !5
  %148 = shl i32 1, %147
  %149 = and i32 %146, %148
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %151, label %204

151:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %200, %151
  %153 = load i32, ptr %10, align 4, !tbaa !5
  %154 = load i32, ptr @m, align 4, !tbaa !5
  %155 = icmp slt i32 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %152
  store i32 25, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %203

157:                                              ; preds = %152
  %158 = load i32, ptr %8, align 4, !tbaa !5
  %159 = load i32, ptr %10, align 4, !tbaa !5
  %160 = shl i32 1, %159
  %161 = and i32 %158, %160
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %199, label %163

163:                                              ; preds = %157
  %164 = load i32, ptr %8, align 4, !tbaa !5
  %165 = load i32, ptr %10, align 4, !tbaa !5
  %166 = shl i32 1, %165
  %167 = or i32 %164, %166
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [65536 x [19 x i32]], ptr @f, i64 0, i64 %168
  %170 = load i32, ptr %10, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [19 x i32], ptr %169, i64 0, i64 %171
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %173 = load i32, ptr %8, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [65536 x [19 x i32]], ptr @f, i64 0, i64 %174
  %176 = load i32, ptr %9, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [19 x i32], ptr %175, i64 0, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !5
  %180 = load i32, ptr %9, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [19 x [19 x i32]], ptr @g, i64 0, i64 %181
  %183 = load i32, ptr %10, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [19 x i32], ptr %182, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = add nsw i32 %179, %186
  store i32 %187, ptr %11, align 4, !tbaa !5
  %188 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %172, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = load i32, ptr %8, align 4, !tbaa !5
  %191 = load i32, ptr %10, align 4, !tbaa !5
  %192 = shl i32 1, %191
  %193 = or i32 %190, %192
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [65536 x [19 x i32]], ptr @f, i64 0, i64 %194
  %196 = load i32, ptr %10, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [19 x i32], ptr %195, i64 0, i64 %197
  store i32 %189, ptr %198, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %199

199:                                              ; preds = %163, %157
  br label %200

200:                                              ; preds = %199
  %201 = load i32, ptr %10, align 4, !tbaa !5
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %10, align 4, !tbaa !5
  br label %152, !llvm.loop !15

203:                                              ; preds = %156
  br label %204

204:                                              ; preds = %203, %145
  br label %205

205:                                              ; preds = %204
  %206 = load i32, ptr %9, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %9, align 4, !tbaa !5
  br label %140, !llvm.loop !16

208:                                              ; preds = %144
  br label %209

209:                                              ; preds = %208
  %210 = load i32, ptr %8, align 4, !tbaa !5
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %8, align 4, !tbaa !5
  br label %133, !llvm.loop !17

212:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 6000000, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %213

213:                                              ; preds = %229, %212
  %214 = load i32, ptr %13, align 4, !tbaa !5
  %215 = load i32, ptr @m, align 4, !tbaa !5
  %216 = icmp slt i32 %214, %215
  br i1 %216, label %218, label %217

217:                                              ; preds = %213
  store i32 28, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %232

218:                                              ; preds = %213
  %219 = load i32, ptr @m, align 4, !tbaa !5
  %220 = shl i32 1, %219
  %221 = sub nsw i32 %220, 1
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [65536 x [19 x i32]], ptr @f, i64 0, i64 %222
  %224 = load i32, ptr %13, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [19 x i32], ptr %223, i64 0, i64 %225
  %227 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %226)
  %228 = load i32, ptr %227, align 4, !tbaa !5
  store i32 %228, ptr %12, align 4, !tbaa !5
  br label %229

229:                                              ; preds = %218
  %230 = load i32, ptr %13, align 4, !tbaa !5
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %13, align 4, !tbaa !5
  br label %213, !llvm.loop !18

232:                                              ; preds = %217
  %233 = load i32, ptr %12, align 4, !tbaa !5
  %234 = icmp slt i32 %233, 6000000
  br i1 %234, label %235, label %238

235:                                              ; preds = %232
  %236 = load i32, ptr %12, align 4, !tbaa !5
  %237 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %236)
  br label %240

238:                                              ; preds = %232
  %239 = call i32 @puts(ptr noundef @.str.4)
  br label %240

240:                                              ; preds = %238, %235
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %14, !llvm.loop !19

241:                                              ; preds = %14
  ret i32 0
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

declare i32 @puts(ptr noundef) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = distinct !{!18, !10}
!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"

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@x1 = external dso_local global [19 x i32], align 16
@y1 = external dso_local global [19 x i32], align 16
@x2 = external dso_local global [19 x i32], align 16
@y2 = external dso_local global [19 x i32], align 16
@g = external dso_local local_unnamed_addr global [19 x [19 x i32]], align 16
@c = external dso_local local_unnamed_addr global [19 x [19 x [19 x [19 x i32]]]], align 16
@vis = external dso_local local_unnamed_addr global [19 x [19 x [19 x [19 x i8]]]], align 16
@map = external dso_local global [19 x [19 x i8]], align 16
@f = external dso_local global [65536 x [19 x i32]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

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

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %4 = icmp eq i32 %3, 2
  br i1 %4, label %.lr.ph90, label %._crit_edge91

.lr.ph90:                                         ; preds = %0, %138
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(361) @map, i8 0, i64 361, i1 false)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %.not64 = icmp slt i32 %5, 1
  br i1 %.not64, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph90
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(130321) @vis, i8 0, i64 130321, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(521284) @c, i8 31, i64 521284, i1 false)
  %6 = load i32, ptr @m, align 4
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph68, label %._crit_edge73.split.us.thread

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

.preheader63:                                     ; preds = %.lr.ph68
  %12 = icmp sgt i32 %54, 0
  br i1 %12, label %.preheader61.us.preheader, label %._crit_edge73.split.us.thread

.preheader61.us.preheader:                        ; preds = %.preheader63
  %wide.trip.count104 = zext nneg i32 %54 to i64
  %xtraiter = and i64 %wide.trip.count104, 1
  %13 = icmp eq i32 %54, 1
  %unroll_iter = and i64 %wide.trip.count104, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader61.us

.preheader61.us:                                  ; preds = %.preheader61.us.preheader, %._crit_edge71.us
  %indvars.iv101 = phi i64 [ 0, %.preheader61.us.preheader ], [ %indvars.iv.next102, %._crit_edge71.us ]
  %14 = getelementptr inbounds [19 x i32], ptr @x2, i64 0, i64 %indvars.iv101
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [19 x i32], ptr @y2, i64 0, i64 %indvars.iv101
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  br i1 %13, label %._crit_edge71.us.unr-lcssa, label %.preheader61.us.new

.preheader61.us.new:                              ; preds = %.preheader61.us, %.preheader61.us.new
  %indvars.iv98 = phi i64 [ %indvars.iv.next99.1, %.preheader61.us.new ], [ 0, %.preheader61.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader61.us.new ], [ 0, %.preheader61.us ]
  %20 = getelementptr inbounds [19 x i32], ptr @x1, i64 0, i64 %indvars.iv98
  %21 = load i32, ptr %20, align 8, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [19 x i32], ptr @y1, i64 0, i64 %indvars.iv98
  %24 = load i32, ptr %23, align 8, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [19 x [19 x [19 x [19 x i32]]]], ptr @c, i64 0, i64 %16, i64 %19, i64 %22, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = getelementptr inbounds [19 x [19 x i32]], ptr @g, i64 0, i64 %indvars.iv101, i64 %indvars.iv98
  store i32 %27, ptr %28, align 4, !tbaa !5
  %indvars.iv.next99 = or disjoint i64 %indvars.iv98, 1
  %29 = getelementptr inbounds [19 x i32], ptr @x1, i64 0, i64 %indvars.iv.next99
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [19 x i32], ptr @y1, i64 0, i64 %indvars.iv.next99
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [19 x [19 x [19 x [19 x i32]]]], ptr @c, i64 0, i64 %16, i64 %19, i64 %31, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = getelementptr inbounds [19 x [19 x i32]], ptr @g, i64 0, i64 %indvars.iv101, i64 %indvars.iv.next99
  store i32 %36, ptr %37, align 4, !tbaa !5
  %indvars.iv.next99.1 = add nuw nsw i64 %indvars.iv98, 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_edge71.us.unr-lcssa, label %.preheader61.us.new, !llvm.loop !11

._crit_edge71.us.unr-lcssa:                       ; preds = %.preheader61.us.new, %.preheader61.us
  %indvars.iv98.unr = phi i64 [ 0, %.preheader61.us ], [ %indvars.iv.next99.1, %.preheader61.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge71.us, label %._crit_edge71.us.epilog-lcssa

._crit_edge71.us.epilog-lcssa:                    ; preds = %._crit_edge71.us.unr-lcssa
  %38 = getelementptr inbounds [19 x i32], ptr @x1, i64 0, i64 %indvars.iv98.unr
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [19 x i32], ptr @y1, i64 0, i64 %indvars.iv98.unr
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [19 x [19 x [19 x [19 x i32]]]], ptr @c, i64 0, i64 %16, i64 %19, i64 %40, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = getelementptr inbounds [19 x [19 x i32]], ptr @g, i64 0, i64 %indvars.iv101, i64 %indvars.iv98.unr
  store i32 %45, ptr %46, align 4, !tbaa !5
  br label %._crit_edge71.us

._crit_edge71.us:                                 ; preds = %._crit_edge71.us.unr-lcssa, %._crit_edge71.us.epilog-lcssa
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %exitcond105.not = icmp eq i64 %indvars.iv.next102, %wide.trip.count104
  br i1 %exitcond105.not, label %._crit_edge73.split.us, label %.preheader61.us, !llvm.loop !12

.lr.ph68:                                         ; preds = %._crit_edge, %.lr.ph68
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %.lr.ph68 ], [ 0, %._crit_edge ]
  %47 = getelementptr inbounds i32, ptr @x1, i64 %indvars.iv95
  %48 = getelementptr inbounds i32, ptr @y1, i64 %indvars.iv95
  %49 = getelementptr inbounds i32, ptr @x2, i64 %indvars.iv95
  %50 = getelementptr inbounds i32, ptr @y2, i64 %indvars.iv95
  %51 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %47, ptr noundef nonnull %48, ptr noundef nonnull %49, ptr noundef nonnull %50)
  %52 = load i32, ptr %49, align 4, !tbaa !5
  %53 = load i32, ptr %50, align 4, !tbaa !5
  call void @_Z3bfsii(i32 noundef %52, i32 noundef %53)
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %54 = load i32, ptr @m, align 4
  %55 = sext i32 %54 to i64
  %56 = icmp slt i64 %indvars.iv.next96, %55
  br i1 %56, label %.lr.ph68, label %.preheader63, !llvm.loop !13

._crit_edge73.split.us.thread:                    ; preds = %.preheader63, %._crit_edge
  %.ph123 = phi i32 [ %54, %.preheader63 ], [ %6, %._crit_edge ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4980736) @f, i8 31, i64 4980736, i1 false)
  br label %.preheader62

._crit_edge73.split.us:                           ; preds = %._crit_edge71.us
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4980736) @f, i8 31, i64 4980736, i1 false)
  br i1 %12, label %.lr.ph76.preheader, label %.preheader62

.lr.ph76.preheader:                               ; preds = %._crit_edge73.split.us
  %xtraiter139 = and i64 %wide.trip.count104, 3
  %57 = icmp ult i32 %54, 4
  br i1 %57, label %.preheader62.loopexit.unr-lcssa, label %.lr.ph76.preheader.new

.lr.ph76.preheader.new:                           ; preds = %.lr.ph76.preheader
  %unroll_iter141 = and i64 %wide.trip.count104, 2147483644
  br label %.lr.ph76

.preheader62.loopexit.unr-lcssa:                  ; preds = %.lr.ph76, %.lr.ph76.preheader
  %indvars.iv106.unr = phi i64 [ 0, %.lr.ph76.preheader ], [ %indvars.iv.next107.3, %.lr.ph76 ]
  %lcmp.mod140.not = icmp eq i64 %xtraiter139, 0
  br i1 %lcmp.mod140.not, label %.preheader62, label %.lr.ph76.epil

.lr.ph76.epil:                                    ; preds = %.preheader62.loopexit.unr-lcssa, %.lr.ph76.epil
  %indvars.iv106.epil = phi i64 [ %indvars.iv.next107.epil, %.lr.ph76.epil ], [ %indvars.iv106.unr, %.preheader62.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph76.epil ], [ 0, %.preheader62.loopexit.unr-lcssa ]
  %58 = trunc nuw nsw i64 %indvars.iv106.epil to i32
  %59 = shl nuw i32 1, %58
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [65536 x [19 x i32]], ptr @f, i64 0, i64 %60, i64 %indvars.iv106.epil
  store i32 0, ptr %61, align 4, !tbaa !5
  %indvars.iv.next107.epil = add nuw nsw i64 %indvars.iv106.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter139
  br i1 %epil.iter.cmp.not, label %.preheader62, label %.lr.ph76.epil, !llvm.loop !14

.preheader62:                                     ; preds = %.preheader62.loopexit.unr-lcssa, %.lr.ph76.epil, %._crit_edge73.split.us.thread, %._crit_edge73.split.us
  %62 = phi i32 [ %.ph123, %._crit_edge73.split.us.thread ], [ %54, %._crit_edge73.split.us ], [ %54, %.lr.ph76.epil ], [ %54, %.preheader62.loopexit.unr-lcssa ]
  %63 = shl nuw i32 1, %62
  %64 = icmp sgt i32 %63, 1
  br i1 %64, label %.preheader60, label %._crit_edge84

.lr.ph76:                                         ; preds = %.lr.ph76, %.lr.ph76.preheader.new
  %indvars.iv106 = phi i64 [ 0, %.lr.ph76.preheader.new ], [ %indvars.iv.next107.3, %.lr.ph76 ]
  %niter142 = phi i64 [ 0, %.lr.ph76.preheader.new ], [ %niter142.next.3, %.lr.ph76 ]
  %65 = trunc nuw nsw i64 %indvars.iv106 to i32
  %66 = shl nuw i32 1, %65
  %67 = zext nneg i32 %66 to i64
  %68 = getelementptr inbounds [65536 x [19 x i32]], ptr @f, i64 0, i64 %67, i64 %indvars.iv106
  store i32 0, ptr %68, align 4, !tbaa !5
  %indvars.iv.next107 = or disjoint i64 %indvars.iv106, 1
  %69 = trunc nuw nsw i64 %indvars.iv.next107 to i32
  %70 = shl nuw i32 1, %69
  %71 = zext nneg i32 %70 to i64
  %72 = getelementptr inbounds [65536 x [19 x i32]], ptr @f, i64 0, i64 %71, i64 %indvars.iv.next107
  store i32 0, ptr %72, align 4, !tbaa !5
  %indvars.iv.next107.1 = or disjoint i64 %indvars.iv106, 2
  %73 = trunc nuw nsw i64 %indvars.iv.next107.1 to i32
  %74 = shl nuw i32 1, %73
  %75 = zext nneg i32 %74 to i64
  %76 = getelementptr inbounds [65536 x [19 x i32]], ptr @f, i64 0, i64 %75, i64 %indvars.iv.next107.1
  store i32 0, ptr %76, align 8, !tbaa !5
  %indvars.iv.next107.2 = or disjoint i64 %indvars.iv106, 3
  %77 = trunc nuw nsw i64 %indvars.iv.next107.2 to i32
  %78 = shl nuw i32 1, %77
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [65536 x [19 x i32]], ptr @f, i64 0, i64 %79, i64 %indvars.iv.next107.2
  store i32 0, ptr %80, align 4, !tbaa !5
  %indvars.iv.next107.3 = add nuw nsw i64 %indvars.iv106, 4
  %niter142.next.3 = add i64 %niter142, 4
  %niter142.ncmp.3 = icmp eq i64 %niter142.next.3, %unroll_iter141
  br i1 %niter142.ncmp.3, label %.preheader62.loopexit.unr-lcssa, label %.lr.ph76, !llvm.loop !16

.preheader60:                                     ; preds = %.preheader62, %._crit_edge82
  %81 = phi i32 [ %86, %._crit_edge82 ], [ %62, %.preheader62 ]
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %._crit_edge82 ], [ 1, %.preheader62 ]
  %82 = icmp sgt i32 %81, 0
  br i1 %82, label %.lr.ph81, label %._crit_edge82

.lr.ph81:                                         ; preds = %.preheader60
  %83 = trunc nuw nsw i64 %indvars.iv117 to i32
  br label %90

._crit_edge84:                                    ; preds = %._crit_edge82, %.preheader62
  %84 = phi i32 [ %62, %.preheader62 ], [ %86, %._crit_edge82 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 6000000, ptr %2, align 4, !tbaa !5
  %85 = icmp sgt i32 %84, 0
  br i1 %85, label %.lr.ph87, label %._crit_edge88.thread

._crit_edge82:                                    ; preds = %.loopexit, %.preheader60
  %86 = phi i32 [ %81, %.preheader60 ], [ %121, %.loopexit ]
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %87 = shl nuw i32 1, %86
  %88 = sext i32 %87 to i64
  %89 = icmp slt i64 %indvars.iv.next118, %88
  br i1 %89, label %.preheader60, label %._crit_edge84, !llvm.loop !17

90:                                               ; preds = %.lr.ph81, %.loopexit
  %91 = phi i32 [ %81, %.lr.ph81 ], [ %121, %.loopexit ]
  %92 = phi i32 [ %81, %.lr.ph81 ], [ %122, %.loopexit ]
  %indvars.iv114 = phi i64 [ 0, %.lr.ph81 ], [ %indvars.iv.next115, %.loopexit ]
  %93 = trunc nuw nsw i64 %indvars.iv114 to i32
  %94 = shl nuw i32 1, %93
  %95 = and i32 %94, %83
  %.not58 = icmp ne i32 %95, 0
  %96 = icmp sgt i32 %92, 0
  %or.cond = and i1 %.not58, %96
  br i1 %or.cond, label %.lr.ph78, label %.loopexit

.lr.ph78:                                         ; preds = %90
  %97 = getelementptr inbounds [65536 x [19 x i32]], ptr @f, i64 0, i64 %indvars.iv117, i64 %indvars.iv114
  br label %98

98:                                               ; preds = %.lr.ph78, %115
  %99 = phi i32 [ %91, %.lr.ph78 ], [ %116, %115 ]
  %100 = phi i32 [ %92, %.lr.ph78 ], [ %117, %115 ]
  %101 = phi i32 [ %92, %.lr.ph78 ], [ %118, %115 ]
  %indvars.iv111 = phi i64 [ 0, %.lr.ph78 ], [ %indvars.iv.next112, %115 ]
  %102 = trunc nuw nsw i64 %indvars.iv111 to i32
  %103 = shl nuw i32 1, %102
  %104 = and i32 %103, %83
  %.not59 = icmp eq i32 %104, 0
  br i1 %.not59, label %105, label %115

105:                                              ; preds = %98
  %106 = or i32 %103, %83
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [65536 x [19 x i32]], ptr @f, i64 0, i64 %107, i64 %indvars.iv111
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %109 = load i32, ptr %97, align 4, !tbaa !5
  %110 = getelementptr inbounds [19 x [19 x i32]], ptr @g, i64 0, i64 %indvars.iv114, i64 %indvars.iv111
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = add nsw i32 %111, %109
  store i32 %112, ptr %1, align 4, !tbaa !5
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %108, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %114 = load i32, ptr %113, align 4, !tbaa !5
  store i32 %114, ptr %108, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %.pre = load i32, ptr @m, align 4
  br label %115

115:                                              ; preds = %98, %105
  %116 = phi i32 [ %99, %98 ], [ %.pre, %105 ]
  %117 = phi i32 [ %100, %98 ], [ %.pre, %105 ]
  %118 = phi i32 [ %101, %98 ], [ %.pre, %105 ]
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %119 = sext i32 %118 to i64
  %120 = icmp slt i64 %indvars.iv.next112, %119
  br i1 %120, label %98, label %.loopexit, !llvm.loop !18

.loopexit:                                        ; preds = %115, %90
  %121 = phi i32 [ %91, %90 ], [ %116, %115 ]
  %122 = phi i32 [ %92, %90 ], [ %117, %115 ]
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %123 = sext i32 %122 to i64
  %124 = icmp slt i64 %indvars.iv.next115, %123
  br i1 %124, label %90, label %._crit_edge82, !llvm.loop !19

._crit_edge88:                                    ; preds = %.lr.ph87
  %125 = icmp slt i32 %131, 6000000
  br i1 %125, label %135, label %._crit_edge88.thread

.lr.ph87:                                         ; preds = %._crit_edge84, %.lr.ph87
  %indvars.iv120 = phi i64 [ %indvars.iv.next121, %.lr.ph87 ], [ 0, %._crit_edge84 ]
  %126 = phi i32 [ %132, %.lr.ph87 ], [ %84, %._crit_edge84 ]
  %notmask = shl nsw i32 -1, %126
  %127 = xor i32 %notmask, -1
  %128 = zext nneg i32 %127 to i64
  %129 = getelementptr inbounds [65536 x [19 x i32]], ptr @f, i64 0, i64 %128, i64 %indvars.iv120
  %130 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %129)
  %131 = load i32, ptr %130, align 4, !tbaa !5
  store i32 %131, ptr %2, align 4, !tbaa !5
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %132 = load i32, ptr @m, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = icmp slt i64 %indvars.iv.next121, %133
  br i1 %134, label %.lr.ph87, label %._crit_edge88, !llvm.loop !20

135:                                              ; preds = %._crit_edge88
  %136 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %131)
  br label %138

._crit_edge88.thread:                             ; preds = %._crit_edge84, %._crit_edge88
  %137 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %138

138:                                              ; preds = %._crit_edge88.thread, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %139 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %140 = icmp eq i32 %139, 2
  br i1 %140, label %.lr.ph90, label %._crit_edge91, !llvm.loop !21

._crit_edge91:                                    ; preds = %138, %0
  ret i32 0
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


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