; LLVM IR from tangjz/acm-icpc :: TDL_training/2015-11-15 (H - Those are not the droids you're looking for - tjz)

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

@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@c1 = external dso_local global i32, align 4
@c2 = external dso_local global i32, align 4
@x = external dso_local global [1010 x i32], align 16
@y = external dso_local global [1010 x i32], align 16
@e = external dso_local global [1010 x [1010 x i32]], align 16
@match = external dso_local global [1010 x i32], align 16
@vis = external dso_local global [1010 x i8], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z4pathi(i32 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @a, ptr noundef @b, ptr noundef %2)
  br label %11

11:                                               ; preds = %31, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = add nsw i32 %12, -1
  store i32 %13, ptr %2, align 4, !tbaa !5
  %14 = icmp ne i32 %12, 0
  br i1 %14, label %15, label %32

15:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4)
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %25

19:                                               ; preds = %15
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = load i32, ptr @c1, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr @c1, align 4, !tbaa !5
  %23 = sext i32 %21 to i64
  %24 = getelementptr inbounds [1010 x i32], ptr @x, i64 0, i64 %23
  store i32 %20, ptr %24, align 4, !tbaa !5
  br label %31

25:                                               ; preds = %15
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = load i32, ptr @c2, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr @c2, align 4, !tbaa !5
  %29 = sext i32 %27 to i64
  %30 = getelementptr inbounds [1010 x i32], ptr @y, i64 0, i64 %29
  store i32 %26, ptr %30, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %25, %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %11, !llvm.loop !9

32:                                               ; preds = %11
  %33 = load i32, ptr @c1, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds i32, ptr @x, i64 %34
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef @x, ptr noundef %35)
  %36 = load i32, ptr @c2, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds i32, ptr @y, i64 %37
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef @y, ptr noundef %38)
  %39 = load i32, ptr @c1, align 4, !tbaa !5
  %40 = load i32, ptr @c2, align 4, !tbaa !5
  %41 = icmp ne i32 %39, %40
  br i1 %41, label %42, label %44

42:                                               ; preds = %32
  %43 = call i32 @puts(ptr noundef @.str.2)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %152

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

45:                                               ; preds = %108, %44
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = load i32, ptr @c1, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

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

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

51:                                               ; preds = %104, %50
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = load i32, ptr @c2, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %56, label %55

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

56:                                               ; preds = %51
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [1010 x i32], ptr @x, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [1010 x i32], ptr @y, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = icmp sle i32 %60, %64
  br i1 %65, label %66, label %103

66:                                               ; preds = %56
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [1010 x i32], ptr @y, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [1010 x i32], ptr @x, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = load i32, ptr @b, align 4, !tbaa !5
  %76 = add nsw i32 %74, %75
  %77 = icmp sle i32 %70, %76
  br i1 %77, label %90, label %78

78:                                               ; preds = %66
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [1010 x i32], ptr @y, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1010 x i32], ptr @x, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = load i32, ptr @a, align 4, !tbaa !5
  %88 = add nsw i32 %86, %87
  %89 = icmp sge i32 %82, %88
  br i1 %89, label %90, label %103

90:                                               ; preds = %78, %66
  %91 = load i32, ptr %7, align 4, !tbaa !5
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [1010 x [1010 x i32]], ptr @e, i64 0, i64 %93
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [1010 x [1010 x i32]], ptr @e, i64 0, i64 %96
  %98 = getelementptr inbounds [1010 x i32], ptr %97, i64 0, i64 0
  %99 = load i32, ptr %98, align 8, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %98, align 8, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [1010 x i32], ptr %94, i64 0, i64 %101
  store i32 %91, ptr %102, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %90, %78, %56
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %7, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %7, align 4, !tbaa !5
  br label %51, !llvm.loop !11

107:                                              ; preds = %55
  br label %108

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

111:                                              ; preds = %49
  call void @llvm.memset.p0.i64(ptr align 16 @match, i8 -1, i64 4040, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %123, %111
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = load i32, ptr @c1, align 4, !tbaa !5
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 10, ptr %5, align 4
  br label %126

117:                                              ; preds = %112
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 1010, i1 false)
  %118 = load i32, ptr %8, align 4, !tbaa !5
  %119 = call noundef zeroext i1 @_Z4pathi(i32 noundef %118)
  br i1 %119, label %122, label %120

120:                                              ; preds = %117
  %121 = call i32 @puts(ptr noundef @.str.2)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %126

122:                                              ; preds = %117
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %8, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %8, align 4, !tbaa !5
  br label %112, !llvm.loop !13

126:                                              ; preds = %120, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  %127 = load i32, ptr %5, align 4
  switch i32 %127, label %152 [
    i32 10, label %128
  ]

128:                                              ; preds = %126
  %129 = call i32 @puts(ptr noundef @.str.3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %148, %128
  %131 = load i32, ptr %9, align 4, !tbaa !5
  %132 = load i32, ptr @c2, align 4, !tbaa !5
  %133 = icmp slt i32 %131, %132
  br i1 %133, label %135, label %134

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

135:                                              ; preds = %130
  %136 = load i32, ptr %9, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [1010 x i32], ptr @match, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [1010 x i32], ptr @x, i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = load i32, ptr %9, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [1010 x i32], ptr @y, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %142, i32 noundef %146)
  br label %148

148:                                              ; preds = %135
  %149 = load i32, ptr %9, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %9, align 4, !tbaa !5
  br label %130, !llvm.loop !14

151:                                              ; preds = %134
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %152

152:                                              ; preds = %151, %126, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %153 = load i32, ptr %1, align 4
  ret i32 %153
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) #4

declare i32 @puts(ptr noundef) #3

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

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

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

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

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


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

@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@c1 = external dso_local local_unnamed_addr global i32, align 4
@c2 = external dso_local local_unnamed_addr global i32, align 4
@x = external dso_local global [1010 x i32], align 16
@y = external dso_local global [1010 x i32], align 16
@e = external dso_local local_unnamed_addr global [1010 x [1010 x i32]], align 16
@match = external dso_local local_unnamed_addr global [1010 x i32], align 16
@vis = external dso_local local_unnamed_addr global [1010 x i8], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z4pathi(i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @a, ptr noundef nonnull @b, ptr noundef nonnull %1)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = add nsw i32 %5, -1
  store i32 %6, ptr %1, align 4, !tbaa !5
  %.not35 = icmp eq i32 %5, 0
  br i1 %.not35, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %8 = load i32, ptr %3, align 4, !tbaa !5
  %9 = icmp eq i32 %8, 0
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %c1.c2 = select i1 %9, ptr @c1, ptr @c2
  %x.y = select i1 %9, ptr @x, ptr @y
  %11 = load i32, ptr %c1.c2, align 4, !tbaa !5
  %12 = add nsw i32 %11, 1
  store i32 %12, ptr %c1.c2, align 4, !tbaa !5
  %13 = sext i32 %11 to i64
  %14 = getelementptr inbounds [1010 x i32], ptr %x.y, i64 0, i64 %13
  store i32 %10, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = add nsw i32 %15, -1
  store i32 %16, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %0
  %17 = load i32, ptr @c1, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds i32, ptr @x, i64 %18
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull @x, ptr noundef nonnull %19)
  %20 = load i32, ptr @c2, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds i32, ptr @y, i64 %21
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull @y, ptr noundef nonnull %22)
  %23 = load i32, ptr @c1, align 4, !tbaa !5
  %24 = load i32, ptr @c2, align 4, !tbaa !5
  %.not29 = icmp eq i32 %23, %24
  br i1 %.not29, label %.preheader34, label %.loopexit.sink.split

.preheader34:                                     ; preds = %._crit_edge
  %25 = icmp sgt i32 %23, 0
  br i1 %25, label %.preheader.us.preheader, label %._crit_edge40.thread

._crit_edge40.thread:                             ; preds = %.preheader34
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4040) @match, i8 -1, i64 4040, i1 false)
  br label %.critedge

.preheader.us.preheader:                          ; preds = %.preheader34
  %26 = load i32, ptr @b, align 4
  %27 = load i32, ptr @a, align 4
  %wide.trip.count52 = zext nneg i32 %23 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge38.us
  %indvars.iv49 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next50, %._crit_edge38.us ]
  %28 = getelementptr inbounds [1010 x i32], ptr @x, i64 0, i64 %indvars.iv49
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = add nsw i32 %26, %29
  %31 = add nsw i32 %27, %29
  %32 = getelementptr inbounds [1010 x [1010 x i32]], ptr @e, i64 0, i64 %indvars.iv49
  br label %33

33:                                               ; preds = %.preheader.us, %43
  %indvars.iv = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next, %43 ]
  %34 = getelementptr inbounds [1010 x i32], ptr @y, i64 0, i64 %indvars.iv
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %.not31.us = icmp sgt i32 %29, %35
  br i1 %.not31.us, label %43, label %36

36:                                               ; preds = %33
  %.not32.us = icmp sgt i32 %35, %30
  %.not33.us = icmp slt i32 %35, %31
  %or.cond = select i1 %.not32.us, i1 %.not33.us, i1 false
  br i1 %or.cond, label %43, label %37

37:                                               ; preds = %36
  %38 = load i32, ptr %32, align 8, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %32, align 8, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [1010 x [1010 x i32]], ptr @e, i64 0, i64 %indvars.iv49, i64 %40
  %42 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %42, ptr %41, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %36, %37, %33
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count52
  br i1 %exitcond.not, label %._crit_edge38.us, label %33, !llvm.loop !11

._crit_edge38.us:                                 ; preds = %43
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %exitcond53.not = icmp eq i64 %indvars.iv.next50, %wide.trip.count52
  br i1 %exitcond53.not, label %._crit_edge40, label %.preheader.us, !llvm.loop !12

._crit_edge40:                                    ; preds = %._crit_edge38.us
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4040) @match, i8 -1, i64 4040, i1 false)
  br i1 %25, label %.lr.ph44, label %.critedge

44:                                               ; preds = %.lr.ph44
  %45 = add nuw nsw i32 %.02242, 1
  %46 = load i32, ptr @c1, align 4, !tbaa !5
  %.not30 = icmp slt i32 %45, %46
  br i1 %.not30, label %.lr.ph44, label %.critedge, !llvm.loop !13

.lr.ph44:                                         ; preds = %._crit_edge40, %44
  %.02242 = phi i32 [ %45, %44 ], [ 0, %._crit_edge40 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1010) @vis, i8 0, i64 1010, i1 false)
  %47 = call noundef zeroext i1 @_Z4pathi(i32 noundef %.02242)
  br i1 %47, label %44, label %.loopexit.sink.split

.critedge:                                        ; preds = %44, %._crit_edge40.thread, %._crit_edge40
  %48 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %49 = load i32, ptr @c2, align 4, !tbaa !5
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %.lr.ph46, label %.loopexit

.lr.ph46:                                         ; preds = %.critedge, %.lr.ph46
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %.lr.ph46 ], [ 0, %.critedge ]
  %51 = getelementptr inbounds [1010 x i32], ptr @match, i64 0, i64 %indvars.iv54
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [1010 x i32], ptr @x, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = getelementptr inbounds [1010 x i32], ptr @y, i64 0, i64 %indvars.iv54
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %55, i32 noundef %57)
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %59 = load i32, ptr @c2, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv.next55, %60
  br i1 %61, label %.lr.ph46, label %.loopexit, !llvm.loop !14

.loopexit.sink.split:                             ; preds = %.lr.ph44, %._crit_edge
  %62 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph46, %.loopexit.sink.split, %.critedge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass