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

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

@_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
@_ZN16GraphicComponent6_z_memE = external global ptr, align 8
@_ZN16GraphicComponent6_widthE = external global i32, align 4
@_ZN16GraphicComponent13_truecolormapE = external global [256 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17PolygonEngine_32x12FillPoly_c_ZEP17GVertexAttributes(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 ptr, align 8
  %12 = alloca ptr, align 8
  %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
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 1000, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 -1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = getelementptr inbounds %class.GVertexAttributes, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 4, !tbaa !11
  %41 = ashr i32 %40, 4
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [256 x i32], ptr @_ZN16GraphicComponent13_truecolormapE, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !9
  store i32 %44, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #3
  %45 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %46 = icmp slt i32 %45, 2
  br i1 %46, label %47, label %48

47:                                               ; preds = %1
  store i32 1, ptr %31, align 4
  br label %517

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

49:                                               ; preds = %143, %48
  %50 = load i32, ptr %5, align 4, !tbaa !9
  %51 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %53, label %146

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

59:                                               ; preds = %53
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %59, %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #3
  %61 = load i32, ptr %32, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %33, align 4, !tbaa !9
  %63 = load i32, ptr %33, align 4, !tbaa !9
  %64 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %65 = icmp eq i32 %63, %64
  br i1 %65, label %66, label %67

66:                                               ; preds = %60
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %66, %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #3
  %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 1
  %71 = load i32, ptr %70, align 4, !tbaa !13
  %72 = load i32, ptr %32, 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 1
  %75 = load i32, ptr %74, align 4, !tbaa !13
  %76 = sub nsw i32 %71, %75
  store i32 %76, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #3
  %77 = load i32, ptr %5, 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 2
  %80 = load i32, ptr %79, align 4, !tbaa !17
  %81 = load i32, ptr %32, 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 2
  %84 = load i32, ptr %83, align 4, !tbaa !17
  %85 = sub nsw i32 %80, %84
  store i32 %85, ptr %35, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #3
  %86 = load i32, ptr %33, 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 1
  %89 = load i32, ptr %88, align 4, !tbaa !13
  %90 = load i32, ptr %32, 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 1
  %93 = load i32, ptr %92, align 4, !tbaa !13
  %94 = sub nsw i32 %89, %93
  store i32 %94, ptr %36, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #3
  %95 = load i32, ptr %33, align 4, !tbaa !9
  %96 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %95)
  %97 = getelementptr inbounds %class.GVertex, ptr %96, i32 0, i32 2
  %98 = load i32, ptr %97, align 4, !tbaa !17
  %99 = load i32, ptr %32, align 4, !tbaa !9
  %100 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %99)
  %101 = getelementptr inbounds %class.GVertex, ptr %100, i32 0, i32 2
  %102 = load i32, ptr %101, align 4, !tbaa !17
  %103 = sub nsw i32 %98, %102
  store i32 %103, ptr %37, align 4, !tbaa !9
  %104 = load i32, ptr %34, align 4, !tbaa !9
  %105 = load i32, ptr %37, align 4, !tbaa !9
  %106 = mul nsw i32 %104, %105
  %107 = load i32, ptr %36, align 4, !tbaa !9
  %108 = load i32, ptr %35, align 4, !tbaa !9
  %109 = mul nsw i32 %107, %108
  %110 = sub nsw i32 %106, %109
  %111 = load i32, ptr %10, align 4, !tbaa !9
  %112 = add nsw i32 %111, %110
  store i32 %112, ptr %10, align 4, !tbaa !9
  %113 = load i32, ptr %3, align 4, !tbaa !9
  %114 = load i32, ptr %5, align 4, !tbaa !9
  %115 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %114)
  %116 = getelementptr inbounds %class.GVertex, ptr %115, i32 0, i32 2
  %117 = load i32, ptr %116, align 4, !tbaa !17
  %118 = icmp slt i32 %113, %117
  br i1 %118, label %119, label %121

119:                                              ; preds = %67
  %120 = load i32, ptr %3, align 4, !tbaa !9
  br label %126

121:                                              ; preds = %67
  %122 = load i32, ptr %5, align 4, !tbaa !9
  %123 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %122)
  %124 = getelementptr inbounds %class.GVertex, ptr %123, i32 0, i32 2
  %125 = load i32, ptr %124, align 4, !tbaa !17
  br label %126

126:                                              ; preds = %121, %119
  %127 = phi i32 [ %120, %119 ], [ %125, %121 ]
  store i32 %127, ptr %3, align 4, !tbaa !9
  %128 = load i32, ptr %4, align 4, !tbaa !9
  %129 = load i32, ptr %5, align 4, !tbaa !9
  %130 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %129)
  %131 = getelementptr inbounds %class.GVertex, ptr %130, i32 0, i32 2
  %132 = load i32, ptr %131, align 4, !tbaa !17
  %133 = icmp sgt i32 %128, %132
  br i1 %133, label %134, label %136

134:                                              ; preds = %126
  %135 = load i32, ptr %4, align 4, !tbaa !9
  br label %141

136:                                              ; preds = %126
  %137 = load i32, ptr %5, align 4, !tbaa !9
  %138 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %137)
  %139 = getelementptr inbounds %class.GVertex, ptr %138, i32 0, i32 2
  %140 = load i32, ptr %139, align 4, !tbaa !17
  br label %141

141:                                              ; preds = %136, %134
  %142 = phi i32 [ %135, %134 ], [ %140, %136 ]
  store i32 %142, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  br label %143

143:                                              ; preds = %141
  %144 = load i32, ptr %5, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %5, align 4, !tbaa !9
  br label %49, !llvm.loop !18

146:                                              ; preds = %49
  %147 = load i32, ptr %10, align 4, !tbaa !9
  %148 = icmp sgt i32 %147, 0
  %149 = zext i1 %148 to i32
  store i32 %149, ptr %10, align 4, !tbaa !9
  %150 = load i32, ptr %3, align 4, !tbaa !9
  %151 = load i32, ptr %4, align 4, !tbaa !9
  %152 = icmp eq i32 %150, %151
  br i1 %152, label %153, label %154

153:                                              ; preds = %146
  store i32 1, ptr %31, align 4
  br label %517

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

155:                                              ; preds = %383, %154
  %156 = load i32, ptr %5, align 4, !tbaa !9
  %157 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %158 = icmp slt i32 %156, %157
  br i1 %158, label %159, label %386

159:                                              ; preds = %155
  %160 = load i32, ptr %5, align 4, !tbaa !9
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %6, align 4, !tbaa !9
  %162 = load i32, ptr %6, align 4, !tbaa !9
  %163 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %164 = icmp eq i32 %162, %163
  br i1 %164, label %165, label %166

165:                                              ; preds = %159
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %166

166:                                              ; preds = %165, %159
  %167 = load i32, ptr %5, align 4, !tbaa !9
  %168 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %167)
  %169 = getelementptr inbounds %class.GVertex, ptr %168, i32 0, i32 2
  %170 = load i32, ptr %169, align 4, !tbaa !17
  %171 = load i32, ptr %6, align 4, !tbaa !9
  %172 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %171)
  %173 = getelementptr inbounds %class.GVertex, ptr %172, i32 0, i32 2
  %174 = load i32, ptr %173, align 4, !tbaa !17
  %175 = icmp eq i32 %170, %174
  br i1 %175, label %176, label %177

176:                                              ; preds = %166
  br label %383

177:                                              ; preds = %166
  %178 = load i32, ptr %5, align 4, !tbaa !9
  %179 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %178)
  %180 = getelementptr inbounds %class.GVertex, ptr %179, i32 0, i32 2
  %181 = load i32, ptr %180, align 4, !tbaa !17
  store i32 %181, ptr %15, align 4, !tbaa !9
  %182 = load i32, ptr %6, align 4, !tbaa !9
  %183 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %182)
  %184 = getelementptr inbounds %class.GVertex, ptr %183, i32 0, i32 2
  %185 = load i32, ptr %184, align 4, !tbaa !17
  store i32 %185, ptr %16, align 4, !tbaa !9
  %186 = load i32, ptr %16, align 4, !tbaa !9
  %187 = load i32, ptr %15, align 4, !tbaa !9
  %188 = sub nsw i32 %186, %187
  store i32 %188, ptr %17, align 4, !tbaa !9
  %189 = load i32, ptr %17, align 4, !tbaa !9
  %190 = icmp sgt i32 %189, 0
  br i1 %190, label %191, label %192

191:                                              ; preds = %177
  br label %197

192:                                              ; preds = %177
  %193 = load i32, ptr %17, align 4, !tbaa !9
  %194 = icmp ne i32 %193, 0
  %195 = zext i1 %194 to i64
  %196 = select i1 %194, i32 -1, i32 0
  br label %197

197:                                              ; preds = %192, %191
  %198 = phi i32 [ 1, %191 ], [ %196, %192 ]
  store i32 %198, ptr %18, align 4, !tbaa !9
  %199 = load i32, ptr %18, align 4, !tbaa !9
  %200 = load i32, ptr %17, align 4, !tbaa !9
  %201 = mul nsw i32 %200, %199
  store i32 %201, ptr %17, align 4, !tbaa !9
  %202 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %202, ptr %14, align 4, !tbaa !9
  %203 = load i32, ptr %5, align 4, !tbaa !9
  %204 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %203)
  %205 = getelementptr inbounds %class.GVertex, ptr %204, i32 0, i32 1
  %206 = load i32, ptr %205, align 4, !tbaa !13
  store i32 %206, ptr %20, align 4, !tbaa !9
  %207 = load i32, ptr %6, align 4, !tbaa !9
  %208 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %207)
  %209 = getelementptr inbounds %class.GVertex, ptr %208, i32 0, i32 1
  %210 = load i32, ptr %209, align 4, !tbaa !13
  store i32 %210, ptr %21, align 4, !tbaa !9
  %211 = load i32, ptr %21, align 4, !tbaa !9
  %212 = load i32, ptr %20, align 4, !tbaa !9
  %213 = sub nsw i32 %211, %212
  store i32 %213, ptr %22, align 4, !tbaa !9
  %214 = load i32, ptr %22, align 4, !tbaa !9
  %215 = icmp sgt i32 %214, 0
  br i1 %215, label %216, label %217

216:                                              ; preds = %197
  br label %222

217:                                              ; preds = %197
  %218 = load i32, ptr %22, align 4, !tbaa !9
  %219 = icmp ne i32 %218, 0
  %220 = zext i1 %219 to i64
  %221 = select i1 %219, i32 -1, i32 0
  br label %222

222:                                              ; preds = %217, %216
  %223 = phi i32 [ 1, %216 ], [ %221, %217 ]
  store i32 %223, ptr %23, align 4, !tbaa !9
  %224 = load i32, ptr %23, align 4, !tbaa !9
  %225 = load i32, ptr %22, align 4, !tbaa !9
  %226 = mul nsw i32 %225, %224
  store i32 %226, ptr %22, align 4, !tbaa !9
  %227 = load i32, ptr %22, align 4, !tbaa !9
  %228 = shl i32 %227, 1
  %229 = load i32, ptr %17, align 4, !tbaa !9
  %230 = sub nsw i32 %228, %229
  store i32 %230, ptr %24, align 4, !tbaa !9
  %231 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %231, ptr %19, align 4, !tbaa !9
  %232 = load i32, ptr %5, align 4, !tbaa !9
  %233 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %232)
  %234 = getelementptr inbounds %class.GVertexAttributes, ptr %233, i32 0, i32 0
  %235 = load i32, ptr %234, align 4, !tbaa !20
  store i32 %235, ptr %26, align 4, !tbaa !9
  %236 = load i32, ptr %6, align 4, !tbaa !9
  %237 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %236)
  %238 = getelementptr inbounds %class.GVertexAttributes, ptr %237, i32 0, i32 0
  %239 = load i32, ptr %238, align 4, !tbaa !20
  store i32 %239, ptr %27, align 4, !tbaa !9
  %240 = load i32, ptr %27, align 4, !tbaa !9
  %241 = load i32, ptr %26, align 4, !tbaa !9
  %242 = sub nsw i32 %240, %241
  store i32 %242, ptr %28, align 4, !tbaa !9
  %243 = load i32, ptr %28, align 4, !tbaa !9
  %244 = icmp sgt i32 %243, 0
  br i1 %244, label %245, label %246

245:                                              ; preds = %222
  br label %251

246:                                              ; preds = %222
  %247 = load i32, ptr %28, align 4, !tbaa !9
  %248 = icmp ne i32 %247, 0
  %249 = zext i1 %248 to i64
  %250 = select i1 %248, i32 -1, i32 0
  br label %251

251:                                              ; preds = %246, %245
  %252 = phi i32 [ 1, %245 ], [ %250, %246 ]
  store i32 %252, ptr %29, align 4, !tbaa !9
  %253 = load i32, ptr %29, align 4, !tbaa !9
  %254 = load i32, ptr %28, align 4, !tbaa !9
  %255 = mul nsw i32 %254, %253
  store i32 %255, ptr %28, align 4, !tbaa !9
  %256 = load i32, ptr %28, align 4, !tbaa !9
  %257 = shl i32 %256, 1
  %258 = load i32, ptr %17, align 4, !tbaa !9
  %259 = sub nsw i32 %257, %258
  store i32 %259, ptr %30, align 4, !tbaa !9
  %260 = load i32, ptr %26, align 4, !tbaa !9
  store i32 %260, ptr %25, align 4, !tbaa !9
  %261 = load i32, ptr %10, align 4, !tbaa !9
  %262 = load i32, ptr %16, align 4, !tbaa !9
  %263 = load i32, ptr %15, align 4, !tbaa !9
  %264 = icmp sgt i32 %262, %263
  %265 = zext i1 %264 to i32
  %266 = xor i32 %261, %265
  %267 = icmp ne i32 %266, 0
  br i1 %267, label %268, label %325

268:                                              ; preds = %251
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %269

269:                                              ; preds = %321, %268
  %270 = load i32, ptr %7, align 4, !tbaa !9
  %271 = load i32, ptr %17, align 4, !tbaa !9
  %272 = icmp sle i32 %270, %271
  br i1 %272, label %273, label %324

273:                                              ; preds = %269
  %274 = load i32, ptr %19, align 4, !tbaa !9
  %275 = load i32, ptr %14, align 4, !tbaa !9
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %276
  %278 = getelementptr inbounds %class.Mug, ptr %277, i32 0, i32 1
  %279 = getelementptr inbounds %class.GVertex, ptr %278, i32 0, i32 1
  store i32 %274, ptr %279, align 4, !tbaa !21
  %280 = load i32, ptr %25, align 4, !tbaa !9
  %281 = load i32, ptr %14, align 4, !tbaa !9
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %282
  %284 = getelementptr inbounds %class.Mug, ptr %283, i32 0, i32 1
  %285 = getelementptr inbounds %class.GVertexAttributes, ptr %284, i32 0, i32 0
  store i32 %280, ptr %285, align 16, !tbaa !20
  %286 = load i32, ptr %18, align 4, !tbaa !9
  %287 = load i32, ptr %14, align 4, !tbaa !9
  %288 = add nsw i32 %287, %286
  store i32 %288, ptr %14, align 4, !tbaa !9
  br label %289

289:                                              ; preds = %292, %273
  %290 = load i32, ptr %24, align 4, !tbaa !9
  %291 = icmp sge i32 %290, 0
  br i1 %291, label %292, label %300

292:                                              ; preds = %289
  %293 = load i32, ptr %23, align 4, !tbaa !9
  %294 = load i32, ptr %19, align 4, !tbaa !9
  %295 = add nsw i32 %294, %293
  store i32 %295, ptr %19, align 4, !tbaa !9
  %296 = load i32, ptr %17, align 4, !tbaa !9
  %297 = shl i32 %296, 1
  %298 = load i32, ptr %24, align 4, !tbaa !9
  %299 = sub nsw i32 %298, %297
  store i32 %299, ptr %24, align 4, !tbaa !9
  br label %289, !llvm.loop !23

300:                                              ; preds = %289
  %301 = load i32, ptr %22, align 4, !tbaa !9
  %302 = shl i32 %301, 1
  %303 = load i32, ptr %24, align 4, !tbaa !9
  %304 = add nsw i32 %303, %302
  store i32 %304, ptr %24, align 4, !tbaa !9
  br label %305

305:                                              ; preds = %308, %300
  %306 = load i32, ptr %30, align 4, !tbaa !9
  %307 = icmp sge i32 %306, 0
  br i1 %307, label %308, label %316

308:                                              ; preds = %305
  %309 = load i32, ptr %29, align 4, !tbaa !9
  %310 = load i32, ptr %25, align 4, !tbaa !9
  %311 = add nsw i32 %310, %309
  store i32 %311, ptr %25, align 4, !tbaa !9
  %312 = load i32, ptr %17, align 4, !tbaa !9
  %313 = shl i32 %312, 1
  %314 = load i32, ptr %30, align 4, !tbaa !9
  %315 = sub nsw i32 %314, %313
  store i32 %315, ptr %30, align 4, !tbaa !9
  br label %305, !llvm.loop !24

316:                                              ; preds = %305
  %317 = load i32, ptr %28, align 4, !tbaa !9
  %318 = shl i32 %317, 1
  %319 = load i32, ptr %30, align 4, !tbaa !9
  %320 = add nsw i32 %319, %318
  store i32 %320, ptr %30, align 4, !tbaa !9
  br label %321

321:                                              ; preds = %316
  %322 = load i32, ptr %7, align 4, !tbaa !9
  %323 = add nsw i32 %322, 1
  store i32 %323, ptr %7, align 4, !tbaa !9
  br label %269, !llvm.loop !25

324:                                              ; preds = %269
  br label %382

325:                                              ; preds = %251
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %326

326:                                              ; preds = %378, %325
  %327 = load i32, ptr %7, align 4, !tbaa !9
  %328 = load i32, ptr %17, align 4, !tbaa !9
  %329 = icmp sle i32 %327, %328
  br i1 %329, label %330, label %381

330:                                              ; preds = %326
  %331 = load i32, ptr %19, align 4, !tbaa !9
  %332 = load i32, ptr %14, align 4, !tbaa !9
  %333 = sext i32 %332 to i64
  %334 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %333
  %335 = getelementptr inbounds %class.Mug, ptr %334, i32 0, i32 0
  %336 = getelementptr inbounds %class.GVertex, ptr %335, i32 0, i32 1
  store i32 %331, ptr %336, align 4, !tbaa !26
  %337 = load i32, ptr %25, align 4, !tbaa !9
  %338 = load i32, ptr %14, align 4, !tbaa !9
  %339 = sext i32 %338 to i64
  %340 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %339
  %341 = getelementptr inbounds %class.Mug, ptr %340, i32 0, i32 0
  %342 = getelementptr inbounds %class.GVertexAttributes, ptr %341, i32 0, i32 0
  store i32 %337, ptr %342, align 16, !tbaa !20
  %343 = load i32, ptr %18, align 4, !tbaa !9
  %344 = load i32, ptr %14, align 4, !tbaa !9
  %345 = add nsw i32 %344, %343
  store i32 %345, ptr %14, align 4, !tbaa !9
  br label %346

346:                                              ; preds = %349, %330
  %347 = load i32, ptr %24, align 4, !tbaa !9
  %348 = icmp sge i32 %347, 0
  br i1 %348, label %349, label %357

349:                                              ; preds = %346
  %350 = load i32, ptr %23, align 4, !tbaa !9
  %351 = load i32, ptr %19, align 4, !tbaa !9
  %352 = add nsw i32 %351, %350
  store i32 %352, ptr %19, align 4, !tbaa !9
  %353 = load i32, ptr %17, align 4, !tbaa !9
  %354 = shl i32 %353, 1
  %355 = load i32, ptr %24, align 4, !tbaa !9
  %356 = sub nsw i32 %355, %354
  store i32 %356, ptr %24, align 4, !tbaa !9
  br label %346, !llvm.loop !27

357:                                              ; preds = %346
  %358 = load i32, ptr %22, align 4, !tbaa !9
  %359 = shl i32 %358, 1
  %360 = load i32, ptr %24, align 4, !tbaa !9
  %361 = add nsw i32 %360, %359
  store i32 %361, ptr %24, align 4, !tbaa !9
  br label %362

362:                                              ; preds = %365, %357
  %363 = load i32, ptr %30, align 4, !tbaa !9
  %364 = icmp sge i32 %363, 0
  br i1 %364, label %365, label %373

365:                                              ; preds = %362
  %366 = load i32, ptr %29, align 4, !tbaa !9
  %367 = load i32, ptr %25, align 4, !tbaa !9
  %368 = add nsw i32 %367, %366
  store i32 %368, ptr %25, align 4, !tbaa !9
  %369 = load i32, ptr %17, align 4, !tbaa !9
  %370 = shl i32 %369, 1
  %371 = load i32, ptr %30, align 4, !tbaa !9
  %372 = sub nsw i32 %371, %370
  store i32 %372, ptr %30, align 4, !tbaa !9
  br label %362, !llvm.loop !28

373:                                              ; preds = %362
  %374 = load i32, ptr %28, align 4, !tbaa !9
  %375 = shl i32 %374, 1
  %376 = load i32, ptr %30, align 4, !tbaa !9
  %377 = add nsw i32 %376, %375
  store i32 %377, ptr %30, align 4, !tbaa !9
  br label %378

378:                                              ; preds = %373
  %379 = load i32, ptr %7, align 4, !tbaa !9
  %380 = add nsw i32 %379, 1
  store i32 %380, ptr %7, align 4, !tbaa !9
  br label %326, !llvm.loop !29

381:                                              ; preds = %326
  br label %382

382:                                              ; preds = %381, %324
  br label %383

383:                                              ; preds = %382, %176
  %384 = load i32, ptr %5, align 4, !tbaa !9
  %385 = add nsw i32 %384, 1
  store i32 %385, ptr %5, align 4, !tbaa !9
  br label %155, !llvm.loop !30

386:                                              ; preds = %155
  %387 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !5
  %388 = load i32, ptr %3, align 4, !tbaa !9
  %389 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !9
  %390 = mul nsw i32 %388, %389
  %391 = sext i32 %390 to i64
  %392 = getelementptr inbounds i8, ptr %387, i64 %391
  store ptr %392, ptr %9, align 8, !tbaa !5
  %393 = load ptr, ptr @_ZN16GraphicComponent6_z_memE, align 8, !tbaa !5
  %394 = load i32, ptr %3, align 4, !tbaa !9
  %395 = load i32, ptr @_ZN16GraphicComponent6_widthE, align 4, !tbaa !9
  %396 = mul nsw i32 %394, %395
  %397 = sext i32 %396 to i64
  %398 = getelementptr inbounds i16, ptr %393, i64 %397
  store ptr %398, ptr %12, align 8, !tbaa !5
  %399 = load i32, ptr %3, align 4, !tbaa !9
  store i32 %399, ptr %14, align 4, !tbaa !9
  br label %400

400:                                              ; preds = %513, %386
  %401 = load i32, ptr %14, align 4, !tbaa !9
  %402 = load i32, ptr %4, align 4, !tbaa !9
  %403 = icmp sle i32 %401, %402
  br i1 %403, label %404, label %516

404:                                              ; preds = %400
  %405 = load i32, ptr %14, align 4, !tbaa !9
  %406 = sext i32 %405 to i64
  %407 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %406
  %408 = getelementptr inbounds %class.Mug, ptr %407, i32 0, i32 0
  %409 = getelementptr inbounds %class.GVertex, ptr %408, i32 0, i32 1
  %410 = load i32, ptr %409, align 4, !tbaa !26
  store i32 %410, ptr %20, align 4, !tbaa !9
  %411 = load i32, ptr %14, align 4, !tbaa !9
  %412 = sext i32 %411 to i64
  %413 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %412
  %414 = getelementptr inbounds %class.Mug, ptr %413, i32 0, i32 1
  %415 = getelementptr inbounds %class.GVertex, ptr %414, i32 0, i32 1
  %416 = load i32, ptr %415, align 4, !tbaa !21
  store i32 %416, ptr %21, align 4, !tbaa !9
  %417 = load i32, ptr %21, align 4, !tbaa !9
  %418 = load i32, ptr %20, align 4, !tbaa !9
  %419 = sub nsw i32 %417, %418
  %420 = add nsw i32 %419, 1
  store i32 %420, ptr %22, align 4, !tbaa !9
  %421 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %421, ptr %19, align 4, !tbaa !9
  %422 = load i32, ptr %14, align 4, !tbaa !9
  %423 = sext i32 %422 to i64
  %424 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %423
  %425 = getelementptr inbounds %class.Mug, ptr %424, i32 0, i32 0
  %426 = getelementptr inbounds %class.GVertexAttributes, ptr %425, i32 0, i32 0
  %427 = load i32, ptr %426, align 16, !tbaa !20
  store i32 %427, ptr %26, align 4, !tbaa !9
  %428 = load i32, ptr %14, align 4, !tbaa !9
  %429 = sext i32 %428 to i64
  %430 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %429
  %431 = getelementptr inbounds %class.Mug, ptr %430, i32 0, i32 1
  %432 = getelementptr inbounds %class.GVertexAttributes, ptr %431, i32 0, i32 0
  %433 = load i32, ptr %432, align 16, !tbaa !20
  store i32 %433, ptr %27, align 4, !tbaa !9
  %434 = load i32, ptr %27, align 4, !tbaa !9
  %435 = load i32, ptr %26, align 4, !tbaa !9
  %436 = sub nsw i32 %434, %435
  store i32 %436, ptr %28, align 4, !tbaa !9
  %437 = load i32, ptr %28, align 4, !tbaa !9
  %438 = icmp sgt i32 %437, 0
  br i1 %438, label %439, label %440

439:                                              ; preds = %404
  br label %445

440:                                              ; preds = %404
  %441 = load i32, ptr %28, align 4, !tbaa !9
  %442 = icmp ne i32 %441, 0
  %443 = zext i1 %442 to i64
  %444 = select i1 %442, i32 -1, i32 0
  br label %445

445:                                              ; preds = %440, %439
  %446 = phi i32 [ 1, %439 ], [ %444, %440 ]
  store i32 %446, ptr %29, align 4, !tbaa !9
  %447 = load i32, ptr %29, align 4, !tbaa !9
  %448 = load i32, ptr %28, align 4, !tbaa !9
  %449 = mul nsw i32 %448, %447
  store i32 %449, ptr %28, align 4, !tbaa !9
  %450 = load i32, ptr %28, align 4, !tbaa !9
  %451 = shl i32 %450, 1
  %452 = load i32, ptr %22, align 4, !tbaa !9
  %453 = sub nsw i32 %451, %452
  store i32 %453, ptr %30, align 4, !tbaa !9
  %454 = load i32, ptr %26, align 4, !tbaa !9
  store i32 %454, ptr %25, align 4, !tbaa !9
  %455 = load ptr, ptr %9, align 8, !tbaa !5
  %456 = load i32, ptr %20, align 4, !tbaa !9
  %457 = sext i32 %456 to i64
  %458 = getelementptr inbounds i32, ptr %455, i64 %457
  store ptr %458, ptr %8, align 8, !tbaa !5
  %459 = load ptr, ptr %12, align 8, !tbaa !5
  %460 = load i32, ptr %20, align 4, !tbaa !9
  %461 = sext i32 %460 to i64
  %462 = getelementptr inbounds i16, ptr %459, i64 %461
  store ptr %462, ptr %11, align 8, !tbaa !5
  %463 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %463, ptr %19, align 4, !tbaa !9
  br label %464

464:                                              ; preds = %501, %445
  %465 = load i32, ptr %19, align 4, !tbaa !9
  %466 = load i32, ptr %21, align 4, !tbaa !9
  %467 = icmp sle i32 %465, %466
  br i1 %467, label %468, label %504

468:                                              ; preds = %464
  %469 = load i32, ptr %25, align 4, !tbaa !9
  %470 = load ptr, ptr %11, align 8, !tbaa !5
  %471 = load i16, ptr %470, align 2, !tbaa !31
  %472 = zext i16 %471 to i32
  %473 = icmp slt i32 %469, %472
  br i1 %473, label %474, label %480

474:                                              ; preds = %468
  %475 = load i32, ptr %25, align 4, !tbaa !9
  %476 = trunc i32 %475 to i16
  %477 = load ptr, ptr %11, align 8, !tbaa !5
  store i16 %476, ptr %477, align 2, !tbaa !31
  %478 = load i32, ptr %13, align 4, !tbaa !9
  %479 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %478, ptr %479, align 4, !tbaa !9
  br label %480

480:                                              ; preds = %474, %468
  br label %481

481:                                              ; preds = %484, %480
  %482 = load i32, ptr %30, align 4, !tbaa !9
  %483 = icmp sge i32 %482, 0
  br i1 %483, label %484, label %492

484:                                              ; preds = %481
  %485 = load i32, ptr %29, align 4, !tbaa !9
  %486 = load i32, ptr %25, align 4, !tbaa !9
  %487 = add nsw i32 %486, %485
  store i32 %487, ptr %25, align 4, !tbaa !9
  %488 = load i32, ptr %22, align 4, !tbaa !9
  %489 = shl i32 %488, 1
  %490 = load i32, ptr %30, align 4, !tbaa !9
  %491 = sub nsw i32 %490, %489
  store i32 %491, ptr %30, align 4, !tbaa !9
  br label %481, !llvm.loop !33

492:                                              ; preds = %481
  %493 = load i32, ptr %28, align 4, !tbaa !9
  %494 = shl i32 %493, 1
  %495 = load i32, ptr %30, align 4, !tbaa !9
  %496 = add nsw i32 %495, %494
  store i32 %496, ptr %30, align 4, !tbaa !9
  %497 = load ptr, ptr %8, align 8, !tbaa !5
  %498 = getelementptr inbounds i32, ptr %497, i32 1
  store ptr %498, ptr %8, align 8, !tbaa !5
  %499 = load ptr, ptr %11, align 8, !tbaa !5
  %500 = getelementptr inbounds i16, ptr %499, i32 1
  store ptr %500, ptr %11, align 8, !tbaa !5
  br label %501

501:                                              ; preds = %492
  %502 = load i32, ptr %19, align 4, !tbaa !9
  %503 = add nsw i32 %502, 1
  store i32 %503, ptr %19, align 4, !tbaa !9
  br label %464, !llvm.loop !34

504:                                              ; preds = %464
  %505 = load ptr, ptr %9, align 8, !tbaa !5
  %506 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !9
  %507 = sext i32 %506 to i64
  %508 = getelementptr inbounds i8, ptr %505, i64 %507
  store ptr %508, ptr %9, align 8, !tbaa !5
  %509 = load i32, ptr @_ZN16GraphicComponent6_widthE, align 4, !tbaa !9
  %510 = load ptr, ptr %12, align 8, !tbaa !5
  %511 = sext i32 %509 to i64
  %512 = getelementptr inbounds i16, ptr %510, i64 %511
  store ptr %512, ptr %12, align 8, !tbaa !5
  br label %513

513:                                              ; preds = %504
  %514 = load i32, ptr %14, align 4, !tbaa !9
  %515 = add nsw i32 %514, 1
  store i32 %515, ptr %14, align 4, !tbaa !9
  br label %400, !llvm.loop !35

516:                                              ; preds = %400
  store i32 0, ptr %31, align 4
  br label %517

517:                                              ; preds = %516, %153, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  %518 = load i32, ptr %31, align 4
  switch i32 %518, label %520 [
    i32 0, label %519
    i32 1, label %519
  ]

519:                                              ; preds = %517, %517
  ret void

520:                                              ; preds = %517
  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

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 = { 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 4}
!12 = !{!"_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}
!13 = !{!14, !10, i64 36}
!14 = !{!"_ZTS7GVertex", !12, i64 0, !10, i64 36, !10, i64 40, !15, i64 44, !15, i64 60, !15, i64 76, !15, i64 92, !15, i64 108, !16, i64 124}
!15 = !{!"_ZTS7GVector", !7, i64 0}
!16 = !{!"_ZTS5Flags", !10, i64 0}
!17 = !{!14, !10, i64 40}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!12, !10, i64 0}
!21 = !{!22, !10, i64 164}
!22 = !{!"_ZTS3Mug", !14, i64 0, !14, i64 128}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !19}
!26 = !{!22, !10, i64 36}
!27 = distinct !{!27, !19}
!28 = distinct !{!28, !19}
!29 = distinct !{!29, !19}
!30 = distinct !{!30, !19}
!31 = !{!32, !32, i64 0}
!32 = !{!"short", !7, i64 0}
!33 = distinct !{!33, !19}
!34 = distinct !{!34, !19}
!35 = distinct !{!35, !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"

%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 }

@_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
@_ZN16GraphicComponent6_z_memE = external local_unnamed_addr global ptr, align 8
@_ZN16GraphicComponent6_widthE = external local_unnamed_addr global i32, align 4
@_ZN16GraphicComponent13_truecolormapE = external local_unnamed_addr global [256 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN17PolygonEngine_32x12FillPoly_c_ZEP17GVertexAttributes(ptr nocapture noundef readonly %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 4
  %3 = load i32, ptr %2, align 4, !tbaa !5
  %4 = ashr i32 %3, 4
  %5 = sext i32 %4 to i64
  %6 = getelementptr inbounds [256 x i32], ptr @_ZN16GraphicComponent13_truecolormapE, i64 0, i64 %5
  %7 = load i32, ptr %6, align 4, !tbaa !10
  %8 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %9 = icmp slt i32 %8, 2
  br i1 %9, label %.loopexit, label %.preheader220

.preheader220:                                    ; preds = %1
  %10 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %.preheader219

.lr.ph:                                           ; preds = %.preheader220, %66
  %.0224 = phi i32 [ %57, %66 ], [ 1000, %.preheader220 ]
  %.0163223 = phi i32 [ %67, %66 ], [ -1, %.preheader220 ]
  %.0164222 = phi i32 [ %12, %66 ], [ 0, %.preheader220 ]
  %.0189221 = phi i32 [ %47, %66 ], [ 0, %.preheader220 ]
  %12 = add nuw nsw i32 %.0164222, 1
  %13 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %14 = icmp eq i32 %12, %13
  %spec.select = select i1 %14, i32 0, i32 %12
  %15 = add nuw nsw i32 %spec.select, 1
  %16 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %17 = icmp eq i32 %15, %16
  %.0166 = select i1 %17, i32 0, i32 %15
  %18 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0164222)
  %19 = getelementptr inbounds i8, ptr %18, i64 36
  %20 = load i32, ptr %19, align 4, !tbaa !11
  %21 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select)
  %22 = getelementptr inbounds i8, ptr %21, i64 36
  %23 = load i32, ptr %22, align 4, !tbaa !11
  %24 = sub nsw i32 %20, %23
  %25 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0164222)
  %26 = getelementptr inbounds i8, ptr %25, i64 40
  %27 = load i32, ptr %26, align 4, !tbaa !15
  %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 40
  %30 = load i32, ptr %29, align 4, !tbaa !15
  %.neg = sub i32 %30, %27
  %31 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0166)
  %32 = getelementptr inbounds i8, ptr %31, i64 36
  %33 = load i32, ptr %32, align 4, !tbaa !11
  %34 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select)
  %35 = getelementptr inbounds i8, ptr %34, i64 36
  %36 = load i32, ptr %35, align 4, !tbaa !11
  %37 = sub nsw i32 %33, %36
  %38 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0166)
  %39 = getelementptr inbounds i8, ptr %38, i64 40
  %40 = load i32, ptr %39, align 4, !tbaa !15
  %41 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select)
  %42 = getelementptr inbounds i8, ptr %41, i64 40
  %43 = load i32, ptr %42, align 4, !tbaa !15
  %44 = sub nsw i32 %40, %43
  %45 = mul nsw i32 %44, %24
  %.neg211 = mul i32 %37, %.neg
  %46 = add i32 %.neg211, %.0189221
  %47 = add i32 %46, %45
  %48 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0164222)
  %49 = getelementptr inbounds i8, ptr %48, i64 40
  %50 = load i32, ptr %49, align 4, !tbaa !15
  %51 = icmp slt i32 %.0224, %50
  br i1 %51, label %56, label %52

52:                                               ; preds = %.lr.ph
  %53 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0164222)
  %54 = getelementptr inbounds i8, ptr %53, i64 40
  %55 = load i32, ptr %54, align 4, !tbaa !15
  br label %56

56:                                               ; preds = %.lr.ph, %52
  %57 = phi i32 [ %55, %52 ], [ %.0224, %.lr.ph ]
  %58 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0164222)
  %59 = getelementptr inbounds i8, ptr %58, i64 40
  %60 = load i32, ptr %59, align 4, !tbaa !15
  %61 = icmp sgt i32 %.0163223, %60
  br i1 %61, label %66, label %62

62:                                               ; preds = %56
  %63 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0164222)
  %64 = getelementptr inbounds i8, ptr %63, i64 40
  %65 = load i32, ptr %64, align 4, !tbaa !15
  br label %66

66:                                               ; preds = %56, %62
  %67 = phi i32 [ %65, %62 ], [ %.0163223, %56 ]
  %68 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %69 = icmp slt i32 %12, %68
  br i1 %69, label %.lr.ph, label %._crit_edge, !llvm.loop !16

._crit_edge:                                      ; preds = %66
  %70 = icmp sgt i32 %47, 0
  %71 = icmp eq i32 %57, %67
  br i1 %71, label %.loopexit, label %.preheader219

.preheader219:                                    ; preds = %.preheader220, %._crit_edge
  %.0.lcssa325 = phi i32 [ %57, %._crit_edge ], [ 1000, %.preheader220 ]
  %.0163.lcssa324 = phi i32 [ %67, %._crit_edge ], [ -1, %.preheader220 ]
  %.0189.lcssa323 = phi i1 [ %70, %._crit_edge ], [ false, %.preheader220 ]
  %72 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %.lr.ph272, label %._crit_edge273

.lr.ph272:                                        ; preds = %.preheader219, %.loopexit216
  %.1271 = phi i32 [ %74, %.loopexit216 ], [ 0, %.preheader219 ]
  %74 = add nuw nsw i32 %.1271, 1
  %75 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %76 = icmp eq i32 %74, %75
  %spec.select212 = select i1 %76, i32 0, i32 %74
  %77 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1271)
  %78 = getelementptr inbounds i8, ptr %77, i64 40
  %79 = load i32, ptr %78, align 4, !tbaa !15
  %80 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select212)
  %81 = getelementptr inbounds i8, ptr %80, i64 40
  %82 = load i32, ptr %81, align 4, !tbaa !15
  %83 = icmp eq i32 %79, %82
  br i1 %83, label %.loopexit216, label %84

84:                                               ; preds = %.lr.ph272
  %85 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1271)
  %86 = getelementptr inbounds i8, ptr %85, i64 40
  %87 = load i32, ptr %86, align 4, !tbaa !15
  %88 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select212)
  %89 = getelementptr inbounds i8, ptr %88, i64 40
  %90 = load i32, ptr %89, align 4, !tbaa !15
  %91 = sub i32 %90, %87
  %.not206 = icmp ne i32 %90, %87
  %92 = sext i1 %.not206 to i32
  %.inv213 = icmp slt i32 %91, 1
  %93 = select i1 %.inv213, i32 %92, i32 1
  %94 = mul i32 %93, %91
  %95 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1271)
  %96 = getelementptr inbounds i8, ptr %95, i64 36
  %97 = load i32, ptr %96, align 4, !tbaa !11
  %98 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select212)
  %99 = getelementptr inbounds i8, ptr %98, i64 36
  %100 = load i32, ptr %99, align 4, !tbaa !11
  %101 = sub nsw i32 %100, %97
  %.not207 = icmp ne i32 %100, %97
  %102 = sext i1 %.not207 to i32
  %.inv214 = icmp slt i32 %101, 1
  %103 = select i1 %.inv214, i32 %102, i32 1
  %104 = shl i32 %101, 1
  %105 = mul i32 %104, %103
  %106 = sub nsw i32 %105, %94
  %107 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1271)
  %108 = load i32, ptr %107, align 4, !tbaa !18
  %109 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select212)
  %110 = load i32, ptr %109, align 4, !tbaa !18
  %111 = sub nsw i32 %110, %108
  %.not208 = icmp ne i32 %110, %108
  %112 = sext i1 %.not208 to i32
  %.inv215 = icmp slt i32 %111, 1
  %113 = select i1 %.inv215, i32 %112, i32 1
  %114 = shl i32 %111, 1
  %115 = mul i32 %114, %113
  %116 = sub nsw i32 %115, %94
  %117 = icmp sgt i32 %90, %87
  %118 = xor i1 %.0189.lcssa323, %117
  %.not210263 = icmp slt i32 %94, 0
  br i1 %118, label %.preheader, label %.preheader217

.preheader217:                                    ; preds = %84
  br i1 %.not210263, label %.loopexit216, label %.lr.ph248

.lr.ph248:                                        ; preds = %.preheader217
  %119 = shl nuw i32 %94, 1
  %120 = sext i32 %87 to i64
  %121 = sext i32 %93 to i64
  br label %139

.preheader:                                       ; preds = %84
  br i1 %.not210263, label %.loopexit216, label %.lr.ph270

.lr.ph270:                                        ; preds = %.preheader
  %122 = shl nuw i32 %94, 1
  %123 = sext i32 %87 to i64
  %124 = sext i32 %93 to i64
  br label %125

125:                                              ; preds = %.lr.ph270, %._crit_edge260
  %indvars.iv310 = phi i64 [ %123, %.lr.ph270 ], [ %indvars.iv.next311, %._crit_edge260 ]
  %.0168269 = phi i32 [ %116, %.lr.ph270 ], [ %137, %._crit_edge260 ]
  %.0170268 = phi i32 [ %108, %.lr.ph270 ], [ %.1171.lcssa, %._crit_edge260 ]
  %.0176267 = phi i32 [ %106, %.lr.ph270 ], [ %132, %._crit_edge260 ]
  %.0180266 = phi i32 [ 0, %.lr.ph270 ], [ %138, %._crit_edge260 ]
  %.0182265 = phi i32 [ %97, %.lr.ph270 ], [ %.1183.lcssa, %._crit_edge260 ]
  %126 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %indvars.iv310, i32 1
  %127 = getelementptr inbounds i8, ptr %126, i64 36
  store i32 %.0182265, ptr %127, align 4, !tbaa !19
  store i32 %.0170268, ptr %126, align 16, !tbaa !18
  %indvars.iv.next311 = add nsw i64 %indvars.iv310, %124
  %128 = icmp sgt i32 %.0176267, -1
  br i1 %128, label %.lr.ph252, label %._crit_edge253

.lr.ph252:                                        ; preds = %125, %.lr.ph252
  %.1177250 = phi i32 [ %130, %.lr.ph252 ], [ %.0176267, %125 ]
  %.1183249 = phi i32 [ %129, %.lr.ph252 ], [ %.0182265, %125 ]
  %129 = add nsw i32 %.1183249, %103
  %130 = sub nsw i32 %.1177250, %122
  %131 = icmp sgt i32 %130, -1
  br i1 %131, label %.lr.ph252, label %._crit_edge253, !llvm.loop !21

._crit_edge253:                                   ; preds = %.lr.ph252, %125
  %.1183.lcssa = phi i32 [ %.0182265, %125 ], [ %129, %.lr.ph252 ]
  %.1177.lcssa = phi i32 [ %.0176267, %125 ], [ %130, %.lr.ph252 ]
  %132 = add nsw i32 %.1177.lcssa, %105
  %133 = icmp sgt i32 %.0168269, -1
  br i1 %133, label %.lr.ph259, label %._crit_edge260

.lr.ph259:                                        ; preds = %._crit_edge253, %.lr.ph259
  %.1169257 = phi i32 [ %135, %.lr.ph259 ], [ %.0168269, %._crit_edge253 ]
  %.1171256 = phi i32 [ %134, %.lr.ph259 ], [ %.0170268, %._crit_edge253 ]
  %134 = add nsw i32 %.1171256, %113
  %135 = sub nsw i32 %.1169257, %122
  %136 = icmp sgt i32 %135, -1
  br i1 %136, label %.lr.ph259, label %._crit_edge260, !llvm.loop !22

._crit_edge260:                                   ; preds = %.lr.ph259, %._crit_edge253
  %.1171.lcssa = phi i32 [ %.0170268, %._crit_edge253 ], [ %134, %.lr.ph259 ]
  %.1169.lcssa = phi i32 [ %.0168269, %._crit_edge253 ], [ %135, %.lr.ph259 ]
  %137 = add nsw i32 %.1169.lcssa, %115
  %138 = add nuw i32 %.0180266, 1
  %exitcond313.not = icmp eq i32 %.0180266, %94
  br i1 %exitcond313.not, label %.loopexit216, label %125, !llvm.loop !23

139:                                              ; preds = %.lr.ph248, %._crit_edge238
  %indvars.iv = phi i64 [ %120, %.lr.ph248 ], [ %indvars.iv.next, %._crit_edge238 ]
  %.2247 = phi i32 [ %116, %.lr.ph248 ], [ %151, %._crit_edge238 ]
  %.2172246 = phi i32 [ %108, %.lr.ph248 ], [ %.3173.lcssa, %._crit_edge238 ]
  %.2178245 = phi i32 [ %106, %.lr.ph248 ], [ %146, %._crit_edge238 ]
  %.1181244 = phi i32 [ 0, %.lr.ph248 ], [ %152, %._crit_edge238 ]
  %.2184243 = phi i32 [ %97, %.lr.ph248 ], [ %.3185.lcssa, %._crit_edge238 ]
  %140 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %indvars.iv
  %141 = getelementptr inbounds i8, ptr %140, i64 36
  store i32 %.2184243, ptr %141, align 4, !tbaa !24
  store i32 %.2172246, ptr %140, align 16, !tbaa !18
  %indvars.iv.next = add nsw i64 %indvars.iv, %121
  %142 = icmp sgt i32 %.2178245, -1
  br i1 %142, label %.lr.ph230, label %._crit_edge231

.lr.ph230:                                        ; preds = %139, %.lr.ph230
  %.3179228 = phi i32 [ %144, %.lr.ph230 ], [ %.2178245, %139 ]
  %.3185227 = phi i32 [ %143, %.lr.ph230 ], [ %.2184243, %139 ]
  %143 = add nsw i32 %.3185227, %103
  %144 = sub nsw i32 %.3179228, %119
  %145 = icmp sgt i32 %144, -1
  br i1 %145, label %.lr.ph230, label %._crit_edge231, !llvm.loop !25

._crit_edge231:                                   ; preds = %.lr.ph230, %139
  %.3185.lcssa = phi i32 [ %.2184243, %139 ], [ %143, %.lr.ph230 ]
  %.3179.lcssa = phi i32 [ %.2178245, %139 ], [ %144, %.lr.ph230 ]
  %146 = add nsw i32 %.3179.lcssa, %105
  %147 = icmp sgt i32 %.2247, -1
  br i1 %147, label %.lr.ph237, label %._crit_edge238

.lr.ph237:                                        ; preds = %._crit_edge231, %.lr.ph237
  %.3235 = phi i32 [ %149, %.lr.ph237 ], [ %.2247, %._crit_edge231 ]
  %.3173234 = phi i32 [ %148, %.lr.ph237 ], [ %.2172246, %._crit_edge231 ]
  %148 = add nsw i32 %.3173234, %113
  %149 = sub nsw i32 %.3235, %119
  %150 = icmp sgt i32 %149, -1
  br i1 %150, label %.lr.ph237, label %._crit_edge238, !llvm.loop !26

._crit_edge238:                                   ; preds = %.lr.ph237, %._crit_edge231
  %.3173.lcssa = phi i32 [ %.2172246, %._crit_edge231 ], [ %148, %.lr.ph237 ]
  %.3.lcssa = phi i32 [ %.2247, %._crit_edge231 ], [ %149, %.lr.ph237 ]
  %151 = add nsw i32 %.3.lcssa, %115
  %152 = add nuw i32 %.1181244, 1
  %exitcond.not = icmp eq i32 %.1181244, %94
  br i1 %exitcond.not, label %.loopexit216, label %139, !llvm.loop !27

.loopexit216:                                     ; preds = %._crit_edge238, %._crit_edge260, %.preheader217, %.preheader, %.lr.ph272
  %153 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %154 = icmp slt i32 %74, %153
  br i1 %154, label %.lr.ph272, label %._crit_edge273, !llvm.loop !28

._crit_edge273:                                   ; preds = %.loopexit216, %.preheader219
  %.not290 = icmp sgt i32 %.0.lcssa325, %.0163.lcssa324
  br i1 %.not290, label %.loopexit, label %.lr.ph295.preheader

.lr.ph295.preheader:                              ; preds = %._crit_edge273
  %155 = load ptr, ptr @_ZN16GraphicComponent6_z_memE, align 8, !tbaa !29
  %156 = load i32, ptr @_ZN16GraphicComponent6_widthE, align 4, !tbaa !10
  %157 = mul nsw i32 %156, %.0.lcssa325
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i16, ptr %155, i64 %158
  %160 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !29
  %161 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !10
  %162 = mul nsw i32 %161, %.0.lcssa325
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds i8, ptr %160, i64 %163
  %165 = sext i32 %.0.lcssa325 to i64
  %166 = add i32 %.0163.lcssa324, 1
  br label %.lr.ph295

.lr.ph295:                                        ; preds = %.lr.ph295.preheader, %._crit_edge289
  %167 = phi i32 [ %156, %.lr.ph295.preheader ], [ %204, %._crit_edge289 ]
  %168 = phi i32 [ %161, %.lr.ph295.preheader ], [ %205, %._crit_edge289 ]
  %indvars.iv315 = phi i64 [ %165, %.lr.ph295.preheader ], [ %indvars.iv.next316, %._crit_edge289 ]
  %.0188293 = phi ptr [ %164, %.lr.ph295.preheader ], [ %207, %._crit_edge289 ]
  %.0194291 = phi ptr [ %159, %.lr.ph295.preheader ], [ %209, %._crit_edge289 ]
  %169 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %indvars.iv315
  %170 = getelementptr inbounds i8, ptr %169, i64 36
  %171 = load i32, ptr %170, align 4, !tbaa !24
  %172 = getelementptr inbounds i8, ptr %169, i64 128
  %173 = getelementptr inbounds i8, ptr %169, i64 164
  %174 = load i32, ptr %173, align 4, !tbaa !19
  %175 = load i32, ptr %169, align 16, !tbaa !18
  %176 = load i32, ptr %172, align 16, !tbaa !18
  %177 = sub nsw i32 %176, %175
  %.not204 = icmp ne i32 %176, %175
  %178 = sext i1 %.not204 to i32
  %.inv = icmp slt i32 %177, 1
  %179 = select i1 %.inv, i32 %178, i32 1
  %180 = shl i32 %177, 1
  %181 = mul i32 %180, %179
  %.not205281 = icmp sgt i32 %171, %174
  br i1 %.not205281, label %._crit_edge289, label %.lr.ph288

.lr.ph288:                                        ; preds = %.lr.ph295
  %182 = sext i32 %171 to i64
  %183 = getelementptr inbounds i16, ptr %.0194291, i64 %182
  %184 = getelementptr inbounds i32, ptr %.0188293, i64 %182
  %185 = sub nsw i32 %174, %171
  %186 = add nsw i32 %185, 1
  %187 = sub nsw i32 %181, %186
  %188 = shl i32 %186, 1
  br label %189

189:                                              ; preds = %.lr.ph288, %._crit_edge278
  %.4286 = phi i32 [ %187, %.lr.ph288 ], [ %200, %._crit_edge278 ]
  %.4174285 = phi i32 [ %175, %.lr.ph288 ], [ %.5175.lcssa, %._crit_edge278 ]
  %.4186284 = phi i32 [ %171, %.lr.ph288 ], [ %203, %._crit_edge278 ]
  %.0187283 = phi ptr [ %184, %.lr.ph288 ], [ %201, %._crit_edge278 ]
  %.0193282 = phi ptr [ %183, %.lr.ph288 ], [ %202, %._crit_edge278 ]
  %190 = load i16, ptr %.0193282, align 2, !tbaa !31
  %191 = zext i16 %190 to i32
  %192 = icmp slt i32 %.4174285, %191
  br i1 %192, label %193, label %195

193:                                              ; preds = %189
  %194 = trunc i32 %.4174285 to i16
  store i16 %194, ptr %.0193282, align 2, !tbaa !31
  store i32 %7, ptr %.0187283, align 4, !tbaa !10
  br label %195

195:                                              ; preds = %193, %189
  %196 = icmp sgt i32 %.4286, -1
  br i1 %196, label %.lr.ph277, label %._crit_edge278

.lr.ph277:                                        ; preds = %195, %.lr.ph277
  %.5275 = phi i32 [ %198, %.lr.ph277 ], [ %.4286, %195 ]
  %.5175274 = phi i32 [ %197, %.lr.ph277 ], [ %.4174285, %195 ]
  %197 = add nsw i32 %.5175274, %179
  %198 = sub nsw i32 %.5275, %188
  %199 = icmp sgt i32 %198, -1
  br i1 %199, label %.lr.ph277, label %._crit_edge278, !llvm.loop !33

._crit_edge278:                                   ; preds = %.lr.ph277, %195
  %.5175.lcssa = phi i32 [ %.4174285, %195 ], [ %197, %.lr.ph277 ]
  %.5.lcssa = phi i32 [ %.4286, %195 ], [ %198, %.lr.ph277 ]
  %200 = add nsw i32 %.5.lcssa, %181
  %201 = getelementptr inbounds i8, ptr %.0187283, i64 4
  %202 = getelementptr inbounds i8, ptr %.0193282, i64 2
  %203 = add i32 %.4186284, 1
  %exitcond314.not = icmp eq i32 %.4186284, %174
  br i1 %exitcond314.not, label %._crit_edge289.loopexit, label %189, !llvm.loop !34

._crit_edge289.loopexit:                          ; preds = %._crit_edge278
  %.pre = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !10
  %.pre319 = load i32, ptr @_ZN16GraphicComponent6_widthE, align 4, !tbaa !10
  br label %._crit_edge289

._crit_edge289:                                   ; preds = %._crit_edge289.loopexit, %.lr.ph295
  %204 = phi i32 [ %.pre319, %._crit_edge289.loopexit ], [ %167, %.lr.ph295 ]
  %205 = phi i32 [ %.pre, %._crit_edge289.loopexit ], [ %168, %.lr.ph295 ]
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds i8, ptr %.0188293, i64 %206
  %208 = sext i32 %204 to i64
  %209 = getelementptr inbounds i16, ptr %.0194291, i64 %208
  %indvars.iv.next316 = add nsw i64 %indvars.iv315, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next316 to i32
  %exitcond318.not = icmp eq i32 %166, %lftr.wideiv
  br i1 %exitcond318.not, label %.loopexit, label %.lr.ph295, !llvm.loop !35

.loopexit:                                        ; preds = %._crit_edge289, %._crit_edge273, %._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

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

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


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