; LLVM IR from Amoiensis/Optimization-Algorithm :: [Direct_Method]直接法/[Univariate_Search_Method]坐标轮换法 (main)

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

%struct._Matrix = type { i32, i32, ptr }
%struct._Elementary_Transformation = type { i32, i32, double, ptr, ptr }
%struct._Upper_triangular_transformation = type { ptr, ptr }

@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [24 x i8], align 1

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @Matrix_copy(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @M_E_trans(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @Etrans_2_Matrix(ptr noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @M_Uptri_(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = call ptr @Matrix_copy(ptr noundef %14)
  store ptr %15, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store ptr null, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %16

16:                                               ; preds = %182, %1
  %17 = load i32, ptr %4, align 4, !tbaa !9
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct._Matrix, ptr %18, i32 0, i32 1
  %20 = load i32, ptr %19, align 4, !tbaa !11
  %21 = icmp slt i32 %17, %20
  br i1 %21, label %22, label %185

22:                                               ; preds = %16
  %23 = load i32, ptr %4, align 4, !tbaa !9
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %5, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %178, %22
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._Matrix, ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !13
  %30 = icmp slt i32 %26, %29
  br i1 %30, label %31, label %181

31:                                               ; preds = %25
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %32 = call noalias ptr @malloc(i64 noundef 32) #5
  store ptr %32, ptr %10, align 8, !tbaa !5
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = add nsw i32 %33, 1
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._Elementary_Transformation, ptr %35, i32 0, i32 0
  store i32 %34, ptr %36, align 8, !tbaa !14
  %37 = load i32, ptr %4, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._Elementary_Transformation, ptr %39, i32 0, i32 1
  store i32 %38, ptr %40, align 4, !tbaa !17
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct._Matrix, ptr %41, i32 0, i32 2
  %43 = load ptr, ptr %42, align 8, !tbaa !18
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._Matrix, ptr %44, i32 0, i32 1
  %46 = load i32, ptr %45, align 4, !tbaa !11
  %47 = load i32, ptr %4, align 4, !tbaa !9
  %48 = mul nsw i32 %46, %47
  %49 = load i32, ptr %4, align 4, !tbaa !9
  %50 = add nsw i32 %48, %49
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds double, ptr %43, i64 %51
  %53 = load double, ptr %52, align 8, !tbaa !19
  %54 = fcmp une double %53, 0.000000e+00
  br i1 %54, label %55, label %85

55:                                               ; preds = %31
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct._Matrix, ptr %56, i32 0, i32 2
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._Matrix, ptr %59, i32 0, i32 1
  %61 = load i32, ptr %60, align 4, !tbaa !11
  %62 = load i32, ptr %5, align 4, !tbaa !9
  %63 = mul nsw i32 %61, %62
  %64 = load i32, ptr %4, align 4, !tbaa !9
  %65 = add nsw i32 %63, %64
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %58, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !19
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._Matrix, ptr %69, i32 0, i32 2
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._Matrix, ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 4, !tbaa !11
  %75 = load i32, ptr %4, align 4, !tbaa !9
  %76 = mul nsw i32 %74, %75
  %77 = load i32, ptr %4, align 4, !tbaa !9
  %78 = add nsw i32 %76, %77
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds double, ptr %71, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !19
  %82 = fdiv double %68, %81
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct._Elementary_Transformation, ptr %83, i32 0, i32 2
  store double %82, ptr %84, align 8, !tbaa !20
  br label %131

85:                                               ; preds = %31
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._Elementary_Transformation, ptr %86, i32 0, i32 2
  store double 0.000000e+00, ptr %87, align 8, !tbaa !20
  %88 = load i32, ptr %4, align 4, !tbaa !9
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %6, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %123, %85
  %91 = load i32, ptr %6, align 4, !tbaa !9
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct._Matrix, ptr %92, i32 0, i32 0
  %94 = load i32, ptr %93, align 8, !tbaa !13
  %95 = icmp slt i32 %91, %94
  br i1 %95, label %96, label %126

96:                                               ; preds = %90
  store i32 1, ptr %7, align 4, !tbaa !9
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._Matrix, ptr %97, i32 0, i32 2
  %99 = load ptr, ptr %98, align 8, !tbaa !18
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._Matrix, ptr %100, i32 0, i32 1
  %102 = load i32, ptr %101, align 4, !tbaa !11
  %103 = load i32, ptr %6, align 4, !tbaa !9
  %104 = mul nsw i32 %102, %103
  %105 = load i32, ptr %4, align 4, !tbaa !9
  %106 = add nsw i32 %104, %105
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds double, ptr %99, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !19
  %110 = fcmp une double %109, 0.000000e+00
  br i1 %110, label %111, label %122

111:                                              ; preds = %96
  %112 = load i32, ptr %4, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  %114 = sub nsw i32 0, %113
  %115 = load ptr, ptr %10, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._Elementary_Transformation, ptr %115, i32 0, i32 0
  store i32 %114, ptr %116, align 8, !tbaa !14
  %117 = load i32, ptr %6, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  %119 = sub nsw i32 0, %118
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct._Elementary_Transformation, ptr %120, i32 0, i32 1
  store i32 %119, ptr %121, align 4, !tbaa !17
  store i32 2, ptr %7, align 4, !tbaa !9
  br label %126

122:                                              ; preds = %96
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %6, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %6, align 4, !tbaa !9
  br label %90, !llvm.loop !21

126:                                              ; preds = %111, %90
  %127 = load i32, ptr %7, align 4, !tbaa !9
  %128 = icmp eq i32 %127, 1
  br i1 %128, label %129, label %130

129:                                              ; preds = %126
  store i32 5, ptr %11, align 4
  br label %175

130:                                              ; preds = %126
  br label %131

131:                                              ; preds = %130, %55
  %132 = load ptr, ptr %10, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._Elementary_Transformation, ptr %132, i32 0, i32 3
  store ptr null, ptr %133, align 8, !tbaa !23
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct._Elementary_Transformation, ptr %134, i32 0, i32 4
  store ptr null, ptr %135, align 8, !tbaa !24
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = icmp eq ptr %136, null
  br i1 %137, label %138, label %142

138:                                              ; preds = %131
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %139, ptr %9, align 8, !tbaa !5
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct._Elementary_Transformation, ptr %140, i32 0, i32 3
  store ptr null, ptr %141, align 8, !tbaa !23
  br label %146

142:                                              ; preds = %131
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = load ptr, ptr %10, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct._Elementary_Transformation, ptr %144, i32 0, i32 3
  store ptr %143, ptr %145, align 8, !tbaa !23
  br label %146

146:                                              ; preds = %142, %138
  %147 = load i32, ptr %4, align 4, !tbaa !9
  %148 = add nsw i32 %147, 1
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._Matrix, ptr %149, i32 0, i32 1
  %151 = load i32, ptr %150, align 4, !tbaa !11
  %152 = icmp eq i32 %148, %151
  br i1 %152, label %153, label %156

153:                                              ; preds = %146
  %154 = load ptr, ptr %10, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct._Elementary_Transformation, ptr %154, i32 0, i32 4
  store ptr null, ptr %155, align 8, !tbaa !24
  br label %164

156:                                              ; preds = %146
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = icmp ne ptr %157, null
  br i1 %158, label %159, label %163

159:                                              ; preds = %156
  %160 = load ptr, ptr %10, align 8, !tbaa !5
  %161 = load ptr, ptr %8, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct._Elementary_Transformation, ptr %161, i32 0, i32 4
  store ptr %160, ptr %162, align 8, !tbaa !24
  br label %163

163:                                              ; preds = %159, %156
  br label %164

164:                                              ; preds = %163, %153
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  %167 = call i32 @M_E_trans(ptr noundef %165, ptr noundef %166, i32 noundef 1)
  %168 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %168, ptr %8, align 8, !tbaa !5
  %169 = load i32, ptr %7, align 4, !tbaa !9
  %170 = icmp eq i32 %169, 2
  br i1 %170, label %171, label %174

171:                                              ; preds = %164
  %172 = load i32, ptr %4, align 4, !tbaa !9
  %173 = sub nsw i32 %172, 1
  store i32 %173, ptr %4, align 4, !tbaa !9
  store i32 5, ptr %11, align 4
  br label %175

174:                                              ; preds = %164
  store i32 0, ptr %11, align 4
  br label %175

175:                                              ; preds = %174, %171, %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %176 = load i32, ptr %11, align 4
  switch i32 %176, label %204 [
    i32 0, label %177
    i32 5, label %181
  ]

177:                                              ; preds = %175
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %5, align 4, !tbaa !9
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %5, align 4, !tbaa !9
  br label %25, !llvm.loop !25

181:                                              ; preds = %175, %25
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %4, align 4, !tbaa !9
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %4, align 4, !tbaa !9
  br label %16, !llvm.loop !26

185:                                              ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %186 = load ptr, ptr %9, align 8, !tbaa !5
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct._Matrix, ptr %187, i32 0, i32 0
  %189 = load i32, ptr %188, align 8, !tbaa !13
  %190 = call ptr @Etrans_2_Matrix(ptr noundef %186, i32 noundef %189, i32 noundef 1)
  store ptr %190, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %191 = call noalias ptr @malloc(i64 noundef 16) #5
  store ptr %191, ptr %13, align 8, !tbaa !5
  %192 = load ptr, ptr %12, align 8, !tbaa !5
  %193 = load ptr, ptr %13, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct._Upper_triangular_transformation, ptr %193, i32 0, i32 0
  store ptr %192, ptr %194, align 8, !tbaa !27
  %195 = load ptr, ptr %3, align 8, !tbaa !5
  %196 = load ptr, ptr %13, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct._Upper_triangular_transformation, ptr %196, i32 0, i32 1
  store ptr %195, ptr %197, align 8, !tbaa !29
  %198 = load ptr, ptr %2, align 8, !tbaa !5
  %199 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef %198)
  %200 = load ptr, ptr %12, align 8, !tbaa !5
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef %200, ptr noundef %201)
  %203 = load ptr, ptr %13, align 8, !tbaa !5
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret ptr %203

204:                                              ; preds = %175
  unreachable
}

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

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"_Matrix", !10, i64 0, !10, i64 4, !6, i64 8}
!13 = !{!12, !10, i64 0}
!14 = !{!15, !10, i64 0}
!15 = !{!"_Elementary_Transformation", !10, i64 0, !10, i64 4, !16, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"double", !7, i64 0}
!17 = !{!15, !10, i64 4}
!18 = !{!12, !6, i64 8}
!19 = !{!16, !16, i64 0}
!20 = !{!15, !16, i64 8}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!15, !6, i64 16}
!24 = !{!15, !6, i64 24}
!25 = distinct !{!25, !22}
!26 = distinct !{!26, !22}
!27 = !{!28, !6, i64 0}
!28 = !{!"_Upper_triangular_transformation", !6, i64 0, !6, i64 8}
!29 = !{!28, !6, i64 8}


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

@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @Matrix_copy(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @M_E_trans(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @Etrans_2_Matrix(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noalias noundef ptr @M_Uptri_(ptr noundef %0) local_unnamed_addr #1 {
  %2 = tail call ptr @Matrix_copy(ptr noundef %0)
  %3 = getelementptr inbounds i8, ptr %2, i64 4
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph105, label %._crit_edge106

.lr.ph105:                                        ; preds = %1
  %6 = getelementptr inbounds i8, ptr %2, i64 8
  br label %7

7:                                                ; preds = %.lr.ph105, %.thread84
  %.0103 = phi i32 [ 0, %.lr.ph105 ], [ %.pre-phi, %.thread84 ]
  %.070102 = phi ptr [ null, %.lr.ph105 ], [ %.4, %.thread84 ]
  %.074101 = phi ptr [ null, %.lr.ph105 ], [ %.377, %.thread84 ]
  %8 = add nsw i32 %.0103, 1
  %9 = xor i32 %.0103, -1
  %10 = sext i32 %8 to i64
  %11 = sext i32 %.0103 to i64
  br label %12

12:                                               ; preds = %52, %7
  %.175 = phi ptr [ %.074101, %7 ], [ %16, %52 ]
  %.171 = phi ptr [ %.070102, %7 ], [ %..171, %52 ]
  %.067 = phi i32 [ %8, %7 ], [ %17, %52 ]
  %13 = load i32, ptr %2, align 8, !tbaa !11
  %14 = icmp slt i32 %.067, %13
  br i1 %14, label %15, label %.thread84

15:                                               ; preds = %12
  %16 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #3
  %17 = add nsw i32 %.067, 1
  store i32 %17, ptr %16, align 8, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %16, i64 4
  store i32 %8, ptr %18, align 4, !tbaa !15
  %19 = load ptr, ptr %6, align 8, !tbaa !16
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = add i32 %20, 1
  %22 = mul i32 %21, %.0103
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds double, ptr %19, i64 %23
  %25 = load double, ptr %24, align 8, !tbaa !17
  %26 = fcmp une double %25, 0.000000e+00
  br i1 %26, label %27, label %35

27:                                               ; preds = %15
  %28 = mul nsw i32 %20, %.067
  %29 = add nsw i32 %28, %.0103
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds double, ptr %19, i64 %30
  %32 = load double, ptr %31, align 8, !tbaa !17
  %33 = fdiv double %32, %25
  %34 = getelementptr inbounds i8, ptr %16, i64 8
  store double %33, ptr %34, align 8, !tbaa !18
  br label %.critedge

35:                                               ; preds = %15
  %36 = getelementptr inbounds i8, ptr %16, i64 8
  store double 0.000000e+00, ptr %36, align 8, !tbaa !18
  %37 = icmp slt i32 %8, %13
  br i1 %37, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %35
  %38 = sext i32 %20 to i64
  %invariant.gep = getelementptr double, ptr %19, i64 %11
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %44
  %indvars.iv = phi i64 [ %10, %.lr.ph.preheader ], [ %indvars.iv.next, %44 ]
  %39 = mul nsw i64 %indvars.iv, %38
  %gep = getelementptr double, ptr %invariant.gep, i64 %39
  %40 = load double, ptr %gep, align 8, !tbaa !17
  %41 = fcmp une double %40, 0.000000e+00
  br i1 %41, label %.thread, label %44

.thread:                                          ; preds = %.lr.ph
  %42 = trunc nsw i64 %indvars.iv to i32
  store i32 %9, ptr %16, align 8, !tbaa !12
  %43 = xor i32 %42, -1
  store i32 %43, ptr %18, align 4, !tbaa !15
  br label %.critedge

44:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %13, %lftr.wideiv
  br i1 %exitcond.not, label %.thread84, label %.lr.ph, !llvm.loop !19

.critedge:                                        ; preds = %35, %.thread, %27
  %45 = phi i1 [ false, %27 ], [ true, %.thread ], [ false, %35 ]
  %46 = getelementptr inbounds i8, ptr %16, i64 16
  %47 = icmp eq ptr %.171, null
  %..175 = select i1 %47, ptr null, ptr %.175
  %..171 = select i1 %47, ptr %16, ptr %.171
  %48 = getelementptr inbounds i8, ptr %16, i64 24
  store i64 0, ptr %48, align 8
  store ptr %..175, ptr %46, align 8, !tbaa !21
  %49 = icmp eq i32 %8, %20
  %.not = icmp eq ptr %.175, null
  %or.cond = select i1 %49, i1 true, i1 %.not
  br i1 %or.cond, label %52, label %50

50:                                               ; preds = %.critedge
  %51 = getelementptr inbounds i8, ptr %.175, i64 24
  store ptr %16, ptr %51, align 8, !tbaa !22
  br label %52

52:                                               ; preds = %.critedge, %50
  %53 = tail call i32 @M_E_trans(ptr noundef nonnull %2, ptr noundef nonnull %16, i32 noundef 1)
  br i1 %45, label %.thread84, label %12, !llvm.loop !23

.thread84:                                        ; preds = %12, %52, %44
  %.pre-phi = phi i32 [ %8, %44 ], [ %8, %12 ], [ %.0103, %52 ]
  %.377 = phi ptr [ %.175, %44 ], [ %.175, %12 ], [ %16, %52 ]
  %.4 = phi ptr [ %.171, %44 ], [ %.171, %12 ], [ %..171, %52 ]
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = icmp slt i32 %.pre-phi, %54
  br i1 %55, label %7, label %._crit_edge106, !llvm.loop !24

._crit_edge106:                                   ; preds = %.thread84, %1
  %.070.lcssa = phi ptr [ null, %1 ], [ %.4, %.thread84 ]
  %56 = load i32, ptr %2, align 8, !tbaa !11
  %57 = tail call ptr @Etrans_2_Matrix(ptr noundef %.070.lcssa, i32 noundef %56, i32 noundef 1)
  %58 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #3
  store ptr %57, ptr %58, align 8, !tbaa !25
  %59 = getelementptr inbounds i8, ptr %58, i64 8
  store ptr %2, ptr %59, align 8, !tbaa !27
  %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef %0)
  %61 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef %57, ptr noundef nonnull %2)
  ret ptr %58
}

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind allocsize(0) }

!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, !7, i64 4}
!6 = !{!"_Matrix", !7, i64 0, !7, i64 4, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!13, !7, i64 0}
!13 = !{!"_Elementary_Transformation", !7, i64 0, !7, i64 4, !14, i64 8, !10, i64 16, !10, i64 24}
!14 = !{!"double", !8, i64 0}
!15 = !{!13, !7, i64 4}
!16 = !{!6, !10, i64 8}
!17 = !{!14, !14, i64 0}
!18 = !{!13, !14, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!13, !10, i64 16}
!22 = !{!13, !10, i64 24}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}
!25 = !{!26, !10, i64 0}
!26 = !{!"_Upper_triangular_transformation", !10, i64 0, !10, i64 8}
!27 = !{!26, !10, i64 8}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass