; LLVM IR from tangjz/acm-icpc :: timus (1954)

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

%"struct.std::pair" = type { i32, i32 }
%struct.Border = type { i32, i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@f = external dso_local global [2 x [100003 x %"struct.std::pair"]], align 16
@g = external dso_local global [2 x [100003 x %"struct.std::pair"]], align 16
@str = external dso_local global [100003 x i8], align 16
@seq = external dso_local global [19 x %struct.Border], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ4mainE3tmp = external hidden global [19 x %struct.Border], align 16
@_ZL4maxn = external hidden constant i32, align 4
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca [19 x i32], align 16
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i8, align 1
  store i32 0, ptr %1, align 4
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef getelementptr inbounds (i8, ptr @str, i64 1))
  %22 = call i64 @strlen(ptr noundef getelementptr inbounds (i8, ptr @str, i64 1)) #10
  %23 = trunc i64 %22 to i32
  store i32 %23, ptr @n, align 4, !tbaa !5
  store i32 -100003, ptr getelementptr inbounds (%struct.Border, ptr @seq, i32 0, i32 2), align 8, !tbaa !9
  store i32 100003, ptr getelementptr inbounds ([2 x [100003 x %"struct.std::pair"]], ptr @f, i64 0, i64 1), align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #11
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %24

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

28:                                               ; preds = %24
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #11
  br label %260

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #11
  %30 = load i32, ptr @m, align 4, !tbaa !5
  store i32 %30, ptr %4, align 4, !tbaa !5
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = mul i64 %32, 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 getelementptr inbounds (%struct.Border, ptr @_ZZ4mainE3tmp, i64 1), ptr align 4 getelementptr inbounds (%struct.Border, ptr @seq, i64 1), i64 %33, i1 false)
  store i32 0, ptr @m, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #11
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %116, %29
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = icmp sle i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #11
  br label %119

39:                                               ; preds = %34
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [19 x %struct.Border], ptr @_ZZ4mainE3tmp, i64 0, i64 %41
  %43 = getelementptr inbounds %struct.Border, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 4, !tbaa !13
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !14
  %48 = sext i8 %47 to i32
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %50
  %52 = load i8, ptr %51, align 1, !tbaa !14
  %53 = sext i8 %52 to i32
  %54 = icmp eq i32 %48, %53
  br i1 %54, label %55, label %68

55:                                               ; preds = %39
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [19 x %struct.Border], ptr @_ZZ4mainE3tmp, i64 0, i64 %57
  %59 = getelementptr inbounds %struct.Border, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 4, !tbaa !13
  %61 = sub nsw i32 %60, 1
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [19 x %struct.Border], ptr @_ZZ4mainE3tmp, i64 0, i64 %63
  %65 = getelementptr inbounds %struct.Border, ptr %64, i32 0, i32 0
  %66 = load i32, ptr %65, align 4, !tbaa !13
  %67 = sub nsw i32 %66, 1
  call void @_Z6appendii(i32 noundef %61, i32 noundef %67)
  br label %68

68:                                               ; preds = %55, %39
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [19 x %struct.Border], ptr @_ZZ4mainE3tmp, i64 0, i64 %70
  %72 = getelementptr inbounds %struct.Border, ptr %71, i32 0, i32 0
  %73 = load i32, ptr %72, align 4, !tbaa !13
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [19 x %struct.Border], ptr @_ZZ4mainE3tmp, i64 0, i64 %75
  %77 = getelementptr inbounds %struct.Border, ptr %76, i32 0, i32 2
  %78 = load i32, ptr %77, align 4, !tbaa !9
  %79 = icmp ne i32 %73, %78
  br i1 %79, label %80, label %115

80:                                               ; preds = %68
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [19 x %struct.Border], ptr @_ZZ4mainE3tmp, i64 0, i64 %82
  %84 = getelementptr inbounds %struct.Border, ptr %83, i32 0, i32 2
  %85 = load i32, ptr %84, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %86
  %88 = load i8, ptr %87, align 1, !tbaa !14
  %89 = sext i8 %88 to i32
  %90 = load i32, ptr %2, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %91
  %93 = load i8, ptr %92, align 1, !tbaa !14
  %94 = sext i8 %93 to i32
  %95 = icmp eq i32 %89, %94
  br i1 %95, label %96, label %115

96:                                               ; preds = %80
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [19 x %struct.Border], ptr @_ZZ4mainE3tmp, i64 0, i64 %98
  %100 = getelementptr inbounds %struct.Border, ptr %99, i32 0, i32 0
  %101 = load i32, ptr %100, align 4, !tbaa !13
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [19 x %struct.Border], ptr @_ZZ4mainE3tmp, i64 0, i64 %103
  %105 = getelementptr inbounds %struct.Border, ptr %104, i32 0, i32 1
  %106 = load i32, ptr %105, align 4, !tbaa !15
  %107 = add nsw i32 %101, %106
  %108 = sub nsw i32 %107, 1
  %109 = load i32, ptr %5, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [19 x %struct.Border], ptr @_ZZ4mainE3tmp, i64 0, i64 %110
  %112 = getelementptr inbounds %struct.Border, ptr %111, i32 0, i32 2
  %113 = load i32, ptr %112, align 4, !tbaa !9
  %114 = sub nsw i32 %113, 1
  call void @_Z6appendii(i32 noundef %108, i32 noundef %114)
  br label %115

115:                                              ; preds = %96, %80, %68
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %5, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %5, align 4, !tbaa !5
  br label %34, !llvm.loop !16

119:                                              ; preds = %38
  %120 = load i32, ptr %2, align 4, !tbaa !5
  %121 = sub nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %122
  %124 = load i8, ptr %123, align 1, !tbaa !14
  %125 = sext i8 %124 to i32
  %126 = load i32, ptr %2, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %127
  %129 = load i8, ptr %128, align 1, !tbaa !14
  %130 = sext i8 %129 to i32
  %131 = icmp eq i32 %125, %130
  br i1 %131, label %132, label %137

132:                                              ; preds = %119
  %133 = load i32, ptr %2, align 4, !tbaa !5
  %134 = sub nsw i32 %133, 2
  %135 = load i32, ptr %2, align 4, !tbaa !5
  %136 = sub nsw i32 %135, 2
  call void @_Z6appendii(i32 noundef %134, i32 noundef %136)
  br label %137

137:                                              ; preds = %132, %119
  %138 = load i32, ptr %2, align 4, !tbaa !5
  %139 = sub nsw i32 %138, 1
  %140 = load i32, ptr %2, align 4, !tbaa !5
  %141 = sub nsw i32 %140, 1
  call void @_Z6appendii(i32 noundef %139, i32 noundef %141)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #11
  %142 = call i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL4maxn, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %142, ptr %6, align 4
  %143 = load i32, ptr %2, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds ([2 x [100003 x %"struct.std::pair"]], ptr @f, i64 0, i64 1), i64 0, i64 %144
  %146 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %145, ptr noundef nonnull align 4 dereferenceable(8) %6) #11
  %147 = load i32, ptr %2, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @f, i64 0, i64 %148
  %150 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %149, ptr noundef nonnull align 4 dereferenceable(8) %146)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #11
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %253, %137
  %152 = load i32, ptr %7, align 4, !tbaa !5
  %153 = load i32, ptr @m, align 4, !tbaa !5
  %154 = icmp sle i32 %152, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #11
  br label %256

156:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #11
  %157 = load i32, ptr %7, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [19 x %struct.Border], ptr @seq, i64 0, i64 %158
  %160 = getelementptr inbounds %struct.Border, ptr %159, i32 0, i32 2
  %161 = load i32, ptr %160, align 4, !tbaa !9
  store i32 %161, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #11
  %162 = load i32, ptr %8, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds ([2 x [100003 x %"struct.std::pair"]], ptr @f, i64 0, i64 1), i64 0, i64 %163
  %165 = getelementptr inbounds %"struct.std::pair", ptr %164, i32 0, i32 0
  %166 = load i32, ptr %165, align 8, !tbaa !11
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %10, align 4, !tbaa !5
  %168 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %168, ptr %9, align 4
  %169 = load i32, ptr %8, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @g, i64 0, i64 %170
  %172 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %171, ptr noundef nonnull align 4 dereferenceable(8) %9) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #11
  %173 = load i32, ptr %8, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @f, i64 0, i64 %174
  %176 = getelementptr inbounds %"struct.std::pair", ptr %175, i32 0, i32 0
  %177 = load i32, ptr %176, align 8, !tbaa !11
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %12, align 4, !tbaa !5
  %179 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %179, ptr %11, align 4
  %180 = load i32, ptr %8, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds ([2 x [100003 x %"struct.std::pair"]], ptr @g, i64 0, i64 1), i64 0, i64 %181
  %183 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %182, ptr noundef nonnull align 4 dereferenceable(8) %11) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #11
  %184 = load i32, ptr %7, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [19 x %struct.Border], ptr @seq, i64 0, i64 %185
  %187 = getelementptr inbounds %struct.Border, ptr %186, i32 0, i32 0
  %188 = load i32, ptr %187, align 4, !tbaa !13
  %189 = load i32, ptr %7, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [19 x %struct.Border], ptr @seq, i64 0, i64 %190
  %192 = getelementptr inbounds %struct.Border, ptr %191, i32 0, i32 2
  %193 = load i32, ptr %192, align 4, !tbaa !9
  %194 = icmp ne i32 %188, %193
  br i1 %194, label %195, label %230

195:                                              ; preds = %156
  %196 = load i32, ptr %8, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @g, i64 0, i64 %197
  %199 = load i32, ptr %8, align 4, !tbaa !5
  %200 = load i32, ptr %7, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [19 x %struct.Border], ptr @seq, i64 0, i64 %201
  %203 = getelementptr inbounds %struct.Border, ptr %202, i32 0, i32 1
  %204 = load i32, ptr %203, align 4, !tbaa !15
  %205 = sub nsw i32 %199, %204
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @g, i64 0, i64 %206
  %208 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3minISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %198, ptr noundef nonnull align 4 dereferenceable(8) %207)
  %209 = load i32, ptr %8, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @g, i64 0, i64 %210
  %212 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %211, ptr noundef nonnull align 4 dereferenceable(8) %208)
  %213 = load i32, ptr %8, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds ([2 x [100003 x %"struct.std::pair"]], ptr @g, i64 0, i64 1), i64 0, i64 %214
  %216 = load i32, ptr %8, align 4, !tbaa !5
  %217 = load i32, ptr %7, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [19 x %struct.Border], ptr @seq, i64 0, i64 %218
  %220 = getelementptr inbounds %struct.Border, ptr %219, i32 0, i32 1
  %221 = load i32, ptr %220, align 4, !tbaa !15
  %222 = sub nsw i32 %216, %221
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds ([2 x [100003 x %"struct.std::pair"]], ptr @g, i64 0, i64 1), i64 0, i64 %223
  %225 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3minISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %215, ptr noundef nonnull align 4 dereferenceable(8) %224)
  %226 = load i32, ptr %8, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds ([2 x [100003 x %"struct.std::pair"]], ptr @g, i64 0, i64 1), i64 0, i64 %227
  %229 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %228, ptr noundef nonnull align 4 dereferenceable(8) %225)
  br label %230

230:                                              ; preds = %195, %156
  %231 = load i32, ptr %2, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @f, i64 0, i64 %232
  %234 = load i32, ptr %8, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @g, i64 0, i64 %235
  %237 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3minISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %233, ptr noundef nonnull align 4 dereferenceable(8) %236)
  %238 = load i32, ptr %2, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @f, i64 0, i64 %239
  %241 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %240, ptr noundef nonnull align 4 dereferenceable(8) %237)
  %242 = load i32, ptr %2, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds ([2 x [100003 x %"struct.std::pair"]], ptr @f, i64 0, i64 1), i64 0, i64 %243
  %245 = load i32, ptr %8, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds ([2 x [100003 x %"struct.std::pair"]], ptr @g, i64 0, i64 1), i64 0, i64 %246
  %248 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3minISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %244, ptr noundef nonnull align 4 dereferenceable(8) %247)
  %249 = load i32, ptr %2, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds ([2 x [100003 x %"struct.std::pair"]], ptr @f, i64 0, i64 1), i64 0, i64 %250
  %252 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %251, ptr noundef nonnull align 4 dereferenceable(8) %248)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #11
  br label %253

253:                                              ; preds = %230
  %254 = load i32, ptr %7, align 4, !tbaa !5
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %7, align 4, !tbaa !5
  br label %151, !llvm.loop !18

256:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #11
  br label %257

257:                                              ; preds = %256
  %258 = load i32, ptr %2, align 4, !tbaa !5
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %2, align 4, !tbaa !5
  br label %24, !llvm.loop !19

260:                                              ; preds = %28
  %261 = load i32, ptr @n, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds ([2 x [100003 x %"struct.std::pair"]], ptr @f, i64 0, i64 1), i64 0, i64 %262
  %264 = getelementptr inbounds %"struct.std::pair", ptr %263, i32 0, i32 0
  %265 = load i32, ptr %264, align 8, !tbaa !11
  %266 = icmp sle i32 %265, 5
  br i1 %266, label %267, label %406

267:                                              ; preds = %260
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #11
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 76, ptr %14) #11
  call void @llvm.memset.p0.i64(ptr align 16 %14, i8 0, i64 76, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #11
  %268 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %268, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #11
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %269

269:                                              ; preds = %274, %267
  %270 = load i32, ptr %15, align 4, !tbaa !5
  %271 = icmp ne i32 %270, 0
  br i1 %271, label %273, label %272

272:                                              ; preds = %269
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #11
  br label %292

273:                                              ; preds = %269
  br label %274

274:                                              ; preds = %273
  %275 = load i32, ptr %15, align 4, !tbaa !5
  %276 = load i32, ptr %13, align 4, !tbaa !5
  %277 = add nsw i32 %276, 1
  store i32 %277, ptr %13, align 4, !tbaa !5
  %278 = sext i32 %276 to i64
  %279 = getelementptr inbounds [19 x i32], ptr %14, i64 0, i64 %278
  store i32 %275, ptr %279, align 4, !tbaa !5
  %280 = load i32, ptr %16, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [2 x [100003 x %"struct.std::pair"]], ptr @f, i64 0, i64 %281
  %283 = load i32, ptr %15, align 4, !tbaa !5
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr %282, i64 0, i64 %284
  %286 = getelementptr inbounds %"struct.std::pair", ptr %285, i32 0, i32 1
  %287 = load i32, ptr %286, align 4, !tbaa !20
  store i32 %287, ptr %15, align 4, !tbaa !5
  %288 = load i32, ptr %16, align 4, !tbaa !5
  %289 = icmp ne i32 %288, 0
  %290 = xor i1 %289, true
  %291 = zext i1 %290 to i32
  store i32 %291, ptr %16, align 4, !tbaa !5
  br label %269, !llvm.loop !21

292:                                              ; preds = %272
  br label %293

293:                                              ; preds = %339, %292
  %294 = load i32, ptr %13, align 4, !tbaa !5
  %295 = icmp slt i32 %294, 5
  br i1 %295, label %296, label %361

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

297:                                              ; preds = %316, %296
  %298 = load i32, ptr %17, align 4, !tbaa !5
  %299 = load i32, ptr %13, align 4, !tbaa !5
  %300 = icmp slt i32 %298, %299
  br i1 %300, label %301, label %313

301:                                              ; preds = %297
  %302 = load i32, ptr %17, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [19 x i32], ptr %14, i64 0, i64 %303
  %305 = load i32, ptr %304, align 4, !tbaa !5
  %306 = load i32, ptr %17, align 4, !tbaa !5
  %307 = add nsw i32 %306, 1
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [19 x i32], ptr %14, i64 0, i64 %308
  %310 = load i32, ptr %309, align 4, !tbaa !5
  %311 = sub nsw i32 %305, %310
  %312 = icmp sle i32 %311, 2
  br label %313

313:                                              ; preds = %301, %297
  %314 = phi i1 [ false, %297 ], [ %312, %301 ]
  br i1 %314, label %315, label %319

315:                                              ; preds = %313
  br label %316

316:                                              ; preds = %315
  %317 = load i32, ptr %17, align 4, !tbaa !5
  %318 = add nsw i32 %317, 1
  store i32 %318, ptr %17, align 4, !tbaa !5
  br label %297, !llvm.loop !22

319:                                              ; preds = %313
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #11
  %320 = load i32, ptr %13, align 4, !tbaa !5
  %321 = sub nsw i32 %320, 1
  store i32 %321, ptr %18, align 4, !tbaa !5
  br label %322

322:                                              ; preds = %336, %319
  %323 = load i32, ptr %18, align 4, !tbaa !5
  %324 = load i32, ptr %17, align 4, !tbaa !5
  %325 = icmp sgt i32 %323, %324
  br i1 %325, label %327, label %326

326:                                              ; preds = %322
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #11
  br label %339

327:                                              ; preds = %322
  %328 = load i32, ptr %18, align 4, !tbaa !5
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds [19 x i32], ptr %14, i64 0, i64 %329
  %331 = load i32, ptr %330, align 4, !tbaa !5
  %332 = load i32, ptr %18, align 4, !tbaa !5
  %333 = add nsw i32 %332, 2
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds [19 x i32], ptr %14, i64 0, i64 %334
  store i32 %331, ptr %335, align 4, !tbaa !5
  br label %336

336:                                              ; preds = %327
  %337 = load i32, ptr %18, align 4, !tbaa !5
  %338 = add nsw i32 %337, -1
  store i32 %338, ptr %18, align 4, !tbaa !5
  br label %322, !llvm.loop !23

339:                                              ; preds = %326
  %340 = load i32, ptr %17, align 4, !tbaa !5
  %341 = sext i32 %340 to i64
  %342 = getelementptr inbounds [19 x i32], ptr %14, i64 0, i64 %341
  %343 = load i32, ptr %342, align 4, !tbaa !5
  %344 = sub nsw i32 %343, 1
  %345 = load i32, ptr %17, align 4, !tbaa !5
  %346 = add nsw i32 %345, 1
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds [19 x i32], ptr %14, i64 0, i64 %347
  store i32 %344, ptr %348, align 4, !tbaa !5
  %349 = load i32, ptr %17, align 4, !tbaa !5
  %350 = add nsw i32 %349, 3
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds [19 x i32], ptr %14, i64 0, i64 %351
  %353 = load i32, ptr %352, align 4, !tbaa !5
  %354 = add nsw i32 %353, 1
  %355 = load i32, ptr %17, align 4, !tbaa !5
  %356 = add nsw i32 %355, 2
  %357 = sext i32 %356 to i64
  %358 = getelementptr inbounds [19 x i32], ptr %14, i64 0, i64 %357
  store i32 %354, ptr %358, align 4, !tbaa !5
  %359 = load i32, ptr %13, align 4, !tbaa !5
  %360 = add nsw i32 %359, 2
  store i32 %360, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #11
  br label %293, !llvm.loop !24

361:                                              ; preds = %293
  %362 = call i32 @puts(ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #11
  %363 = load i32, ptr %13, align 4, !tbaa !5
  %364 = sub nsw i32 %363, 1
  store i32 %364, ptr %19, align 4, !tbaa !5
  br label %365

365:                                              ; preds = %402, %361
  %366 = load i32, ptr %19, align 4, !tbaa !5
  %367 = icmp sge i32 %366, 0
  br i1 %367, label %369, label %368

368:                                              ; preds = %365
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #11
  br label %405

369:                                              ; preds = %365
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #11
  %370 = load i32, ptr %19, align 4, !tbaa !5
  %371 = sext i32 %370 to i64
  %372 = getelementptr inbounds [19 x i32], ptr %14, i64 0, i64 %371
  %373 = load i32, ptr %372, align 4, !tbaa !5
  %374 = add nsw i32 %373, 1
  %375 = sext i32 %374 to i64
  %376 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %375
  %377 = load i8, ptr %376, align 1, !tbaa !14
  store i8 %377, ptr %20, align 1, !tbaa !14
  %378 = load i32, ptr %19, align 4, !tbaa !5
  %379 = sext i32 %378 to i64
  %380 = getelementptr inbounds [19 x i32], ptr %14, i64 0, i64 %379
  %381 = load i32, ptr %380, align 4, !tbaa !5
  %382 = add nsw i32 %381, 1
  %383 = sext i32 %382 to i64
  %384 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %383
  store i8 0, ptr %384, align 1, !tbaa !14
  %385 = load i32, ptr %19, align 4, !tbaa !5
  %386 = add nsw i32 %385, 1
  %387 = sext i32 %386 to i64
  %388 = getelementptr inbounds [19 x i32], ptr %14, i64 0, i64 %387
  %389 = load i32, ptr %388, align 4, !tbaa !5
  %390 = sext i32 %389 to i64
  %391 = getelementptr inbounds i8, ptr @str, i64 %390
  %392 = getelementptr inbounds i8, ptr %391, i64 1
  %393 = call i32 @puts(ptr noundef %392)
  %394 = load i8, ptr %20, align 1, !tbaa !14
  %395 = load i32, ptr %19, align 4, !tbaa !5
  %396 = sext i32 %395 to i64
  %397 = getelementptr inbounds [19 x i32], ptr %14, i64 0, i64 %396
  %398 = load i32, ptr %397, align 4, !tbaa !5
  %399 = add nsw i32 %398, 1
  %400 = sext i32 %399 to i64
  %401 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %400
  store i8 %394, ptr %401, align 1, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #11
  br label %402

402:                                              ; preds = %369
  %403 = load i32, ptr %19, align 4, !tbaa !5
  %404 = add nsw i32 %403, -1
  store i32 %404, ptr %19, align 4, !tbaa !5
  br label %365, !llvm.loop !25

405:                                              ; preds = %368
  call void @llvm.lifetime.end.p0(i64 76, ptr %14) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #11
  br label %408

406:                                              ; preds = %260
  %407 = call i32 @puts(ptr noundef @.str.2)
  br label %408

408:                                              ; preds = %406, %405
  ret i32 0
}

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z6appendii(i32 noundef, i32 noundef) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

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

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

declare i32 @puts(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 = { nounwind willreturn memory(read) "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #7 = { 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 #8 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { 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 = !{!10, !6, i64 8}
!10 = !{!"_ZTS6Border", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!13 = !{!10, !6, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!10, !6, i64 4}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = !{!12, !6, i64 4}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !17}
!25 = distinct !{!25, !17}


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

%"struct.std::pair" = type { i32, i32 }
%struct.Border = type { i32, i32, i32 }

@n = external dso_local local_unnamed_addr global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4
@f = external dso_local global [2 x [100003 x %"struct.std::pair"]], align 16
@g = external dso_local global [2 x [100003 x %"struct.std::pair"]], align 16
@str = external dso_local global [100003 x i8], align 16
@seq = external dso_local local_unnamed_addr global [19 x %struct.Border], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ4mainE3tmp = external hidden local_unnamed_addr global [19 x %struct.Border], align 16
@_ZL4maxn = external hidden constant i32, align 4
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca %"struct.std::pair", align 8
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  %8 = alloca [19 x i32], align 16
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 1))
  %10 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @str, i64 1)) #10
  %11 = trunc i64 %10 to i32
  store i32 %11, ptr @n, align 4, !tbaa !5
  store i32 -100003, ptr getelementptr inbounds (i8, ptr @seq, i64 8), align 8, !tbaa !9
  store i32 100003, ptr getelementptr inbounds (i8, ptr @f, i64 800024), align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #11
  store i32 1, ptr %1, align 4, !tbaa !5
  %.not74 = icmp slt i32 %11, 1
  br i1 %.not74, label %._crit_edge77, label %.lr.ph76.preheader

.lr.ph76.preheader:                               ; preds = %0
  %.pre = load i32, ptr @m, align 4, !tbaa !5
  br label %.lr.ph76

._crit_edge77:                                    ; preds = %._crit_edge73, %0
  %.05478 = phi i32 [ %11, %0 ], [ %78, %._crit_edge73 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #11
  %12 = sext i32 %.05478 to i64
  %13 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @f, i64 800024), i64 0, i64 %12
  %14 = load i32, ptr %13, align 8, !tbaa !11
  %15 = icmp slt i32 %14, 6
  br i1 %15, label %154, label %272

.lr.ph76:                                         ; preds = %.lr.ph76.preheader, %._crit_edge73
  %16 = phi i32 [ 1, %.lr.ph76.preheader ], [ %77, %._crit_edge73 ]
  %17 = phi i32 [ %.pre, %.lr.ph76.preheader ], [ %75, %._crit_edge73 ]
  %18 = sext i32 %17 to i64
  %19 = mul nsw i64 %18, 12
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ4mainE3tmp, i64 12), ptr nonnull align 4 getelementptr inbounds (i8, ptr @seq, i64 12), i64 %19, i1 false)
  store i32 0, ptr @m, align 4, !tbaa !5
  %.not6267 = icmp slt i32 %17, 1
  br i1 %.not6267, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph76
  %20 = add nuw i32 %17, 1
  %wide.trip.count = zext i32 %20 to i64
  br label %.lr.ph

._crit_edge.loopexit:                             ; preds = %61
  %.pre126 = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph76
  %21 = phi i32 [ %.pre126, %._crit_edge.loopexit ], [ %16, %.lr.ph76 ]
  %22 = add nsw i32 %21, -1
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %23
  %25 = load i8, ptr %24, align 1, !tbaa !13
  %26 = sext i32 %21 to i64
  %27 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %26
  %28 = load i8, ptr %27, align 1, !tbaa !13
  %29 = icmp eq i8 %25, %28
  br i1 %29, label %62, label %64

.lr.ph:                                           ; preds = %.lr.ph.preheader, %61
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %61 ]
  %30 = getelementptr inbounds [19 x %struct.Border], ptr @_ZZ4mainE3tmp, i64 0, i64 %indvars.iv
  %31 = load i32, ptr %30, align 4, !tbaa !14
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %32
  %34 = load i8, ptr %33, align 1, !tbaa !13
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %36
  %38 = load i8, ptr %37, align 1, !tbaa !13
  %39 = icmp eq i8 %34, %38
  br i1 %39, label %40, label %42

40:                                               ; preds = %.lr.ph
  %41 = add nsw i32 %31, -1
  call void @_Z6appendii(i32 noundef %41, i32 noundef %41)
  %.pre125 = load i32, ptr %30, align 4, !tbaa !14
  br label %42

42:                                               ; preds = %40, %.lr.ph
  %43 = phi i32 [ %.pre125, %40 ], [ %31, %.lr.ph ]
  %44 = getelementptr inbounds i8, ptr %30, i64 8
  %45 = load i32, ptr %44, align 4, !tbaa !9
  %.not65 = icmp eq i32 %43, %45
  br i1 %.not65, label %61, label %46

46:                                               ; preds = %42
  %47 = sext i32 %45 to i64
  %48 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !13
  %50 = load i32, ptr %1, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !13
  %54 = icmp eq i8 %49, %53
  br i1 %54, label %55, label %61

55:                                               ; preds = %46
  %56 = getelementptr inbounds i8, ptr %30, i64 4
  %57 = load i32, ptr %56, align 4, !tbaa !15
  %58 = add i32 %43, -1
  %59 = add i32 %58, %57
  %60 = add nsw i32 %45, -1
  call void @_Z6appendii(i32 noundef %59, i32 noundef %60)
  br label %61

61:                                               ; preds = %42, %46, %55
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !16

62:                                               ; preds = %._crit_edge
  %63 = add nsw i32 %21, -2
  call void @_Z6appendii(i32 noundef %63, i32 noundef %63)
  %.pre127 = load i32, ptr %1, align 4, !tbaa !5
  %.pre129 = add nsw i32 %.pre127, -1
  br label %64

64:                                               ; preds = %62, %._crit_edge
  %.pre-phi = phi i32 [ %.pre129, %62 ], [ %22, %._crit_edge ]
  call void @_Z6appendii(i32 noundef %.pre-phi, i32 noundef %.pre-phi)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #11
  %65 = call i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL4maxn, ptr noundef nonnull align 4 dereferenceable(4) %1)
  store i64 %65, ptr %2, align 8
  %66 = load i32, ptr %1, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @f, i64 800024), i64 0, i64 %67
  %69 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %68, ptr noundef nonnull align 4 dereferenceable(8) %2) #11
  %70 = load i32, ptr %1, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @f, i64 0, i64 %71
  %73 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %72, ptr noundef nonnull align 4 dereferenceable(8) %69)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #11
  %74 = load i32, ptr @m, align 4, !tbaa !5
  %.not6369 = icmp slt i32 %74, 1
  br i1 %.not6369, label %._crit_edge73, label %.lr.ph72

._crit_edge73:                                    ; preds = %129, %64
  %75 = phi i32 [ %74, %64 ], [ %152, %129 ]
  %76 = load i32, ptr %1, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %1, align 4, !tbaa !5
  %78 = load i32, ptr @n, align 4, !tbaa !5
  %.not.not = icmp slt i32 %76, %78
  br i1 %.not.not, label %.lr.ph76, label %._crit_edge77, !llvm.loop !18

.lr.ph72:                                         ; preds = %64, %129
  %indvars.iv102 = phi i64 [ %indvars.iv.next103, %129 ], [ 1, %64 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #11
  %79 = getelementptr inbounds [19 x %struct.Border], ptr @seq, i64 0, i64 %indvars.iv102
  %80 = getelementptr inbounds i8, ptr %79, i64 8
  %81 = load i32, ptr %80, align 4, !tbaa !9
  store i32 %81, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #11
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @f, i64 800024), i64 0, i64 %82
  %84 = load i32, ptr %83, align 8, !tbaa !11
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %5, align 4, !tbaa !5
  %86 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %86, ptr %4, align 8
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @g, i64 0, i64 %88
  %90 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %89, ptr noundef nonnull align 4 dereferenceable(8) %4) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #11
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @f, i64 0, i64 %92
  %94 = load i32, ptr %93, align 8, !tbaa !11
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %7, align 4, !tbaa !5
  %96 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %96, ptr %6, align 8
  %97 = load i32, ptr %3, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @g, i64 800024), i64 0, i64 %98
  %100 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %99, ptr noundef nonnull align 4 dereferenceable(8) %6) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #11
  %101 = load i32, ptr %79, align 4, !tbaa !14
  %102 = load i32, ptr %80, align 4, !tbaa !9
  %.not64 = icmp eq i32 %101, %102
  br i1 %.not64, label %129, label %103

103:                                              ; preds = %.lr.ph72
  %104 = load i32, ptr %3, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @g, i64 0, i64 %105
  %107 = getelementptr inbounds i8, ptr %79, i64 4
  %108 = load i32, ptr %107, align 4, !tbaa !15
  %109 = sub nsw i32 %104, %108
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @g, i64 0, i64 %110
  %112 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3minISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %106, ptr noundef nonnull align 4 dereferenceable(8) %111)
  %113 = load i32, ptr %3, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @g, i64 0, i64 %114
  %116 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %115, ptr noundef nonnull align 4 dereferenceable(8) %112)
  %117 = load i32, ptr %3, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @g, i64 800024), i64 0, i64 %118
  %120 = load i32, ptr %107, align 4, !tbaa !15
  %121 = sub nsw i32 %117, %120
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @g, i64 800024), i64 0, i64 %122
  %124 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3minISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %119, ptr noundef nonnull align 4 dereferenceable(8) %123)
  %125 = load i32, ptr %3, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @g, i64 800024), i64 0, i64 %126
  %128 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %127, ptr noundef nonnull align 4 dereferenceable(8) %124)
  br label %129

129:                                              ; preds = %103, %.lr.ph72
  %130 = load i32, ptr %1, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @f, i64 0, i64 %131
  %133 = load i32, ptr %3, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @g, i64 0, i64 %134
  %136 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3minISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %132, ptr noundef nonnull align 4 dereferenceable(8) %135)
  %137 = load i32, ptr %1, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @f, i64 0, i64 %138
  %140 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %139, ptr noundef nonnull align 4 dereferenceable(8) %136)
  %141 = load i32, ptr %1, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @f, i64 800024), i64 0, i64 %142
  %144 = load i32, ptr %3, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @g, i64 800024), i64 0, i64 %145
  %147 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3minISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %143, ptr noundef nonnull align 4 dereferenceable(8) %146)
  %148 = load i32, ptr %1, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @f, i64 800024), i64 0, i64 %149
  %151 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %150, ptr noundef nonnull align 4 dereferenceable(8) %147)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #11
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %152 = load i32, ptr @m, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %.not63.not = icmp slt i64 %indvars.iv102, %153
  br i1 %.not63.not, label %.lr.ph72, label %._crit_edge73, !llvm.loop !19

154:                                              ; preds = %._crit_edge77
  call void @llvm.lifetime.start.p0(i64 76, ptr nonnull %8) #11
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(76) %8, i8 0, i64 76, i1 false)
  %.not6079 = icmp eq i32 %.05478, 0
  br i1 %.not6079, label %.preheader.preheader, label %.lr.ph84

.preheader66:                                     ; preds = %.lr.ph84
  %155 = trunc nuw i64 %indvars.iv.next106 to i32
  %156 = icmp ult i64 %indvars.iv105, 4
  br i1 %156, label %.preheader.preheader, label %._crit_edge92

.preheader.preheader:                             ; preds = %154, %.preheader66
  %.055.lcssa132 = phi i32 [ %155, %.preheader66 ], [ 0, %154 ]
  %157 = add nsw i32 %.055.lcssa132, -1
  %158 = sext i32 %157 to i64
  %159 = zext nneg i32 %.055.lcssa132 to i64
  br label %165

.lr.ph84:                                         ; preds = %154, %.lr.ph84
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %.lr.ph84 ], [ 0, %154 ]
  %.05482 = phi i32 [ %.054, %.lr.ph84 ], [ %.05478, %154 ]
  %.05381 = phi i32 [ %164, %.lr.ph84 ], [ 1, %154 ]
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %160 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %indvars.iv105
  store i32 %.05482, ptr %160, align 4, !tbaa !5
  %161 = zext nneg i32 %.05381 to i64
  %162 = sext i32 %.05482 to i64
  %163 = getelementptr inbounds [2 x [100003 x %"struct.std::pair"]], ptr @f, i64 0, i64 %161, i64 %162, i32 1
  %164 = xor i32 %.05381, 1
  %.054 = load i32, ptr %163, align 4, !tbaa !5
  %.not60 = icmp eq i32 %.054, 0
  br i1 %.not60, label %.preheader66, label %.lr.ph84, !llvm.loop !20

165:                                              ; preds = %.preheader.preheader, %166
  %indvars.iv108 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next109, %166 ]
  %exitcond112.not = icmp eq i64 %indvars.iv108, %159
  br i1 %exitcond112.not, label %.critedge, label %166

166:                                              ; preds = %165
  %167 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %indvars.iv108
  %168 = load i32, ptr %167, align 4, !tbaa !5
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %169 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %indvars.iv.next109
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = sub nsw i32 %168, %170
  %172 = icmp slt i32 %171, 3
  br i1 %172, label %165, label %.critedge, !llvm.loop !21

.critedge:                                        ; preds = %165, %166
  %.052.lcssa.in = phi i64 [ %159, %165 ], [ %indvars.iv108, %166 ]
  %173 = add nsw i64 %159, -1
  %sext130 = shl i64 %.052.lcssa.in, 32
  %174 = ashr exact i64 %sext130, 32
  %175 = icmp sgt i64 %173, %174
  br i1 %175, label %.lr.ph89, label %._crit_edge90

._crit_edge90:                                    ; preds = %.lr.ph89, %.critedge
  %176 = and i64 %.052.lcssa.in, 4294967295
  %177 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = add nsw i32 %178, -1
  %180 = add nuw i64 %.052.lcssa.in, 1
  %181 = and i64 %180, 4294967295
  %182 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %181
  store i32 %179, ptr %182, align 4, !tbaa !5
  %183 = add nuw i64 %.052.lcssa.in, 3
  %184 = and i64 %183, 4294967295
  %185 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = add nsw i32 %186, 1
  %188 = add nuw i64 %.052.lcssa.in, 2
  %189 = and i64 %188, 4294967295
  %190 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %189
  store i32 %187, ptr %190, align 4, !tbaa !5
  %indvars.iv.next119 = add nuw nsw i64 %159, 2
  %191 = icmp ult i32 %.055.lcssa132, 3
  %indvars.iv.next114 = add nsw i64 %158, 2
  br i1 %191, label %.preheader.1, label %._crit_edge92.loopexit, !llvm.loop !22

.preheader.1:                                     ; preds = %._crit_edge90, %192
  %indvars.iv108.1 = phi i64 [ %indvars.iv.next109.1, %192 ], [ 0, %._crit_edge90 ]
  %exitcond112.not.1 = icmp eq i64 %indvars.iv108.1, %indvars.iv.next119
  br i1 %exitcond112.not.1, label %.critedge.1, label %192

192:                                              ; preds = %.preheader.1
  %193 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %indvars.iv108.1
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %indvars.iv.next109.1 = add nuw nsw i64 %indvars.iv108.1, 1
  %195 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %indvars.iv.next109.1
  %196 = load i32, ptr %195, align 4, !tbaa !5
  %197 = sub nsw i32 %194, %196
  %198 = icmp slt i32 %197, 3
  br i1 %198, label %.preheader.1, label %.critedge.1, !llvm.loop !21

.critedge.1:                                      ; preds = %192, %.preheader.1
  %.052.lcssa.in.1 = phi i64 [ %indvars.iv.next119, %.preheader.1 ], [ %indvars.iv108.1, %192 ]
  %sext130.1 = shl i64 %.052.lcssa.in.1, 32
  %199 = ashr exact i64 %sext130.1, 32
  %.not = icmp sgt i64 %199, %159
  br i1 %.not, label %._crit_edge90.1, label %.lr.ph89.1

.lr.ph89.1:                                       ; preds = %.critedge.1, %.lr.ph89.1
  %indvars.iv115.1 = phi i64 [ %indvars.iv.next116.1, %.lr.ph89.1 ], [ %indvars.iv.next114, %.critedge.1 ]
  %.051.in87.1 = phi i64 [ %indvars.iv115.1, %.lr.ph89.1 ], [ %indvars.iv.next119, %.critedge.1 ]
  %200 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %indvars.iv115.1
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %202 = shl i64 %.051.in87.1, 32
  %sext.1 = add i64 %202, 4294967296
  %203 = ashr exact i64 %sext.1, 32
  %204 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %203
  store i32 %201, ptr %204, align 4, !tbaa !5
  %indvars.iv.next116.1 = add nsw i64 %indvars.iv115.1, -1
  %205 = icmp sgt i64 %indvars.iv.next116.1, %199
  br i1 %205, label %.lr.ph89.1, label %._crit_edge90.1, !llvm.loop !23

._crit_edge90.1:                                  ; preds = %.lr.ph89.1, %.critedge.1
  %206 = and i64 %.052.lcssa.in.1, 4294967295
  %207 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !5
  %209 = add nsw i32 %208, -1
  %210 = add i64 %.052.lcssa.in.1, 1
  %211 = and i64 %210, 4294967295
  %212 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %211
  store i32 %209, ptr %212, align 4, !tbaa !5
  %213 = add i64 %.052.lcssa.in.1, 3
  %214 = and i64 %213, 4294967295
  %215 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %214
  %216 = load i32, ptr %215, align 4, !tbaa !5
  %217 = add nsw i32 %216, 1
  %218 = add i64 %.052.lcssa.in.1, 2
  %219 = and i64 %218, 4294967295
  %220 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %219
  store i32 %217, ptr %220, align 4, !tbaa !5
  %indvars.iv.next119.1 = or disjoint i64 %159, 4
  %221 = icmp eq i32 %.055.lcssa132, 0
  %indvars.iv.next114.1 = add nsw i64 %158, 4
  br i1 %221, label %.preheader.2, label %._crit_edge92.loopexit, !llvm.loop !22

.preheader.2:                                     ; preds = %._crit_edge90.1, %222
  %indvars.iv108.2 = phi i64 [ %indvars.iv.next109.2, %222 ], [ 0, %._crit_edge90.1 ]
  %exitcond112.not.2 = icmp eq i64 %indvars.iv108.2, %indvars.iv.next119.1
  br i1 %exitcond112.not.2, label %.critedge.2, label %222

222:                                              ; preds = %.preheader.2
  %223 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %indvars.iv108.2
  %224 = load i32, ptr %223, align 4, !tbaa !5
  %indvars.iv.next109.2 = add nuw nsw i64 %indvars.iv108.2, 1
  %225 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %indvars.iv.next109.2
  %226 = load i32, ptr %225, align 4, !tbaa !5
  %227 = sub nsw i32 %224, %226
  %228 = icmp slt i32 %227, 3
  br i1 %228, label %.preheader.2, label %.critedge.2, !llvm.loop !21

.critedge.2:                                      ; preds = %222, %.preheader.2
  %.052.lcssa.in.2 = phi i64 [ %indvars.iv.next119.1, %.preheader.2 ], [ %indvars.iv108.2, %222 ]
  %sext130.2 = shl i64 %.052.lcssa.in.2, 32
  %229 = ashr exact i64 %sext130.2, 32
  %230 = icmp slt i64 %229, 3
  br i1 %230, label %.lr.ph89.2, label %._crit_edge90.2

.lr.ph89.2:                                       ; preds = %.critedge.2, %.lr.ph89.2
  %indvars.iv115.2 = phi i64 [ %indvars.iv.next116.2, %.lr.ph89.2 ], [ %indvars.iv.next114.1, %.critedge.2 ]
  %.051.in87.2 = phi i64 [ %indvars.iv115.2, %.lr.ph89.2 ], [ %indvars.iv.next119.1, %.critedge.2 ]
  %231 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %indvars.iv115.2
  %232 = load i32, ptr %231, align 4, !tbaa !5
  %233 = shl i64 %.051.in87.2, 32
  %sext.2 = add i64 %233, 4294967296
  %234 = ashr exact i64 %sext.2, 32
  %235 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %234
  store i32 %232, ptr %235, align 4, !tbaa !5
  %indvars.iv.next116.2 = add nsw i64 %indvars.iv115.2, -1
  %236 = icmp sgt i64 %indvars.iv.next116.2, %229
  br i1 %236, label %.lr.ph89.2, label %._crit_edge90.2, !llvm.loop !23

._crit_edge90.2:                                  ; preds = %.lr.ph89.2, %.critedge.2
  %237 = and i64 %.052.lcssa.in.2, 4294967295
  %238 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = add nsw i32 %239, -1
  %241 = add i64 %.052.lcssa.in.2, 1
  %242 = and i64 %241, 4294967295
  %243 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %242
  store i32 %240, ptr %243, align 4, !tbaa !5
  %244 = add i64 %.052.lcssa.in.2, 3
  %245 = and i64 %244, 4294967295
  %246 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !5
  %248 = add nsw i32 %247, 1
  %249 = add i64 %.052.lcssa.in.2, 2
  %250 = and i64 %249, 4294967295
  %251 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %250
  store i32 %248, ptr %251, align 4, !tbaa !5
  br label %._crit_edge92.loopexit

.lr.ph89:                                         ; preds = %.critedge, %.lr.ph89
  %indvars.iv115 = phi i64 [ %indvars.iv.next116, %.lr.ph89 ], [ %158, %.critedge ]
  %.051.in87 = phi i64 [ %indvars.iv115, %.lr.ph89 ], [ %159, %.critedge ]
  %252 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %indvars.iv115
  %253 = load i32, ptr %252, align 4, !tbaa !5
  %254 = shl i64 %.051.in87, 32
  %sext = add i64 %254, 4294967296
  %255 = ashr exact i64 %sext, 32
  %256 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %255
  store i32 %253, ptr %256, align 4, !tbaa !5
  %indvars.iv.next116 = add nsw i64 %indvars.iv115, -1
  %257 = icmp sgt i64 %indvars.iv.next116, %174
  br i1 %257, label %.lr.ph89, label %._crit_edge90, !llvm.loop !23

._crit_edge92.loopexit:                           ; preds = %._crit_edge90.2, %._crit_edge90.1, %._crit_edge90
  %indvars.iv.next119.lcssa = phi i64 [ %indvars.iv.next119, %._crit_edge90 ], [ %indvars.iv.next119.1, %._crit_edge90.1 ], [ 6, %._crit_edge90.2 ]
  %258 = trunc nuw nsw i64 %indvars.iv.next119.lcssa to i32
  br label %._crit_edge92

._crit_edge92:                                    ; preds = %._crit_edge92.loopexit, %.preheader66
  %.1.lcssa = phi i32 [ %155, %.preheader66 ], [ %258, %._crit_edge92.loopexit ]
  %259 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  %260 = icmp sgt i32 %.1.lcssa, 0
  br i1 %260, label %.lr.ph96.preheader, label %._crit_edge97

.lr.ph96.preheader:                               ; preds = %._crit_edge92
  %261 = zext nneg i32 %.1.lcssa to i64
  %.phi.trans.insert = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %261
  %.pre128 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  br label %.lr.ph96

._crit_edge97:                                    ; preds = %.lr.ph96, %._crit_edge92
  call void @llvm.lifetime.end.p0(i64 76, ptr nonnull %8) #11
  br label %274

.lr.ph96:                                         ; preds = %.lr.ph96.preheader, %.lr.ph96
  %262 = phi i32 [ %.pre128, %.lr.ph96.preheader ], [ %264, %.lr.ph96 ]
  %indvars.iv122 = phi i64 [ %261, %.lr.ph96.preheader ], [ %indvars.iv.next123, %.lr.ph96 ]
  %indvars.iv.next123 = add nsw i64 %indvars.iv122, -1
  %263 = getelementptr inbounds [19 x i32], ptr %8, i64 0, i64 %indvars.iv.next123
  %264 = load i32, ptr %263, align 4, !tbaa !5
  %265 = add nsw i32 %264, 1
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [100003 x i8], ptr @str, i64 0, i64 %266
  %268 = load i8, ptr %267, align 1, !tbaa !13
  store i8 0, ptr %267, align 1, !tbaa !13
  %269 = sext i32 %262 to i64
  %gep = getelementptr i8, ptr getelementptr inbounds (i8, ptr @str, i64 1), i64 %269
  %270 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %gep)
  store i8 %268, ptr %267, align 1, !tbaa !13
  %271 = icmp ugt i64 %indvars.iv122, 1
  br i1 %271, label %.lr.ph96, label %._crit_edge97, !llvm.loop !24

272:                                              ; preds = %._crit_edge77
  %273 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %274

274:                                              ; preds = %272, %._crit_edge97
  ret i32 0
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z6appendii(i32 noundef, i32 noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #7 = { 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 #8 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { 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 = !{!10, !6, i64 8}
!10 = !{!"_ZTS6Border", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!13 = !{!7, !7, i64 0}
!14 = !{!10, !6, i64 0}
!15 = !{!10, !6, i64 4}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !17}


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