; LLVM IR from Angelo1211/SoftwareRenderer :: src/geometry.ll (ZN8Frustrum13checkIfInsideEP5AABox)

; 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"

%struct.Vector3 = type { %union.anon, float }
%union.anon = type { [3 x float] }
%class.Frustrum = type { float, float, float, float, float, float, [6 x %struct.Plane] }
%struct.Plane = type { %struct.Vector3, float }
%struct.AABox = type { %struct.Vector3, %struct.Vector3 }
%struct.anon = type { float, float, float }

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20), ptr noundef nonnull align 4 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN8Frustrum13checkIfInsideEP5AABox(ptr noundef nonnull align 4 dereferenceable(144) %0, ptr noundef %1) #2 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.Vector3, align 4
  %10 = alloca %struct.Vector3, align 4
  %11 = alloca %struct.Vector3, align 4
  %12 = alloca %struct.Vector3, align 4
  %13 = alloca %struct.Vector3, align 4
  %14 = alloca %struct.Vector3, align 4
  %15 = alloca %struct.Vector3, align 4
  %16 = alloca %struct.Vector3, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %238, %2
  %19 = load i32, ptr %6, align 4, !tbaa !9
  %20 = icmp slt i32 %19, 6
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  store i32 2, ptr %7, align 4
  br label %241

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !9
  %23 = getelementptr inbounds %class.Frustrum, ptr %17, i32 0, i32 6
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [6 x %struct.Plane], ptr %23, i64 0, i64 %25
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #3
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.AABox, ptr %27, i32 0, i32 0
  %29 = getelementptr inbounds %struct.Vector3, ptr %28, i32 0, i32 0
  %30 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 0
  %31 = load float, ptr %30, align 4, !tbaa !11
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.AABox, ptr %32, i32 0, i32 0
  %34 = getelementptr inbounds %struct.Vector3, ptr %33, i32 0, i32 0
  %35 = getelementptr inbounds %struct.anon, ptr %34, i32 0, i32 1
  %36 = load float, ptr %35, align 4, !tbaa !11
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.AABox, ptr %37, i32 0, i32 0
  %39 = getelementptr inbounds %struct.Vector3, ptr %38, i32 0, i32 0
  %40 = getelementptr inbounds %struct.anon, ptr %39, i32 0, i32 2
  %41 = load float, ptr %40, align 4, !tbaa !11
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %9, float noundef %31, float noundef %36, float noundef %41)
  %42 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %26, ptr noundef nonnull align 4 dereferenceable(16) %9)
  %43 = fpext float %42 to double
  %44 = fcmp olt double %43, 0.000000e+00
  %45 = zext i1 %44 to i64
  %46 = select i1 %44, i32 1, i32 0
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = add nsw i32 %47, %46
  store i32 %48, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #3
  %49 = getelementptr inbounds %class.Frustrum, ptr %17, i32 0, i32 6
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [6 x %struct.Plane], ptr %49, i64 0, i64 %51
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #3
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.AABox, ptr %53, i32 0, i32 1
  %55 = getelementptr inbounds %struct.Vector3, ptr %54, i32 0, i32 0
  %56 = getelementptr inbounds %struct.anon, ptr %55, i32 0, i32 0
  %57 = load float, ptr %56, align 4, !tbaa !11
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.AABox, ptr %58, i32 0, i32 0
  %60 = getelementptr inbounds %struct.Vector3, ptr %59, i32 0, i32 0
  %61 = getelementptr inbounds %struct.anon, ptr %60, i32 0, i32 1
  %62 = load float, ptr %61, align 4, !tbaa !11
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.AABox, ptr %63, i32 0, i32 0
  %65 = getelementptr inbounds %struct.Vector3, ptr %64, i32 0, i32 0
  %66 = getelementptr inbounds %struct.anon, ptr %65, i32 0, i32 2
  %67 = load float, ptr %66, align 4, !tbaa !11
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %10, float noundef %57, float noundef %62, float noundef %67)
  %68 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %52, ptr noundef nonnull align 4 dereferenceable(16) %10)
  %69 = fpext float %68 to double
  %70 = fcmp olt double %69, 0.000000e+00
  %71 = zext i1 %70 to i64
  %72 = select i1 %70, i32 1, i32 0
  %73 = load i32, ptr %8, align 4, !tbaa !9
  %74 = add nsw i32 %73, %72
  store i32 %74, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #3
  %75 = getelementptr inbounds %class.Frustrum, ptr %17, i32 0, i32 6
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [6 x %struct.Plane], ptr %75, i64 0, i64 %77
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #3
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.AABox, ptr %79, i32 0, i32 0
  %81 = getelementptr inbounds %struct.Vector3, ptr %80, i32 0, i32 0
  %82 = getelementptr inbounds %struct.anon, ptr %81, i32 0, i32 0
  %83 = load float, ptr %82, align 4, !tbaa !11
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.AABox, ptr %84, i32 0, i32 1
  %86 = getelementptr inbounds %struct.Vector3, ptr %85, i32 0, i32 0
  %87 = getelementptr inbounds %struct.anon, ptr %86, i32 0, i32 1
  %88 = load float, ptr %87, align 4, !tbaa !11
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.AABox, ptr %89, i32 0, i32 0
  %91 = getelementptr inbounds %struct.Vector3, ptr %90, i32 0, i32 0
  %92 = getelementptr inbounds %struct.anon, ptr %91, i32 0, i32 2
  %93 = load float, ptr %92, align 4, !tbaa !11
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %11, float noundef %83, float noundef %88, float noundef %93)
  %94 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %78, ptr noundef nonnull align 4 dereferenceable(16) %11)
  %95 = fpext float %94 to double
  %96 = fcmp olt double %95, 0.000000e+00
  %97 = zext i1 %96 to i64
  %98 = select i1 %96, i32 1, i32 0
  %99 = load i32, ptr %8, align 4, !tbaa !9
  %100 = add nsw i32 %99, %98
  store i32 %100, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #3
  %101 = getelementptr inbounds %class.Frustrum, ptr %17, i32 0, i32 6
  %102 = load i32, ptr %6, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [6 x %struct.Plane], ptr %101, i64 0, i64 %103
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #3
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.AABox, ptr %105, i32 0, i32 1
  %107 = getelementptr inbounds %struct.Vector3, ptr %106, i32 0, i32 0
  %108 = getelementptr inbounds %struct.anon, ptr %107, i32 0, i32 0
  %109 = load float, ptr %108, align 4, !tbaa !11
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.AABox, ptr %110, i32 0, i32 1
  %112 = getelementptr inbounds %struct.Vector3, ptr %111, i32 0, i32 0
  %113 = getelementptr inbounds %struct.anon, ptr %112, i32 0, i32 1
  %114 = load float, ptr %113, align 4, !tbaa !11
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.AABox, ptr %115, i32 0, i32 0
  %117 = getelementptr inbounds %struct.Vector3, ptr %116, i32 0, i32 0
  %118 = getelementptr inbounds %struct.anon, ptr %117, i32 0, i32 2
  %119 = load float, ptr %118, align 4, !tbaa !11
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %12, float noundef %109, float noundef %114, float noundef %119)
  %120 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %104, ptr noundef nonnull align 4 dereferenceable(16) %12)
  %121 = fpext float %120 to double
  %122 = fcmp olt double %121, 0.000000e+00
  %123 = zext i1 %122 to i64
  %124 = select i1 %122, i32 1, i32 0
  %125 = load i32, ptr %8, align 4, !tbaa !9
  %126 = add nsw i32 %125, %124
  store i32 %126, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #3
  %127 = getelementptr inbounds %class.Frustrum, ptr %17, i32 0, i32 6
  %128 = load i32, ptr %6, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [6 x %struct.Plane], ptr %127, i64 0, i64 %129
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #3
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.AABox, ptr %131, i32 0, i32 0
  %133 = getelementptr inbounds %struct.Vector3, ptr %132, i32 0, i32 0
  %134 = getelementptr inbounds %struct.anon, ptr %133, i32 0, i32 0
  %135 = load float, ptr %134, align 4, !tbaa !11
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.AABox, ptr %136, i32 0, i32 0
  %138 = getelementptr inbounds %struct.Vector3, ptr %137, i32 0, i32 0
  %139 = getelementptr inbounds %struct.anon, ptr %138, i32 0, i32 1
  %140 = load float, ptr %139, align 4, !tbaa !11
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.AABox, ptr %141, i32 0, i32 1
  %143 = getelementptr inbounds %struct.Vector3, ptr %142, i32 0, i32 0
  %144 = getelementptr inbounds %struct.anon, ptr %143, i32 0, i32 2
  %145 = load float, ptr %144, align 4, !tbaa !11
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %13, float noundef %135, float noundef %140, float noundef %145)
  %146 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %130, ptr noundef nonnull align 4 dereferenceable(16) %13)
  %147 = fpext float %146 to double
  %148 = fcmp olt double %147, 0.000000e+00
  %149 = zext i1 %148 to i64
  %150 = select i1 %148, i32 1, i32 0
  %151 = load i32, ptr %8, align 4, !tbaa !9
  %152 = add nsw i32 %151, %150
  store i32 %152, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #3
  %153 = getelementptr inbounds %class.Frustrum, ptr %17, i32 0, i32 6
  %154 = load i32, ptr %6, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [6 x %struct.Plane], ptr %153, i64 0, i64 %155
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #3
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.AABox, ptr %157, i32 0, i32 1
  %159 = getelementptr inbounds %struct.Vector3, ptr %158, i32 0, i32 0
  %160 = getelementptr inbounds %struct.anon, ptr %159, i32 0, i32 0
  %161 = load float, ptr %160, align 4, !tbaa !11
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.AABox, ptr %162, i32 0, i32 0
  %164 = getelementptr inbounds %struct.Vector3, ptr %163, i32 0, i32 0
  %165 = getelementptr inbounds %struct.anon, ptr %164, i32 0, i32 1
  %166 = load float, ptr %165, align 4, !tbaa !11
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.AABox, ptr %167, i32 0, i32 1
  %169 = getelementptr inbounds %struct.Vector3, ptr %168, i32 0, i32 0
  %170 = getelementptr inbounds %struct.anon, ptr %169, i32 0, i32 2
  %171 = load float, ptr %170, align 4, !tbaa !11
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %14, float noundef %161, float noundef %166, float noundef %171)
  %172 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %156, ptr noundef nonnull align 4 dereferenceable(16) %14)
  %173 = fpext float %172 to double
  %174 = fcmp olt double %173, 0.000000e+00
  %175 = zext i1 %174 to i64
  %176 = select i1 %174, i32 1, i32 0
  %177 = load i32, ptr %8, align 4, !tbaa !9
  %178 = add nsw i32 %177, %176
  store i32 %178, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #3
  %179 = getelementptr inbounds %class.Frustrum, ptr %17, i32 0, i32 6
  %180 = load i32, ptr %6, align 4, !tbaa !9
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [6 x %struct.Plane], ptr %179, i64 0, i64 %181
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #3
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.AABox, ptr %183, i32 0, i32 0
  %185 = getelementptr inbounds %struct.Vector3, ptr %184, i32 0, i32 0
  %186 = getelementptr inbounds %struct.anon, ptr %185, i32 0, i32 0
  %187 = load float, ptr %186, align 4, !tbaa !11
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.AABox, ptr %188, i32 0, i32 1
  %190 = getelementptr inbounds %struct.Vector3, ptr %189, i32 0, i32 0
  %191 = getelementptr inbounds %struct.anon, ptr %190, i32 0, i32 1
  %192 = load float, ptr %191, align 4, !tbaa !11
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.AABox, ptr %193, i32 0, i32 1
  %195 = getelementptr inbounds %struct.Vector3, ptr %194, i32 0, i32 0
  %196 = getelementptr inbounds %struct.anon, ptr %195, i32 0, i32 2
  %197 = load float, ptr %196, align 4, !tbaa !11
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %15, float noundef %187, float noundef %192, float noundef %197)
  %198 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %182, ptr noundef nonnull align 4 dereferenceable(16) %15)
  %199 = fpext float %198 to double
  %200 = fcmp olt double %199, 0.000000e+00
  %201 = zext i1 %200 to i64
  %202 = select i1 %200, i32 1, i32 0
  %203 = load i32, ptr %8, align 4, !tbaa !9
  %204 = add nsw i32 %203, %202
  store i32 %204, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #3
  %205 = getelementptr inbounds %class.Frustrum, ptr %17, i32 0, i32 6
  %206 = load i32, ptr %6, align 4, !tbaa !9
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [6 x %struct.Plane], ptr %205, i64 0, i64 %207
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #3
  %209 = load ptr, ptr %5, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.AABox, ptr %209, i32 0, i32 1
  %211 = getelementptr inbounds %struct.Vector3, ptr %210, i32 0, i32 0
  %212 = getelementptr inbounds %struct.anon, ptr %211, i32 0, i32 0
  %213 = load float, ptr %212, align 4, !tbaa !11
  %214 = load ptr, ptr %5, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.AABox, ptr %214, i32 0, i32 1
  %216 = getelementptr inbounds %struct.Vector3, ptr %215, i32 0, i32 0
  %217 = getelementptr inbounds %struct.anon, ptr %216, i32 0, i32 1
  %218 = load float, ptr %217, align 4, !tbaa !11
  %219 = load ptr, ptr %5, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.AABox, ptr %219, i32 0, i32 1
  %221 = getelementptr inbounds %struct.Vector3, ptr %220, i32 0, i32 0
  %222 = getelementptr inbounds %struct.anon, ptr %221, i32 0, i32 2
  %223 = load float, ptr %222, align 4, !tbaa !11
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %16, float noundef %213, float noundef %218, float noundef %223)
  %224 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %208, ptr noundef nonnull align 4 dereferenceable(16) %16)
  %225 = fpext float %224 to double
  %226 = fcmp olt double %225, 0.000000e+00
  %227 = zext i1 %226 to i64
  %228 = select i1 %226, i32 1, i32 0
  %229 = load i32, ptr %8, align 4, !tbaa !9
  %230 = add nsw i32 %229, %228
  store i32 %230, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #3
  %231 = load i32, ptr %8, align 4, !tbaa !9
  %232 = icmp eq i32 %231, 8
  br i1 %232, label %233, label %234

233:                                              ; preds = %22
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %235

234:                                              ; preds = %22
  store i32 0, ptr %7, align 4
  br label %235

235:                                              ; preds = %234, %233
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %236 = load i32, ptr %7, align 4
  switch i32 %236, label %241 [
    i32 0, label %237
  ]

237:                                              ; preds = %235
  br label %238

238:                                              ; preds = %237
  %239 = load i32, ptr %6, align 4, !tbaa !9
  %240 = add nsw i32 %239, 1
  store i32 %240, ptr %6, align 4, !tbaa !9
  br label %18, !llvm.loop !12

241:                                              ; preds = %235, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  %242 = load i32, ptr %7, align 4
  switch i32 %242, label %246 [
    i32 2, label %243
    i32 1, label %244
  ]

243:                                              ; preds = %241
  store i1 true, ptr %3, align 1
  br label %244

244:                                              ; preds = %243, %241
  %245 = load i1, ptr %3, align 1
  ret i1 %245

246:                                              ; preds = %241
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Vector3 = type { %union.anon, float }
%union.anon = type { [3 x float] }
%struct.Plane = type { %struct.Vector3, float }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN8Frustrum13checkIfInsideEP5AABox(ptr noundef nonnull align 4 dereferenceable(144) %0, ptr nocapture noundef readonly %1) local_unnamed_addr #2 align 2 {
  %3 = alloca %struct.Vector3, align 4
  %4 = alloca %struct.Vector3, align 4
  %5 = alloca %struct.Vector3, align 4
  %6 = alloca %struct.Vector3, align 4
  %7 = alloca %struct.Vector3, align 4
  %8 = alloca %struct.Vector3, align 4
  %9 = alloca %struct.Vector3, align 4
  %10 = alloca %struct.Vector3, align 4
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  %12 = getelementptr inbounds i8, ptr %1, i64 4
  %13 = getelementptr inbounds i8, ptr %1, i64 8
  %14 = getelementptr inbounds i8, ptr %1, i64 16
  %15 = getelementptr inbounds i8, ptr %1, i64 20
  %16 = getelementptr inbounds i8, ptr %1, i64 24
  br label %19

17:                                               ; preds = %19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = icmp ugt i64 %indvars.iv, 4
  %exitcond = icmp eq i64 %indvars.iv.next, 6
  br i1 %exitcond, label %64, label %19, !llvm.loop !5

19:                                               ; preds = %2, %17
  %indvars.iv = phi i64 [ 0, %2 ], [ %indvars.iv.next, %17 ]
  %20 = phi i1 [ false, %2 ], [ %18, %17 ]
  %21 = getelementptr inbounds [6 x %struct.Plane], ptr %11, i64 0, i64 %indvars.iv
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #3
  %22 = load float, ptr %1, align 4, !tbaa !7
  %23 = load float, ptr %12, align 4, !tbaa !7
  %24 = load float, ptr %13, align 4, !tbaa !7
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %3, float noundef %22, float noundef %23, float noundef %24)
  %25 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %21, ptr noundef nonnull align 4 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #3
  %26 = load float, ptr %14, align 4, !tbaa !7
  %27 = load float, ptr %12, align 4, !tbaa !7
  %28 = load float, ptr %13, align 4, !tbaa !7
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %4, float noundef %26, float noundef %27, float noundef %28)
  %29 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %21, ptr noundef nonnull align 4 dereferenceable(16) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %30 = load float, ptr %1, align 4, !tbaa !7
  %31 = load float, ptr %15, align 4, !tbaa !7
  %32 = load float, ptr %13, align 4, !tbaa !7
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %5, float noundef %30, float noundef %31, float noundef %32)
  %33 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %21, ptr noundef nonnull align 4 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #3
  %34 = load float, ptr %14, align 4, !tbaa !7
  %35 = load float, ptr %15, align 4, !tbaa !7
  %36 = load float, ptr %13, align 4, !tbaa !7
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %6, float noundef %34, float noundef %35, float noundef %36)
  %37 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %21, ptr noundef nonnull align 4 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #3
  %38 = load float, ptr %1, align 4, !tbaa !7
  %39 = load float, ptr %12, align 4, !tbaa !7
  %40 = load float, ptr %16, align 4, !tbaa !7
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %7, float noundef %38, float noundef %39, float noundef %40)
  %41 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %21, ptr noundef nonnull align 4 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #3
  %42 = load float, ptr %14, align 4, !tbaa !7
  %43 = load float, ptr %12, align 4, !tbaa !7
  %44 = load float, ptr %16, align 4, !tbaa !7
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %8, float noundef %42, float noundef %43, float noundef %44)
  %45 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %21, ptr noundef nonnull align 4 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #3
  %46 = load float, ptr %1, align 4, !tbaa !7
  %47 = load float, ptr %15, align 4, !tbaa !7
  %48 = load float, ptr %16, align 4, !tbaa !7
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %9, float noundef %46, float noundef %47, float noundef %48)
  %49 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %21, ptr noundef nonnull align 4 dereferenceable(16) %9)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #3
  %50 = load float, ptr %14, align 4, !tbaa !7
  %51 = load float, ptr %15, align 4, !tbaa !7
  %52 = load float, ptr %16, align 4, !tbaa !7
  call void @_ZN7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(16) %10, float noundef %50, float noundef %51, float noundef %52)
  %53 = call noundef float @_ZN5Plane8distanceERK7Vector3IfE(ptr noundef nonnull align 4 dereferenceable(20) %21, ptr noundef nonnull align 4 dereferenceable(16) %10)
  %54 = insertelement <8 x float> poison, float %29, i64 0
  %55 = insertelement <8 x float> %54, float %25, i64 1
  %56 = insertelement <8 x float> %55, float %33, i64 2
  %57 = insertelement <8 x float> %56, float %37, i64 3
  %58 = insertelement <8 x float> %57, float %41, i64 4
  %59 = insertelement <8 x float> %58, float %45, i64 5
  %60 = insertelement <8 x float> %59, float %49, i64 6
  %61 = insertelement <8 x float> %60, float %53, i64 7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #3
  %62 = fcmp uge <8 x float> %61, zeroinitializer
  %63 = bitcast <8 x i1> %62 to i8
  %.not = icmp eq i8 %63, 0
  br i1 %.not, label %64, label %17

64:                                               ; preds = %17, %19
  %.lcssa = phi i1 [ %18, %17 ], [ %20, %19 ]
  ret i1 %.lcssa
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass