; LLVM IR from smv1999/CompetitiveProgrammingQuestionBank :: 2D Arrays (rotate_by_90)

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  br label %16

16:                                               ; preds = %195, %0
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = add nsw i32 %17, -1
  store i32 %18, ptr %2, align 4, !tbaa !5
  %19 = icmp ne i32 %17, 0
  br i1 %19, label %20, label %198

20:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = zext i32 %22 to i64
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = zext i32 %24 to i64
  %26 = call ptr @llvm.stacksave.p0()
  store ptr %26, ptr %4, align 8
  %27 = mul nuw i64 %23, %25
  %28 = alloca i32, i64 %27, align 16
  store i64 %23, ptr %5, align 8
  store i64 %25, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %53, %20
  %30 = load i32, ptr %7, align 4, !tbaa !5
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 4, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %56

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

35:                                               ; preds = %49, %34
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  store i32 7, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %52

40:                                               ; preds = %35
  %41 = load i32, ptr %7, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = mul nsw i64 %42, %25
  %44 = getelementptr inbounds i32, ptr %28, i64 %43
  %45 = load i32, ptr %9, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr %44, i64 %46
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %47)
  br label %49

49:                                               ; preds = %40
  %50 = load i32, ptr %9, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %9, align 4, !tbaa !5
  br label %35, !llvm.loop !9

52:                                               ; preds = %39
  br label %53

53:                                               ; preds = %52
  %54 = load i32, ptr %7, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %7, align 4, !tbaa !5
  br label %29, !llvm.loop !11

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

57:                                               ; preds = %163, %56
  %58 = load i32, ptr %10, align 4, !tbaa !5
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = sdiv i32 %59, 2
  %61 = icmp slt i32 %58, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %57
  store i32 10, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %166

63:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %64 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %64, ptr %11, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %159, %63
  %66 = load i32, ptr %11, align 4, !tbaa !5
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = load i32, ptr %10, align 4, !tbaa !5
  %69 = sub nsw i32 %67, %68
  %70 = sub nsw i32 %69, 1
  %71 = icmp slt i32 %66, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %65
  store i32 13, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %162

73:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %74 = load i32, ptr %10, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = mul nsw i64 %75, %25
  %77 = getelementptr inbounds i32, ptr %28, i64 %76
  %78 = load i32, ptr %11, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %77, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  store i32 %81, ptr %12, align 4, !tbaa !5
  %82 = load i32, ptr %11, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = mul nsw i64 %83, %25
  %85 = getelementptr inbounds i32, ptr %28, i64 %84
  %86 = load i32, ptr %3, align 4, !tbaa !5
  %87 = load i32, ptr %10, align 4, !tbaa !5
  %88 = sub nsw i32 %86, %87
  %89 = sub nsw i32 %88, 1
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr %85, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = load i32, ptr %10, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = mul nsw i64 %94, %25
  %96 = getelementptr inbounds i32, ptr %28, i64 %95
  %97 = load i32, ptr %11, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %96, i64 %98
  store i32 %92, ptr %99, align 4, !tbaa !5
  %100 = load i32, ptr %3, align 4, !tbaa !5
  %101 = sub nsw i32 %100, 1
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = sub nsw i32 %101, %102
  %104 = sext i32 %103 to i64
  %105 = mul nsw i64 %104, %25
  %106 = getelementptr inbounds i32, ptr %28, i64 %105
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = sub nsw i32 %107, 1
  %109 = load i32, ptr %11, align 4, !tbaa !5
  %110 = sub nsw i32 %108, %109
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %106, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = load i32, ptr %11, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = mul nsw i64 %115, %25
  %117 = getelementptr inbounds i32, ptr %28, i64 %116
  %118 = load i32, ptr %3, align 4, !tbaa !5
  %119 = load i32, ptr %10, align 4, !tbaa !5
  %120 = sub nsw i32 %118, %119
  %121 = sub nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds i32, ptr %117, i64 %122
  store i32 %113, ptr %123, align 4, !tbaa !5
  %124 = load i32, ptr %3, align 4, !tbaa !5
  %125 = sub nsw i32 %124, 1
  %126 = load i32, ptr %11, align 4, !tbaa !5
  %127 = sub nsw i32 %125, %126
  %128 = sext i32 %127 to i64
  %129 = mul nsw i64 %128, %25
  %130 = getelementptr inbounds i32, ptr %28, i64 %129
  %131 = load i32, ptr %10, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %130, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = load i32, ptr %3, align 4, !tbaa !5
  %136 = sub nsw i32 %135, 1
  %137 = load i32, ptr %10, align 4, !tbaa !5
  %138 = sub nsw i32 %136, %137
  %139 = sext i32 %138 to i64
  %140 = mul nsw i64 %139, %25
  %141 = getelementptr inbounds i32, ptr %28, i64 %140
  %142 = load i32, ptr %3, align 4, !tbaa !5
  %143 = sub nsw i32 %142, 1
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = sub nsw i32 %143, %144
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds i32, ptr %141, i64 %146
  store i32 %134, ptr %147, align 4, !tbaa !5
  %148 = load i32, ptr %12, align 4, !tbaa !5
  %149 = load i32, ptr %3, align 4, !tbaa !5
  %150 = sub nsw i32 %149, 1
  %151 = load i32, ptr %11, align 4, !tbaa !5
  %152 = sub nsw i32 %150, %151
  %153 = sext i32 %152 to i64
  %154 = mul nsw i64 %153, %25
  %155 = getelementptr inbounds i32, ptr %28, i64 %154
  %156 = load i32, ptr %10, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds i32, ptr %155, i64 %157
  store i32 %148, ptr %158, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %159

159:                                              ; preds = %73
  %160 = load i32, ptr %11, align 4, !tbaa !5
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %11, align 4, !tbaa !5
  br label %65, !llvm.loop !12

162:                                              ; preds = %72
  br label %163

163:                                              ; preds = %162
  %164 = load i32, ptr %10, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %10, align 4, !tbaa !5
  br label %57, !llvm.loop !13

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

167:                                              ; preds = %192, %166
  %168 = load i32, ptr %13, align 4, !tbaa !5
  %169 = load i32, ptr %3, align 4, !tbaa !5
  %170 = icmp slt i32 %168, %169
  br i1 %170, label %172, label %171

171:                                              ; preds = %167
  store i32 16, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %195

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

173:                                              ; preds = %188, %172
  %174 = load i32, ptr %14, align 4, !tbaa !5
  %175 = load i32, ptr %3, align 4, !tbaa !5
  %176 = icmp slt i32 %174, %175
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  store i32 19, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %191

178:                                              ; preds = %173
  %179 = load i32, ptr %13, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = mul nsw i64 %180, %25
  %182 = getelementptr inbounds i32, ptr %28, i64 %181
  %183 = load i32, ptr %14, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds i32, ptr %182, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %186)
  br label %188

188:                                              ; preds = %178
  %189 = load i32, ptr %14, align 4, !tbaa !5
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %14, align 4, !tbaa !5
  br label %173, !llvm.loop !14

191:                                              ; preds = %177
  br label %192

192:                                              ; preds = %191
  %193 = load i32, ptr %13, align 4, !tbaa !5
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %13, align 4, !tbaa !5
  br label %167, !llvm.loop !15

195:                                              ; preds = %171
  %196 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %197 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %197)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %16, !llvm.loop !16

198:                                              ; preds = %16
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %199 = load i32, ptr %1, align 4
  ret i32 %199
}

; 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
declare ptr @llvm.stacksave.p0() #3

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

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 @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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 = { 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 = { nocallback nofree nosync nounwind willreturn }
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 = { 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 #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}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %3 = 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)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr %1, align 4, !tbaa !5
  %.not61 = icmp eq i32 %4, 0
  br i1 %.not61, label %._crit_edge64, label %.lr.ph63

.lr.ph63:                                         ; preds = %0, %._crit_edge60
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = zext i32 %7 to i64
  %9 = call ptr @llvm.stacksave.p0()
  %10 = mul nuw i64 %8, %8
  %11 = alloca i32, i64 %10, align 16
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.preheader43, label %._crit_edge60

.preheader45:                                     ; preds = %._crit_edge
  %14 = icmp sgt i32 %31, 1
  br i1 %14, label %.preheader42.lr.ph, label %.preheader44

.preheader42.lr.ph:                               ; preds = %.preheader45
  %15 = lshr i32 %31, 1
  %16 = add nsw i32 %31, -1
  %17 = zext nneg i32 %31 to i64
  %18 = zext i32 %16 to i64
  %wide.trip.count80 = zext nneg i32 %15 to i64
  %scevgep101 = getelementptr i8, ptr %11, i64 -4
  %19 = shl nuw nsw i64 %17, 2
  %scevgep102 = getelementptr i8, ptr %scevgep101, i64 %19
  %20 = shl nuw nsw i64 %18, 2
  %scevgep106 = getelementptr i8, ptr %11, i64 %20
  %21 = shl nuw nsw i64 %17, 2
  %scevgep113 = getelementptr i8, ptr %scevgep101, i64 %21
  %scevgep114 = getelementptr i8, ptr %11, i64 %21
  %22 = shl nuw nsw i64 %18, 3
  %23 = or disjoint i64 %22, 4
  %scevgep119 = getelementptr i8, ptr %11, i64 -4
  %scevgep120 = getelementptr i8, ptr %scevgep119, i64 %21
  %24 = shl nuw nsw i64 %18, 2
  %scevgep122 = getelementptr i8, ptr %11, i64 %24
  %scevgep124 = getelementptr i8, ptr %11, i64 4
  %scevgep125 = getelementptr i8, ptr %scevgep124, i64 %24
  %25 = getelementptr i8, ptr %11, i64 %22
  %26 = getelementptr i8, ptr %11, i64 %23
  %ident.check = icmp ne i32 %7, 1
  %bound0141 = icmp ult ptr %scevgep101, %11
  %bound0145 = icmp ult ptr %scevgep113, %scevgep125
  br label %.preheader42

.preheader43:                                     ; preds = %.lr.ph63, %._crit_edge
  %27 = phi i32 [ %31, %._crit_edge ], [ %12, %.lr.ph63 ]
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %._crit_edge ], [ 0, %.lr.ph63 ]
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph, label %.preheader43.._crit_edge_crit_edge

.preheader43.._crit_edge_crit_edge:               ; preds = %.preheader43
  %.pre = sext i32 %27 to i64
  br label %._crit_edge

.lr.ph:                                           ; preds = %.preheader43
  %29 = mul nuw nsw i64 %indvars.iv69, %8
  %30 = getelementptr inbounds i32, ptr %11, i64 %29
  br label %33

._crit_edge:                                      ; preds = %33, %.preheader43.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader43.._crit_edge_crit_edge ], [ %37, %33 ]
  %31 = phi i32 [ %27, %.preheader43.._crit_edge_crit_edge ], [ %36, %33 ]
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %32 = icmp slt i64 %indvars.iv.next70, %.pre-phi
  br i1 %32, label %.preheader43, label %.preheader45, !llvm.loop !9

33:                                               ; preds = %.lr.ph, %33
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %33 ]
  %34 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %34)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = icmp slt i64 %indvars.iv.next, %37
  br i1 %38, label %33, label %._crit_edge, !llvm.loop !12

.preheader44:                                     ; preds = %._crit_edge50, %.preheader45
  %39 = icmp sgt i32 %31, 0
  br i1 %39, label %.preheader, label %._crit_edge60

.preheader42:                                     ; preds = %.preheader42.lr.ph, %._crit_edge50
  %indvars.iv77 = phi i32 [ %16, %.preheader42.lr.ph ], [ %indvars.iv.next78, %._crit_edge50 ]
  %indvars.iv72 = phi i64 [ 0, %.preheader42.lr.ph ], [ %indvars.iv.next73, %._crit_edge50 ]
  %40 = zext i32 %indvars.iv77 to i64
  %41 = sub nsw i64 %40, %indvars.iv72
  %42 = shl nuw nsw i64 %indvars.iv72, 3
  %scevgep110 = getelementptr i8, ptr %11, i64 %42
  %43 = or disjoint i64 %42, 4
  %scevgep111 = getelementptr i8, ptr %11, i64 %43
  %44 = xor i64 %indvars.iv72, -1
  %45 = zext i32 %indvars.iv77 to i64
  %46 = add nsw i64 %44, %45
  %47 = shl nsw i64 %46, 2
  %scevgep112 = getelementptr i8, ptr %scevgep111, i64 %47
  %scevgep115 = getelementptr i8, ptr %scevgep114, i64 %47
  %48 = mul nsw i64 %indvars.iv72, -8
  %scevgep116 = getelementptr i8, ptr %25, i64 %48
  %49 = mul nsw i64 %46, -4
  %scevgep117 = getelementptr i8, ptr %scevgep116, i64 %49
  %scevgep118 = getelementptr i8, ptr %26, i64 %48
  %scevgep121 = getelementptr i8, ptr %scevgep120, i64 %49
  %scevgep123 = getelementptr i8, ptr %scevgep122, i64 %49
  %50 = xor i64 %indvars.iv72, -1
  %51 = zext i32 %indvars.iv77 to i64
  %52 = add nsw i64 %50, %51
  %53 = sub nsw i64 %18, %indvars.iv72
  %54 = shl i64 %53, 3
  %scevgep = getelementptr i8, ptr %11, i64 %54
  %55 = xor i64 %indvars.iv72, -1
  %56 = add nsw i64 %17, %55
  %57 = icmp slt i64 %indvars.iv72, %56
  br i1 %57, label %.lr.ph49, label %._crit_edge50

.lr.ph49:                                         ; preds = %.preheader42
  %58 = mul nuw nsw i64 %indvars.iv72, %8
  %59 = getelementptr inbounds i32, ptr %11, i64 %58
  %invariant.gep = getelementptr i32, ptr %11, i64 %56
  %60 = sub nsw i64 %18, %indvars.iv72
  %61 = mul nsw i64 %60, %8
  %62 = getelementptr inbounds i32, ptr %11, i64 %61
  %invariant.gep51 = getelementptr i32, ptr %11, i64 %indvars.iv72
  %wide.trip.count = zext i32 %indvars.iv77 to i64
  %min.iters.check = icmp ult i64 %41, 32
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %vector.scevcheck, %.lr.ph49
  %indvars.iv74.ph = phi i64 [ %indvars.iv72, %vector.memcheck ], [ %indvars.iv72, %vector.scevcheck ], [ %indvars.iv72, %.lr.ph49 ], [ %ind.end, %middle.block ]
  br label %scalar.ph

vector.scevcheck:                                 ; preds = %.lr.ph49
  %mul.result.neg = mul i64 %52, -4
  %mul.overflow = icmp ugt i64 %52, 4611686018427387903
  %63 = getelementptr i8, ptr %scevgep, i64 %mul.result.neg
  %64 = icmp ugt ptr %63, %scevgep
  %65 = or i1 %64, %mul.overflow
  %mul.result104.neg = mul i64 %52, -4
  %66 = getelementptr i8, ptr %scevgep102, i64 %mul.result104.neg
  %67 = icmp ugt ptr %66, %scevgep102
  %mul.result108.neg = mul i64 %52, -4
  %68 = getelementptr i8, ptr %scevgep106, i64 %mul.result108.neg
  %69 = icmp ugt ptr %68, %scevgep106
  %70 = or i1 %ident.check, %65
  %71 = or i1 %67, %70
  %72 = or i1 %69, %71
  br i1 %72, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %vector.scevcheck
  %bound0 = icmp ult ptr %scevgep110, %scevgep115
  %bound1 = icmp ult ptr %scevgep113, %scevgep112
  %found.conflict = and i1 %bound0, %bound1
  %bound0126 = icmp ult ptr %scevgep110, %scevgep118
  %bound1127 = icmp ult ptr %scevgep117, %scevgep112
  %found.conflict128 = and i1 %bound0126, %bound1127
  %conflict.rdx = or i1 %found.conflict, %found.conflict128
  %bound0129 = icmp ult ptr %scevgep110, %scevgep114
  %bound1130 = icmp ult ptr %scevgep121, %scevgep112
  %found.conflict131 = and i1 %bound0129, %bound1130
  %conflict.rdx132 = or i1 %conflict.rdx, %found.conflict131
  %bound0133 = icmp ult ptr %scevgep110, %scevgep125
  %bound1134 = icmp ult ptr %scevgep123, %scevgep112
  %found.conflict135 = and i1 %bound0133, %bound1134
  %conflict.rdx136 = or i1 %conflict.rdx132, %found.conflict135
  %bound0137 = icmp ult ptr %scevgep113, %scevgep118
  %bound1138 = icmp ult ptr %scevgep117, %scevgep115
  %found.conflict139 = and i1 %bound0137, %bound1138
  %conflict.rdx140 = or i1 %conflict.rdx136, %found.conflict139
  %bound1142 = icmp ult ptr %scevgep121, %scevgep115
  %found.conflict143 = and i1 %bound0141, %bound1142
  %conflict.rdx144 = or i1 %conflict.rdx140, %found.conflict143
  %bound1146 = icmp ult ptr %scevgep123, %scevgep115
  %found.conflict147 = and i1 %bound0145, %bound1146
  %conflict.rdx148 = or i1 %conflict.rdx144, %found.conflict147
  %bound0149 = icmp ult ptr %scevgep117, %scevgep114
  %bound1150 = icmp ult ptr %scevgep121, %scevgep118
  %found.conflict151 = and i1 %bound0149, %bound1150
  %conflict.rdx152 = or i1 %conflict.rdx148, %found.conflict151
  %bound0153 = icmp ult ptr %scevgep117, %scevgep125
  %bound1154 = icmp ult ptr %scevgep123, %scevgep118
  %found.conflict155 = and i1 %bound0153, %bound1154
  %conflict.rdx156 = or i1 %conflict.rdx152, %found.conflict155
  %bound0157 = icmp ult ptr %scevgep121, %scevgep125
  %bound1158 = icmp ult ptr %scevgep123, %scevgep114
  %found.conflict159 = and i1 %bound0157, %bound1158
  %conflict.rdx160 = or i1 %conflict.rdx156, %found.conflict159
  br i1 %conflict.rdx160, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %41, -4
  %ind.end = add i64 %indvars.iv72, %n.vec
  %invariant.gep175 = getelementptr i8, ptr %62, i64 -12
  %invariant.gep177 = getelementptr i8, ptr %invariant.gep51, i64 -12
  %73 = getelementptr i32, ptr %invariant.gep51, i64 %17
  %invariant.gep179 = getelementptr i8, ptr %73, i64 -12
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %indvars.iv72, %index
  %74 = getelementptr inbounds i32, ptr %59, i64 %offset.idx
  %wide.load = load <4 x i32>, ptr %74, align 4, !tbaa !5, !alias.scope !13, !noalias !16
  %75 = getelementptr i32, ptr %invariant.gep, i64 %offset.idx
  %wide.load161 = load <4 x i32>, ptr %75, align 4, !tbaa !5, !alias.scope !21, !noalias !22
  store <4 x i32> %wide.load161, ptr %74, align 4, !tbaa !5, !alias.scope !13, !noalias !16
  %76 = sub nsw i64 %18, %offset.idx
  %gep176 = getelementptr i32, ptr %invariant.gep175, i64 %76
  %wide.load162 = load <4 x i32>, ptr %gep176, align 4, !tbaa !5, !alias.scope !23, !noalias !24
  %reverse = shufflevector <4 x i32> %wide.load162, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse, ptr %75, align 4, !tbaa !5, !alias.scope !21, !noalias !22
  %gep178 = getelementptr i32, ptr %invariant.gep177, i64 %76
  %wide.load163 = load <4 x i32>, ptr %gep178, align 4, !tbaa !5, !alias.scope !25
  store <4 x i32> %wide.load163, ptr %gep176, align 4, !tbaa !5, !alias.scope !23, !noalias !24
  %77 = xor i64 %offset.idx, -1
  %gep180 = getelementptr i32, ptr %invariant.gep179, i64 %77
  %reverse166 = shufflevector <4 x i32> %wide.load, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse166, ptr %gep180, align 4, !tbaa !5, !alias.scope !26, !noalias !25
  %index.next = add nuw i64 %index, 4
  %78 = icmp eq i64 %index.next, %n.vec
  br i1 %78, label %middle.block, label %vector.body, !llvm.loop !27

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %41, %n.vec
  br i1 %cmp.n, label %._crit_edge50, label %scalar.ph.preheader

._crit_edge50:                                    ; preds = %scalar.ph, %middle.block, %.preheader42
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %indvars.iv.next78 = add i32 %indvars.iv77, -1
  %exitcond81.not = icmp eq i64 %indvars.iv.next73, %wide.trip.count80
  br i1 %exitcond81.not, label %.preheader44, label %.preheader42, !llvm.loop !30

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %scalar.ph ], [ %indvars.iv74.ph, %scalar.ph.preheader ]
  %79 = getelementptr inbounds i32, ptr %59, i64 %indvars.iv74
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = mul nuw nsw i64 %indvars.iv74, %8
  %gep = getelementptr i32, ptr %invariant.gep, i64 %81
  %82 = load i32, ptr %gep, align 4, !tbaa !5
  store i32 %82, ptr %79, align 4, !tbaa !5
  %83 = sub nsw i64 %18, %indvars.iv74
  %84 = getelementptr inbounds i32, ptr %62, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  store i32 %85, ptr %gep, align 4, !tbaa !5
  %86 = mul nsw i64 %83, %8
  %gep52 = getelementptr i32, ptr %invariant.gep51, i64 %86
  %87 = load i32, ptr %gep52, align 4, !tbaa !5
  store i32 %87, ptr %84, align 4, !tbaa !5
  %88 = xor i64 %indvars.iv74, -1
  %89 = add nsw i64 %17, %88
  %90 = mul nsw i64 %89, %8
  %gep54 = getelementptr i32, ptr %invariant.gep51, i64 %90
  store i32 %80, ptr %gep54, align 4, !tbaa !5
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next75, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge50, label %scalar.ph, !llvm.loop !31

.preheader:                                       ; preds = %.preheader44, %._crit_edge58
  %91 = phi i32 [ %98, %._crit_edge58 ], [ %31, %.preheader44 ]
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %._crit_edge58 ], [ 0, %.preheader44 ]
  %92 = icmp sgt i32 %91, 0
  br i1 %92, label %.lr.ph57, label %.preheader.._crit_edge58_crit_edge

.preheader.._crit_edge58_crit_edge:               ; preds = %.preheader
  %.pre88 = sext i32 %91 to i64
  br label %._crit_edge58

.lr.ph57:                                         ; preds = %.preheader
  %93 = mul nuw nsw i64 %indvars.iv85, %8
  %94 = getelementptr inbounds i32, ptr %11, i64 %93
  br label %100

._crit_edge60:                                    ; preds = %._crit_edge58, %.lr.ph63, %.preheader44
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.stackrestore.p0(ptr %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %96 = load i32, ptr %1, align 4, !tbaa !5
  %97 = add nsw i32 %96, -1
  store i32 %97, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %96, 0
  br i1 %.not, label %._crit_edge64, label %.lr.ph63, !llvm.loop !32

._crit_edge58:                                    ; preds = %100, %.preheader.._crit_edge58_crit_edge
  %.pre-phi89 = phi i64 [ %.pre88, %.preheader.._crit_edge58_crit_edge ], [ %105, %100 ]
  %98 = phi i32 [ %91, %.preheader.._crit_edge58_crit_edge ], [ %104, %100 ]
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %99 = icmp slt i64 %indvars.iv.next86, %.pre-phi89
  br i1 %99, label %.preheader, label %._crit_edge60, !llvm.loop !33

100:                                              ; preds = %.lr.ph57, %100
  %indvars.iv82 = phi i64 [ 0, %.lr.ph57 ], [ %indvars.iv.next83, %100 ]
  %101 = getelementptr inbounds i32, ptr %94, i64 %indvars.iv82
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %102)
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %104 = load i32, ptr %2, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = icmp slt i64 %indvars.iv.next83, %105
  br i1 %106, label %100, label %._crit_edge58, !llvm.loop !34

._crit_edge64:                                    ; preds = %._crit_edge60, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

; 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
declare ptr @llvm.stacksave.p0() #3

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

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 @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn }
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 = { 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 #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, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = distinct !{!12, !10}
!13 = !{!14}
!14 = distinct !{!14, !15}
!15 = distinct !{!15, !"LVerDomain"}
!16 = !{!17, !18, !19, !20}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = !{!17}
!22 = !{!18, !19, !20}
!23 = !{!18}
!24 = !{!19, !20}
!25 = !{!20}
!26 = !{!19}
!27 = distinct !{!27, !10, !28, !29}
!28 = !{!"llvm.loop.isvectorized", i32 1}
!29 = !{!"llvm.loop.unroll.runtime.disable"}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !10, !28}
!32 = distinct !{!32, !10}
!33 = distinct !{!33, !10, !11}
!34 = distinct !{!34, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass