; LLVM IR from casensiom/fast-image-processing :: src (perspective)

; 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.STextureTriangle = type { [3 x %struct.STextureVector], i32 }
%struct.STextureVector = type { i32, i32, 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: nounwind uwtable
declare dso_local i32 @check_side(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @get_barycentric(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @get_cartesian(ptr noundef, double noundef, double noundef, double noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @write_pixel(ptr noundef, ptr noundef, i32 noundef, i32 noundef, float noundef, float noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @render_textured_triangle(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #2
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.STextureTriangle, ptr %27, i32 0, i32 0
  %29 = getelementptr inbounds [3 x %struct.STextureVector], ptr %28, i64 0, i64 0
  %30 = getelementptr inbounds %struct.STextureVector, ptr %29, i32 0, i32 0
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.STextureTriangle, ptr %32, i32 0, i32 0
  %34 = getelementptr inbounds [3 x %struct.STextureVector], ptr %33, i64 0, i64 1
  %35 = getelementptr inbounds %struct.STextureVector, ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.STextureTriangle, ptr %37, i32 0, i32 0
  %39 = getelementptr inbounds [3 x %struct.STextureVector], ptr %38, i64 0, i64 2
  %40 = getelementptr inbounds %struct.STextureVector, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = icmp slt i32 %36, %41
  br i1 %42, label %43, label %49

43:                                               ; preds = %3
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.STextureTriangle, ptr %44, i32 0, i32 0
  %46 = getelementptr inbounds [3 x %struct.STextureVector], ptr %45, i64 0, i64 1
  %47 = getelementptr inbounds %struct.STextureVector, ptr %46, i32 0, i32 0
  %48 = load i32, ptr %47, align 4, !tbaa !9
  br label %55

49:                                               ; preds = %3
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.STextureTriangle, ptr %50, i32 0, i32 0
  %52 = getelementptr inbounds [3 x %struct.STextureVector], ptr %51, i64 0, i64 2
  %53 = getelementptr inbounds %struct.STextureVector, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %49, %43
  %56 = phi i32 [ %48, %43 ], [ %54, %49 ]
  %57 = icmp slt i32 %31, %56
  br i1 %57, label %58, label %64

58:                                               ; preds = %55
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.STextureTriangle, ptr %59, i32 0, i32 0
  %61 = getelementptr inbounds [3 x %struct.STextureVector], ptr %60, i64 0, i64 0
  %62 = getelementptr inbounds %struct.STextureVector, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 4, !tbaa !9
  br label %90

64:                                               ; preds = %55
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.STextureTriangle, ptr %65, i32 0, i32 0
  %67 = getelementptr inbounds [3 x %struct.STextureVector], ptr %66, i64 0, i64 1
  %68 = getelementptr inbounds %struct.STextureVector, ptr %67, i32 0, i32 0
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.STextureTriangle, ptr %70, i32 0, i32 0
  %72 = getelementptr inbounds [3 x %struct.STextureVector], ptr %71, i64 0, i64 2
  %73 = getelementptr inbounds %struct.STextureVector, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 4, !tbaa !9
  %75 = icmp slt i32 %69, %74
  br i1 %75, label %76, label %82

76:                                               ; preds = %64
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.STextureTriangle, ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds [3 x %struct.STextureVector], ptr %78, i64 0, i64 1
  %80 = getelementptr inbounds %struct.STextureVector, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 4, !tbaa !9
  br label %88

82:                                               ; preds = %64
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.STextureTriangle, ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds [3 x %struct.STextureVector], ptr %84, i64 0, i64 2
  %86 = getelementptr inbounds %struct.STextureVector, ptr %85, i32 0, i32 0
  %87 = load i32, ptr %86, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %82, %76
  %89 = phi i32 [ %81, %76 ], [ %87, %82 ]
  br label %90

90:                                               ; preds = %88, %58
  %91 = phi i32 [ %63, %58 ], [ %89, %88 ]
  store i32 %91, ptr %14, align 4, !tbaa !13
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.STextureTriangle, ptr %92, i32 0, i32 0
  %94 = getelementptr inbounds [3 x %struct.STextureVector], ptr %93, i64 0, i64 0
  %95 = getelementptr inbounds %struct.STextureVector, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 4, !tbaa !14
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.STextureTriangle, ptr %97, i32 0, i32 0
  %99 = getelementptr inbounds [3 x %struct.STextureVector], ptr %98, i64 0, i64 1
  %100 = getelementptr inbounds %struct.STextureVector, ptr %99, i32 0, i32 1
  %101 = load i32, ptr %100, align 4, !tbaa !14
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.STextureTriangle, ptr %102, i32 0, i32 0
  %104 = getelementptr inbounds [3 x %struct.STextureVector], ptr %103, i64 0, i64 2
  %105 = getelementptr inbounds %struct.STextureVector, ptr %104, i32 0, i32 1
  %106 = load i32, ptr %105, align 4, !tbaa !14
  %107 = icmp slt i32 %101, %106
  br i1 %107, label %108, label %114

108:                                              ; preds = %90
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.STextureTriangle, ptr %109, i32 0, i32 0
  %111 = getelementptr inbounds [3 x %struct.STextureVector], ptr %110, i64 0, i64 1
  %112 = getelementptr inbounds %struct.STextureVector, ptr %111, i32 0, i32 1
  %113 = load i32, ptr %112, align 4, !tbaa !14
  br label %120

114:                                              ; preds = %90
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.STextureTriangle, ptr %115, i32 0, i32 0
  %117 = getelementptr inbounds [3 x %struct.STextureVector], ptr %116, i64 0, i64 2
  %118 = getelementptr inbounds %struct.STextureVector, ptr %117, i32 0, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !14
  br label %120

120:                                              ; preds = %114, %108
  %121 = phi i32 [ %113, %108 ], [ %119, %114 ]
  %122 = icmp slt i32 %96, %121
  br i1 %122, label %123, label %129

123:                                              ; preds = %120
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.STextureTriangle, ptr %124, i32 0, i32 0
  %126 = getelementptr inbounds [3 x %struct.STextureVector], ptr %125, i64 0, i64 0
  %127 = getelementptr inbounds %struct.STextureVector, ptr %126, i32 0, i32 1
  %128 = load i32, ptr %127, align 4, !tbaa !14
  br label %155

129:                                              ; preds = %120
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.STextureTriangle, ptr %130, i32 0, i32 0
  %132 = getelementptr inbounds [3 x %struct.STextureVector], ptr %131, i64 0, i64 1
  %133 = getelementptr inbounds %struct.STextureVector, ptr %132, i32 0, i32 1
  %134 = load i32, ptr %133, align 4, !tbaa !14
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.STextureTriangle, ptr %135, i32 0, i32 0
  %137 = getelementptr inbounds [3 x %struct.STextureVector], ptr %136, i64 0, i64 2
  %138 = getelementptr inbounds %struct.STextureVector, ptr %137, i32 0, i32 1
  %139 = load i32, ptr %138, align 4, !tbaa !14
  %140 = icmp slt i32 %134, %139
  br i1 %140, label %141, label %147

141:                                              ; preds = %129
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.STextureTriangle, ptr %142, i32 0, i32 0
  %144 = getelementptr inbounds [3 x %struct.STextureVector], ptr %143, i64 0, i64 1
  %145 = getelementptr inbounds %struct.STextureVector, ptr %144, i32 0, i32 1
  %146 = load i32, ptr %145, align 4, !tbaa !14
  br label %153

147:                                              ; preds = %129
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.STextureTriangle, ptr %148, i32 0, i32 0
  %150 = getelementptr inbounds [3 x %struct.STextureVector], ptr %149, i64 0, i64 2
  %151 = getelementptr inbounds %struct.STextureVector, ptr %150, i32 0, i32 1
  %152 = load i32, ptr %151, align 4, !tbaa !14
  br label %153

153:                                              ; preds = %147, %141
  %154 = phi i32 [ %146, %141 ], [ %152, %147 ]
  br label %155

155:                                              ; preds = %153, %123
  %156 = phi i32 [ %128, %123 ], [ %154, %153 ]
  store i32 %156, ptr %15, align 4, !tbaa !13
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.STextureTriangle, ptr %157, i32 0, i32 0
  %159 = getelementptr inbounds [3 x %struct.STextureVector], ptr %158, i64 0, i64 0
  %160 = getelementptr inbounds %struct.STextureVector, ptr %159, i32 0, i32 0
  %161 = load i32, ptr %160, align 4, !tbaa !9
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.STextureTriangle, ptr %162, i32 0, i32 0
  %164 = getelementptr inbounds [3 x %struct.STextureVector], ptr %163, i64 0, i64 1
  %165 = getelementptr inbounds %struct.STextureVector, ptr %164, i32 0, i32 0
  %166 = load i32, ptr %165, align 4, !tbaa !9
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.STextureTriangle, ptr %167, i32 0, i32 0
  %169 = getelementptr inbounds [3 x %struct.STextureVector], ptr %168, i64 0, i64 2
  %170 = getelementptr inbounds %struct.STextureVector, ptr %169, i32 0, i32 0
  %171 = load i32, ptr %170, align 4, !tbaa !9
  %172 = icmp sgt i32 %166, %171
  br i1 %172, label %173, label %179

173:                                              ; preds = %155
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.STextureTriangle, ptr %174, i32 0, i32 0
  %176 = getelementptr inbounds [3 x %struct.STextureVector], ptr %175, i64 0, i64 1
  %177 = getelementptr inbounds %struct.STextureVector, ptr %176, i32 0, i32 0
  %178 = load i32, ptr %177, align 4, !tbaa !9
  br label %185

179:                                              ; preds = %155
  %180 = load ptr, ptr %4, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.STextureTriangle, ptr %180, i32 0, i32 0
  %182 = getelementptr inbounds [3 x %struct.STextureVector], ptr %181, i64 0, i64 2
  %183 = getelementptr inbounds %struct.STextureVector, ptr %182, i32 0, i32 0
  %184 = load i32, ptr %183, align 4, !tbaa !9
  br label %185

185:                                              ; preds = %179, %173
  %186 = phi i32 [ %178, %173 ], [ %184, %179 ]
  %187 = icmp sgt i32 %161, %186
  br i1 %187, label %188, label %194

188:                                              ; preds = %185
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.STextureTriangle, ptr %189, i32 0, i32 0
  %191 = getelementptr inbounds [3 x %struct.STextureVector], ptr %190, i64 0, i64 0
  %192 = getelementptr inbounds %struct.STextureVector, ptr %191, i32 0, i32 0
  %193 = load i32, ptr %192, align 4, !tbaa !9
  br label %220

194:                                              ; preds = %185
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.STextureTriangle, ptr %195, i32 0, i32 0
  %197 = getelementptr inbounds [3 x %struct.STextureVector], ptr %196, i64 0, i64 1
  %198 = getelementptr inbounds %struct.STextureVector, ptr %197, i32 0, i32 0
  %199 = load i32, ptr %198, align 4, !tbaa !9
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.STextureTriangle, ptr %200, i32 0, i32 0
  %202 = getelementptr inbounds [3 x %struct.STextureVector], ptr %201, i64 0, i64 2
  %203 = getelementptr inbounds %struct.STextureVector, ptr %202, i32 0, i32 0
  %204 = load i32, ptr %203, align 4, !tbaa !9
  %205 = icmp sgt i32 %199, %204
  br i1 %205, label %206, label %212

206:                                              ; preds = %194
  %207 = load ptr, ptr %4, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.STextureTriangle, ptr %207, i32 0, i32 0
  %209 = getelementptr inbounds [3 x %struct.STextureVector], ptr %208, i64 0, i64 1
  %210 = getelementptr inbounds %struct.STextureVector, ptr %209, i32 0, i32 0
  %211 = load i32, ptr %210, align 4, !tbaa !9
  br label %218

212:                                              ; preds = %194
  %213 = load ptr, ptr %4, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.STextureTriangle, ptr %213, i32 0, i32 0
  %215 = getelementptr inbounds [3 x %struct.STextureVector], ptr %214, i64 0, i64 2
  %216 = getelementptr inbounds %struct.STextureVector, ptr %215, i32 0, i32 0
  %217 = load i32, ptr %216, align 4, !tbaa !9
  br label %218

218:                                              ; preds = %212, %206
  %219 = phi i32 [ %211, %206 ], [ %217, %212 ]
  br label %220

220:                                              ; preds = %218, %188
  %221 = phi i32 [ %193, %188 ], [ %219, %218 ]
  store i32 %221, ptr %16, align 4, !tbaa !13
  %222 = load ptr, ptr %4, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.STextureTriangle, ptr %222, i32 0, i32 0
  %224 = getelementptr inbounds [3 x %struct.STextureVector], ptr %223, i64 0, i64 0
  %225 = getelementptr inbounds %struct.STextureVector, ptr %224, i32 0, i32 1
  %226 = load i32, ptr %225, align 4, !tbaa !14
  %227 = load ptr, ptr %4, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.STextureTriangle, ptr %227, i32 0, i32 0
  %229 = getelementptr inbounds [3 x %struct.STextureVector], ptr %228, i64 0, i64 1
  %230 = getelementptr inbounds %struct.STextureVector, ptr %229, i32 0, i32 1
  %231 = load i32, ptr %230, align 4, !tbaa !14
  %232 = load ptr, ptr %4, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.STextureTriangle, ptr %232, i32 0, i32 0
  %234 = getelementptr inbounds [3 x %struct.STextureVector], ptr %233, i64 0, i64 2
  %235 = getelementptr inbounds %struct.STextureVector, ptr %234, i32 0, i32 1
  %236 = load i32, ptr %235, align 4, !tbaa !14
  %237 = icmp sgt i32 %231, %236
  br i1 %237, label %238, label %244

238:                                              ; preds = %220
  %239 = load ptr, ptr %4, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.STextureTriangle, ptr %239, i32 0, i32 0
  %241 = getelementptr inbounds [3 x %struct.STextureVector], ptr %240, i64 0, i64 1
  %242 = getelementptr inbounds %struct.STextureVector, ptr %241, i32 0, i32 1
  %243 = load i32, ptr %242, align 4, !tbaa !14
  br label %250

244:                                              ; preds = %220
  %245 = load ptr, ptr %4, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.STextureTriangle, ptr %245, i32 0, i32 0
  %247 = getelementptr inbounds [3 x %struct.STextureVector], ptr %246, i64 0, i64 2
  %248 = getelementptr inbounds %struct.STextureVector, ptr %247, i32 0, i32 1
  %249 = load i32, ptr %248, align 4, !tbaa !14
  br label %250

250:                                              ; preds = %244, %238
  %251 = phi i32 [ %243, %238 ], [ %249, %244 ]
  %252 = icmp sgt i32 %226, %251
  br i1 %252, label %253, label %259

253:                                              ; preds = %250
  %254 = load ptr, ptr %4, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.STextureTriangle, ptr %254, i32 0, i32 0
  %256 = getelementptr inbounds [3 x %struct.STextureVector], ptr %255, i64 0, i64 0
  %257 = getelementptr inbounds %struct.STextureVector, ptr %256, i32 0, i32 1
  %258 = load i32, ptr %257, align 4, !tbaa !14
  br label %285

259:                                              ; preds = %250
  %260 = load ptr, ptr %4, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.STextureTriangle, ptr %260, i32 0, i32 0
  %262 = getelementptr inbounds [3 x %struct.STextureVector], ptr %261, i64 0, i64 1
  %263 = getelementptr inbounds %struct.STextureVector, ptr %262, i32 0, i32 1
  %264 = load i32, ptr %263, align 4, !tbaa !14
  %265 = load ptr, ptr %4, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.STextureTriangle, ptr %265, i32 0, i32 0
  %267 = getelementptr inbounds [3 x %struct.STextureVector], ptr %266, i64 0, i64 2
  %268 = getelementptr inbounds %struct.STextureVector, ptr %267, i32 0, i32 1
  %269 = load i32, ptr %268, align 4, !tbaa !14
  %270 = icmp sgt i32 %264, %269
  br i1 %270, label %271, label %277

271:                                              ; preds = %259
  %272 = load ptr, ptr %4, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.STextureTriangle, ptr %272, i32 0, i32 0
  %274 = getelementptr inbounds [3 x %struct.STextureVector], ptr %273, i64 0, i64 1
  %275 = getelementptr inbounds %struct.STextureVector, ptr %274, i32 0, i32 1
  %276 = load i32, ptr %275, align 4, !tbaa !14
  br label %283

277:                                              ; preds = %259
  %278 = load ptr, ptr %4, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.STextureTriangle, ptr %278, i32 0, i32 0
  %280 = getelementptr inbounds [3 x %struct.STextureVector], ptr %279, i64 0, i64 2
  %281 = getelementptr inbounds %struct.STextureVector, ptr %280, i32 0, i32 1
  %282 = load i32, ptr %281, align 4, !tbaa !14
  br label %283

283:                                              ; preds = %277, %271
  %284 = phi i32 [ %276, %271 ], [ %282, %277 ]
  br label %285

285:                                              ; preds = %283, %253
  %286 = phi i32 [ %258, %253 ], [ %284, %283 ]
  store i32 %286, ptr %17, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #2
  %287 = load ptr, ptr %4, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.STextureTriangle, ptr %287, i32 0, i32 0
  %289 = getelementptr inbounds [3 x %struct.STextureVector], ptr %288, i64 0, i64 1
  %290 = getelementptr inbounds %struct.STextureVector, ptr %289, i32 0, i32 0
  %291 = load i32, ptr %290, align 4, !tbaa !9
  %292 = load ptr, ptr %4, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.STextureTriangle, ptr %292, i32 0, i32 0
  %294 = getelementptr inbounds [3 x %struct.STextureVector], ptr %293, i64 0, i64 0
  %295 = getelementptr inbounds %struct.STextureVector, ptr %294, i32 0, i32 0
  %296 = load i32, ptr %295, align 4, !tbaa !9
  %297 = sub nsw i32 %291, %296
  store i32 %297, ptr %21, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #2
  %298 = load ptr, ptr %4, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.STextureTriangle, ptr %298, i32 0, i32 0
  %300 = getelementptr inbounds [3 x %struct.STextureVector], ptr %299, i64 0, i64 2
  %301 = getelementptr inbounds %struct.STextureVector, ptr %300, i32 0, i32 0
  %302 = load i32, ptr %301, align 4, !tbaa !9
  %303 = load ptr, ptr %4, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.STextureTriangle, ptr %303, i32 0, i32 0
  %305 = getelementptr inbounds [3 x %struct.STextureVector], ptr %304, i64 0, i64 1
  %306 = getelementptr inbounds %struct.STextureVector, ptr %305, i32 0, i32 0
  %307 = load i32, ptr %306, align 4, !tbaa !9
  %308 = sub nsw i32 %302, %307
  store i32 %308, ptr %22, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #2
  %309 = load ptr, ptr %4, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.STextureTriangle, ptr %309, i32 0, i32 0
  %311 = getelementptr inbounds [3 x %struct.STextureVector], ptr %310, i64 0, i64 0
  %312 = getelementptr inbounds %struct.STextureVector, ptr %311, i32 0, i32 0
  %313 = load i32, ptr %312, align 4, !tbaa !9
  %314 = load ptr, ptr %4, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.STextureTriangle, ptr %314, i32 0, i32 0
  %316 = getelementptr inbounds [3 x %struct.STextureVector], ptr %315, i64 0, i64 2
  %317 = getelementptr inbounds %struct.STextureVector, ptr %316, i32 0, i32 0
  %318 = load i32, ptr %317, align 4, !tbaa !9
  %319 = sub nsw i32 %313, %318
  store i32 %319, ptr %23, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #2
  %320 = load ptr, ptr %4, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.STextureTriangle, ptr %320, i32 0, i32 0
  %322 = getelementptr inbounds [3 x %struct.STextureVector], ptr %321, i64 0, i64 1
  %323 = getelementptr inbounds %struct.STextureVector, ptr %322, i32 0, i32 1
  %324 = load i32, ptr %323, align 4, !tbaa !14
  %325 = load ptr, ptr %4, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.STextureTriangle, ptr %325, i32 0, i32 0
  %327 = getelementptr inbounds [3 x %struct.STextureVector], ptr %326, i64 0, i64 0
  %328 = getelementptr inbounds %struct.STextureVector, ptr %327, i32 0, i32 1
  %329 = load i32, ptr %328, align 4, !tbaa !14
  %330 = sub nsw i32 %324, %329
  store i32 %330, ptr %24, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #2
  %331 = load ptr, ptr %4, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.STextureTriangle, ptr %331, i32 0, i32 0
  %333 = getelementptr inbounds [3 x %struct.STextureVector], ptr %332, i64 0, i64 2
  %334 = getelementptr inbounds %struct.STextureVector, ptr %333, i32 0, i32 1
  %335 = load i32, ptr %334, align 4, !tbaa !14
  %336 = load ptr, ptr %4, align 8, !tbaa !5
  %337 = getelementptr inbounds %struct.STextureTriangle, ptr %336, i32 0, i32 0
  %338 = getelementptr inbounds [3 x %struct.STextureVector], ptr %337, i64 0, i64 1
  %339 = getelementptr inbounds %struct.STextureVector, ptr %338, i32 0, i32 1
  %340 = load i32, ptr %339, align 4, !tbaa !14
  %341 = sub nsw i32 %335, %340
  store i32 %341, ptr %25, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #2
  %342 = load ptr, ptr %4, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.STextureTriangle, ptr %342, i32 0, i32 0
  %344 = getelementptr inbounds [3 x %struct.STextureVector], ptr %343, i64 0, i64 0
  %345 = getelementptr inbounds %struct.STextureVector, ptr %344, i32 0, i32 1
  %346 = load i32, ptr %345, align 4, !tbaa !14
  %347 = load ptr, ptr %4, align 8, !tbaa !5
  %348 = getelementptr inbounds %struct.STextureTriangle, ptr %347, i32 0, i32 0
  %349 = getelementptr inbounds [3 x %struct.STextureVector], ptr %348, i64 0, i64 2
  %350 = getelementptr inbounds %struct.STextureVector, ptr %349, i32 0, i32 1
  %351 = load i32, ptr %350, align 4, !tbaa !14
  %352 = sub nsw i32 %346, %351
  store i32 %352, ptr %26, align 4, !tbaa !13
  %353 = load i32, ptr %15, align 4, !tbaa !13
  store i32 %353, ptr %8, align 4, !tbaa !13
  br label %354

354:                                              ; preds = %446, %285
  %355 = load i32, ptr %8, align 4, !tbaa !13
  %356 = load i32, ptr %17, align 4, !tbaa !13
  %357 = icmp slt i32 %355, %356
  br i1 %357, label %358, label %449

358:                                              ; preds = %354
  %359 = load i32, ptr %14, align 4, !tbaa !13
  store i32 %359, ptr %7, align 4, !tbaa !13
  %360 = load ptr, ptr %4, align 8, !tbaa !5
  %361 = getelementptr inbounds %struct.STextureTriangle, ptr %360, i32 0, i32 0
  %362 = getelementptr inbounds [3 x %struct.STextureVector], ptr %361, i64 0, i64 0
  %363 = getelementptr inbounds %struct.STextureVector, ptr %362, i32 0, i32 0
  %364 = load i32, ptr %363, align 4, !tbaa !9
  %365 = load ptr, ptr %4, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.STextureTriangle, ptr %365, i32 0, i32 0
  %367 = getelementptr inbounds [3 x %struct.STextureVector], ptr %366, i64 0, i64 0
  %368 = getelementptr inbounds %struct.STextureVector, ptr %367, i32 0, i32 1
  %369 = load i32, ptr %368, align 4, !tbaa !14
  %370 = load i32, ptr %21, align 4, !tbaa !13
  %371 = load i32, ptr %24, align 4, !tbaa !13
  %372 = load i32, ptr %7, align 4, !tbaa !13
  %373 = load i32, ptr %8, align 4, !tbaa !13
  %374 = call i32 @check_side(i32 noundef %364, i32 noundef %369, i32 noundef %370, i32 noundef %371, i32 noundef %372, i32 noundef %373)
  store i32 %374, ptr %18, align 4, !tbaa !13
  %375 = load ptr, ptr %4, align 8, !tbaa !5
  %376 = getelementptr inbounds %struct.STextureTriangle, ptr %375, i32 0, i32 0
  %377 = getelementptr inbounds [3 x %struct.STextureVector], ptr %376, i64 0, i64 1
  %378 = getelementptr inbounds %struct.STextureVector, ptr %377, i32 0, i32 0
  %379 = load i32, ptr %378, align 4, !tbaa !9
  %380 = load ptr, ptr %4, align 8, !tbaa !5
  %381 = getelementptr inbounds %struct.STextureTriangle, ptr %380, i32 0, i32 0
  %382 = getelementptr inbounds [3 x %struct.STextureVector], ptr %381, i64 0, i64 1
  %383 = getelementptr inbounds %struct.STextureVector, ptr %382, i32 0, i32 1
  %384 = load i32, ptr %383, align 4, !tbaa !14
  %385 = load i32, ptr %22, align 4, !tbaa !13
  %386 = load i32, ptr %25, align 4, !tbaa !13
  %387 = load i32, ptr %7, align 4, !tbaa !13
  %388 = load i32, ptr %8, align 4, !tbaa !13
  %389 = call i32 @check_side(i32 noundef %379, i32 noundef %384, i32 noundef %385, i32 noundef %386, i32 noundef %387, i32 noundef %388)
  store i32 %389, ptr %19, align 4, !tbaa !13
  %390 = load ptr, ptr %4, align 8, !tbaa !5
  %391 = getelementptr inbounds %struct.STextureTriangle, ptr %390, i32 0, i32 0
  %392 = getelementptr inbounds [3 x %struct.STextureVector], ptr %391, i64 0, i64 2
  %393 = getelementptr inbounds %struct.STextureVector, ptr %392, i32 0, i32 0
  %394 = load i32, ptr %393, align 4, !tbaa !9
  %395 = load ptr, ptr %4, align 8, !tbaa !5
  %396 = getelementptr inbounds %struct.STextureTriangle, ptr %395, i32 0, i32 0
  %397 = getelementptr inbounds [3 x %struct.STextureVector], ptr %396, i64 0, i64 2
  %398 = getelementptr inbounds %struct.STextureVector, ptr %397, i32 0, i32 1
  %399 = load i32, ptr %398, align 4, !tbaa !14
  %400 = load i32, ptr %23, align 4, !tbaa !13
  %401 = load i32, ptr %26, align 4, !tbaa !13
  %402 = load i32, ptr %7, align 4, !tbaa !13
  %403 = load i32, ptr %8, align 4, !tbaa !13
  %404 = call i32 @check_side(i32 noundef %394, i32 noundef %399, i32 noundef %400, i32 noundef %401, i32 noundef %402, i32 noundef %403)
  store i32 %404, ptr %20, align 4, !tbaa !13
  br label %405

405:                                              ; preds = %442, %358
  %406 = load i32, ptr %7, align 4, !tbaa !13
  %407 = load i32, ptr %16, align 4, !tbaa !13
  %408 = icmp slt i32 %406, %407
  br i1 %408, label %409, label %445

409:                                              ; preds = %405
  %410 = load i32, ptr %24, align 4, !tbaa !13
  %411 = load i32, ptr %18, align 4, !tbaa !13
  %412 = add nsw i32 %411, %410
  store i32 %412, ptr %18, align 4, !tbaa !13
  %413 = load i32, ptr %25, align 4, !tbaa !13
  %414 = load i32, ptr %19, align 4, !tbaa !13
  %415 = add nsw i32 %414, %413
  store i32 %415, ptr %19, align 4, !tbaa !13
  %416 = load i32, ptr %26, align 4, !tbaa !13
  %417 = load i32, ptr %20, align 4, !tbaa !13
  %418 = add nsw i32 %417, %416
  store i32 %418, ptr %20, align 4, !tbaa !13
  %419 = load i32, ptr %18, align 4, !tbaa !13
  %420 = icmp sge i32 %419, 0
  br i1 %420, label %421, label %441

421:                                              ; preds = %409
  %422 = load i32, ptr %19, align 4, !tbaa !13
  %423 = icmp sge i32 %422, 0
  br i1 %423, label %424, label %441

424:                                              ; preds = %421
  %425 = load i32, ptr %20, align 4, !tbaa !13
  %426 = icmp sge i32 %425, 0
  br i1 %426, label %427, label %441

427:                                              ; preds = %424
  %428 = load ptr, ptr %4, align 8, !tbaa !5
  %429 = load i32, ptr %7, align 4, !tbaa !13
  %430 = load i32, ptr %8, align 4, !tbaa !13
  call void @get_barycentric(ptr noundef %428, i32 noundef %429, i32 noundef %430, ptr noundef %11, ptr noundef %12, ptr noundef %13)
  %431 = load ptr, ptr %4, align 8, !tbaa !5
  %432 = load double, ptr %11, align 8, !tbaa !15
  %433 = load double, ptr %12, align 8, !tbaa !15
  %434 = load double, ptr %13, align 8, !tbaa !15
  call void @get_cartesian(ptr noundef %431, double noundef %432, double noundef %433, double noundef %434, ptr noundef %9, ptr noundef %10)
  %435 = load ptr, ptr %6, align 8, !tbaa !5
  %436 = load ptr, ptr %5, align 8, !tbaa !5
  %437 = load i32, ptr %7, align 4, !tbaa !13
  %438 = load i32, ptr %8, align 4, !tbaa !13
  %439 = load float, ptr %9, align 4, !tbaa !17
  %440 = load float, ptr %10, align 4, !tbaa !17
  call void @write_pixel(ptr noundef %435, ptr noundef %436, i32 noundef %437, i32 noundef %438, float noundef %439, float noundef %440)
  br label %441

441:                                              ; preds = %427, %424, %421, %409
  br label %442

442:                                              ; preds = %441
  %443 = load i32, ptr %7, align 4, !tbaa !13
  %444 = add nsw i32 %443, 1
  store i32 %444, ptr %7, align 4, !tbaa !13
  br label %405, !llvm.loop !18

445:                                              ; preds = %405
  br label %446

446:                                              ; preds = %445
  %447 = load i32, ptr %8, align 4, !tbaa !13
  %448 = add nsw i32 %447, 1
  store i32 %448, ptr %8, align 4, !tbaa !13
  br label %354, !llvm.loop !20

449:                                              ; preds = %354
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"STextureVector", !11, i64 0, !11, i64 4, !12, i64 8, !12, i64 12}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !11, i64 4}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!12, !12, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


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

; 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: nounwind uwtable
declare dso_local i32 @check_side(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @get_barycentric(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @get_cartesian(ptr noundef, double noundef, double noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @write_pixel(ptr noundef, ptr noundef, i32 noundef, i32 noundef, float noundef, float noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @render_textured_triangle(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  %9 = load i32, ptr %0, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %. = tail call i32 @llvm.smin.i32(i32 %11, i32 %13)
  %spec.select = tail call i32 @llvm.smin.i32(i32 %9, i32 %.)
  %14 = getelementptr inbounds i8, ptr %0, i64 4
  %15 = load i32, ptr %14, align 4, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %0, i64 20
  %17 = load i32, ptr %16, align 4, !tbaa !11
  %18 = getelementptr inbounds i8, ptr %0, i64 36
  %19 = load i32, ptr %18, align 4, !tbaa !11
  %.118 = tail call i32 @llvm.smin.i32(i32 %17, i32 %19)
  %20 = tail call i32 @llvm.smin.i32(i32 %15, i32 %.118)
  %.120 = tail call i32 @llvm.smax.i32(i32 %11, i32 %13)
  %21 = tail call i32 @llvm.smax.i32(i32 %9, i32 %.120)
  %.122 = tail call i32 @llvm.smax.i32(i32 %17, i32 %19)
  %22 = tail call i32 @llvm.smax.i32(i32 %15, i32 %.122)
  %23 = sub nsw i32 %11, %9
  %24 = sub nsw i32 %13, %11
  %25 = sub nsw i32 %9, %13
  %26 = sub nsw i32 %17, %15
  %27 = sub nsw i32 %19, %17
  %28 = sub nsw i32 %15, %19
  %29 = icmp slt i32 %20, %22
  br i1 %29, label %.lr.ph130, label %._crit_edge131

.lr.ph130:                                        ; preds = %3
  %30 = icmp slt i32 %spec.select, %21
  %.fr = freeze i1 %30
  br i1 %.fr, label %.lr.ph.us, label %.lr.ph130.split

.lr.ph.us:                                        ; preds = %.lr.ph130, %._crit_edge.us
  %.097128.us = phi i32 [ %56, %._crit_edge.us ], [ %20, %.lr.ph130 ]
  %31 = load i32, ptr %0, align 4, !tbaa !5
  %32 = load i32, ptr %14, align 4, !tbaa !11
  %33 = call i32 @check_side(i32 noundef %31, i32 noundef %32, i32 noundef %23, i32 noundef %26, i32 noundef %spec.select, i32 noundef %.097128.us)
  %34 = load i32, ptr %10, align 4, !tbaa !5
  %35 = load i32, ptr %16, align 4, !tbaa !11
  %36 = call i32 @check_side(i32 noundef %34, i32 noundef %35, i32 noundef %24, i32 noundef %27, i32 noundef %spec.select, i32 noundef %.097128.us)
  %37 = load i32, ptr %12, align 4, !tbaa !5
  %38 = load i32, ptr %18, align 4, !tbaa !11
  %39 = call i32 @check_side(i32 noundef %37, i32 noundef %38, i32 noundef %25, i32 noundef %28, i32 noundef %spec.select, i32 noundef %.097128.us)
  br label %40

40:                                               ; preds = %.lr.ph.us, %53
  %.0127.us = phi i32 [ %spec.select, %.lr.ph.us ], [ %54, %53 ]
  %.098126.us = phi i32 [ %33, %.lr.ph.us ], [ %41, %53 ]
  %.099125.us = phi i32 [ %36, %.lr.ph.us ], [ %42, %53 ]
  %.0100124.us = phi i32 [ %39, %.lr.ph.us ], [ %43, %53 ]
  %41 = add nsw i32 %.098126.us, %26
  %42 = add nsw i32 %.099125.us, %27
  %43 = add nsw i32 %.0100124.us, %28
  %44 = icmp sgt i32 %41, -1
  %45 = icmp sgt i32 %42, -1
  %or.cond.us = select i1 %44, i1 %45, i1 false
  %46 = icmp sgt i32 %43, -1
  %or.cond3.us = select i1 %or.cond.us, i1 %46, i1 false
  br i1 %or.cond3.us, label %47, label %53

47:                                               ; preds = %40
  call void @get_barycentric(ptr noundef nonnull %0, i32 noundef %.0127.us, i32 noundef %.097128.us, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %48 = load double, ptr %6, align 8, !tbaa !12
  %49 = load double, ptr %7, align 8, !tbaa !12
  %50 = load double, ptr %8, align 8, !tbaa !12
  call void @get_cartesian(ptr noundef nonnull %0, double noundef %48, double noundef %49, double noundef %50, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %51 = load float, ptr %4, align 4, !tbaa !14
  %52 = load float, ptr %5, align 4, !tbaa !14
  call void @write_pixel(ptr noundef %2, ptr noundef %1, i32 noundef %.0127.us, i32 noundef %.097128.us, float noundef %51, float noundef %52)
  br label %53

53:                                               ; preds = %47, %40
  %54 = add nsw i32 %.0127.us, 1
  %55 = icmp slt i32 %54, %21
  br i1 %55, label %40, label %._crit_edge.us, !llvm.loop !15

._crit_edge.us:                                   ; preds = %53
  %56 = add i32 %.097128.us, 1
  %exitcond133.not = icmp eq i32 %56, %22
  br i1 %exitcond133.not, label %._crit_edge131, label %.lr.ph.us, !llvm.loop !17

.lr.ph130.split:                                  ; preds = %.lr.ph130, %.lr.ph130.split
  %.097128 = phi i32 [ %66, %.lr.ph130.split ], [ %20, %.lr.ph130 ]
  %57 = load i32, ptr %0, align 4, !tbaa !5
  %58 = load i32, ptr %14, align 4, !tbaa !11
  %59 = tail call i32 @check_side(i32 noundef %57, i32 noundef %58, i32 noundef %23, i32 noundef %26, i32 noundef %spec.select, i32 noundef %.097128)
  %60 = load i32, ptr %10, align 4, !tbaa !5
  %61 = load i32, ptr %16, align 4, !tbaa !11
  %62 = tail call i32 @check_side(i32 noundef %60, i32 noundef %61, i32 noundef %24, i32 noundef %27, i32 noundef %spec.select, i32 noundef %.097128)
  %63 = load i32, ptr %12, align 4, !tbaa !5
  %64 = load i32, ptr %18, align 4, !tbaa !11
  %65 = tail call i32 @check_side(i32 noundef %63, i32 noundef %64, i32 noundef %25, i32 noundef %28, i32 noundef %spec.select, i32 noundef %.097128)
  %66 = add i32 %.097128, 1
  %exitcond.not = icmp eq i32 %66, %22
  br i1 %exitcond.not, label %._crit_edge131, label %.lr.ph130.split, !llvm.loop !17

._crit_edge131:                                   ; preds = %.lr.ph130.split, %._crit_edge.us, %3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  ret void
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !7, i64 0}
!6 = !{!"STextureVector", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 12}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !8, i64 0}
!14 = !{!10, !10, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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