; LLVM IR from sejja/3D-Software-Rasterizer :: Rasterizer/Engine/Graphics/Rasterizer (DrawTriangle)

; 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.Graphics::Rasterizer::VertexInf" = type <{ ptr, ptr, ptr, i8, [7 x i8] }>
%class.Vector4 = type { %union.anon.0 }
%union.anon.0 = type { [4 x float] }
%"struct.Graphics::Color" = type { float, float, float }
%class.Point4 = type { %union.anon }
%union.anon = type { [4 x float] }
%struct.anon = type { float, float, float, float }
%struct.anon.1 = type { float, float, float, float }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN8Graphics10Rasterizer12DrawTriangleERK6Point4S3_S3_RKNS_5ColorE(ptr noundef nonnull align 4 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(12) %3) #0 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.Graphics::Rasterizer::VertexInf", align 8
  %10 = alloca [3 x i8], align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca %class.Vector4, align 4
  %19 = alloca %class.Vector4, align 4
  %20 = alloca %class.Vector4, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN8Graphics10Rasterizer9VertexInfC2ERK6Point4S4_S4_(ptr noundef nonnull align 8 dereferenceable(25) %9, ptr noundef nonnull align 4 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(16) %29, ptr noundef nonnull align 4 dereferenceable(16) %30) #5
  call void @llvm.lifetime.start.p0(i64 3, ptr %10) #5
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.Graphics::Color", ptr %31, i32 0, i32 0
  %33 = load float, ptr %32, align 4, !tbaa !9
  %34 = fptoui float %33 to i8
  store i8 %34, ptr %10, align 1, !tbaa !12
  %35 = getelementptr inbounds i8, ptr %10, i64 1
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.Graphics::Color", ptr %36, i32 0, i32 1
  %38 = load float, ptr %37, align 4, !tbaa !13
  %39 = fptoui float %38 to i8
  store i8 %39, ptr %35, align 1, !tbaa !12
  %40 = getelementptr inbounds i8, ptr %10, i64 2
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.Graphics::Color", ptr %41, i32 0, i32 2
  %43 = load float, ptr %42, align 4, !tbaa !14
  %44 = fptoui float %43 to i8
  store i8 %44, ptr %40, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %45 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !15
  %47 = getelementptr inbounds %class.Point4, ptr %46, i32 0, i32 0
  %48 = getelementptr inbounds %struct.anon, ptr %47, i32 0, i32 1
  %49 = load float, ptr %48, align 4, !tbaa !12
  %50 = call float @llvm.ceil.f32(float %49)
  %51 = fptosi float %50 to i32
  store i32 %51, ptr %11, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %52 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !20
  %54 = getelementptr inbounds %class.Point4, ptr %53, i32 0, i32 0
  %55 = getelementptr inbounds %struct.anon, ptr %54, i32 0, i32 1
  %56 = load float, ptr %55, align 4, !tbaa !12
  %57 = call float @llvm.ceil.f32(float %56)
  %58 = fptosi float %57 to i32
  store i32 %58, ptr %12, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %59 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !20
  %61 = getelementptr inbounds %class.Point4, ptr %60, i32 0, i32 0
  %62 = getelementptr inbounds %struct.anon, ptr %61, i32 0, i32 0
  %63 = load float, ptr %62, align 4, !tbaa !12
  store float %63, ptr %14, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %64 = load float, ptr %14, align 4, !tbaa !21
  store float %64, ptr %15, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %65 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 3
  %66 = load i8, ptr %65, align 8, !tbaa !22, !range !23, !noundef !24
  %67 = trunc i8 %66 to i1
  br i1 %67, label %68, label %92

68:                                               ; preds = %4
  %69 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 1
  %70 = load ptr, ptr %69, align 8, !tbaa !15
  %71 = getelementptr inbounds %class.Point4, ptr %70, i32 0, i32 0
  %72 = getelementptr inbounds %struct.anon, ptr %71, i32 0, i32 0
  %73 = load float, ptr %72, align 4, !tbaa !12
  %74 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !20
  %76 = getelementptr inbounds %class.Point4, ptr %75, i32 0, i32 0
  %77 = getelementptr inbounds %struct.anon, ptr %76, i32 0, i32 0
  %78 = load float, ptr %77, align 4, !tbaa !12
  %79 = fsub float %73, %78
  %80 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !15
  %82 = getelementptr inbounds %class.Point4, ptr %81, i32 0, i32 0
  %83 = getelementptr inbounds %struct.anon, ptr %82, i32 0, i32 1
  %84 = load float, ptr %83, align 4, !tbaa !12
  %85 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !20
  %87 = getelementptr inbounds %class.Point4, ptr %86, i32 0, i32 0
  %88 = getelementptr inbounds %struct.anon, ptr %87, i32 0, i32 1
  %89 = load float, ptr %88, align 4, !tbaa !12
  %90 = fsub float %84, %89
  %91 = fdiv float %79, %90
  br label %116

92:                                               ; preds = %4
  %93 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 2
  %94 = load ptr, ptr %93, align 8, !tbaa !25
  %95 = getelementptr inbounds %class.Point4, ptr %94, i32 0, i32 0
  %96 = getelementptr inbounds %struct.anon, ptr %95, i32 0, i32 0
  %97 = load float, ptr %96, align 4, !tbaa !12
  %98 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !20
  %100 = getelementptr inbounds %class.Point4, ptr %99, i32 0, i32 0
  %101 = getelementptr inbounds %struct.anon, ptr %100, i32 0, i32 0
  %102 = load float, ptr %101, align 4, !tbaa !12
  %103 = fsub float %97, %102
  %104 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 2
  %105 = load ptr, ptr %104, align 8, !tbaa !25
  %106 = getelementptr inbounds %class.Point4, ptr %105, i32 0, i32 0
  %107 = getelementptr inbounds %struct.anon, ptr %106, i32 0, i32 1
  %108 = load float, ptr %107, align 4, !tbaa !12
  %109 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !20
  %111 = getelementptr inbounds %class.Point4, ptr %110, i32 0, i32 0
  %112 = getelementptr inbounds %struct.anon, ptr %111, i32 0, i32 1
  %113 = load float, ptr %112, align 4, !tbaa !12
  %114 = fsub float %108, %113
  %115 = fdiv float %103, %114
  br label %116

116:                                              ; preds = %92, %68
  %117 = phi float [ %91, %68 ], [ %115, %92 ]
  store float %117, ptr %16, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %118 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 3
  %119 = load i8, ptr %118, align 8, !tbaa !22, !range !23, !noundef !24
  %120 = trunc i8 %119 to i1
  br i1 %120, label %121, label %145

121:                                              ; preds = %116
  %122 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !25
  %124 = getelementptr inbounds %class.Point4, ptr %123, i32 0, i32 0
  %125 = getelementptr inbounds %struct.anon, ptr %124, i32 0, i32 0
  %126 = load float, ptr %125, align 4, !tbaa !12
  %127 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !20
  %129 = getelementptr inbounds %class.Point4, ptr %128, i32 0, i32 0
  %130 = getelementptr inbounds %struct.anon, ptr %129, i32 0, i32 0
  %131 = load float, ptr %130, align 4, !tbaa !12
  %132 = fsub float %126, %131
  %133 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 2
  %134 = load ptr, ptr %133, align 8, !tbaa !25
  %135 = getelementptr inbounds %class.Point4, ptr %134, i32 0, i32 0
  %136 = getelementptr inbounds %struct.anon, ptr %135, i32 0, i32 1
  %137 = load float, ptr %136, align 4, !tbaa !12
  %138 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !20
  %140 = getelementptr inbounds %class.Point4, ptr %139, i32 0, i32 0
  %141 = getelementptr inbounds %struct.anon, ptr %140, i32 0, i32 1
  %142 = load float, ptr %141, align 4, !tbaa !12
  %143 = fsub float %137, %142
  %144 = fdiv float %132, %143
  br label %169

145:                                              ; preds = %116
  %146 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 1
  %147 = load ptr, ptr %146, align 8, !tbaa !15
  %148 = getelementptr inbounds %class.Point4, ptr %147, i32 0, i32 0
  %149 = getelementptr inbounds %struct.anon, ptr %148, i32 0, i32 0
  %150 = load float, ptr %149, align 4, !tbaa !12
  %151 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 0
  %152 = load ptr, ptr %151, align 8, !tbaa !20
  %153 = getelementptr inbounds %class.Point4, ptr %152, i32 0, i32 0
  %154 = getelementptr inbounds %struct.anon, ptr %153, i32 0, i32 0
  %155 = load float, ptr %154, align 4, !tbaa !12
  %156 = fsub float %150, %155
  %157 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 1
  %158 = load ptr, ptr %157, align 8, !tbaa !15
  %159 = getelementptr inbounds %class.Point4, ptr %158, i32 0, i32 0
  %160 = getelementptr inbounds %struct.anon, ptr %159, i32 0, i32 1
  %161 = load float, ptr %160, align 4, !tbaa !12
  %162 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8, !tbaa !20
  %164 = getelementptr inbounds %class.Point4, 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 !12
  %167 = fsub float %161, %166
  %168 = fdiv float %156, %167
  br label %169

169:                                              ; preds = %145, %121
  %170 = phi float [ %144, %121 ], [ %168, %145 ]
  store float %170, ptr %17, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %class.Point4, ptr %171, i32 0, i32 0
  %173 = getelementptr inbounds %struct.anon, ptr %172, i32 0, i32 0
  %174 = load float, ptr %173, align 4, !tbaa !12
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = getelementptr inbounds %class.Point4, ptr %175, i32 0, i32 0
  %177 = getelementptr inbounds %struct.anon, ptr %176, i32 0, i32 0
  %178 = load float, ptr %177, align 4, !tbaa !12
  %179 = fsub float %174, %178
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds %class.Point4, ptr %180, i32 0, i32 0
  %182 = getelementptr inbounds %struct.anon, ptr %181, i32 0, i32 1
  %183 = load float, ptr %182, align 4, !tbaa !12
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = getelementptr inbounds %class.Point4, ptr %184, i32 0, i32 0
  %186 = getelementptr inbounds %struct.anon, ptr %185, i32 0, i32 1
  %187 = load float, ptr %186, align 4, !tbaa !12
  %188 = fsub float %183, %187
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %class.Point4, ptr %189, i32 0, i32 0
  %191 = getelementptr inbounds %struct.anon, ptr %190, i32 0, i32 2
  %192 = load float, ptr %191, align 4, !tbaa !12
  %193 = load ptr, ptr %6, align 8, !tbaa !5
  %194 = getelementptr inbounds %class.Point4, ptr %193, i32 0, i32 0
  %195 = getelementptr inbounds %struct.anon, ptr %194, i32 0, i32 2
  %196 = load float, ptr %195, align 4, !tbaa !12
  %197 = fsub float %192, %196
  invoke void @_ZN7Vector4C1Effff(ptr noundef nonnull align 4 dereferenceable(16) %19, float noundef %179, float noundef %188, float noundef %197, float noundef 0.000000e+00)
          to label %198 unwind label %433

198:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %class.Point4, ptr %199, i32 0, i32 0
  %201 = getelementptr inbounds %struct.anon, ptr %200, i32 0, i32 0
  %202 = load float, ptr %201, align 4, !tbaa !12
  %203 = load ptr, ptr %7, align 8, !tbaa !5
  %204 = getelementptr inbounds %class.Point4, ptr %203, i32 0, i32 0
  %205 = getelementptr inbounds %struct.anon, ptr %204, i32 0, i32 0
  %206 = load float, ptr %205, align 4, !tbaa !12
  %207 = fsub float %202, %206
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %class.Point4, ptr %208, i32 0, i32 0
  %210 = getelementptr inbounds %struct.anon, ptr %209, i32 0, i32 1
  %211 = load float, ptr %210, align 4, !tbaa !12
  %212 = load ptr, ptr %7, align 8, !tbaa !5
  %213 = getelementptr inbounds %class.Point4, ptr %212, i32 0, i32 0
  %214 = getelementptr inbounds %struct.anon, ptr %213, i32 0, i32 1
  %215 = load float, ptr %214, align 4, !tbaa !12
  %216 = fsub float %211, %215
  %217 = load ptr, ptr %5, align 8, !tbaa !5
  %218 = getelementptr inbounds %class.Point4, ptr %217, i32 0, i32 0
  %219 = getelementptr inbounds %struct.anon, ptr %218, i32 0, i32 2
  %220 = load float, ptr %219, align 4, !tbaa !12
  %221 = load ptr, ptr %7, align 8, !tbaa !5
  %222 = getelementptr inbounds %class.Point4, ptr %221, i32 0, i32 0
  %223 = getelementptr inbounds %struct.anon, ptr %222, i32 0, i32 2
  %224 = load float, ptr %223, align 4, !tbaa !12
  %225 = fsub float %220, %224
  invoke void @_ZN7Vector4C1Effff(ptr noundef nonnull align 4 dereferenceable(16) %20, float noundef %207, float noundef %216, float noundef %225, float noundef 0.000000e+00)
          to label %226 unwind label %433

226:                                              ; preds = %198
  invoke void @_ZNK7Vector45CrossERKS_(ptr dead_on_unwind writable sret(%class.Vector4) align 4 %18, ptr noundef nonnull align 4 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(16) %20)
          to label %227 unwind label %433

227:                                              ; preds = %226
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %228 = getelementptr inbounds %class.Vector4, ptr %18, i32 0, i32 0
  %229 = getelementptr inbounds %struct.anon.1, ptr %228, i32 0, i32 0
  %230 = load float, ptr %229, align 4, !tbaa !12
  %231 = fneg float %230
  %232 = getelementptr inbounds %class.Vector4, ptr %18, i32 0, i32 0
  %233 = getelementptr inbounds %struct.anon.1, ptr %232, i32 0, i32 2
  %234 = load float, ptr %233, align 4, !tbaa !12
  %235 = fdiv float %231, %234
  store float %235, ptr %21, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %236 = getelementptr inbounds %class.Vector4, ptr %18, i32 0, i32 0
  %237 = getelementptr inbounds %struct.anon.1, ptr %236, i32 0, i32 1
  %238 = load float, ptr %237, align 4, !tbaa !12
  %239 = fneg float %238
  %240 = getelementptr inbounds %class.Vector4, ptr %18, i32 0, i32 0
  %241 = getelementptr inbounds %struct.anon.1, ptr %240, i32 0, i32 2
  %242 = load float, ptr %241, align 4, !tbaa !12
  %243 = fdiv float %239, %242
  store float %243, ptr %22, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %244 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 0
  %245 = load ptr, ptr %244, align 8, !tbaa !20
  %246 = getelementptr inbounds %class.Point4, ptr %245, i32 0, i32 0
  %247 = getelementptr inbounds %struct.anon, ptr %246, i32 0, i32 2
  %248 = load float, ptr %247, align 4, !tbaa !12
  store float %248, ptr %23, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %249 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 0
  %250 = load ptr, ptr %249, align 8, !tbaa !20
  %251 = getelementptr inbounds %class.Point4, ptr %250, i32 0, i32 0
  %252 = getelementptr inbounds %struct.anon, ptr %251, i32 0, i32 2
  %253 = load float, ptr %252, align 4, !tbaa !12
  store float %253, ptr %24, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %254 = load float, ptr %22, align 4, !tbaa !21
  %255 = load float, ptr %16, align 4, !tbaa !21
  %256 = load float, ptr %21, align 4, !tbaa !21
  %257 = call float @llvm.fmuladd.f32(float %255, float %256, float %254)
  store float %257, ptr %25, align 4, !tbaa !21
  br label %258

258:                                              ; preds = %302, %227
  %259 = load i32, ptr %12, align 4, !tbaa !18
  %260 = load i32, ptr %11, align 4, !tbaa !18
  %261 = icmp sgt i32 %259, %260
  br i1 %261, label %262, label %305

262:                                              ; preds = %258
  %263 = load float, ptr %15, align 4, !tbaa !21
  %264 = call float @llvm.floor.f32(float %263)
  %265 = fptosi float %264 to i32
  store i32 %265, ptr %13, align 4, !tbaa !18
  %266 = load float, ptr %23, align 4, !tbaa !21
  store float %266, ptr %24, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %267 = load float, ptr %14, align 4, !tbaa !21
  %268 = call float @llvm.floor.f32(float %267)
  %269 = fptosi float %268 to i32
  store i32 %269, ptr %26, align 4, !tbaa !18
  br label %270

270:                                              ; preds = %289, %262
  %271 = load i32, ptr %26, align 4, !tbaa !18
  %272 = load i32, ptr %13, align 4, !tbaa !18
  %273 = icmp sle i32 %271, %272
  br i1 %273, label %275, label %274

274:                                              ; preds = %270
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %292

275:                                              ; preds = %270
  %276 = load i32, ptr %26, align 4, !tbaa !18
  %277 = load i32, ptr %12, align 4, !tbaa !18
  %278 = load float, ptr %24, align 4, !tbaa !21
  %279 = getelementptr inbounds [3 x i8], ptr %10, i64 0, i64 0
  %280 = load i8, ptr %279, align 1, !tbaa !12
  %281 = getelementptr inbounds [3 x i8], ptr %10, i64 0, i64 1
  %282 = load i8, ptr %281, align 1, !tbaa !12
  %283 = getelementptr inbounds [3 x i8], ptr %10, i64 0, i64 2
  %284 = load i8, ptr %283, align 1, !tbaa !12
  invoke void @_ZN11FrameBuffer8SetPixelEjjfhhh(i32 noundef %276, i32 noundef %277, float noundef %278, i8 noundef zeroext %280, i8 noundef zeroext %282, i8 noundef zeroext %284)
          to label %285 unwind label %433

285:                                              ; preds = %275
  %286 = load float, ptr %21, align 4, !tbaa !21
  %287 = load float, ptr %24, align 4, !tbaa !21
  %288 = fadd float %287, %286
  store float %288, ptr %24, align 4, !tbaa !21
  br label %289

289:                                              ; preds = %285
  %290 = load i32, ptr %26, align 4, !tbaa !18
  %291 = add nsw i32 %290, 1
  store i32 %291, ptr %26, align 4, !tbaa !18
  br label %270, !llvm.loop !26

292:                                              ; preds = %274
  %293 = load float, ptr %25, align 4, !tbaa !21
  %294 = load float, ptr %23, align 4, !tbaa !21
  %295 = fsub float %294, %293
  store float %295, ptr %23, align 4, !tbaa !21
  %296 = load float, ptr %16, align 4, !tbaa !21
  %297 = load float, ptr %14, align 4, !tbaa !21
  %298 = fsub float %297, %296
  store float %298, ptr %14, align 4, !tbaa !21
  %299 = load float, ptr %17, align 4, !tbaa !21
  %300 = load float, ptr %15, align 4, !tbaa !21
  %301 = fsub float %300, %299
  store float %301, ptr %15, align 4, !tbaa !21
  br label %302

302:                                              ; preds = %292
  %303 = load i32, ptr %12, align 4, !tbaa !18
  %304 = add nsw i32 %303, -1
  store i32 %304, ptr %12, align 4, !tbaa !18
  br label %258, !llvm.loop !28

305:                                              ; preds = %258
  %306 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 3
  %307 = load i8, ptr %306, align 8, !tbaa !22, !range !23, !noundef !24
  %308 = trunc i8 %307 to i1
  br i1 %308, label %309, label %343

309:                                              ; preds = %305
  %310 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 1
  %311 = load ptr, ptr %310, align 8, !tbaa !15
  %312 = getelementptr inbounds %class.Point4, ptr %311, i32 0, i32 0
  %313 = getelementptr inbounds %struct.anon, ptr %312, i32 0, i32 0
  %314 = load float, ptr %313, align 4, !tbaa !12
  store float %314, ptr %14, align 4, !tbaa !21
  %315 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 2
  %316 = load ptr, ptr %315, align 8, !tbaa !25
  %317 = getelementptr inbounds %class.Point4, ptr %316, i32 0, i32 0
  %318 = getelementptr inbounds %struct.anon, ptr %317, i32 0, i32 0
  %319 = load float, ptr %318, align 4, !tbaa !12
  %320 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 1
  %321 = load ptr, ptr %320, align 8, !tbaa !15
  %322 = getelementptr inbounds %class.Point4, ptr %321, i32 0, i32 0
  %323 = getelementptr inbounds %struct.anon, ptr %322, i32 0, i32 0
  %324 = load float, ptr %323, align 4, !tbaa !12
  %325 = fsub float %319, %324
  %326 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 2
  %327 = load ptr, ptr %326, align 8, !tbaa !25
  %328 = getelementptr inbounds %class.Point4, ptr %327, i32 0, i32 0
  %329 = getelementptr inbounds %struct.anon, ptr %328, i32 0, i32 1
  %330 = load float, ptr %329, align 4, !tbaa !12
  %331 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 1
  %332 = load ptr, ptr %331, align 8, !tbaa !15
  %333 = getelementptr inbounds %class.Point4, ptr %332, i32 0, i32 0
  %334 = getelementptr inbounds %struct.anon, ptr %333, i32 0, i32 1
  %335 = load float, ptr %334, align 4, !tbaa !12
  %336 = fsub float %330, %335
  %337 = fdiv float %325, %336
  store float %337, ptr %16, align 4, !tbaa !21
  %338 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 1
  %339 = load ptr, ptr %338, align 8, !tbaa !15
  %340 = getelementptr inbounds %class.Point4, ptr %339, i32 0, i32 0
  %341 = getelementptr inbounds %struct.anon, ptr %340, i32 0, i32 2
  %342 = load float, ptr %341, align 4, !tbaa !12
  store float %342, ptr %23, align 4, !tbaa !21
  br label %372

343:                                              ; preds = %305
  %344 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 1
  %345 = load ptr, ptr %344, align 8, !tbaa !15
  %346 = getelementptr inbounds %class.Point4, ptr %345, i32 0, i32 0
  %347 = getelementptr inbounds %struct.anon, ptr %346, i32 0, i32 0
  %348 = load float, ptr %347, align 4, !tbaa !12
  store float %348, ptr %15, align 4, !tbaa !21
  %349 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 2
  %350 = load ptr, ptr %349, align 8, !tbaa !25
  %351 = getelementptr inbounds %class.Point4, ptr %350, i32 0, i32 0
  %352 = getelementptr inbounds %struct.anon, ptr %351, i32 0, i32 0
  %353 = load float, ptr %352, align 4, !tbaa !12
  %354 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 1
  %355 = load ptr, ptr %354, align 8, !tbaa !15
  %356 = getelementptr inbounds %class.Point4, ptr %355, i32 0, i32 0
  %357 = getelementptr inbounds %struct.anon, ptr %356, i32 0, i32 0
  %358 = load float, ptr %357, align 4, !tbaa !12
  %359 = fsub float %353, %358
  %360 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 2
  %361 = load ptr, ptr %360, align 8, !tbaa !25
  %362 = getelementptr inbounds %class.Point4, ptr %361, i32 0, i32 0
  %363 = getelementptr inbounds %struct.anon, ptr %362, i32 0, i32 1
  %364 = load float, ptr %363, align 4, !tbaa !12
  %365 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 1
  %366 = load ptr, ptr %365, align 8, !tbaa !15
  %367 = getelementptr inbounds %class.Point4, ptr %366, i32 0, i32 0
  %368 = getelementptr inbounds %struct.anon, ptr %367, i32 0, i32 1
  %369 = load float, ptr %368, align 4, !tbaa !12
  %370 = fsub float %364, %369
  %371 = fdiv float %359, %370
  store float %371, ptr %17, align 4, !tbaa !21
  br label %372

372:                                              ; preds = %343, %309
  %373 = load float, ptr %22, align 4, !tbaa !21
  %374 = load float, ptr %16, align 4, !tbaa !21
  %375 = load float, ptr %21, align 4, !tbaa !21
  %376 = call float @llvm.fmuladd.f32(float %374, float %375, float %373)
  store float %376, ptr %25, align 4, !tbaa !21
  %377 = getelementptr inbounds %"struct.Graphics::Rasterizer::VertexInf", ptr %9, i32 0, i32 2
  %378 = load ptr, ptr %377, align 8, !tbaa !25
  %379 = getelementptr inbounds %class.Point4, ptr %378, i32 0, i32 0
  %380 = getelementptr inbounds %struct.anon, ptr %379, i32 0, i32 1
  %381 = load float, ptr %380, align 4, !tbaa !12
  %382 = call float @llvm.ceil.f32(float %381)
  %383 = fptosi float %382 to i32
  %384 = add nsw i32 %383, 1
  store i32 %384, ptr %11, align 4, !tbaa !18
  br label %385

385:                                              ; preds = %429, %372
  %386 = load i32, ptr %12, align 4, !tbaa !18
  %387 = load i32, ptr %11, align 4, !tbaa !18
  %388 = icmp sge i32 %386, %387
  br i1 %388, label %389, label %432

389:                                              ; preds = %385
  %390 = load float, ptr %15, align 4, !tbaa !21
  %391 = call float @llvm.floor.f32(float %390)
  %392 = fptosi float %391 to i32
  store i32 %392, ptr %13, align 4, !tbaa !18
  %393 = load float, ptr %23, align 4, !tbaa !21
  store float %393, ptr %24, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %394 = load float, ptr %14, align 4, !tbaa !21
  %395 = call float @llvm.floor.f32(float %394)
  %396 = fptosi float %395 to i32
  store i32 %396, ptr %27, align 4, !tbaa !18
  br label %397

397:                                              ; preds = %416, %389
  %398 = load i32, ptr %27, align 4, !tbaa !18
  %399 = load i32, ptr %13, align 4, !tbaa !18
  %400 = icmp sle i32 %398, %399
  br i1 %400, label %402, label %401

401:                                              ; preds = %397
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %419

402:                                              ; preds = %397
  %403 = load i32, ptr %27, align 4, !tbaa !18
  %404 = load i32, ptr %12, align 4, !tbaa !18
  %405 = load float, ptr %24, align 4, !tbaa !21
  %406 = getelementptr inbounds [3 x i8], ptr %10, i64 0, i64 0
  %407 = load i8, ptr %406, align 1, !tbaa !12
  %408 = getelementptr inbounds [3 x i8], ptr %10, i64 0, i64 1
  %409 = load i8, ptr %408, align 1, !tbaa !12
  %410 = getelementptr inbounds [3 x i8], ptr %10, i64 0, i64 2
  %411 = load i8, ptr %410, align 1, !tbaa !12
  invoke void @_ZN11FrameBuffer8SetPixelEjjfhhh(i32 noundef %403, i32 noundef %404, float noundef %405, i8 noundef zeroext %407, i8 noundef zeroext %409, i8 noundef zeroext %411)
          to label %412 unwind label %433

412:                                              ; preds = %402
  %413 = load float, ptr %21, align 4, !tbaa !21
  %414 = load float, ptr %24, align 4, !tbaa !21
  %415 = fadd float %414, %413
  store float %415, ptr %24, align 4, !tbaa !21
  br label %416

416:                                              ; preds = %412
  %417 = load i32, ptr %27, align 4, !tbaa !18
  %418 = add nsw i32 %417, 1
  store i32 %418, ptr %27, align 4, !tbaa !18
  br label %397, !llvm.loop !29

419:                                              ; preds = %401
  %420 = load float, ptr %25, align 4, !tbaa !21
  %421 = load float, ptr %23, align 4, !tbaa !21
  %422 = fsub float %421, %420
  store float %422, ptr %23, align 4, !tbaa !21
  %423 = load float, ptr %16, align 4, !tbaa !21
  %424 = load float, ptr %14, align 4, !tbaa !21
  %425 = fsub float %424, %423
  store float %425, ptr %14, align 4, !tbaa !21
  %426 = load float, ptr %17, align 4, !tbaa !21
  %427 = load float, ptr %15, align 4, !tbaa !21
  %428 = fsub float %427, %426
  store float %428, ptr %15, align 4, !tbaa !21
  br label %429

429:                                              ; preds = %419
  %430 = load i32, ptr %12, align 4, !tbaa !18
  %431 = add nsw i32 %430, -1
  store i32 %431, ptr %12, align 4, !tbaa !18
  br label %385, !llvm.loop !30

432:                                              ; preds = %385
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 3, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  ret void

433:                                              ; preds = %402, %275, %226, %198, %169
  %434 = landingpad { ptr, i32 }
          catch ptr null
  %435 = extractvalue { ptr, i32 } %434, 0
  call void @__clang_call_terminate(ptr %435) #6
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8Graphics10Rasterizer9VertexInfC2ERK6Point4S4_S4_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #0 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.ceil.f32(float) #2

declare void @_ZN7Vector4C1Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #4

declare void @_ZNK7Vector45CrossERKS_(ptr dead_on_unwind writable sret(%class.Vector4) align 4, ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.floor.f32(float) #2

declare void @_ZN11FrameBuffer8SetPixelEjjfhhh(i32 noundef, i32 noundef, float noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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, !11, i64 0}
!10 = !{!"_ZTSN8Graphics5ColorE", !11, i64 0, !11, i64 4, !11, i64 8}
!11 = !{!"float", !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!10, !11, i64 4}
!14 = !{!10, !11, i64 8}
!15 = !{!16, !6, i64 8}
!16 = !{!"_ZTSN8Graphics10Rasterizer9VertexInfE", !6, i64 0, !6, i64 8, !6, i64 16, !17, i64 24}
!17 = !{!"bool", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!16, !6, i64 0}
!21 = !{!11, !11, i64 0}
!22 = !{!16, !17, i64 24}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!16, !6, i64 16}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = distinct !{!29, !27}
!30 = distinct !{!30, !27}


; 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.Graphics::Rasterizer::VertexInf" = type <{ ptr, ptr, ptr, i8, [7 x i8] }>
%class.Vector4 = type { %union.anon.0 }
%union.anon.0 = type { [4 x float] }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN8Graphics10Rasterizer12DrawTriangleERK6Point4S3_S3_RKNS_5ColorE(ptr noundef nonnull align 4 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(16) %2, ptr nocapture noundef nonnull readonly align 4 dereferenceable(12) %3) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.Graphics::Rasterizer::VertexInf", align 8
  %6 = alloca %class.Vector4, align 4
  %7 = alloca %class.Vector4, align 4
  %8 = alloca %class.Vector4, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @_ZN8Graphics10Rasterizer9VertexInfC2ERK6Point4S4_S4_(ptr noundef nonnull align 8 dereferenceable(25) %5, ptr noundef nonnull align 4 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(16) %2) #5
  %9 = load float, ptr %3, align 4, !tbaa !5
  %10 = fptoui float %9 to i8
  %11 = getelementptr inbounds i8, ptr %3, i64 4
  %12 = load float, ptr %11, align 4, !tbaa !10
  %13 = fptoui float %12 to i8
  %14 = getelementptr inbounds i8, ptr %3, i64 8
  %15 = load float, ptr %14, align 4, !tbaa !11
  %16 = fptoui float %15 to i8
  %17 = getelementptr inbounds i8, ptr %5, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  %19 = getelementptr inbounds i8, ptr %18, i64 4
  %20 = load float, ptr %19, align 4, !tbaa !16
  %21 = call float @llvm.ceil.f32(float %20)
  %22 = fptosi float %21 to i32
  %23 = load ptr, ptr %5, align 8, !tbaa !17
  %24 = load <2 x float>, ptr %23, align 4, !tbaa !16
  %25 = extractelement <2 x float> %24, i64 1
  %26 = call float @llvm.ceil.f32(float %25)
  %27 = fptosi float %26 to i32
  %28 = getelementptr inbounds i8, ptr %5, i64 24
  %29 = load i8, ptr %28, align 8, !tbaa !18, !range !19, !noundef !20
  %30 = trunc nuw i8 %29 to i1
  br i1 %30, label %31, label %43

31:                                               ; preds = %4
  %32 = load float, ptr %18, align 4, !tbaa !16
  %33 = insertelement <2 x float> poison, float %32, i64 0
  %34 = insertelement <2 x float> %33, float %20, i64 1
  %35 = fsub <2 x float> %34, %24
  %36 = extractelement <2 x float> %35, i64 0
  %37 = extractelement <2 x float> %35, i64 1
  %38 = fdiv float %36, %37
  %39 = getelementptr inbounds i8, ptr %5, i64 16
  %40 = load ptr, ptr %39, align 8, !tbaa !21
  %41 = getelementptr inbounds i8, ptr %40, i64 4
  %42 = load float, ptr %41, align 4, !tbaa !16
  br label %51

43:                                               ; preds = %4
  %44 = getelementptr inbounds i8, ptr %5, i64 16
  %45 = load ptr, ptr %44, align 8, !tbaa !21
  %46 = load <2 x float>, ptr %45, align 4, !tbaa !16
  %47 = fsub <2 x float> %46, %24
  %48 = extractelement <2 x float> %47, i64 0
  %49 = extractelement <2 x float> %47, i64 1
  %50 = fdiv float %48, %49
  br label %51

51:                                               ; preds = %43, %31
  %.sink124 = phi float [ %20, %43 ], [ %42, %31 ]
  %.pn.in = phi ptr [ %18, %43 ], [ %40, %31 ]
  %52 = phi float [ %50, %43 ], [ %38, %31 ]
  %.pn = load float, ptr %.pn.in, align 4, !tbaa !16
  %53 = extractelement <2 x float> %24, i64 0
  %.sink = fsub float %.pn, %53
  %54 = fsub float %.sink124, %25
  %55 = fdiv float %.sink, %54
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %56 = load float, ptr %0, align 4, !tbaa !16
  %57 = load float, ptr %1, align 4, !tbaa !16
  %58 = fsub float %56, %57
  %59 = getelementptr inbounds i8, ptr %0, i64 4
  %60 = load float, ptr %59, align 4, !tbaa !16
  %61 = getelementptr inbounds i8, ptr %1, i64 4
  %62 = load float, ptr %61, align 4, !tbaa !16
  %63 = fsub float %60, %62
  %64 = getelementptr inbounds i8, ptr %0, i64 8
  %65 = load float, ptr %64, align 4, !tbaa !16
  %66 = getelementptr inbounds i8, ptr %1, i64 8
  %67 = load float, ptr %66, align 4, !tbaa !16
  %68 = fsub float %65, %67
  invoke void @_ZN7Vector4C1Effff(ptr noundef nonnull align 4 dereferenceable(16) %7, float noundef %58, float noundef %63, float noundef %68, float noundef 0.000000e+00)
          to label %69 unwind label %.loopexit.split-lp.loopexit.split-lp

69:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %70 = load float, ptr %0, align 4, !tbaa !16
  %71 = load float, ptr %2, align 4, !tbaa !16
  %72 = fsub float %70, %71
  %73 = load float, ptr %59, align 4, !tbaa !16
  %74 = getelementptr inbounds i8, ptr %2, i64 4
  %75 = load float, ptr %74, align 4, !tbaa !16
  %76 = fsub float %73, %75
  %77 = load float, ptr %64, align 4, !tbaa !16
  %78 = getelementptr inbounds i8, ptr %2, i64 8
  %79 = load float, ptr %78, align 4, !tbaa !16
  %80 = fsub float %77, %79
  invoke void @_ZN7Vector4C1Effff(ptr noundef nonnull align 4 dereferenceable(16) %8, float noundef %72, float noundef %76, float noundef %80, float noundef 0.000000e+00)
          to label %81 unwind label %.loopexit.split-lp.loopexit.split-lp

81:                                               ; preds = %69
  invoke void @_ZNK7Vector45CrossERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector4) align 4 %6, ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(16) %8)
          to label %82 unwind label %.loopexit.split-lp.loopexit.split-lp

82:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  %83 = load float, ptr %6, align 4, !tbaa !16
  %84 = fneg float %83
  %85 = getelementptr inbounds i8, ptr %6, i64 8
  %86 = load float, ptr %85, align 4, !tbaa !16
  %87 = fdiv float %84, %86
  %88 = getelementptr inbounds i8, ptr %6, i64 4
  %89 = load float, ptr %88, align 4, !tbaa !16
  %90 = fneg float %89
  %91 = fdiv float %90, %86
  %92 = load ptr, ptr %5, align 8, !tbaa !17
  %93 = getelementptr inbounds i8, ptr %92, i64 8
  %94 = load float, ptr %93, align 4, !tbaa !16
  %95 = call float @llvm.fmuladd.f32(float %52, float %87, float %91)
  %96 = icmp sgt i32 %27, %22
  br i1 %96, label %.lr.ph97, label %._crit_edge98

.lr.ph97:                                         ; preds = %82, %._crit_edge
  %.06995 = phi float [ %101, %._crit_edge ], [ %94, %82 ]
  %.07194 = phi i32 [ %104, %._crit_edge ], [ %27, %82 ]
  %.07593 = phi float [ %103, %._crit_edge ], [ %53, %82 ]
  %.07892 = phi float [ %102, %._crit_edge ], [ %53, %82 ]
  %97 = call float @llvm.floor.f32(float %.07593)
  %98 = fptosi float %97 to i32
  %99 = call float @llvm.floor.f32(float %.07892)
  %100 = fptosi float %99 to i32
  %.not8189 = icmp sgt i32 %100, %98
  br i1 %.not8189, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %106, %.lr.ph97
  %101 = fsub float %.06995, %95
  %102 = fsub float %.07892, %52
  %103 = fsub float %.07593, %55
  %104 = add nsw i32 %.07194, -1
  %105 = icmp sgt i32 %104, %22
  br i1 %105, label %.lr.ph97, label %._crit_edge98, !llvm.loop !22

.lr.ph:                                           ; preds = %.lr.ph97, %106
  %.06791 = phi i32 [ %108, %106 ], [ %100, %.lr.ph97 ]
  %.06890 = phi float [ %107, %106 ], [ %.06995, %.lr.ph97 ]
  invoke void @_ZN11FrameBuffer8SetPixelEjjfhhh(i32 noundef %.06791, i32 noundef %.07194, float noundef %.06890, i8 noundef zeroext %10, i8 noundef zeroext %13, i8 noundef zeroext %16)
          to label %106 unwind label %.loopexit.split-lp.loopexit

106:                                              ; preds = %.lr.ph
  %107 = fadd float %87, %.06890
  %108 = add i32 %.06791, 1
  %exitcond.not = icmp eq i32 %.06791, %98
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !24

._crit_edge98:                                    ; preds = %._crit_edge, %82
  %.078.lcssa = phi float [ %53, %82 ], [ %102, %._crit_edge ]
  %.075.lcssa = phi float [ %53, %82 ], [ %103, %._crit_edge ]
  %.071.lcssa = phi i32 [ %27, %82 ], [ %22, %._crit_edge ]
  %.069.lcssa = phi float [ %94, %82 ], [ %101, %._crit_edge ]
  %109 = load i8, ptr %28, align 8, !tbaa !18, !range !19, !noundef !20
  %110 = trunc nuw i8 %109 to i1
  %111 = load ptr, ptr %17, align 8, !tbaa !12
  %112 = getelementptr inbounds i8, ptr %5, i64 16
  %113 = load ptr, ptr %112, align 8, !tbaa !21
  %114 = load <2 x float>, ptr %113, align 4, !tbaa !16
  %115 = load <2 x float>, ptr %111, align 4, !tbaa !16
  %116 = fsub <2 x float> %114, %115
  %117 = extractelement <2 x float> %116, i64 0
  %118 = extractelement <2 x float> %116, i64 1
  %119 = fdiv float %117, %118
  %120 = extractelement <2 x float> %115, i64 0
  br i1 %110, label %121, label %124

121:                                              ; preds = %._crit_edge98
  %122 = getelementptr inbounds i8, ptr %111, i64 8
  %123 = load float, ptr %122, align 4, !tbaa !16
  %.pre = call float @llvm.fmuladd.f32(float %119, float %87, float %91)
  br label %124

124:                                              ; preds = %._crit_edge98, %121
  %.pre-phi = phi float [ %.pre, %121 ], [ %95, %._crit_edge98 ]
  %.179 = phi float [ %120, %121 ], [ %.078.lcssa, %._crit_edge98 ]
  %.176 = phi float [ %.075.lcssa, %121 ], [ %120, %._crit_edge98 ]
  %.074 = phi float [ %119, %121 ], [ %52, %._crit_edge98 ]
  %.073 = phi float [ %55, %121 ], [ %119, %._crit_edge98 ]
  %.170 = phi float [ %123, %121 ], [ %.069.lcssa, %._crit_edge98 ]
  %125 = extractelement <2 x float> %114, i64 1
  %126 = call float @llvm.ceil.f32(float %125)
  %127 = fptosi float %126 to i32
  %.not.not108 = icmp sgt i32 %.071.lcssa, %127
  br i1 %.not.not108, label %.lr.ph114, label %._crit_edge115

.lr.ph114:                                        ; preds = %124, %._crit_edge107
  %.2112 = phi float [ %132, %._crit_edge107 ], [ %.170, %124 ]
  %.172111 = phi i32 [ %135, %._crit_edge107 ], [ %.071.lcssa, %124 ]
  %.277110 = phi float [ %134, %._crit_edge107 ], [ %.176, %124 ]
  %.280109 = phi float [ %133, %._crit_edge107 ], [ %.179, %124 ]
  %128 = call float @llvm.floor.f32(float %.277110)
  %129 = fptosi float %128 to i32
  %130 = call float @llvm.floor.f32(float %.280109)
  %131 = fptosi float %130 to i32
  %.not102 = icmp sgt i32 %131, %129
  br i1 %.not102, label %._crit_edge107, label %.lr.ph106

._crit_edge107:                                   ; preds = %136, %.lr.ph114
  %132 = fsub float %.2112, %.pre-phi
  %133 = fsub float %.280109, %.074
  %134 = fsub float %.277110, %.073
  %135 = add nsw i32 %.172111, -1
  %.not.not = icmp sgt i32 %135, %127
  br i1 %.not.not, label %.lr.ph114, label %._crit_edge115, !llvm.loop !25

.lr.ph106:                                        ; preds = %.lr.ph114, %136
  %.0104 = phi i32 [ %138, %136 ], [ %131, %.lr.ph114 ]
  %.1103 = phi float [ %137, %136 ], [ %.2112, %.lr.ph114 ]
  invoke void @_ZN11FrameBuffer8SetPixelEjjfhhh(i32 noundef %.0104, i32 noundef %.172111, float noundef %.1103, i8 noundef zeroext %10, i8 noundef zeroext %13, i8 noundef zeroext %16)
          to label %136 unwind label %.loopexit

136:                                              ; preds = %.lr.ph106
  %137 = fadd float %87, %.1103
  %138 = add i32 %.0104, 1
  %exitcond120.not = icmp eq i32 %.0104, %129
  br i1 %exitcond120.not, label %._crit_edge107, label %.lr.ph106, !llvm.loop !26

._crit_edge115:                                   ; preds = %._crit_edge107, %124
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  ret void

.loopexit:                                        ; preds = %.lr.ph106
  %lpad.loopexit = landingpad { ptr, i32 }
          catch ptr null
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %.lr.ph
  %lpad.loopexit82 = landingpad { ptr, i32 }
          catch ptr null
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %81, %69, %51
  %lpad.loopexit.split-lp83 = landingpad { ptr, i32 }
          catch ptr null
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit82, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp83, %.loopexit.split-lp.loopexit.split-lp ]
  %139 = extractvalue { ptr, i32 } %lpad.phi, 0
  call void @__clang_call_terminate(ptr %139) #6
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8Graphics10Rasterizer9VertexInfC2ERK6Point4S4_S4_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.ceil.f32(float) #2

declare void @_ZN7Vector4C1Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #4

declare void @_ZNK7Vector45CrossERKS_(ptr dead_on_unwind writable sret(%class.Vector4) align 4, ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.floor.f32(float) #2

declare void @_ZN11FrameBuffer8SetPixelEjjfhhh(i32 noundef, i32 noundef, float noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #3

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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, !7, i64 0}
!6 = !{!"_ZTSN8Graphics5ColorE", !7, i64 0, !7, i64 4, !7, i64 8}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!6, !7, i64 8}
!12 = !{!13, !14, i64 8}
!13 = !{!"_ZTSN8Graphics10Rasterizer9VertexInfE", !14, i64 0, !14, i64 8, !14, i64 16, !15, i64 24}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"bool", !8, i64 0}
!16 = !{!8, !8, i64 0}
!17 = !{!13, !14, i64 0}
!18 = !{!13, !15, i64 24}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!13, !14, i64 16}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass