; LLVM IR from tangjz/acm-icpc :: codeforces/gym (100443G)

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

@n = external dso_local global i32, align 4
@e = external dso_local global [201 x [201 x i32]], align 16
@ord = external dso_local global [201 x i32], align 16
@col = external dso_local global [201 x i32], align 16
@ban = external dso_local global [201 x [201 x i8]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRKiS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3dfsi(i32 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: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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
  store i32 0, ptr %1, align 4
  br label %9

9:                                                ; preds = %119, %0
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %11 = icmp eq i32 %10, 1
  br i1 %11, label %12, label %120

12:                                               ; preds = %9
  call void @llvm.memset.p0.i64(ptr align 16 @ban, i8 0, i64 40401, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  br label %13

13:                                               ; preds = %18, %12
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %2, ptr noundef %3)
  %15 = icmp eq i32 %14, 2
  br i1 %15, label %17, label %16

16:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %31

17:                                               ; preds = %13
  br label %18

18:                                               ; preds = %17
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [201 x [201 x i8]], ptr @ban, i64 0, i64 %20
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [201 x i8], ptr %21, i64 0, i64 %23
  store i8 1, ptr %24, align 1, !tbaa !9
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [201 x [201 x i8]], ptr @ban, i64 0, i64 %26
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [201 x i8], ptr %27, i64 0, i64 %29
  store i8 1, ptr %30, align 1, !tbaa !9
  br label %13, !llvm.loop !10

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

32:                                               ; preds = %82, %31
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = icmp sle i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 7, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %85

37:                                               ; preds = %32
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [201 x [201 x i32]], ptr @e, i64 0, i64 %39
  %41 = getelementptr inbounds [201 x i32], ptr %40, i64 0, i64 0
  store i32 0, ptr %41, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %74, %37
  %43 = load i32, ptr %6, align 4, !tbaa !5
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = icmp sle i32 %43, %44
  br i1 %45, label %47, label %46

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

47:                                               ; preds = %42
  %48 = load i32, ptr %4, align 4, !tbaa !5
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = icmp ne i32 %48, %49
  br i1 %50, label %51, label %73

51:                                               ; preds = %47
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [201 x [201 x i8]], ptr @ban, i64 0, i64 %53
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [201 x i8], ptr %54, i64 0, i64 %56
  %58 = load i8, ptr %57, align 1, !tbaa !9
  %59 = icmp ne i8 %58, 0
  br i1 %59, label %60, label %73

60:                                               ; preds = %51
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = load i32, ptr %4, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [201 x [201 x i32]], ptr @e, i64 0, i64 %63
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [201 x [201 x i32]], ptr @e, i64 0, i64 %66
  %68 = getelementptr inbounds [201 x i32], ptr %67, i64 0, i64 0
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %68, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [201 x i32], ptr %64, i64 0, i64 %71
  store i32 %61, ptr %72, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %60, %51, %47
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %6, align 4, !tbaa !5
  br label %42, !llvm.loop !12

77:                                               ; preds = %46
  %78 = load i32, ptr %4, align 4, !tbaa !5
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %80
  store i32 %78, ptr %81, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %77
  %83 = load i32, ptr %4, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %4, align 4, !tbaa !5
  br label %32, !llvm.loop !13

85:                                               ; preds = %36
  %86 = load i32, ptr @n, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds i32, ptr @ord, i64 %87
  %89 = getelementptr inbounds i32, ptr %88, i64 1
  call void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef getelementptr inbounds (i32, ptr @ord, i64 1), ptr noundef %89, ptr noundef @_Z3cmpRKiS0_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %99, %85
  %91 = load i32, ptr %7, align 4, !tbaa !5
  %92 = load i32, ptr @n, align 4, !tbaa !5
  %93 = icmp sle i32 %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %90
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %102

95:                                               ; preds = %90
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [201 x i8], ptr getelementptr inbounds ([201 x [201 x i8]], ptr @ban, i64 0, i64 1), i64 0, i64 %97
  store i8 0, ptr %98, align 1, !tbaa !9
  br label %99

99:                                               ; preds = %95
  %100 = load i32, ptr %7, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %7, align 4, !tbaa !5
  br label %90, !llvm.loop !14

102:                                              ; preds = %94
  %103 = call noundef zeroext i1 @_Z3dfsi(i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %116, %102
  %105 = load i32, ptr %8, align 4, !tbaa !5
  %106 = load i32, ptr @n, align 4, !tbaa !5
  %107 = icmp sle i32 %105, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %104
  store i32 16, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %119

109:                                              ; preds = %104
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = load i32, ptr %8, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [201 x i32], ptr @col, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %110, i32 noundef %114)
  br label %116

116:                                              ; preds = %109
  %117 = load i32, ptr %8, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %8, align 4, !tbaa !5
  br label %104, !llvm.loop !15

119:                                              ; preds = %108
  br label %9, !llvm.loop !16

120:                                              ; preds = %9
  ret i32 0
}

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

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

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

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

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


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

@n = external dso_local global i32, align 4
@e = external dso_local local_unnamed_addr global [201 x [201 x i32]], align 16
@ord = external dso_local global [201 x i32], align 16
@col = external dso_local local_unnamed_addr global [201 x i32], align 16
@ban = external dso_local local_unnamed_addr global [201 x [201 x i8]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRKiS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3dfsi(i32 noundef) 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %4 = icmp eq i32 %3, 1
  br i1 %4, label %.lr.ph50, label %._crit_edge51

.loopexit:                                        ; preds = %.lr.ph48, %._crit_edge44
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %6 = icmp eq i32 %5, 1
  br i1 %6, label %.lr.ph50, label %._crit_edge51, !llvm.loop !5

.lr.ph50:                                         ; preds = %0, %.loopexit
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40401) @ban, i8 0, i64 40401, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %8 = icmp eq i32 %7, 2
  br i1 %8, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph50
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %9 = load i32, ptr @n, align 4, !tbaa !7
  %.not35 = icmp slt i32 %9, 1
  br i1 %.not35, label %._crit_edge39.split, label %.lr.ph33.preheader

.lr.ph33.preheader:                               ; preds = %._crit_edge
  %10 = add nuw i32 %9, 1
  %wide.trip.count56 = zext i32 %10 to i64
  br label %.lr.ph33

.lr.ph:                                           ; preds = %.lr.ph50, %.lr.ph
  %11 = load i32, ptr %2, align 4, !tbaa !7
  %12 = sext i32 %11 to i64
  %13 = load i32, ptr %1, align 4, !tbaa !7
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [201 x [201 x i8]], ptr @ban, i64 0, i64 %12, i64 %14
  store i8 1, ptr %15, align 1, !tbaa !11
  %16 = getelementptr inbounds [201 x [201 x i8]], ptr @ban, i64 0, i64 %14, i64 %12
  store i8 1, ptr %16, align 1, !tbaa !11
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %18 = icmp eq i32 %17, 2
  br i1 %18, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge39.split:                              ; preds = %._crit_edge34, %._crit_edge
  %19 = sext i32 %9 to i64
  %gep = getelementptr i32, ptr getelementptr inbounds (i8, ptr @ord, i64 4), i64 %19
  call void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @ord, i64 4), ptr noundef nonnull %gep, ptr noundef nonnull @_Z3cmpRKiS0_)
  %20 = load i32, ptr @n, align 4, !tbaa !7
  %.not2540 = icmp slt i32 %20, 1
  br i1 %.not2540, label %._crit_edge44, label %.lr.ph43.preheader

.lr.ph43.preheader:                               ; preds = %._crit_edge39.split
  %21 = zext nneg i32 %20 to i64
  call void @llvm.memset.p0.i64(ptr nonnull align 2 getelementptr inbounds (i8, ptr @ban, i64 202), i8 0, i64 %21, i1 false), !tbaa !11
  br label %._crit_edge44

.lr.ph33:                                         ; preds = %.lr.ph33.preheader, %._crit_edge34
  %indvars.iv53 = phi i64 [ 1, %.lr.ph33.preheader ], [ %indvars.iv.next54, %._crit_edge34 ]
  %22 = getelementptr inbounds [201 x [201 x i32]], ptr @e, i64 0, i64 %indvars.iv53
  store i32 0, ptr %22, align 4, !tbaa !7
  br label %25

._crit_edge34:                                    ; preds = %35
  %23 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %indvars.iv53
  %24 = trunc nuw nsw i64 %indvars.iv53 to i32
  store i32 %24, ptr %23, align 4, !tbaa !7
  %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1
  %exitcond57.not = icmp eq i64 %indvars.iv.next54, %wide.trip.count56
  br i1 %exitcond57.not, label %._crit_edge39.split, label %.lr.ph33, !llvm.loop !13

25:                                               ; preds = %.lr.ph33, %35
  %indvars.iv = phi i64 [ 1, %.lr.ph33 ], [ %indvars.iv.next, %35 ]
  %.not28 = icmp eq i64 %indvars.iv53, %indvars.iv
  br i1 %.not28, label %35, label %26

26:                                               ; preds = %25
  %27 = getelementptr inbounds [201 x [201 x i8]], ptr @ban, i64 0, i64 %indvars.iv53, i64 %indvars.iv
  %28 = load i8, ptr %27, align 1, !tbaa !11
  %.not29 = icmp eq i8 %28, 0
  br i1 %.not29, label %35, label %29

29:                                               ; preds = %26
  %30 = load i32, ptr %22, align 4, !tbaa !7
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %22, align 4, !tbaa !7
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [201 x [201 x i32]], ptr @e, i64 0, i64 %indvars.iv53, i64 %32
  %34 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %34, ptr %33, align 4, !tbaa !7
  br label %35

35:                                               ; preds = %25, %26, %29
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count56
  br i1 %exitcond.not, label %._crit_edge34, label %25, !llvm.loop !14

._crit_edge44:                                    ; preds = %.lr.ph43.preheader, %._crit_edge39.split
  %36 = call noundef zeroext i1 @_Z3dfsi(i32 noundef 1)
  %37 = load i32, ptr @n, align 4, !tbaa !7
  %.not2645 = icmp slt i32 %37, 1
  br i1 %.not2645, label %.loopexit, label %.lr.ph48

.lr.ph48:                                         ; preds = %._crit_edge44, %.lr.ph48
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %.lr.ph48 ], [ 1, %._crit_edge44 ]
  %38 = getelementptr inbounds [201 x i32], ptr @col, i64 0, i64 %indvars.iv61
  %39 = load i32, ptr %38, align 4, !tbaa !7
  %40 = trunc nuw nsw i64 %indvars.iv61 to i32
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %40, i32 noundef %39)
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %42 = load i32, ptr @n, align 4, !tbaa !7
  %43 = sext i32 %42 to i64
  %.not26.not = icmp slt i64 %indvars.iv61, %43
  br i1 %.not26.not, label %.lr.ph48, label %.loopexit, !llvm.loop !15

._crit_edge51:                                    ; preds = %.loopexit, %0
  ret i32 0
}

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

; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!9, !9, i64 0}
!12 = distinct !{!12, !6}
!13 = distinct !{!13, !6}
!14 = distinct !{!14, !6}
!15 = distinct !{!15, !6}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass