; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R2Shapes/R2Polygon.ll (ZNK9R2Polygon7TangentEid)

; 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.R2Line = type { %class.R2Vector, %class.R2Vector, double }
%class.R2Vector = type { [2 x double] }
%class.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.R2Point = type { [2 x double] }
%class.R2Diad = type { [2 x %class.R2Vector] }
%class.R2Polygon = type <{ %class.R2Solid, ptr, i32, [4 x i8], %class.R2Box, i32, [4 x i8] }>
%class.R2Solid = type { %class.R2Shape }
%class.R2Shape = type { ptr }
%class.R2Box = type { %class.R2Solid, %class.R2Point, %class.R2Point }

@R2null_line = external global %class.R2Line, align 8

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

declare noundef double @_Z10R2DistanceRK7R2PointS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1

declare void @_ZN8R2VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1

declare void @_ZmiRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Vector) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1

declare void @_ZngRK8R2Vector(ptr dead_on_unwind writable sret(%class.R2Vector) align 8, ptr noundef nonnull align 8 dereferenceable(16)) #1

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZN8R2VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9R2Polygon7TangentEid(ptr dead_on_unwind noalias writable sret(%class.R2Line) align 8 %0, ptr noundef nonnull align 8 dereferenceable(68) %1, i32 noundef %2, double noundef %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca %class.RNArray, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca %class.R2Point, align 8
  %20 = alloca %class.R2Diad, align 8
  %21 = alloca %class.R2Vector, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca %class.R2Vector, align 8
  %25 = alloca %class.R2Vector, align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store double %3, ptr %8, align 8, !tbaa !11
  %26 = load ptr, ptr %6, align 8
  %27 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 2
  %28 = load i32, ptr %27, align 8, !tbaa !13
  %29 = icmp slt i32 %28, 3
  br i1 %29, label %30, label %31

30:                                               ; preds = %4
  call void @_ZN6R2LineC1ERKS_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(40) @R2null_line)
  br label %225

31:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  call void @_ZN7RNArrayIP7R2PointEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %32 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 1
  %33 = load ptr, ptr %32, align 8, !tbaa !19
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds %class.R2Point, ptr %33, i64 %35
  %37 = invoke noundef ptr @_ZN7RNArrayIP7R2PointE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %36)
          to label %38 unwind label %51

38:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store double 0.000000e+00, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %39 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 1
  %40 = load ptr, ptr %39, align 8, !tbaa !19
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds %class.R2Point, ptr %40, i64 %42
  store ptr %43, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 1, ptr %14, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %91, %38
  %45 = load i32, ptr %14, align 4, !tbaa !9
  %46 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 2
  %47 = load i32, ptr %46, align 8, !tbaa !13
  %48 = sdiv i32 %47, 3
  %49 = icmp slt i32 %45, %48
  br i1 %49, label %55, label %50

50:                                               ; preds = %44
  store i32 2, ptr %15, align 4
  br label %94

51:                                               ; preds = %31
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %10, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %11, align 4
  br label %224

55:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %56 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 1
  %57 = load ptr, ptr %56, align 8, !tbaa !19
  %58 = load i32, ptr %7, align 4, !tbaa !9
  %59 = load i32, ptr %14, align 4, !tbaa !9
  %60 = sub nsw i32 %58, %59
  %61 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 2
  %62 = load i32, ptr %61, align 8, !tbaa !13
  %63 = add nsw i32 %60, %62
  %64 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 2
  %65 = load i32, ptr %64, align 8, !tbaa !13
  %66 = srem i32 %63, %65
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds %class.R2Point, ptr %57, i64 %67
  store ptr %68, ptr %16, align 8, !tbaa !5
  %69 = load ptr, ptr %16, align 8, !tbaa !5
  %70 = invoke noundef ptr @_ZN7RNArrayIP7R2PointE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %69)
          to label %71 unwind label %82

71:                                               ; preds = %55
  %72 = load ptr, ptr %16, align 8, !tbaa !5
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = invoke noundef double @_Z10R2DistanceRK7R2PointS1_(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef nonnull align 8 dereferenceable(16) %73)
          to label %75 unwind label %82

75:                                               ; preds = %71
  %76 = load double, ptr %12, align 8, !tbaa !11
  %77 = fadd double %76, %74
  store double %77, ptr %12, align 8, !tbaa !11
  %78 = load double, ptr %12, align 8, !tbaa !11
  %79 = load double, ptr %8, align 8, !tbaa !11
  %80 = fcmp oge double %78, %79
  br i1 %80, label %81, label %86

81:                                               ; preds = %75
  store i32 2, ptr %15, align 4
  br label %88

82:                                               ; preds = %71, %55
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %10, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %223

86:                                               ; preds = %75
  %87 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %87, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %15, align 4
  br label %88

88:                                               ; preds = %86, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %89 = load i32, ptr %15, align 4
  switch i32 %89, label %94 [
    i32 0, label %90
  ]

90:                                               ; preds = %88
  br label %91

91:                                               ; preds = %90
  %92 = load i32, ptr %14, align 4, !tbaa !9
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %14, align 4, !tbaa !9
  br label %44, !llvm.loop !20

94:                                               ; preds = %88, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %95

95:                                               ; preds = %94
  store double 0.000000e+00, ptr %12, align 8, !tbaa !11
  %96 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 1
  %97 = load ptr, ptr %96, align 8, !tbaa !19
  %98 = load i32, ptr %7, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds %class.R2Point, ptr %97, i64 %99
  store ptr %100, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %141, %95
  %102 = load i32, ptr %17, align 4, !tbaa !9
  %103 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 2
  %104 = load i32, ptr %103, align 8, !tbaa !13
  %105 = sdiv i32 %104, 3
  %106 = icmp slt i32 %102, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %101
  store i32 5, ptr %15, align 4
  br label %144

108:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %109 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 1
  %110 = load ptr, ptr %109, align 8, !tbaa !19
  %111 = load i32, ptr %7, align 4, !tbaa !9
  %112 = load i32, ptr %17, align 4, !tbaa !9
  %113 = add nsw i32 %111, %112
  %114 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 2
  %115 = load i32, ptr %114, align 8, !tbaa !13
  %116 = srem i32 %113, %115
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds %class.R2Point, ptr %110, i64 %117
  store ptr %118, ptr %18, align 8, !tbaa !5
  %119 = load ptr, ptr %18, align 8, !tbaa !5
  %120 = invoke noundef ptr @_ZN7RNArrayIP7R2PointE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %119)
          to label %121 unwind label %132

121:                                              ; preds = %108
  %122 = load ptr, ptr %18, align 8, !tbaa !5
  %123 = load ptr, ptr %13, align 8, !tbaa !5
  %124 = invoke noundef double @_Z10R2DistanceRK7R2PointS1_(ptr noundef nonnull align 8 dereferenceable(16) %122, ptr noundef nonnull align 8 dereferenceable(16) %123)
          to label %125 unwind label %132

125:                                              ; preds = %121
  %126 = load double, ptr %12, align 8, !tbaa !11
  %127 = fadd double %126, %124
  store double %127, ptr %12, align 8, !tbaa !11
  %128 = load double, ptr %12, align 8, !tbaa !11
  %129 = load double, ptr %8, align 8, !tbaa !11
  %130 = fcmp oge double %128, %129
  br i1 %130, label %131, label %136

131:                                              ; preds = %125
  store i32 5, ptr %15, align 4
  br label %138

132:                                              ; preds = %121, %108
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %10, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %223

136:                                              ; preds = %125
  %137 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %137, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %15, align 4
  br label %138

138:                                              ; preds = %136, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %139 = load i32, ptr %15, align 4
  switch i32 %139, label %144 [
    i32 0, label %140
  ]

140:                                              ; preds = %138
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %17, align 4, !tbaa !9
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %17, align 4, !tbaa !9
  br label %101, !llvm.loop !22

144:                                              ; preds = %138, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %145

145:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  invoke void @_Z10R2CentroidRK7RNArrayIP7R2PointEPKd(ptr dead_on_unwind writable sret(%class.R2Point) align 8 %19, ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef null)
          to label %146 unwind label %180

146:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #5
  invoke void @_Z15R2PrincipleAxesRK7R2PointRK7RNArrayIPS_EPKdPd(ptr dead_on_unwind writable sret(%class.R2Diad) align 8 %20, ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef null, ptr noundef null)
          to label %147 unwind label %184

147:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  %148 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Diad4AxisEi(ptr noundef nonnull align 8 dereferenceable(32) %20, i32 noundef 0)
          to label %149 unwind label %188

149:                                              ; preds = %147
  invoke void @_ZN8R2VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %148)
          to label %150 unwind label %188

150:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %151 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 1
  %152 = load ptr, ptr %151, align 8, !tbaa !19
  %153 = load i32, ptr %7, align 4, !tbaa !9
  %154 = sub nsw i32 %153, 1
  %155 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 2
  %156 = load i32, ptr %155, align 8, !tbaa !13
  %157 = add nsw i32 %154, %156
  %158 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 2
  %159 = load i32, ptr %158, align 8, !tbaa !13
  %160 = srem i32 %157, %159
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds %class.R2Point, ptr %152, i64 %161
  store ptr %162, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %163 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 1
  %164 = load ptr, ptr %163, align 8, !tbaa !19
  %165 = load i32, ptr %7, align 4, !tbaa !9
  %166 = add nsw i32 %165, 1
  %167 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 2
  %168 = load i32, ptr %167, align 8, !tbaa !13
  %169 = srem i32 %166, %168
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds %class.R2Point, ptr %164, i64 %170
  store ptr %171, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #5
  %172 = load ptr, ptr %23, align 8, !tbaa !5
  %173 = load ptr, ptr %22, align 8, !tbaa !5
  invoke void @_ZmiRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Vector) align 8 %24, ptr noundef nonnull align 8 dereferenceable(16) %172, ptr noundef nonnull align 8 dereferenceable(16) %173)
          to label %174 unwind label %192

174:                                              ; preds = %150
  %175 = invoke noundef double @_ZNK8R2Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %24)
          to label %176 unwind label %192

176:                                              ; preds = %174
  %177 = fcmp olt double %175, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  br i1 %177, label %178, label %200

178:                                              ; preds = %176
  invoke void @_ZN8R2Vector4FlipEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %179 unwind label %196

179:                                              ; preds = %178
  br label %200

180:                                              ; preds = %145
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %10, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %11, align 4
  br label %222

184:                                              ; preds = %146
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %10, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %11, align 4
  br label %221

188:                                              ; preds = %149, %147
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %10, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %11, align 4
  br label %220

192:                                              ; preds = %174, %150
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %10, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  br label %219

196:                                              ; preds = %212, %178
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %10, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %11, align 4
  br label %219

200:                                              ; preds = %179, %176
  %201 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 5
  %202 = load i32, ptr %201, align 8, !tbaa !23
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %212

204:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  invoke void @_ZngRK8R2Vector(ptr dead_on_unwind writable sret(%class.R2Vector) align 8 %25, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %205 unwind label %208

205:                                              ; preds = %204
  %206 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8R2VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %25)
          to label %207 unwind label %208

207:                                              ; preds = %205
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  br label %212

208:                                              ; preds = %205, %204
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %10, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  br label %219

212:                                              ; preds = %207, %200
  %213 = getelementptr inbounds %class.R2Polygon, ptr %26, i32 0, i32 1
  %214 = load ptr, ptr %213, align 8, !tbaa !19
  %215 = load i32, ptr %7, align 4, !tbaa !9
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds %class.R2Point, ptr %214, i64 %216
  invoke void @_ZN6R2LineC1ERK7R2PointRK8R2Vectori(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(16) %217, ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef 0)
          to label %218 unwind label %196

218:                                              ; preds = %212
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  br label %225

219:                                              ; preds = %208, %196, %192
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %220

220:                                              ; preds = %219, %188
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br label %221

221:                                              ; preds = %220, %184
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  br label %222

222:                                              ; preds = %221, %180
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  br label %223

223:                                              ; preds = %222, %132, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %224

224:                                              ; preds = %223, %51
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  br label %226

225:                                              ; preds = %218, %30
  ret void

226:                                              ; preds = %224
  %227 = load ptr, ptr %10, align 8
  %228 = load i32, ptr %11, align 4
  %229 = insertvalue { ptr, i32 } poison, ptr %227, 0
  %230 = insertvalue { ptr, i32 } %229, i32 %228, 1
  resume { ptr, i32 } %230
}

declare void @_ZN6R2LineC1ERKS_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7RNArrayIP7R2PointEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

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

declare void @_Z10R2CentroidRK7RNArrayIP7R2PointEPKd(ptr dead_on_unwind writable sret(%class.R2Point) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #1

declare void @_Z15R2PrincipleAxesRK7R2PointRK7RNArrayIPS_EPKdPd(ptr dead_on_unwind writable sret(%class.R2Diad) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Diad4AxisEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #3 align 2

declare noundef double @_ZNK8R2Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1

declare void @_ZN8R2Vector4FlipEv(ptr noundef nonnull align 8 dereferenceable(16)) #1

declare void @_ZN6R2LineC1ERK7R2PointRK8R2Vectori(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

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

!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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 16}
!14 = !{!"_ZTS9R2Polygon", !15, i64 0, !6, i64 8, !10, i64 16, !17, i64 24, !10, i64 64}
!15 = !{!"_ZTS7R2Solid", !16, i64 0}
!16 = !{!"_ZTS7R2Shape"}
!17 = !{!"_ZTS5R2Box", !15, i64 0, !18, i64 8, !18, i64 24}
!18 = !{!"_ZTS7R2Point", !7, i64 0}
!19 = !{!14, !6, i64 8}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = !{!14, !10, i64 64}


; 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.R2Line = type { %class.R2Vector, %class.R2Vector, double }
%class.R2Vector = type { [2 x double] }
%class.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.R2Point = type { [2 x double] }
%class.R2Diad = type { [2 x %class.R2Vector] }

@R2null_line = external global %class.R2Line, align 8

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

declare noundef double @_Z10R2DistanceRK7R2PointS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

declare void @_ZN8R2VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1

declare void @_ZmiRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Vector) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

declare void @_ZngRK8R2Vector(ptr dead_on_unwind writable sret(%class.R2Vector) align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZN8R2VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9R2Polygon7TangentEid(ptr dead_on_unwind noalias writable sret(%class.R2Line) align 8 %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(68) %1, i32 noundef %2, double noundef %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.RNArray, align 8
  %6 = alloca %class.R2Point, align 8
  %7 = alloca %class.R2Diad, align 8
  %8 = alloca %class.R2Vector, align 8
  %9 = alloca %class.R2Vector, align 8
  %10 = alloca %class.R2Vector, align 8
  %11 = getelementptr inbounds i8, ptr %1, i64 16
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = icmp slt i32 %12, 3
  br i1 %13, label %14, label %15

14:                                               ; preds = %4
  tail call void @_ZN6R2LineC1ERKS_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(40) @R2null_line)
  br label %116

15:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @_ZN7RNArrayIP7R2PointEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %16 = getelementptr inbounds i8, ptr %1, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !15
  %18 = sext i32 %2 to i64
  %19 = getelementptr inbounds %class.R2Point, ptr %17, i64 %18
  %20 = invoke noundef ptr @_ZN7RNArrayIP7R2PointE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %19)
          to label %21 unwind label %30

21:                                               ; preds = %15
  %22 = load i32, ptr %11, align 8, !tbaa !5
  %23 = icmp sgt i32 %22, 5
  br i1 %23, label %.lr.ph.preheader, label %._crit_edge66

.lr.ph.preheader:                                 ; preds = %21
  %24 = load ptr, ptr %16, align 8, !tbaa !15
  %25 = getelementptr inbounds %class.R2Point, ptr %24, i64 %18
  br label %.lr.ph

26:                                               ; preds = %42
  %27 = add nuw nsw i32 %.05057, 1
  %28 = sdiv i32 %.pre68.pre, 3
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !16

30:                                               ; preds = %15
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %115

.lr.ph:                                           ; preds = %.lr.ph.preheader, %26
  %32 = phi i32 [ %.pre68.pre, %26 ], [ %22, %.lr.ph.preheader ]
  %.04159 = phi double [ %43, %26 ], [ 0.000000e+00, %.lr.ph.preheader ]
  %.04458 = phi ptr [ %38, %26 ], [ %25, %.lr.ph.preheader ]
  %.05057 = phi i32 [ %27, %26 ], [ 1, %.lr.ph.preheader ]
  %33 = load ptr, ptr %16, align 8, !tbaa !15
  %34 = sub i32 %2, %.05057
  %35 = add nsw i32 %34, %32
  %36 = srem i32 %35, %32
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds %class.R2Point, ptr %33, i64 %37
  %39 = invoke noundef ptr @_ZN7RNArrayIP7R2PointE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %38)
          to label %40 unwind label %45

