; LLVM IR from kazunetakahashi/atcoder :: 201510_201609/1224_xmas_2015/A.ll (Z7inverse6matrixS_)

; 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, %"class.std::valarray" }
%"class.std::valarray" = type { i64, ptr }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__._Z7inverse6matrixS_ = external hidden unnamed_addr constant [31 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z7inverse6matrixS_(ptr dead_on_unwind noalias writable sret(%struct.matrix) align 8 %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 0
  %20 = load i32, ptr %19, align 8, !tbaa !9
  %21 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 1
  %22 = load i32, ptr %21, align 4, !tbaa !14
  %23 = icmp eq i32 %20, %22
  br i1 %23, label %24, label %25

24:                                               ; preds = %3
  br label %27

25:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 94, ptr noundef @__PRETTY_FUNCTION__._Z7inverse6matrixS_) #4
  unreachable

26:                                               ; No predecessors!
  br label %27

27:                                               ; preds = %26, %24
  %28 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 1
  %29 = load i32, ptr %28, align 4, !tbaa !14
  %30 = getelementptr inbounds %struct.matrix, ptr %2, i32 0, i32 0
  %31 = load i32, ptr %30, align 8, !tbaa !9
  %32 = icmp eq i32 %29, %31
  br i1 %32, label %33, label %34

33:                                               ; preds = %27
  br label %36

34:                                               ; preds = %27
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 95, ptr noundef @__PRETTY_FUNCTION__._Z7inverse6matrixS_) #4
  unreachable

35:                                               ; No predecessors!
  br label %36

36:                                               ; preds = %35, %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %37 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 0
  %38 = load i32, ptr %37, align 8, !tbaa !9
  store i32 %38, ptr %7, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %39 = getelementptr inbounds %struct.matrix, ptr %2, i32 0, i32 1
  %40 = load i32, ptr %39, align 4, !tbaa !14
  store i32 %40, ptr %8, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !15
  br label %41

41:                                               ; preds = %162, %36
  %42 = load i32, ptr %9, align 4, !tbaa !15
  %43 = load i32, ptr %7, align 4, !tbaa !15
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %165

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %47 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 2
  %48 = load i32, ptr %9, align 4, !tbaa !15
  %49 = load i32, ptr %7, align 4, !tbaa !15
  %50 = mul nsw i32 %48, %49
  %51 = load i32, ptr %9, align 4, !tbaa !15
  %52 = add nsw i32 %50, %51
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %47, i64 noundef %53) #5
  %55 = load i64, ptr %54, align 8, !tbaa !16
  store i64 %55, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !15
  br label %56

56:                                               ; preds = %158, %46
  %57 = load i32, ptr %12, align 4, !tbaa !15
  %58 = load i32, ptr %7, align 4, !tbaa !15
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %161

61:                                               ; preds = %56
  %62 = load i32, ptr %9, align 4, !tbaa !15
  %63 = load i32, ptr %12, align 4, !tbaa !15
  %64 = icmp eq i32 %62, %63
  br i1 %64, label %65, label %66

65:                                               ; preds = %61
  br label %158

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %67 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 2
  %68 = load i32, ptr %12, align 4, !tbaa !15
  %69 = load i32, ptr %7, align 4, !tbaa !15
  %70 = mul nsw i32 %68, %69
  %71 = load i32, ptr %9, align 4, !tbaa !15
  %72 = add nsw i32 %70, %71
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %67, i64 noundef %73) #5
  %75 = load i64, ptr %74, align 8, !tbaa !16
  %76 = load i64, ptr %11, align 8, !tbaa !16
  %77 = sdiv i64 %75, %76
  store i64 %77, ptr %13, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %78 = load i32, ptr %9, align 4, !tbaa !15
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %14, align 4, !tbaa !15
  br label %80

80:                                               ; preds = %115, %66
  %81 = load i32, ptr %14, align 4, !tbaa !15
  %82 = load i32, ptr %7, align 4, !tbaa !15
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %85, label %84

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

85:                                               ; preds = %80
  %86 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 2
  %87 = load i32, ptr %12, align 4, !tbaa !15
  %88 = load i32, ptr %7, align 4, !tbaa !15
  %89 = mul nsw i32 %87, %88
  %90 = load i32, ptr %14, align 4, !tbaa !15
  %91 = add nsw i32 %89, %90
  %92 = sext i32 %91 to i64
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %86, i64 noundef %92) #5
  %94 = load i64, ptr %93, align 8, !tbaa !16
  %95 = load i64, ptr %13, align 8, !tbaa !16
  %96 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 2
  %97 = load i32, ptr %9, align 4, !tbaa !15
  %98 = load i32, ptr %7, align 4, !tbaa !15
  %99 = mul nsw i32 %97, %98
  %100 = load i32, ptr %14, align 4, !tbaa !15
  %101 = add nsw i32 %99, %100
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %96, i64 noundef %102) #5
  %104 = load i64, ptr %103, align 8, !tbaa !16
  %105 = mul nsw i64 %95, %104
  %106 = sub nsw i64 %94, %105
  %107 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 2
  %108 = load i32, ptr %12, align 4, !tbaa !15
  %109 = load i32, ptr %7, align 4, !tbaa !15
  %110 = mul nsw i32 %108, %109
  %111 = load i32, ptr %14, align 4, !tbaa !15
  %112 = add nsw i32 %110, %111
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %107, i64 noundef %113) #5
  store i64 %106, ptr %114, align 8, !tbaa !16
  br label %115

115:                                              ; preds = %85
  %116 = load i32, ptr %14, align 4, !tbaa !15
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %14, align 4, !tbaa !15
  br label %80, !llvm.loop !18

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

119:                                              ; preds = %154, %118
  %120 = load i32, ptr %15, align 4, !tbaa !15
  %121 = load i32, ptr %8, align 4, !tbaa !15
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %157

124:                                              ; preds = %119
  %125 = getelementptr inbounds %struct.matrix, ptr %2, i32 0, i32 2
  %126 = load i32, ptr %12, align 4, !tbaa !15
  %127 = load i32, ptr %8, align 4, !tbaa !15
  %128 = mul nsw i32 %126, %127
  %129 = load i32, ptr %15, align 4, !tbaa !15
  %130 = add nsw i32 %128, %129
  %131 = sext i32 %130 to i64
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %125, i64 noundef %131) #5
  %133 = load i64, ptr %132, align 8, !tbaa !16
  %134 = load i64, ptr %13, align 8, !tbaa !16
  %135 = getelementptr inbounds %struct.matrix, ptr %2, i32 0, i32 2
  %136 = load i32, ptr %9, align 4, !tbaa !15
  %137 = load i32, ptr %8, align 4, !tbaa !15
  %138 = mul nsw i32 %136, %137
  %139 = load i32, ptr %15, align 4, !tbaa !15
  %140 = add nsw i32 %138, %139
  %141 = sext i32 %140 to i64
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %135, i64 noundef %141) #5
  %143 = load i64, ptr %142, align 8, !tbaa !16
  %144 = mul nsw i64 %134, %143
  %145 = sub nsw i64 %133, %144
  %146 = getelementptr inbounds %struct.matrix, ptr %2, i32 0, i32 2
  %147 = load i32, ptr %12, align 4, !tbaa !15
  %148 = load i32, ptr %8, align 4, !tbaa !15
  %149 = mul nsw i32 %147, %148
  %150 = load i32, ptr %15, align 4, !tbaa !15
  %151 = add nsw i32 %149, %150
  %152 = sext i32 %151 to i64
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %146, i64 noundef %152) #5
  store i64 %145, ptr %153, align 8, !tbaa !16
  br label %154

154:                                              ; preds = %124
  %155 = load i32, ptr %15, align 4, !tbaa !15
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %15, align 4, !tbaa !15
  br label %119, !llvm.loop !20

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

158:                                              ; preds = %157, %65
  %159 = load i32, ptr %12, align 4, !tbaa !15
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %12, align 4, !tbaa !15
  br label %56, !llvm.loop !21

161:                                              ; preds = %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %9, align 4, !tbaa !15
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %9, align 4, !tbaa !15
  br label %41, !llvm.loop !22

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

166:                                              ; preds = %210, %165
  %167 = load i32, ptr %16, align 4, !tbaa !15
  %168 = load i32, ptr %7, align 4, !tbaa !15
  %169 = icmp slt i32 %167, %168
  br i1 %169, label %171, label %170

170:                                              ; preds = %166
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %213

171:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %172 = getelementptr inbounds %struct.matrix, ptr %1, i32 0, i32 2
  %173 = load i32, ptr %16, align 4, !tbaa !15
  %174 = load i32, ptr %7, align 4, !tbaa !15
  %175 = mul nsw i32 %173, %174
  %176 = load i32, ptr %16, align 4, !tbaa !15
  %177 = add nsw i32 %175, %176
  %178 = sext i32 %177 to i64
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %172, i64 noundef %178) #5
  %180 = load i64, ptr %179, align 8, !tbaa !16
  store i64 %180, ptr %17, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !15
  br label %181

181:                                              ; preds = %206, %171
  %182 = load i32, ptr %18, align 4, !tbaa !15
  %183 = load i32, ptr %8, align 4, !tbaa !15
  %184 = icmp slt i32 %182, %183
  br i1 %184, label %186, label %185

185:                                              ; preds = %181
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %209

186:                                              ; preds = %181
  %187 = getelementptr inbounds %struct.matrix, ptr %2, i32 0, i32 2
  %188 = load i32, ptr %16, align 4, !tbaa !15
  %189 = load i32, ptr %8, align 4, !tbaa !15
  %190 = mul nsw i32 %188, %189
  %191 = load i32, ptr %18, align 4, !tbaa !15
  %192 = add nsw i32 %190, %191
  %193 = sext i32 %192 to i64
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %187, i64 noundef %193) #5
  %195 = load i64, ptr %194, align 8, !tbaa !16
  %196 = load i64, ptr %17, align 8, !tbaa !16
  %197 = sdiv i64 %195, %196
  %198 = getelementptr inbounds %struct.matrix, ptr %2, i32 0, i32 2
  %199 = load i32, ptr %16, align 4, !tbaa !15
  %200 = load i32, ptr %8, align 4, !tbaa !15
  %201 = mul nsw i32 %199, %200
  %202 = load i32, ptr %18, align 4, !tbaa !15
  %203 = add nsw i32 %201, %202
  %204 = sext i32 %203 to i64
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %198, i64 noundef %204) #5
  store i64 %197, ptr %205, align 8, !tbaa !16
  br label %206

206:                                              ; preds = %186
  %207 = load i32, ptr %18, align 4, !tbaa !15
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %18, align 4, !tbaa !15
  br label %181, !llvm.loop !23

209:                                              ; preds = %185
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %210

210:                                              ; preds = %209
  %211 = load i32, ptr %16, align 4, !tbaa !15
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %16, align 4, !tbaa !15
  br label %166, !llvm.loop !24

213:                                              ; preds = %170
  call void @_ZN6matrixC2EOS_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 = { 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 #3 = { 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 #4 = { noreturn nounwind }
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, !11, i64 0}
!10 = !{!"_ZTS6matrix", !11, i64 0, !11, i64 4, !12, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt8valarrayIxE", !13, i64 0, !6, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!10, !11, i64 4}
!15 = !{!11, !11, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"long long", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}


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

%struct.matrix = type { i32, i32, %"class.std::valarray" }
%"class.std::valarray" = type { i64, ptr }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__._Z7inverse6matrixS_ = external hidden unnamed_addr constant [31 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z7inverse6matrixS_(ptr dead_on_unwind noalias writable sret(%struct.matrix) align 8 %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = load i32, ptr %1, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 4
  %6 = load i32, ptr %5, align 4, !tbaa !13
  %7 = icmp eq i32 %4, %6
  br i1 %7, label %9, label %8

8:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 94, ptr noundef nonnull @__PRETTY_FUNCTION__._Z7inverse6matrixS_) #3
  unreachable

9:                                                ; preds = %3
  %10 = load i32, ptr %2, align 8, !tbaa !5
  %11 = icmp eq i32 %4, %10
  br i1 %11, label %13, label %12

12:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 95, ptr noundef nonnull @__PRETTY_FUNCTION__._Z7inverse6matrixS_) #3
  unreachable

13:                                               ; preds = %9
  %14 = getelementptr inbounds i8, ptr %2, i64 4
  %15 = load i32, ptr %14, align 4, !tbaa !13
  %.fr100 = freeze i32 %15
  %16 = icmp sgt i32 %4, 0
  br i1 %16, label %.lr.ph.split.us, label %._crit_edge98

.lr.ph.split.us:                                  ; preds = %13
  %17 = getelementptr inbounds i8, ptr %1, i64 8
  %18 = getelementptr inbounds i8, ptr %2, i64 8
  %19 = icmp sgt i32 %.fr100, 0
  %20 = zext nneg i32 %4 to i64
  br i1 %19, label %.lr.ph74.us.us.preheader, label %.lr.ph74.us.preheader

.lr.ph74.us.preheader:                            ; preds = %.lr.ph.split.us
  %21 = zext nneg i32 %4 to i64
  br label %.lr.ph74.us

.lr.ph74.us.us.preheader:                         ; preds = %.lr.ph.split.us
  %22 = zext nneg i32 %.fr100 to i64
  %23 = zext nneg i32 %4 to i64
  br label %.lr.ph74.us.us

.lr.ph74.us.us:                                   ; preds = %.lr.ph74.us.us.preheader, %._crit_edge.split.us.us.us
  %indvars.iv147 = phi i64 [ 0, %.lr.ph74.us.us.preheader ], [ %indvars.iv.next148, %._crit_edge.split.us.us.us ]
  %indvars.iv132 = phi i64 [ 1, %.lr.ph74.us.us.preheader ], [ %indvars.iv.next133, %._crit_edge.split.us.us.us ]
  %indvars149 = trunc i64 %indvars.iv147 to i32
  %24 = mul nuw nsw i64 %indvars.iv147, %20
  %25 = mul nuw nsw i32 %4, %indvars149
  %26 = zext i32 %25 to i64
  %27 = add nuw nsw i64 %indvars.iv147, %26
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %27) #4
  %29 = load i64, ptr %28, align 8, !tbaa !14
  %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1
  %30 = icmp ult i64 %indvars.iv.next148, %23
  %31 = mul nuw nsw i64 %indvars.iv147, %22
  %.fr93 = freeze i1 %30
  br i1 %.fr93, label %.lr.ph74.split.us.us.us.split.us, label %.lr.ph74.split.us.us.us.split

.lr.ph74.split.us.us.us.split.us:                 ; preds = %.lr.ph74.us.us, %..loopexit_crit_edge.us.us.us.us
  %indvars.iv142 = phi i64 [ %indvars.iv.next143, %..loopexit_crit_edge.us.us.us.us ], [ 0, %.lr.ph74.us.us ]
  %32 = icmp eq i64 %indvars.iv147, %indvars.iv142
  br i1 %32, label %..loopexit_crit_edge.us.us.us.us, label %.lr.ph.us.us.us.us

.lr.ph.us.us.us.us:                               ; preds = %.lr.ph74.split.us.us.us.split.us
  %33 = mul nuw nsw i64 %indvars.iv142, %20
  %34 = add nuw nsw i64 %33, %indvars.iv147
  %35 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %34) #4
  %36 = load i64, ptr %35, align 8, !tbaa !14
  %37 = sdiv i64 %36, %29
  br label %48

38:                                               ; preds = %..preheader67_crit_edge.us.us.us.us, %38
  %indvars.iv137 = phi i64 [ 0, %..preheader67_crit_edge.us.us.us.us ], [ %indvars.iv.next138, %38 ]
  %39 = add nuw nsw i64 %indvars.iv137, %60
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %18, i64 noundef %39) #4
  %41 = load i64, ptr %40, align 8, !tbaa !14
  %42 = add nuw nsw i64 %indvars.iv137, %31
  %43 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %18, i64 noundef %42) #4
  %44 = load i64, ptr %43, align 8, !tbaa !14
  %45 = mul nsw i64 %44, %37
  %46 = sub nsw i64 %41, %45
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %18, i64 noundef %39) #4
  store i64 %46, ptr %47, align 8, !tbaa !14
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %exitcond141.not = icmp eq i64 %indvars.iv.next138, %22
  br i1 %exitcond141.not, label %..loopexit_crit_edge.us.us.us.us, label %38, !llvm.loop !16

