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

; 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
@_ZN16GraphicComponent13_truecolormapE = external global [256 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17PolygonEngine_55510FillPoly_CEP17GVertexAttributes(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
  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 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  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
  %35 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %36 = icmp slt i32 %35, 2
  br i1 %36, label %37, label %38

37:                                               ; preds = %1
  store i32 1, ptr %28, align 4
  br label %505

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

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

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

49:                                               ; preds = %43
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %50

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

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

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

109:                                              ; preds = %57
  %110 = load i32, ptr %3, align 4, !tbaa !9
  br label %116

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

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

124:                                              ; preds = %116
  %125 = load i32, ptr %4, align 4, !tbaa !9
  br label %131

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

131:                                              ; preds = %126, %124
  %132 = phi i32 [ %125, %124 ], [ %130, %126 ]
  store i32 %132, ptr %4, align 4, !tbaa !9
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #3
  br label %133

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

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

143:                                              ; preds = %136
  store i32 1, ptr %28, align 4
  br label %505

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

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

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

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

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

166:                                              ; preds = %156
  br label %393

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

181:                                              ; preds = %167
  br label %187

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

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

206:                                              ; preds = %187
  br label %212

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

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

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

232:                                              ; preds = %212
  br label %233

233:                                              ; preds = %232, %227
  %234 = phi i32 [ %231, %227 ], [ 4080, %232 ]
  %235 = ashr i32 %234, 4
  store i32 %235, ptr %23, 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 1
  %239 = load i32, ptr %238, align 4, !tbaa !19
  %240 = icmp slt i32 %239, 4080
  br i1 %240, label %241, label %246

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

246:                                              ; preds = %233
  br label %247

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

255:                                              ; preds = %247
  br label %261

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

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

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

279:                                              ; preds = %331, %278
  %280 = load i32, ptr %7, align 4, !tbaa !9
  %281 = load i32, ptr %14, align 4, !tbaa !9
  %282 = icmp sle i32 %280, %281
  br i1 %282, label %283, label %334

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

299:                                              ; preds = %302, %283
  %300 = load i32, ptr %21, align 4, !tbaa !9
  %301 = icmp sge i32 %300, 0
  br i1 %301, label %302, label %310

302:                                              ; preds = %299
  %303 = load i32, ptr %20, align 4, !tbaa !9
  %304 = load i32, ptr %16, align 4, !tbaa !9
  %305 = add nsw i32 %304, %303
  store i32 %305, ptr %16, align 4, !tbaa !9
  %306 = load i32, ptr %14, align 4, !tbaa !9
  %307 = shl i32 %306, 1
  %308 = load i32, ptr %21, align 4, !tbaa !9
  %309 = sub nsw i32 %308, %307
  store i32 %309, ptr %21, align 4, !tbaa !9
  br label %299, !llvm.loop !22

310:                                              ; preds = %299
  %311 = load i32, ptr %19, align 4, !tbaa !9
  %312 = shl i32 %311, 1
  %313 = load i32, ptr %21, align 4, !tbaa !9
  %314 = add nsw i32 %313, %312
  store i32 %314, ptr %21, align 4, !tbaa !9
  br label %315

315:                                              ; preds = %318, %310
  %316 = load i32, ptr %27, align 4, !tbaa !9
  %317 = icmp sge i32 %316, 0
  br i1 %317, label %318, label %326

318:                                              ; preds = %315
  %319 = load i32, ptr %26, align 4, !tbaa !9
  %320 = load i32, ptr %22, align 4, !tbaa !9
  %321 = add nsw i32 %320, %319
  store i32 %321, ptr %22, align 4, !tbaa !9
  %322 = load i32, ptr %14, align 4, !tbaa !9
  %323 = shl i32 %322, 1
  %324 = load i32, ptr %27, align 4, !tbaa !9
  %325 = sub nsw i32 %324, %323
  store i32 %325, ptr %27, align 4, !tbaa !9
  br label %315, !llvm.loop !23

326:                                              ; preds = %315
  %327 = load i32, ptr %25, align 4, !tbaa !9
  %328 = shl i32 %327, 1
  %329 = load i32, ptr %27, align 4, !tbaa !9
  %330 = add nsw i32 %329, %328
  store i32 %330, ptr %27, align 4, !tbaa !9
  br label %331

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

334:                                              ; preds = %279
  br label %392

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

336:                                              ; preds = %388, %335
  %337 = load i32, ptr %7, align 4, !tbaa !9
  %338 = load i32, ptr %14, align 4, !tbaa !9
  %339 = icmp sle i32 %337, %338
  br i1 %339, label %340, label %391

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

356:                                              ; preds = %359, %340
  %357 = load i32, ptr %21, align 4, !tbaa !9
  %358 = icmp sge i32 %357, 0
  br i1 %358, label %359, label %367

359:                                              ; preds = %356
  %360 = load i32, ptr %20, align 4, !tbaa !9
  %361 = load i32, ptr %16, align 4, !tbaa !9
  %362 = add nsw i32 %361, %360
  store i32 %362, ptr %16, align 4, !tbaa !9
  %363 = load i32, ptr %14, align 4, !tbaa !9
  %364 = shl i32 %363, 1
  %365 = load i32, ptr %21, align 4, !tbaa !9
  %366 = sub nsw i32 %365, %364
  store i32 %366, ptr %21, align 4, !tbaa !9
  br label %356, !llvm.loop !26

367:                                              ; preds = %356
  %368 = load i32, ptr %19, align 4, !tbaa !9
  %369 = shl i32 %368, 1
  %370 = load i32, ptr %21, align 4, !tbaa !9
  %371 = add nsw i32 %370, %369
  store i32 %371, ptr %21, align 4, !tbaa !9
  br label %372

372:                                              ; preds = %375, %367
  %373 = load i32, ptr %27, align 4, !tbaa !9
  %374 = icmp sge i32 %373, 0
  br i1 %374, label %375, label %383

375:                                              ; preds = %372
  %376 = load i32, ptr %26, align 4, !tbaa !9
  %377 = load i32, ptr %22, align 4, !tbaa !9
  %378 = add nsw i32 %377, %376
  store i32 %378, ptr %22, align 4, !tbaa !9
  %379 = load i32, ptr %14, align 4, !tbaa !9
  %380 = shl i32 %379, 1
  %381 = load i32, ptr %27, align 4, !tbaa !9
  %382 = sub nsw i32 %381, %380
  store i32 %382, ptr %27, align 4, !tbaa !9
  br label %372, !llvm.loop !27

383:                                              ; preds = %372
  %384 = load i32, ptr %25, align 4, !tbaa !9
  %385 = shl i32 %384, 1
  %386 = load i32, ptr %27, align 4, !tbaa !9
  %387 = add nsw i32 %386, %385
  store i32 %387, ptr %27, align 4, !tbaa !9
  br label %388

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

391:                                              ; preds = %336
  br label %392

392:                                              ; preds = %391, %334
  br label %393

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

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

404:                                              ; preds = %501, %396
  %405 = load i32, ptr %11, align 4, !tbaa !9
  %406 = load i32, ptr %4, align 4, !tbaa !9
  %407 = icmp sle i32 %405, %406
  br i1 %407, label %408, label %504

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

443:                                              ; preds = %408
  br label %449

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

449:                                              ; preds = %444, %443
  %450 = phi i32 [ 1, %443 ], [ %448, %444 ]
  store i32 %450, ptr %26, align 4, !tbaa !9
  %451 = load i32, ptr %26, align 4, !tbaa !9
  %452 = load i32, ptr %25, align 4, !tbaa !9
  %453 = mul nsw i32 %452, %451
  store i32 %453, ptr %25, align 4, !tbaa !9
  %454 = load i32, ptr %25, align 4, !tbaa !9
  %455 = shl i32 %454, 1
  %456 = load i32, ptr %19, align 4, !tbaa !9
  %457 = sub nsw i32 %455, %456
  store i32 %457, ptr %27, align 4, !tbaa !9
  %458 = load i32, ptr %23, align 4, !tbaa !9
  store i32 %458, ptr %22, align 4, !tbaa !9
  %459 = load ptr, ptr %9, align 8, !tbaa !5
  %460 = load i32, ptr %17, align 4, !tbaa !9
  %461 = sext i32 %460 to i64
  %462 = getelementptr inbounds i16, ptr %459, i64 %461
  store ptr %462, ptr %8, align 8, !tbaa !5
  %463 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %463, ptr %16, align 4, !tbaa !9
  br label %464

464:                                              ; preds = %493, %449
  %465 = load i32, ptr %16, align 4, !tbaa !9
  %466 = load i32, ptr %18, align 4, !tbaa !9
  %467 = icmp sle i32 %465, %466
  br i1 %467, label %468, label %496

468:                                              ; preds = %464
  %469 = load i32, ptr %22, align 4, !tbaa !9
  %470 = sext i32 %469 to i64
  %471 = getelementptr inbounds [256 x i32], ptr @_ZN16GraphicComponent13_truecolormapE, i64 0, i64 %470
  %472 = load i32, ptr %471, align 4, !tbaa !9
  %473 = trunc i32 %472 to i16
  %474 = load ptr, ptr %8, align 8, !tbaa !5
  store i16 %473, ptr %474, align 2, !tbaa !30
  br label %475

475:                                              ; preds = %478, %468
  %476 = load i32, ptr %27, align 4, !tbaa !9
  %477 = icmp sge i32 %476, 0
  br i1 %477, label %478, label %486

478:                                              ; preds = %475
  %479 = load i32, ptr %26, align 4, !tbaa !9
  %480 = load i32, ptr %22, align 4, !tbaa !9
  %481 = add nsw i32 %480, %479
  store i32 %481, ptr %22, align 4, !tbaa !9
  %482 = load i32, ptr %19, align 4, !tbaa !9
  %483 = shl i32 %482, 1
  %484 = load i32, ptr %27, align 4, !tbaa !9
  %485 = sub nsw i32 %484, %483
  store i32 %485, ptr %27, align 4, !tbaa !9
  br label %475, !llvm.loop !32

486:                                              ; preds = %475
  %487 = load i32, ptr %25, align 4, !tbaa !9
  %488 = shl i32 %487, 1
  %489 = load i32, ptr %27, align 4, !tbaa !9
  %490 = add nsw i32 %489, %488
  store i32 %490, ptr %27, align 4, !tbaa !9
  %491 = load ptr, ptr %8, align 8, !tbaa !5
  %492 = getelementptr inbounds i16, ptr %491, i32 1
  store ptr %492, ptr %8, align 8, !tbaa !5
  br label %493

493:                                              ; preds = %486
  %494 = load i32, ptr %16, align 4, !tbaa !9
  %495 = add nsw i32 %494, 1
  store i32 %495, ptr %16, align 4, !tbaa !9
  br label %464, !llvm.loop !33

496:                                              ; preds = %464
  %497 = load ptr, ptr %9, align 8, !tbaa !5
  %498 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !9
  %499 = sext i32 %498 to i64
  %500 = getelementptr inbounds i8, ptr %497, i64 %499
  store ptr %500, ptr %9, align 8, !tbaa !5
  br label %501

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

504:                                              ; preds = %404
  store i32 0, ptr %28, align 4
  br label %505

505:                                              ; preds = %504, %143, %37
  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 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, 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
  %506 = load i32, ptr %28, align 4
  switch i32 %506, label %508 [
    i32 0, label %507
    i32 1, label %507
  ]

507:                                              ; preds = %505, %505
  ret void

508:                                              ; preds = %505
  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 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 = !{!31, !31, i64 0}
!31 = !{!"short", !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 }

@_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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN17PolygonEngine_55510FillPoly_CEP17GVertexAttributes(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 %.preheader210

.preheader210:                                    ; 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 %.preheader209

.lr.ph:                                           ; preds = %.preheader210, %60
  %.0214 = phi i32 [ %51, %60 ], [ 1000, %.preheader210 ]
  %.0155213 = phi i32 [ %61, %60 ], [ -1, %.preheader210 ]
  %.0156212 = phi i32 [ %6, %60 ], [ 0, %.preheader210 ]
  %.0181211 = phi i32 [ %41, %60 ], [ 0, %.preheader210 ]
  %6 = add nuw nsw i32 %.0156212, 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
  %.0158 = select i1 %11, i32 0, i32 %9
  %12 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0156212)
  %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 %.0156212)
  %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 %.0158)
  %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 %.0158)
  %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
  %.neg201 = mul i32 %31, %.neg
  %40 = add i32 %.neg201, %.0181211
  %41 = add i32 %40, %39
  %42 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0156212)
  %43 = getelementptr inbounds i8, ptr %42, i64 40
  %44 = load i32, ptr %43, align 4, !tbaa !13
  %45 = icmp slt i32 %.0214, %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 %.0156212)
  %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 ], [ %.0214, %.lr.ph ]
  %52 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0156212)
  %53 = getelementptr inbounds i8, ptr %52, i64 40
  %54 = load i32, ptr %53, align 4, !tbaa !13
  %55 = icmp sgt i32 %.0155213, %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 %.0156212)
  %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 ], [ %.0155213, %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 %.preheader209

.preheader209:                                    ; preds = %.preheader210, %._crit_edge
  %.0.lcssa312 = phi i32 [ %51, %._crit_edge ], [ 1000, %.preheader210 ]
  %.0155.lcssa311 = phi i32 [ %61, %._crit_edge ], [ -1, %.preheader210 ]
  %.0181.lcssa310 = phi i1 [ %64, %._crit_edge ], [ false, %.preheader210 ]
  %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.ph262, label %._crit_edge263

.lr.ph262:                                        ; preds = %.preheader209, %.loopexit206
  %.1261 = phi i32 [ %68, %.loopexit206 ], [ 0, %.preheader209 ]
  %68 = add nuw nsw i32 %.1261, 1
  %69 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %70 = icmp eq i32 %68, %69
  %spec.select202 = select i1 %70, i32 0, i32 %68
  %71 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1261)
  %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.select202)
  %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 %.loopexit206, label %78

78:                                               ; preds = %.lr.ph262
  %79 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1261)
  %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.select202)
  %83 = getelementptr inbounds i8, ptr %82, i64 40
  %84 = load i32, ptr %83, align 4, !tbaa !13
  %85 = sub i32 %84, %81
  %.not196 = icmp ne i32 %84, %81
  %86 = sext i1 %.not196 to i32
  %.inv203 = icmp slt i32 %85, 1
  %87 = select i1 %.inv203, 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 %.1261)
  %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.select202)
  %93 = getelementptr inbounds i8, ptr %92, i64 36
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = sub nsw i32 %94, %91
  %.not197 = icmp ne i32 %94, %91
  %96 = sext i1 %.not197 to i32
  %.inv204 = icmp slt i32 %95, 1
  %97 = select i1 %.inv204, 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 %.1261)
  %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 %.1261)
  %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 = ashr i32 %110, 4
  %112 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select202)
  %113 = getelementptr inbounds i8, ptr %112, i64 4
  %114 = load i32, ptr %113, align 4, !tbaa !16
  %115 = icmp slt i32 %114, 4080
  br i1 %115, label %116, label %120

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

120:                                              ; preds = %109, %116
  %121 = phi i32 [ %119, %116 ], [ 4080, %109 ]
  %122 = ashr i32 %121, 4
  %123 = sub nsw i32 %122, %111
  %.not198 = icmp ne i32 %122, %111
  %124 = sext i1 %.not198 to i32
  %.inv205 = icmp slt i32 %123, 1
  %125 = select i1 %.inv205, i32 %124, i32 1
  %126 = shl nsw i32 %123, 1
  %127 = mul nsw i32 %126, %125
  %128 = sub nsw i32 %127, %88
  %129 = icmp sgt i32 %84, %81
  %130 = xor i1 %.0181.lcssa310, %129
  %.not200253 = icmp slt i32 %88, 0
  br i1 %130, label %.preheader, label %.preheader207

.preheader207:                                    ; preds = %120
  br i1 %.not200253, label %.loopexit206, label %.lr.ph238

.lr.ph238:                                        ; preds = %.preheader207
  %131 = shl nuw i32 %88, 1
  %132 = sext i32 %81 to i64
  %133 = sext i32 %87 to i64
  br label %152

.preheader:                                       ; preds = %120
  br i1 %.not200253, label %.loopexit206, label %.lr.ph260

.lr.ph260:                                        ; preds = %.preheader
  %134 = shl nuw i32 %88, 1
  %135 = sext i32 %81 to i64
  %136 = sext i32 %87 to i64
  br label %137

137:                                              ; preds = %.lr.ph260, %._crit_edge250
  %indvars.iv298 = phi i64 [ %135, %.lr.ph260 ], [ %indvars.iv.next299, %._crit_edge250 ]
  %.0160259 = phi i32 [ %128, %.lr.ph260 ], [ %150, %._crit_edge250 ]
  %.0162258 = phi i32 [ %111, %.lr.ph260 ], [ %.1163.lcssa, %._crit_edge250 ]
  %.0168257 = phi i32 [ %100, %.lr.ph260 ], [ %145, %._crit_edge250 ]
  %.0172256 = phi i32 [ 0, %.lr.ph260 ], [ %151, %._crit_edge250 ]
  %.0174255 = phi i32 [ %91, %.lr.ph260 ], [ %.1175.lcssa, %._crit_edge250 ]
  %138 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %indvars.iv298, i32 1
  %139 = getelementptr inbounds i8, ptr %138, i64 36
  store i32 %.0174255, ptr %139, align 4, !tbaa !17
  %140 = getelementptr inbounds i8, ptr %138, i64 4
  store i32 %.0162258, ptr %140, align 4, !tbaa !16
  %indvars.iv.next299 = add nsw i64 %indvars.iv298, %136
  %141 = icmp sgt i32 %.0168257, -1
  br i1 %141, label %.lr.ph242, label %._crit_edge243

.lr.ph242:                                        ; preds = %137, %.lr.ph242
  %.1169240 = phi i32 [ %143, %.lr.ph242 ], [ %.0168257, %137 ]
  %.1175239 = phi i32 [ %142, %.lr.ph242 ], [ %.0174255, %137 ]
  %142 = add nsw i32 %.1175239, %97
  %143 = sub nsw i32 %.1169240, %134
  %144 = icmp sgt i32 %143, -1
  br i1 %144, label %.lr.ph242, label %._crit_edge243, !llvm.loop !19

._crit_edge243:                                   ; preds = %.lr.ph242, %137
  %.1175.lcssa = phi i32 [ %.0174255, %137 ], [ %142, %.lr.ph242 ]
  %.1169.lcssa = phi i32 [ %.0168257, %137 ], [ %143, %.lr.ph242 ]
  %145 = add nsw i32 %.1169.lcssa, %99
  %146 = icmp sgt i32 %.0160259, -1
  br i1 %146, label %.lr.ph249, label %._crit_edge250

.lr.ph249:                                        ; preds = %._crit_edge243, %.lr.ph249
  %.1161247 = phi i32 [ %148, %.lr.ph249 ], [ %.0160259, %._crit_edge243 ]
  %.1163246 = phi i32 [ %147, %.lr.ph249 ], [ %.0162258, %._crit_edge243 ]
  %147 = add nsw i32 %.1163246, %125
  %148 = sub nsw i32 %.1161247, %134
  %149 = icmp sgt i32 %148, -1
  br i1 %149, label %.lr.ph249, label %._crit_edge250, !llvm.loop !20

._crit_edge250:                                   ; preds = %.lr.ph249, %._crit_edge243
  %.1163.lcssa = phi i32 [ %.0162258, %._crit_edge243 ], [ %147, %.lr.ph249 ]
  %.1161.lcssa = phi i32 [ %.0160259, %._crit_edge243 ], [ %148, %.lr.ph249 ]
  %150 = add nsw i32 %.1161.lcssa, %127
  %151 = add nuw i32 %.0172256, 1
  %exitcond301.not = icmp eq i32 %.0172256, %88
  br i1 %exitcond301.not, label %.loopexit206, label %137, !llvm.loop !21

152:                                              ; preds = %.lr.ph238, %._crit_edge228
  %indvars.iv = phi i64 [ %132, %.lr.ph238 ], [ %indvars.iv.next, %._crit_edge228 ]
  %.2237 = phi i32 [ %128, %.lr.ph238 ], [ %165, %._crit_edge228 ]
  %.2164236 = phi i32 [ %111, %.lr.ph238 ], [ %.3165.lcssa, %._crit_edge228 ]
  %.2170235 = phi i32 [ %100, %.lr.ph238 ], [ %160, %._crit_edge228 ]
  %.1173234 = phi i32 [ 0, %.lr.ph238 ], [ %166, %._crit_edge228 ]
  %.2176233 = phi i32 [ %91, %.lr.ph238 ], [ %.3177.lcssa, %._crit_edge228 ]
  %153 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %indvars.iv
  %154 = getelementptr inbounds i8, ptr %153, i64 36
  store i32 %.2176233, ptr %154, align 4, !tbaa !22
  %155 = getelementptr inbounds i8, ptr %153, i64 4
  store i32 %.2164236, ptr %155, align 4, !tbaa !16
  %indvars.iv.next = add nsw i64 %indvars.iv, %133
  %156 = icmp sgt i32 %.2170235, -1
  br i1 %156, label %.lr.ph220, label %._crit_edge221

.lr.ph220:                                        ; preds = %152, %.lr.ph220
  %.3171218 = phi i32 [ %158, %.lr.ph220 ], [ %.2170235, %152 ]
  %.3177217 = phi i32 [ %157, %.lr.ph220 ], [ %.2176233, %152 ]
  %157 = add nsw i32 %.3177217, %97
  %158 = sub nsw i32 %.3171218, %131
  %159 = icmp sgt i32 %158, -1
  br i1 %159, label %.lr.ph220, label %._crit_edge221, !llvm.loop !23

._crit_edge221:                                   ; preds = %.lr.ph220, %152
  %.3177.lcssa = phi i32 [ %.2176233, %152 ], [ %157, %.lr.ph220 ]
  %.3171.lcssa = phi i32 [ %.2170235, %152 ], [ %158, %.lr.ph220 ]
  %160 = add nsw i32 %.3171.lcssa, %99
  %161 = icmp sgt i32 %.2237, -1
  br i1 %161, label %.lr.ph227, label %._crit_edge228

.lr.ph227:                                        ; preds = %._crit_edge221, %.lr.ph227
  %.3225 = phi i32 [ %163, %.lr.ph227 ], [ %.2237, %._crit_edge221 ]
  %.3165224 = phi i32 [ %162, %.lr.ph227 ], [ %.2164236, %._crit_edge221 ]
  %162 = add nsw i32 %.3165224, %125
  %163 = sub nsw i32 %.3225, %131
  %164 = icmp sgt i32 %163, -1
  br i1 %164, label %.lr.ph227, label %._crit_edge228, !llvm.loop !24

._crit_edge228:                                   ; preds = %.lr.ph227, %._crit_edge221
  %.3165.lcssa = phi i32 [ %.2164236, %._crit_edge221 ], [ %162, %.lr.ph227 ]
  %.3.lcssa = phi i32 [ %.2237, %._crit_edge221 ], [ %163, %.lr.ph227 ]
  %165 = add nsw i32 %.3.lcssa, %127
  %166 = add nuw i32 %.1173234, 1
  %exitcond.not = icmp eq i32 %.1173234, %88
  br i1 %exitcond.not, label %.loopexit206, label %152, !llvm.loop !25

.loopexit206:                                     ; preds = %._crit_edge228, %._crit_edge250, %.preheader207, %.preheader, %.lr.ph262
  %167 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %168 = icmp slt i32 %68, %167
  br i1 %168, label %.lr.ph262, label %._crit_edge263, !llvm.loop !26

._crit_edge263:                                   ; preds = %.loopexit206, %.preheader209
  %.not279 = icmp sgt i32 %.0.lcssa312, %.0155.lcssa311
  br i1 %.not279, label %.loopexit, label %.lr.ph283

.lr.ph283:                                        ; preds = %._crit_edge263
  %169 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !27
  %170 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !29
  %171 = mul nsw i32 %170, %.0.lcssa312
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds i8, ptr %169, i64 %172
  %174 = sext i32 %170 to i64
  %175 = sext i32 %.0.lcssa312 to i64
  %176 = add i32 %.0155.lcssa311, 1
  br label %177

177:                                              ; preds = %.lr.ph283, %._crit_edge278
  %indvars.iv303 = phi i64 [ %175, %.lr.ph283 ], [ %indvars.iv.next304, %._crit_edge278 ]
  %.0180281 = phi ptr [ %173, %.lr.ph283 ], [ %210, %._crit_edge278 ]
  %178 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %indvars.iv303
  %179 = getelementptr inbounds i8, ptr %178, i64 36
  %180 = load i32, ptr %179, align 4, !tbaa !22
  %181 = getelementptr inbounds i8, ptr %178, i64 164
  %182 = load i32, ptr %181, align 4, !tbaa !17
  %183 = getelementptr inbounds i8, ptr %178, i64 4
  %184 = load i32, ptr %183, align 4, !tbaa !16
  %185 = getelementptr inbounds i8, ptr %178, i64 132
  %186 = load i32, ptr %185, align 4, !tbaa !16
  %187 = sub nsw i32 %186, %184
  %.not194 = icmp ne i32 %186, %184
  %188 = sext i1 %.not194 to i32
  %.inv = icmp slt i32 %187, 1
  %189 = select i1 %.inv, i32 %188, i32 1
  %190 = shl i32 %187, 1
  %191 = mul i32 %190, %189
  %.not195271 = icmp sgt i32 %180, %182
  br i1 %.not195271, label %._crit_edge278, label %.lr.ph277

.lr.ph277:                                        ; preds = %177
  %192 = sext i32 %180 to i64
  %193 = getelementptr inbounds i16, ptr %.0180281, i64 %192
  %194 = sub nsw i32 %182, %180
  %195 = add nsw i32 %194, 1
  %196 = sub nsw i32 %191, %195
  %197 = shl i32 %195, 1
  br label %198

198:                                              ; preds = %.lr.ph277, %._crit_edge268
  %.4275 = phi i32 [ %196, %.lr.ph277 ], [ %207, %._crit_edge268 ]
  %.4166274 = phi i32 [ %184, %.lr.ph277 ], [ %.5167.lcssa, %._crit_edge268 ]
  %.4178273 = phi i32 [ %180, %.lr.ph277 ], [ %209, %._crit_edge268 ]
  %.0179272 = phi ptr [ %193, %.lr.ph277 ], [ %208, %._crit_edge268 ]
  %199 = sext i32 %.4166274 to i64
  %200 = getelementptr inbounds [256 x i32], ptr @_ZN16GraphicComponent13_truecolormapE, i64 0, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !29
  %202 = trunc i32 %201 to i16
  store i16 %202, ptr %.0179272, align 2, !tbaa !30
  %203 = icmp sgt i32 %.4275, -1
  br i1 %203, label %.lr.ph267, label %._crit_edge268

.lr.ph267:                                        ; preds = %198, %.lr.ph267
  %.5265 = phi i32 [ %205, %.lr.ph267 ], [ %.4275, %198 ]
  %.5167264 = phi i32 [ %204, %.lr.ph267 ], [ %.4166274, %198 ]
  %204 = add nsw i32 %.5167264, %189
  %205 = sub nsw i32 %.5265, %197
  %206 = icmp sgt i32 %205, -1
  br i1 %206, label %.lr.ph267, label %._crit_edge268, !llvm.loop !32

._crit_edge268:                                   ; preds = %.lr.ph267, %198
  %.5167.lcssa = phi i32 [ %.4166274, %198 ], [ %204, %.lr.ph267 ]
  %.5.lcssa = phi i32 [ %.4275, %198 ], [ %205, %.lr.ph267 ]
  %207 = add nsw i32 %.5.lcssa, %191
  %208 = getelementptr inbounds i8, ptr %.0179272, i64 2
  %209 = add i32 %.4178273, 1
  %exitcond302.not = icmp eq i32 %.4178273, %182
  br i1 %exitcond302.not, label %._crit_edge278, label %198, !llvm.loop !33

._crit_edge278:                                   ; preds = %._crit_edge268, %177
  %210 = getelementptr inbounds i8, ptr %.0180281, i64 %174
  %indvars.iv.next304 = add nsw i64 %indvars.iv303, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next304 to i32
  %exitcond306.not = icmp eq i32 %176, %lftr.wideiv
  br i1 %exitcond306.not, label %.loopexit, label %177, !llvm.loop !34

.loopexit:                                        ; preds = %._crit_edge278, %._crit_edge263, %._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, !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 = !{!31, !31, i64 0}
!31 = !{!"short", !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