; LLVM IR from BrunoLevy/learn-fpga :: LiteX/software/Tagl/Lib (peng_24)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.GPolygon = type { i32, [100 x ptr] }
%class.Mug = type { %class.GVertex, %class.GVertex }
%class.GVertex = type { %class.GVertexAttributes, i32, i32, %class.GVector, %class.GVector, %class.GVector, %class.GVector, %class.GVector, %class.Flags }
%class.GVertexAttributes = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%class.GVector = type { [4 x %class.GCoord] }
%class.GCoord = type { float }
%class.Flags = type { i32 }
%struct.PixelValue = type { i8, i8, i8 }

@_ZN13PolygonEngine3_p1E = external global %class.GPolygon, align 8
@_ZN13PolygonEngine4_mugE = external global [1024 x %class.Mug], align 16
@_ZN16GraphicComponent10_graph_memE = external global ptr, align 8
@_ZN16GraphicComponent15_bytes_per_lineE = external global i32, align 4
@_ZN16GraphicComponent13_truecolormapE = external global [256 x i32], align 16
@_ZN16GraphicProcessor2D4E = external global [16 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16PolygonEngine_2412FillPoly_C_DEP17GVertexAttributes(ptr noundef %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %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
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1000, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 -1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  %36 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %37 = icmp slt i32 %36, 2
  br i1 %37, label %38, label %39

38:                                               ; preds = %1
  store i32 1, ptr %29, align 4
  br label %522

39:                                               ; preds = %1
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %134, %39
  %41 = load i32, ptr %5, align 4, !tbaa !9
  %42 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %44, label %137

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  %45 = load i32, ptr %5, align 4, !tbaa !9
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %30, align 4, !tbaa !9
  %47 = load i32, ptr %30, align 4, !tbaa !9
  %48 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %49 = icmp eq i32 %47, %48
  br i1 %49, label %50, label %51

50:                                               ; preds = %44
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %50, %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #4
  %52 = load i32, ptr %30, align 4, !tbaa !9
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %31, align 4, !tbaa !9
  %54 = load i32, ptr %31, align 4, !tbaa !9
  %55 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %56 = icmp eq i32 %54, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %51
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %57, %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #4
  %59 = load i32, ptr %5, align 4, !tbaa !9
  %60 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %59)
  %61 = getelementptr inbounds %class.GVertex, ptr %60, i32 0, i32 1
  %62 = load i32, ptr %61, align 4, !tbaa !11
  %63 = load i32, ptr %30, align 4, !tbaa !9
  %64 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %63)
  %65 = getelementptr inbounds %class.GVertex, ptr %64, i32 0, i32 1
  %66 = load i32, ptr %65, align 4, !tbaa !11
  %67 = sub nsw i32 %62, %66
  store i32 %67, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  %68 = load i32, ptr %5, align 4, !tbaa !9
  %69 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %68)
  %70 = getelementptr inbounds %class.GVertex, ptr %69, i32 0, i32 2
  %71 = load i32, ptr %70, align 4, !tbaa !16
  %72 = load i32, ptr %30, align 4, !tbaa !9
  %73 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %72)
  %74 = getelementptr inbounds %class.GVertex, ptr %73, i32 0, i32 2
  %75 = load i32, ptr %74, align 4, !tbaa !16
  %76 = sub nsw i32 %71, %75
  store i32 %76, ptr %33, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #4
  %77 = load i32, ptr %31, align 4, !tbaa !9
  %78 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %77)
  %79 = getelementptr inbounds %class.GVertex, ptr %78, i32 0, i32 1
  %80 = load i32, ptr %79, align 4, !tbaa !11
  %81 = load i32, ptr %30, align 4, !tbaa !9
  %82 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %81)
  %83 = getelementptr inbounds %class.GVertex, ptr %82, i32 0, i32 1
  %84 = load i32, ptr %83, align 4, !tbaa !11
  %85 = sub nsw i32 %80, %84
  store i32 %85, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #4
  %86 = load i32, ptr %31, align 4, !tbaa !9
  %87 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %86)
  %88 = getelementptr inbounds %class.GVertex, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 4, !tbaa !16
  %90 = load i32, ptr %30, align 4, !tbaa !9
  %91 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %90)
  %92 = getelementptr inbounds %class.GVertex, ptr %91, i32 0, i32 2
  %93 = load i32, ptr %92, align 4, !tbaa !16
  %94 = sub nsw i32 %89, %93
  store i32 %94, ptr %35, align 4, !tbaa !9
  %95 = load i32, ptr %32, align 4, !tbaa !9
  %96 = load i32, ptr %35, align 4, !tbaa !9
  %97 = mul nsw i32 %95, %96
  %98 = load i32, ptr %34, align 4, !tbaa !9
  %99 = load i32, ptr %33, align 4, !tbaa !9
  %100 = mul nsw i32 %98, %99
  %101 = sub nsw i32 %97, %100
  %102 = load i32, ptr %10, align 4, !tbaa !9
  %103 = add nsw i32 %102, %101
  store i32 %103, ptr %10, align 4, !tbaa !9
  %104 = load i32, ptr %3, align 4, !tbaa !9
  %105 = load i32, ptr %5, align 4, !tbaa !9
  %106 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %105)
  %107 = getelementptr inbounds %class.GVertex, ptr %106, i32 0, i32 2
  %108 = load i32, ptr %107, align 4, !tbaa !16
  %109 = icmp slt i32 %104, %108
  br i1 %109, label %110, label %112

110:                                              ; preds = %58
  %111 = load i32, ptr %3, align 4, !tbaa !9
  br label %117

112:                                              ; preds = %58
  %113 = load i32, ptr %5, align 4, !tbaa !9
  %114 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %113)
  %115 = getelementptr inbounds %class.GVertex, ptr %114, i32 0, i32 2
  %116 = load i32, ptr %115, align 4, !tbaa !16
  br label %117

117:                                              ; preds = %112, %110
  %118 = phi i32 [ %111, %110 ], [ %116, %112 ]
  store i32 %118, ptr %3, align 4, !tbaa !9
  %119 = load i32, ptr %4, align 4, !tbaa !9
  %120 = load i32, ptr %5, align 4, !tbaa !9
  %121 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %120)
  %122 = getelementptr inbounds %class.GVertex, ptr %121, i32 0, i32 2
  %123 = load i32, ptr %122, align 4, !tbaa !16
  %124 = icmp sgt i32 %119, %123
  br i1 %124, label %125, label %127

125:                                              ; preds = %117
  %126 = load i32, ptr %4, align 4, !tbaa !9
  br label %132

127:                                              ; preds = %117
  %128 = load i32, ptr %5, align 4, !tbaa !9
  %129 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %128)
  %130 = getelementptr inbounds %class.GVertex, ptr %129, i32 0, i32 2
  %131 = load i32, ptr %130, align 4, !tbaa !16
  br label %132

132:                                              ; preds = %127, %125
  %133 = phi i32 [ %126, %125 ], [ %131, %127 ]
  store i32 %133, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  br label %134

134:                                              ; preds = %132
  %135 = load i32, ptr %5, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %5, align 4, !tbaa !9
  br label %40, !llvm.loop !17

137:                                              ; preds = %40
  %138 = load i32, ptr %10, align 4, !tbaa !9
  %139 = icmp sgt i32 %138, 0
  %140 = zext i1 %139 to i32
  store i32 %140, ptr %10, align 4, !tbaa !9
  %141 = load i32, ptr %3, align 4, !tbaa !9
  %142 = load i32, ptr %4, align 4, !tbaa !9
  %143 = icmp eq i32 %141, %142
  br i1 %143, label %144, label %145

144:                                              ; preds = %137
  store i32 1, ptr %29, align 4
  br label %522

145:                                              ; preds = %137
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %394, %145
  %147 = load i32, ptr %5, align 4, !tbaa !9
  %148 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %149 = icmp slt i32 %147, %148
  br i1 %149, label %150, label %397

150:                                              ; preds = %146
  %151 = load i32, ptr %5, align 4, !tbaa !9
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %6, align 4, !tbaa !9
  %153 = load i32, ptr %6, align 4, !tbaa !9
  %154 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %155 = icmp eq i32 %153, %154
  br i1 %155, label %156, label %157

156:                                              ; preds = %150
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %157

157:                                              ; preds = %156, %150
  %158 = load i32, ptr %5, align 4, !tbaa !9
  %159 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %158)
  %160 = getelementptr inbounds %class.GVertex, ptr %159, i32 0, i32 2
  %161 = load i32, ptr %160, align 4, !tbaa !16
  %162 = load i32, ptr %6, align 4, !tbaa !9
  %163 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %162)
  %164 = getelementptr inbounds %class.GVertex, ptr %163, i32 0, i32 2
  %165 = load i32, ptr %164, align 4, !tbaa !16
  %166 = icmp eq i32 %161, %165
  br i1 %166, label %167, label %168

167:                                              ; preds = %157
  br label %394

168:                                              ; preds = %157
  %169 = load i32, ptr %5, align 4, !tbaa !9
  %170 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %169)
  %171 = getelementptr inbounds %class.GVertex, ptr %170, i32 0, i32 2
  %172 = load i32, ptr %171, align 4, !tbaa !16
  store i32 %172, ptr %13, align 4, !tbaa !9
  %173 = load i32, ptr %6, align 4, !tbaa !9
  %174 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %173)
  %175 = getelementptr inbounds %class.GVertex, ptr %174, i32 0, i32 2
  %176 = load i32, ptr %175, align 4, !tbaa !16
  store i32 %176, ptr %14, align 4, !tbaa !9
  %177 = load i32, ptr %14, align 4, !tbaa !9
  %178 = load i32, ptr %13, align 4, !tbaa !9
  %179 = sub nsw i32 %177, %178
  store i32 %179, ptr %15, align 4, !tbaa !9
  %180 = load i32, ptr %15, align 4, !tbaa !9
  %181 = icmp sgt i32 %180, 0
  br i1 %181, label %182, label %183

182:                                              ; preds = %168
  br label %188

183:                                              ; preds = %168
  %184 = load i32, ptr %15, align 4, !tbaa !9
  %185 = icmp ne i32 %184, 0
  %186 = zext i1 %185 to i64
  %187 = select i1 %185, i32 -1, i32 0
  br label %188

188:                                              ; preds = %183, %182
  %189 = phi i32 [ 1, %182 ], [ %187, %183 ]
  store i32 %189, ptr %16, align 4, !tbaa !9
  %190 = load i32, ptr %16, align 4, !tbaa !9
  %191 = load i32, ptr %15, align 4, !tbaa !9
  %192 = mul nsw i32 %191, %190
  store i32 %192, ptr %15, align 4, !tbaa !9
  %193 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %193, ptr %12, align 4, !tbaa !9
  %194 = load i32, ptr %5, align 4, !tbaa !9
  %195 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %194)
  %196 = getelementptr inbounds %class.GVertex, ptr %195, i32 0, i32 1
  %197 = load i32, ptr %196, align 4, !tbaa !11
  store i32 %197, ptr %18, align 4, !tbaa !9
  %198 = load i32, ptr %6, align 4, !tbaa !9
  %199 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %198)
  %200 = getelementptr inbounds %class.GVertex, ptr %199, i32 0, i32 1
  %201 = load i32, ptr %200, align 4, !tbaa !11
  store i32 %201, ptr %19, align 4, !tbaa !9
  %202 = load i32, ptr %19, align 4, !tbaa !9
  %203 = load i32, ptr %18, align 4, !tbaa !9
  %204 = sub nsw i32 %202, %203
  store i32 %204, ptr %20, align 4, !tbaa !9
  %205 = load i32, ptr %20, align 4, !tbaa !9
  %206 = icmp sgt i32 %205, 0
  br i1 %206, label %207, label %208

207:                                              ; preds = %188
  br label %213

208:                                              ; preds = %188
  %209 = load i32, ptr %20, align 4, !tbaa !9
  %210 = icmp ne i32 %209, 0
  %211 = zext i1 %210 to i64
  %212 = select i1 %210, i32 -1, i32 0
  br label %213

213:                                              ; preds = %208, %207
  %214 = phi i32 [ 1, %207 ], [ %212, %208 ]
  store i32 %214, ptr %21, align 4, !tbaa !9
  %215 = load i32, ptr %21, align 4, !tbaa !9
  %216 = load i32, ptr %20, align 4, !tbaa !9
  %217 = mul nsw i32 %216, %215
  store i32 %217, ptr %20, align 4, !tbaa !9
  %218 = load i32, ptr %20, align 4, !tbaa !9
  %219 = shl i32 %218, 1
  %220 = load i32, ptr %15, align 4, !tbaa !9
  %221 = sub nsw i32 %219, %220
  store i32 %221, ptr %22, align 4, !tbaa !9
  %222 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %222, ptr %17, align 4, !tbaa !9
  %223 = load i32, ptr %5, align 4, !tbaa !9
  %224 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %223)
  %225 = getelementptr inbounds %class.GVertexAttributes, ptr %224, i32 0, i32 1
  %226 = load i32, ptr %225, align 4, !tbaa !19
  %227 = icmp slt i32 %226, 4080
  br i1 %227, label %228, label %233

228:                                              ; preds = %213
  %229 = load i32, ptr %5, align 4, !tbaa !9
  %230 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %229)
  %231 = getelementptr inbounds %class.GVertexAttributes, ptr %230, i32 0, i32 1
  %232 = load i32, ptr %231, align 4, !tbaa !19
  br label %234

233:                                              ; preds = %213
  br label %234

234:                                              ; preds = %233, %228
  %235 = phi i32 [ %232, %228 ], [ 4080, %233 ]
  %236 = ashr i32 %235, 0
  store i32 %236, ptr %24, align 4, !tbaa !9
  %237 = load i32, ptr %6, align 4, !tbaa !9
  %238 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %237)
  %239 = getelementptr inbounds %class.GVertexAttributes, ptr %238, i32 0, i32 1
  %240 = load i32, ptr %239, align 4, !tbaa !19
  %241 = icmp slt i32 %240, 4080
  br i1 %241, label %242, label %247

242:                                              ; preds = %234
  %243 = load i32, ptr %6, align 4, !tbaa !9
  %244 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %243)
  %245 = getelementptr inbounds %class.GVertexAttributes, ptr %244, i32 0, i32 1
  %246 = load i32, ptr %245, align 4, !tbaa !19
  br label %248

247:                                              ; preds = %234
  br label %248

248:                                              ; preds = %247, %242
  %249 = phi i32 [ %246, %242 ], [ 4080, %247 ]
  %250 = ashr i32 %249, 0
  store i32 %250, ptr %25, align 4, !tbaa !9
  %251 = load i32, ptr %25, align 4, !tbaa !9
  %252 = load i32, ptr %24, align 4, !tbaa !9
  %253 = sub nsw i32 %251, %252
  store i32 %253, ptr %26, align 4, !tbaa !9
  %254 = load i32, ptr %26, align 4, !tbaa !9
  %255 = icmp sgt i32 %254, 0
  br i1 %255, label %256, label %257

256:                                              ; preds = %248
  br label %262

257:                                              ; preds = %248
  %258 = load i32, ptr %26, align 4, !tbaa !9
  %259 = icmp ne i32 %258, 0
  %260 = zext i1 %259 to i64
  %261 = select i1 %259, i32 -1, i32 0
  br label %262

262:                                              ; preds = %257, %256
  %263 = phi i32 [ 1, %256 ], [ %261, %257 ]
  store i32 %263, ptr %27, align 4, !tbaa !9
  %264 = load i32, ptr %27, align 4, !tbaa !9
  %265 = load i32, ptr %26, align 4, !tbaa !9
  %266 = mul nsw i32 %265, %264
  store i32 %266, ptr %26, align 4, !tbaa !9
  %267 = load i32, ptr %26, align 4, !tbaa !9
  %268 = shl i32 %267, 1
  %269 = load i32, ptr %15, align 4, !tbaa !9
  %270 = sub nsw i32 %268, %269
  store i32 %270, ptr %28, align 4, !tbaa !9
  %271 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %271, ptr %23, align 4, !tbaa !9
  %272 = load i32, ptr %10, align 4, !tbaa !9
  %273 = load i32, ptr %14, align 4, !tbaa !9
  %274 = load i32, ptr %13, align 4, !tbaa !9
  %275 = icmp sgt i32 %273, %274
  %276 = zext i1 %275 to i32
  %277 = xor i32 %272, %276
  %278 = icmp ne i32 %277, 0
  br i1 %278, label %279, label %336

279:                                              ; preds = %262
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %280

280:                                              ; preds = %332, %279
  %281 = load i32, ptr %7, align 4, !tbaa !9
  %282 = load i32, ptr %15, align 4, !tbaa !9
  %283 = icmp sle i32 %281, %282
  br i1 %283, label %284, label %335

284:                                              ; preds = %280
  %285 = load i32, ptr %17, align 4, !tbaa !9
  %286 = load i32, ptr %12, align 4, !tbaa !9
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %287
  %289 = getelementptr inbounds %class.Mug, ptr %288, i32 0, i32 1
  %290 = getelementptr inbounds %class.GVertex, ptr %289, i32 0, i32 1
  store i32 %285, ptr %290, align 4, !tbaa !20
  %291 = load i32, ptr %23, align 4, !tbaa !9
  %292 = load i32, ptr %12, align 4, !tbaa !9
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %293
  %295 = getelementptr inbounds %class.Mug, ptr %294, i32 0, i32 1
  %296 = getelementptr inbounds %class.GVertexAttributes, ptr %295, i32 0, i32 1
  store i32 %291, ptr %296, align 4, !tbaa !19
  %297 = load i32, ptr %16, align 4, !tbaa !9
  %298 = load i32, ptr %12, align 4, !tbaa !9
  %299 = add nsw i32 %298, %297
  store i32 %299, ptr %12, align 4, !tbaa !9
  br label %300

300:                                              ; preds = %303, %284
  %301 = load i32, ptr %22, align 4, !tbaa !9
  %302 = icmp sge i32 %301, 0
  br i1 %302, label %303, label %311

303:                                              ; preds = %300
  %304 = load i32, ptr %21, align 4, !tbaa !9
  %305 = load i32, ptr %17, align 4, !tbaa !9
  %306 = add nsw i32 %305, %304
  store i32 %306, ptr %17, align 4, !tbaa !9
  %307 = load i32, ptr %15, align 4, !tbaa !9
  %308 = shl i32 %307, 1
  %309 = load i32, ptr %22, align 4, !tbaa !9
  %310 = sub nsw i32 %309, %308
  store i32 %310, ptr %22, align 4, !tbaa !9
  br label %300, !llvm.loop !22

311:                                              ; preds = %300
  %312 = load i32, ptr %20, align 4, !tbaa !9
  %313 = shl i32 %312, 1
  %314 = load i32, ptr %22, align 4, !tbaa !9
  %315 = add nsw i32 %314, %313
  store i32 %315, ptr %22, align 4, !tbaa !9
  br label %316

316:                                              ; preds = %319, %311
  %317 = load i32, ptr %28, align 4, !tbaa !9
  %318 = icmp sge i32 %317, 0
  br i1 %318, label %319, label %327

319:                                              ; preds = %316
  %320 = load i32, ptr %27, align 4, !tbaa !9
  %321 = load i32, ptr %23, align 4, !tbaa !9
  %322 = add nsw i32 %321, %320
  store i32 %322, ptr %23, align 4, !tbaa !9
  %323 = load i32, ptr %15, align 4, !tbaa !9
  %324 = shl i32 %323, 1
  %325 = load i32, ptr %28, align 4, !tbaa !9
  %326 = sub nsw i32 %325, %324
  store i32 %326, ptr %28, align 4, !tbaa !9
  br label %316, !llvm.loop !23

327:                                              ; preds = %316
  %328 = load i32, ptr %26, align 4, !tbaa !9
  %329 = shl i32 %328, 1
  %330 = load i32, ptr %28, align 4, !tbaa !9
  %331 = add nsw i32 %330, %329
  store i32 %331, ptr %28, align 4, !tbaa !9
  br label %332

332:                                              ; preds = %327
  %333 = load i32, ptr %7, align 4, !tbaa !9
  %334 = add nsw i32 %333, 1
  store i32 %334, ptr %7, align 4, !tbaa !9
  br label %280, !llvm.loop !24

335:                                              ; preds = %280
  br label %393

336:                                              ; preds = %262
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %337

337:                                              ; preds = %389, %336
  %338 = load i32, ptr %7, align 4, !tbaa !9
  %339 = load i32, ptr %15, align 4, !tbaa !9
  %340 = icmp sle i32 %338, %339
  br i1 %340, label %341, label %392

341:                                              ; preds = %337
  %342 = load i32, ptr %17, align 4, !tbaa !9
  %343 = load i32, ptr %12, align 4, !tbaa !9
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %344
  %346 = getelementptr inbounds %class.Mug, ptr %345, i32 0, i32 0
  %347 = getelementptr inbounds %class.GVertex, ptr %346, i32 0, i32 1
  store i32 %342, ptr %347, align 4, !tbaa !25
  %348 = load i32, ptr %23, align 4, !tbaa !9
  %349 = load i32, ptr %12, align 4, !tbaa !9
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %350
  %352 = getelementptr inbounds %class.Mug, ptr %351, i32 0, i32 0
  %353 = getelementptr inbounds %class.GVertexAttributes, ptr %352, i32 0, i32 1
  store i32 %348, ptr %353, align 4, !tbaa !19
  %354 = load i32, ptr %16, align 4, !tbaa !9
  %355 = load i32, ptr %12, align 4, !tbaa !9
  %356 = add nsw i32 %355, %354
  store i32 %356, ptr %12, align 4, !tbaa !9
  br label %357

357:                                              ; preds = %360, %341
  %358 = load i32, ptr %22, align 4, !tbaa !9
  %359 = icmp sge i32 %358, 0
  br i1 %359, label %360, label %368

360:                                              ; preds = %357
  %361 = load i32, ptr %21, align 4, !tbaa !9
  %362 = load i32, ptr %17, align 4, !tbaa !9
  %363 = add nsw i32 %362, %361
  store i32 %363, ptr %17, align 4, !tbaa !9
  %364 = load i32, ptr %15, align 4, !tbaa !9
  %365 = shl i32 %364, 1
  %366 = load i32, ptr %22, align 4, !tbaa !9
  %367 = sub nsw i32 %366, %365
  store i32 %367, ptr %22, align 4, !tbaa !9
  br label %357, !llvm.loop !26

368:                                              ; preds = %357
  %369 = load i32, ptr %20, align 4, !tbaa !9
  %370 = shl i32 %369, 1
  %371 = load i32, ptr %22, align 4, !tbaa !9
  %372 = add nsw i32 %371, %370
  store i32 %372, ptr %22, align 4, !tbaa !9
  br label %373

373:                                              ; preds = %376, %368
  %374 = load i32, ptr %28, align 4, !tbaa !9
  %375 = icmp sge i32 %374, 0
  br i1 %375, label %376, label %384

376:                                              ; preds = %373
  %377 = load i32, ptr %27, align 4, !tbaa !9
  %378 = load i32, ptr %23, align 4, !tbaa !9
  %379 = add nsw i32 %378, %377
  store i32 %379, ptr %23, align 4, !tbaa !9
  %380 = load i32, ptr %15, align 4, !tbaa !9
  %381 = shl i32 %380, 1
  %382 = load i32, ptr %28, align 4, !tbaa !9
  %383 = sub nsw i32 %382, %381
  store i32 %383, ptr %28, align 4, !tbaa !9
  br label %373, !llvm.loop !27

384:                                              ; preds = %373
  %385 = load i32, ptr %26, align 4, !tbaa !9
  %386 = shl i32 %385, 1
  %387 = load i32, ptr %28, align 4, !tbaa !9
  %388 = add nsw i32 %387, %386
  store i32 %388, ptr %28, align 4, !tbaa !9
  br label %389

389:                                              ; preds = %384
  %390 = load i32, ptr %7, align 4, !tbaa !9
  %391 = add nsw i32 %390, 1
  store i32 %391, ptr %7, align 4, !tbaa !9
  br label %337, !llvm.loop !28

392:                                              ; preds = %337
  br label %393

393:                                              ; preds = %392, %335
  br label %394

394:                                              ; preds = %393, %167
  %395 = load i32, ptr %5, align 4, !tbaa !9
  %396 = add nsw i32 %395, 1
  store i32 %396, ptr %5, align 4, !tbaa !9
  br label %146, !llvm.loop !29

397:                                              ; preds = %146
  %398 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !5
  %399 = load i32, ptr %3, align 4, !tbaa !9
  %400 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !9
  %401 = mul nsw i32 %399, %400
  %402 = sext i32 %401 to i64
  %403 = getelementptr inbounds i8, ptr %398, i64 %402
  store ptr %403, ptr %9, align 8, !tbaa !5
  %404 = load i32, ptr %3, align 4, !tbaa !9
  store i32 %404, ptr %12, align 4, !tbaa !9
  br label %405

405:                                              ; preds = %518, %397
  %406 = load i32, ptr %12, align 4, !tbaa !9
  %407 = load i32, ptr %4, align 4, !tbaa !9
  %408 = icmp sle i32 %406, %407
  br i1 %408, label %409, label %521

409:                                              ; preds = %405
  %410 = load i32, ptr %12, align 4, !tbaa !9
  %411 = sext i32 %410 to i64
  %412 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %411
  %413 = getelementptr inbounds %class.Mug, ptr %412, i32 0, i32 0
  %414 = getelementptr inbounds %class.GVertex, ptr %413, i32 0, i32 1
  %415 = load i32, ptr %414, align 4, !tbaa !25
  store i32 %415, ptr %18, align 4, !tbaa !9
  %416 = load i32, ptr %12, align 4, !tbaa !9
  %417 = sext i32 %416 to i64
  %418 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %417
  %419 = getelementptr inbounds %class.Mug, ptr %418, i32 0, i32 1
  %420 = getelementptr inbounds %class.GVertex, ptr %419, i32 0, i32 1
  %421 = load i32, ptr %420, align 4, !tbaa !20
  store i32 %421, ptr %19, align 4, !tbaa !9
  %422 = load i32, ptr %19, align 4, !tbaa !9
  %423 = load i32, ptr %18, align 4, !tbaa !9
  %424 = sub nsw i32 %422, %423
  %425 = add nsw i32 %424, 1
  store i32 %425, ptr %20, align 4, !tbaa !9
  %426 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %426, ptr %17, align 4, !tbaa !9
  %427 = load i32, ptr %12, align 4, !tbaa !9
  %428 = sext i32 %427 to i64
  %429 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %428
  %430 = getelementptr inbounds %class.Mug, ptr %429, i32 0, i32 0
  %431 = getelementptr inbounds %class.GVertexAttributes, ptr %430, i32 0, i32 1
  %432 = load i32, ptr %431, align 4, !tbaa !19
  store i32 %432, ptr %24, align 4, !tbaa !9
  %433 = load i32, ptr %12, align 4, !tbaa !9
  %434 = sext i32 %433 to i64
  %435 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %434
  %436 = getelementptr inbounds %class.Mug, ptr %435, i32 0, i32 1
  %437 = getelementptr inbounds %class.GVertexAttributes, ptr %436, i32 0, i32 1
  %438 = load i32, ptr %437, align 4, !tbaa !19
  store i32 %438, ptr %25, align 4, !tbaa !9
  %439 = load i32, ptr %25, align 4, !tbaa !9
  %440 = load i32, ptr %24, align 4, !tbaa !9
  %441 = sub nsw i32 %439, %440
  store i32 %441, ptr %26, align 4, !tbaa !9
  %442 = load i32, ptr %26, align 4, !tbaa !9
  %443 = icmp sgt i32 %442, 0
  br i1 %443, label %444, label %445

444:                                              ; preds = %409
  br label %450

445:                                              ; preds = %409
  %446 = load i32, ptr %26, align 4, !tbaa !9
  %447 = icmp ne i32 %446, 0
  %448 = zext i1 %447 to i64
  %449 = select i1 %447, i32 -1, i32 0
  br label %450

450:                                              ; preds = %445, %444
  %451 = phi i32 [ 1, %444 ], [ %449, %445 ]
  store i32 %451, ptr %27, align 4, !tbaa !9
  %452 = load i32, ptr %27, align 4, !tbaa !9
  %453 = load i32, ptr %26, align 4, !tbaa !9
  %454 = mul nsw i32 %453, %452
  store i32 %454, ptr %26, align 4, !tbaa !9
  %455 = load i32, ptr %26, align 4, !tbaa !9
  %456 = shl i32 %455, 1
  %457 = load i32, ptr %20, align 4, !tbaa !9
  %458 = sub nsw i32 %456, %457
  store i32 %458, ptr %28, align 4, !tbaa !9
  %459 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %459, ptr %23, align 4, !tbaa !9
  %460 = load ptr, ptr %9, align 8, !tbaa !5
  %461 = load i32, ptr %18, align 4, !tbaa !9
  %462 = sext i32 %461 to i64
  %463 = getelementptr inbounds %struct.PixelValue, ptr %460, i64 %462
  store ptr %463, ptr %8, align 8, !tbaa !5
  %464 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %464, ptr %17, align 4, !tbaa !9
  br label %465

465:                                              ; preds = %510, %450
  %466 = load i32, ptr %17, align 4, !tbaa !9
  %467 = load i32, ptr %19, align 4, !tbaa !9
  %468 = icmp sle i32 %466, %467
  br i1 %468, label %469, label %513

469:                                              ; preds = %465
  %470 = load i32, ptr %23, align 4, !tbaa !9
  %471 = ashr i32 %470, 4
  store i32 %471, ptr %11, align 4, !tbaa !9
  %472 = load i32, ptr %23, align 4, !tbaa !9
  %473 = and i32 %472, 15
  %474 = load i32, ptr %17, align 4, !tbaa !9
  %475 = and i32 %474, 3
  %476 = load i32, ptr %12, align 4, !tbaa !9
  %477 = and i32 %476, 3
  %478 = shl i32 %477, 2
  %479 = add nsw i32 %475, %478
  %480 = sext i32 %479 to i64
  %481 = getelementptr inbounds [16 x i32], ptr @_ZN16GraphicProcessor2D4E, i64 0, i64 %480
  %482 = load i32, ptr %481, align 4, !tbaa !9
  %483 = icmp sgt i32 %473, %482
  br i1 %483, label %484, label %487

484:                                              ; preds = %469
  %485 = load i32, ptr %11, align 4, !tbaa !9
  %486 = add nsw i32 %485, 1
  store i32 %486, ptr %11, align 4, !tbaa !9
  br label %487

487:                                              ; preds = %484, %469
  %488 = load i32, ptr %11, align 4, !tbaa !9
  %489 = sext i32 %488 to i64
  %490 = getelementptr inbounds [256 x i32], ptr @_ZN16GraphicComponent13_truecolormapE, i64 0, i64 %489
  %491 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %491, ptr align 4 %490, i64 3, i1 false), !tbaa.struct !30
  br label %492

492:                                              ; preds = %495, %487
  %493 = load i32, ptr %28, align 4, !tbaa !9
  %494 = icmp sge i32 %493, 0
  br i1 %494, label %495, label %503

495:                                              ; preds = %492
  %496 = load i32, ptr %27, align 4, !tbaa !9
  %497 = load i32, ptr %23, align 4, !tbaa !9
  %498 = add nsw i32 %497, %496
  store i32 %498, ptr %23, align 4, !tbaa !9
  %499 = load i32, ptr %20, align 4, !tbaa !9
  %500 = shl i32 %499, 1
  %501 = load i32, ptr %28, align 4, !tbaa !9
  %502 = sub nsw i32 %501, %500
  store i32 %502, ptr %28, align 4, !tbaa !9
  br label %492, !llvm.loop !32

503:                                              ; preds = %492
  %504 = load i32, ptr %26, align 4, !tbaa !9
  %505 = shl i32 %504, 1
  %506 = load i32, ptr %28, align 4, !tbaa !9
  %507 = add nsw i32 %506, %505
  store i32 %507, ptr %28, align 4, !tbaa !9
  %508 = load ptr, ptr %8, align 8, !tbaa !5
  %509 = getelementptr inbounds %struct.PixelValue, ptr %508, i32 1
  store ptr %509, ptr %8, align 8, !tbaa !5
  br label %510

510:                                              ; preds = %503
  %511 = load i32, ptr %17, align 4, !tbaa !9
  %512 = add nsw i32 %511, 1
  store i32 %512, ptr %17, align 4, !tbaa !9
  br label %465, !llvm.loop !33

513:                                              ; preds = %465
  %514 = load ptr, ptr %9, align 8, !tbaa !5
  %515 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !9
  %516 = sext i32 %515 to i64
  %517 = getelementptr inbounds i8, ptr %514, i64 %516
  store ptr %517, ptr %9, align 8, !tbaa !5
  br label %518

518:                                              ; preds = %513
  %519 = load i32, ptr %12, align 4, !tbaa !9
  %520 = add nsw i32 %519, 1
  store i32 %520, ptr %12, align 4, !tbaa !9
  br label %405, !llvm.loop !34

521:                                              ; preds = %405
  store i32 0, ptr %29, align 4
  br label %522

522:                                              ; preds = %521, %144, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  %523 = load i32, ptr %29, align 4
  switch i32 %523, label %525 [
    i32 0, label %524
    i32 1, label %524
  ]

524:                                              ; preds = %522, %522
  ret void

525:                                              ; preds = %522
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808), i32 noundef) #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 36}
!12 = !{!"_ZTS7GVertex", !13, i64 0, !10, i64 36, !10, i64 40, !14, i64 44, !14, i64 60, !14, i64 76, !14, i64 92, !14, i64 108, !15, i64 124}
!13 = !{!"_ZTS17GVertexAttributes", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!14 = !{!"_ZTS7GVector", !7, i64 0}
!15 = !{!"_ZTS5Flags", !10, i64 0}
!16 = !{!12, !10, i64 40}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!13, !10, i64 4}
!20 = !{!21, !10, i64 164}
!21 = !{!"_ZTS3Mug", !12, i64 0, !12, i64 128}
!22 = distinct !{!22, !18}
!23 = distinct !{!23, !18}
!24 = distinct !{!24, !18}
!25 = !{!21, !10, i64 36}
!26 = distinct !{!26, !18}
!27 = distinct !{!27, !18}
!28 = distinct !{!28, !18}
!29 = distinct !{!29, !18}
!30 = !{i64 0, i64 1, !31, i64 1, i64 1, !31, i64 2, i64 1, !31}
!31 = !{!7, !7, i64 0}
!32 = distinct !{!32, !18}
!33 = distinct !{!33, !18}
!34 = distinct !{!34, !18}


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

%class.GPolygon = type { i32, [100 x ptr] }
%class.Mug = type { %class.GVertex, %class.GVertex }
%class.GVertex = type { %class.GVertexAttributes, i32, i32, %class.GVector, %class.GVector, %class.GVector, %class.GVector, %class.GVector, %class.Flags }
%class.GVertexAttributes = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%class.GVector = type { [4 x %class.GCoord] }
%class.GCoord = type { float }
%class.Flags = type { i32 }
%struct.PixelValue = type { i8, i8, i8 }

@_ZN13PolygonEngine3_p1E = external global %class.GPolygon, align 8
@_ZN13PolygonEngine4_mugE = external local_unnamed_addr global [1024 x %class.Mug], align 16
@_ZN16GraphicComponent10_graph_memE = external local_unnamed_addr global ptr, align 8
@_ZN16GraphicComponent15_bytes_per_lineE = external local_unnamed_addr global i32, align 4
@_ZN16GraphicComponent13_truecolormapE = external local_unnamed_addr global [256 x i32], align 16
@_ZN16GraphicProcessor2D4E = external local_unnamed_addr global [16 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN16PolygonEngine_2412FillPoly_C_DEP17GVertexAttributes(ptr nocapture noundef readnone %0) local_unnamed_addr #0 align 2 {
  %2 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %3 = icmp slt i32 %2, 2
  br i1 %3, label %.loopexit, label %.preheader217

.preheader217:                                    ; preds = %1
  %4 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %.preheader216

.lr.ph:                                           ; preds = %.preheader217, %60
  %.0221 = phi i32 [ %51, %60 ], [ 1000, %.preheader217 ]
  %.0160220 = phi i32 [ %61, %60 ], [ -1, %.preheader217 ]
  %.0161219 = phi i32 [ %6, %60 ], [ 0, %.preheader217 ]
  %.0186218 = phi i32 [ %41, %60 ], [ 0, %.preheader217 ]
  %6 = add nuw nsw i32 %.0161219, 1
  %7 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %8 = icmp eq i32 %6, %7
  %spec.select = select i1 %8, i32 0, i32 %6
  %9 = add nuw nsw i32 %spec.select, 1
  %10 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %11 = icmp eq i32 %9, %10
  %.0163 = select i1 %11, i32 0, i32 %9
  %12 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0161219)
  %13 = getelementptr inbounds i8, ptr %12, i64 36
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select)
  %16 = getelementptr inbounds i8, ptr %15, i64 36
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = sub nsw i32 %14, %17
  %19 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0161219)
  %20 = getelementptr inbounds i8, ptr %19, i64 40
  %21 = load i32, ptr %20, align 4, !tbaa !13
  %22 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select)
  %23 = getelementptr inbounds i8, ptr %22, i64 40
  %24 = load i32, ptr %23, align 4, !tbaa !13
  %.neg = sub i32 %24, %21
  %25 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0163)
  %26 = getelementptr inbounds i8, ptr %25, i64 36
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select)
  %29 = getelementptr inbounds i8, ptr %28, i64 36
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = sub nsw i32 %27, %30
  %32 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0163)
  %33 = getelementptr inbounds i8, ptr %32, i64 40
  %34 = load i32, ptr %33, align 4, !tbaa !13
  %35 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select)
  %36 = getelementptr inbounds i8, ptr %35, i64 40
  %37 = load i32, ptr %36, align 4, !tbaa !13
  %38 = sub nsw i32 %34, %37
  %39 = mul nsw i32 %38, %18
  %.neg207 = mul i32 %31, %.neg
  %40 = add i32 %.neg207, %.0186218
  %41 = add i32 %40, %39
  %42 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0161219)
  %43 = getelementptr inbounds i8, ptr %42, i64 40
  %44 = load i32, ptr %43, align 4, !tbaa !13
  %45 = icmp slt i32 %.0221, %44
  br i1 %45, label %50, label %46

46:                                               ; preds = %.lr.ph
  %47 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0161219)
  %48 = getelementptr inbounds i8, ptr %47, i64 40
  %49 = load i32, ptr %48, align 4, !tbaa !13
  br label %50

50:                                               ; preds = %.lr.ph, %46
  %51 = phi i32 [ %49, %46 ], [ %.0221, %.lr.ph ]
  %52 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0161219)
  %53 = getelementptr inbounds i8, ptr %52, i64 40
  %54 = load i32, ptr %53, align 4, !tbaa !13
  %55 = icmp sgt i32 %.0160220, %54
  br i1 %55, label %60, label %56

56:                                               ; preds = %50
  %57 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0161219)
  %58 = getelementptr inbounds i8, ptr %57, i64 40
  %59 = load i32, ptr %58, align 4, !tbaa !13
  br label %60

60:                                               ; preds = %50, %56
  %61 = phi i32 [ %59, %56 ], [ %.0160220, %50 ]
  %62 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %63 = icmp slt i32 %6, %62
  br i1 %63, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge:                                      ; preds = %60
  %64 = icmp sgt i32 %41, 0
  %65 = icmp eq i32 %51, %61
  br i1 %65, label %.loopexit, label %.preheader216

.preheader216:                                    ; preds = %.preheader217, %._crit_edge
  %.0.lcssa319 = phi i32 [ %51, %._crit_edge ], [ 1000, %.preheader217 ]
  %.0160.lcssa318 = phi i32 [ %61, %._crit_edge ], [ -1, %.preheader217 ]
  %.0186.lcssa317 = phi i1 [ %64, %._crit_edge ], [ false, %.preheader217 ]
  %66 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %67 = icmp sgt i32 %66, 0
  br i1 %67, label %.lr.ph269, label %._crit_edge270

.lr.ph269:                                        ; preds = %.preheader216, %.loopexit213
  %.1268 = phi i32 [ %68, %.loopexit213 ], [ 0, %.preheader216 ]
  %68 = add nuw nsw i32 %.1268, 1
  %69 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %70 = icmp eq i32 %68, %69
  %spec.select208 = select i1 %70, i32 0, i32 %68
  %71 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1268)
  %72 = getelementptr inbounds i8, ptr %71, i64 40
  %73 = load i32, ptr %72, align 4, !tbaa !13
  %74 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select208)
  %75 = getelementptr inbounds i8, ptr %74, i64 40
  %76 = load i32, ptr %75, align 4, !tbaa !13
  %77 = icmp eq i32 %73, %76
  br i1 %77, label %.loopexit213, label %78

78:                                               ; preds = %.lr.ph269
  %79 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1268)
  %80 = getelementptr inbounds i8, ptr %79, i64 40
  %81 = load i32, ptr %80, align 4, !tbaa !13
  %82 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select208)
  %83 = getelementptr inbounds i8, ptr %82, i64 40
  %84 = load i32, ptr %83, align 4, !tbaa !13
  %85 = sub i32 %84, %81
  %.not202 = icmp ne i32 %84, %81
  %86 = sext i1 %.not202 to i32
  %.inv210 = icmp slt i32 %85, 1
  %87 = select i1 %.inv210, i32 %86, i32 1
  %88 = mul i32 %87, %85
  %89 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1268)
  %90 = getelementptr inbounds i8, ptr %89, i64 36
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select208)
  %93 = getelementptr inbounds i8, ptr %92, i64 36
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = sub nsw i32 %94, %91
  %.not203 = icmp ne i32 %94, %91
  %96 = sext i1 %.not203 to i32
  %.inv211 = icmp slt i32 %95, 1
  %97 = select i1 %.inv211, i32 %96, i32 1
  %98 = shl i32 %95, 1
  %99 = mul i32 %98, %97
  %100 = sub nsw i32 %99, %88
  %101 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1268)
  %102 = getelementptr inbounds i8, ptr %101, i64 4
  %103 = load i32, ptr %102, align 4, !tbaa !16
  %104 = icmp slt i32 %103, 4080
  br i1 %104, label %105, label %109

105:                                              ; preds = %78
  %106 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1268)
  %107 = getelementptr inbounds i8, ptr %106, i64 4
  %108 = load i32, ptr %107, align 4, !tbaa !16
  br label %109

109:                                              ; preds = %78, %105
  %110 = phi i32 [ %108, %105 ], [ 4080, %78 ]
  %111 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select208)
  %112 = getelementptr inbounds i8, ptr %111, i64 4
  %113 = load i32, ptr %112, align 4, !tbaa !16
  %114 = icmp slt i32 %113, 4080
  br i1 %114, label %115, label %119

115:                                              ; preds = %109
  %116 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select208)
  %117 = getelementptr inbounds i8, ptr %116, i64 4
  %118 = load i32, ptr %117, align 4, !tbaa !16
  br label %119

119:                                              ; preds = %109, %115
  %120 = phi i32 [ %118, %115 ], [ 4080, %109 ]
  %121 = sub nsw i32 %120, %110
  %.not204 = icmp ne i32 %120, %110
  %122 = sext i1 %.not204 to i32
  %.inv212 = icmp slt i32 %121, 1
  %123 = select i1 %.inv212, i32 %122, i32 1
  %124 = shl i32 %121, 1
  %125 = mul i32 %124, %123
  %126 = sub nsw i32 %125, %88
  %127 = icmp sgt i32 %84, %81
  %128 = xor i1 %.0186.lcssa317, %127
  %.not206260 = icmp slt i32 %88, 0
  br i1 %128, label %.preheader, label %.preheader214

.preheader214:                                    ; preds = %119
  br i1 %.not206260, label %.loopexit213, label %.lr.ph245

.lr.ph245:                                        ; preds = %.preheader214
  %129 = shl nuw i32 %88, 1
  %130 = sext i32 %81 to i64
  %131 = sext i32 %87 to i64
  br label %150

.preheader:                                       ; preds = %119
  br i1 %.not206260, label %.loopexit213, label %.lr.ph267

.lr.ph267:                                        ; preds = %.preheader
  %132 = shl nuw i32 %88, 1
  %133 = sext i32 %81 to i64
  %134 = sext i32 %87 to i64
  br label %135

135:                                              ; preds = %.lr.ph267, %._crit_edge257
  %indvars.iv305 = phi i64 [ %133, %.lr.ph267 ], [ %indvars.iv.next306, %._crit_edge257 ]
  %.0165266 = phi i32 [ %126, %.lr.ph267 ], [ %148, %._crit_edge257 ]
  %.0167265 = phi i32 [ %110, %.lr.ph267 ], [ %.1168.lcssa, %._crit_edge257 ]
  %.0173264 = phi i32 [ %100, %.lr.ph267 ], [ %143, %._crit_edge257 ]
  %.0177263 = phi i32 [ 0, %.lr.ph267 ], [ %149, %._crit_edge257 ]
  %.0179262 = phi i32 [ %91, %.lr.ph267 ], [ %.1180.lcssa, %._crit_edge257 ]
  %136 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %indvars.iv305, i32 1
  %137 = getelementptr inbounds i8, ptr %136, i64 36
  store i32 %.0179262, ptr %137, align 4, !tbaa !17
  %138 = getelementptr inbounds i8, ptr %136, i64 4
  store i32 %.0167265, ptr %138, align 4, !tbaa !16
  %indvars.iv.next306 = add nsw i64 %indvars.iv305, %134
  %139 = icmp sgt i32 %.0173264, -1
  br i1 %139, label %.lr.ph249, label %._crit_edge250

.lr.ph249:                                        ; preds = %135, %.lr.ph249
  %.1174247 = phi i32 [ %141, %.lr.ph249 ], [ %.0173264, %135 ]
  %.1180246 = phi i32 [ %140, %.lr.ph249 ], [ %.0179262, %135 ]
  %140 = add nsw i32 %.1180246, %97
  %141 = sub nsw i32 %.1174247, %132
  %142 = icmp sgt i32 %141, -1
  br i1 %142, label %.lr.ph249, label %._crit_edge250, !llvm.loop !19

._crit_edge250:                                   ; preds = %.lr.ph249, %135
  %.1180.lcssa = phi i32 [ %.0179262, %135 ], [ %140, %.lr.ph249 ]
  %.1174.lcssa = phi i32 [ %.0173264, %135 ], [ %141, %.lr.ph249 ]
  %143 = add nsw i32 %.1174.lcssa, %99
  %144 = icmp sgt i32 %.0165266, -1
  br i1 %144, label %.lr.ph256, label %._crit_edge257

.lr.ph256:                                        ; preds = %._crit_edge250, %.lr.ph256
  %.1166254 = phi i32 [ %146, %.lr.ph256 ], [ %.0165266, %._crit_edge250 ]
  %.1168253 = phi i32 [ %145, %.lr.ph256 ], [ %.0167265, %._crit_edge250 ]
  %145 = add nsw i32 %.1168253, %123
  %146 = sub nsw i32 %.1166254, %132
  %147 = icmp sgt i32 %146, -1
  br i1 %147, label %.lr.ph256, label %._crit_edge257, !llvm.loop !20

._crit_edge257:                                   ; preds = %.lr.ph256, %._crit_edge250
  %.1168.lcssa = phi i32 [ %.0167265, %._crit_edge250 ], [ %145, %.lr.ph256 ]
  %.1166.lcssa = phi i32 [ %.0165266, %._crit_edge250 ], [ %146, %.lr.ph256 ]
  %148 = add nsw i32 %.1166.lcssa, %125
  %149 = add nuw i32 %.0177263, 1
  %exitcond308.not = icmp eq i32 %.0177263, %88
  br i1 %exitcond308.not, label %.loopexit213, label %135, !llvm.loop !21

150:                                              ; preds = %.lr.ph245, %._crit_edge235
  %indvars.iv = phi i64 [ %130, %.lr.ph245 ], [ %indvars.iv.next, %._crit_edge235 ]
  %.2244 = phi i32 [ %126, %.lr.ph245 ], [ %163, %._crit_edge235 ]
  %.2169243 = phi i32 [ %110, %.lr.ph245 ], [ %.3170.lcssa, %._crit_edge235 ]
  %.2175242 = phi i32 [ %100, %.lr.ph245 ], [ %158, %._crit_edge235 ]
  %.1178241 = phi i32 [ 0, %.lr.ph245 ], [ %164, %._crit_edge235 ]
  %.2181240 = phi i32 [ %91, %.lr.ph245 ], [ %.3182.lcssa, %._crit_edge235 ]
  %151 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %indvars.iv
  %152 = getelementptr inbounds i8, ptr %151, i64 36
  store i32 %.2181240, ptr %152, align 4, !tbaa !22
  %153 = getelementptr inbounds i8, ptr %151, i64 4
  store i32 %.2169243, ptr %153, align 4, !tbaa !16
  %indvars.iv.next = add nsw i64 %indvars.iv, %131
  %154 = icmp sgt i32 %.2175242, -1
  br i1 %154, label %.lr.ph227, label %._crit_edge228

.lr.ph227:                                        ; preds = %150, %.lr.ph227
  %.3176225 = phi i32 [ %156, %.lr.ph227 ], [ %.2175242, %150 ]
  %.3182224 = phi i32 [ %155, %.lr.ph227 ], [ %.2181240, %150 ]
  %155 = add nsw i32 %.3182224, %97
  %156 = sub nsw i32 %.3176225, %129
  %157 = icmp sgt i32 %156, -1
  br i1 %157, label %.lr.ph227, label %._crit_edge228, !llvm.loop !23

._crit_edge228:                                   ; preds = %.lr.ph227, %150
  %.3182.lcssa = phi i32 [ %.2181240, %150 ], [ %155, %.lr.ph227 ]
  %.3176.lcssa = phi i32 [ %.2175242, %150 ], [ %156, %.lr.ph227 ]
  %158 = add nsw i32 %.3176.lcssa, %99
  %159 = icmp sgt i32 %.2244, -1
  br i1 %159, label %.lr.ph234, label %._crit_edge235

.lr.ph234:                                        ; preds = %._crit_edge228, %.lr.ph234
  %.3232 = phi i32 [ %161, %.lr.ph234 ], [ %.2244, %._crit_edge228 ]
  %.3170231 = phi i32 [ %160, %.lr.ph234 ], [ %.2169243, %._crit_edge228 ]
  %160 = add nsw i32 %.3170231, %123
  %161 = sub nsw i32 %.3232, %129
  %162 = icmp sgt i32 %161, -1
  br i1 %162, label %.lr.ph234, label %._crit_edge235, !llvm.loop !24

._crit_edge235:                                   ; preds = %.lr.ph234, %._crit_edge228
  %.3170.lcssa = phi i32 [ %.2169243, %._crit_edge228 ], [ %160, %.lr.ph234 ]
  %.3.lcssa = phi i32 [ %.2244, %._crit_edge228 ], [ %161, %.lr.ph234 ]
  %163 = add nsw i32 %.3.lcssa, %125
  %164 = add nuw i32 %.1178241, 1
  %exitcond.not = icmp eq i32 %.1178241, %88
  br i1 %exitcond.not, label %.loopexit213, label %150, !llvm.loop !25

.loopexit213:                                     ; preds = %._crit_edge235, %._crit_edge257, %.preheader214, %.preheader, %.lr.ph269
  %165 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %166 = icmp slt i32 %68, %165
  br i1 %166, label %.lr.ph269, label %._crit_edge270, !llvm.loop !26

._crit_edge270:                                   ; preds = %.loopexit213, %.preheader216
  %.not286 = icmp sgt i32 %.0.lcssa319, %.0160.lcssa318
  br i1 %.not286, label %.loopexit, label %.lr.ph290.preheader

.lr.ph290.preheader:                              ; preds = %._crit_edge270
  %167 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !27
  %168 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !29
  %169 = mul nsw i32 %168, %.0.lcssa319
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds i8, ptr %167, i64 %170
  %172 = sext i32 %.0.lcssa319 to i64
  %173 = add i32 %.0160.lcssa318, 1
  br label %.lr.ph290

.lr.ph290:                                        ; preds = %.lr.ph290.preheader, %._crit_edge285
  %174 = phi i32 [ %168, %.lr.ph290.preheader ], [ %217, %._crit_edge285 ]
  %indvars.iv310 = phi i64 [ %172, %.lr.ph290.preheader ], [ %indvars.iv.next311, %._crit_edge285 ]
  %.0185288 = phi ptr [ %171, %.lr.ph290.preheader ], [ %219, %._crit_edge285 ]
  %175 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %indvars.iv310
  %176 = getelementptr inbounds i8, ptr %175, i64 36
  %177 = load i32, ptr %176, align 4, !tbaa !22
  %178 = getelementptr inbounds i8, ptr %175, i64 164
  %179 = load i32, ptr %178, align 4, !tbaa !17
  %180 = getelementptr inbounds i8, ptr %175, i64 4
  %181 = load i32, ptr %180, align 4, !tbaa !16
  %182 = getelementptr inbounds i8, ptr %175, i64 132
  %183 = load i32, ptr %182, align 4, !tbaa !16
  %184 = sub nsw i32 %183, %181
  %.not200 = icmp ne i32 %183, %181
  %185 = sext i1 %.not200 to i32
  %.inv = icmp slt i32 %184, 1
  %186 = select i1 %.inv, i32 %185, i32 1
  %187 = shl i32 %184, 1
  %188 = mul i32 %187, %186
  %.not201278 = icmp sgt i32 %177, %179
  br i1 %.not201278, label %._crit_edge285, label %.lr.ph284

.lr.ph284:                                        ; preds = %.lr.ph290
  %189 = sext i32 %177 to i64
  %190 = getelementptr inbounds %struct.PixelValue, ptr %.0185288, i64 %189
  %191 = sub nsw i32 %179, %177
  %192 = add nsw i32 %191, 1
  %193 = sub nsw i32 %188, %192
  %194 = trunc nsw i64 %indvars.iv310 to i32
  %195 = shl i32 %194, 2
  %196 = and i32 %195, 12
  %197 = shl i32 %192, 1
  br label %198

198:                                              ; preds = %.lr.ph284, %._crit_edge275
  %.4282 = phi i32 [ %193, %.lr.ph284 ], [ %214, %._crit_edge275 ]
  %.4171281 = phi i32 [ %181, %.lr.ph284 ], [ %.5172.lcssa, %._crit_edge275 ]
  %.4183280 = phi i32 [ %177, %.lr.ph284 ], [ %216, %._crit_edge275 ]
  %.0184279 = phi ptr [ %190, %.lr.ph284 ], [ %215, %._crit_edge275 ]
  %199 = ashr i32 %.4171281, 4
  %200 = and i32 %.4171281, 15
  %201 = and i32 %.4183280, 3
  %202 = or disjoint i32 %201, %196
  %203 = zext nneg i32 %202 to i64
  %204 = getelementptr inbounds [16 x i32], ptr @_ZN16GraphicProcessor2D4E, i64 0, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !29
  %206 = icmp sgt i32 %200, %205
  %207 = zext i1 %206 to i32
  %spec.select209 = add nsw i32 %199, %207
  %208 = sext i32 %spec.select209 to i64
  %209 = getelementptr inbounds [256 x i32], ptr @_ZN16GraphicComponent13_truecolormapE, i64 0, i64 %208
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %.0184279, ptr noundef nonnull align 4 dereferenceable(3) %209, i64 3, i1 false), !tbaa.struct !30
  %210 = icmp sgt i32 %.4282, -1
  br i1 %210, label %.lr.ph274, label %._crit_edge275

.lr.ph274:                                        ; preds = %198, %.lr.ph274
  %.5272 = phi i32 [ %212, %.lr.ph274 ], [ %.4282, %198 ]
  %.5172271 = phi i32 [ %211, %.lr.ph274 ], [ %.4171281, %198 ]
  %211 = add nsw i32 %.5172271, %186
  %212 = sub nsw i32 %.5272, %197
  %213 = icmp sgt i32 %212, -1
  br i1 %213, label %.lr.ph274, label %._crit_edge275, !llvm.loop !32

._crit_edge275:                                   ; preds = %.lr.ph274, %198
  %.5172.lcssa = phi i32 [ %.4171281, %198 ], [ %211, %.lr.ph274 ]
  %.5.lcssa = phi i32 [ %.4282, %198 ], [ %212, %.lr.ph274 ]
  %214 = add nsw i32 %.5.lcssa, %188
  %215 = getelementptr inbounds i8, ptr %.0184279, i64 3
  %216 = add i32 %.4183280, 1
  %exitcond309.not = icmp eq i32 %.4183280, %179
  br i1 %exitcond309.not, label %._crit_edge285.loopexit, label %198, !llvm.loop !33

._crit_edge285.loopexit:                          ; preds = %._crit_edge275
  %.pre = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !29
  br label %._crit_edge285

._crit_edge285:                                   ; preds = %._crit_edge285.loopexit, %.lr.ph290
  %217 = phi i32 [ %.pre, %._crit_edge285.loopexit ], [ %174, %.lr.ph290 ]
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds i8, ptr %.0185288, i64 %218
  %indvars.iv.next311 = add nsw i64 %indvars.iv310, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next311 to i32
  %exitcond313.not = icmp eq i32 %173, %lftr.wideiv
  br i1 %exitcond313.not, label %.loopexit, label %.lr.ph290, !llvm.loop !34

.loopexit:                                        ; preds = %._crit_edge285, %._crit_edge270, %._crit_edge, %1
  ret void
}

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

!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, !8, i64 36}
!6 = !{!"_ZTS7GVertex", !7, i64 0, !8, i64 36, !8, i64 40, !11, i64 44, !11, i64 60, !11, i64 76, !11, i64 92, !11, i64 108, !12, i64 124}
!7 = !{!"_ZTS17GVertexAttributes", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !8, i64 24, !8, i64 28, !8, i64 32}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTS7GVector", !9, i64 0}
!12 = !{!"_ZTS5Flags", !8, i64 0}
!13 = !{!6, !8, i64 40}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!7, !8, i64 4}
!17 = !{!18, !8, i64 164}
!18 = !{!"_ZTS3Mug", !6, i64 0, !6, i64 128}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = !{!18, !8, i64 36}
!23 = distinct !{!23, !15}
!24 = distinct !{!24, !15}
!25 = distinct !{!25, !15}
!26 = distinct !{!26, !15}
!27 = !{!28, !28, i64 0}
!28 = !{!"any pointer", !9, i64 0}
!29 = !{!8, !8, i64 0}
!30 = !{i64 0, i64 1, !31, i64 1, i64 1, !31, i64 2, i64 1, !31}
!31 = !{!9, !9, i64 0}
!32 = distinct !{!32, !15}
!33 = distinct !{!33, !15}
!34 = distinct !{!34, !15}


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