48:                                               ; preds = %.lr.ph.us.us.us.us, %48
  %indvars.iv134 = phi i64 [ %indvars.iv132, %.lr.ph.us.us.us.us ], [ %indvars.iv.next135, %48 ]
  %49 = add nuw nsw i64 %indvars.iv134, %33
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %49) #4
  %51 = load i64, ptr %50, align 8, !tbaa !14
  %52 = add nuw nsw i64 %indvars.iv134, %24
  %53 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %52) #4
  %54 = load i64, ptr %53, align 8, !tbaa !14
  %55 = mul nsw i64 %54, %37
  %56 = sub nsw i64 %51, %55
  %57 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %49) #4
  store i64 %56, ptr %57, align 8, !tbaa !14
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  %58 = trunc nuw i64 %indvars.iv.next135 to i32
  %59 = icmp sgt i32 %4, %58
  br i1 %59, label %48, label %..preheader67_crit_edge.us.us.us.us, !llvm.loop !18

..loopexit_crit_edge.us.us.us.us:                 ; preds = %38, %.lr.ph74.split.us.us.us.split.us
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %exitcond146.not = icmp eq i64 %indvars.iv.next143, %20
  br i1 %exitcond146.not, label %._crit_edge.split.us.us.us, label %.lr.ph74.split.us.us.us.split.us, !llvm.loop !19

..preheader67_crit_edge.us.us.us.us:              ; preds = %48
  %60 = mul nuw nsw i64 %indvars.iv142, %22
  br label %38

.lr.ph74.split.us.us.us.split:                    ; preds = %.lr.ph74.us.us, %..loopexit_crit_edge.us.us.us
  %indvars.iv127 = phi i64 [ %indvars.iv.next128, %..loopexit_crit_edge.us.us.us ], [ 0, %.lr.ph74.us.us ]
  %61 = icmp eq i64 %indvars.iv147, %indvars.iv127
  br i1 %61, label %..loopexit_crit_edge.us.us.us, label %.preheader67.us.us.us

.preheader67.us.us.us:                            ; preds = %.lr.ph74.split.us.us.us.split
  %62 = mul nuw nsw i64 %indvars.iv127, %20
  %63 = add nuw nsw i64 %62, %indvars.iv147
  %64 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %63) #4
  %65 = load i64, ptr %64, align 8, !tbaa !14
  %66 = sdiv i64 %65, %29
  %67 = mul nuw nsw i64 %indvars.iv127, %22
  br label %68

68:                                               ; preds = %.preheader67.us.us.us, %68
  %indvars.iv122 = phi i64 [ 0, %.preheader67.us.us.us ], [ %indvars.iv.next123, %68 ]
  %69 = add nuw nsw i64 %indvars.iv122, %67
  %70 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %18, i64 noundef %69) #4
  %71 = load i64, ptr %70, align 8, !tbaa !14
  %72 = add nuw nsw i64 %indvars.iv122, %31
  %73 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %18, i64 noundef %72) #4
  %74 = load i64, ptr %73, align 8, !tbaa !14
  %75 = mul nsw i64 %74, %66
  %76 = sub nsw i64 %71, %75
  %77 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %18, i64 noundef %69) #4
  store i64 %76, ptr %77, align 8, !tbaa !14
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %exitcond126.not = icmp eq i64 %indvars.iv.next123, %22
  br i1 %exitcond126.not, label %..loopexit_crit_edge.us.us.us, label %68, !llvm.loop !16

..loopexit_crit_edge.us.us.us:                    ; preds = %68, %.lr.ph74.split.us.us.us.split
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %exitcond131.not = icmp eq i64 %indvars.iv.next128, %20
  br i1 %exitcond131.not, label %._crit_edge.split.us.us.us, label %.lr.ph74.split.us.us.us.split, !llvm.loop !19

._crit_edge.split.us.us.us:                       ; preds = %..loopexit_crit_edge.us.us.us, %..loopexit_crit_edge.us.us.us.us
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %exitcond151.not = icmp eq i64 %indvars.iv.next148, %20
  br i1 %exitcond151.not, label %.preheader, label %.lr.ph74.us.us, !llvm.loop !20

.lr.ph74.us:                                      ; preds = %.lr.ph74.us.preheader, %._crit_edge.split.us91
  %indvars.iv117 = phi i64 [ 0, %.lr.ph74.us.preheader ], [ %indvars.iv.next118, %._crit_edge.split.us91 ]
  %indvars.iv107 = phi i64 [ 1, %.lr.ph74.us.preheader ], [ %indvars.iv.next108, %._crit_edge.split.us91 ]
  %indvars119 = trunc i64 %indvars.iv117 to i32
  %78 = mul nuw nsw i64 %indvars.iv117, %20
  %79 = mul nuw nsw i32 %4, %indvars119
  %80 = zext i32 %79 to i64
  %81 = add nuw nsw i64 %indvars.iv117, %80
  %82 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %81) #4
  %83 = load i64, ptr %82, align 8, !tbaa !14
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %84 = icmp ult i64 %indvars.iv.next118, %21
  %.fr81.us = freeze i1 %84
  br i1 %.fr81.us, label %.lr.ph74.split.split.us.us, label %.lr.ph74.split.split.us90

.lr.ph74.split.split.us90:                        ; preds = %.lr.ph74.us, %89
  %indvars.iv = phi i64 [ %indvars.iv.next, %89 ], [ 0, %.lr.ph74.us ]
  %85 = icmp eq i64 %indvars.iv117, %indvars.iv
  br i1 %85, label %89, label %.preheader67.us87

.preheader67.us87:                                ; preds = %.lr.ph74.split.split.us90
  %86 = mul nuw nsw i64 %indvars.iv, %20
  %87 = add nuw nsw i64 %86, %indvars.iv117
  %88 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %87) #4
  br label %89

89:                                               ; preds = %.preheader67.us87, %.lr.ph74.split.split.us90
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %20
  br i1 %exitcond.not, label %._crit_edge.split.us91, label %.lr.ph74.split.split.us90, !llvm.loop !19

._crit_edge.split.us91:                           ; preds = %89, %..preheader67_crit_edge.us80.us
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %exitcond121.not = icmp eq i64 %indvars.iv.next118, %20
  br i1 %exitcond121.not, label %.preheader, label %.lr.ph74.us, !llvm.loop !20

.lr.ph74.split.split.us.us:                       ; preds = %.lr.ph74.us, %..preheader67_crit_edge.us80.us
  %indvars.iv112 = phi i64 [ %indvars.iv.next113, %..preheader67_crit_edge.us80.us ], [ 0, %.lr.ph74.us ]
  %90 = icmp eq i64 %indvars.iv117, %indvars.iv112
  br i1 %90, label %..preheader67_crit_edge.us80.us, label %.lr.ph.us79.us

.lr.ph.us79.us:                                   ; preds = %.lr.ph74.split.split.us.us
  %91 = mul nuw nsw i64 %indvars.iv112, %20
  %92 = add nuw nsw i64 %91, %indvars.iv117
  %93 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %92) #4
  %94 = load i64, ptr %93, align 8, !tbaa !14
  %95 = sdiv i64 %94, %83
  br label %96

96:                                               ; preds = %96, %.lr.ph.us79.us
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %96 ], [ %indvars.iv107, %.lr.ph.us79.us ]
  %97 = add nuw nsw i64 %indvars.iv109, %91
  %98 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %97) #4
  %99 = load i64, ptr %98, align 8, !tbaa !14
  %100 = add nuw nsw i64 %indvars.iv109, %78
  %101 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %100) #4
  %102 = load i64, ptr %101, align 8, !tbaa !14
  %103 = mul nsw i64 %102, %95
  %104 = sub nsw i64 %99, %103
  %105 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %97) #4
  store i64 %104, ptr %105, align 8, !tbaa !14
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %106 = trunc nuw i64 %indvars.iv.next110 to i32
  %107 = icmp sgt i32 %4, %106
  br i1 %107, label %96, label %..preheader67_crit_edge.us80.us, !llvm.loop !18

..preheader67_crit_edge.us80.us:                  ; preds = %96, %.lr.ph74.split.split.us.us
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %exitcond116.not = icmp eq i64 %indvars.iv.next113, %20
  br i1 %exitcond116.not, label %._crit_edge.split.us91, label %.lr.ph74.split.split.us.us, !llvm.loop !19

.preheader:                                       ; preds = %._crit_edge.split.us91, %._crit_edge.split.us.us.us
  br i1 %16, label %.lr.ph97, label %._crit_edge98

.lr.ph97:                                         ; preds = %.preheader
  %108 = getelementptr inbounds i8, ptr %1, i64 8
  %.05966 = add nuw i32 %4, 1
  %109 = icmp sgt i32 %.fr100, 0
  %110 = getelementptr inbounds i8, ptr %2, i64 8
  %wide.trip.count165 = zext nneg i32 %4 to i64
  br i1 %109, label %.lr.ph95.us.preheader, label %.lr.ph97.split

.lr.ph95.us.preheader:                            ; preds = %.lr.ph97
  %wide.trip.count160 = zext nneg i32 %.fr100 to i64
  br label %.lr.ph95.us

.lr.ph95.us:                                      ; preds = %.lr.ph95.us.preheader, %._crit_edge.us
  %indvars.iv162 = phi i64 [ 0, %.lr.ph95.us.preheader ], [ %indvars.iv.next163, %._crit_edge.us ]
  %111 = trunc nuw nsw i64 %indvars.iv162 to i32
  %112 = mul i32 %.05966, %111
  %113 = sext i32 %112 to i64
  %114 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %108, i64 noundef %113) #4
  %115 = load i64, ptr %114, align 8, !tbaa !14
  %116 = trunc i64 %indvars.iv162 to i32
  %117 = mul i32 %.fr100, %116
  %118 = zext i32 %117 to i64
  br label %119

119:                                              ; preds = %.lr.ph95.us, %119
  %indvars.iv157 = phi i64 [ 0, %.lr.ph95.us ], [ %indvars.iv.next158, %119 ]
  %120 = add nuw nsw i64 %indvars.iv157, %118
  %121 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %110, i64 noundef %120) #4
  %122 = load i64, ptr %121, align 8, !tbaa !14
  %123 = sdiv i64 %122, %115
  %124 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %110, i64 noundef %120) #4
  store i64 %123, ptr %124, align 8, !tbaa !14
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %exitcond161.not = icmp eq i64 %indvars.iv.next158, %wide.trip.count160
  br i1 %exitcond161.not, label %._crit_edge.us, label %119, !llvm.loop !21

._crit_edge.us:                                   ; preds = %119
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %exitcond166.not = icmp eq i64 %indvars.iv.next163, %wide.trip.count165
  br i1 %exitcond166.not, label %._crit_edge98, label %.lr.ph95.us, !llvm.loop !22

._crit_edge98:                                    ; preds = %.lr.ph97.split, %._crit_edge.us, %13, %.preheader
  tail call void @_ZN6matrixC2EOS_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  ret void

.lr.ph97.split:                                   ; preds = %.lr.ph97, %.lr.ph97.split
  %indvars.iv152 = phi i64 [ %indvars.iv.next153, %.lr.ph97.split ], [ 0, %.lr.ph97 ]
  %125 = trunc nuw nsw i64 %indvars.iv152 to i32
  %126 = mul i32 %.05966, %125
  %127 = sext i32 %126 to i64
  %128 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIxEixEm(ptr noundef nonnull align 8 dereferenceable(16) %108, i64 noundef %127) #4
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1
  %exitcond156.not = icmp eq i64 %indvars.iv.next153, %wide.trip.count165
  br i1 %exitcond156.not, label %._crit_edge98, label %.lr.ph97.split, !llvm.loop !22
}

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

attributes #0 = { noreturn 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 #1 = { 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 #2 = { 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 #3 = { noreturn nounwind }
attributes #4 = { 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, !7, i64 0}
!6 = !{!"_ZTS6matrix", !7, i64 0, !7, i64 4, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt8valarrayIxE", !11, i64 0, !12, i64 8}
!11 = !{!"long", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!6, !7, i64 4}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass