; LLVM IR from ippeb/ACM-ICPC :: dynamic_programming/MER (maximum_empty_rectangle_brute_force)

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

@S = external dso_local global [1002 x [1002 x i32]], align 16
@M = external dso_local global i32, align 4
@N = external dso_local global i32, align 4
@best = external dso_local global i32, align 4
@A = external dso_local global [1002 x [1002 x i8]], align 16
@a1 = external dso_local global %"struct.std::pair", align 4
@a2 = external dso_local global %"struct.std::pair", align 4
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [40 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 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 %"struct.std::pair", align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair", align 4
  store i32 0, ptr %1, align 4
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @M, ptr noundef @N)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %27, %0
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr @M, align 4, !tbaa !5
  %19 = icmp sle i32 %17, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %16
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [1002 x [1002 x i8]], ptr @A, i64 0, i64 %23
  %25 = getelementptr inbounds [1002 x i8], ptr %24, i64 0, i64 1
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %25)
  br label %27

27:                                               ; preds = %21
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %2, align 4, !tbaa !5
  br label %16, !llvm.loop !9

30:                                               ; preds = %20
  call void @llvm.memset.p0.i64(ptr align 16 @S, i8 0, i64 4016016, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %90, %30
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = load i32, ptr @M, align 4, !tbaa !5
  %34 = icmp sle i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %93

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

37:                                               ; preds = %86, %36
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = load i32, ptr @N, align 4, !tbaa !5
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %42, label %41

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

42:                                               ; preds = %37
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [1002 x [1002 x i8]], ptr @A, i64 0, i64 %44
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [1002 x i8], ptr %45, i64 0, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !11
  %50 = sext i8 %49 to i32
  %51 = sub nsw i32 %50, 48
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = sub nsw i32 %52, 1
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %54
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [1002 x i32], ptr %55, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = add nsw i32 %51, %59
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %62
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = sub nsw i32 %64, 1
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [1002 x i32], ptr %63, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = add nsw i32 %60, %68
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = sub nsw i32 %70, 1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %72
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = sub nsw i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1002 x i32], ptr %73, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = sub nsw i32 %69, %78
  %80 = load i32, ptr %3, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %81
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1002 x i32], ptr %82, i64 0, i64 %84
  store i32 %79, ptr %85, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %42
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %5, align 4, !tbaa !5
  br label %37, !llvm.loop !12

89:                                               ; preds = %41
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %3, align 4, !tbaa !5
  br label %31, !llvm.loop !13

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

94:                                               ; preds = %190, %93
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = load i32, ptr @M, align 4, !tbaa !5
  %97 = icmp sle i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %193

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

100:                                              ; preds = %186, %99
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = load i32, ptr @N, align 4, !tbaa !5
  %103 = icmp sle i32 %101, %102
  br i1 %103, label %105, label %104

104:                                              ; preds = %100
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %189

105:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %106 = load i32, ptr %6, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %8, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %182, %105
  %109 = load i32, ptr %8, align 4, !tbaa !5
  %110 = load i32, ptr @M, align 4, !tbaa !5
  %111 = icmp sle i32 %109, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %108
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %185

113:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %114 = load i32, ptr %7, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %9, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %178, %113
  %117 = load i32, ptr %9, align 4, !tbaa !5
  %118 = load i32, ptr @N, align 4, !tbaa !5
  %119 = icmp sle i32 %117, %118
  br i1 %119, label %121, label %120

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

121:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %122 = load i32, ptr %8, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %123
  %125 = load i32, ptr %9, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [1002 x i32], ptr %124, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %130
  %132 = load i32, ptr %7, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [1002 x i32], ptr %131, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = add nsw i32 %128, %135
  %137 = load i32, ptr %8, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %138
  %140 = load i32, ptr %7, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [1002 x i32], ptr %139, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = sub nsw i32 %136, %143
  %145 = load i32, ptr %6, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %146
  %148 = load i32, ptr %9, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [1002 x i32], ptr %147, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = sub nsw i32 %144, %151
  store i32 %152, ptr %10, align 4, !tbaa !5
  %153 = load i32, ptr %10, align 4, !tbaa !5
  %154 = load i32, ptr %8, align 4, !tbaa !5
  %155 = load i32, ptr %6, align 4, !tbaa !5
  %156 = sub nsw i32 %154, %155
  %157 = load i32, ptr %9, align 4, !tbaa !5
  %158 = load i32, ptr %7, align 4, !tbaa !5
  %159 = sub nsw i32 %157, %158
  %160 = mul nsw i32 %156, %159
  %161 = icmp eq i32 %153, %160
  br i1 %161, label %162, label %177

162:                                              ; preds = %121
  %163 = load i32, ptr %10, align 4, !tbaa !5
  %164 = load i32, ptr @best, align 4, !tbaa !5
  %165 = icmp sgt i32 %163, %164
  br i1 %165, label %166, label %176

166:                                              ; preds = %162
  %167 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %167, ptr @best, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %168 = load i32, ptr %6, align 4, !tbaa !5
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %170 = load i32, ptr %7, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %13, align 4, !tbaa !5
  %172 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  store i64 %172, ptr %11, align 4
  %173 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) @a1, ptr noundef nonnull align 4 dereferenceable(8) %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %174 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %174, ptr %14, align 4
  %175 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) @a2, ptr noundef nonnull align 4 dereferenceable(8) %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %176

176:                                              ; preds = %166, %162
  br label %177

177:                                              ; preds = %176, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %9, align 4, !tbaa !5
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %9, align 4, !tbaa !5
  br label %116, !llvm.loop !14

181:                                              ; preds = %120
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %8, align 4, !tbaa !5
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %8, align 4, !tbaa !5
  br label %108, !llvm.loop !15

185:                                              ; preds = %112
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %7, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %7, align 4, !tbaa !5
  br label %100, !llvm.loop !16

189:                                              ; preds = %104
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %6, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %6, align 4, !tbaa !5
  br label %94, !llvm.loop !17

193:                                              ; preds = %98
  %194 = load i32, ptr @best, align 4, !tbaa !5
  %195 = load i32, ptr getelementptr inbounds (%"struct.std::pair", ptr @a1, i32 0, i32 1), align 4, !tbaa !18
  %196 = load i32, ptr @a1, align 4, !tbaa !20
  %197 = load i32, ptr getelementptr inbounds (%"struct.std::pair", ptr @a2, i32 0, i32 1), align 4, !tbaa !18
  %198 = load i32, ptr @a2, align 4, !tbaa !20
  %199 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %194, i32 noundef %195, i32 noundef %196, i32 noundef %197, i32 noundef %198)
  %200 = load i32, ptr %1, align 4
  ret i32 %200
}

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

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

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

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

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

; 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)) #5 align 2

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

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

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


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

@S = external dso_local local_unnamed_addr global [1002 x [1002 x i32]], align 16
@M = external dso_local global i32, align 4
@N = external dso_local global i32, align 4
@best = external dso_local local_unnamed_addr global i32, align 4
@A = external dso_local global [1002 x [1002 x i8]], align 16
@a1 = external dso_local global %"struct.std::pair", align 4
@a2 = external dso_local global %"struct.std::pair", align 4
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [40 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @M, ptr noundef nonnull @N)
  %8 = load i32, ptr @M, align 4, !tbaa !5
  %.not53 = icmp slt i32 %8, 1
  br i1 %.not53, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %0
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4016016) @S, i8 0, i64 4016016, i1 false)
  br label %._crit_edge61

._crit_edge:                                      ; preds = %.lr.ph
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4016016) @S, i8 0, i64 4016016, i1 false)
  %.not4159 = icmp slt i32 %15, 1
  br i1 %.not4159, label %._crit_edge61, label %.preheader52.lr.ph

.preheader52.lr.ph:                               ; preds = %._crit_edge
  %9 = load i32, ptr @N, align 4, !tbaa !5
  %.not4755 = icmp slt i32 %9, 1
  br i1 %.not4755, label %._crit_edge61.thread, label %.preheader52.preheader

._crit_edge61.thread:                             ; preds = %.preheader52.lr.ph
  store i32 0, ptr @best, align 4, !tbaa !5
  br label %.preheader.lr.ph

.preheader52.preheader:                           ; preds = %.preheader52.lr.ph
  %10 = add nuw i32 %15, 1
  %wide.trip.count94 = zext i32 %10 to i64
  %11 = zext nneg i32 %9 to i64
  %xtraiter = and i64 %11, 1
  %12 = icmp eq i32 %9, 1
  %unroll_iter = and i64 %11, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader52

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %13 = getelementptr inbounds [1002 x [1002 x i8]], ptr @A, i64 0, i64 %indvars.iv, i64 1
  %14 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %13)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i32, ptr @M, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %.not.not = icmp slt i64 %indvars.iv, %16
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader52:                                     ; preds = %.preheader52.preheader, %._crit_edge58
  %.pre106 = phi i32 [ 0, %.preheader52.preheader ], [ %.pre, %._crit_edge58 ]
  %indvars.iv91 = phi i64 [ 1, %.preheader52.preheader ], [ %indvars.iv.next92, %._crit_edge58 ]
  %17 = add nsw i64 %indvars.iv91, -1
  %.phi.trans.insert = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %indvars.iv91, i64 0
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !5
  br i1 %12, label %._crit_edge58.unr-lcssa, label %.preheader52.new

._crit_edge61:                                    ; preds = %._crit_edge58, %._crit_edge.thread, %._crit_edge
  %18 = phi i32 [ %8, %._crit_edge.thread ], [ %15, %._crit_edge ], [ %15, %._crit_edge58 ]
  store i32 0, ptr @best, align 4, !tbaa !5
  %.not4277 = icmp slt i32 %18, 0
  br i1 %.not4277, label %._crit_edge80, label %.preheader.lr.phthread-pre-split

.preheader.lr.phthread-pre-split:                 ; preds = %._crit_edge61
  %.pr = load i32, ptr @N, align 4, !tbaa !5
  br label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader.lr.phthread-pre-split, %._crit_edge61.thread
  %19 = phi i32 [ %.pr, %.preheader.lr.phthread-pre-split ], [ %9, %._crit_edge61.thread ]
  %20 = phi i32 [ %18, %.preheader.lr.phthread-pre-split ], [ %15, %._crit_edge61.thread ]
  %21 = icmp slt i32 %19, 0
  br i1 %21, label %._crit_edge80, label %.preheader

._crit_edge58.unr-lcssa:                          ; preds = %.preheader52.new, %.preheader52
  %.unr = phi i32 [ %.pre106, %.preheader52 ], [ %49, %.preheader52.new ]
  %.unr162 = phi i32 [ %.pre, %.preheader52 ], [ %52, %.preheader52.new ]
  %indvars.iv88.unr = phi i64 [ 1, %.preheader52 ], [ %indvars.iv.next89.1, %.preheader52.new ]
  br i1 %lcmp.mod.not, label %._crit_edge58, label %._crit_edge58.epilog-lcssa

._crit_edge58.epilog-lcssa:                       ; preds = %._crit_edge58.unr-lcssa
  %22 = getelementptr inbounds [1002 x [1002 x i8]], ptr @A, i64 0, i64 %indvars.iv91, i64 %indvars.iv88.unr
  %23 = load i8, ptr %22, align 1, !tbaa !11
  %24 = sext i8 %23 to i32
  %25 = add nsw i32 %24, -48
  %26 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %17, i64 %indvars.iv88.unr
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = add nsw i32 %25, %27
  %29 = add nsw i32 %28, %.unr162
  %30 = sub i32 %29, %.unr
  %31 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %indvars.iv91, i64 %indvars.iv88.unr
  store i32 %30, ptr %31, align 4, !tbaa !5
  br label %._crit_edge58

._crit_edge58:                                    ; preds = %._crit_edge58.unr-lcssa, %._crit_edge58.epilog-lcssa
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %exitcond95.not = icmp eq i64 %indvars.iv.next92, %wide.trip.count94
  br i1 %exitcond95.not, label %._crit_edge61, label %.preheader52, !llvm.loop !12

.preheader52.new:                                 ; preds = %.preheader52, %.preheader52.new
  %32 = phi i32 [ %49, %.preheader52.new ], [ %.pre106, %.preheader52 ]
  %33 = phi i32 [ %52, %.preheader52.new ], [ %.pre, %.preheader52 ]
  %indvars.iv88 = phi i64 [ %indvars.iv.next89.1, %.preheader52.new ], [ 1, %.preheader52 ]
  %niter = phi i64 [ %niter.next.1, %.preheader52.new ], [ 0, %.preheader52 ]
  %34 = getelementptr inbounds [1002 x [1002 x i8]], ptr @A, i64 0, i64 %indvars.iv91, i64 %indvars.iv88
  %35 = load i8, ptr %34, align 1, !tbaa !11
  %36 = sext i8 %35 to i32
  %37 = add nsw i32 %36, -48
  %38 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %17, i64 %indvars.iv88
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = add nsw i32 %37, %39
  %41 = add nsw i32 %40, %33
  %42 = sub i32 %41, %32
  %43 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %indvars.iv91, i64 %indvars.iv88
  store i32 %42, ptr %43, align 4, !tbaa !5
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %44 = getelementptr inbounds [1002 x [1002 x i8]], ptr @A, i64 0, i64 %indvars.iv91, i64 %indvars.iv.next89
  %45 = load i8, ptr %44, align 1, !tbaa !11
  %46 = sext i8 %45 to i32
  %47 = add nsw i32 %46, -48
  %48 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %17, i64 %indvars.iv.next89
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = add nsw i32 %47, %49
  %51 = add nsw i32 %50, %42
  %52 = sub i32 %51, %39
  %53 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %indvars.iv91, i64 %indvars.iv.next89
  store i32 %52, ptr %53, align 4, !tbaa !5
  %indvars.iv.next89.1 = add nuw nsw i64 %indvars.iv88, 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_edge58.unr-lcssa, label %.preheader52.new, !llvm.loop !13

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge76
  %.pre108114 = phi i32 [ %.pre108115, %._crit_edge76 ], [ 0, %.preheader.lr.ph ]
  %54 = phi i32 [ %68, %._crit_edge76 ], [ 0, %.preheader.lr.ph ]
  %55 = phi i32 [ %69, %._crit_edge76 ], [ %20, %.preheader.lr.ph ]
  %56 = phi i32 [ %70, %._crit_edge76 ], [ %19, %.preheader.lr.ph ]
  %57 = phi i32 [ %71, %._crit_edge76 ], [ %19, %.preheader.lr.ph ]
  %58 = phi i32 [ %72, %._crit_edge76 ], [ %19, %.preheader.lr.ph ]
  %indvars.iv102 = phi i64 [ %.pre122, %._crit_edge76 ], [ 0, %.preheader.lr.ph ]
  %.not4372 = icmp slt i32 %58, 0
  %.pre122 = add nuw nsw i64 %indvars.iv102, 1
  br i1 %.not4372, label %._crit_edge76, label %.lr.ph75

.lr.ph75:                                         ; preds = %.preheader
  %59 = sext i32 %55 to i64
  %.not = icmp slt i64 %indvars.iv102, %59
  br i1 %.not, label %.lr.ph75.split.preheader, label %._crit_edge76

.lr.ph75.split.preheader:                         ; preds = %.lr.ph75
  %60 = trunc nuw i64 %.pre122 to i32
  %61 = trunc nuw nsw i64 %indvars.iv102 to i32
  br label %.lr.ph75.split

._crit_edge80:                                    ; preds = %._crit_edge76, %.preheader.lr.ph, %._crit_edge61
  %62 = phi i32 [ 0, %._crit_edge61 ], [ 0, %.preheader.lr.ph ], [ %68, %._crit_edge76 ]
  %63 = load i32, ptr getelementptr inbounds (i8, ptr @a1, i64 4), align 4, !tbaa !14
  %64 = load i32, ptr @a1, align 4, !tbaa !16
  %65 = load i32, ptr getelementptr inbounds (i8, ptr @a2, i64 4), align 4, !tbaa !14
  %66 = load i32, ptr @a2, align 4, !tbaa !16
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %62, i32 noundef %63, i32 noundef %64, i32 noundef %65, i32 noundef %66)
  ret i32 0

._crit_edge76:                                    ; preds = %._crit_edge70, %.lr.ph75, %.preheader
  %.pre108115 = phi i32 [ %.pre108114, %.preheader ], [ %.pre108114, %.lr.ph75 ], [ %.pre108117, %._crit_edge70 ]
  %68 = phi i32 [ %54, %.preheader ], [ %54, %.lr.ph75 ], [ %87, %._crit_edge70 ]
  %69 = phi i32 [ %55, %.preheader ], [ %55, %.lr.ph75 ], [ %88, %._crit_edge70 ]
  %70 = phi i32 [ %56, %.preheader ], [ %56, %.lr.ph75 ], [ %89, %._crit_edge70 ]
  %71 = phi i32 [ %57, %.preheader ], [ %57, %.lr.ph75 ], [ %89, %._crit_edge70 ]
  %72 = phi i32 [ %58, %.preheader ], [ %57, %.lr.ph75 ], [ %89, %._crit_edge70 ]
  %73 = sext i32 %69 to i64
  %.not42.not = icmp slt i64 %indvars.iv102, %73
  br i1 %.not42.not, label %.preheader, label %._crit_edge80, !llvm.loop !17

.lr.ph75.split:                                   ; preds = %.lr.ph75.split.preheader, %._crit_edge70
  %.pre108116 = phi i32 [ %.pre108114, %.lr.ph75.split.preheader ], [ %.pre108117, %._crit_edge70 ]
  %74 = phi i32 [ %54, %.lr.ph75.split.preheader ], [ %87, %._crit_edge70 ]
  %75 = phi i32 [ %55, %.lr.ph75.split.preheader ], [ %88, %._crit_edge70 ]
  %76 = phi i32 [ %56, %.lr.ph75.split.preheader ], [ %89, %._crit_edge70 ]
  %77 = phi i32 [ %55, %.lr.ph75.split.preheader ], [ %90, %._crit_edge70 ]
  %78 = phi i32 [ %55, %.lr.ph75.split.preheader ], [ %91, %._crit_edge70 ]
  %79 = phi i32 [ %57, %.lr.ph75.split.preheader ], [ %89, %._crit_edge70 ]
  %80 = phi i32 [ %55, %.lr.ph75.split.preheader ], [ %92, %._crit_edge70 ]
  %indvars.iv99 = phi i64 [ 0, %.lr.ph75.split.preheader ], [ %82, %._crit_edge70 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 %60, ptr %1, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %.not4467.not = icmp slt i64 %indvars.iv102, %81
  %82 = add nuw nsw i64 %indvars.iv99, 1
  br i1 %.not4467.not, label %.lr.ph69, label %._crit_edge70

.lr.ph69:                                         ; preds = %.lr.ph75.split
  %83 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %indvars.iv102, i64 %indvars.iv99
  %84 = sext i32 %79 to i64
  %.not81 = icmp slt i64 %indvars.iv99, %84
  br i1 %.not81, label %.lr.ph69.split.preheader, label %._crit_edge70

.lr.ph69.split.preheader:                         ; preds = %.lr.ph69
  %85 = trunc nuw i64 %82 to i32
  %86 = trunc nuw nsw i64 %indvars.iv99 to i32
  br label %.lr.ph69.split

._crit_edge70:                                    ; preds = %._crit_edge66, %.lr.ph69, %.lr.ph75.split
  %.pre108117 = phi i32 [ %.pre108116, %.lr.ph75.split ], [ %.pre108116, %.lr.ph69 ], [ %.pre108119, %._crit_edge66 ]
  %87 = phi i32 [ %74, %.lr.ph75.split ], [ %74, %.lr.ph69 ], [ %102, %._crit_edge66 ]
  %88 = phi i32 [ %75, %.lr.ph75.split ], [ %75, %.lr.ph69 ], [ %103, %._crit_edge66 ]
  %89 = phi i32 [ %76, %.lr.ph75.split ], [ %76, %.lr.ph69 ], [ %104, %._crit_edge66 ]
  %90 = phi i32 [ %77, %.lr.ph75.split ], [ %77, %.lr.ph69 ], [ %105, %._crit_edge66 ]
  %91 = phi i32 [ %78, %.lr.ph75.split ], [ %78, %.lr.ph69 ], [ %105, %._crit_edge66 ]
  %92 = phi i32 [ %80, %.lr.ph75.split ], [ %78, %.lr.ph69 ], [ %105, %._crit_edge66 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %93 = sext i32 %89 to i64
  %.not43.not = icmp slt i64 %indvars.iv99, %93
  br i1 %.not43.not, label %.lr.ph75.split, label %._crit_edge76, !llvm.loop !19

.lr.ph69.split:                                   ; preds = %.lr.ph69.split.preheader, %._crit_edge66
  %.pre108 = phi i32 [ %.pre108116, %.lr.ph69.split.preheader ], [ %.pre108119, %._crit_edge66 ]
  %94 = phi i32 [ %74, %.lr.ph69.split.preheader ], [ %102, %._crit_edge66 ]
  %95 = phi i32 [ %75, %.lr.ph69.split.preheader ], [ %103, %._crit_edge66 ]
  %96 = phi i32 [ %76, %.lr.ph69.split.preheader ], [ %104, %._crit_edge66 ]
  %97 = phi i32 [ %77, %.lr.ph69.split.preheader ], [ %105, %._crit_edge66 ]
  %98 = phi i32 [ %60, %.lr.ph69.split.preheader ], [ %109, %._crit_edge66 ]
  %99 = phi i32 [ %79, %.lr.ph69.split.preheader ], [ %107, %._crit_edge66 ]
  %100 = phi i32 [ %79, %.lr.ph69.split.preheader ], [ %108, %._crit_edge66 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 %85, ptr %2, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %.not4662.not = icmp slt i64 %indvars.iv99, %101
  br i1 %.not4662.not, label %.lr.ph65, label %._crit_edge66

._crit_edge66.loopexit:                           ; preds = %135
  %.pre111 = load i32, ptr %1, align 4, !tbaa !5
  %.pre112 = load i32, ptr @M, align 4, !tbaa !5
  br label %._crit_edge66

._crit_edge66:                                    ; preds = %._crit_edge66.loopexit, %.lr.ph69.split
  %.pre108119 = phi i32 [ %.pre108121, %._crit_edge66.loopexit ], [ %.pre108, %.lr.ph69.split ]
  %102 = phi i32 [ %139, %._crit_edge66.loopexit ], [ %94, %.lr.ph69.split ]
  %103 = phi i32 [ %.pre112, %._crit_edge66.loopexit ], [ %95, %.lr.ph69.split ]
  %104 = phi i32 [ %136, %._crit_edge66.loopexit ], [ %96, %.lr.ph69.split ]
  %105 = phi i32 [ %.pre112, %._crit_edge66.loopexit ], [ %97, %.lr.ph69.split ]
  %106 = phi i32 [ %.pre111, %._crit_edge66.loopexit ], [ %98, %.lr.ph69.split ]
  %107 = phi i32 [ %137, %._crit_edge66.loopexit ], [ %99, %.lr.ph69.split ]
  %108 = phi i32 [ %137, %._crit_edge66.loopexit ], [ %100, %.lr.ph69.split ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %109 = add nsw i32 %106, 1
  store i32 %109, ptr %1, align 4, !tbaa !5
  %.not44.not = icmp slt i32 %106, %105
  br i1 %.not44.not, label %.lr.ph69.split, label %._crit_edge70, !llvm.loop !20

.lr.ph65:                                         ; preds = %.lr.ph69.split, %135
  %.pre108120 = phi i32 [ %.pre108121, %135 ], [ %.pre108, %.lr.ph69.split ]
  %110 = phi i32 [ %136, %135 ], [ %96, %.lr.ph69.split ]
  %111 = phi i32 [ %137, %135 ], [ %99, %.lr.ph69.split ]
  %112 = phi i32 [ %139, %135 ], [ %.pre108, %.lr.ph69.split ]
  %storemerge4563 = phi i32 [ %140, %135 ], [ %85, %.lr.ph69.split ]
  %113 = load i32, ptr %1, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = sext i32 %storemerge4563 to i64
  %116 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %114, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = load i32, ptr %83, align 4, !tbaa !5
  %119 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %114, i64 %indvars.iv99
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = getelementptr inbounds [1002 x [1002 x i32]], ptr @S, i64 0, i64 %indvars.iv102, i64 %115
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %.neg51 = add i32 %118, %117
  %123 = add i32 %120, %122
  %124 = sub i32 %.neg51, %123
  %125 = sub nsw i32 %113, %61
  %126 = sub nsw i32 %storemerge4563, %86
  %127 = mul nsw i32 %125, %126
  %128 = icmp eq i32 %124, %127
  %129 = icmp sgt i32 %124, %112
  %or.cond = select i1 %128, i1 %129, i1 false
  br i1 %or.cond, label %130, label %135

130:                                              ; preds = %.lr.ph65
  store i32 %124, ptr @best, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 %60, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 %85, ptr %5, align 4, !tbaa !5
  %131 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %131, ptr %3, align 8
  %132 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) @a1, ptr noundef nonnull align 4 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %133 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %133, ptr %6, align 8
  %134 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) @a2, ptr noundef nonnull align 4 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %.pre107 = load i32, ptr @best, align 4
  %.pre109 = load i32, ptr %2, align 4, !tbaa !5
  %.pre110 = load i32, ptr @N, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %130, %.lr.ph65
  %.pre108121 = phi i32 [ %.pre107, %130 ], [ %.pre108120, %.lr.ph65 ]
  %136 = phi i32 [ %.pre110, %130 ], [ %110, %.lr.ph65 ]
  %137 = phi i32 [ %.pre110, %130 ], [ %111, %.lr.ph65 ]
  %138 = phi i32 [ %.pre109, %130 ], [ %storemerge4563, %.lr.ph65 ]
  %139 = phi i32 [ %.pre107, %130 ], [ %112, %.lr.ph65 ]
  %140 = add nsw i32 %138, 1
  store i32 %140, ptr %2, align 4, !tbaa !5
  %.not46.not = icmp slt i32 %138, %137
  br i1 %.not46.not, label %.lr.ph65, label %._crit_edge66.loopexit, !llvm.loop !21
}

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

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

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

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

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

; 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 #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__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 #4

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

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


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