40:                                               ; preds = %.lr.ph
  %41 = invoke noundef double @_Z10R2DistanceRK7R2PointS1_(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(16) %.04458)
          to label %42 unwind label %45

42:                                               ; preds = %40
  %43 = fadd double %.04159, %41
  %44 = fcmp ult double %43, %3
  %.pre68.pre = load i32, ptr %11, align 8, !tbaa !5
  br i1 %44, label %26, label %._crit_edge

45:                                               ; preds = %40, %.lr.ph
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %115

._crit_edge:                                      ; preds = %42, %26
  %47 = icmp sgt i32 %.pre68.pre, 5
  br i1 %47, label %.lr.ph65.preheader, label %._crit_edge66

.lr.ph65.preheader:                               ; preds = %._crit_edge
  %.pre = load ptr, ptr %16, align 8, !tbaa !15
  %48 = getelementptr inbounds %class.R2Point, ptr %.pre, i64 %18
  br label %.lr.ph65

49:                                               ; preds = %63
  %50 = add nuw nsw i32 %.04362, 1
  %51 = load i32, ptr %11, align 8, !tbaa !5
  %52 = sdiv i32 %51, 3
  %53 = icmp slt i32 %50, %52
  br i1 %53, label %.lr.ph65, label %._crit_edge66, !llvm.loop !18

.lr.ph65:                                         ; preds = %.lr.ph65.preheader, %49
  %54 = phi i32 [ %51, %49 ], [ %.pre68.pre, %.lr.ph65.preheader ]
  %.14263 = phi double [ %64, %49 ], [ 0.000000e+00, %.lr.ph65.preheader ]
  %.04362 = phi i32 [ %50, %49 ], [ 1, %.lr.ph65.preheader ]
  %.24661 = phi ptr [ %59, %49 ], [ %48, %.lr.ph65.preheader ]
  %55 = load ptr, ptr %16, align 8, !tbaa !15
  %56 = add nsw i32 %.04362, %2
  %57 = srem i32 %56, %54
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds %class.R2Point, ptr %55, i64 %58
  %60 = invoke noundef ptr @_ZN7RNArrayIP7R2PointE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %59)
          to label %61 unwind label %66

61:                                               ; preds = %.lr.ph65
  %62 = invoke noundef double @_Z10R2DistanceRK7R2PointS1_(ptr noundef nonnull align 8 dereferenceable(16) %59, ptr noundef nonnull align 8 dereferenceable(16) %.24661)
          to label %63 unwind label %66

63:                                               ; preds = %61
  %64 = fadd double %.14263, %62
  %65 = fcmp ult double %64, %3
  br i1 %65, label %49, label %._crit_edge66

66:                                               ; preds = %61, %.lr.ph65
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %115

._crit_edge66:                                    ; preds = %63, %49, %21, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  invoke void @_Z10R2CentroidRK7RNArrayIP7R2PointEPKd(ptr dead_on_unwind nonnull writable sret(%class.R2Point) align 8 %6, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef null)
          to label %68 unwind label %89

68:                                               ; preds = %._crit_edge66
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  invoke void @_Z15R2PrincipleAxesRK7R2PointRK7RNArrayIPS_EPKdPd(ptr dead_on_unwind nonnull writable sret(%class.R2Diad) align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef null, ptr noundef null)
          to label %69 unwind label %91

69:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %70 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Diad4AxisEi(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef 0)
          to label %71 unwind label %93

71:                                               ; preds = %69
  invoke void @_ZN8R2VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %70)
          to label %72 unwind label %93

72:                                               ; preds = %71
  %73 = load ptr, ptr %16, align 8, !tbaa !15
  %74 = add nsw i32 %2, -1
  %75 = load i32, ptr %11, align 8, !tbaa !5
  %76 = add nsw i32 %74, %75
  %77 = srem i32 %76, %75
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds %class.R2Point, ptr %73, i64 %78
  %80 = add nsw i32 %2, 1
  %81 = srem i32 %80, %75
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds %class.R2Point, ptr %73, i64 %82
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  invoke void @_ZmiRK7R2PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R2Vector) align 8 %9, ptr noundef nonnull align 8 dereferenceable(16) %83, ptr noundef nonnull align 8 dereferenceable(16) %79)
          to label %84 unwind label %95

84:                                               ; preds = %72
  %85 = invoke noundef double @_ZNK8R2Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %86 unwind label %95

86:                                               ; preds = %84
  %87 = fcmp olt double %85, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br i1 %87, label %88, label %99

88:                                               ; preds = %86
  invoke void @_ZN8R2Vector4FlipEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %99 unwind label %97

89:                                               ; preds = %._crit_edge66
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %114

91:                                               ; preds = %68
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %113

93:                                               ; preds = %71, %69
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %112

95:                                               ; preds = %84, %72
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br label %112

97:                                               ; preds = %108, %88
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %112

99:                                               ; preds = %88, %86
  %100 = getelementptr inbounds i8, ptr %1, i64 64
  %101 = load i32, ptr %100, align 8, !tbaa !19
  %.not = icmp eq i32 %101, 0
  br i1 %.not, label %108, label %102

102:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  invoke void @_ZngRK8R2Vector(ptr dead_on_unwind nonnull writable sret(%class.R2Vector) align 8 %10, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %103 unwind label %106

103:                                              ; preds = %102
  %104 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8R2VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %105 unwind label %106

105:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  br label %108

106:                                              ; preds = %103, %102
  %107 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  br label %112

108:                                              ; preds = %105, %99
  %109 = load ptr, ptr %16, align 8, !tbaa !15
  %110 = getelementptr inbounds %class.R2Point, ptr %109, i64 %18
  invoke void @_ZN6R2LineC1ERK7R2PointRK8R2Vectori(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(16) %110, ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef 0)
          to label %111 unwind label %97

111:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %116

112:                                              ; preds = %95, %97, %106, %93
  %.pn.pn = phi { ptr, i32 } [ %94, %93 ], [ %98, %97 ], [ %107, %106 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %113

113:                                              ; preds = %112, %91
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %112 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %114

114:                                              ; preds = %113, %89
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %113 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %115

115:                                              ; preds = %45, %66, %114, %30
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %31, %30 ], [ %.pn.pn.pn.pn, %114 ], [ %67, %66 ], [ %46, %45 ]
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn

116:                                              ; preds = %111, %14
  ret void
}

declare void @_ZN6R2LineC1ERKS_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7RNArrayIP7R2PointEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7RNArrayIP7R2PointE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #2 align 2

declare void @_Z10R2CentroidRK7RNArrayIP7R2PointEPKd(ptr dead_on_unwind writable sret(%class.R2Point) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #1

declare void @_Z15R2PrincipleAxesRK7R2PointRK7RNArrayIPS_EPKdPd(ptr dead_on_unwind writable sret(%class.R2Diad) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare noundef double @_ZNK8R2Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

declare void @_ZN8R2Vector4FlipEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

declare void @_ZN6R2LineC1ERK7R2PointRK8R2Vectori(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

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

!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, !12, i64 16}
!6 = !{!"_ZTS9R2Polygon", !7, i64 0, !9, i64 8, !12, i64 16, !13, i64 24, !12, i64 64}
!7 = !{!"_ZTS7R2Solid", !8, i64 0}
!8 = !{!"_ZTS7R2Shape"}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"int", !10, i64 0}
!13 = !{!"_ZTS5R2Box", !7, i64 0, !14, i64 8, !14, i64 24}
!14 = !{!"_ZTS7R2Point", !10, i64 0}
!15 = !{!6, !9, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!6, !12, i64 64}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass