; LLVM IR from MakeContributions/DSA :: algorithms/CPlusPlus/Arrays/sparse_matrix.ll (Z13compactMatrixPA5_i)

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z13compactMatrixPA5_i(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %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
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %41, %1
  %15 = load i32, ptr %4, align 4, !tbaa !9
  %16 = icmp slt i32 %15, 4
  br i1 %16, label %18, label %17

17:                                               ; preds = %14
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %44

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

19:                                               ; preds = %37, %18
  %20 = load i32, ptr %6, align 4, !tbaa !9
  %21 = icmp slt i32 %20, 5
  br i1 %21, label %23, label %22

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

23:                                               ; preds = %19
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = load i32, ptr %4, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [5 x i32], ptr %24, i64 %26
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [5 x i32], ptr %27, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %33, label %36

33:                                               ; preds = %23
  %34 = load i32, ptr %3, align 4, !tbaa !9
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %3, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %33, %23
  br label %37

37:                                               ; preds = %36
  %38 = load i32, ptr %6, align 4, !tbaa !9
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %6, align 4, !tbaa !9
  br label %19, !llvm.loop !11

40:                                               ; preds = %22
  br label %41

41:                                               ; preds = %40
  %42 = load i32, ptr %4, align 4, !tbaa !9
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %4, align 4, !tbaa !9
  br label %14, !llvm.loop !13

44:                                               ; preds = %17
  %45 = load i32, ptr %3, align 4, !tbaa !9
  %46 = zext i32 %45 to i64
  %47 = call ptr @llvm.stacksave.p0()
  store ptr %47, ptr %7, align 8
  %48 = alloca [3 x i32], i64 %46, align 16
  store i64 %46, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %98, %44
  %50 = load i32, ptr %10, align 4, !tbaa !9
  %51 = icmp slt i32 %50, 4
  br i1 %51, label %53, label %52

52:                                               ; preds = %49
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %101

53:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %94, %53
  %55 = load i32, ptr %11, align 4, !tbaa !9
  %56 = icmp slt i32 %55, 5
  br i1 %56, label %58, label %57

57:                                               ; preds = %54
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %97

58:                                               ; preds = %54
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  %60 = load i32, ptr %10, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [5 x i32], ptr %59, i64 %61
  %63 = load i32, ptr %11, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [5 x i32], ptr %62, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !9
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %93

68:                                               ; preds = %58
  %69 = load i32, ptr %10, align 4, !tbaa !9
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [3 x i32], ptr %48, i64 %71
  %73 = getelementptr inbounds [3 x i32], ptr %72, i64 0, i64 0
  store i32 %69, ptr %73, align 4, !tbaa !9
  %74 = load i32, ptr %11, align 4, !tbaa !9
  %75 = load i32, ptr %9, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [3 x i32], ptr %48, i64 %76
  %78 = getelementptr inbounds [3 x i32], ptr %77, i64 0, i64 1
  store i32 %74, ptr %78, align 4, !tbaa !9
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = load i32, ptr %10, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [5 x i32], ptr %79, i64 %81
  %83 = load i32, ptr %11, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [5 x i32], ptr %82, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = load i32, ptr %9, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [3 x i32], ptr %48, i64 %88
  %90 = getelementptr inbounds [3 x i32], ptr %89, i64 0, i64 2
  store i32 %86, ptr %90, align 4, !tbaa !9
  %91 = load i32, ptr %9, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %9, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %68, %58
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %11, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %11, align 4, !tbaa !9
  br label %54, !llvm.loop !14

97:                                               ; preds = %57
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %10, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %10, align 4, !tbaa !9
  br label %49, !llvm.loop !15

101:                                              ; preds = %52
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %129, %101
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = load i32, ptr %3, align 4, !tbaa !9
  %107 = icmp slt i32 %105, %106
  br i1 %107, label %109, label %108

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

109:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %124, %109
  %111 = load i32, ptr %13, align 4, !tbaa !9
  %112 = icmp slt i32 %111, 3
  br i1 %112, label %114, label %113

113:                                              ; preds = %110
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %127

114:                                              ; preds = %110
  %115 = 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)
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [3 x i32], ptr %48, i64 %117
  %119 = load i32, ptr %13, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [3 x i32], ptr %118, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !9
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %115, i32 noundef %122)
  br label %124

124:                                              ; preds = %114
  %125 = load i32, ptr %13, align 4, !tbaa !9
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %13, align 4, !tbaa !9
  br label %110, !llvm.loop !16

127:                                              ; preds = %113
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  br label %129

129:                                              ; preds = %127
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %12, align 4, !tbaa !9
  br label %104, !llvm.loop !17

132:                                              ; preds = %108
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  %133 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %133)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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) #0 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

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
declare void @llvm.stackrestore.p0(ptr) #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 = { nocallback nofree nosync nounwind willreturn }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z13compactMatrixPA5_i(ptr nocapture noundef readonly %0) local_unnamed_addr #0 {
.preheader43:
  %1 = load i32, ptr %0, align 4, !tbaa !5
  %.not41 = icmp ne i32 %1, 0
  %2 = zext i1 %.not41 to i32
  %3 = getelementptr inbounds i8, ptr %0, i64 4
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %.not41.1 = icmp ne i32 %4, 0
  %5 = zext i1 %.not41.1 to i32
  %spec.select.1 = add nuw nsw i32 %2, %5
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %.not41.2 = icmp ne i32 %7, 0
  %8 = zext i1 %.not41.2 to i32
  %spec.select.2 = add nuw nsw i32 %spec.select.1, %8
  %9 = getelementptr inbounds i8, ptr %0, i64 12
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %.not41.3 = icmp ne i32 %10, 0
  %11 = zext i1 %.not41.3 to i32
  %spec.select.3 = add nuw nsw i32 %spec.select.2, %11
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %.not41.4 = icmp ne i32 %13, 0
  %14 = zext i1 %.not41.4 to i32
  %spec.select.4 = add nuw nsw i32 %spec.select.3, %14
  %15 = getelementptr inbounds i8, ptr %0, i64 20
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %.not41.156 = icmp ne i32 %16, 0
  %17 = zext i1 %.not41.156 to i32
  %spec.select.157 = add nuw nsw i32 %spec.select.4, %17
  %18 = getelementptr inbounds i8, ptr %0, i64 24
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %.not41.1.1 = icmp ne i32 %19, 0
  %20 = zext i1 %.not41.1.1 to i32
  %spec.select.1.1 = add nuw nsw i32 %spec.select.157, %20
  %21 = getelementptr inbounds i8, ptr %0, i64 28
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %.not41.2.1 = icmp ne i32 %22, 0
  %23 = zext i1 %.not41.2.1 to i32
  %spec.select.2.1 = add nuw nsw i32 %spec.select.1.1, %23
  %24 = getelementptr inbounds i8, ptr %0, i64 32
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %.not41.3.1 = icmp ne i32 %25, 0
  %26 = zext i1 %.not41.3.1 to i32
  %spec.select.3.1 = add nuw nsw i32 %spec.select.2.1, %26
  %27 = getelementptr inbounds i8, ptr %0, i64 36
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %.not41.4.1 = icmp ne i32 %28, 0
  %29 = zext i1 %.not41.4.1 to i32
  %spec.select.4.1 = add nuw nsw i32 %spec.select.3.1, %29
  %30 = getelementptr inbounds i8, ptr %0, i64 40
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %.not41.258 = icmp ne i32 %31, 0
  %32 = zext i1 %.not41.258 to i32
  %spec.select.259 = add nuw nsw i32 %spec.select.4.1, %32
  %33 = getelementptr inbounds i8, ptr %0, i64 44
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %.not41.1.2 = icmp ne i32 %34, 0
  %35 = zext i1 %.not41.1.2 to i32
  %spec.select.1.2 = add nuw nsw i32 %spec.select.259, %35
  %36 = getelementptr inbounds i8, ptr %0, i64 48
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %.not41.2.2 = icmp ne i32 %37, 0
  %38 = zext i1 %.not41.2.2 to i32
  %spec.select.2.2 = add nuw nsw i32 %spec.select.1.2, %38
  %39 = getelementptr inbounds i8, ptr %0, i64 52
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %.not41.3.2 = icmp ne i32 %40, 0
  %41 = zext i1 %.not41.3.2 to i32
  %spec.select.3.2 = add nuw nsw i32 %spec.select.2.2, %41
  %42 = getelementptr inbounds i8, ptr %0, i64 56
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %.not41.4.2 = icmp ne i32 %43, 0
  %44 = zext i1 %.not41.4.2 to i32
  %spec.select.4.2 = add nuw nsw i32 %spec.select.3.2, %44
  %45 = getelementptr inbounds i8, ptr %0, i64 60
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %.not41.360 = icmp ne i32 %46, 0
  %47 = zext i1 %.not41.360 to i32
  %spec.select.361 = add nuw nsw i32 %spec.select.4.2, %47
  %48 = getelementptr inbounds i8, ptr %0, i64 64
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %.not41.1.3 = icmp ne i32 %49, 0
  %50 = zext i1 %.not41.1.3 to i32
  %spec.select.1.3 = add nuw nsw i32 %spec.select.361, %50
  %51 = getelementptr inbounds i8, ptr %0, i64 68
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %.not41.2.3 = icmp ne i32 %52, 0
  %53 = zext i1 %.not41.2.3 to i32
  %spec.select.2.3 = add nuw nsw i32 %spec.select.1.3, %53
  %54 = getelementptr inbounds i8, ptr %0, i64 72
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %.not41.3.3 = icmp ne i32 %55, 0
  %56 = zext i1 %.not41.3.3 to i32
  %spec.select.3.3 = add nuw nsw i32 %spec.select.2.3, %56
  %57 = getelementptr inbounds i8, ptr %0, i64 76
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %.not41.4.3 = icmp ne i32 %58, 0
  %59 = zext i1 %.not41.4.3 to i32
  %spec.select.4.3 = add nuw nsw i32 %spec.select.3.3, %59
  %60 = zext nneg i32 %spec.select.4.3 to i64
  %61 = alloca [3 x i32], i64 %60, align 16
  %62 = load i32, ptr %0, align 4, !tbaa !5
  %.not = icmp eq i32 %62, 0
  br i1 %.not, label %66, label %63

63:                                               ; preds = %.preheader43
  store i32 0, ptr %61, align 16, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %61, i64 4
  store i32 0, ptr %64, align 4, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %61, i64 8
  store i32 %62, ptr %65, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %.preheader43, %63
  %.2 = phi i32 [ 1, %63 ], [ 0, %.preheader43 ]
  %.not.1 = icmp eq i32 %4, 0
  br i1 %.not.1, label %73, label %67

67:                                               ; preds = %66
  %68 = zext nneg i32 %.2 to i64
  %69 = getelementptr inbounds [3 x i32], ptr %61, i64 %68
  store i32 0, ptr %69, align 4, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %69, i64 4
  store i32 1, ptr %70, align 4, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %69, i64 8
  store i32 %4, ptr %71, align 4, !tbaa !5
  %72 = add nuw nsw i32 %.2, 1
  br label %73

73:                                               ; preds = %67, %66
  %.2.1 = phi i32 [ %72, %67 ], [ %.2, %66 ]
  %.not.2 = icmp eq i32 %7, 0
  br i1 %.not.2, label %80, label %74

74:                                               ; preds = %73
  %75 = zext nneg i32 %.2.1 to i64
  %76 = getelementptr inbounds [3 x i32], ptr %61, i64 %75
  store i32 0, ptr %76, align 4, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 4
  store i32 2, ptr %77, align 4, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %76, i64 8
  store i32 %7, ptr %78, align 4, !tbaa !5
  %79 = add nuw nsw i32 %.2.1, 1
  br label %80

80:                                               ; preds = %74, %73
  %.2.2 = phi i32 [ %79, %74 ], [ %.2.1, %73 ]
  %.not.3 = icmp eq i32 %10, 0
  br i1 %.not.3, label %87, label %81

81:                                               ; preds = %80
  %82 = zext nneg i32 %.2.2 to i64
  %83 = getelementptr inbounds [3 x i32], ptr %61, i64 %82
  store i32 0, ptr %83, align 4, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %83, i64 4
  store i32 3, ptr %84, align 4, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %83, i64 8
  store i32 %10, ptr %85, align 4, !tbaa !5
  %86 = add nuw nsw i32 %.2.2, 1
  br label %87

87:                                               ; preds = %81, %80
  %.2.3 = phi i32 [ %86, %81 ], [ %.2.2, %80 ]
  %.not.4 = icmp eq i32 %13, 0
  br i1 %.not.4, label %.preheader42.1, label %88

88:                                               ; preds = %87
  %89 = zext nneg i32 %.2.3 to i64
  %90 = getelementptr inbounds [3 x i32], ptr %61, i64 %89
  store i32 0, ptr %90, align 4, !tbaa !5
  %91 = getelementptr inbounds i8, ptr %90, i64 4
  store i32 4, ptr %91, align 4, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %90, i64 8
  store i32 %13, ptr %92, align 4, !tbaa !5
  %93 = add nuw nsw i32 %.2.3, 1
  br label %.preheader42.1

.preheader42.1:                                   ; preds = %88, %87
  %.2.4 = phi i32 [ %93, %88 ], [ %.2.3, %87 ]
  %.not.164 = icmp eq i32 %16, 0
  br i1 %.not.164, label %100, label %94

94:                                               ; preds = %.preheader42.1
  %95 = zext nneg i32 %.2.4 to i64
  %96 = getelementptr inbounds [3 x i32], ptr %61, i64 %95
  store i32 1, ptr %96, align 4, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %96, i64 4
  store i32 0, ptr %97, align 4, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %96, i64 8
  store i32 %16, ptr %98, align 4, !tbaa !5
  %99 = add nuw nsw i32 %.2.4, 1
  br label %100

100:                                              ; preds = %94, %.preheader42.1
  %.2.165 = phi i32 [ %99, %94 ], [ %.2.4, %.preheader42.1 ]
  %.not.1.1 = icmp eq i32 %19, 0
  br i1 %.not.1.1, label %107, label %101

101:                                              ; preds = %100
  %102 = zext nneg i32 %.2.165 to i64
  %103 = getelementptr inbounds [3 x i32], ptr %61, i64 %102
  store i32 1, ptr %103, align 4, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %103, i64 4
  store i32 1, ptr %104, align 4, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %103, i64 8
  store i32 %19, ptr %105, align 4, !tbaa !5
  %106 = add nuw nsw i32 %.2.165, 1
  br label %107

107:                                              ; preds = %101, %100
  %.2.1.1 = phi i32 [ %106, %101 ], [ %.2.165, %100 ]
  %.not.2.1 = icmp eq i32 %22, 0
  br i1 %.not.2.1, label %114, label %108

108:                                              ; preds = %107
  %109 = zext nneg i32 %.2.1.1 to i64
  %110 = getelementptr inbounds [3 x i32], ptr %61, i64 %109
  store i32 1, ptr %110, align 4, !tbaa !5
  %111 = getelementptr inbounds i8, ptr %110, i64 4
  store i32 2, ptr %111, align 4, !tbaa !5
  %112 = getelementptr inbounds i8, ptr %110, i64 8
  store i32 %22, ptr %112, align 4, !tbaa !5
  %113 = add nuw nsw i32 %.2.1.1, 1
  br label %114

114:                                              ; preds = %108, %107
  %.2.2.1 = phi i32 [ %113, %108 ], [ %.2.1.1, %107 ]
  %.not.3.1 = icmp eq i32 %25, 0
  br i1 %.not.3.1, label %121, label %115

115:                                              ; preds = %114
  %116 = zext nneg i32 %.2.2.1 to i64
  %117 = getelementptr inbounds [3 x i32], ptr %61, i64 %116
  store i32 1, ptr %117, align 4, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %117, i64 4
  store i32 3, ptr %118, align 4, !tbaa !5
  %119 = getelementptr inbounds i8, ptr %117, i64 8
  store i32 %25, ptr %119, align 4, !tbaa !5
  %120 = add nuw nsw i32 %.2.2.1, 1
  br label %121

121:                                              ; preds = %115, %114
  %.2.3.1 = phi i32 [ %120, %115 ], [ %.2.2.1, %114 ]
  %.not.4.1 = icmp eq i32 %28, 0
  br i1 %.not.4.1, label %.preheader42.2, label %122

122:                                              ; preds = %121
  %123 = zext nneg i32 %.2.3.1 to i64
  %124 = getelementptr inbounds [3 x i32], ptr %61, i64 %123
  store i32 1, ptr %124, align 4, !tbaa !5
  %125 = getelementptr inbounds i8, ptr %124, i64 4
  store i32 4, ptr %125, align 4, !tbaa !5
  %126 = getelementptr inbounds i8, ptr %124, i64 8
  store i32 %28, ptr %126, align 4, !tbaa !5
  %127 = add nuw nsw i32 %.2.3.1, 1
  br label %.preheader42.2

.preheader42.2:                                   ; preds = %122, %121
  %.2.4.1 = phi i32 [ %127, %122 ], [ %.2.3.1, %121 ]
  %.not.266 = icmp eq i32 %31, 0
  br i1 %.not.266, label %134, label %128

128:                                              ; preds = %.preheader42.2
  %129 = zext nneg i32 %.2.4.1 to i64
  %130 = getelementptr inbounds [3 x i32], ptr %61, i64 %129
  store i32 2, ptr %130, align 4, !tbaa !5
  %131 = getelementptr inbounds i8, ptr %130, i64 4
  store i32 0, ptr %131, align 4, !tbaa !5
  %132 = getelementptr inbounds i8, ptr %130, i64 8
  store i32 %31, ptr %132, align 4, !tbaa !5
  %133 = add nuw nsw i32 %.2.4.1, 1
  br label %134

134:                                              ; preds = %128, %.preheader42.2
  %.2.267 = phi i32 [ %133, %128 ], [ %.2.4.1, %.preheader42.2 ]
  %.not.1.2 = icmp eq i32 %34, 0
  br i1 %.not.1.2, label %141, label %135

135:                                              ; preds = %134
  %136 = zext nneg i32 %.2.267 to i64
  %137 = getelementptr inbounds [3 x i32], ptr %61, i64 %136
  store i32 2, ptr %137, align 4, !tbaa !5
  %138 = getelementptr inbounds i8, ptr %137, i64 4
  store i32 1, ptr %138, align 4, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %137, i64 8
  store i32 %34, ptr %139, align 4, !tbaa !5
  %140 = add nuw nsw i32 %.2.267, 1
  br label %141

141:                                              ; preds = %135, %134
  %.2.1.2 = phi i32 [ %140, %135 ], [ %.2.267, %134 ]
  %.not.2.2 = icmp eq i32 %37, 0
  br i1 %.not.2.2, label %148, label %142

142:                                              ; preds = %141
  %143 = zext nneg i32 %.2.1.2 to i64
  %144 = getelementptr inbounds [3 x i32], ptr %61, i64 %143
  store i32 2, ptr %144, align 4, !tbaa !5
  %145 = getelementptr inbounds i8, ptr %144, i64 4
  store i32 2, ptr %145, align 4, !tbaa !5
  %146 = getelementptr inbounds i8, ptr %144, i64 8
  store i32 %37, ptr %146, align 4, !tbaa !5
  %147 = add nuw nsw i32 %.2.1.2, 1
  br label %148

148:                                              ; preds = %142, %141
  %.2.2.2 = phi i32 [ %147, %142 ], [ %.2.1.2, %141 ]
  %.not.3.2 = icmp eq i32 %40, 0
  br i1 %.not.3.2, label %155, label %149

149:                                              ; preds = %148
  %150 = zext nneg i32 %.2.2.2 to i64
  %151 = getelementptr inbounds [3 x i32], ptr %61, i64 %150
  store i32 2, ptr %151, align 4, !tbaa !5
  %152 = getelementptr inbounds i8, ptr %151, i64 4
  store i32 3, ptr %152, align 4, !tbaa !5
  %153 = getelementptr inbounds i8, ptr %151, i64 8
  store i32 %40, ptr %153, align 4, !tbaa !5
  %154 = add nuw nsw i32 %.2.2.2, 1
  br label %155

155:                                              ; preds = %149, %148
  %.2.3.2 = phi i32 [ %154, %149 ], [ %.2.2.2, %148 ]
  %.not.4.2 = icmp eq i32 %43, 0
  br i1 %.not.4.2, label %.preheader42.3, label %156

156:                                              ; preds = %155
  %157 = zext nneg i32 %.2.3.2 to i64
  %158 = getelementptr inbounds [3 x i32], ptr %61, i64 %157
  store i32 2, ptr %158, align 4, !tbaa !5
  %159 = getelementptr inbounds i8, ptr %158, i64 4
  store i32 4, ptr %159, align 4, !tbaa !5
  %160 = getelementptr inbounds i8, ptr %158, i64 8
  store i32 %43, ptr %160, align 4, !tbaa !5
  %161 = add nuw nsw i32 %.2.3.2, 1
  br label %.preheader42.3

.preheader42.3:                                   ; preds = %156, %155
  %.2.4.2 = phi i32 [ %161, %156 ], [ %.2.3.2, %155 ]
  %.not.368 = icmp eq i32 %46, 0
  br i1 %.not.368, label %168, label %162

162:                                              ; preds = %.preheader42.3
  %163 = zext nneg i32 %.2.4.2 to i64
  %164 = getelementptr inbounds [3 x i32], ptr %61, i64 %163
  store i32 3, ptr %164, align 4, !tbaa !5
  %165 = getelementptr inbounds i8, ptr %164, i64 4
  store i32 0, ptr %165, align 4, !tbaa !5
  %166 = getelementptr inbounds i8, ptr %164, i64 8
  store i32 %46, ptr %166, align 4, !tbaa !5
  %167 = add nuw nsw i32 %.2.4.2, 1
  br label %168

168:                                              ; preds = %162, %.preheader42.3
  %.2.369 = phi i32 [ %167, %162 ], [ %.2.4.2, %.preheader42.3 ]
  %.not.1.3 = icmp eq i32 %49, 0
  br i1 %.not.1.3, label %175, label %169

169:                                              ; preds = %168
  %170 = zext nneg i32 %.2.369 to i64
  %171 = getelementptr inbounds [3 x i32], ptr %61, i64 %170
  store i32 3, ptr %171, align 4, !tbaa !5
  %172 = getelementptr inbounds i8, ptr %171, i64 4
  store i32 1, ptr %172, align 4, !tbaa !5
  %173 = getelementptr inbounds i8, ptr %171, i64 8
  store i32 %49, ptr %173, align 4, !tbaa !5
  %174 = add nuw nsw i32 %.2.369, 1
  br label %175

175:                                              ; preds = %169, %168
  %.2.1.3 = phi i32 [ %174, %169 ], [ %.2.369, %168 ]
  %.not.2.3 = icmp eq i32 %52, 0
  br i1 %.not.2.3, label %182, label %176

176:                                              ; preds = %175
  %177 = zext nneg i32 %.2.1.3 to i64
  %178 = getelementptr inbounds [3 x i32], ptr %61, i64 %177
  store i32 3, ptr %178, align 4, !tbaa !5
  %179 = getelementptr inbounds i8, ptr %178, i64 4
  store i32 2, ptr %179, align 4, !tbaa !5
  %180 = getelementptr inbounds i8, ptr %178, i64 8
  store i32 %52, ptr %180, align 4, !tbaa !5
  %181 = add nuw nsw i32 %.2.1.3, 1
  br label %182

182:                                              ; preds = %176, %175
  %.2.2.3 = phi i32 [ %181, %176 ], [ %.2.1.3, %175 ]
  %.not.3.3 = icmp eq i32 %55, 0
  br i1 %.not.3.3, label %189, label %183

183:                                              ; preds = %182
  %184 = zext nneg i32 %.2.2.3 to i64
  %185 = getelementptr inbounds [3 x i32], ptr %61, i64 %184
  store i32 3, ptr %185, align 4, !tbaa !5
  %186 = getelementptr inbounds i8, ptr %185, i64 4
  store i32 3, ptr %186, align 4, !tbaa !5
  %187 = getelementptr inbounds i8, ptr %185, i64 8
  store i32 %55, ptr %187, align 4, !tbaa !5
  %188 = add nuw nsw i32 %.2.2.3, 1
  br label %189

189:                                              ; preds = %183, %182
  %.2.3.3 = phi i32 [ %188, %183 ], [ %.2.2.3, %182 ]
  %.not.4.3 = icmp eq i32 %58, 0
  br i1 %.not.4.3, label %195, label %190

190:                                              ; preds = %189
  %191 = zext nneg i32 %.2.3.3 to i64
  %192 = getelementptr inbounds [3 x i32], ptr %61, i64 %191
  store i32 3, ptr %192, align 4, !tbaa !5
  %193 = getelementptr inbounds i8, ptr %192, i64 4
  store i32 4, ptr %193, align 4, !tbaa !5
  %194 = getelementptr inbounds i8, ptr %192, i64 8
  store i32 %58, ptr %194, align 4, !tbaa !5
  br label %195

195:                                              ; preds = %190, %189
  %196 = 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)
  %197 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %196, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %.not72 = icmp eq i32 %spec.select.4.3, 0
  br i1 %.not72, label %._crit_edge, label %.preheader

.preheader:                                       ; preds = %195, %.preheader
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader ], [ 0, %195 ]
  %198 = 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.1)
  %199 = getelementptr inbounds [3 x i32], ptr %61, i64 %indvars.iv, i64 0
  %200 = load i32, ptr %199, align 4, !tbaa !5
  %201 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %198, i32 noundef %200)
  %202 = 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.1)
  %203 = getelementptr inbounds [3 x i32], ptr %61, i64 %indvars.iv, i64 1
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %202, i32 noundef %204)
  %206 = 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.1)
  %207 = getelementptr inbounds [3 x i32], ptr %61, i64 %indvars.iv, i64 2
  %208 = load i32, ptr %207, align 4, !tbaa !5
  %209 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %206, i32 noundef %208)
  %210 = 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.2)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %211 = icmp ult i64 %indvars.iv.next, %60
  br i1 %211, label %.preheader, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %.preheader, %195
  ret i32 0
}

; 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 #1

; 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 #0 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)) #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #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 = { 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 #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" }

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass