; LLVM IR from buresjan/optim_lbm :: nomad/ext/sgtelib/src/Matrix.ll (ZN7SGTELIB6MatrixaSERKS0_)

; 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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

; 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 speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(56) %1) #3 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %8 = load ptr, ptr %4, align 8
  %9 = load ptr, ptr %5, align 8, !tbaa !5
  %10 = icmp eq ptr %8, %9
  br i1 %10, label %11, label %12

11:                                               ; preds = %2
  store ptr %8, ptr %3, align 8
  br label %167

12:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %13 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 2
  %14 = load i32, ptr %13, align 8, !tbaa !9
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %15, i32 0, i32 2
  %17 = load i32, ptr %16, align 8, !tbaa !9
  %18 = icmp ne i32 %14, %17
  br i1 %18, label %26, label %19

19:                                               ; preds = %12
  %20 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 3
  %21 = load i32, ptr %20, align 4, !tbaa !15
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %22, i32 0, i32 3
  %24 = load i32, ptr %23, align 4, !tbaa !15
  %25 = icmp ne i32 %21, %24
  br i1 %25, label %26, label %121

26:                                               ; preds = %19, %12
  store i32 0, ptr %6, align 4, !tbaa !16
  br label %27

27:                                               ; preds = %42, %26
  %28 = load i32, ptr %6, align 4, !tbaa !16
  %29 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 2
  %30 = load i32, ptr %29, align 8, !tbaa !9
  %31 = icmp slt i32 %28, %30
  br i1 %31, label %32, label %45

32:                                               ; preds = %27
  %33 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 4
  %34 = load ptr, ptr %33, align 8, !tbaa !17
  %35 = load i32, ptr %6, align 4, !tbaa !16
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds ptr, ptr %34, i64 %36
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = icmp eq ptr %38, null
  br i1 %39, label %41, label %40

40:                                               ; preds = %32
  call void @_ZdaPv(ptr noundef %38) #6
  br label %41

41:                                               ; preds = %40, %32
  br label %42

42:                                               ; preds = %41
  %43 = load i32, ptr %6, align 4, !tbaa !16
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %6, align 4, !tbaa !16
  br label %27, !llvm.loop !18

45:                                               ; preds = %27
  %46 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 4
  %47 = load ptr, ptr %46, align 8, !tbaa !17
  %48 = icmp eq ptr %47, null
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @_ZdaPv(ptr noundef %47) #6
  br label %50

50:                                               ; preds = %49, %45
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %51, i32 0, i32 2
  %53 = load i32, ptr %52, align 8, !tbaa !9
  %54 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 2
  store i32 %53, ptr %54, align 8, !tbaa !9
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %55, i32 0, i32 3
  %57 = load i32, ptr %56, align 4, !tbaa !15
  %58 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 3
  store i32 %57, ptr %58, align 4, !tbaa !15
  %59 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 2
  %60 = load i32, ptr %59, align 8, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %61, i64 8)
  %63 = extractvalue { i64, i1 } %62, 1
  %64 = extractvalue { i64, i1 } %62, 0
  %65 = select i1 %63, i64 -1, i64 %64
  %66 = call noalias noundef nonnull ptr @_Znam(i64 noundef %65) #7
  %67 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 4
  store ptr %66, ptr %67, align 8, !tbaa !17
  store i32 0, ptr %6, align 4, !tbaa !16
  br label %68

68:                                               ; preds = %117, %50
  %69 = load i32, ptr %6, align 4, !tbaa !16
  %70 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 2
  %71 = load i32, ptr %70, align 8, !tbaa !9
  %72 = icmp slt i32 %69, %71
  br i1 %72, label %73, label %120

73:                                               ; preds = %68
  %74 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 3
  %75 = load i32, ptr %74, align 4, !tbaa !15
  %76 = sext i32 %75 to i64
  %77 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %76, i64 8)
  %78 = extractvalue { i64, i1 } %77, 1
  %79 = extractvalue { i64, i1 } %77, 0
  %80 = select i1 %78, i64 -1, i64 %79
  %81 = call noalias noundef nonnull ptr @_Znam(i64 noundef %80) #7
  %82 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !17
  %84 = load i32, ptr %6, align 4, !tbaa !16
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds ptr, ptr %83, i64 %85
  store ptr %81, ptr %86, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !16
  br label %87

87:                                               ; preds = %113, %73
  %88 = load i32, ptr %7, align 4, !tbaa !16
  %89 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 3
  %90 = load i32, ptr %89, align 4, !tbaa !15
  %91 = icmp slt i32 %88, %90
  br i1 %91, label %92, label %116

92:                                               ; preds = %87
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %93, i32 0, i32 4
  %95 = load ptr, ptr %94, align 8, !tbaa !17
  %96 = load i32, ptr %6, align 4, !tbaa !16
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds ptr, ptr %95, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  %100 = load i32, ptr %7, align 4, !tbaa !16
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds double, ptr %99, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !20
  %104 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 4
  %105 = load ptr, ptr %104, align 8, !tbaa !17
  %106 = load i32, ptr %6, align 4, !tbaa !16
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds ptr, ptr %105, i64 %107
  %109 = load ptr, ptr %108, align 8, !tbaa !5
  %110 = load i32, ptr %7, align 4, !tbaa !16
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds double, ptr %109, i64 %111
  store double %103, ptr %112, align 8, !tbaa !20
  br label %113

113:                                              ; preds = %92
  %114 = load i32, ptr %7, align 4, !tbaa !16
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %7, align 4, !tbaa !16
  br label %87, !llvm.loop !22

116:                                              ; preds = %87
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %6, align 4, !tbaa !16
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %6, align 4, !tbaa !16
  br label %68, !llvm.loop !23

120:                                              ; preds = %68
  br label %162

121:                                              ; preds = %19
  store i32 0, ptr %6, align 4, !tbaa !16
  br label %122

122:                                              ; preds = %158, %121
  %123 = load i32, ptr %6, align 4, !tbaa !16
  %124 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 2
  %125 = load i32, ptr %124, align 8, !tbaa !9
  %126 = icmp slt i32 %123, %125
  br i1 %126, label %127, label %161

127:                                              ; preds = %122
  store i32 0, ptr %7, align 4, !tbaa !16
  br label %128

128:                                              ; preds = %154, %127
  %129 = load i32, ptr %7, align 4, !tbaa !16
  %130 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 3
  %131 = load i32, ptr %130, align 4, !tbaa !15
  %132 = icmp slt i32 %129, %131
  br i1 %132, label %133, label %157

133:                                              ; preds = %128
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %134, i32 0, i32 4
  %136 = load ptr, ptr %135, align 8, !tbaa !17
  %137 = load i32, ptr %6, align 4, !tbaa !16
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds ptr, ptr %136, i64 %138
  %140 = load ptr, ptr %139, align 8, !tbaa !5
  %141 = load i32, ptr %7, align 4, !tbaa !16
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds double, ptr %140, i64 %142
  %144 = load double, ptr %143, align 8, !tbaa !20
  %145 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 4
  %146 = load ptr, ptr %145, align 8, !tbaa !17
  %147 = load i32, ptr %6, align 4, !tbaa !16
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds ptr, ptr %146, i64 %148
  %150 = load ptr, ptr %149, align 8, !tbaa !5
  %151 = load i32, ptr %7, align 4, !tbaa !16
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds double, ptr %150, i64 %152
  store double %144, ptr %153, align 8, !tbaa !20
  br label %154

154:                                              ; preds = %133
  %155 = load i32, ptr %7, align 4, !tbaa !16
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %7, align 4, !tbaa !16
  br label %128, !llvm.loop !24

157:                                              ; preds = %128
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %6, align 4, !tbaa !16
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %6, align 4, !tbaa !16
  br label %122, !llvm.loop !25

161:                                              ; preds = %122
  br label %162

162:                                              ; preds = %161, %120
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %163, i32 0, i32 1
  %165 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %8, i32 0, i32 1
  %166 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %165, ptr noundef nonnull align 8 dereferenceable(32) %164)
  store ptr %8, ptr %3, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %167

167:                                              ; preds = %162, %11
  %168 = load ptr, ptr %3, align 8
  ret ptr %168
}

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nobuiltin 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 #3 = { 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 = { nobuiltin 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 #5 = { nounwind }
attributes #6 = { builtin nounwind }
attributes #7 = { builtin 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++ TBAA"}
!9 = !{!10, !14, i64 40}
!10 = !{!"_ZTSN7SGTELIB6MatrixE", !11, i64 8, !14, i64 40, !14, i64 44, !6, i64 48}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!10, !14, i64 44}
!16 = !{!14, !14, i64 0}
!17 = !{!10, !6, i64 48}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !7, i64 0}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !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"

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull returned align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(56) %1) local_unnamed_addr #1 align 2 {
  %3 = icmp eq ptr %0, %1
  br i1 %3, label %124, label %4

4:                                                ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 40
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %.not = icmp eq i32 %6, %8
  br i1 %.not, label %9, label %49

9:                                                ; preds = %4
  %10 = getelementptr inbounds i8, ptr %0, i64 44
  %11 = load i32, ptr %10, align 4, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %1, i64 44
  %13 = load i32, ptr %12, align 4, !tbaa !14
  %.not36 = icmp eq i32 %11, %13
  br i1 %.not36, label %.preheader37, label %49

.preheader37:                                     ; preds = %9
  %14 = icmp sgt i32 %6, 0
  br i1 %14, label %.preheader.lr.ph, label %.loopexit

.preheader.lr.ph:                                 ; preds = %.preheader37
  %15 = icmp sgt i32 %11, 0
  %16 = getelementptr inbounds i8, ptr %1, i64 48
  %17 = load ptr, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr %0, i64 48
  %19 = load ptr, ptr %18, align 8
  br i1 %15, label %.preheader.us.preheader, label %.loopexit

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %wide.trip.count77 = zext nneg i32 %6 to i64
  %wide.trip.count72 = zext nneg i32 %11 to i64
  %min.iters.check88 = icmp ult i32 %11, 4
  %n.vec91 = and i64 %wide.trip.count72, 2147483644
  %cmp.n98 = icmp eq i64 %n.vec91, %wide.trip.count72
  %xtraiter106 = and i64 %wide.trip.count72, 3
  %lcmp.mod107.not = icmp eq i64 %xtraiter106, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge49.us
  %indvars.iv74 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next75, %._crit_edge49.us ]
  %20 = getelementptr inbounds ptr, ptr %17, i64 %indvars.iv74
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = getelementptr inbounds ptr, ptr %19, i64 %indvars.iv74
  %23 = load ptr, ptr %22, align 8, !tbaa !15
  %24 = ptrtoint ptr %23 to i64
  %25 = ptrtoint ptr %21 to i64
  %26 = sub i64 %24, %25
  %diff.check85 = icmp ult i64 %26, 32
  %or.cond = select i1 %min.iters.check88, i1 true, i1 %diff.check85
  br i1 %or.cond, label %scalar.ph87.preheader, label %vector.body93

vector.body93:                                    ; preds = %.preheader.us, %vector.body93
  %index94 = phi i64 [ %index.next97, %vector.body93 ], [ 0, %.preheader.us ]
  %27 = getelementptr inbounds double, ptr %21, i64 %index94
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %wide.load95 = load <2 x double>, ptr %27, align 8, !tbaa !16
  %wide.load96 = load <2 x double>, ptr %28, align 8, !tbaa !16
  %29 = getelementptr inbounds double, ptr %23, i64 %index94
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  store <2 x double> %wide.load95, ptr %29, align 8, !tbaa !16
  store <2 x double> %wide.load96, ptr %30, align 8, !tbaa !16
  %index.next97 = add nuw i64 %index94, 4
  %31 = icmp eq i64 %index.next97, %n.vec91
  br i1 %31, label %middle.block86, label %vector.body93, !llvm.loop !18

middle.block86:                                   ; preds = %vector.body93
  br i1 %cmp.n98, label %._crit_edge49.us, label %scalar.ph87.preheader

scalar.ph87.preheader:                            ; preds = %middle.block86, %.preheader.us
  %indvars.iv69.ph = phi i64 [ 0, %.preheader.us ], [ %n.vec91, %middle.block86 ]
  br i1 %lcmp.mod107.not, label %scalar.ph87.prol.loopexit, label %scalar.ph87.prol

scalar.ph87.prol:                                 ; preds = %scalar.ph87.preheader, %scalar.ph87.prol
  %indvars.iv69.prol = phi i64 [ %indvars.iv.next70.prol, %scalar.ph87.prol ], [ %indvars.iv69.ph, %scalar.ph87.preheader ]
  %prol.iter108 = phi i64 [ %prol.iter108.next, %scalar.ph87.prol ], [ 0, %scalar.ph87.preheader ]
  %32 = getelementptr inbounds double, ptr %21, i64 %indvars.iv69.prol
  %33 = load double, ptr %32, align 8, !tbaa !16
  %34 = getelementptr inbounds double, ptr %23, i64 %indvars.iv69.prol
  store double %33, ptr %34, align 8, !tbaa !16
  %indvars.iv.next70.prol = add nuw nsw i64 %indvars.iv69.prol, 1
  %prol.iter108.next = add i64 %prol.iter108, 1
  %prol.iter108.cmp.not = icmp eq i64 %prol.iter108.next, %xtraiter106
  br i1 %prol.iter108.cmp.not, label %scalar.ph87.prol.loopexit, label %scalar.ph87.prol, !llvm.loop !22

scalar.ph87.prol.loopexit:                        ; preds = %scalar.ph87.prol, %scalar.ph87.preheader
  %indvars.iv69.unr = phi i64 [ %indvars.iv69.ph, %scalar.ph87.preheader ], [ %indvars.iv.next70.prol, %scalar.ph87.prol ]
  %35 = sub nsw i64 %indvars.iv69.ph, %wide.trip.count72
  %36 = icmp ugt i64 %35, -4
  br i1 %36, label %._crit_edge49.us, label %scalar.ph87

scalar.ph87:                                      ; preds = %scalar.ph87.prol.loopexit, %scalar.ph87
  %indvars.iv69 = phi i64 [ %indvars.iv.next70.3, %scalar.ph87 ], [ %indvars.iv69.unr, %scalar.ph87.prol.loopexit ]
  %37 = getelementptr inbounds double, ptr %21, i64 %indvars.iv69
  %38 = load double, ptr %37, align 8, !tbaa !16
  %39 = getelementptr inbounds double, ptr %23, i64 %indvars.iv69
  store double %38, ptr %39, align 8, !tbaa !16
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %40 = getelementptr inbounds double, ptr %21, i64 %indvars.iv.next70
  %41 = load double, ptr %40, align 8, !tbaa !16
  %42 = getelementptr inbounds double, ptr %23, i64 %indvars.iv.next70
  store double %41, ptr %42, align 8, !tbaa !16
  %indvars.iv.next70.1 = add nuw nsw i64 %indvars.iv69, 2
  %43 = getelementptr inbounds double, ptr %21, i64 %indvars.iv.next70.1
  %44 = load double, ptr %43, align 8, !tbaa !16
  %45 = getelementptr inbounds double, ptr %23, i64 %indvars.iv.next70.1
  store double %44, ptr %45, align 8, !tbaa !16
  %indvars.iv.next70.2 = add nuw nsw i64 %indvars.iv69, 3
  %46 = getelementptr inbounds double, ptr %21, i64 %indvars.iv.next70.2
  %47 = load double, ptr %46, align 8, !tbaa !16
  %48 = getelementptr inbounds double, ptr %23, i64 %indvars.iv.next70.2
  store double %47, ptr %48, align 8, !tbaa !16
  %indvars.iv.next70.3 = add nuw nsw i64 %indvars.iv69, 4
  %exitcond73.not.3 = icmp eq i64 %indvars.iv.next70.3, %wide.trip.count72
  br i1 %exitcond73.not.3, label %._crit_edge49.us, label %scalar.ph87, !llvm.loop !24

._crit_edge49.us:                                 ; preds = %scalar.ph87.prol.loopexit, %scalar.ph87, %middle.block86
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond78.not = icmp eq i64 %indvars.iv.next75, %wide.trip.count77
  br i1 %exitcond78.not, label %.loopexit, label %.preheader.us, !llvm.loop !25

49:                                               ; preds = %9, %4
  %50 = icmp sgt i32 %6, 0
  br i1 %50, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %49
  %51 = getelementptr inbounds i8, ptr %0, i64 48
  br label %52

52:                                               ; preds = %.lr.ph, %59
  %53 = phi i32 [ %6, %.lr.ph ], [ %60, %59 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %59 ]
  %54 = load ptr, ptr %51, align 8, !tbaa !26
  %55 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv
  %56 = load ptr, ptr %55, align 8, !tbaa !15
  %57 = icmp eq ptr %56, null
  br i1 %57, label %59, label %58

58:                                               ; preds = %52
  tail call void @_ZdaPv(ptr noundef nonnull %56) #3
  %.pre = load i32, ptr %5, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %52, %58
  %60 = phi i32 [ %53, %52 ], [ %.pre, %58 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv.next, %61
  br i1 %62, label %52, label %._crit_edge, !llvm.loop !27

._crit_edge:                                      ; preds = %59, %49
  %63 = getelementptr inbounds i8, ptr %0, i64 48
  %64 = load ptr, ptr %63, align 8, !tbaa !26
  %65 = icmp eq ptr %64, null
  br i1 %65, label %67, label %66

66:                                               ; preds = %._crit_edge
  tail call void @_ZdaPv(ptr noundef nonnull %64) #3
  br label %67

67:                                               ; preds = %66, %._crit_edge
  %68 = load i32, ptr %7, align 8, !tbaa !5
  store i32 %68, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %1, i64 44
  %70 = load i32, ptr %69, align 4, !tbaa !14
  %.fr51 = freeze i32 %70
  %71 = getelementptr inbounds i8, ptr %0, i64 44
  store i32 %.fr51, ptr %71, align 4, !tbaa !14
  %72 = sext i32 %68 to i64
  %73 = icmp slt i32 %68, 0
  %74 = shl nsw i64 %72, 3
  %75 = select i1 %73, i64 -1, i64 %74
  %76 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %75) #4
  store ptr %76, ptr %63, align 8, !tbaa !26
  %77 = icmp sgt i32 %68, 0
  br i1 %77, label %.lr.ph46, label %.loopexit

.lr.ph46:                                         ; preds = %67
  %78 = zext nneg i32 %.fr51 to i64
  %79 = icmp slt i32 %.fr51, 0
  %80 = shl nuw nsw i64 %78, 3
  %81 = select i1 %79, i64 -1, i64 %80
  %82 = icmp sgt i32 %.fr51, 0
  %83 = getelementptr inbounds i8, ptr %1, i64 48
  %wide.trip.count67 = zext nneg i32 %68 to i64
  br i1 %82, label %.lr.ph42.us.preheader, label %.lr.ph46.split

.lr.ph42.us.preheader:                            ; preds = %.lr.ph46
  %wide.trip.count62 = zext nneg i32 %.fr51 to i64
  %min.iters.check = icmp ult i32 %.fr51, 4
  %n.vec = and i64 %wide.trip.count62, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count62
  %xtraiter = and i64 %wide.trip.count62, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph42.us

.lr.ph42.us:                                      ; preds = %.lr.ph42.us.preheader, %._crit_edge43.us
  %84 = phi ptr [ %76, %.lr.ph42.us.preheader ], [ %90, %._crit_edge43.us ]
  %indvars.iv64 = phi i64 [ 0, %.lr.ph42.us.preheader ], [ %indvars.iv.next65, %._crit_edge43.us ]
  %85 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %81) #4
  %86 = getelementptr inbounds ptr, ptr %84, i64 %indvars.iv64
  store ptr %85, ptr %86, align 8, !tbaa !15
  %87 = load ptr, ptr %83, align 8, !tbaa !26
  %88 = getelementptr inbounds ptr, ptr %87, i64 %indvars.iv64
  %89 = load ptr, ptr %88, align 8, !tbaa !15
  %90 = load ptr, ptr %63, align 8, !tbaa !26
  %91 = getelementptr inbounds ptr, ptr %90, i64 %indvars.iv64
  %92 = load ptr, ptr %91, align 8, !tbaa !15
  %93 = ptrtoint ptr %92 to i64
  %94 = ptrtoint ptr %89 to i64
  %95 = sub i64 %93, %94
  %diff.check = icmp ult i64 %95, 32
  %or.cond103 = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond103, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.lr.ph42.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph42.us ]
  %96 = getelementptr inbounds double, ptr %89, i64 %index
  %97 = getelementptr inbounds i8, ptr %96, i64 16
  %wide.load = load <2 x double>, ptr %96, align 8, !tbaa !16
  %wide.load83 = load <2 x double>, ptr %97, align 8, !tbaa !16
  %98 = getelementptr inbounds double, ptr %92, i64 %index
  %99 = getelementptr inbounds i8, ptr %98, i64 16
  store <2 x double> %wide.load, ptr %98, align 8, !tbaa !16
  store <2 x double> %wide.load83, ptr %99, align 8, !tbaa !16
  %index.next = add nuw i64 %index, 4
  %100 = icmp eq i64 %index.next, %n.vec
  br i1 %100, label %middle.block, label %vector.body, !llvm.loop !28

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

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph42.us
  %indvars.iv59.ph = phi i64 [ 0, %.lr.ph42.us ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv59.prol = phi i64 [ %indvars.iv.next60.prol, %scalar.ph.prol ], [ %indvars.iv59.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %101 = getelementptr inbounds double, ptr %89, i64 %indvars.iv59.prol
  %102 = load double, ptr %101, align 8, !tbaa !16
  %103 = getelementptr inbounds double, ptr %92, i64 %indvars.iv59.prol
  store double %102, ptr %103, align 8, !tbaa !16
  %indvars.iv.next60.prol = add nuw nsw i64 %indvars.iv59.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !29

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv59.unr = phi i64 [ %indvars.iv59.ph, %scalar.ph.preheader ], [ %indvars.iv.next60.prol, %scalar.ph.prol ]
  %104 = sub nsw i64 %indvars.iv59.ph, %wide.trip.count62
  %105 = icmp ugt i64 %104, -4
  br i1 %105, label %._crit_edge43.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv59 = phi i64 [ %indvars.iv.next60.3, %scalar.ph ], [ %indvars.iv59.unr, %scalar.ph.prol.loopexit ]
  %106 = getelementptr inbounds double, ptr %89, i64 %indvars.iv59
  %107 = load double, ptr %106, align 8, !tbaa !16
  %108 = getelementptr inbounds double, ptr %92, i64 %indvars.iv59
  store double %107, ptr %108, align 8, !tbaa !16
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %109 = getelementptr inbounds double, ptr %89, i64 %indvars.iv.next60
  %110 = load double, ptr %109, align 8, !tbaa !16
  %111 = getelementptr inbounds double, ptr %92, i64 %indvars.iv.next60
  store double %110, ptr %111, align 8, !tbaa !16
  %indvars.iv.next60.1 = add nuw nsw i64 %indvars.iv59, 2
  %112 = getelementptr inbounds double, ptr %89, i64 %indvars.iv.next60.1
  %113 = load double, ptr %112, align 8, !tbaa !16
  %114 = getelementptr inbounds double, ptr %92, i64 %indvars.iv.next60.1
  store double %113, ptr %114, align 8, !tbaa !16
  %indvars.iv.next60.2 = add nuw nsw i64 %indvars.iv59, 3
  %115 = getelementptr inbounds double, ptr %89, i64 %indvars.iv.next60.2
  %116 = load double, ptr %115, align 8, !tbaa !16
  %117 = getelementptr inbounds double, ptr %92, i64 %indvars.iv.next60.2
  store double %116, ptr %117, align 8, !tbaa !16
  %indvars.iv.next60.3 = add nuw nsw i64 %indvars.iv59, 4
  %exitcond63.not.3 = icmp eq i64 %indvars.iv.next60.3, %wide.trip.count62
  br i1 %exitcond63.not.3, label %._crit_edge43.us, label %scalar.ph, !llvm.loop !30

._crit_edge43.us:                                 ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %exitcond68.not = icmp eq i64 %indvars.iv.next65, %wide.trip.count67
  br i1 %exitcond68.not, label %.loopexit, label %.lr.ph42.us, !llvm.loop !31

.lr.ph46.split:                                   ; preds = %.lr.ph46, %.lr.ph46.split
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %.lr.ph46.split ], [ 0, %.lr.ph46 ]
  %118 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %81) #4
  %119 = load ptr, ptr %63, align 8, !tbaa !26
  %120 = getelementptr inbounds ptr, ptr %119, i64 %indvars.iv56
  store ptr %118, ptr %120, align 8, !tbaa !15
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next57, %wide.trip.count67
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph46.split, !llvm.loop !31

.loopexit:                                        ; preds = %.lr.ph46.split, %._crit_edge43.us, %._crit_edge49.us, %.preheader.lr.ph, %67, %.preheader37
  %121 = getelementptr inbounds i8, ptr %1, i64 8
  %122 = getelementptr inbounds i8, ptr %0, i64 8
  %123 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %122, ptr noundef nonnull align 8 dereferenceable(32) %121)
  br label %124

124:                                              ; preds = %2, %.loopexit
  ret ptr %0
}

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

attributes #0 = { nobuiltin 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nobuiltin 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 = { builtin nounwind }
attributes #4 = { builtin 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, !13, i64 40}
!6 = !{!"_ZTSN7SGTELIB6MatrixE", !7, i64 8, !13, i64 40, !13, i64 44, !9, i64 48}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"int", !10, i64 0}
!14 = !{!6, !13, i64 44}
!15 = !{!9, !9, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !10, i64 0}
!18 = distinct !{!18, !19, !20, !21}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = distinct !{!24, !19, !20}
!25 = distinct !{!25, !19}
!26 = !{!6, !9, i64 48}
!27 = distinct !{!27, !19}
!28 = distinct !{!28, !19, !20, !21}
!29 = distinct !{!29, !23}
!30 = distinct !{!30, !19, !20}
!31 = distinct !{!31, !19}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass