; LLVM IR from reworks-org/galaxy :: deps/sfml_deps/freetype-src/src/psaux (pshints)

; 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.CF2_GlyphPathRec_ = type { ptr, ptr, %struct.CF2_HintMapRec_, %struct.CF2_HintMapRec_, %struct.CF2_HintMapRec_, %struct.CF2_ArrStackRec_, i32, i32, i32, %struct.FT_Vector_, i8, i8, i8, i8, ptr, ptr, ptr, i32, ptr, i32, i32, i32, i32, %struct.FT_Vector_, %struct.FT_Vector_, %struct.FT_Vector_, %struct.FT_Vector_, %struct.FT_Vector_, i8, i32, %struct.FT_Vector_, %struct.FT_Vector_, %struct.FT_Vector_, %struct.FT_Vector_ }
%struct.CF2_HintMapRec_ = type { ptr, ptr, ptr, i8, i8, i32, i32, i32, [192 x %struct.CF2_HintRec_] }
%struct.CF2_HintRec_ = type { i32, i64, i32, i32, i32 }
%struct.CF2_ArrStackRec_ = type { ptr, ptr, i64, i64, i64, i64, ptr }
%struct.FT_Vector_ = type { i64, i64 }

; Function Attrs: nounwind uwtable
define hidden void @cf2_glyphpath_closeOpenPath(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds %struct.CF2_GlyphPathRec_, ptr %3, i32 0, i32 10
  %5 = load i8, ptr %4, align 8, !tbaa !9
  %6 = icmp ne i8 %5, 0
  br i1 %6, label %7, label %46

7:                                                ; preds = %1
  %8 = load ptr, ptr %2, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.CF2_GlyphPathRec_, ptr %8, i32 0, i32 11
  store i8 1, ptr %9, align 1, !tbaa !16
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.CF2_GlyphPathRec_, ptr %11, i32 0, i32 27
  %13 = getelementptr inbounds %struct.FT_Vector_, ptr %12, i32 0, i32 0
  %14 = load i64, ptr %13, align 8, !tbaa !17
  %15 = trunc i64 %14 to i32
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.CF2_GlyphPathRec_, ptr %16, i32 0, i32 27
  %18 = getelementptr inbounds %struct.FT_Vector_, ptr %17, i32 0, i32 1
  %19 = load i64, ptr %18, align 8, !tbaa !18
  %20 = trunc i64 %19 to i32
  call void @cf2_glyphpath_lineTo(ptr noundef %10, i32 noundef %15, i32 noundef %20)
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.CF2_GlyphPathRec_, ptr %21, i32 0, i32 28
  %23 = load i8, ptr %22, align 8, !tbaa !19
  %24 = icmp ne i8 %23, 0
  br i1 %24, label %25, label %37

25:                                               ; preds = %7
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.CF2_GlyphPathRec_, ptr %27, i32 0, i32 2
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.CF2_GlyphPathRec_, ptr %29, i32 0, i32 23
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.CF2_GlyphPathRec_, ptr %31, i32 0, i32 24
  %33 = getelementptr inbounds { i64, i64 }, ptr %32, i32 0, i32 0
  %34 = load i64, ptr %33, align 8
  %35 = getelementptr inbounds { i64, i64 }, ptr %32, i32 0, i32 1
  %36 = load i64, ptr %35, align 8
  call void @cf2_glyphpath_pushPrevElem(ptr noundef %26, ptr noundef %28, ptr noundef %30, i64 %34, i64 %36, i8 noundef zeroext 1)
  br label %37

37:                                               ; preds = %25, %7
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.CF2_GlyphPathRec_, ptr %38, i32 0, i32 13
  store i8 1, ptr %39, align 1, !tbaa !20
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.CF2_GlyphPathRec_, ptr %40, i32 0, i32 10
  store i8 0, ptr %41, align 8, !tbaa !9
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.CF2_GlyphPathRec_, ptr %42, i32 0, i32 11
  store i8 0, ptr %43, align 1, !tbaa !16
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.CF2_GlyphPathRec_, ptr %44, i32 0, i32 28
  store i8 0, ptr %45, align 8, !tbaa !19
  br label %46

46:                                               ; preds = %37, %1
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden void @cf2_glyphpath_lineTo(ptr noundef, i32 noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @cf2_glyphpath_pushPrevElem(ptr noundef, ptr noundef, ptr noundef, i64, i64, i8 noundef zeroext) #0

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !7, i64 18656}
!10 = !{!"CF2_GlyphPathRec_", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 6200, !11, i64 12384, !13, i64 18568, !12, i64 18624, !12, i64 18628, !12, i64 18632, !15, i64 18640, !7, i64 18656, !7, i64 18657, !7, i64 18658, !7, i64 18659, !6, i64 18664, !6, i64 18672, !6, i64 18680, !12, i64 18688, !6, i64 18696, !12, i64 18704, !12, i64 18708, !12, i64 18712, !12, i64 18716, !15, i64 18720, !15, i64 18736, !15, i64 18752, !15, i64 18768, !15, i64 18784, !7, i64 18800, !12, i64 18804, !15, i64 18808, !15, i64 18824, !15, i64 18840, !15, i64 18856}
!11 = !{!"CF2_HintMapRec_", !6, i64 0, !6, i64 8, !6, i64 16, !7, i64 24, !7, i64 25, !12, i64 28, !12, i64 32, !12, i64 36, !7, i64 40}
!12 = !{!"int", !7, i64 0}
!13 = !{!"CF2_ArrStackRec_", !6, i64 0, !6, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !6, i64 48}
!14 = !{!"long", !7, i64 0}
!15 = !{!"FT_Vector_", !14, i64 0, !14, i64 8}
!16 = !{!10, !7, i64 18657}
!17 = !{!10, !14, i64 18784}
!18 = !{!10, !14, i64 18792}
!19 = !{!10, !7, i64 18800}
!20 = !{!10, !7, i64 18659}


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

; Function Attrs: nounwind uwtable
define hidden void @cf2_glyphpath_closeOpenPath(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 18656
  %3 = load i8, ptr %2, align 8, !tbaa !5
  %.not = icmp eq i8 %3, 0
  br i1 %.not, label %23, label %4

4:                                                ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 18657
  store i8 1, ptr %5, align 1, !tbaa !15
  %6 = getelementptr inbounds i8, ptr %0, i64 18784
  %7 = load i64, ptr %6, align 8, !tbaa !16
  %8 = trunc i64 %7 to i32
  %9 = getelementptr inbounds i8, ptr %0, i64 18792
  %10 = load i64, ptr %9, align 8, !tbaa !17
  %11 = trunc i64 %10 to i32
  tail call void @cf2_glyphpath_lineTo(ptr noundef nonnull %0, i32 noundef %8, i32 noundef %11)
  %12 = getelementptr inbounds i8, ptr %0, i64 18800
  %13 = load i8, ptr %12, align 8, !tbaa !18
  %.not14 = icmp eq i8 %13, 0
  br i1 %.not14, label %21, label %14

14:                                               ; preds = %4
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = getelementptr inbounds i8, ptr %0, i64 18720
  %17 = getelementptr inbounds i8, ptr %0, i64 18736
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr %0, i64 18744
  %20 = load i64, ptr %19, align 8
  tail call void @cf2_glyphpath_pushPrevElem(ptr noundef nonnull %0, ptr noundef nonnull %15, ptr noundef nonnull %16, i64 %18, i64 %20, i8 noundef zeroext 1)
  br label %21

21:                                               ; preds = %14, %4
  %22 = getelementptr inbounds i8, ptr %0, i64 18659
  store i8 1, ptr %22, align 1, !tbaa !19
  store i8 0, ptr %2, align 8, !tbaa !5
  store i8 0, ptr %5, align 1, !tbaa !15
  store i8 0, ptr %12, align 8, !tbaa !18
  br label %23

23:                                               ; preds = %21, %1
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden void @cf2_glyphpath_lineTo(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @cf2_glyphpath_pushPrevElem(ptr noundef, ptr noundef, ptr noundef, i64, i64, i8 noundef zeroext) local_unnamed_addr #0

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 18656}
!6 = !{!"CF2_GlyphPathRec_", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 6200, !10, i64 12384, !12, i64 18568, !11, i64 18624, !11, i64 18628, !11, i64 18632, !14, i64 18640, !8, i64 18656, !8, i64 18657, !8, i64 18658, !8, i64 18659, !7, i64 18664, !7, i64 18672, !7, i64 18680, !11, i64 18688, !7, i64 18696, !11, i64 18704, !11, i64 18708, !11, i64 18712, !11, i64 18716, !14, i64 18720, !14, i64 18736, !14, i64 18752, !14, i64 18768, !14, i64 18784, !8, i64 18800, !11, i64 18804, !14, i64 18808, !14, i64 18824, !14, i64 18840, !14, i64 18856}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"CF2_HintMapRec_", !7, i64 0, !7, i64 8, !7, i64 16, !8, i64 24, !8, i64 25, !11, i64 28, !11, i64 32, !11, i64 36, !8, i64 40}
!11 = !{!"int", !8, i64 0}
!12 = !{!"CF2_ArrStackRec_", !7, i64 0, !7, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !7, i64 48}
!13 = !{!"long", !8, i64 0}
!14 = !{!"FT_Vector_", !13, i64 0, !13, i64 8}
!15 = !{!6, !8, i64 18657}
!16 = !{!6, !13, i64 18784}
!17 = !{!6, !13, i64 18792}
!18 = !{!6, !8, i64 18800}
!19 = !{!6, !8, i64 18659}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InstCombinePass,SROAPass,TailCallElimPass