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

; 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.R3Vector = type { [3 x double] }
%class.R3Triad = type { [3 x %class.R3Vector] }
%class.R3OrientedBox = type { %class.R3Solid, %class.R3CoordSystem, [3 x double] }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%class.R3CoordSystem = type { %class.R3Point, %class.R3Triad }
%class.R3Point = type { [3 x double] }

@RN_EPSILON = external global double, align 8
@.str.3 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [29 x i8], align 1

; 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 @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13R3OrientedBox5ResetERK7R3PointRK8R3VectorS5_ddd(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, double noundef %4, double noundef %5, double noundef %6) unnamed_addr #2 align 2 {
  %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 double, align 8
  %14 = alloca double, align 8
  %15 = alloca [3 x %class.R3Vector], align 16
  %16 = alloca %class.R3Vector, align 8
  %17 = alloca %class.R3Vector, align 8
  %18 = alloca %class.R3Vector, align 8
  %19 = alloca %class.R3Vector, align 8
  %20 = alloca double, align 8
  %21 = alloca %class.R3Vector, align 8
  %22 = alloca %class.R3Triad, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store double %4, ptr %12, align 8, !tbaa !9
  store double %5, ptr %13, align 8, !tbaa !9
  store double %6, ptr %14, align 8, !tbaa !9
  %23 = load ptr, ptr %8, align 8
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = call noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
  %26 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %27 = call noundef i32 @_Z12RNIsPositivedd(double noundef %25, double noundef %26)
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %30, label %29

29:                                               ; preds = %7
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 468, ptr noundef @.str.5)
  br label %30

30:                                               ; preds = %29, %7
  %31 = load ptr, ptr %11, align 8, !tbaa !5
  %32 = call noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24) %31)
  %33 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %34 = call noundef i32 @_Z12RNIsPositivedd(double noundef %32, double noundef %33)
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %37, label %36

36:                                               ; preds = %30
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str.3, ptr noundef @.str.6, i32 noundef 469, ptr noundef @.str.5)
  br label %37

37:                                               ; preds = %36, %30
  call void @llvm.lifetime.start.p0(i64 72, ptr %15) #4
  %38 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i32 0, i32 0
  %39 = getelementptr inbounds %class.R3Vector, ptr %38, i64 3
  br label %40

40:                                               ; preds = %40, %37
  %41 = phi ptr [ %38, %37 ], [ %42, %40 ]
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %41)
  %42 = getelementptr inbounds %class.R3Vector, ptr %41, i64 1
  %43 = icmp eq ptr %42, %39
  br i1 %43, label %44, label %40

44:                                               ; preds = %40
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 0
  %47 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(24) %45)
  %48 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 0
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48)
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 8 dereferenceable(24) %49)
  %52 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %52)
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  %53 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 0
  %54 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 8 dereferenceable(24) %54)
  %55 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  %56 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %55, ptr noundef nonnull align 8 dereferenceable(24) %16)
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #4
  %57 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  %58 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 0
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %57, ptr noundef nonnull align 8 dereferenceable(24) %58)
  %59 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %59, ptr noundef nonnull align 8 dereferenceable(24) %17)
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #4
  %61 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %61)
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #4
  %62 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 0
  %63 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %18, ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 8 dereferenceable(24) %63)
  %64 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 2
  %65 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 8 dereferenceable(24) %18)
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #4
  %66 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 2
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %66)
  %67 = load double, ptr %12, align 8, !tbaa !9
  %68 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %69 = getelementptr inbounds [3 x double], ptr %68, i64 0, i64 0
  store double %67, ptr %69, align 8, !tbaa !9
  %70 = load double, ptr %13, align 8, !tbaa !9
  %71 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %72 = getelementptr inbounds [3 x double], ptr %71, i64 0, i64 1
  store double %70, ptr %72, align 8, !tbaa !9
  %73 = load double, ptr %14, align 8, !tbaa !9
  %74 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %75 = getelementptr inbounds [3 x double], ptr %74, i64 0, i64 2
  store double %73, ptr %75, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #4
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %19)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %76 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %77 = getelementptr inbounds [3 x double], ptr %76, i64 0, i64 1
  %78 = load double, ptr %77, align 8, !tbaa !9
  %79 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %80 = getelementptr inbounds [3 x double], ptr %79, i64 0, i64 0
  %81 = load double, ptr %80, align 8, !tbaa !9
  %82 = fcmp ogt double %78, %81
  br i1 %82, label %83, label %102

83:                                               ; preds = %44
  %84 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 0
  %85 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %84)
  %86 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %87 = getelementptr inbounds [3 x double], ptr %86, i64 0, i64 0
  %88 = load double, ptr %87, align 8, !tbaa !9
  store double %88, ptr %20, align 8, !tbaa !9
  %89 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  %90 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 0
  %91 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %90, ptr noundef nonnull align 8 dereferenceable(24) %89)
  %92 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %93 = getelementptr inbounds [3 x double], ptr %92, i64 0, i64 1
  %94 = load double, ptr %93, align 8, !tbaa !9
  %95 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %96 = getelementptr inbounds [3 x double], ptr %95, i64 0, i64 0
  store double %94, ptr %96, align 8, !tbaa !9
  %97 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  %98 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %97, ptr noundef nonnull align 8 dereferenceable(24) %19)
  %99 = load double, ptr %20, align 8, !tbaa !9
  %100 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %101 = getelementptr inbounds [3 x double], ptr %100, i64 0, i64 1
  store double %99, ptr %101, align 8, !tbaa !9
  br label %102

102:                                              ; preds = %83, %44
  %103 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %104 = getelementptr inbounds [3 x double], ptr %103, i64 0, i64 2
  %105 = load double, ptr %104, align 8, !tbaa !9
  %106 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %107 = getelementptr inbounds [3 x double], ptr %106, i64 0, i64 0
  %108 = load double, ptr %107, align 8, !tbaa !9
  %109 = fcmp ogt double %105, %108
  br i1 %109, label %110, label %129

110:                                              ; preds = %102
  %111 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 0
  %112 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %111)
  %113 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %114 = getelementptr inbounds [3 x double], ptr %113, i64 0, i64 0
  %115 = load double, ptr %114, align 8, !tbaa !9
  store double %115, ptr %20, align 8, !tbaa !9
  %116 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 2
  %117 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 0
  %118 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %117, ptr noundef nonnull align 8 dereferenceable(24) %116)
  %119 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %120 = getelementptr inbounds [3 x double], ptr %119, i64 0, i64 2
  %121 = load double, ptr %120, align 8, !tbaa !9
  %122 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %123 = getelementptr inbounds [3 x double], ptr %122, i64 0, i64 0
  store double %121, ptr %123, align 8, !tbaa !9
  %124 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 2
  %125 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %124, ptr noundef nonnull align 8 dereferenceable(24) %19)
  %126 = load double, ptr %20, align 8, !tbaa !9
  %127 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %128 = getelementptr inbounds [3 x double], ptr %127, i64 0, i64 2
  store double %126, ptr %128, align 8, !tbaa !9
  br label %129

129:                                              ; preds = %110, %102
  %130 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %131 = getelementptr inbounds [3 x double], ptr %130, i64 0, i64 2
  %132 = load double, ptr %131, align 8, !tbaa !9
  %133 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %134 = getelementptr inbounds [3 x double], ptr %133, i64 0, i64 1
  %135 = load double, ptr %134, align 8, !tbaa !9
  %136 = fcmp ogt double %132, %135
  br i1 %136, label %137, label %156

137:                                              ; preds = %129
  %138 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  %139 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %138)
  %140 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %141 = getelementptr inbounds [3 x double], ptr %140, i64 0, i64 1
  %142 = load double, ptr %141, align 8, !tbaa !9
  store double %142, ptr %20, align 8, !tbaa !9
  %143 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 2
  %144 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  %145 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %144, ptr noundef nonnull align 8 dereferenceable(24) %143)
  %146 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %147 = getelementptr inbounds [3 x double], ptr %146, i64 0, i64 2
  %148 = load double, ptr %147, align 8, !tbaa !9
  %149 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %150 = getelementptr inbounds [3 x double], ptr %149, i64 0, i64 1
  store double %148, ptr %150, align 8, !tbaa !9
  %151 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 2
  %152 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %151, ptr noundef nonnull align 8 dereferenceable(24) %19)
  %153 = load double, ptr %20, align 8, !tbaa !9
  %154 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 2
  %155 = getelementptr inbounds [3 x double], ptr %154, i64 0, i64 2
  store double %153, ptr %155, align 8, !tbaa !9
  br label %156

156:                                              ; preds = %137, %129
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #4
  %157 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 0
  %158 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %21, ptr noundef nonnull align 8 dereferenceable(24) %157, ptr noundef nonnull align 8 dereferenceable(24) %158)
  %159 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 2
  %160 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %159, ptr noundef nonnull align 8 dereferenceable(24) %21)
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #4
  %161 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 2
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %161)
  %162 = getelementptr inbounds %class.R3OrientedBox, ptr %23, i32 0, i32 1
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 72, ptr %22) #4
  %164 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 0
  %165 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 1
  %166 = getelementptr inbounds [3 x %class.R3Vector], ptr %15, i64 0, i64 2
  call void @_ZN7R3TriadC1ERK8R3VectorS2_S2_(ptr noundef nonnull align 8 dereferenceable(72) %22, ptr noundef nonnull align 8 dereferenceable(24) %164, ptr noundef nonnull align 8 dereferenceable(24) %165, ptr noundef nonnull align 8 dereferenceable(24) %166)
  call void @_ZN13R3CoordSystem5ResetERK7R3PointRK7R3Triad(ptr noundef nonnull align 8 dereferenceable(96) %162, ptr noundef nonnull align 8 dereferenceable(24) %163, ptr noundef nonnull align 8 dereferenceable(72) %22)
  call void @llvm.lifetime.end.p0(i64 72, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr %15) #4
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z12RNIsPositivedd(double noundef, double noundef) #3

declare void @_Z7RNAbortPKcz(ptr noundef, ...) #1

declare void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

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

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)) #1

declare void @_ZN13R3CoordSystem5ResetERK7R3PointRK7R3Triad(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) #1

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 #1

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 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 #4 = { 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}


; 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.R3Vector = type { [3 x double] }
%class.R3Triad = type { [3 x %class.R3Vector] }

@RN_EPSILON = external local_unnamed_addr global double, align 8
@.str.3 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [29 x i8], align 1

; 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 @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13R3OrientedBox5ResetERK7R3PointRK8R3VectorS5_ddd(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, double noundef %4, double noundef %5, double noundef %6) unnamed_addr #2 align 2 {
  %8 = alloca [3 x %class.R3Vector], align 16
  %9 = alloca %class.R3Vector, align 8
  %10 = alloca %class.R3Vector, align 8
  %11 = alloca %class.R3Vector, align 8
  %12 = alloca %class.R3Vector, align 8
  %13 = alloca %class.R3Vector, align 8
  %14 = alloca %class.R3Triad, align 8
  %15 = tail call noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %16 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %17 = tail call noundef i32 @_Z12RNIsPositivedd(double noundef %15, double noundef %16)
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %18, label %19

18:                                               ; preds = %7
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 468, ptr noundef nonnull @.str.5)
  br label %19

19:                                               ; preds = %18, %7
  %20 = tail call noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %21 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %22 = tail call noundef i32 @_Z12RNIsPositivedd(double noundef %20, double noundef %21)
  %.not12 = icmp eq i32 %22, 0
  br i1 %.not12, label %23, label %24

23:                                               ; preds = %19
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.6, i32 noundef 469, ptr noundef nonnull @.str.5)
  br label %24

24:                                               ; preds = %23, %19
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %8) #4
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %.ptr.1 = getelementptr inbounds i8, ptr %8, i64 24
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %8, i64 48
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %25 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %2)
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %26 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %3)
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %27 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %9)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %8)
  %28 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %10)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #4
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %29 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2, ptr noundef nonnull align 8 dereferenceable(24) %11)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %30 = getelementptr inbounds i8, ptr %0, i64 104
  store double %4, ptr %30, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %0, i64 112
  store double %5, ptr %31, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %0, i64 120
  store double %6, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #4
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %33 = load double, ptr %31, align 8, !tbaa !5
  %34 = load double, ptr %30, align 8, !tbaa !5
  %35 = fcmp ogt double %33, %34
  br i1 %35, label %36, label %42

36:                                               ; preds = %24
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %8)
  %38 = load double, ptr %30, align 8, !tbaa !5
  %39 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %40 = load double, ptr %31, align 8, !tbaa !5
  store double %40, ptr %30, align 8, !tbaa !5
  %41 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %12)
  store double %38, ptr %31, align 8, !tbaa !5
  %.pre = load double, ptr %30, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %36, %24
  %43 = phi double [ %38, %36 ], [ %33, %24 ]
  %44 = phi double [ %.pre, %36 ], [ %34, %24 ]
  %45 = load double, ptr %32, align 8, !tbaa !5
  %46 = fcmp ogt double %45, %44
  br i1 %46, label %47, label %53

47:                                               ; preds = %42
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %8)
  %49 = load double, ptr %30, align 8, !tbaa !5
  %50 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %51 = load double, ptr %32, align 8, !tbaa !5
  store double %51, ptr %30, align 8, !tbaa !5
  %52 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2, ptr noundef nonnull align 8 dereferenceable(24) %12)
  store double %49, ptr %32, align 8, !tbaa !5
  %.pre14 = load double, ptr %31, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %47, %42
  %54 = phi double [ %.pre14, %47 ], [ %43, %42 ]
  %55 = phi double [ %49, %47 ], [ %45, %42 ]
  %56 = fcmp ogt double %55, %54
  br i1 %56, label %57, label %63

57:                                               ; preds = %53
  %58 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %59 = load double, ptr %31, align 8, !tbaa !5
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %61 = load double, ptr %32, align 8, !tbaa !5
  store double %61, ptr %31, align 8, !tbaa !5
  %62 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2, ptr noundef nonnull align 8 dereferenceable(24) %12)
  store double %59, ptr %32, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %57, %53
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #4
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %64 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2, ptr noundef nonnull align 8 dereferenceable(24) %13)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #4
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %65 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %14) #4
  call void @_ZN7R3TriadC1ERK8R3VectorS2_S2_(ptr noundef nonnull align 8 dereferenceable(72) %14, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  call void @_ZN13R3CoordSystem5ResetERK7R3PointRK7R3Triad(ptr noundef nonnull align 8 dereferenceable(96) %65, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(72) %14)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %8) #4
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z12RNIsPositivedd(double noundef, double noundef) local_unnamed_addr #3

declare void @_Z7RNAbortPKcz(ptr noundef, ...) local_unnamed_addr #1

declare void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

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 #1

declare void @_ZN13R3CoordSystem5ResetERK7R3PointRK7R3Triad(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1

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 #1

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 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 #4 = { 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,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass