; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes/R3Grid.ll (ZN6R3Grid17GradientMagnitudeEv)

; 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.R3Grid = type { %class.R3Affine, %class.R3Affine, double, double, ptr, [3 x i32], i32, i32, i32 }
%class.R3Affine = type { %class.R3Transformation, %class.R4Matrix, %class.R4Matrix, %class.RNFlags }
%class.R3Transformation = type { ptr }
%class.R4Matrix = type { [4 x [4 x double]] }
%class.RNFlags = type { i64 }

declare i32 @__gxx_personality_v0(...)

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: nounwind
declare double @sqrt(double noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6R3Grid8GradientEi(ptr noundef nonnull align 8 dereferenceable(592), i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6R3Grid17GradientMagnitudeEv(ptr noundef nonnull align 8 dereferenceable(592) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %class.R3Grid, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %class.R3Grid, align 8
  %7 = alloca %class.R3Grid, align 8
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 592, ptr %3) #5
  call void @_ZN6R3GridC1ERKS_(ptr noundef nonnull align 8 dereferenceable(592) %3, ptr noundef nonnull align 8 dereferenceable(592) %12)
  invoke void @_ZN6R3Grid8GradientEi(ptr noundef nonnull align 8 dereferenceable(592) %3, i32 noundef 0)
          to label %13 unwind label %24

13:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 592, ptr %6) #5
  invoke void @_ZN6R3GridC1ERKS_(ptr noundef nonnull align 8 dereferenceable(592) %6, ptr noundef nonnull align 8 dereferenceable(592) %12)
          to label %14 unwind label %28

14:                                               ; preds = %13
  invoke void @_ZN6R3Grid8GradientEi(ptr noundef nonnull align 8 dereferenceable(592) %6, i32 noundef 1)
          to label %15 unwind label %32

15:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 592, ptr %7) #5
  invoke void @_ZN6R3GridC1ERKS_(ptr noundef nonnull align 8 dereferenceable(592) %7, ptr noundef nonnull align 8 dereferenceable(592) %12)
          to label %16 unwind label %36

16:                                               ; preds = %15
  invoke void @_ZN6R3Grid8GradientEi(ptr noundef nonnull align 8 dereferenceable(592) %7, i32 noundef 2)
          to label %17 unwind label %40

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

18:                                               ; preds = %69, %17
  %19 = load i32, ptr %8, align 4, !tbaa !9
  %20 = getelementptr inbounds %class.R3Grid, ptr %12, i32 0, i32 8
  %21 = load i32, ptr %20, align 4, !tbaa !11
  %22 = icmp slt i32 %19, %21
  br i1 %22, label %44, label %23

23:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %86

24:                                               ; preds = %1
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %4, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %5, align 4
  br label %91

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

32:                                               ; preds = %14
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %4, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %5, align 4
  br label %89

36:                                               ; preds = %15
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %4, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %5, align 4
  br label %88

40:                                               ; preds = %16
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %4, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %5, align 4
  br label %87

44:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = invoke noundef double @_ZNK6R3Grid9GridValueEi(ptr noundef nonnull align 8 dereferenceable(592) %3, i32 noundef %45)
          to label %47 unwind label %72

47:                                               ; preds = %44
  store double %46, ptr %9, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = invoke noundef double @_ZNK6R3Grid9GridValueEi(ptr noundef nonnull align 8 dereferenceable(592) %6, i32 noundef %48)
          to label %50 unwind label %76

50:                                               ; preds = %47
  store double %49, ptr %10, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = invoke noundef double @_ZNK6R3Grid9GridValueEi(ptr noundef nonnull align 8 dereferenceable(592) %7, i32 noundef %51)
          to label %53 unwind label %80

53:                                               ; preds = %50
  store double %52, ptr %11, align 8, !tbaa !19
  %54 = load double, ptr %9, align 8, !tbaa !19
  %55 = load double, ptr %9, align 8, !tbaa !19
  %56 = load double, ptr %10, align 8, !tbaa !19
  %57 = load double, ptr %10, align 8, !tbaa !19
  %58 = fmul double %56, %57
  %59 = call double @llvm.fmuladd.f64(double %54, double %55, double %58)
  %60 = load double, ptr %11, align 8, !tbaa !19
  %61 = load double, ptr %11, align 8, !tbaa !19
  %62 = call double @llvm.fmuladd.f64(double %60, double %61, double %59)
  %63 = call double @sqrt(double noundef %62) #5
  %64 = getelementptr inbounds %class.R3Grid, ptr %12, i32 0, i32 4
  %65 = load ptr, ptr %64, align 8, !tbaa !20
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds double, ptr %65, i64 %67
  store double %63, ptr %68, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %69

69:                                               ; preds = %53
  %70 = load i32, ptr %8, align 4, !tbaa !9
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %8, align 4, !tbaa !9
  br label %18, !llvm.loop !21

72:                                               ; preds = %44
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %4, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %5, align 4
  br label %85

76:                                               ; preds = %47
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %4, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %5, align 4
  br label %84

80:                                               ; preds = %50
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %4, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %84

84:                                               ; preds = %80, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %85

85:                                               ; preds = %84, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %87

86:                                               ; preds = %23
  call void @_ZN6R3GridD1Ev(ptr noundef nonnull align 8 dereferenceable(592) %7) #5
  call void @llvm.lifetime.end.p0(i64 592, ptr %7) #5
  call void @_ZN6R3GridD1Ev(ptr noundef nonnull align 8 dereferenceable(592) %6) #5
  call void @llvm.lifetime.end.p0(i64 592, ptr %6) #5
  call void @_ZN6R3GridD1Ev(ptr noundef nonnull align 8 dereferenceable(592) %3) #5
  call void @llvm.lifetime.end.p0(i64 592, ptr %3) #5
  ret void

87:                                               ; preds = %85, %40
  call void @_ZN6R3GridD1Ev(ptr noundef nonnull align 8 dereferenceable(592) %7) #5
  br label %88

88:                                               ; preds = %87, %36
  call void @llvm.lifetime.end.p0(i64 592, ptr %7) #5
  br label %89

89:                                               ; preds = %88, %32
  call void @_ZN6R3GridD1Ev(ptr noundef nonnull align 8 dereferenceable(592) %6) #5
  br label %90

90:                                               ; preds = %89, %28
  call void @llvm.lifetime.end.p0(i64 592, ptr %6) #5
  br label %91

91:                                               ; preds = %90, %24
  call void @_ZN6R3GridD1Ev(ptr noundef nonnull align 8 dereferenceable(592) %3) #5
  call void @llvm.lifetime.end.p0(i64 592, ptr %3) #5
  br label %92

92:                                               ; preds = %91
  %93 = load ptr, ptr %4, align 8
  %94 = load i32, ptr %5, align 4
  %95 = insertvalue { ptr, i32 } poison, ptr %93, 0
  %96 = insertvalue { ptr, i32 } %95, i32 %94, 1
  resume { ptr, i32 } %96
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK6R3Grid9GridValueEi(ptr noundef nonnull align 8 dereferenceable(592), i32 noundef) #4 align 2

declare void @_ZN6R3GridC1ERKS_(ptr, ptr)

declare void @_ZN6R3GridD1Ev(ptr)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 = { 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 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 588}
!12 = !{!"_ZTS6R3Grid", !13, i64 0, !13, i64 272, !18, i64 544, !18, i64 552, !6, i64 560, !7, i64 568, !10, i64 580, !10, i64 584, !10, i64 588}
!13 = !{!"_ZTS8R3Affine", !14, i64 0, !15, i64 8, !15, i64 136, !16, i64 264}
!14 = !{!"_ZTS16R3Transformation"}
!15 = !{!"_ZTS8R4Matrix", !7, i64 0}
!16 = !{!"_ZTS7RNFlags", !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!18, !18, i64 0}
!20 = !{!12, !6, i64 560}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; 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.R3Grid = type { %class.R3Affine, %class.R3Affine, double, double, ptr, [3 x i32], i32, i32, i32 }
%class.R3Affine = type { %class.R3Transformation, %class.R4Matrix, %class.R4Matrix, %class.RNFlags }
%class.R3Transformation = type { ptr }
%class.R4Matrix = type { [4 x [4 x double]] }
%class.RNFlags = type { i64 }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6R3Grid8GradientEi(ptr noundef nonnull align 8 dereferenceable(592), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6R3Grid17GradientMagnitudeEv(ptr noundef nonnull align 8 dereferenceable(592) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.R3Grid, align 8
  %3 = alloca %class.R3Grid, align 8
  %4 = alloca %class.R3Grid, align 8
  call void @llvm.lifetime.start.p0(i64 592, ptr nonnull %2) #5
  call void @_ZN6R3GridC1ERKS_(ptr noundef nonnull align 8 dereferenceable(592) %2, ptr noundef nonnull align 8 dereferenceable(592) %0)
  invoke void @_ZN6R3Grid8GradientEi(ptr noundef nonnull align 8 dereferenceable(592) %2, i32 noundef 0)
          to label %5 unwind label %13

5:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 592, ptr nonnull %3) #5
  invoke void @_ZN6R3GridC1ERKS_(ptr noundef nonnull align 8 dereferenceable(592) %3, ptr noundef nonnull align 8 dereferenceable(592) %0)
          to label %6 unwind label %15

6:                                                ; preds = %5
  invoke void @_ZN6R3Grid8GradientEi(ptr noundef nonnull align 8 dereferenceable(592) %3, i32 noundef 1)
          to label %7 unwind label %17

7:                                                ; preds = %6
  call void @llvm.lifetime.start.p0(i64 592, ptr nonnull %4) #5
  invoke void @_ZN6R3GridC1ERKS_(ptr noundef nonnull align 8 dereferenceable(592) %4, ptr noundef nonnull align 8 dereferenceable(592) %0)
          to label %8 unwind label %19

8:                                                ; preds = %7
  invoke void @_ZN6R3Grid8GradientEi(ptr noundef nonnull align 8 dereferenceable(592) %4, i32 noundef 2)
          to label %.preheader unwind label %21

.preheader:                                       ; preds = %8
  %9 = getelementptr inbounds i8, ptr %0, i64 588
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %12 = getelementptr inbounds i8, ptr %0, i64 560
  br label %23

._crit_edge:                                      ; preds = %30, %.preheader
  call void @_ZN6R3GridD1Ev(ptr noundef nonnull align 8 dereferenceable(592) %4) #5
  call void @llvm.lifetime.end.p0(i64 592, ptr nonnull %4) #5
  call void @_ZN6R3GridD1Ev(ptr noundef nonnull align 8 dereferenceable(592) %3) #5
  call void @llvm.lifetime.end.p0(i64 592, ptr nonnull %3) #5
  call void @_ZN6R3GridD1Ev(ptr noundef nonnull align 8 dereferenceable(592) %2) #5
  call void @llvm.lifetime.end.p0(i64 592, ptr nonnull %2) #5
  ret void

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

15:                                               ; preds = %5
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %48

17:                                               ; preds = %6
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %47

19:                                               ; preds = %7
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %46

21:                                               ; preds = %8
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %45

23:                                               ; preds = %.lr.ph, %30
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %30 ]
  %24 = trunc nuw nsw i64 %indvars.iv to i32
  %25 = invoke noundef double @_ZNK6R3Grid9GridValueEi(ptr noundef nonnull align 8 dereferenceable(592) %2, i32 noundef %24)
          to label %26 unwind label %39

26:                                               ; preds = %23
  %27 = invoke noundef double @_ZNK6R3Grid9GridValueEi(ptr noundef nonnull align 8 dereferenceable(592) %3, i32 noundef %24)
          to label %28 unwind label %41

28:                                               ; preds = %26
  %29 = invoke noundef double @_ZNK6R3Grid9GridValueEi(ptr noundef nonnull align 8 dereferenceable(592) %4, i32 noundef %24)
          to label %30 unwind label %43

30:                                               ; preds = %28
  %31 = fmul double %27, %27
  %32 = call double @llvm.fmuladd.f64(double %25, double %25, double %31)
  %33 = call double @llvm.fmuladd.f64(double %29, double %29, double %32)
  %sqrt = call double @llvm.sqrt.f64(double %33)
  %34 = load ptr, ptr %12, align 8, !tbaa !17
  %35 = getelementptr inbounds double, ptr %34, i64 %indvars.iv
  store double %sqrt, ptr %35, align 8, !tbaa !18
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = icmp slt i64 %indvars.iv.next, %37
  br i1 %38, label %23, label %._crit_edge, !llvm.loop !19

39:                                               ; preds = %23
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %45

41:                                               ; preds = %26
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %45

43:                                               ; preds = %28
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %45

45:                                               ; preds = %39, %43, %41, %21
  %.pn.pn.pn = phi { ptr, i32 } [ %22, %21 ], [ %40, %39 ], [ %44, %43 ], [ %42, %41 ]
  call void @_ZN6R3GridD1Ev(ptr noundef nonnull align 8 dereferenceable(592) %4) #5
  br label %46

46:                                               ; preds = %45, %19
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %45 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 592, ptr nonnull %4) #5
  br label %47

47:                                               ; preds = %46, %17
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %46 ], [ %18, %17 ]
  call void @_ZN6R3GridD1Ev(ptr noundef nonnull align 8 dereferenceable(592) %3) #5
  br label %48

48:                                               ; preds = %47, %15
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %47 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 592, ptr nonnull %3) #5
  br label %49

49:                                               ; preds = %48, %13
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %48 ], [ %14, %13 ]
  call void @_ZN6R3GridD1Ev(ptr noundef nonnull align 8 dereferenceable(592) %2) #5
  call void @llvm.lifetime.end.p0(i64 592, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK6R3Grid9GridValueEi(ptr noundef nonnull align 8 dereferenceable(592), i32 noundef) local_unnamed_addr #3 align 2

declare void @_ZN6R3GridC1ERKS_(ptr, ptr) local_unnamed_addr

declare void @_ZN6R3GridD1Ev(ptr) local_unnamed_addr

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sqrt.f64(double) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !16, i64 588}
!6 = !{!"_ZTS6R3Grid", !7, i64 0, !7, i64 272, !14, i64 544, !14, i64 552, !15, i64 560, !10, i64 568, !16, i64 580, !16, i64 584, !16, i64 588}
!7 = !{!"_ZTS8R3Affine", !8, i64 0, !9, i64 8, !9, i64 136, !12, i64 264}
!8 = !{!"_ZTS16R3Transformation"}
!9 = !{!"_ZTS8R4Matrix", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTS7RNFlags", !13, i64 0}
!13 = !{!"long", !10, i64 0}
!14 = !{!"double", !10, i64 0}
!15 = !{!"any pointer", !10, i64 0}
!16 = !{!"int", !10, i64 0}
!17 = !{!6, !15, i64 560}
!18 = !{!14, !14, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: AggressiveInstCombinePass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass