; LLVM IR from jingweizhanghuai/Morn :: test/test_matrix3.ll (Z14test_transposei)

; 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.Eigen::Matrix" = type { %"class.Eigen::PlainObjectBase" }
%"class.Eigen::PlainObjectBase" = type { %"class.Eigen::DenseStorage" }
%"class.Eigen::DenseStorage" = type { ptr, i64, i64 }
%"class.Eigen::Transpose" = type { ptr }
%struct.MMatrix = type { i32, i32, ptr }

@.str = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [77 x i8], align 1
@__FUNCTION__._Z14test_transposei = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14test_transposei(i32 noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.Eigen::Matrix", align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca %"class.Eigen::Matrix", align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.Eigen::Transpose", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %16, i32 noundef %17)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #5
  call void @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEC2IiiEERKT_RKT0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = add nsw i32 %19, 0
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = invoke ptr @MatrixCreate(i32 noundef %20, i32 noundef %21, ptr noundef null)
          to label %23 unwind label %29

23:                                               ; preds = %1
  store ptr %22, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %73, %23
  %25 = load i32, ptr %7, align 4, !tbaa !5
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %33, label %28

28:                                               ; preds = %24
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %76

29:                                               ; preds = %1
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %5, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %6, align 4
  br label %145

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

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

38:                                               ; preds = %34
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %72

39:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %40 = invoke i32 @m_Rand(i32 noundef -1, i32 noundef -1)
          to label %41 unwind label %68

41:                                               ; preds = %39
  %42 = sitofp i32 %40 to float
  %43 = invoke i32 @m_Rand(i32 noundef -1, i32 noundef -1)
          to label %44 unwind label %68

44:                                               ; preds = %41
  %45 = sitofp i32 %43 to float
  %46 = fdiv float %42, %45
  store float %46, ptr %10, align 4, !tbaa !11
  %47 = load float, ptr %10, align 4, !tbaa !11
  %48 = load i32, ptr %7, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = load i32, ptr %9, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEELi1EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef %49, i64 noundef %51)
          to label %53 unwind label %68

53:                                               ; preds = %44
  store float %47, ptr %52, align 4, !tbaa !11
  %54 = load float, ptr %10, align 4, !tbaa !11
  %55 = load ptr, ptr %4, align 8, !tbaa !9
  %56 = getelementptr inbounds %struct.MMatrix, ptr %55, i32 0, i32 2
  %57 = load ptr, ptr %56, align 8, !tbaa !13
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds ptr, ptr %57, i64 %59
  %61 = load ptr, ptr %60, align 8, !tbaa !9
  %62 = load i32, ptr %9, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds float, ptr %61, i64 %63
  store float %54, ptr %64, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %65

65:                                               ; preds = %53
  %66 = load i32, ptr %9, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %9, align 4, !tbaa !5
  br label %34, !llvm.loop !15

68:                                               ; preds = %44, %41, %39
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %5, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %145

72:                                               ; preds = %38
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %7, align 4, !tbaa !5
  br label %24, !llvm.loop !17

76:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  invoke void @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %77 unwind label %83

77:                                               ; preds = %76
  invoke void @_mTimerBegin(ptr noundef @.str.3)
          to label %78 unwind label %87

78:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %97, %78
  %80 = load i32, ptr %12, align 4, !tbaa !5
  %81 = icmp slt i32 %80, 10000
  br i1 %81, label %91, label %82

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

83:                                               ; preds = %76
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %5, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %6, align 4
  br label %144

87:                                               ; preds = %104, %77
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %5, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %6, align 4
  br label %143

91:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %92 = invoke ptr @_ZN5Eigen9DenseBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEE9transposeEv(ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %93 unwind label %100

93:                                               ; preds = %91
  %94 = getelementptr inbounds %"class.Eigen::Transpose", ptr %13, i32 0, i32 0
  store ptr %92, ptr %94, align 8
  %95 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEaSINS_9TransposeIS1_EEEERS1_RKNS_9DenseBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %96 unwind label %100

96:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %12, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %12, align 4, !tbaa !5
  br label %79, !llvm.loop !18

100:                                              ; preds = %93, %91
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %5, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %143

104:                                              ; preds = %82
  %105 = invoke float @_mTimerEnd(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 25, ptr noundef @__FUNCTION__._Z14test_transposei)
          to label %106 unwind label %87

106:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %107 = invoke ptr @MatrixCreate(i32 noundef -1, i32 noundef -1, ptr noundef null)
          to label %108 unwind label %114

108:                                              ; preds = %106
  store ptr %107, ptr %14, align 8, !tbaa !9
  invoke void @_mTimerBegin(ptr noundef @.str.5)
          to label %109 unwind label %114

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

110:                                              ; preds = %128, %109
  %111 = load i32, ptr %15, align 4, !tbaa !5
  %112 = icmp slt i32 %111, 10000
  br i1 %112, label %118, label %113

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

114:                                              ; preds = %139, %137, %135, %108, %106
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %5, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %6, align 4
  br label %142

118:                                              ; preds = %110
  br label %119

119:                                              ; preds = %118
  %120 = load ptr, ptr %4, align 8, !tbaa !9
  %121 = getelementptr inbounds %struct.MMatrix, ptr %120, i64 0
  %122 = load ptr, ptr %14, align 8, !tbaa !9
  %123 = ptrtoint ptr %122 to i64
  %124 = inttoptr i64 %123 to ptr
  invoke void @m_MatrixTranspose(ptr noundef %121, ptr noundef %124)
          to label %125 unwind label %131

125:                                              ; preds = %119
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %15, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %15, align 4, !tbaa !5
  br label %110, !llvm.loop !19

131:                                              ; preds = %119
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %5, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %142

135:                                              ; preds = %113
  %136 = invoke float @_mTimerEnd(ptr noundef @.str.5, ptr noundef @.str.4, i32 noundef 31, ptr noundef @__FUNCTION__._Z14test_transposei)
          to label %137 unwind label %114

137:                                              ; preds = %135
  %138 = load ptr, ptr %14, align 8, !tbaa !9
  invoke void @mMatrixRelease(ptr noundef %138)
          to label %139 unwind label %114

139:                                              ; preds = %137
  %140 = load ptr, ptr %4, align 8, !tbaa !9
  invoke void @mMatrixRelease(ptr noundef %140)
          to label %141 unwind label %114

141:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  ret void

142:                                              ; preds = %131, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %143

143:                                              ; preds = %142, %100, %87
  call void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  br label %144

144:                                              ; preds = %143, %83
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  br label %145

145:                                              ; preds = %144, %68, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  br label %146

146:                                              ; preds = %145
  %147 = load ptr, ptr %5, align 8
  %148 = load i32, ptr %6, align 4
  %149 = insertvalue { ptr, i32 } poison, ptr %147, 0
  %150 = insertvalue { ptr, i32 } %149, i32 %148, 1
  resume { ptr, i32 } %150
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEC2IiiEERKT_RKT0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

declare ptr @MatrixCreate(i32 noundef, i32 noundef, ptr noundef) #1

declare i32 @__gxx_personality_v0(...)

declare i32 @m_Rand(i32 noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEELi1EEclEll(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef, i64 noundef) #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

declare void @_mTimerBegin(ptr noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZN5Eigen9DenseBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEE9transposeEv(ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEaSINS_9TransposeIS1_EEEERS1_RKNS_9DenseBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

declare float @_mTimerEnd(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

declare void @m_MatrixTranspose(ptr noundef, ptr noundef) #1

declare void @mMatrixRelease(ptr noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress 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 #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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"_ZTS7MMatrix", !6, i64 0, !6, i64 4, !10, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}


; 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.Eigen::Matrix" = type { %"class.Eigen::PlainObjectBase" }
%"class.Eigen::PlainObjectBase" = type { %"class.Eigen::DenseStorage" }
%"class.Eigen::DenseStorage" = type { ptr, i64, i64 }
%"class.Eigen::Transpose" = type { ptr }

@.str = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [77 x i8], align 1
@__FUNCTION__._Z14test_transposei = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14test_transposei(i32 noundef %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.Eigen::Matrix", align 8
  %4 = alloca %"class.Eigen::Matrix", align 8
  %5 = alloca %"class.Eigen::Transpose", align 8
  store i32 %0, ptr %2, align 4, !tbaa !5
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0, i32 noundef %0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEC2IiiEERKT_RKT0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = invoke ptr @MatrixCreate(i32 noundef %7, i32 noundef %7, ptr noundef null)
          to label %.preheader36 unwind label %14

.preheader36:                                     ; preds = %1
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.preheader35.preheader, label %._crit_edge39

.preheader35.preheader:                           ; preds = %.preheader36
  %11 = getelementptr inbounds i8, ptr %8, i64 8
  br label %.preheader35

.preheader35:                                     ; preds = %.preheader35.preheader, %._crit_edge
  %12 = phi i32 [ %9, %.preheader35.preheader ], [ %16, %._crit_edge ]
  %indvars.iv44 = phi i64 [ 0, %.preheader35.preheader ], [ %indvars.iv.next45, %._crit_edge ]
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph, label %.preheader35.._crit_edge_crit_edge

.preheader35.._crit_edge_crit_edge:               ; preds = %.preheader35
  %.pre = sext i32 %12 to i64
  br label %._crit_edge

._crit_edge39:                                    ; preds = %._crit_edge, %.preheader36
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  invoke void @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %36 unwind label %39

14:                                               ; preds = %1
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %66

._crit_edge:                                      ; preds = %23, %.preheader35.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader35.._crit_edge_crit_edge ], [ %32, %23 ]
  %16 = phi i32 [ %12, %.preheader35.._crit_edge_crit_edge ], [ %31, %23 ]
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %17 = icmp slt i64 %indvars.iv.next45, %.pre-phi
  br i1 %17, label %.preheader35, label %._crit_edge39, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader35, %23
  %indvars.iv = phi i64 [ %indvars.iv.next, %23 ], [ 0, %.preheader35 ]
  %18 = invoke i32 @m_Rand(i32 noundef -1, i32 noundef -1)
          to label %19 unwind label %34

19:                                               ; preds = %.lr.ph
  %20 = invoke i32 @m_Rand(i32 noundef -1, i32 noundef -1)
          to label %21 unwind label %34

21:                                               ; preds = %19
  %22 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEELi1EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef %indvars.iv44, i64 noundef %indvars.iv)
          to label %23 unwind label %34

23:                                               ; preds = %21
  %24 = sitofp i32 %18 to float
  %25 = sitofp i32 %20 to float
  %26 = fdiv float %24, %25
  store float %26, ptr %22, align 4, !tbaa !12
  %27 = load ptr, ptr %11, align 8, !tbaa !14
  %28 = getelementptr inbounds ptr, ptr %27, i64 %indvars.iv44
  %29 = load ptr, ptr %28, align 8, !tbaa !17
  %30 = getelementptr inbounds float, ptr %29, i64 %indvars.iv
  store float %26, ptr %30, align 4, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next, %32
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !18

34:                                               ; preds = %21, %19, %.lr.ph
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %66

36:                                               ; preds = %._crit_edge39
  invoke void @_mTimerBegin(ptr noundef nonnull @.str.3)
          to label %.preheader34 unwind label %41

37:                                               ; preds = %46
  %38 = invoke float @_mTimerEnd(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 25, ptr noundef nonnull @__FUNCTION__._Z14test_transposei)
          to label %50 unwind label %41

39:                                               ; preds = %._crit_edge39
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %65

41:                                               ; preds = %37, %36
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %64

.preheader34:                                     ; preds = %36, %46
  %.02140 = phi i32 [ %47, %46 ], [ 0, %36 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %43 = invoke ptr @_ZN5Eigen9DenseBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEE9transposeEv(ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %44 unwind label %48

44:                                               ; preds = %.preheader34
  store ptr %43, ptr %5, align 8
  %45 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEaSINS_9TransposeIS1_EEEERS1_RKNS_9DenseBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %46 unwind label %48

46:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %47 = add nuw nsw i32 %.02140, 1
  %exitcond.not = icmp eq i32 %47, 10000
  br i1 %exitcond.not, label %37, label %.preheader34, !llvm.loop !19

48:                                               ; preds = %44, %.preheader34
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %64

50:                                               ; preds = %37
  %51 = invoke ptr @MatrixCreate(i32 noundef -1, i32 noundef -1, ptr noundef null)
          to label %52 unwind label %55

52:                                               ; preds = %50
  invoke void @_mTimerBegin(ptr noundef nonnull @.str.5)
          to label %.preheader unwind label %55

53:                                               ; preds = %57
  %54 = invoke float @_mTimerEnd(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.4, i32 noundef 31, ptr noundef nonnull @__FUNCTION__._Z14test_transposei)
          to label %61 unwind label %55

55:                                               ; preds = %62, %61, %53, %52, %50
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %64

.preheader:                                       ; preds = %52, %57
  %.041 = phi i32 [ %58, %57 ], [ 0, %52 ]
  invoke void @m_MatrixTranspose(ptr noundef %8, ptr noundef %51)
          to label %57 unwind label %59

57:                                               ; preds = %.preheader
  %58 = add nuw nsw i32 %.041, 1
  %exitcond47.not = icmp eq i32 %58, 10000
  br i1 %exitcond47.not, label %53, label %.preheader, !llvm.loop !20

59:                                               ; preds = %.preheader
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %64

61:                                               ; preds = %53
  invoke void @mMatrixRelease(ptr noundef %51)
          to label %62 unwind label %55

62:                                               ; preds = %61
  invoke void @mMatrixRelease(ptr noundef %8)
          to label %63 unwind label %55

63:                                               ; preds = %62
  call void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  ret void

64:                                               ; preds = %55, %59, %48, %41
  %.pn29 = phi { ptr, i32 } [ %49, %48 ], [ %42, %41 ], [ %60, %59 ], [ %56, %55 ]
  call void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %65

65:                                               ; preds = %64, %39
  %.pn29.pn = phi { ptr, i32 } [ %.pn29, %64 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  br label %66

66:                                               ; preds = %65, %34, %14
  %.pn32 = phi { ptr, i32 } [ %35, %34 ], [ %.pn29.pn, %65 ], [ %15, %14 ]
  call void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn32
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEC2IiiEERKT_RKT0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

declare ptr @MatrixCreate(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

declare i32 @m_Rand(i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEELi1EEclEll(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef, i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

declare void @_mTimerBegin(ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZN5Eigen9DenseBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEE9transposeEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEaSINS_9TransposeIS1_EEEERS1_RKNS_9DenseBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

declare float @_mTimerEnd(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

declare void @m_MatrixTranspose(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @mMatrixRelease(ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !16, i64 8}
!15 = !{!"_ZTS7MMatrix", !6, i64 0, !6, i64 4, !16, i64 8}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!16, !16, i64 0}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


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