; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes (R3PlanarGrid)

; 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.R2Box = type { %class.R2Solid, %class.R2Point, %class.R2Point }
%class.R2Solid = type { %class.R2Shape }
%class.R2Shape = type { ptr }
%class.R2Point = type { [2 x double] }
%class.R3Point = type { [3 x double] }
%class.R3Vector = type { [3 x double] }
%class.R3Triad = type { [3 x %class.R3Vector] }
%class.R3CoordSystem = type { %class.R3Point, %class.R3Triad }
%class.R4Matrix = type { [4 x [4 x double]] }
%class.R3PlanarGrid = type <{ %class.R3Plane, %class.R3Affine, %class.R2Grid, %class.R3Box, i32, [4 x i8] }>
%class.R3Plane = type { %class.R3Vector, double }
%class.R3Affine = type { %class.R3Transformation, %class.R4Matrix, %class.R4Matrix, %class.RNFlags }
%class.R3Transformation = type { ptr }
%class.RNFlags = type { i64 }
%class.R2Grid = type { %class.R2Affine, %class.R2Affine, double, ptr, [2 x i32], i32, i32 }
%class.R2Affine = type <{ %class.R2Transformation, %class.R3Matrix, i32, [4 x i8] }>
%class.R2Transformation = type { ptr }
%class.R3Matrix = type { [3 x [3 x double]] }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }

@R2null_box = external global %class.R2Box, align 8

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12R3PlanarGrid5ResetERK7R3PlaneRK5R3BoxRK7R3PointRK8R3Vectord(ptr noundef nonnull align 8 dereferenceable(572) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, double noundef %5) #0 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca %class.R3Point, align 8
  %14 = alloca %class.R3Vector, align 8
  %15 = alloca %class.R3Vector, align 8
  %16 = alloca %class.R3Vector, align 8
  %17 = alloca %class.R3Triad, align 8
  %18 = alloca %class.R3CoordSystem, align 8
  %19 = alloca %class.R4Matrix, align 8
  %20 = alloca %class.R2Box, align 8
  %21 = alloca i32, align 4
  %22 = alloca %class.R3Point, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca %class.R2Point, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store double %5, ptr %12, align 8, !tbaa !9
  %28 = load ptr, ptr %7, align 8
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %class.R3PlanarGrid, ptr %28, i32 0, i32 0
  %31 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN7R3PlaneaSERKS_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull align 8 dereferenceable(32) %29)
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds %class.R3PlanarGrid, ptr %28, i32 0, i32 3
  %34 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN5R3BoxaSERKS_(ptr noundef nonnull align 8 dereferenceable(56) %33, ptr noundef nonnull align 8 dereferenceable(56) %32)
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %35)
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN7R3Point7ProjectERK7R3Plane(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(32) %36)
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7R3Plane6NormalEv(ptr noundef nonnull align 8 dereferenceable(32) %37)
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %38)
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 8 dereferenceable(24) %14)
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %15)
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  call void @llvm.lifetime.start.p0(i64 72, ptr %17) #6
  call void @_ZN7R3TriadC1ERK8R3VectorS2_S2_(ptr noundef nonnull align 8 dereferenceable(72) %17, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %14)
  call void @llvm.lifetime.start.p0(i64 96, ptr %18) #6
  call void @_ZN13R3CoordSystemC1ERK7R3PointRK7R3Triad(ptr noundef nonnull align 8 dereferenceable(96) %18, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(72) %17)
  %40 = getelementptr inbounds %class.R3PlanarGrid, ptr %28, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 128, ptr %19) #6
  call void @_ZNK13R3CoordSystem13InverseMatrixEv(ptr dead_on_unwind writable sret(%class.R4Matrix) align 8 %19, ptr noundef nonnull align 8 dereferenceable(96) %18)
  call void @_ZN8R3Affine5ResetERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272) %40, ptr noundef nonnull align 8 dereferenceable(128) %19, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 128, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #6
  call void @_ZN5R2BoxC1ERKS_(ptr noundef nonnull align 8 dereferenceable(40) %20, ptr noundef nonnull align 8 dereferenceable(40) @R2null_box)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %41

41:                                               ; preds = %59, %6
  %42 = load i32, ptr %21, align 4, !tbaa !11
  %43 = icmp slt i32 %42, 8
  br i1 %43, label %45, label %44

44:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %71

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = load i32, ptr %21, align 4, !tbaa !11
  invoke void @_ZNK5R3Box6CornerEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %22, ptr noundef nonnull align 8 dereferenceable(56) %46, i32 noundef %47)
          to label %48 unwind label %62

48:                                               ; preds = %45
  %49 = getelementptr inbounds %class.R3PlanarGrid, ptr %28, i32 0, i32 1
  invoke void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %50 unwind label %62

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #6
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %22, i32 noundef 0)
          to label %52 unwind label %66

52:                                               ; preds = %50
  %53 = load double, ptr %51, align 8, !tbaa !9
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %22, i32 noundef 1)
          to label %55 unwind label %66

55:                                               ; preds = %52
  %56 = load double, ptr %54, align 8, !tbaa !9
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %25, double noundef %53, double noundef %56)
          to label %57 unwind label %66

57:                                               ; preds = %55
  invoke void @_ZN5R2Box5UnionERK7R2Point(ptr noundef nonnull align 8 dereferenceable(40) %20, ptr noundef nonnull align 8 dereferenceable(16) %25)
          to label %58 unwind label %66

58:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %21, align 4, !tbaa !11
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %21, align 4, !tbaa !11
  br label %41, !llvm.loop !13

62:                                               ; preds = %48, %45
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %23, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %24, align 4
  br label %70

66:                                               ; preds = %57, %55, %52, %50
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %23, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  br label %70

70:                                               ; preds = %66, %62
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %107

71:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %72 = invoke noundef double @_ZNK5R2Box7XLengthEv(ptr noundef nonnull align 8 dereferenceable(40) %20)
          to label %73 unwind label %87

73:                                               ; preds = %71
  %74 = load double, ptr %12, align 8, !tbaa !9
  %75 = fdiv double %72, %74
  %76 = fadd double %75, 5.000000e-01
  %77 = fptosi double %76 to i32
  store i32 %77, ptr %26, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %78 = invoke noundef double @_ZNK5R2Box7YLengthEv(ptr noundef nonnull align 8 dereferenceable(40) %20)
          to label %79 unwind label %91

79:                                               ; preds = %73
  %80 = load double, ptr %12, align 8, !tbaa !9
  %81 = fdiv double %78, %80
  %82 = fadd double %81, 5.000000e-01
  %83 = fptosi double %82 to i32
  store i32 %83, ptr %27, align 4, !tbaa !11
  %84 = load i32, ptr %26, align 4, !tbaa !11
  %85 = icmp slt i32 %84, 2
  br i1 %85, label %86, label %95

86:                                               ; preds = %79
  store i32 2, ptr %26, align 4, !tbaa !11
  br label %95

87:                                               ; preds = %71
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %23, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %24, align 4
  br label %106

91:                                               ; preds = %103, %99, %73
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %23, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %106

95:                                               ; preds = %86, %79
  %96 = load i32, ptr %27, align 4, !tbaa !11
  %97 = icmp slt i32 %96, 2
  br i1 %97, label %98, label %99

98:                                               ; preds = %95
  store i32 2, ptr %27, align 4, !tbaa !11
  br label %99

99:                                               ; preds = %98, %95
  %100 = getelementptr inbounds %class.R3PlanarGrid, ptr %28, i32 0, i32 2
  %101 = load i32, ptr %26, align 4, !tbaa !11
  %102 = load i32, ptr %27, align 4, !tbaa !11
  invoke void @_ZN6R2Grid8ResampleEii(ptr noundef nonnull align 8 dereferenceable(208) %100, i32 noundef %101, i32 noundef %102)
          to label %103 unwind label %91

103:                                              ; preds = %99
  %104 = getelementptr inbounds %class.R3PlanarGrid, ptr %28, i32 0, i32 2
  invoke void @_ZN6R2Grid28SetWorldToGridTransformationERK5R2Box(ptr noundef nonnull align 8 dereferenceable(208) %104, ptr noundef nonnull align 8 dereferenceable(40) %20)
          to label %105 unwind label %91

105:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @_ZN7R2SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  ret void

106:                                              ; preds = %91, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %107

107:                                              ; preds = %106, %70
  call void @_ZN7R2SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %23, align 8
  %110 = load i32, ptr %24, align 4
  %111 = insertvalue { ptr, i32 } poison, ptr %109, 0
  %112 = insertvalue { ptr, i32 } %111, i32 %110, 1
  resume { ptr, i32 } %112
}

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

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

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

declare void @_ZN7R3Point7ProjectERK7R3Plane(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) #3

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

declare void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

declare void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #3

declare void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3

declare void @_ZN7R3TriadC1ERK8R3VectorS2_S2_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

declare void @_ZN13R3CoordSystemC1ERK7R3PointRK7R3Triad(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #3

declare void @_ZN8R3Affine5ResetERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #3

declare void @_ZNK13R3CoordSystem13InverseMatrixEv(ptr dead_on_unwind writable sret(%class.R4Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(96)) #3

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

declare void @_ZN5R2BoxC1ERKS_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3

declare void @_ZNK5R3Box6CornerEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #3

declare void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #3

declare void @_ZN5R2Box5UnionERK7R2Point(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

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

declare void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK5R2Box7XLengthEv(ptr noundef nonnull align 8 dereferenceable(40)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK5R2Box7YLengthEv(ptr noundef nonnull align 8 dereferenceable(40)) #1 align 2

declare void @_ZN6R2Grid8ResampleEii(ptr noundef nonnull align 8 dereferenceable(208), i32 noundef, i32 noundef) #3

declare void @_ZN6R2Grid28SetWorldToGridTransformationERK5R2Box(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(40)) #3

; Function Attrs: nounwind
declare void @_ZN7R2SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

declare void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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.R2Box = type { %class.R2Solid, %class.R2Point, %class.R2Point }
%class.R2Solid = type { %class.R2Shape }
%class.R2Shape = type { ptr }
%class.R2Point = type { [2 x double] }
%class.R3Point = type { [3 x double] }
%class.R3Vector = type { [3 x double] }
%class.R3Triad = type { [3 x %class.R3Vector] }
%class.R3CoordSystem = type { %class.R3Point, %class.R3Triad }
%class.R4Matrix = type { [4 x [4 x double]] }

@R2null_box = external global %class.R2Box, align 8

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12R3PlanarGrid5ResetERK7R3PlaneRK5R3BoxRK7R3PointRK8R3Vectord(ptr noundef nonnull align 8 dereferenceable(572) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, double noundef %5) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %class.R3Point, align 8
  %8 = alloca %class.R3Vector, align 8
  %9 = alloca %class.R3Vector, align 8
  %10 = alloca %class.R3Vector, align 8
  %11 = alloca %class.R3Triad, align 8
  %12 = alloca %class.R3CoordSystem, align 8
  %13 = alloca %class.R4Matrix, align 8
  %14 = alloca %class.R2Box, align 8
  %15 = alloca %class.R3Point, align 8
  %16 = alloca %class.R2Point, align 8
  %17 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN7R3PlaneaSERKS_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1)
  %18 = getelementptr inbounds i8, ptr %0, i64 512
  %19 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZN5R3BoxaSERKS_(ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull align 8 dereferenceable(56) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %3)
  call void @_ZN7R3Point7ProjectERK7R3Plane(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  %20 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7R3Plane6NormalEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %20)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #7
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %9)
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %11) #7
  call void @_ZN7R3TriadC1ERK8R3VectorS2_S2_(ptr noundef nonnull align 8 dereferenceable(72) %11, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %12) #7
  call void @_ZN13R3CoordSystemC1ERK7R3PointRK7R3Triad(ptr noundef nonnull align 8 dereferenceable(96) %12, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(72) %11)
  %21 = getelementptr inbounds i8, ptr %0, i64 32
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %13) #7
  call void @_ZNK13R3CoordSystem13InverseMatrixEv(ptr dead_on_unwind nonnull writable sret(%class.R4Matrix) align 8 %13, ptr noundef nonnull align 8 dereferenceable(96) %12)
  call void @_ZN8R3Affine5ResetERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272) %21, ptr noundef nonnull align 8 dereferenceable(128) %13, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #7
  call void @_ZN5R2BoxC1ERKS_(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(40) @R2null_box)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  invoke void @_ZNK5R3Box6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef 0)
          to label %22 unwind label %103

22:                                               ; preds = %6
  invoke void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %23 unwind label %103

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 0)
          to label %25 unwind label %105

25:                                               ; preds = %23
  %26 = load double, ptr %24, align 8, !tbaa !5
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 1)
          to label %28 unwind label %105

28:                                               ; preds = %25
  %29 = load double, ptr %27, align 8, !tbaa !5
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %16, double noundef %26, double noundef %29)
          to label %30 unwind label %105

30:                                               ; preds = %28
  invoke void @_ZN5R2Box5UnionERK7R2Point(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %31 unwind label %105

31:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  invoke void @_ZNK5R3Box6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef 1)
          to label %32 unwind label %103

32:                                               ; preds = %31
  invoke void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %33 unwind label %103

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 0)
          to label %35 unwind label %105

35:                                               ; preds = %33
  %36 = load double, ptr %34, align 8, !tbaa !5
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 1)
          to label %38 unwind label %105

38:                                               ; preds = %35
  %39 = load double, ptr %37, align 8, !tbaa !5
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %16, double noundef %36, double noundef %39)
          to label %40 unwind label %105

40:                                               ; preds = %38
  invoke void @_ZN5R2Box5UnionERK7R2Point(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %41 unwind label %105

41:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  invoke void @_ZNK5R3Box6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef 2)
          to label %42 unwind label %103

42:                                               ; preds = %41
  invoke void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %43 unwind label %103

43:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 0)
          to label %45 unwind label %105

45:                                               ; preds = %43
  %46 = load double, ptr %44, align 8, !tbaa !5
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 1)
          to label %48 unwind label %105

48:                                               ; preds = %45
  %49 = load double, ptr %47, align 8, !tbaa !5
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %16, double noundef %46, double noundef %49)
          to label %50 unwind label %105

50:                                               ; preds = %48
  invoke void @_ZN5R2Box5UnionERK7R2Point(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %51 unwind label %105

51:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  invoke void @_ZNK5R3Box6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef 3)
          to label %52 unwind label %103

52:                                               ; preds = %51
  invoke void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %53 unwind label %103

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 0)
          to label %55 unwind label %105

55:                                               ; preds = %53
  %56 = load double, ptr %54, align 8, !tbaa !5
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 1)
          to label %58 unwind label %105

58:                                               ; preds = %55
  %59 = load double, ptr %57, align 8, !tbaa !5
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %16, double noundef %56, double noundef %59)
          to label %60 unwind label %105

60:                                               ; preds = %58
  invoke void @_ZN5R2Box5UnionERK7R2Point(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %61 unwind label %105

61:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  invoke void @_ZNK5R3Box6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef 4)
          to label %62 unwind label %103

62:                                               ; preds = %61
  invoke void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %63 unwind label %103

63:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 0)
          to label %65 unwind label %105

65:                                               ; preds = %63
  %66 = load double, ptr %64, align 8, !tbaa !5
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 1)
          to label %68 unwind label %105

68:                                               ; preds = %65
  %69 = load double, ptr %67, align 8, !tbaa !5
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %16, double noundef %66, double noundef %69)
          to label %70 unwind label %105

70:                                               ; preds = %68
  invoke void @_ZN5R2Box5UnionERK7R2Point(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %71 unwind label %105

71:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  invoke void @_ZNK5R3Box6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef 5)
          to label %72 unwind label %103

72:                                               ; preds = %71
  invoke void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %73 unwind label %103

73:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 0)
          to label %75 unwind label %105

75:                                               ; preds = %73
  %76 = load double, ptr %74, align 8, !tbaa !5
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 1)
          to label %78 unwind label %105

78:                                               ; preds = %75
  %79 = load double, ptr %77, align 8, !tbaa !5
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %16, double noundef %76, double noundef %79)
          to label %80 unwind label %105

80:                                               ; preds = %78
  invoke void @_ZN5R2Box5UnionERK7R2Point(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %81 unwind label %105

81:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  invoke void @_ZNK5R3Box6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef 6)
          to label %82 unwind label %103

82:                                               ; preds = %81
  invoke void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %83 unwind label %103

83:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 0)
          to label %85 unwind label %105

85:                                               ; preds = %83
  %86 = load double, ptr %84, align 8, !tbaa !5
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 1)
          to label %88 unwind label %105

88:                                               ; preds = %85
  %89 = load double, ptr %87, align 8, !tbaa !5
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %16, double noundef %86, double noundef %89)
          to label %90 unwind label %105

90:                                               ; preds = %88
  invoke void @_ZN5R2Box5UnionERK7R2Point(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %91 unwind label %105

91:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  invoke void @_ZNK5R3Box6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef 7)
          to label %92 unwind label %103

92:                                               ; preds = %91
  invoke void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %93 unwind label %103

93:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 0)
          to label %95 unwind label %105

95:                                               ; preds = %93
  %96 = load double, ptr %94, align 8, !tbaa !5
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 1)
          to label %98 unwind label %105

98:                                               ; preds = %95
  %99 = load double, ptr %97, align 8, !tbaa !5
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %16, double noundef %96, double noundef %99)
          to label %100 unwind label %105

100:                                              ; preds = %98
  invoke void @_ZN5R2Box5UnionERK7R2Point(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %101 unwind label %105

101:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  %102 = invoke noundef double @_ZNK5R2Box7XLengthEv(ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %108 unwind label %118

103:                                              ; preds = %92, %91, %82, %81, %72, %71, %62, %61, %52, %51, %42, %41, %32, %31, %22, %6
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %107

105:                                              ; preds = %100, %98, %95, %93, %90, %88, %85, %83, %80, %78, %75, %73, %70, %68, %65, %63, %60, %58, %55, %53, %50, %48, %45, %43, %40, %38, %35, %33, %30, %28, %25, %23
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  br label %107

107:                                              ; preds = %105, %103
  %.pn24 = phi { ptr, i32 } [ %106, %105 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  br label %124

108:                                              ; preds = %101
  %109 = invoke noundef double @_ZNK5R2Box7YLengthEv(ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %110 unwind label %120

110:                                              ; preds = %108
  %111 = fdiv double %102, %5
  %112 = fadd double %111, 5.000000e-01
  %113 = fptosi double %112 to i32
  %114 = fdiv double %109, %5
  %115 = fadd double %114, 5.000000e-01
  %116 = fptosi double %115 to i32
  %spec.store.select = call i32 @llvm.smax.i32(i32 %113, i32 2)
  %spec.store.select1 = call i32 @llvm.smax.i32(i32 %116, i32 2)
  %117 = getelementptr inbounds i8, ptr %0, i64 304
  invoke void @_ZN6R2Grid8ResampleEii(ptr noundef nonnull align 8 dereferenceable(208) %117, i32 noundef %spec.store.select, i32 noundef %spec.store.select1)
          to label %122 unwind label %120

118:                                              ; preds = %101
  %119 = landingpad { ptr, i32 }
          cleanup
  br label %124

120:                                              ; preds = %122, %110, %108
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %124

122:                                              ; preds = %110
  invoke void @_ZN6R2Grid28SetWorldToGridTransformationERK5R2Box(ptr noundef nonnull align 8 dereferenceable(208) %117, ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %123 unwind label %120

123:                                              ; preds = %122
  call void @_ZN7R2SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  ret void

124:                                              ; preds = %118, %120, %107
  %.pn24.pn = phi { ptr, i32 } [ %.pn24, %107 ], [ %121, %120 ], [ %119, %118 ]
  call void @_ZN7R2SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  resume { ptr, i32 } %.pn24.pn
}

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

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

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

declare void @_ZN7R3Point7ProjectERK7R3Plane(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7R3Plane6NormalEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

declare void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

declare void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

declare void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

declare void @_ZN7R3TriadC1ERK8R3VectorS2_S2_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

declare void @_ZN13R3CoordSystemC1ERK7R3PointRK7R3Triad(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #3

declare void @_ZN8R3Affine5ResetERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #3

declare void @_ZNK13R3CoordSystem13InverseMatrixEv(ptr dead_on_unwind writable sret(%class.R4Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #3

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

declare void @_ZN5R2BoxC1ERKS_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3

declare void @_ZNK5R3Box6CornerEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #3

declare void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

declare void @_ZN5R2Box5UnionERK7R2Point(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

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

declare void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK5R2Box7XLengthEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK5R2Box7YLengthEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

declare void @_ZN6R2Grid8ResampleEii(ptr noundef nonnull align 8 dereferenceable(208), i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @_ZN6R2Grid28SetWorldToGridTransformationERK5R2Box(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN7R2SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

declare void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #6

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,SROAPass,SimplifyCFGPass,TailCallElimPass