; LLVM IR from BrunoLevy/learn-fpga :: LiteX/software/Tagl/Lib/polyeng.ll (ZN13PolygonEngine4MakeEP11GraphicPorti)

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

%struct.PolygonEngine_VC_Entry = type { ptr, i32, i32, i32, i32 }

@_ZN13PolygonEngine8_entriesE = external dso_local global i32, align 4
@_ZN13PolygonEngine6_entryE = external dso_local global [50 x %struct.PolygonEngine_VC_Entry], align 16
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [80 x i8], align 1

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

; Function Attrs: nounwind
declare ptr @getenv(ptr noundef) #1

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #2

declare i32 @printf(ptr noundef, ...) #3

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN13PolygonEngine4MakeEP11GraphicPorti(ptr noundef %0, i32 noundef %1) #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %10 = load i32, ptr %5, align 4, !tbaa !9
  %11 = icmp eq i32 %10, 101
  br i1 %11, label %12, label %21

12:                                               ; preds = %2
  %13 = call ptr @getenv(ptr noundef @.str.5) #6
  store ptr %13, ptr %8, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %18

15:                                               ; preds = %12
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  %17 = call i32 @atoi(ptr noundef %16) #7
  br label %19

18:                                               ; preds = %12
  br label %19

19:                                               ; preds = %18, %15
  %20 = phi i32 [ %17, %15 ], [ 0, %18 ]
  store i32 %20, ptr %5, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %19, %2
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %111, %21
  %23 = load i32, ptr %6, align 4, !tbaa !9
  %24 = load i32, ptr @_ZN13PolygonEngine8_entriesE, align 4, !tbaa !9
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %26, label %114

26:                                               ; preds = %22
  %27 = load i32, ptr %6, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [50 x %struct.PolygonEngine_VC_Entry], ptr @_ZN13PolygonEngine6_entryE, i64 0, i64 %28
  %30 = getelementptr inbounds %struct.PolygonEngine_VC_Entry, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 8, !tbaa !11
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = call noundef i32 @_ZNK11GraphicPort13BytesPerPixelEv(ptr noundef nonnull align 8 dereferenceable(14128) %32)
  %34 = icmp eq i32 %31, %33
  br i1 %34, label %35, label %80

35:                                               ; preds = %26
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [50 x %struct.PolygonEngine_VC_Entry], ptr @_ZN13PolygonEngine6_entryE, i64 0, i64 %37
  %39 = getelementptr inbounds %struct.PolygonEngine_VC_Entry, ptr %38, i32 0, i32 2
  %40 = load i32, ptr %39, align 4, !tbaa !13
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = call noundef i32 @_ZNK11GraphicPort5RMaskEv(ptr noundef nonnull align 8 dereferenceable(14128) %41)
  %43 = icmp eq i32 %40, %42
  br i1 %43, label %44, label %80

44:                                               ; preds = %35
  %45 = load i32, ptr %6, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [50 x %struct.PolygonEngine_VC_Entry], ptr @_ZN13PolygonEngine6_entryE, i64 0, i64 %46
  %48 = getelementptr inbounds %struct.PolygonEngine_VC_Entry, ptr %47, i32 0, i32 3
  %49 = load i32, ptr %48, align 8, !tbaa !14
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = call noundef i32 @_ZNK11GraphicPort5GMaskEv(ptr noundef nonnull align 8 dereferenceable(14128) %50)
  %52 = icmp eq i32 %49, %51
  br i1 %52, label %53, label %80

53:                                               ; preds = %44
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [50 x %struct.PolygonEngine_VC_Entry], ptr @_ZN13PolygonEngine6_entryE, i64 0, i64 %55
  %57 = getelementptr inbounds %struct.PolygonEngine_VC_Entry, ptr %56, i32 0, i32 4
  %58 = load i32, ptr %57, align 4, !tbaa !15
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = call noundef i32 @_ZNK11GraphicPort5BMaskEv(ptr noundef nonnull align 8 dereferenceable(14128) %59)
  %61 = icmp eq i32 %58, %60
  br i1 %61, label %62, label %80

62:                                               ; preds = %53
  %63 = load i32, ptr %6, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [50 x %struct.PolygonEngine_VC_Entry], ptr @_ZN13PolygonEngine6_entryE, i64 0, i64 %64
  %66 = getelementptr inbounds %struct.PolygonEngine_VC_Entry, ptr %65, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !16
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = load i32, ptr %5, align 4, !tbaa !9
  %70 = call noundef ptr %67(ptr noundef %68, i32 noundef %69)
  store ptr %70, ptr %7, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %80

72:                                               ; preds = %62
  %73 = load i32, ptr %5, align 4, !tbaa !9
  %74 = icmp sge i32 %73, 3
  br i1 %74, label %75, label %78

75:                                               ; preds = %72
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i32 noundef %76)
  br label %78

78:                                               ; preds = %75, %72
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %79, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %120

80:                                               ; preds = %62, %53, %44, %35, %26
  %81 = load i32, ptr %6, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [50 x %struct.PolygonEngine_VC_Entry], ptr @_ZN13PolygonEngine6_entryE, i64 0, i64 %82
  %84 = getelementptr inbounds %struct.PolygonEngine_VC_Entry, ptr %83, i32 0, i32 1
  %85 = load i32, ptr %84, align 8, !tbaa !11
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %110, label %87

87:                                               ; preds = %80
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = call noundef i32 @_ZNK11GraphicPort13BytesPerPixelEv(ptr noundef nonnull align 8 dereferenceable(14128) %88)
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %110, label %91

91:                                               ; preds = %87
  %92 = load i32, ptr %6, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [50 x %struct.PolygonEngine_VC_Entry], ptr @_ZN13PolygonEngine6_entryE, i64 0, i64 %93
  %95 = getelementptr inbounds %struct.PolygonEngine_VC_Entry, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !16
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = load i32, ptr %5, align 4, !tbaa !9
  %99 = call noundef ptr %96(ptr noundef %97, i32 noundef %98)
  store ptr %99, ptr %7, align 8, !tbaa !5
  %100 = icmp ne ptr %99, null
  br i1 %100, label %101, label %110

101:                                              ; preds = %91
  %102 = load i32, ptr %5, align 4, !tbaa !9
  %103 = icmp sge i32 %102, 3
  br i1 %103, label %104, label %108

104:                                              ; preds = %101
  %105 = load i32, ptr %6, align 4, !tbaa !9
  %106 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i32 noundef %105)
  %107 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  br label %108

108:                                              ; preds = %104, %101
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %109, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %120

110:                                              ; preds = %91, %87, %80
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %6, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %6, align 4, !tbaa !9
  br label %22, !llvm.loop !17

114:                                              ; preds = %22
  %115 = load i32, ptr %5, align 4, !tbaa !9
  %116 = icmp sge i32 %115, 1
  br i1 %116, label %117, label %119

117:                                              ; preds = %114
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  br label %119

119:                                              ; preds = %117, %114
  store ptr null, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %120

120:                                              ; preds = %119, %108, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %121 = load ptr, ptr %3, align 8
  ret ptr %121
}

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "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 = { inlinehint mustprogress nounwind willreturn memory(read) 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 = { "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 #4 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 8}
!12 = !{!"_ZTS22PolygonEngine_VC_Entry", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!13 = !{!12, !10, i64 12}
!14 = !{!12, !10, i64 16}
!15 = !{!12, !10, i64 20}
!16 = !{!12, !6, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


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

%struct.PolygonEngine_VC_Entry = type { ptr, i32, i32, i32, i32 }

@_ZN13PolygonEngine8_entriesE = external dso_local local_unnamed_addr global i32, align 4
@_ZN13PolygonEngine6_entryE = external dso_local local_unnamed_addr global [50 x %struct.PolygonEngine_VC_Entry], align 16
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [80 x i8], align 1

; Function Attrs: nofree nounwind memory(read)
declare noundef ptr @getenv(ptr nocapture noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN13PolygonEngine4MakeEP11GraphicPorti(ptr noundef %0, i32 noundef %1) local_unnamed_addr #3 align 2 {
  %3 = icmp eq i32 %1, 101
  br i1 %3, label %4, label %8

4:                                                ; preds = %2
  %5 = tail call ptr @getenv(ptr noundef nonnull @.str.5) #5
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %8, label %6

6:                                                ; preds = %4
  %7 = tail call i32 @atoi(ptr nocapture noundef %5) #6
  br label %8

8:                                                ; preds = %6, %4, %2
  %.028 = phi i32 [ %1, %2 ], [ %7, %6 ], [ 0, %4 ]
  %9 = load i32, ptr @_ZN13PolygonEngine8_entriesE, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %8, %52
  %indvars.iv = phi i64 [ %indvars.iv.next, %52 ], [ 0, %8 ]
  %11 = getelementptr inbounds [50 x %struct.PolygonEngine_VC_Entry], ptr @_ZN13PolygonEngine6_entryE, i64 0, i64 %indvars.iv
  %12 = getelementptr inbounds i8, ptr %11, i64 8
  %13 = load i32, ptr %12, align 8, !tbaa !9
  %14 = tail call noundef i32 @_ZNK11GraphicPort13BytesPerPixelEv(ptr noundef nonnull align 8 dereferenceable(14128) %0)
  %15 = icmp eq i32 %13, %14
  br i1 %15, label %16, label %39

16:                                               ; preds = %.lr.ph
  %17 = getelementptr inbounds i8, ptr %11, i64 12
  %18 = load i32, ptr %17, align 4, !tbaa !12
  %19 = tail call noundef i32 @_ZNK11GraphicPort5RMaskEv(ptr noundef nonnull align 8 dereferenceable(14128) %0)
  %20 = icmp eq i32 %18, %19
  br i1 %20, label %21, label %39

21:                                               ; preds = %16
  %22 = getelementptr inbounds i8, ptr %11, i64 16
  %23 = load i32, ptr %22, align 8, !tbaa !13
  %24 = tail call noundef i32 @_ZNK11GraphicPort5GMaskEv(ptr noundef nonnull align 8 dereferenceable(14128) %0)
  %25 = icmp eq i32 %23, %24
  br i1 %25, label %26, label %39

26:                                               ; preds = %21
  %27 = getelementptr inbounds i8, ptr %11, i64 20
  %28 = load i32, ptr %27, align 4, !tbaa !14
  %29 = tail call noundef i32 @_ZNK11GraphicPort5BMaskEv(ptr noundef nonnull align 8 dereferenceable(14128) %0)
  %30 = icmp eq i32 %28, %29
  br i1 %30, label %31, label %39

31:                                               ; preds = %26
  %32 = load ptr, ptr %11, align 8, !tbaa !15
  %33 = tail call noundef ptr %32(ptr noundef nonnull %0, i32 noundef %.028)
  %.not33 = icmp eq ptr %33, null
  br i1 %.not33, label %39, label %34

34:                                               ; preds = %31
  %35 = icmp sgt i32 %.028, 2
  br i1 %35, label %36, label %59

36:                                               ; preds = %34
  %37 = trunc nuw nsw i64 %indvars.iv to i32
  %38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef %37)
  br label %59

39:                                               ; preds = %31, %26, %21, %16, %.lr.ph
  %40 = load i32, ptr %12, align 8, !tbaa !9
  %.not34 = icmp eq i32 %40, 0
  br i1 %.not34, label %41, label %52

41:                                               ; preds = %39
  %42 = tail call noundef i32 @_ZNK11GraphicPort13BytesPerPixelEv(ptr noundef nonnull align 8 dereferenceable(14128) %0)
  %.not35 = icmp eq i32 %42, 0
  br i1 %.not35, label %43, label %52

43:                                               ; preds = %41
  %44 = load ptr, ptr %11, align 8, !tbaa !15
  %45 = tail call noundef ptr %44(ptr noundef nonnull %0, i32 noundef %.028)
  %.not36 = icmp eq ptr %45, null
  br i1 %.not36, label %52, label %46

46:                                               ; preds = %43
  %47 = icmp sgt i32 %.028, 2
  br i1 %47, label %48, label %59

48:                                               ; preds = %46
  %49 = trunc nuw nsw i64 %indvars.iv to i32
  %50 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef %49)
  %51 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  br label %59

52:                                               ; preds = %39, %41, %43
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %53 = load i32, ptr @_ZN13PolygonEngine8_entriesE, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = icmp slt i64 %indvars.iv.next, %54
  br i1 %55, label %.lr.ph, label %._crit_edge, !llvm.loop !16

._crit_edge:                                      ; preds = %52, %8
  %56 = icmp sgt i32 %.028, 0
  br i1 %56, label %57, label %59

57:                                               ; preds = %._crit_edge
  %58 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  br label %59

59:                                               ; preds = %._crit_edge, %57, %46, %48, %34, %36
  %.0 = phi ptr [ %33, %36 ], [ %33, %34 ], [ %45, %48 ], [ %45, %46 ], [ null, %57 ], [ null, %._crit_edge ]
  ret ptr %.0
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11GraphicPort13BytesPerPixelEv(ptr noundef nonnull align 8 dereferenceable(14128)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11GraphicPort5RMaskEv(ptr noundef nonnull align 8 dereferenceable(14128)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11GraphicPort5GMaskEv(ptr noundef nonnull align 8 dereferenceable(14128)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11GraphicPort5BMaskEv(ptr noundef nonnull align 8 dereferenceable(14128)) local_unnamed_addr #4 align 2

attributes #0 = { nofree nounwind memory(read) "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 nofree nounwind willreturn memory(read) 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 = { nofree nounwind "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 = { 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTS22PolygonEngine_VC_Entry", !11, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !6, i64 12}
!13 = !{!10, !6, i64 16}
!14 = !{!10, !6, i64 20}
!15 = !{!10, !11, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


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