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

; 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.Pixel24 = type { i8, i8, i8 }

@_ZN16GraphicComponent16_bytes_per_pixelE = external global i32, align 4
@_ZN16GraphicComponent10_graph_memE = external global ptr, align 8
@_ZN16GraphicComponent15_bytes_per_lineE = external global i32, align 4
@_ZN16GraphicComponent7_heightE = external global i32, align 4
@.str.5 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [27 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: 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 void @_ZN11GraphicPort5ClearEj(ptr noundef nonnull align 8 dereferenceable(14128) %0, i32 noundef %1) unnamed_addr #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %11 = load ptr, ptr %3, align 8
  %12 = load i32, ptr @_ZN16GraphicComponent16_bytes_per_pixelE, align 4, !tbaa !9
  switch i32 %12, label %74 [
    i32 1, label %13
    i32 2, label %23
    i32 3, label %41
    i32 4, label %57
  ]

13:                                               ; preds = %2
  %14 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !5
  %15 = load i32, ptr %4, align 4, !tbaa !9
  %16 = trunc i32 %15 to i8
  %17 = zext i8 %16 to i32
  %18 = trunc i32 %17 to i8
  %19 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !9
  %20 = load i32, ptr @_ZN16GraphicComponent7_heightE, align 4, !tbaa !9
  %21 = mul nsw i32 %19, %20
  %22 = sext i32 %21 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %14, i8 %18, i64 %22, i1 false)
  br label %84

23:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %24 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !9
  %25 = load i32, ptr @_ZN16GraphicComponent7_heightE, align 4, !tbaa !9
  %26 = mul nsw i32 %24, %25
  %27 = ashr i32 %26, 1
  store i32 %27, ptr %6, align 4, !tbaa !9
  %28 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !5
  store ptr %28, ptr %5, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %37, %23
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %32, label %40

32:                                               ; preds = %29
  %33 = load i32, ptr %4, align 4, !tbaa !9
  %34 = trunc i32 %33 to i16
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds i16, ptr %35, i32 1
  store ptr %36, ptr %5, align 8, !tbaa !5
  store i16 %34, ptr %35, align 2, !tbaa !11
  br label %37

37:                                               ; preds = %32
  %38 = load i32, ptr %6, align 4, !tbaa !9
  %39 = add nsw i32 %38, -1
  store i32 %39, ptr %6, align 4, !tbaa !9
  br label %29, !llvm.loop !13

40:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %84

41:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %42 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !9
  %43 = load i32, ptr @_ZN16GraphicComponent7_heightE, align 4, !tbaa !9
  %44 = mul nsw i32 %42, %43
  %45 = sdiv i32 %44, 3
  store i32 %45, ptr %8, align 4, !tbaa !9
  %46 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !5
  store ptr %46, ptr %7, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %53, %41
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %50, label %56

50:                                               ; preds = %47
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.Pixel24, ptr %51, i32 1
  store ptr %52, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %51, ptr align 4 %4, i64 3, i1 false), !tbaa.struct !15
  br label %53

53:                                               ; preds = %50
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = add nsw i32 %54, -1
  store i32 %55, ptr %8, align 4, !tbaa !9
  br label %47, !llvm.loop !17

56:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %84

57:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %58 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !9
  %59 = load i32, ptr @_ZN16GraphicComponent7_heightE, align 4, !tbaa !9
  %60 = mul nsw i32 %58, %59
  %61 = ashr i32 %60, 2
  store i32 %61, ptr %10, align 4, !tbaa !9
  %62 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !5
  store ptr %62, ptr %9, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %70, %57
  %64 = load i32, ptr %10, align 4, !tbaa !9
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %66, label %73

66:                                               ; preds = %63
  %67 = load i32, ptr %4, align 4, !tbaa !9
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = getelementptr inbounds i32, ptr %68, i32 1
  store ptr %69, ptr %9, align 8, !tbaa !5
  store i32 %67, ptr %68, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %66
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = add nsw i32 %71, -1
  store i32 %72, ptr %10, align 4, !tbaa !9
  br label %63, !llvm.loop !18

73:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %84

74:                                               ; preds = %2
  %75 = call noundef nonnull align 8 dereferenceable(8624) ptr @_ZN16GraphicComponentixEi(ptr noundef nonnull align 8 dereferenceable(8624) %11, i32 noundef 1)
  %76 = call noundef nonnull align 8 dereferenceable(8624) ptr @_ZN16GraphicComponentlsEPKc(ptr noundef nonnull align 8 dereferenceable(8624) %75, ptr noundef @.str.5)
  %77 = call noundef nonnull align 8 dereferenceable(8624) ptr @_ZN16GraphicComponentixEi(ptr noundef nonnull align 8 dereferenceable(8624) %11, i32 noundef 2)
  %78 = call noundef nonnull align 8 dereferenceable(8624) ptr @_ZN16GraphicComponentlsEPKc(ptr noundef nonnull align 8 dereferenceable(8624) %77, ptr noundef @.str.6)
  %79 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !5
  %80 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !9
  %81 = load i32, ptr @_ZN16GraphicComponent7_heightE, align 4, !tbaa !9
  %82 = mul nsw i32 %80, %81
  %83 = sext i32 %82 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %79, i8 0, i64 %83, i1 false)
  br label %84

84:                                               ; preds = %74, %73, %56, %40, %13
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8624) ptr @_ZN16GraphicComponentixEi(ptr noundef nonnull align 8 dereferenceable(8624), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8624) ptr @_ZN16GraphicComponentlsEPKc(ptr noundef nonnull align 8 dereferenceable(8624), ptr noundef) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 = { 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, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{i64 0, i64 1, !16, i64 1, i64 1, !16, i64 2, i64 1, !16}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


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

@_ZN16GraphicComponent16_bytes_per_pixelE = external local_unnamed_addr global i32, align 4
@_ZN16GraphicComponent10_graph_memE = external local_unnamed_addr global ptr, align 8
@_ZN16GraphicComponent15_bytes_per_lineE = external local_unnamed_addr global i32, align 4
@_ZN16GraphicComponent7_heightE = external local_unnamed_addr global i32, align 4
@.str.5 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11GraphicPort5ClearEj(ptr noundef nonnull align 8 dereferenceable(14128) %0, i32 noundef %1) unnamed_addr #0 align 2 {
  %3 = load i32, ptr @_ZN16GraphicComponent16_bytes_per_pixelE, align 4, !tbaa !5
  switch i32 %3, label %51 [
    i32 1, label %4
    i32 2, label %11
    i32 3, label %26
    i32 4, label %37
  ]

4:                                                ; preds = %2
  %5 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !9
  %6 = trunc i32 %1 to i8
  %7 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !5
  %8 = load i32, ptr @_ZN16GraphicComponent7_heightE, align 4, !tbaa !5
  %9 = mul nsw i32 %8, %7
  %10 = sext i32 %9 to i64
  tail call void @llvm.memset.p0.i64(ptr align 1 %5, i8 %6, i64 %10, i1 false)
  br label %.loopexit

11:                                               ; preds = %2
  %12 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !5
  %13 = load i32, ptr @_ZN16GraphicComponent7_heightE, align 4, !tbaa !5
  %14 = mul nsw i32 %13, %12
  %15 = ashr i32 %14, 1
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph27, label %.loopexit

.lr.ph27:                                         ; preds = %11
  %17 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !9
  %18 = trunc i32 %1 to i16
  %19 = zext nneg i32 %15 to i64
  %min.iters.check39 = icmp ult i32 %15, 16
  br i1 %min.iters.check39, label %scalar.ph38.preheader, label %vector.ph40

vector.ph40:                                      ; preds = %.lr.ph27
  %n.vec42 = and i64 %19, 2147483632
  %.cast43 = trunc nuw nsw i64 %n.vec42 to i32
  %ind.end44 = sub nsw i32 %15, %.cast43
  %20 = shl nuw nsw i64 %n.vec42, 1
  %ind.end46 = getelementptr i8, ptr %17, i64 %20
  %broadcast.splatinsert53 = insertelement <8 x i16> poison, i16 %18, i64 0
  %broadcast.splat54 = shufflevector <8 x i16> %broadcast.splatinsert53, <8 x i16> poison, <8 x i32> zeroinitializer
  br label %vector.body48

vector.body48:                                    ; preds = %vector.body48, %vector.ph40
  %index49 = phi i64 [ 0, %vector.ph40 ], [ %index.next55, %vector.body48 ]
  %offset.idx50 = shl i64 %index49, 1
  %next.gep51 = getelementptr i8, ptr %17, i64 %offset.idx50
  %21 = getelementptr i8, ptr %next.gep51, i64 16
  store <8 x i16> %broadcast.splat54, ptr %next.gep51, align 2, !tbaa !11
  store <8 x i16> %broadcast.splat54, ptr %21, align 2, !tbaa !11
  %index.next55 = add nuw i64 %index49, 16
  %22 = icmp eq i64 %index.next55, %n.vec42
  br i1 %22, label %middle.block37, label %vector.body48, !llvm.loop !13

middle.block37:                                   ; preds = %vector.body48
  %cmp.n56 = icmp eq i64 %n.vec42, %19
  br i1 %cmp.n56, label %.loopexit, label %scalar.ph38.preheader

scalar.ph38.preheader:                            ; preds = %middle.block37, %.lr.ph27
  %.01626.ph = phi i32 [ %15, %.lr.ph27 ], [ %ind.end44, %middle.block37 ]
  %.01725.ph = phi ptr [ %17, %.lr.ph27 ], [ %ind.end46, %middle.block37 ]
  br label %scalar.ph38

scalar.ph38:                                      ; preds = %scalar.ph38.preheader, %scalar.ph38
  %.01626 = phi i32 [ %24, %scalar.ph38 ], [ %.01626.ph, %scalar.ph38.preheader ]
  %.01725 = phi ptr [ %23, %scalar.ph38 ], [ %.01725.ph, %scalar.ph38.preheader ]
  %23 = getelementptr inbounds i8, ptr %.01725, i64 2
  store i16 %18, ptr %.01725, align 2, !tbaa !11
  %24 = add nsw i32 %.01626, -1
  %25 = icmp ugt i32 %.01626, 1
  br i1 %25, label %scalar.ph38, label %.loopexit, !llvm.loop !17

26:                                               ; preds = %2
  %27 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !5
  %28 = load i32, ptr @_ZN16GraphicComponent7_heightE, align 4, !tbaa !5
  %29 = mul nsw i32 %28, %27
  %30 = icmp sgt i32 %29, 2
  br i1 %30, label %.lr.ph24, label %.loopexit

.lr.ph24:                                         ; preds = %26
  %31 = udiv i32 %29, 3
  %32 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !9
  %.0.extract.trunc = trunc i32 %1 to i24
  br label %33

33:                                               ; preds = %.lr.ph24, %33
  %.01423 = phi i32 [ %31, %.lr.ph24 ], [ %35, %33 ]
  %.01522 = phi ptr [ %32, %.lr.ph24 ], [ %34, %33 ]
  %34 = getelementptr inbounds i8, ptr %.01522, i64 3
  store i24 %.0.extract.trunc, ptr %.01522, align 1
  %35 = add nsw i32 %.01423, -1
  %36 = icmp ugt i32 %.01423, 1
  br i1 %36, label %33, label %.loopexit, !llvm.loop !18

37:                                               ; preds = %2
  %38 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !5
  %39 = load i32, ptr @_ZN16GraphicComponent7_heightE, align 4, !tbaa !5
  %40 = mul nsw i32 %39, %38
  %41 = ashr i32 %40, 2
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %37
  %43 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !9
  %44 = zext nneg i32 %41 to i64
  %min.iters.check = icmp ult i32 %41, 8
  br i1 %min.iters.check, label %.lr.ph.preheader58, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %44, 2147483640
  %.cast = trunc nuw nsw i64 %n.vec to i32
  %ind.end = sub nsw i32 %41, %.cast
  %45 = shl nuw nsw i64 %n.vec, 2
  %ind.end34 = getelementptr i8, ptr %43, i64 %45
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %1, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = shl i64 %index, 2
  %next.gep = getelementptr i8, ptr %43, i64 %offset.idx
  %46 = getelementptr i8, ptr %next.gep, i64 16
  store <4 x i32> %broadcast.splat, ptr %next.gep, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %46, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %47 = icmp eq i64 %index.next, %n.vec
  br i1 %47, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %44
  br i1 %cmp.n, label %.loopexit, label %.lr.ph.preheader58

.lr.ph.preheader58:                               ; preds = %middle.block, %.lr.ph.preheader
  %.021.ph = phi i32 [ %41, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %.01320.ph = phi ptr [ %43, %.lr.ph.preheader ], [ %ind.end34, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader58, %.lr.ph
  %.021 = phi i32 [ %49, %.lr.ph ], [ %.021.ph, %.lr.ph.preheader58 ]
  %.01320 = phi ptr [ %48, %.lr.ph ], [ %.01320.ph, %.lr.ph.preheader58 ]
  %48 = getelementptr inbounds i8, ptr %.01320, i64 4
  store i32 %1, ptr %.01320, align 4, !tbaa !5
  %49 = add nsw i32 %.021, -1
  %50 = icmp ugt i32 %.021, 1
  br i1 %50, label %.lr.ph, label %.loopexit, !llvm.loop !20

51:                                               ; preds = %2
  %52 = tail call noundef nonnull align 8 dereferenceable(8624) ptr @_ZN16GraphicComponentixEi(ptr noundef nonnull align 8 dereferenceable(8624) %0, i32 noundef 1)
  %53 = tail call noundef nonnull align 8 dereferenceable(8624) ptr @_ZN16GraphicComponentlsEPKc(ptr noundef nonnull align 8 dereferenceable(8624) %52, ptr noundef nonnull @.str.5)
  %54 = tail call noundef nonnull align 8 dereferenceable(8624) ptr @_ZN16GraphicComponentixEi(ptr noundef nonnull align 8 dereferenceable(8624) %0, i32 noundef 2)
  %55 = tail call noundef nonnull align 8 dereferenceable(8624) ptr @_ZN16GraphicComponentlsEPKc(ptr noundef nonnull align 8 dereferenceable(8624) %54, ptr noundef nonnull @.str.6)
  %56 = load ptr, ptr @_ZN16GraphicComponent10_graph_memE, align 8, !tbaa !9
  %57 = load i32, ptr @_ZN16GraphicComponent15_bytes_per_lineE, align 4, !tbaa !5
  %58 = load i32, ptr @_ZN16GraphicComponent7_heightE, align 4, !tbaa !5
  %59 = mul nsw i32 %58, %57
  %60 = sext i32 %59 to i64
  tail call void @llvm.memset.p0.i64(ptr align 1 %56, i8 0, i64 %60, i1 false)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %33, %scalar.ph38, %middle.block, %middle.block37, %37, %26, %11, %51, %4
  ret void
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8624) ptr @_ZN16GraphicComponentixEi(ptr noundef nonnull align 8 dereferenceable(8624), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8624) ptr @_ZN16GraphicComponentlsEPKc(ptr noundef nonnull align 8 dereferenceable(8624), ptr noundef) local_unnamed_addr #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { inlinehint 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" }

!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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = distinct !{!13, !14, !15, !16}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !14, !16, !15}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14, !15, !16}
!20 = distinct !{!20, !14, !16, !15}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass