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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17PolygonEngine_32x14FillPoly_c_Z_DEP17GVertexAttributes(ptr noundef %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca 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
  %38 = alloca i32, align 4
  %39 = 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
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %class.GVertexAttributes, ptr %40, i32 0, i32 1
  %42 = load i32, ptr %41, align 4, !tbaa !11
  store i32 %42, ptr %13, align 4, !tbaa !9
  %43 = load i32, ptr %13, align 4, !tbaa !9
  %44 = icmp sgt i32 %43, 4080
  br i1 %44, label %45, label %46

45:                                               ; preds = %1
  br label %48

46:                                               ; preds = %1
  %47 = load i32, ptr %13, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %46, %45
  %49 = phi i32 [ 4080, %45 ], [ %47, %46 ]
  store i32 %49, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %50 = load i32, ptr %13, align 4, !tbaa !9
  %51 = ashr i32 %50, 4
  store i32 %51, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %52 = load i32, ptr %13, align 4, !tbaa !9
  %53 = and i32 %52, 15
  store i32 %53, ptr %15, align 4, !tbaa !9
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #3
  %54 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %55 = icmp slt i32 %54, 2
  br i1 %55, label %56, label %57

56:                                               ; preds = %48
  store i32 1, ptr %33, align 4
  br label %549

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

58:                                               ; preds = %152, %57
  %59 = load i32, ptr %5, align 4, !tbaa !9
  %60 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %155

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

68:                                               ; preds = %62
  store i32 0, ptr %34, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %68, %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #3
  %70 = load i32, ptr %34, align 4, !tbaa !9
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %35, align 4, !tbaa !9
  %72 = load i32, ptr %35, align 4, !tbaa !9
  %73 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %74 = icmp eq i32 %72, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %69
  store i32 0, ptr %35, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %75, %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #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 1
  %80 = load i32, ptr %79, align 4, !tbaa !13
  %81 = load i32, ptr %34, align 4, !tbaa !9
  %82 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %81)
  %83 = getelementptr inbounds %class.GVertex, ptr %82, i32 0, i32 1
  %84 = load i32, ptr %83, align 4, !tbaa !13
  %85 = sub nsw i32 %80, %84
  store i32 %85, ptr %36, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #3
  %86 = load i32, ptr %5, align 4, !tbaa !9
  %87 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %86)
  %88 = getelementptr inbounds %class.GVertex, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 4, !tbaa !17
  %90 = load i32, ptr %34, align 4, !tbaa !9
  %91 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %90)
  %92 = getelementptr inbounds %class.GVertex, ptr %91, i32 0, i32 2
  %93 = load i32, ptr %92, align 4, !tbaa !17
  %94 = sub nsw i32 %89, %93
  store i32 %94, ptr %37, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #3
  %95 = load i32, ptr %35, 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 1
  %98 = load i32, ptr %97, align 4, !tbaa !13
  %99 = load i32, ptr %34, 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 1
  %102 = load i32, ptr %101, align 4, !tbaa !13
  %103 = sub nsw i32 %98, %102
  store i32 %103, ptr %38, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #3
  %104 = load i32, ptr %35, 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 !17
  %108 = load i32, ptr %34, align 4, !tbaa !9
  %109 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %108)
  %110 = getelementptr inbounds %class.GVertex, ptr %109, i32 0, i32 2
  %111 = load i32, ptr %110, align 4, !tbaa !17
  %112 = sub nsw i32 %107, %111
  store i32 %112, ptr %39, align 4, !tbaa !9
  %113 = load i32, ptr %36, align 4, !tbaa !9
  %114 = load i32, ptr %39, align 4, !tbaa !9
  %115 = mul nsw i32 %113, %114
  %116 = load i32, ptr %38, align 4, !tbaa !9
  %117 = load i32, ptr %37, align 4, !tbaa !9
  %118 = mul nsw i32 %116, %117
  %119 = sub nsw i32 %115, %118
  %120 = load i32, ptr %10, align 4, !tbaa !9
  %121 = add nsw i32 %120, %119
  store i32 %121, ptr %10, align 4, !tbaa !9
  %122 = load i32, ptr %3, align 4, !tbaa !9
  %123 = load i32, ptr %5, align 4, !tbaa !9
  %124 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %123)
  %125 = getelementptr inbounds %class.GVertex, ptr %124, i32 0, i32 2
  %126 = load i32, ptr %125, align 4, !tbaa !17
  %127 = icmp slt i32 %122, %126
  br i1 %127, label %128, label %130

128:                                              ; preds = %76
  %129 = load i32, ptr %3, align 4, !tbaa !9
  br label %135

130:                                              ; preds = %76
  %131 = load i32, ptr %5, align 4, !tbaa !9
  %132 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %131)
  %133 = getelementptr inbounds %class.GVertex, ptr %132, i32 0, i32 2
  %134 = load i32, ptr %133, align 4, !tbaa !17
  br label %135

135:                                              ; preds = %130, %128
  %136 = phi i32 [ %129, %128 ], [ %134, %130 ]
  store i32 %136, ptr %3, align 4, !tbaa !9
  %137 = load i32, ptr %4, align 4, !tbaa !9
  %138 = load i32, ptr %5, align 4, !tbaa !9
  %139 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %138)
  %140 = getelementptr inbounds %class.GVertex, ptr %139, i32 0, i32 2
  %141 = load i32, ptr %140, align 4, !tbaa !17
  %142 = icmp sgt i32 %137, %141
  br i1 %142, label %143, label %145

143:                                              ; preds = %135
  %144 = load i32, ptr %4, align 4, !tbaa !9
  br label %150

145:                                              ; preds = %135
  %146 = load i32, ptr %5, align 4, !tbaa !9
  %147 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %146)
  %148 = getelementptr inbounds %class.GVertex, ptr %147, i32 0, i32 2
  %149 = load i32, ptr %148, align 4, !tbaa !17
  br label %150

150:                                              ; preds = %145, %143
  %151 = phi i32 [ %144, %143 ], [ %149, %145 ]
  store i32 %151, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #3
  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
  br label %152

152:                                              ; preds = %150
  %153 = load i32, ptr %5, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %5, align 4, !tbaa !9
  br label %58, !llvm.loop !18

155:                                              ; preds = %58
  %156 = load i32, ptr %10, align 4, !tbaa !9
  %157 = icmp sgt i32 %156, 0
  %158 = zext i1 %157 to i32
  store i32 %158, ptr %10, align 4, !tbaa !9
  %159 = load i32, ptr %3, align 4, !tbaa !9
  %160 = load i32, ptr %4, align 4, !tbaa !9
  %161 = icmp eq i32 %159, %160
  br i1 %161, label %162, label %163

162:                                              ; preds = %155
  store i32 1, ptr %33, align 4
  br label %549

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

164:                                              ; preds = %392, %163
  %165 = load i32, ptr %5, align 4, !tbaa !9
  %166 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %167 = icmp slt i32 %165, %166
  br i1 %167, label %168, label %395

168:                                              ; preds = %164
  %169 = load i32, ptr %5, align 4, !tbaa !9
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %6, align 4, !tbaa !9
  %171 = load i32, ptr %6, align 4, !tbaa !9
  %172 = call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %173 = icmp eq i32 %171, %172
  br i1 %173, label %174, label %175

174:                                              ; preds = %168
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %175

175:                                              ; preds = %174, %168
  %176 = load i32, ptr %5, align 4, !tbaa !9
  %177 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %176)
  %178 = getelementptr inbounds %class.GVertex, ptr %177, i32 0, i32 2
  %179 = load i32, ptr %178, align 4, !tbaa !17
  %180 = load i32, ptr %6, align 4, !tbaa !9
  %181 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %180)
  %182 = getelementptr inbounds %class.GVertex, ptr %181, i32 0, i32 2
  %183 = load i32, ptr %182, align 4, !tbaa !17
  %184 = icmp eq i32 %179, %183
  br i1 %184, label %185, label %186

185:                                              ; preds = %175
  br label %392

186:                                              ; preds = %175
  %187 = load i32, ptr %5, align 4, !tbaa !9
  %188 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %187)
  %189 = getelementptr inbounds %class.GVertex, ptr %188, i32 0, i32 2
  %190 = load i32, ptr %189, align 4, !tbaa !17
  store i32 %190, ptr %17, align 4, !tbaa !9
  %191 = load i32, ptr %6, align 4, !tbaa !9
  %192 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %191)
  %193 = getelementptr inbounds %class.GVertex, ptr %192, i32 0, i32 2
  %194 = load i32, ptr %193, align 4, !tbaa !17
  store i32 %194, ptr %18, align 4, !tbaa !9
  %195 = load i32, ptr %18, align 4, !tbaa !9
  %196 = load i32, ptr %17, align 4, !tbaa !9
  %197 = sub nsw i32 %195, %196
  store i32 %197, ptr %19, align 4, !tbaa !9
  %198 = load i32, ptr %19, align 4, !tbaa !9
  %199 = icmp sgt i32 %198, 0
  br i1 %199, label %200, label %201

200:                                              ; preds = %186
  br label %206

201:                                              ; preds = %186
  %202 = load i32, ptr %19, align 4, !tbaa !9
  %203 = icmp ne i32 %202, 0
  %204 = zext i1 %203 to i64
  %205 = select i1 %203, i32 -1, i32 0
  br label %206

206:                                              ; preds = %201, %200
  %207 = phi i32 [ 1, %200 ], [ %205, %201 ]
  store i32 %207, ptr %20, align 4, !tbaa !9
  %208 = load i32, ptr %20, align 4, !tbaa !9
  %209 = load i32, ptr %19, align 4, !tbaa !9
  %210 = mul nsw i32 %209, %208
  store i32 %210, ptr %19, align 4, !tbaa !9
  %211 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %211, ptr %16, align 4, !tbaa !9
  %212 = load i32, ptr %5, align 4, !tbaa !9
  %213 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %212)
  %214 = getelementptr inbounds %class.GVertex, ptr %213, i32 0, i32 1
  %215 = load i32, ptr %214, align 4, !tbaa !13
  store i32 %215, ptr %22, align 4, !tbaa !9
  %216 = load i32, ptr %6, align 4, !tbaa !9
  %217 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %216)
  %218 = getelementptr inbounds %class.GVertex, ptr %217, i32 0, i32 1
  %219 = load i32, ptr %218, align 4, !tbaa !13
  store i32 %219, ptr %23, align 4, !tbaa !9
  %220 = load i32, ptr %23, align 4, !tbaa !9
  %221 = load i32, ptr %22, align 4, !tbaa !9
  %222 = sub nsw i32 %220, %221
  store i32 %222, ptr %24, align 4, !tbaa !9
  %223 = load i32, ptr %24, align 4, !tbaa !9
  %224 = icmp sgt i32 %223, 0
  br i1 %224, label %225, label %226

225:                                              ; preds = %206
  br label %231

226:                                              ; preds = %206
  %227 = load i32, ptr %24, align 4, !tbaa !9
  %228 = icmp ne i32 %227, 0
  %229 = zext i1 %228 to i64
  %230 = select i1 %228, i32 -1, i32 0
  br label %231

231:                                              ; preds = %226, %225
  %232 = phi i32 [ 1, %225 ], [ %230, %226 ]
  store i32 %232, ptr %25, align 4, !tbaa !9
  %233 = load i32, ptr %25, align 4, !tbaa !9
  %234 = load i32, ptr %24, align 4, !tbaa !9
  %235 = mul nsw i32 %234, %233
  store i32 %235, ptr %24, align 4, !tbaa !9
  %236 = load i32, ptr %24, align 4, !tbaa !9
  %237 = shl i32 %236, 1
  %238 = load i32, ptr %19, align 4, !tbaa !9
  %239 = sub nsw i32 %237, %238
  store i32 %239, ptr %26, align 4, !tbaa !9
  %240 = load i32, ptr %22, align 4, !tbaa !9
  store i32 %240, ptr %21, align 4, !tbaa !9
  %241 = load i32, ptr %5, align 4, !tbaa !9
  %242 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %241)
  %243 = getelementptr inbounds %class.GVertexAttributes, ptr %242, i32 0, i32 0
  %244 = load i32, ptr %243, align 4, !tbaa !20
  store i32 %244, ptr %28, align 4, !tbaa !9
  %245 = load i32, ptr %6, align 4, !tbaa !9
  %246 = call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %245)
  %247 = getelementptr inbounds %class.GVertexAttributes, ptr %246, i32 0, i32 0
  %248 = load i32, ptr %247, align 4, !tbaa !20
  store i32 %248, ptr %29, align 4, !tbaa !9
  %249 = load i32, ptr %29, align 4, !tbaa !9
  %250 = load i32, ptr %28, align 4, !tbaa !9
  %251 = sub nsw i32 %249, %250
  store i32 %251, ptr %30, align 4, !tbaa !9
  %252 = load i32, ptr %30, align 4, !tbaa !9
  %253 = icmp sgt i32 %252, 0
  br i1 %253, label %254, label %255

254:                                              ; preds = %231
  br label %260

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

260:                                              ; preds = %255, %254
  %261 = phi i32 [ 1, %254 ], [ %259, %255 ]
  store i32 %261, ptr %31, align 4, !tbaa !9
  %262 = load i32, ptr %31, align 4, !tbaa !9
  %263 = load i32, ptr %30, align 4, !tbaa !9
  %264 = mul nsw i32 %263, %262
  store i32 %264, ptr %30, align 4, !tbaa !9
  %265 = load i32, ptr %30, align 4, !tbaa !9
  %266 = shl i32 %265, 1
  %267 = load i32, ptr %19, align 4, !tbaa !9
  %268 = sub nsw i32 %266, %267
  store i32 %268, ptr %32, align 4, !tbaa !9
  %269 = load i32, ptr %28, align 4, !tbaa !9
  store i32 %269, ptr %27, align 4, !tbaa !9
  %270 = load i32, ptr %10, align 4, !tbaa !9
  %271 = load i32, ptr %18, align 4, !tbaa !9
  %272 = load i32, ptr %17, align 4, !tbaa !9
  %273 = icmp sgt i32 %271, %272
  %274 = zext i1 %273 to i32
  %275 = xor i32 %270, %274
  %276 = icmp ne i32 %275, 0
  br i1 %276, label %277, label %334

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

278:                                              ; preds = %330, %277
  %279 = load i32, ptr %7, align 4, !tbaa !9
  %280 = load i32, ptr %19, align 4, !tbaa !9
  %281 = icmp sle i32 %279, %280
  br i1 %281, label %282, label %333

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

298:                                              ; preds = %301, %282
  %299 = load i32, ptr %26, align 4, !tbaa !9
  %300 = icmp sge i32 %299, 0
  br i1 %300, label %301, label %309

301:                                              ; preds = %298
  %302 = load i32, ptr %25, align 4, !tbaa !9
  %303 = load i32, ptr %21, align 4, !tbaa !9
  %304 = add nsw i32 %303, %302
  store i32 %304, ptr %21, align 4, !tbaa !9
  %305 = load i32, ptr %19, align 4, !tbaa !9
  %306 = shl i32 %305, 1
  %307 = load i32, ptr %26, align 4, !tbaa !9
  %308 = sub nsw i32 %307, %306
  store i32 %308, ptr %26, align 4, !tbaa !9
  br label %298, !llvm.loop !23

309:                                              ; preds = %298
  %310 = load i32, ptr %24, align 4, !tbaa !9
  %311 = shl i32 %310, 1
  %312 = load i32, ptr %26, align 4, !tbaa !9
  %313 = add nsw i32 %312, %311
  store i32 %313, ptr %26, align 4, !tbaa !9
  br label %314

314:                                              ; preds = %317, %309
  %315 = load i32, ptr %32, align 4, !tbaa !9
  %316 = icmp sge i32 %315, 0
  br i1 %316, label %317, label %325

317:                                              ; preds = %314
  %318 = load i32, ptr %31, align 4, !tbaa !9
  %319 = load i32, ptr %27, align 4, !tbaa !9
  %320 = add nsw i32 %319, %318
  store i32 %320, ptr %27, align 4, !tbaa !9
  %321 = load i32, ptr %19, align 4, !tbaa !9
  %322 = shl i32 %321, 1
  %323 = load i32, ptr %32, align 4, !tbaa !9
  %324 = sub nsw i32 %323, %322
  store i32 %324, ptr %32, align 4, !tbaa !9
  br label %314, !llvm.loop !24

325:                                              ; preds = %314
  %326 = load i32, ptr %30, align 4, !tbaa !9
  %327 = shl i32 %326, 1
  %328 = load i32, ptr %32, align 4, !tbaa !9
  %329 = add nsw i32 %328, %327
  store i32 %329, ptr %32, align 4, !tbaa !9
  br label %330

330:                                              ; preds = %325
  %331 = load i32, ptr %7, align 4, !tbaa !9
  %332 = add nsw i32 %331, 1
  store i32 %332, ptr %7, align 4, !tbaa !9
  br label %278, !llvm.loop !25

333:                                              ; preds = %278
  br label %391

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

335:                                              ; preds = %387, %334
  %336 = load i32, ptr %7, align 4, !tbaa !9
  %337 = load i32, ptr %19, align 4, !tbaa !9
  %338 = icmp sle i32 %336, %337
  br i1 %338, label %339, label %390

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

355:                                              ; preds = %358, %339
  %356 = load i32, ptr %26, align 4, !tbaa !9
  %357 = icmp sge i32 %356, 0
  br i1 %357, label %358, label %366

358:                                              ; preds = %355
  %359 = load i32, ptr %25, align 4, !tbaa !9
  %360 = load i32, ptr %21, align 4, !tbaa !9
  %361 = add nsw i32 %360, %359
  store i32 %361, ptr %21, align 4, !tbaa !9
  %362 = load i32, ptr %19, align 4, !tbaa !9
  %363 = shl i32 %362, 1
  %364 = load i32, ptr %26, align 4, !tbaa !9
  %365 = sub nsw i32 %364, %363
  store i32 %365, ptr %26, align 4, !tbaa !9
  br label %355, !llvm.loop !27

366:                                              ; preds = %355
  %367 = load i32, ptr %24, align 4, !tbaa !9
  %368 = shl i32 %367, 1
  %369 = load i32, ptr %26, align 4, !tbaa !9
  %370 = add nsw i32 %369, %368
  store i32 %370, ptr %26, align 4, !tbaa !9
  br label %371

371:                                              ; preds = %374, %366
  %372 = load i32, ptr %32, align 4, !tbaa !9
  %373 = icmp sge i32 %372, 0
  br i1 %373, label %374, label %382

374:                                              ; preds = %371
  %375 = load i32, ptr %31, align 4, !tbaa !9
  %376 = load i32, ptr %27, align 4, !tbaa !9
  %377 = add nsw i32 %376, %375
  store i32 %377, ptr %27, align 4, !tbaa !9
  %378 = load i32, ptr %19, align 4, !tbaa !9
  %379 = shl i32 %378, 1
  %380 = load i32, ptr %32, align 4, !tbaa !9
  %381 = sub nsw i32 %380, %379
  store i32 %381, ptr %32, align 4, !tbaa !9
  br label %371, !llvm.loop !28

382:                                              ; preds = %371
  %383 = load i32, ptr %30, align 4, !tbaa !9
  %384 = shl i32 %383, 1
  %385 = load i32, ptr %32, align 4, !tbaa !9
  %386 = add nsw i32 %385, %384
  store i32 %386, ptr %32, align 4, !tbaa !9
  br label %387

387:                                              ; preds = %382
  %388 = load i32, ptr %7, align 4, !tbaa !9
  %389 = add nsw i32 %388, 1
  store i32 %389, ptr %7, align 4, !tbaa !9
  br label %335, !llvm.loop !29

390:                                              ; preds = %335
  br label %391

391:                                              ; preds = %390, %333
  br label %392

392:                                              ; preds = %391, %185
  %393 = load i32, ptr %5, align 4, !tbaa !9
  %394 = add nsw i32 %393, 1
  store i32 %394, ptr %5, align 4, !tbaa !9
  br label %164, !llvm.loop !30

395:                                              ; preds = %164
  %396 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !5
  %397 = load i32, ptr %3, align 4, !tbaa !9
  %398 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !9
  %399 = mul nsw i32 %397, %398
  %400 = sext i32 %399 to i64
  %401 = getelementptr inbounds i8, ptr %396, i64 %400
  store ptr %401, ptr %9, align 8, !tbaa !5
  %402 = load ptr, ptr @_ZN16GraphicComponent6_z_memE, align 8, !tbaa !5
  %403 = load i32, ptr %3, align 4, !tbaa !9
  %404 = load i32, ptr @_ZN16GraphicComponent6_widthE, align 4, !tbaa !9
  %405 = mul nsw i32 %403, %404
  %406 = sext i32 %405 to i64
  %407 = getelementptr inbounds i16, ptr %402, i64 %406
  store ptr %407, ptr %12, align 8, !tbaa !5
  %408 = load i32, ptr %3, align 4, !tbaa !9
  store i32 %408, ptr %16, align 4, !tbaa !9
  br label %409

409:                                              ; preds = %545, %395
  %410 = load i32, ptr %16, align 4, !tbaa !9
  %411 = load i32, ptr %4, align 4, !tbaa !9
  %412 = icmp sle i32 %410, %411
  br i1 %412, label %413, label %548

413:                                              ; preds = %409
  %414 = load i32, ptr %16, align 4, !tbaa !9
  %415 = sext i32 %414 to i64
  %416 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %415
  %417 = getelementptr inbounds %class.Mug, ptr %416, i32 0, i32 0
  %418 = getelementptr inbounds %class.GVertex, ptr %417, i32 0, i32 1
  %419 = load i32, ptr %418, align 4, !tbaa !26
  store i32 %419, ptr %22, align 4, !tbaa !9
  %420 = load i32, ptr %16, align 4, !tbaa !9
  %421 = sext i32 %420 to i64
  %422 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %421
  %423 = getelementptr inbounds %class.Mug, ptr %422, i32 0, i32 1
  %424 = getelementptr inbounds %class.GVertex, ptr %423, i32 0, i32 1
  %425 = load i32, ptr %424, align 4, !tbaa !21
  store i32 %425, ptr %23, align 4, !tbaa !9
  %426 = load i32, ptr %23, align 4, !tbaa !9
  %427 = load i32, ptr %22, align 4, !tbaa !9
  %428 = sub nsw i32 %426, %427
  %429 = add nsw i32 %428, 1
  store i32 %429, ptr %24, align 4, !tbaa !9
  %430 = load i32, ptr %22, align 4, !tbaa !9
  store i32 %430, ptr %21, align 4, !tbaa !9
  %431 = load i32, ptr %16, align 4, !tbaa !9
  %432 = sext i32 %431 to i64
  %433 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %432
  %434 = getelementptr inbounds %class.Mug, ptr %433, i32 0, i32 0
  %435 = getelementptr inbounds %class.GVertexAttributes, ptr %434, i32 0, i32 0
  %436 = load i32, ptr %435, align 16, !tbaa !20
  store i32 %436, ptr %28, align 4, !tbaa !9
  %437 = load i32, ptr %16, align 4, !tbaa !9
  %438 = sext i32 %437 to i64
  %439 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %438
  %440 = getelementptr inbounds %class.Mug, ptr %439, i32 0, i32 1
  %441 = getelementptr inbounds %class.GVertexAttributes, ptr %440, i32 0, i32 0
  %442 = load i32, ptr %441, align 16, !tbaa !20
  store i32 %442, ptr %29, align 4, !tbaa !9
  %443 = load i32, ptr %29, align 4, !tbaa !9
  %444 = load i32, ptr %28, align 4, !tbaa !9
  %445 = sub nsw i32 %443, %444
  store i32 %445, ptr %30, align 4, !tbaa !9
  %446 = load i32, ptr %30, align 4, !tbaa !9
  %447 = icmp sgt i32 %446, 0
  br i1 %447, label %448, label %449

448:                                              ; preds = %413
  br label %454

449:                                              ; preds = %413
  %450 = load i32, ptr %30, align 4, !tbaa !9
  %451 = icmp ne i32 %450, 0
  %452 = zext i1 %451 to i64
  %453 = select i1 %451, i32 -1, i32 0
  br label %454

454:                                              ; preds = %449, %448
  %455 = phi i32 [ 1, %448 ], [ %453, %449 ]
  store i32 %455, ptr %31, align 4, !tbaa !9
  %456 = load i32, ptr %31, align 4, !tbaa !9
  %457 = load i32, ptr %30, align 4, !tbaa !9
  %458 = mul nsw i32 %457, %456
  store i32 %458, ptr %30, align 4, !tbaa !9
  %459 = load i32, ptr %30, align 4, !tbaa !9
  %460 = shl i32 %459, 1
  %461 = load i32, ptr %24, align 4, !tbaa !9
  %462 = sub nsw i32 %460, %461
  store i32 %462, ptr %32, align 4, !tbaa !9
  %463 = load i32, ptr %28, align 4, !tbaa !9
  store i32 %463, ptr %27, align 4, !tbaa !9
  %464 = load ptr, ptr %9, align 8, !tbaa !5
  %465 = load i32, ptr %22, align 4, !tbaa !9
  %466 = sext i32 %465 to i64
  %467 = getelementptr inbounds i32, ptr %464, i64 %466
  store ptr %467, ptr %8, align 8, !tbaa !5
  %468 = load ptr, ptr %12, align 8, !tbaa !5
  %469 = load i32, ptr %22, align 4, !tbaa !9
  %470 = sext i32 %469 to i64
  %471 = getelementptr inbounds i16, ptr %468, i64 %470
  store ptr %471, ptr %11, align 8, !tbaa !5
  %472 = load i32, ptr %22, align 4, !tbaa !9
  store i32 %472, ptr %21, align 4, !tbaa !9
  br label %473

473:                                              ; preds = %533, %454
  %474 = load i32, ptr %21, align 4, !tbaa !9
  %475 = load i32, ptr %23, align 4, !tbaa !9
  %476 = icmp sle i32 %474, %475
  br i1 %476, label %477, label %536

477:                                              ; preds = %473
  %478 = load i32, ptr %27, align 4, !tbaa !9
  %479 = load ptr, ptr %11, align 8, !tbaa !5
  %480 = load i16, ptr %479, align 2, !tbaa !31
  %481 = zext i16 %480 to i32
  %482 = icmp slt i32 %478, %481
  br i1 %482, label %483, label %512

483:                                              ; preds = %477
  %484 = load i32, ptr %27, align 4, !tbaa !9
  %485 = trunc i32 %484 to i16
  %486 = load ptr, ptr %11, align 8, !tbaa !5
  store i16 %485, ptr %486, align 2, !tbaa !31
  %487 = load i32, ptr %15, align 4, !tbaa !9
  %488 = load i32, ptr %21, align 4, !tbaa !9
  %489 = and i32 %488, 3
  %490 = load i32, ptr %16, align 4, !tbaa !9
  %491 = and i32 %490, 3
  %492 = shl i32 %491, 2
  %493 = add nsw i32 %489, %492
  %494 = sext i32 %493 to i64
  %495 = getelementptr inbounds [16 x i32], ptr @_ZN16GraphicProcessor2D4E, i64 0, i64 %494
  %496 = load i32, ptr %495, align 4, !tbaa !9
  %497 = icmp sgt i32 %487, %496
  br i1 %497, label %498, label %505

498:                                              ; preds = %483
  %499 = load i32, ptr %14, align 4, !tbaa !9
  %500 = add nsw i32 %499, 1
  %501 = sext i32 %500 to i64
  %502 = getelementptr inbounds [256 x i32], ptr @_ZN16GraphicComponent13_truecolormapE, i64 0, i64 %501
  %503 = load i32, ptr %502, align 4, !tbaa !9
  %504 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %503, ptr %504, align 4, !tbaa !9
  br label %511

505:                                              ; preds = %483
  %506 = load i32, ptr %14, align 4, !tbaa !9
  %507 = sext i32 %506 to i64
  %508 = getelementptr inbounds [256 x i32], ptr @_ZN16GraphicComponent13_truecolormapE, i64 0, i64 %507
  %509 = load i32, ptr %508, align 4, !tbaa !9
  %510 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %509, ptr %510, align 4, !tbaa !9
  br label %511

511:                                              ; preds = %505, %498
  br label %512

512:                                              ; preds = %511, %477
  br label %513

513:                                              ; preds = %516, %512
  %514 = load i32, ptr %32, align 4, !tbaa !9
  %515 = icmp sge i32 %514, 0
  br i1 %515, label %516, label %524

516:                                              ; preds = %513
  %517 = load i32, ptr %31, align 4, !tbaa !9
  %518 = load i32, ptr %27, align 4, !tbaa !9
  %519 = add nsw i32 %518, %517
  store i32 %519, ptr %27, align 4, !tbaa !9
  %520 = load i32, ptr %24, align 4, !tbaa !9
  %521 = shl i32 %520, 1
  %522 = load i32, ptr %32, align 4, !tbaa !9
  %523 = sub nsw i32 %522, %521
  store i32 %523, ptr %32, align 4, !tbaa !9
  br label %513, !llvm.loop !33

524:                                              ; preds = %513
  %525 = load i32, ptr %30, align 4, !tbaa !9
  %526 = shl i32 %525, 1
  %527 = load i32, ptr %32, align 4, !tbaa !9
  %528 = add nsw i32 %527, %526
  store i32 %528, ptr %32, align 4, !tbaa !9
  %529 = load ptr, ptr %8, align 8, !tbaa !5
  %530 = getelementptr inbounds i32, ptr %529, i32 1
  store ptr %530, ptr %8, align 8, !tbaa !5
  %531 = load ptr, ptr %11, align 8, !tbaa !5
  %532 = getelementptr inbounds i16, ptr %531, i32 1
  store ptr %532, ptr %11, align 8, !tbaa !5
  br label %533

533:                                              ; preds = %524
  %534 = load i32, ptr %21, align 4, !tbaa !9
  %535 = add nsw i32 %534, 1
  store i32 %535, ptr %21, align 4, !tbaa !9
  br label %473, !llvm.loop !34

536:                                              ; preds = %473
  %537 = load ptr, ptr %9, align 8, !tbaa !5
  %538 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !9
  %539 = sext i32 %538 to i64
  %540 = getelementptr inbounds i8, ptr %537, i64 %539
  store ptr %540, ptr %9, align 8, !tbaa !5
  %541 = load i32, ptr @_ZN16GraphicComponent6_widthE, align 4, !tbaa !9
  %542 = load ptr, ptr %12, align 8, !tbaa !5
  %543 = sext i32 %541 to i64
  %544 = getelementptr inbounds i16, ptr %542, i64 %543
  store ptr %544, ptr %12, align 8, !tbaa !5
  br label %545

545:                                              ; preds = %536
  %546 = load i32, ptr %16, align 4, !tbaa !9
  %547 = add nsw i32 %546, 1
  store i32 %547, ptr %16, align 4, !tbaa !9
  br label %409, !llvm.loop !35

548:                                              ; preds = %409
  store i32 0, ptr %33, align 4
  br label %549

549:                                              ; preds = %548, %162, %56
  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
  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
  %550 = load i32, ptr %33, align 4
  switch i32 %550, label %552 [
    i32 0, label %551
    i32 1, label %551
  ]

551:                                              ; preds = %549, %549
  ret void

552:                                              ; preds = %549
  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
@_ZN16GraphicProcessor2D4E = external local_unnamed_addr global [16 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN17PolygonEngine_32x14FillPoly_c_Z_DEP17GVertexAttributes(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 = tail call i32 @llvm.smin.i32(i32 %3, i32 4080)
  %5 = ashr i32 %4, 4
  %6 = and i32 %4, 15
  %7 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %8 = icmp slt i32 %7, 2
  br i1 %8, label %.loopexit, label %.preheader229

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

.lr.ph:                                           ; preds = %.preheader229, %65
  %.0233 = phi i32 [ %56, %65 ], [ 1000, %.preheader229 ]
  %.0172232 = phi i32 [ %66, %65 ], [ -1, %.preheader229 ]
  %.0173231 = phi i32 [ %11, %65 ], [ 0, %.preheader229 ]
  %.0198230 = phi i32 [ %46, %65 ], [ 0, %.preheader229 ]
  %11 = add nuw nsw i32 %.0173231, 1
  %12 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %13 = icmp eq i32 %11, %12
  %spec.select = select i1 %13, i32 0, i32 %11
  %14 = add nuw nsw i32 %spec.select, 1
  %15 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %16 = icmp eq i32 %14, %15
  %.0175 = select i1 %16, i32 0, i32 %14
  %17 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0173231)
  %18 = getelementptr inbounds i8, ptr %17, i64 36
  %19 = load i32, ptr %18, align 4, !tbaa !10
  %20 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select)
  %21 = getelementptr inbounds i8, ptr %20, i64 36
  %22 = load i32, ptr %21, align 4, !tbaa !10
  %23 = sub nsw i32 %19, %22
  %24 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0173231)
  %25 = getelementptr inbounds i8, ptr %24, i64 40
  %26 = load i32, ptr %25, align 4, !tbaa !14
  %27 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select)
  %28 = getelementptr inbounds i8, ptr %27, i64 40
  %29 = load i32, ptr %28, align 4, !tbaa !14
  %.neg = sub i32 %29, %26
  %30 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0175)
  %31 = getelementptr inbounds i8, ptr %30, i64 36
  %32 = load i32, ptr %31, align 4, !tbaa !10
  %33 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select)
  %34 = getelementptr inbounds i8, ptr %33, i64 36
  %35 = load i32, ptr %34, align 4, !tbaa !10
  %36 = sub nsw i32 %32, %35
  %37 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0175)
  %38 = getelementptr inbounds i8, ptr %37, i64 40
  %39 = load i32, ptr %38, align 4, !tbaa !14
  %40 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select)
  %41 = getelementptr inbounds i8, ptr %40, i64 40
  %42 = load i32, ptr %41, align 4, !tbaa !14
  %43 = sub nsw i32 %39, %42
  %44 = mul nsw i32 %43, %23
  %.neg220 = mul i32 %36, %.neg
  %45 = add i32 %.neg220, %.0198230
  %46 = add i32 %45, %44
  %47 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0173231)
  %48 = getelementptr inbounds i8, ptr %47, i64 40
  %49 = load i32, ptr %48, align 4, !tbaa !14
  %50 = icmp slt i32 %.0233, %49
  br i1 %50, label %55, label %51

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

55:                                               ; preds = %.lr.ph, %51
  %56 = phi i32 [ %54, %51 ], [ %.0233, %.lr.ph ]
  %57 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.0173231)
  %58 = getelementptr inbounds i8, ptr %57, i64 40
  %59 = load i32, ptr %58, align 4, !tbaa !14
  %60 = icmp sgt i32 %.0172232, %59
  br i1 %60, label %65, label %61

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

65:                                               ; preds = %55, %61
  %66 = phi i32 [ %64, %61 ], [ %.0172232, %55 ]
  %67 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %68 = icmp slt i32 %11, %67
  br i1 %68, label %.lr.ph, label %._crit_edge, !llvm.loop !15

._crit_edge:                                      ; preds = %65
  %69 = icmp sgt i32 %46, 0
  %70 = icmp eq i32 %56, %66
  br i1 %70, label %.loopexit, label %.preheader228

.preheader228:                                    ; preds = %.preheader229, %._crit_edge
  %.0.lcssa334 = phi i32 [ %56, %._crit_edge ], [ 1000, %.preheader229 ]
  %.0172.lcssa333 = phi i32 [ %66, %._crit_edge ], [ -1, %.preheader229 ]
  %.0198.lcssa332 = phi i1 [ %69, %._crit_edge ], [ false, %.preheader229 ]
  %71 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %.lr.ph281, label %._crit_edge282

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

83:                                               ; preds = %.lr.ph281
  %84 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1280)
  %85 = getelementptr inbounds i8, ptr %84, i64 40
  %86 = load i32, ptr %85, align 4, !tbaa !14
  %87 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select221)
  %88 = getelementptr inbounds i8, ptr %87, i64 40
  %89 = load i32, ptr %88, align 4, !tbaa !14
  %90 = sub i32 %89, %86
  %.not215 = icmp ne i32 %89, %86
  %91 = sext i1 %.not215 to i32
  %.inv222 = icmp slt i32 %90, 1
  %92 = select i1 %.inv222, i32 %91, i32 1
  %93 = mul i32 %92, %90
  %94 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1280)
  %95 = getelementptr inbounds i8, ptr %94, i64 36
  %96 = load i32, ptr %95, align 4, !tbaa !10
  %97 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select221)
  %98 = getelementptr inbounds i8, ptr %97, i64 36
  %99 = load i32, ptr %98, align 4, !tbaa !10
  %100 = sub nsw i32 %99, %96
  %.not216 = icmp ne i32 %99, %96
  %101 = sext i1 %.not216 to i32
  %.inv223 = icmp slt i32 %100, 1
  %102 = select i1 %.inv223, i32 %101, i32 1
  %103 = shl i32 %100, 1
  %104 = mul i32 %103, %102
  %105 = sub nsw i32 %104, %93
  %106 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %.1280)
  %107 = load i32, ptr %106, align 4, !tbaa !17
  %108 = tail call noundef ptr @_ZN8GPolygonixEi(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E, i32 noundef %spec.select221)
  %109 = load i32, ptr %108, align 4, !tbaa !17
  %110 = sub nsw i32 %109, %107
  %.not217 = icmp ne i32 %109, %107
  %111 = sext i1 %.not217 to i32
  %.inv224 = icmp slt i32 %110, 1
  %112 = select i1 %.inv224, i32 %111, i32 1
  %113 = shl i32 %110, 1
  %114 = mul i32 %113, %112
  %115 = sub nsw i32 %114, %93
  %116 = icmp sgt i32 %89, %86
  %117 = xor i1 %.0198.lcssa332, %116
  %.not219272 = icmp slt i32 %93, 0
  br i1 %117, label %.preheader, label %.preheader226

.preheader226:                                    ; preds = %83
  br i1 %.not219272, label %.loopexit225, label %.lr.ph257

.lr.ph257:                                        ; preds = %.preheader226
  %118 = shl nuw i32 %93, 1
  %119 = sext i32 %86 to i64
  %120 = sext i32 %92 to i64
  br label %138

.preheader:                                       ; preds = %83
  br i1 %.not219272, label %.loopexit225, label %.lr.ph279

.lr.ph279:                                        ; preds = %.preheader
  %121 = shl nuw i32 %93, 1
  %122 = sext i32 %86 to i64
  %123 = sext i32 %92 to i64
  br label %124

124:                                              ; preds = %.lr.ph279, %._crit_edge269
  %indvars.iv319 = phi i64 [ %122, %.lr.ph279 ], [ %indvars.iv.next320, %._crit_edge269 ]
  %.0177278 = phi i32 [ %115, %.lr.ph279 ], [ %136, %._crit_edge269 ]
  %.0179277 = phi i32 [ %107, %.lr.ph279 ], [ %.1180.lcssa, %._crit_edge269 ]
  %.0185276 = phi i32 [ %105, %.lr.ph279 ], [ %131, %._crit_edge269 ]
  %.0189275 = phi i32 [ 0, %.lr.ph279 ], [ %137, %._crit_edge269 ]
  %.0191274 = phi i32 [ %96, %.lr.ph279 ], [ %.1192.lcssa, %._crit_edge269 ]
  %125 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %indvars.iv319, i32 1
  %126 = getelementptr inbounds i8, ptr %125, i64 36
  store i32 %.0191274, ptr %126, align 4, !tbaa !18
  store i32 %.0179277, ptr %125, align 16, !tbaa !17
  %indvars.iv.next320 = add nsw i64 %indvars.iv319, %123
  %127 = icmp sgt i32 %.0185276, -1
  br i1 %127, label %.lr.ph261, label %._crit_edge262

.lr.ph261:                                        ; preds = %124, %.lr.ph261
  %.1186259 = phi i32 [ %129, %.lr.ph261 ], [ %.0185276, %124 ]
  %.1192258 = phi i32 [ %128, %.lr.ph261 ], [ %.0191274, %124 ]
  %128 = add nsw i32 %.1192258, %102
  %129 = sub nsw i32 %.1186259, %121
  %130 = icmp sgt i32 %129, -1
  br i1 %130, label %.lr.ph261, label %._crit_edge262, !llvm.loop !20

._crit_edge262:                                   ; preds = %.lr.ph261, %124
  %.1192.lcssa = phi i32 [ %.0191274, %124 ], [ %128, %.lr.ph261 ]
  %.1186.lcssa = phi i32 [ %.0185276, %124 ], [ %129, %.lr.ph261 ]
  %131 = add nsw i32 %.1186.lcssa, %104
  %132 = icmp sgt i32 %.0177278, -1
  br i1 %132, label %.lr.ph268, label %._crit_edge269

.lr.ph268:                                        ; preds = %._crit_edge262, %.lr.ph268
  %.1178266 = phi i32 [ %134, %.lr.ph268 ], [ %.0177278, %._crit_edge262 ]
  %.1180265 = phi i32 [ %133, %.lr.ph268 ], [ %.0179277, %._crit_edge262 ]
  %133 = add nsw i32 %.1180265, %112
  %134 = sub nsw i32 %.1178266, %121
  %135 = icmp sgt i32 %134, -1
  br i1 %135, label %.lr.ph268, label %._crit_edge269, !llvm.loop !21

._crit_edge269:                                   ; preds = %.lr.ph268, %._crit_edge262
  %.1180.lcssa = phi i32 [ %.0179277, %._crit_edge262 ], [ %133, %.lr.ph268 ]
  %.1178.lcssa = phi i32 [ %.0177278, %._crit_edge262 ], [ %134, %.lr.ph268 ]
  %136 = add nsw i32 %.1178.lcssa, %114
  %137 = add nuw i32 %.0189275, 1
  %exitcond322.not = icmp eq i32 %.0189275, %93
  br i1 %exitcond322.not, label %.loopexit225, label %124, !llvm.loop !22

138:                                              ; preds = %.lr.ph257, %._crit_edge247
  %indvars.iv = phi i64 [ %119, %.lr.ph257 ], [ %indvars.iv.next, %._crit_edge247 ]
  %.2256 = phi i32 [ %115, %.lr.ph257 ], [ %150, %._crit_edge247 ]
  %.2181255 = phi i32 [ %107, %.lr.ph257 ], [ %.3182.lcssa, %._crit_edge247 ]
  %.2187254 = phi i32 [ %105, %.lr.ph257 ], [ %145, %._crit_edge247 ]
  %.1190253 = phi i32 [ 0, %.lr.ph257 ], [ %151, %._crit_edge247 ]
  %.2193252 = phi i32 [ %96, %.lr.ph257 ], [ %.3194.lcssa, %._crit_edge247 ]
  %139 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %indvars.iv
  %140 = getelementptr inbounds i8, ptr %139, i64 36
  store i32 %.2193252, ptr %140, align 4, !tbaa !23
  store i32 %.2181255, ptr %139, align 16, !tbaa !17
  %indvars.iv.next = add nsw i64 %indvars.iv, %120
  %141 = icmp sgt i32 %.2187254, -1
  br i1 %141, label %.lr.ph239, label %._crit_edge240

.lr.ph239:                                        ; preds = %138, %.lr.ph239
  %.3188237 = phi i32 [ %143, %.lr.ph239 ], [ %.2187254, %138 ]
  %.3194236 = phi i32 [ %142, %.lr.ph239 ], [ %.2193252, %138 ]
  %142 = add nsw i32 %.3194236, %102
  %143 = sub nsw i32 %.3188237, %118
  %144 = icmp sgt i32 %143, -1
  br i1 %144, label %.lr.ph239, label %._crit_edge240, !llvm.loop !24

._crit_edge240:                                   ; preds = %.lr.ph239, %138
  %.3194.lcssa = phi i32 [ %.2193252, %138 ], [ %142, %.lr.ph239 ]
  %.3188.lcssa = phi i32 [ %.2187254, %138 ], [ %143, %.lr.ph239 ]
  %145 = add nsw i32 %.3188.lcssa, %104
  %146 = icmp sgt i32 %.2256, -1
  br i1 %146, label %.lr.ph246, label %._crit_edge247

.lr.ph246:                                        ; preds = %._crit_edge240, %.lr.ph246
  %.3244 = phi i32 [ %148, %.lr.ph246 ], [ %.2256, %._crit_edge240 ]
  %.3182243 = phi i32 [ %147, %.lr.ph246 ], [ %.2181255, %._crit_edge240 ]
  %147 = add nsw i32 %.3182243, %112
  %148 = sub nsw i32 %.3244, %118
  %149 = icmp sgt i32 %148, -1
  br i1 %149, label %.lr.ph246, label %._crit_edge247, !llvm.loop !25

._crit_edge247:                                   ; preds = %.lr.ph246, %._crit_edge240
  %.3182.lcssa = phi i32 [ %.2181255, %._crit_edge240 ], [ %147, %.lr.ph246 ]
  %.3.lcssa = phi i32 [ %.2256, %._crit_edge240 ], [ %148, %.lr.ph246 ]
  %150 = add nsw i32 %.3.lcssa, %114
  %151 = add nuw i32 %.1190253, 1
  %exitcond.not = icmp eq i32 %.1190253, %93
  br i1 %exitcond.not, label %.loopexit225, label %138, !llvm.loop !26

.loopexit225:                                     ; preds = %._crit_edge247, %._crit_edge269, %.preheader226, %.preheader, %.lr.ph281
  %152 = tail call noundef i32 @_ZN8GPolygon4SizeEv(ptr noundef nonnull align 8 dereferenceable(808) @_ZN13PolygonEngine3_p1E)
  %153 = icmp slt i32 %73, %152
  br i1 %153, label %.lr.ph281, label %._crit_edge282, !llvm.loop !27

._crit_edge282:                                   ; preds = %.loopexit225, %.preheader228
  %.not299 = icmp sgt i32 %.0.lcssa334, %.0172.lcssa333
  br i1 %.not299, label %.loopexit, label %.lr.ph304

.lr.ph304:                                        ; preds = %._crit_edge282
  %154 = load ptr, ptr @_ZN16GraphicComponent6_z_memE, align 8, !tbaa !28
  %155 = load i32, ptr @_ZN16GraphicComponent6_widthE, align 4, !tbaa !30
  %156 = mul nsw i32 %155, %.0.lcssa334
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds i16, ptr %154, i64 %157
  %159 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !28
  %160 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !30
  %161 = mul nsw i32 %160, %.0.lcssa334
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i8, ptr %159, i64 %162
  %164 = sext i32 %5 to i64
  %165 = getelementptr inbounds [256 x i32], ptr @_ZN16GraphicComponent13_truecolormapE, i64 0, i64 %164
  %166 = add nsw i32 %5, 1
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [256 x i32], ptr @_ZN16GraphicComponent13_truecolormapE, i64 0, i64 %167
  %169 = sext i32 %.0.lcssa334 to i64
  %170 = add i32 %.0172.lcssa333, 1
  br label %171

171:                                              ; preds = %.lr.ph304, %._crit_edge298
  %172 = phi i32 [ %155, %.lr.ph304 ], [ %218, %._crit_edge298 ]
  %173 = phi i32 [ %160, %.lr.ph304 ], [ %219, %._crit_edge298 ]
  %indvars.iv324 = phi i64 [ %169, %.lr.ph304 ], [ %indvars.iv.next325, %._crit_edge298 ]
  %.0197302 = phi ptr [ %163, %.lr.ph304 ], [ %221, %._crit_edge298 ]
  %.0203300 = phi ptr [ %158, %.lr.ph304 ], [ %223, %._crit_edge298 ]
  %174 = getelementptr inbounds [1024 x %class.Mug], ptr @_ZN13PolygonEngine4_mugE, i64 0, i64 %indvars.iv324
  %175 = getelementptr inbounds i8, ptr %174, i64 36
  %176 = load i32, ptr %175, align 4, !tbaa !23
  %177 = getelementptr inbounds i8, ptr %174, i64 128
  %178 = getelementptr inbounds i8, ptr %174, i64 164
  %179 = load i32, ptr %178, align 4, !tbaa !18
  %180 = load i32, ptr %174, align 16, !tbaa !17
  %181 = load i32, ptr %177, align 16, !tbaa !17
  %182 = sub nsw i32 %181, %180
  %.not213 = icmp ne i32 %181, %180
  %183 = sext i1 %.not213 to i32
  %.inv = icmp slt i32 %182, 1
  %184 = select i1 %.inv, i32 %183, i32 1
  %185 = shl i32 %182, 1
  %186 = mul i32 %185, %184
  %.not214290 = icmp sgt i32 %176, %179
  br i1 %.not214290, label %._crit_edge298, label %.lr.ph297

.lr.ph297:                                        ; preds = %171
  %187 = sext i32 %176 to i64
  %188 = getelementptr inbounds i16, ptr %.0203300, i64 %187
  %189 = getelementptr inbounds i32, ptr %.0197302, i64 %187
  %190 = sub nsw i32 %179, %176
  %191 = add nsw i32 %190, 1
  %192 = sub nsw i32 %186, %191
  %193 = trunc nsw i64 %indvars.iv324 to i32
  %194 = shl i32 %193, 2
  %195 = and i32 %194, 12
  %196 = shl i32 %191, 1
  br label %197

197:                                              ; preds = %.lr.ph297, %._crit_edge287
  %.4295 = phi i32 [ %192, %.lr.ph297 ], [ %214, %._crit_edge287 ]
  %.4183294 = phi i32 [ %180, %.lr.ph297 ], [ %.5184.lcssa, %._crit_edge287 ]
  %.4195293 = phi i32 [ %176, %.lr.ph297 ], [ %217, %._crit_edge287 ]
  %.0196292 = phi ptr [ %189, %.lr.ph297 ], [ %215, %._crit_edge287 ]
  %.0202291 = phi ptr [ %188, %.lr.ph297 ], [ %216, %._crit_edge287 ]
  %198 = load i16, ptr %.0202291, align 2, !tbaa !31
  %199 = zext i16 %198 to i32
  %200 = icmp slt i32 %.4183294, %199
  br i1 %200, label %.sink.split, label %209

.sink.split:                                      ; preds = %197
  %201 = trunc i32 %.4183294 to i16
  store i16 %201, ptr %.0202291, align 2, !tbaa !31
  %202 = and i32 %.4195293, 3
  %203 = or disjoint i32 %202, %195
  %204 = zext nneg i32 %203 to i64
  %205 = getelementptr inbounds [16 x i32], ptr @_ZN16GraphicProcessor2D4E, i64 0, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !30
  %207 = icmp sgt i32 %6, %206
  %. = select i1 %207, ptr %168, ptr %165
  %208 = load i32, ptr %., align 4, !tbaa !30
  store i32 %208, ptr %.0196292, align 4, !tbaa !30
  br label %209

209:                                              ; preds = %.sink.split, %197
  %210 = icmp sgt i32 %.4295, -1
  br i1 %210, label %.lr.ph286, label %._crit_edge287

.lr.ph286:                                        ; preds = %209, %.lr.ph286
  %.5284 = phi i32 [ %212, %.lr.ph286 ], [ %.4295, %209 ]
  %.5184283 = phi i32 [ %211, %.lr.ph286 ], [ %.4183294, %209 ]
  %211 = add nsw i32 %.5184283, %184
  %212 = sub nsw i32 %.5284, %196
  %213 = icmp sgt i32 %212, -1
  br i1 %213, label %.lr.ph286, label %._crit_edge287, !llvm.loop !33

._crit_edge287:                                   ; preds = %.lr.ph286, %209
  %.5184.lcssa = phi i32 [ %.4183294, %209 ], [ %211, %.lr.ph286 ]
  %.5.lcssa = phi i32 [ %.4295, %209 ], [ %212, %.lr.ph286 ]
  %214 = add nsw i32 %.5.lcssa, %186
  %215 = getelementptr inbounds i8, ptr %.0196292, i64 4
  %216 = getelementptr inbounds i8, ptr %.0202291, i64 2
  %217 = add i32 %.4195293, 1
  %exitcond323.not = icmp eq i32 %.4195293, %179
  br i1 %exitcond323.not, label %._crit_edge298.loopexit, label %197, !llvm.loop !34

._crit_edge298.loopexit:                          ; preds = %._crit_edge287
  %.pre = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !30
  %.pre328 = load i32, ptr @_ZN16GraphicComponent6_widthE, align 4, !tbaa !30
  br label %._crit_edge298

._crit_edge298:                                   ; preds = %._crit_edge298.loopexit, %171
  %218 = phi i32 [ %.pre328, %._crit_edge298.loopexit ], [ %172, %171 ]
  %219 = phi i32 [ %.pre, %._crit_edge298.loopexit ], [ %173, %171 ]
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds i8, ptr %.0197302, i64 %220
  %222 = sext i32 %218 to i64
  %223 = getelementptr inbounds i16, ptr %.0203300, i64 %222
  %indvars.iv.next325 = add nsw i64 %indvars.iv324, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next325 to i32
  %exitcond327.not = icmp eq i32 %170, %lftr.wideiv
  br i1 %exitcond327.not, label %.loopexit, label %171, !llvm.loop !35

.loopexit:                                        ; preds = %._crit_edge298, %._crit_edge282, %._crit_edge, %1
  ret void
}

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

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

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

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

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


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