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

; 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.R2Point = type { [2 x double] }
%class.RNFlags = type { i64 }
%class.R3Point = type { [3 x double] }
%class.R3Vector = type { [3 x double] }

@_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords = external hidden global [4 x %class.R2Point], align 16
@_ZGVZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords = external hidden global i64, align 8
@_ZZNK13R3OrientedBox4DrawE7RNFlagsE13surface_paths = external hidden global [6 x [4 x i32]], align 16
@_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path = external hidden global [16 x i32], align 16

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z11R3BeginLinev() #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24)) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9R3EndLinev() #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z14R3BeginPolygonv() #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z12R3EndPolygonv() #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z12R3LoadNormalRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(24)) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z19R3LoadTextureCoordsRK7R2Point(ptr noundef nonnull align 8 dereferenceable(16)) #1

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

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #3

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #3

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #3

declare void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK13R3OrientedBox4DrawE7RNFlags(ptr noundef nonnull align 8 dereferenceable(128) %0, i64 %1) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.RNFlags, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca [8 x %class.R3Point], align 16
  %8 = alloca %class.R3Point, align 8
  %9 = alloca %class.R3Point, align 8
  %10 = alloca %class.R3Point, align 8
  %11 = alloca %class.R3Point, align 8
  %12 = alloca %class.R3Point, align 8
  %13 = alloca %class.R3Point, align 8
  %14 = alloca %class.R3Point, align 8
  %15 = alloca %class.R3Point, align 8
  %16 = alloca %class.RNFlags, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %class.RNFlags, align 8
  %20 = alloca double, align 8
  %21 = alloca %class.R3Vector, align 8
  %22 = alloca i32, align 4
  %23 = alloca %class.RNFlags, align 8
  %24 = alloca %class.RNFlags, align 8
  %25 = alloca i32, align 4
  %26 = getelementptr inbounds %class.RNFlags, ptr %3, i32 0, i32 0
  store i64 %1, ptr %26, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  %27 = load ptr, ptr %4, align 8
  %28 = call noundef i32 @_ZNK13R3OrientedBox7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(128) %27)
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %2
  br label %147

31:                                               ; preds = %2
  %32 = load atomic i8, ptr @_ZGVZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords acquire, align 8
  %33 = icmp eq i8 %32, 0
  br i1 %33, label %34, label %42, !prof !9

34:                                               ; preds = %31
  %35 = call i32 @__cxa_guard_acquire(ptr @_ZGVZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords) #3
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %42

37:                                               ; preds = %34
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) @_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %38 unwind label %75

38:                                               ; preds = %37
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (%class.R2Point, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords, i64 1), double noundef 1.000000e+00, double noundef 0.000000e+00)
          to label %39 unwind label %75

39:                                               ; preds = %38
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (%class.R2Point, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords, i64 2), double noundef 1.000000e+00, double noundef 1.000000e+00)
          to label %40 unwind label %75

40:                                               ; preds = %39
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (%class.R2Point, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords, i64 3), double noundef 0.000000e+00, double noundef 1.000000e+00)
          to label %41 unwind label %75

41:                                               ; preds = %40
  call void @__cxa_guard_release(ptr @_ZGVZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords) #3
  br label %42

42:                                               ; preds = %41, %34, %31
  call void @llvm.lifetime.start.p0(i64 192, ptr %7) #3
  %43 = getelementptr inbounds [8 x %class.R3Point], ptr %7, i32 0, i32 0
  %44 = getelementptr inbounds %class.R3Point, ptr %43, i64 8
  br label %45

45:                                               ; preds = %45, %42
  %46 = phi ptr [ %43, %42 ], [ %47, %45 ]
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %46)
  %47 = getelementptr inbounds %class.R3Point, ptr %46, i64 1
  %48 = icmp eq ptr %47, %44
  br i1 %48, label %49, label %45

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #3
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %8, ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef 0)
  %50 = getelementptr inbounds [8 x %class.R3Point], ptr %7, i64 0, i64 0
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #3
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %9, ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef 1)
  %52 = getelementptr inbounds [8 x %class.R3Point], ptr %7, i64 0, i64 1
  %53 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %52, ptr noundef nonnull align 8 dereferenceable(24) %9)
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #3
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %10, ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef 3)
  %54 = getelementptr inbounds [8 x %class.R3Point], ptr %7, i64 0, i64 2
  %55 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 8 dereferenceable(24) %10)
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #3
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %11, ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef 2)
  %56 = getelementptr inbounds [8 x %class.R3Point], ptr %7, i64 0, i64 3
  %57 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(24) %11)
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #3
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %12, ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef 4)
  %58 = getelementptr inbounds [8 x %class.R3Point], ptr %7, i64 0, i64 4
  %59 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #3
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %13, ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef 5)
  %60 = getelementptr inbounds [8 x %class.R3Point], ptr %7, i64 0, i64 5
  %61 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %60, ptr noundef nonnull align 8 dereferenceable(24) %13)
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #3
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %14, ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef 7)
  %62 = getelementptr inbounds [8 x %class.R3Point], ptr %7, i64 0, i64 6
  %63 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 8 dereferenceable(24) %14)
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #3
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %15, ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef 6)
  %64 = getelementptr inbounds [8 x %class.R3Point], ptr %7, i64 0, i64 7
  %65 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 8 dereferenceable(24) %15)
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #3
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %16, i64 noundef 2)
  %66 = getelementptr inbounds %class.RNFlags, ptr %16, i32 0, i32 0
  %67 = load i64, ptr %66, align 8
  %68 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %67)
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %125

70:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  store i32 0, ptr %17, align 4, !tbaa !10
  br label %71

71:                                               ; preds = %121, %70
  %72 = load i32, ptr %17, align 4, !tbaa !10
  %73 = icmp slt i32 %72, 6
  br i1 %73, label %79, label %74

74:                                               ; preds = %71
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %124

75:                                               ; preds = %40, %39, %38, %37
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %5, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %6, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords) #3
  br label %148

79:                                               ; preds = %71
  call void @_Z14R3BeginPolygonv()
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %19, i64 noundef 16)
  %80 = getelementptr inbounds %class.RNFlags, ptr %19, i32 0, i32 0
  %81 = load i64, ptr %80, align 8
  %82 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %81)
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %93

84:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %85 = load i32, ptr %17, align 4, !tbaa !10
  %86 = icmp slt i32 %85, 3
  %87 = zext i1 %86 to i64
  %88 = select i1 %86, double 1.000000e+00, double -1.000000e+00
  store double %88, ptr %20, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #3
  %89 = load double, ptr %20, align 8, !tbaa !12
  %90 = load i32, ptr %17, align 4, !tbaa !10
  %91 = srem i32 %90, 3
  %92 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK13R3OrientedBox4AxisEi(ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef %91)
  call void @_ZmldRK8R3Vector(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %21, double noundef %89, ptr noundef nonnull align 8 dereferenceable(24) %92)
  call void @_Z12R3LoadNormalRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(24) %21)
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  br label %93

93:                                               ; preds = %84, %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  store i32 0, ptr %22, align 4, !tbaa !10
  br label %94

94:                                               ; preds = %117, %93
  %95 = load i32, ptr %22, align 4, !tbaa !10
  %96 = icmp slt i32 %95, 4
  br i1 %96, label %98, label %97

97:                                               ; preds = %94
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  br label %120

98:                                               ; preds = %94
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %23, i64 noundef 512)
  %99 = getelementptr inbounds %class.RNFlags, ptr %23, i32 0, i32 0
  %100 = load i64, ptr %99, align 8
  %101 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %100)
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %107

103:                                              ; preds = %98
  %104 = load i32, ptr %22, align 4, !tbaa !10
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [4 x %class.R2Point], ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords, i64 0, i64 %105
  call void @_Z19R3LoadTextureCoordsRK7R2Point(ptr noundef nonnull align 8 dereferenceable(16) %106)
  br label %107

107:                                              ; preds = %103, %98
  %108 = load i32, ptr %17, align 4, !tbaa !10
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [6 x [4 x i32]], ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE13surface_paths, i64 0, i64 %109
  %111 = load i32, ptr %22, align 4, !tbaa !10
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [4 x i32], ptr %110, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !10
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [8 x %class.R3Point], ptr %7, i64 0, i64 %115
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %116)
  br label %117

117:                                              ; preds = %107
  %118 = load i32, ptr %22, align 4, !tbaa !10
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %22, align 4, !tbaa !10
  br label %94, !llvm.loop !14

120:                                              ; preds = %97
  call void @_Z12R3EndPolygonv()
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %17, align 4, !tbaa !10
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %17, align 4, !tbaa !10
  br label %71, !llvm.loop !16

124:                                              ; preds = %74
  br label %125

125:                                              ; preds = %124, %49
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %24, i64 noundef 1)
  %126 = getelementptr inbounds %class.RNFlags, ptr %24, i32 0, i32 0
  %127 = load i64, ptr %126, align 8
  %128 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %127)
  %129 = icmp ne i32 %128, 0
  br i1 %129, label %130, label %146

130:                                              ; preds = %125
  call void @_Z11R3BeginLinev()
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  store i32 0, ptr %25, align 4, !tbaa !10
  br label %131

131:                                              ; preds = %142, %130
  %132 = load i32, ptr %25, align 4, !tbaa !10
  %133 = icmp slt i32 %132, 16
  br i1 %133, label %135, label %134

134:                                              ; preds = %131
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  br label %145

135:                                              ; preds = %131
  %136 = load i32, ptr %25, align 4, !tbaa !10
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [16 x i32], ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !10
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [8 x %class.R3Point], ptr %7, i64 0, i64 %140
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %141)
  br label %142

142:                                              ; preds = %135
  %143 = load i32, ptr %25, align 4, !tbaa !10
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %25, align 4, !tbaa !10
  br label %131, !llvm.loop !17

145:                                              ; preds = %134
  call void @_Z9R3EndLinev()
  br label %146

146:                                              ; preds = %145, %125
  call void @llvm.lifetime.end.p0(i64 192, ptr %7) #3
  br label %147

147:                                              ; preds = %146, %30
  ret void

148:                                              ; preds = %75
  %149 = load ptr, ptr %5, align 8
  %150 = load i32, ptr %6, align 4
  %151 = insertvalue { ptr, i32 } poison, ptr %149, 0
  %152 = insertvalue { ptr, i32 } %151, i32 %150, 1
  resume { ptr, i32 } %152
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind noalias writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmldRK8R3Vector(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24)) #1

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

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

!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 = !{!"branch_weights", i32 1, i32 1048575}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


; 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.R2Point = type { [2 x double] }
%class.RNFlags = type { i64 }
%class.R3Point = type { [3 x double] }
%class.R3Vector = type { [3 x double] }

@_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords = external hidden global [4 x %class.R2Point], align 16
@_ZGVZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords = external hidden global i64, align 8
@_ZZNK13R3OrientedBox4DrawE7RNFlagsE13surface_paths = external hidden local_unnamed_addr global [6 x [4 x i32]], align 16
@_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path = external hidden local_unnamed_addr global [16 x i32], align 16

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z11R3BeginLinev() local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9R3EndLinev() local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z14R3BeginPolygonv() local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z12R3EndPolygonv() local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z12R3LoadNormalRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z19R3LoadTextureCoordsRK7R2Point(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

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

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #3

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #3

declare void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK13R3OrientedBox4DrawE7RNFlags(ptr noundef nonnull align 8 dereferenceable(128) %0, i64 %1) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.RNFlags, align 8
  %4 = alloca [8 x %class.R3Point], align 16
  %5 = alloca %class.R3Point, align 8
  %6 = alloca %class.R3Point, align 8
  %7 = alloca %class.R3Point, align 8
  %8 = alloca %class.R3Point, align 8
  %9 = alloca %class.R3Point, align 8
  %10 = alloca %class.R3Point, align 8
  %11 = alloca %class.R3Point, align 8
  %12 = alloca %class.R3Point, align 8
  %13 = alloca %class.RNFlags, align 8
  %14 = alloca %class.RNFlags, align 8
  %15 = alloca %class.R3Vector, align 8
  %16 = alloca %class.RNFlags, align 8
  %17 = alloca %class.RNFlags, align 8
  store i64 %1, ptr %3, align 8
  %18 = tail call noundef i32 @_ZNK13R3OrientedBox7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  %.not = icmp eq i32 %18, 0
  br i1 %.not, label %19, label %134

19:                                               ; preds = %2
  %20 = load atomic i8, ptr @_ZGVZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords acquire, align 8
  %21 = icmp eq i8 %20, 0
  br i1 %21, label %22, label %29, !prof !5

22:                                               ; preds = %19
  %23 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords) #6
  %.not17 = icmp eq i32 %23, 0
  br i1 %.not17, label %29, label %24

24:                                               ; preds = %22
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) @_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %25 unwind label %40

25:                                               ; preds = %24
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords, i64 16), double noundef 1.000000e+00, double noundef 0.000000e+00)
          to label %26 unwind label %40

26:                                               ; preds = %25
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords, i64 32), double noundef 1.000000e+00, double noundef 1.000000e+00)
          to label %27 unwind label %40

27:                                               ; preds = %26
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords, i64 48), double noundef 0.000000e+00, double noundef 1.000000e+00)
          to label %28 unwind label %40

28:                                               ; preds = %27
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords) #6
  br label %29

29:                                               ; preds = %28, %22, %19
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %4) #6
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %.ptr.1 = getelementptr inbounds i8, ptr %4, i64 24
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %4, i64 48
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %.ptr.3 = getelementptr inbounds i8, ptr %4, i64 72
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3)
  %.ptr.4 = getelementptr inbounds i8, ptr %4, i64 96
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4)
  %.ptr.5 = getelementptr inbounds i8, ptr %4, i64 120
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5)
  %.ptr.6 = getelementptr inbounds i8, ptr %4, i64 144
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6)
  %.ptr.7 = getelementptr inbounds i8, ptr %4, i64 168
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %5, ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef 0)
  %30 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %6, ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef 1)
  %31 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %6)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %7, ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef 3)
  %32 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2, ptr noundef nonnull align 8 dereferenceable(24) %7)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %8, ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef 2)
  %33 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %9, ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef 4)
  %34 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4, ptr noundef nonnull align 8 dereferenceable(24) %9)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %10, ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef 5)
  %35 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5, ptr noundef nonnull align 8 dereferenceable(24) %10)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %11, ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef 7)
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6, ptr noundef nonnull align 8 dereferenceable(24) %11)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %12, ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef 6)
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7, ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef 2)
  %38 = load i64, ptr %13, align 8
  %39 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %38)
  %.not19 = icmp eq i32 %39, 0
  br i1 %.not19, label %.loopexit, label %.preheader

40:                                               ; preds = %27, %26, %25, %24
  %41 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_guard_abort(ptr nonnull @_ZGVZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords) #6
  resume { ptr, i32 } %41

.preheader:                                       ; preds = %29, %77
  %indvars.iv = phi i64 [ %indvars.iv.next, %77 ], [ 0, %29 ]
  call void @_Z14R3BeginPolygonv()
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef 16)
  %42 = load i64, ptr %14, align 8
  %43 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %42)
  %.not21 = icmp eq i32 %43, 0
  br i1 %.not21, label %49, label %44

44:                                               ; preds = %.preheader
  %indvars28 = trunc i64 %indvars.iv to i32
  %45 = icmp ult i64 %indvars.iv, 3
  %46 = select i1 %45, double 1.000000e+00, double -1.000000e+00
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #6
  %.urem = add nsw i32 %indvars28, -3
  %47 = select i1 %45, i32 %indvars28, i32 %.urem
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK13R3OrientedBox4AxisEi(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %47)
  call void @_ZmldRK8R3Vector(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %15, double noundef %46, ptr noundef nonnull align 8 dereferenceable(24) %48)
  call void @_Z12R3LoadNormalRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(24) %15)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  br label %49

49:                                               ; preds = %44, %.preheader
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %16, i64 noundef 512)
  %50 = load i64, ptr %16, align 8
  %51 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %50)
  %.not22 = icmp eq i32 %51, 0
  br i1 %.not22, label %53, label %52

52:                                               ; preds = %49
  call void @_Z19R3LoadTextureCoordsRK7R2Point(ptr noundef nonnull align 8 dereferenceable(16) @_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords)
  br label %53

53:                                               ; preds = %52, %49
  %54 = getelementptr inbounds [6 x [4 x i32]], ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE13surface_paths, i64 0, i64 %indvars.iv, i64 0
  %55 = load i32, ptr %54, align 16, !tbaa !6
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %56
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %57)
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %16, i64 noundef 512)
  %58 = load i64, ptr %16, align 8
  %59 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %58)
  %.not22.1 = icmp eq i32 %59, 0
  br i1 %.not22.1, label %61, label %60

60:                                               ; preds = %53
  call void @_Z19R3LoadTextureCoordsRK7R2Point(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords, i64 16))
  br label %61

61:                                               ; preds = %60, %53
  %62 = getelementptr inbounds [6 x [4 x i32]], ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE13surface_paths, i64 0, i64 %indvars.iv, i64 1
  %63 = load i32, ptr %62, align 4, !tbaa !6
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %64
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %65)
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %16, i64 noundef 512)
  %66 = load i64, ptr %16, align 8
  %67 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %66)
  %.not22.2 = icmp eq i32 %67, 0
  br i1 %.not22.2, label %69, label %68

68:                                               ; preds = %61
  call void @_Z19R3LoadTextureCoordsRK7R2Point(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords, i64 32))
  br label %69

69:                                               ; preds = %68, %61
  %70 = getelementptr inbounds [6 x [4 x i32]], ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE13surface_paths, i64 0, i64 %indvars.iv, i64 2
  %71 = load i32, ptr %70, align 8, !tbaa !6
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %72
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %73)
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %16, i64 noundef 512)
  %74 = load i64, ptr %16, align 8
  %75 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %74)
  %.not22.3 = icmp eq i32 %75, 0
  br i1 %.not22.3, label %77, label %76

76:                                               ; preds = %69
  call void @_Z19R3LoadTextureCoordsRK7R2Point(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE9texcoords, i64 48))
  br label %77

77:                                               ; preds = %76, %69
  %78 = getelementptr inbounds [6 x [4 x i32]], ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE13surface_paths, i64 0, i64 %indvars.iv, i64 3
  %79 = load i32, ptr %78, align 4, !tbaa !6
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %80
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %81)
  call void @_Z12R3EndPolygonv()
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 6
  br i1 %exitcond.not, label %.loopexit, label %.preheader, !llvm.loop !10

.loopexit:                                        ; preds = %77, %29
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %17, i64 noundef 1)
  %82 = load i64, ptr %17, align 8
  %83 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %82)
  %.not20 = icmp eq i32 %83, 0
  br i1 %.not20, label %133, label %84

84:                                               ; preds = %.loopexit
  call void @_Z11R3BeginLinev()
  %85 = load i32, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, align 16, !tbaa !6
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %86
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %87)
  %88 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 4), align 4, !tbaa !6
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %89
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %90)
  %91 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 8), align 8, !tbaa !6
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %92
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %93)
  %94 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 12), align 4, !tbaa !6
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %95
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %96)
  %97 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 16), align 16, !tbaa !6
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %98
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %99)
  %100 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 20), align 4, !tbaa !6
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %101
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %102)
  %103 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 24), align 8, !tbaa !6
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %104
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %105)
  %106 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 28), align 4, !tbaa !6
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %107
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %108)
  %109 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 32), align 16, !tbaa !6
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %110
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %111)
  %112 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 36), align 4, !tbaa !6
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %113
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %114)
  %115 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 40), align 8, !tbaa !6
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %116
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %117)
  %118 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 44), align 4, !tbaa !6
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %119
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %120)
  %121 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 48), align 16, !tbaa !6
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %122
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %123)
  %124 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 52), align 4, !tbaa !6
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %125
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %126)
  %127 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 56), align 8, !tbaa !6
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %128
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %129)
  %130 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZNK13R3OrientedBox4DrawE7RNFlagsE12outline_path, i64 60), align 4, !tbaa !6
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [8 x %class.R3Point], ptr %4, i64 0, i64 %131
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %132)
  call void @_Z9R3EndLinev()
  br label %133

133:                                              ; preds = %84, %.loopexit
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %4) #6
  br label %134

134:                                              ; preds = %2, %133
  ret void
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK13R3OrientedBox6CornerEi(ptr dead_on_unwind noalias writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmldRK8R3Vector(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass