; LLVM IR from Lakhankumawat/LearnCPP :: G-Graphs/I-Implementation (PathMatrix)

; 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_ostream" = type { ptr, %"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 }

@adj = external dso_local global [100 x [100 x i32]], align 16
@n = external dso_local global i32, align 4
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [100 x [100 x i32]], align 16
  %3 = alloca [100 x [100 x i32]], align 16
  %4 = alloca [100 x [100 x i32]], align 16
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 40000, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 40000, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 40000, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @_Z6createv()
  %8 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %9 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @_Z7displayPA100_i(ptr noundef @adj)
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %30, %0
  %11 = load i32, ptr %5, align 4, !tbaa !5
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = icmp slt i32 %11, %12
  br i1 %13, label %14, label %33

14:                                               ; preds = %10
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %26, %14
  %16 = load i32, ptr %6, align 4, !tbaa !5
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %19, label %29

19:                                               ; preds = %15
  %20 = load i32, ptr %5, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %21
  %23 = load i32, ptr %6, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [100 x i32], ptr %22, i64 0, i64 %24
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %19
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %6, align 4, !tbaa !5
  br label %15, !llvm.loop !9

29:                                               ; preds = %15
  br label %30

30:                                               ; preds = %29
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %5, align 4, !tbaa !5
  br label %10, !llvm.loop !11

33:                                               ; preds = %10
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %86, %33
  %35 = load i32, ptr %7, align 4, !tbaa !5
  %36 = load i32, ptr @n, align 4, !tbaa !5
  %37 = icmp sle i32 %35, %36
  br i1 %37, label %38, label %89

38:                                               ; preds = %34
  %39 = load i32, ptr %7, align 4, !tbaa !5
  %40 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 0
  call void @_Z12power_matrixiPA100_i(i32 noundef %39, ptr noundef %40)
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %41, i32 noundef %42)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef @.str.2)
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %46 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 0
  call void @_Z7displayPA100_i(ptr noundef %46)
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %82, %38
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = load i32, ptr @n, align 4, !tbaa !5
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %51, label %85

51:                                               ; preds = %47
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %78, %51
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = load i32, ptr @n, align 4, !tbaa !5
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %56, label %81

56:                                               ; preds = %52
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %58
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100 x i32], ptr %59, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %65
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100 x i32], ptr %66, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = add nsw i32 %63, %70
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %73
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100 x i32], ptr %74, i64 0, i64 %76
  store i32 %71, ptr %77, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %56
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %6, align 4, !tbaa !5
  br label %52, !llvm.loop !12

81:                                               ; preds = %52
  br label %82

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

85:                                               ; preds = %47
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %7, align 4, !tbaa !5
  br label %34, !llvm.loop !14

89:                                               ; preds = %34
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %92 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 0
  call void @_Z7displayPA100_i(ptr noundef %92)
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %130, %89
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = load i32, ptr @n, align 4, !tbaa !5
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %97, label %133

97:                                               ; preds = %93
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %126, %97
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %102, label %129

102:                                              ; preds = %98
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %104
  %106 = load i32, ptr %6, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [100 x i32], ptr %105, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %111, label %118

111:                                              ; preds = %102
  %112 = load i32, ptr %5, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [100 x [100 x i32]], ptr %4, i64 0, i64 %113
  %115 = load i32, ptr %6, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [100 x i32], ptr %114, i64 0, i64 %116
  store i32 0, ptr %117, align 4, !tbaa !5
  br label %125

118:                                              ; preds = %102
  %119 = load i32, ptr %5, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [100 x [100 x i32]], ptr %4, i64 0, i64 %120
  %122 = load i32, ptr %6, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [100 x i32], ptr %121, i64 0, i64 %123
  store i32 1, ptr %124, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %118, %111
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %6, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %6, align 4, !tbaa !5
  br label %98, !llvm.loop !15

129:                                              ; preds = %98
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %5, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %5, align 4, !tbaa !5
  br label %93, !llvm.loop !16

133:                                              ; preds = %93
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %136 = getelementptr inbounds [100 x [100 x i32]], ptr %4, i64 0, i64 0
  call void @_Z7displayPA100_i(ptr noundef %136)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 40000, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 40000, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 40000, ptr %2) #5
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6createv() #2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7displayPA100_i(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12power_matrixiPA100_i(i32 noundef, ptr noundef) #2

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

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

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

@adj = external dso_local global [100 x [100 x i32]], align 16
@n = external dso_local local_unnamed_addr global i32, align 4
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [100 x [100 x i32]], align 16
  %2 = alloca [100 x [100 x i32]], align 16
  %3 = alloca [100 x [100 x i32]], align 16
  call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %3) #6
  tail call void @_Z6createv()
  %4 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %5 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  tail call void @_Z7displayPA100_i(ptr noundef nonnull @adj)
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.preheader36.us.preheader, label %._crit_edge

.preheader36.us.preheader:                        ; preds = %0
  %8 = zext nneg i32 %6 to i64
  %9 = shl nuw nsw i64 %8, 2
  %xtraiter = and i64 %8, 7
  %10 = icmp ult i32 %6, 8
  br i1 %10, label %.lr.ph.preheader.unr-lcssa, label %.preheader36.us.preheader.new

.preheader36.us.preheader.new:                    ; preds = %.preheader36.us.preheader
  %unroll_iter = and i64 %8, 2147483640
  %invariant.gep = getelementptr i8, ptr %2, i64 400
  %invariant.gep87 = getelementptr i8, ptr %2, i64 800
  %invariant.gep89 = getelementptr i8, ptr %2, i64 1200
  %invariant.gep91 = getelementptr i8, ptr %2, i64 1600
  %invariant.gep93 = getelementptr i8, ptr %2, i64 2000
  %invariant.gep95 = getelementptr i8, ptr %2, i64 2400
  %invariant.gep97 = getelementptr i8, ptr %2, i64 2800
  br label %.preheader36.us

.preheader36.us:                                  ; preds = %.preheader36.us, %.preheader36.us.preheader.new
  %indvar = phi i64 [ 0, %.preheader36.us.preheader.new ], [ %indvar.next.7, %.preheader36.us ]
  %niter = phi i64 [ 0, %.preheader36.us.preheader.new ], [ %niter.next.7, %.preheader36.us ]
  %11 = mul nuw nsw i64 %indvar, 400
  %scevgep = getelementptr i8, ptr %2, i64 %11
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %9, i1 false), !tbaa !5
  %12 = mul nuw i64 %indvar, 400
  %gep = getelementptr i8, ptr %invariant.gep, i64 %12
  call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %9, i1 false), !tbaa !5
  %13 = mul nuw i64 %indvar, 400
  %gep88 = getelementptr i8, ptr %invariant.gep87, i64 %13
  call void @llvm.memset.p0.i64(ptr align 16 %gep88, i8 0, i64 %9, i1 false), !tbaa !5
  %14 = mul nuw i64 %indvar, 400
  %gep90 = getelementptr i8, ptr %invariant.gep89, i64 %14
  call void @llvm.memset.p0.i64(ptr align 16 %gep90, i8 0, i64 %9, i1 false), !tbaa !5
  %15 = mul nuw i64 %indvar, 400
  %gep92 = getelementptr i8, ptr %invariant.gep91, i64 %15
  call void @llvm.memset.p0.i64(ptr align 16 %gep92, i8 0, i64 %9, i1 false), !tbaa !5
  %16 = mul nuw i64 %indvar, 400
  %gep94 = getelementptr i8, ptr %invariant.gep93, i64 %16
  call void @llvm.memset.p0.i64(ptr align 16 %gep94, i8 0, i64 %9, i1 false), !tbaa !5
  %17 = mul nuw i64 %indvar, 400
  %gep96 = getelementptr i8, ptr %invariant.gep95, i64 %17
  call void @llvm.memset.p0.i64(ptr align 16 %gep96, i8 0, i64 %9, i1 false), !tbaa !5
  %18 = mul nuw i64 %indvar, 400
  %gep98 = getelementptr i8, ptr %invariant.gep97, i64 %18
  call void @llvm.memset.p0.i64(ptr align 16 %gep98, i8 0, i64 %9, i1 false), !tbaa !5
  %indvar.next.7 = add nuw nsw i64 %indvar, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.lr.ph.preheader.unr-lcssa, label %.preheader36.us, !llvm.loop !9

.lr.ph.preheader.unr-lcssa:                       ; preds = %.preheader36.us, %.preheader36.us.preheader
  %indvar.unr = phi i64 [ 0, %.preheader36.us.preheader ], [ %indvar.next.7, %.preheader36.us ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.preheader, label %.preheader36.us.epil

.preheader36.us.epil:                             ; preds = %.lr.ph.preheader.unr-lcssa, %.preheader36.us.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.preheader36.us.epil ], [ %indvar.unr, %.lr.ph.preheader.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader36.us.epil ], [ 0, %.lr.ph.preheader.unr-lcssa ]
  %19 = mul nuw nsw i64 %indvar.epil, 400
  %scevgep.epil = getelementptr i8, ptr %2, i64 %19
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep.epil, i8 0, i64 %9, i1 false), !tbaa !5
  %indvar.next.epil = add nuw nsw i64 %indvar.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.lr.ph.preheader, label %.preheader36.us.epil, !llvm.loop !11

.lr.ph.preheader:                                 ; preds = %.preheader36.us.epil, %.lr.ph.preheader.unr-lcssa
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %._crit_edge41.split.us
  %.044 = phi i32 [ %38, %._crit_edge41.split.us ], [ 1, %.lr.ph.preheader ]
  call void @_Z12power_matrixiPA100_i(i32 noundef %.044, ptr noundef nonnull %1)
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %20, i32 noundef %.044)
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull @.str.2)
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @_Z7displayPA100_i(ptr noundef nonnull %1)
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.preheader34.us.preheader, label %._crit_edge41.split.us

.preheader34.us.preheader:                        ; preds = %.lr.ph
  %wide.trip.count58 = zext nneg i32 %24 to i64
  %min.iters.check = icmp ult i32 %24, 8
  %n.vec = and i64 %wide.trip.count58, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count58
  br label %.preheader34.us

.preheader34.us:                                  ; preds = %.preheader34.us.preheader, %._crit_edge.us42
  %indvars.iv55 = phi i64 [ 0, %.preheader34.us.preheader ], [ %indvars.iv.next56, %._crit_edge.us42 ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.preheader34.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader34.us ]
  %26 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv55, i64 %index
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  %wide.load = load <4 x i32>, ptr %26, align 16, !tbaa !5
  %wide.load71 = load <4 x i32>, ptr %27, align 16, !tbaa !5
  %28 = getelementptr inbounds [100 x [100 x i32]], ptr %1, i64 0, i64 %indvars.iv55, i64 %index
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %wide.load72 = load <4 x i32>, ptr %28, align 16, !tbaa !5
  %wide.load73 = load <4 x i32>, ptr %29, align 16, !tbaa !5
  %30 = add nsw <4 x i32> %wide.load72, %wide.load
  %31 = add nsw <4 x i32> %wide.load73, %wide.load71
  store <4 x i32> %30, ptr %26, align 16, !tbaa !5
  store <4 x i32> %31, ptr %27, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %32 = icmp eq i64 %index.next, %n.vec
  br i1 %32, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us42, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader34.us
  %indvars.iv.ph = phi i64 [ 0, %.preheader34.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %33 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv55, i64 %indvars.iv
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = getelementptr inbounds [100 x [100 x i32]], ptr %1, i64 0, i64 %indvars.iv55, i64 %indvars.iv
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = add nsw i32 %36, %34
  store i32 %37, ptr %33, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond54.not = icmp eq i64 %indvars.iv.next, %wide.trip.count58
  br i1 %exitcond54.not, label %._crit_edge.us42, label %scalar.ph, !llvm.loop !16

._crit_edge.us42:                                 ; preds = %scalar.ph, %middle.block
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %exitcond59.not = icmp eq i64 %indvars.iv.next56, %wide.trip.count58
  br i1 %exitcond59.not, label %._crit_edge41.split.us, label %.preheader34.us, !llvm.loop !17

._crit_edge41.split.us:                           ; preds = %._crit_edge.us42, %.lr.ph
  %38 = add nuw nsw i32 %.044, 1
  %.not.not = icmp slt i32 %.044, %24
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %._crit_edge41.split.us, %0
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @_Z7displayPA100_i(ptr noundef nonnull %2)
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.preheader.us.preheader, label %._crit_edge49

.preheader.us.preheader:                          ; preds = %._crit_edge
  %wide.trip.count68 = zext nneg i32 %41 to i64
  %min.iters.check76 = icmp ult i32 %41, 8
  %n.vec79 = and i64 %wide.trip.count68, 2147483640
  %cmp.n86 = icmp eq i64 %n.vec79, %wide.trip.count68
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge47.us
  %indvars.iv65 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next66, %._crit_edge47.us ]
  br i1 %min.iters.check76, label %scalar.ph75.preheader, label %vector.body81

vector.body81:                                    ; preds = %.preheader.us, %vector.body81
  %index82 = phi i64 [ %index.next85, %vector.body81 ], [ 0, %.preheader.us ]
  %43 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv65, i64 %index82
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  %wide.load83 = load <4 x i32>, ptr %43, align 16, !tbaa !5
  %wide.load84 = load <4 x i32>, ptr %44, align 16, !tbaa !5
  %45 = icmp ne <4 x i32> %wide.load83, zeroinitializer
  %46 = icmp ne <4 x i32> %wide.load84, zeroinitializer
  %47 = zext <4 x i1> %45 to <4 x i32>
  %48 = zext <4 x i1> %46 to <4 x i32>
  %49 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %indvars.iv65, i64 %index82
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  store <4 x i32> %47, ptr %49, align 16
  store <4 x i32> %48, ptr %50, align 16
  %index.next85 = add nuw i64 %index82, 8
  %51 = icmp eq i64 %index.next85, %n.vec79
  br i1 %51, label %middle.block74, label %vector.body81, !llvm.loop !19

middle.block74:                                   ; preds = %vector.body81
  br i1 %cmp.n86, label %._crit_edge47.us, label %scalar.ph75.preheader

scalar.ph75.preheader:                            ; preds = %middle.block74, %.preheader.us
  %indvars.iv60.ph = phi i64 [ 0, %.preheader.us ], [ %n.vec79, %middle.block74 ]
  br label %scalar.ph75

scalar.ph75:                                      ; preds = %scalar.ph75.preheader, %scalar.ph75
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %scalar.ph75 ], [ %indvars.iv60.ph, %scalar.ph75.preheader ]
  %52 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv65, i64 %indvars.iv60
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = icmp ne i32 %53, 0
  %spec.select = zext i1 %54 to i32
  %55 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %indvars.iv65, i64 %indvars.iv60
  store i32 %spec.select, ptr %55, align 4
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %exitcond64.not = icmp eq i64 %indvars.iv.next61, %wide.trip.count68
  br i1 %exitcond64.not, label %._crit_edge47.us, label %scalar.ph75, !llvm.loop !20

._crit_edge47.us:                                 ; preds = %scalar.ph75, %middle.block74
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %exitcond69.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count68
  br i1 %exitcond69.not, label %._crit_edge49, label %.preheader.us, !llvm.loop !21

._crit_edge49:                                    ; preds = %._crit_edge47.us, %._crit_edge
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @_Z7displayPA100_i(ptr noundef nonnull %3)
  call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 40000, 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6createv() local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7displayPA100_i(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12power_matrixiPA100_i(i32 noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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 = { 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 #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 = { "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, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !10, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !10, !15, !14}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !14, !15}
!20 = distinct !{!20, !10, !15, !14}
!21 = distinct !{!21, !10}


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