; LLVM IR from Tunghohin/Competitive_Coding :: Nowcoder/21791_C.ll (Z5solvev)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@a = external dso_local global [100010 x i32], align 16
@C = external dso_local global [100010 x [5 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #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
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %21, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = icmp sle i32 %12, %13
  br i1 %14, label %16, label %15

15:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %24

16:                                               ; preds = %11
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %18
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %19)
  br label %21

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

24:                                               ; preds = %15
  %25 = load i32, ptr %1, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds i32, ptr getelementptr inbounds (i32, ptr @a, i64 1), i64 %26
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef getelementptr inbounds (i32, ptr @a, i64 1), ptr noundef %27)
  %28 = load i32, ptr getelementptr inbounds ([100010 x i32], ptr @a, i64 0, i64 1), align 4, !tbaa !5
  %29 = load i32, ptr getelementptr inbounds ([100010 x i32], ptr @a, i64 0, i64 2), align 8, !tbaa !5
  %30 = icmp sle i32 %28, %29
  br i1 %30, label %31, label %65

31:                                               ; preds = %24
  %32 = load i32, ptr getelementptr inbounds ([100010 x i32], ptr @a, i64 0, i64 2), align 8, !tbaa !5
  %33 = load i32, ptr getelementptr inbounds ([100010 x i32], ptr @a, i64 0, i64 3), align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %35, label %65

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

36:                                               ; preds = %57, %35
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = load i32, ptr %1, align 4, !tbaa !5
  %39 = icmp sle i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  store i32 5, ptr %5, align 4
  br label %60

41:                                               ; preds = %36
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = sub nsw i32 %46, 1
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = icmp eq i32 %45, %50
  br i1 %51, label %52, label %55

52:                                               ; preds = %41
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %3, align 4, !tbaa !5
  br label %56

55:                                               ; preds = %41
  store i32 5, ptr %5, align 4
  br label %60

56:                                               ; preds = %52
  br label %57

57:                                               ; preds = %56
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %4, align 4, !tbaa !5
  br label %36, !llvm.loop !11

60:                                               ; preds = %55, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %62)
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %63, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %150

65:                                               ; preds = %31, %24
  %66 = load i32, ptr getelementptr inbounds ([100010 x i32], ptr @a, i64 0, i64 1), align 4, !tbaa !5
  %67 = load i32, ptr getelementptr inbounds ([100010 x i32], ptr @a, i64 0, i64 2), align 8, !tbaa !5
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %69, label %106

69:                                               ; preds = %65
  %70 = load i32, ptr getelementptr inbounds ([100010 x i32], ptr @a, i64 0, i64 2), align 8, !tbaa !5
  %71 = load i32, ptr getelementptr inbounds ([100010 x i32], ptr @a, i64 0, i64 3), align 4, !tbaa !5
  %72 = icmp eq i32 %70, %71
  br i1 %72, label %73, label %106

73:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 2, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 4, ptr %7, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %95, %73
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = load i32, ptr %1, align 4, !tbaa !5
  %77 = icmp sle i32 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  store i32 8, ptr %5, align 4
  br label %98

79:                                               ; preds = %74
  %80 = load i32, ptr %7, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = load i32, ptr %7, align 4, !tbaa !5
  %85 = sub nsw i32 %84, 1
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = icmp eq i32 %83, %88
  br i1 %89, label %90, label %93

90:                                               ; preds = %79
  %91 = load i32, ptr %6, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %6, align 4, !tbaa !5
  br label %94

93:                                               ; preds = %79
  store i32 8, ptr %5, align 4
  br label %98

94:                                               ; preds = %90
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %7, align 4, !tbaa !5
  br label %74, !llvm.loop !12

98:                                               ; preds = %93, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100010 x [5 x i64]], ptr @C, i64 0, i64 %101
  %103 = getelementptr inbounds [5 x i64], ptr %102, i64 0, i64 2
  %104 = load i64, ptr %103, align 8, !tbaa !13
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %104)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %149

106:                                              ; preds = %69, %65
  %107 = load i32, ptr getelementptr inbounds ([100010 x i32], ptr @a, i64 0, i64 1), align 4, !tbaa !5
  %108 = load i32, ptr getelementptr inbounds ([100010 x i32], ptr @a, i64 0, i64 2), align 8, !tbaa !5
  %109 = icmp eq i32 %107, %108
  br i1 %109, label %110, label %148

110:                                              ; preds = %106
  %111 = load i32, ptr getelementptr inbounds ([100010 x i32], ptr @a, i64 0, i64 2), align 8, !tbaa !5
  %112 = load i32, ptr getelementptr inbounds ([100010 x i32], ptr @a, i64 0, i64 3), align 4, !tbaa !5
  %113 = icmp eq i32 %111, %112
  br i1 %113, label %114, label %148

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 3, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 4, ptr %9, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %136, %114
  %116 = load i32, ptr %9, align 4, !tbaa !5
  %117 = load i32, ptr %1, align 4, !tbaa !5
  %118 = icmp sle i32 %116, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %115
  store i32 11, ptr %5, align 4
  br label %139

120:                                              ; preds = %115
  %121 = load i32, ptr %9, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = load i32, ptr %9, align 4, !tbaa !5
  %126 = sub nsw i32 %125, 1
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = icmp eq i32 %124, %129
  br i1 %130, label %131, label %134

131:                                              ; preds = %120
  %132 = load i32, ptr %8, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %8, align 4, !tbaa !5
  br label %135

134:                                              ; preds = %120
  store i32 11, ptr %5, align 4
  br label %139

135:                                              ; preds = %131
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %9, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %9, align 4, !tbaa !5
  br label %115, !llvm.loop !15

139:                                              ; preds = %134, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %8, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [100010 x [5 x i64]], ptr @C, i64 0, i64 %142
  %144 = getelementptr inbounds [5 x i64], ptr %143, i64 0, i64 3
  %145 = load i64, ptr %144, align 8, !tbaa !13
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %145)
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %146, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %148

148:                                              ; preds = %140, %110, %106
  br label %149

149:                                              ; preds = %148, %99
  br label %150

150:                                              ; preds = %149, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret void
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #0 align 2

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 = { "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 = { 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 #4 = { 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 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !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"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@a = external dso_local global [100010 x i32], align 16
@C = external dso_local local_unnamed_addr global [100010 x [5 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %2 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %3 = load i32, ptr %1, align 4, !tbaa !5
  %.not42 = icmp slt i32 %3, 1
  br i1 %.not42, label %.._crit_edge_crit_edge, label %.lr.ph

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre = sext i32 %3 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %15, %.lr.ph ]
  %4 = getelementptr inbounds i32, ptr getelementptr inbounds (i8, ptr @a, i64 4), i64 %.pre-phi
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @a, i64 4), ptr noundef nonnull %4)
  %5 = load i32, ptr getelementptr inbounds (i8, ptr @a, i64 4), align 4, !tbaa !5
  %6 = load i32, ptr getelementptr inbounds (i8, ptr @a, i64 8), align 8, !tbaa !5
  %.not31 = icmp sle i32 %5, %6
  %7 = load i32, ptr getelementptr inbounds (i8, ptr @a, i64 12), align 4
  %8 = icmp slt i32 %6, %7
  %or.cond = select i1 %.not31, i1 %8, i1 false
  br i1 %or.cond, label %.preheader, label %23

.preheader:                                       ; preds = %._crit_edge
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %.not3460 = icmp slt i32 %9, 4
  br i1 %.not3460, label %._crit_edge64, label %.lr.ph63.preheader

.lr.ph63.preheader:                               ; preds = %.preheader
  %10 = add nsw i32 %9, -2
  %11 = add nuw i32 %9, 1
  %wide.trip.count81 = zext i32 %11 to i64
  br label %.lr.ph63

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %12 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %.not.not = icmp slt i64 %indvars.iv, %15
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph63:                                         ; preds = %.lr.ph63.preheader, %19
  %indvars.iv78 = phi i64 [ 4, %.lr.ph63.preheader ], [ %indvars.iv.next79, %19 ]
  %.02561 = phi i32 [ 1, %.lr.ph63.preheader ], [ %20, %19 ]
  %16 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv78
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = icmp eq i32 %17, %7
  br i1 %18, label %19, label %._crit_edge64

19:                                               ; preds = %.lr.ph63
  %20 = add nuw nsw i32 %.02561, 1
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next79, %wide.trip.count81
  br i1 %exitcond82.not, label %._crit_edge64, label %.lr.ph63, !llvm.loop !11

._crit_edge64:                                    ; preds = %19, %.lr.ph63, %.preheader
  %.025.lcssa = phi i32 [ 1, %.preheader ], [ %.02561, %.lr.ph63 ], [ %10, %19 ]
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.025.lcssa)
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %21, i8 noundef signext 10)
  br label %52

23:                                               ; preds = %._crit_edge
  %24 = icmp slt i32 %5, %6
  %25 = icmp eq i32 %6, %7
  %or.cond37 = select i1 %24, i1 %25, i1 false
  br i1 %or.cond37, label %.preheader40, label %38

.preheader40:                                     ; preds = %23
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %.not3352 = icmp slt i32 %26, 4
  br i1 %.not3352, label %._crit_edge56, label %.lr.ph55.preheader

.lr.ph55.preheader:                               ; preds = %.preheader40
  %27 = add nsw i32 %26, -1
  %28 = add nuw i32 %26, 1
  %wide.trip.count76 = zext i32 %28 to i64
  br label %.lr.ph55

.lr.ph55:                                         ; preds = %.lr.ph55.preheader, %32
  %indvars.iv73 = phi i64 [ 4, %.lr.ph55.preheader ], [ %indvars.iv.next74, %32 ]
  %.02353 = phi i32 [ 2, %.lr.ph55.preheader ], [ %33, %32 ]
  %29 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv73
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = icmp eq i32 %30, %6
  br i1 %31, label %32, label %._crit_edge56.loopexit

32:                                               ; preds = %.lr.ph55
  %33 = add nuw nsw i32 %.02353, 1
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %exitcond77.not = icmp eq i64 %indvars.iv.next74, %wide.trip.count76
  br i1 %exitcond77.not, label %._crit_edge56.loopexit, label %.lr.ph55, !llvm.loop !12

._crit_edge56.loopexit:                           ; preds = %.lr.ph55, %32
  %.023.lcssa.ph = phi i32 [ %27, %32 ], [ %.02353, %.lr.ph55 ]
  %34 = zext nneg i32 %.023.lcssa.ph to i64
  br label %._crit_edge56

._crit_edge56:                                    ; preds = %._crit_edge56.loopexit, %.preheader40
  %.023.lcssa = phi i64 [ 2, %.preheader40 ], [ %34, %._crit_edge56.loopexit ]
  %35 = getelementptr inbounds [100010 x [5 x i64]], ptr @C, i64 0, i64 %.023.lcssa, i64 2
  %36 = load i64, ptr %35, align 8, !tbaa !13
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %36)
  br label %52

38:                                               ; preds = %23
  %39 = icmp eq i32 %5, %6
  %or.cond39 = select i1 %39, i1 %25, i1 false
  br i1 %or.cond39, label %.preheader41, label %52

.preheader41:                                     ; preds = %38
  %40 = load i32, ptr %1, align 4, !tbaa !5
  %.not3244 = icmp slt i32 %40, 4
  br i1 %.not3244, label %._crit_edge48, label %.lr.ph47.preheader

.lr.ph47.preheader:                               ; preds = %.preheader41
  %41 = add nuw i32 %40, 1
  %wide.trip.count = zext i32 %41 to i64
  br label %.lr.ph47

.lr.ph47:                                         ; preds = %.lr.ph47.preheader, %45
  %indvars.iv70 = phi i64 [ 4, %.lr.ph47.preheader ], [ %indvars.iv.next71, %45 ]
  %.02145 = phi i32 [ 3, %.lr.ph47.preheader ], [ %46, %45 ]
  %42 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv70
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = icmp eq i32 %43, %5
  br i1 %44, label %45, label %._crit_edge48.loopexit

45:                                               ; preds = %.lr.ph47
  %46 = add nuw nsw i32 %.02145, 1
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge48.loopexit, label %.lr.ph47, !llvm.loop !15

._crit_edge48.loopexit:                           ; preds = %.lr.ph47, %45
  %.021.lcssa.ph = phi i32 [ %40, %45 ], [ %.02145, %.lr.ph47 ]
  %47 = zext nneg i32 %.021.lcssa.ph to i64
  br label %._crit_edge48

._crit_edge48:                                    ; preds = %._crit_edge48.loopexit, %.preheader41
  %.021.lcssa = phi i64 [ 3, %.preheader41 ], [ %47, %._crit_edge48.loopexit ]
  %48 = getelementptr inbounds [100010 x [5 x i64]], ptr @C, i64 0, i64 %.021.lcssa, i64 3
  %49 = load i64, ptr %48, align 8, !tbaa !13
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %49)
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %50, i8 noundef signext 10)
  br label %52

52:                                               ; preds = %._crit_edge56, %._crit_edge48, %38, %._crit_edge64
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret void
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #0 align 2

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 = { "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 = { 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 #4 = { 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 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !10}


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