; LLVM IR from caryll/otfcc :: lib/otf-writer (stat)

; 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.__caryll_vectorinterface_VQ = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otfcc_HandlePackage = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.glyf_GlyphStat = type { double, double, double, double, i16, i16, i16, i16, i16 }
%struct.glyf_ComponentReference = type { %struct.VQ, %struct.VQ, i8, i8, %struct.otfcc_Handle, double, double, double, double, i32, i16, i16 }
%struct.VQ = type { double, %struct.vq_SegList }
%struct.vq_SegList = type { i64, i64, ptr }
%struct.otfcc_Handle = type { i32, i16, ptr }
%struct._caryll_font = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.table_glyf = type { i64, i64, ptr }
%struct.glyf_Glyph = type { ptr, %struct.VQ, %struct.VQ, %struct.VQ, %struct.VQ, %struct.glyf_ContourList, %struct.glyf_ReferenceList, %struct.glyf_StemDefList, %struct.glyf_StemDefList, %struct.glyf_MaskList, %struct.glyf_MaskList, i16, ptr, i8, %struct.otfcc_Handle, i16, %struct.glyf_GlyphStat }
%struct.glyf_ContourList = type { i64, i64, ptr }
%struct.glyf_ReferenceList = type { i64, i64, ptr }
%struct.glyf_StemDefList = type { i64, i64, ptr }
%struct.glyf_MaskList = type { i64, i64, ptr }
%struct.table_head = type { i32, i32, i32, i32, i16, i16, i64, i64, i16, i16, i16, i16, i16, i16, i16, i16, i16 }

@iVQ = external constant %struct.__caryll_vectorinterface_VQ, align 8
@otfcc_iHandle = external constant %struct.otfcc_HandlePackage, align 8

; Function Attrs: nounwind uwtable
declare dso_local void @stat_single_glyph(ptr dead_on_unwind noalias writable sret(%struct.glyf_GlyphStat) align 8, ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef) #0

; 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: nounwind uwtable
define dso_local void @statGlyf(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i16, align 2
  %11 = alloca %struct.glyf_ComponentReference, align 8
  %12 = alloca %struct.otfcc_Handle, align 8
  %13 = alloca %struct.VQ, align 8
  %14 = alloca %struct.VQ, align 8
  %15 = alloca %struct.glyf_GlyphStat, align 8
  %16 = alloca %struct.glyf_GlyphStat, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct._caryll_font, ptr %17, i32 0, i32 13
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = getelementptr inbounds %struct.table_glyf, ptr %19, i32 0, i32 0
  %21 = load i64, ptr %20, align 8, !tbaa !12
  %22 = mul i64 4, %21
  %23 = call ptr @__caryll_allocate_clean(i64 noundef %22, i64 noundef 99)
  store ptr %23, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store double 0x41EFFFFFFFE00000, ptr %6, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store double 1.000000e+00, ptr %7, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store double 0x41EFFFFFFFE00000, ptr %8, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store double 1.000000e+00, ptr %9, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 2, ptr %10) #5
  store i16 0, ptr %10, align 2, !tbaa !17
  br label %24

24:                                               ; preds = %99, %2
  %25 = load i16, ptr %10, align 2, !tbaa !17
  %26 = zext i16 %25 to i64
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._caryll_font, ptr %27, i32 0, i32 13
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = getelementptr inbounds %struct.table_glyf, ptr %29, i32 0, i32 0
  %31 = load i64, ptr %30, align 8, !tbaa !12
  %32 = icmp ult i64 %26, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 2, ptr %10) #5
  br label %102

34:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 128, ptr %11) #5
  %35 = getelementptr inbounds %struct.glyf_ComponentReference, ptr %11, i32 0, i32 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  %36 = load ptr, ptr getelementptr inbounds (%struct.otfcc_HandlePackage, ptr @otfcc_iHandle, i32 0, i32 8), align 8, !tbaa !19
  %37 = load i16, ptr %10, align 2, !tbaa !17
  %38 = call { i64, ptr } %36(i16 noundef zeroext %37)
  %39 = getelementptr inbounds { i64, ptr }, ptr %12, i32 0, i32 0
  %40 = extractvalue { i64, ptr } %38, 0
  store i64 %40, ptr %39, align 8
  %41 = getelementptr inbounds { i64, ptr }, ptr %12, i32 0, i32 1
  %42 = extractvalue { i64, ptr } %38, 1
  store ptr %42, ptr %41, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %12, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  %43 = getelementptr inbounds %struct.glyf_ComponentReference, ptr %11, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  %44 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_VQ, ptr @iVQ, i32 0, i32 23), align 8, !tbaa !23
  call void %44(ptr dead_on_unwind writable sret(%struct.VQ) align 8 %13, double noundef 0.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %43, ptr align 8 %13, i64 32, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  %45 = getelementptr inbounds %struct.glyf_ComponentReference, ptr %11, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  %46 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_VQ, ptr @iVQ, i32 0, i32 23), align 8, !tbaa !23
  call void %46(ptr dead_on_unwind writable sret(%struct.VQ) align 8 %14, double noundef 0.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %45, ptr align 8 %14, i64 32, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  %47 = getelementptr inbounds %struct.glyf_ComponentReference, ptr %11, i32 0, i32 5
  store double 1.000000e+00, ptr %47, align 8, !tbaa !27
  %48 = getelementptr inbounds %struct.glyf_ComponentReference, ptr %11, i32 0, i32 6
  store double 0.000000e+00, ptr %48, align 8, !tbaa !32
  %49 = getelementptr inbounds %struct.glyf_ComponentReference, ptr %11, i32 0, i32 7
  store double 0.000000e+00, ptr %49, align 8, !tbaa !33
  %50 = getelementptr inbounds %struct.glyf_ComponentReference, ptr %11, i32 0, i32 8
  store double 1.000000e+00, ptr %50, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #5
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct._caryll_font, ptr %51, i32 0, i32 13
  %53 = load ptr, ptr %52, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.table_glyf, ptr %53, i32 0, i32 2
  %55 = load ptr, ptr %54, align 8, !tbaa !35
  %56 = load i16, ptr %10, align 2, !tbaa !17
  %57 = zext i16 %56 to i64
  %58 = getelementptr inbounds ptr, ptr %55, i64 %57
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.glyf_Glyph, ptr %59, i32 0, i32 16
  call void @llvm.lifetime.start.p0(i64 48, ptr %16) #5
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct._caryll_font, ptr %61, i32 0, i32 13
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = load i16, ptr %10, align 2, !tbaa !17
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  call void @stat_single_glyph(ptr dead_on_unwind writable sret(%struct.glyf_GlyphStat) align 8 %16, ptr noundef %63, ptr noundef %11, ptr noundef %64, i8 noundef zeroext 0, i16 noundef zeroext %65, ptr noundef %66)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %60, ptr align 8 %16, i64 48, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.end.p0(i64 48, ptr %16) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %60, i64 48, i1 false), !tbaa.struct !36
  %67 = getelementptr inbounds %struct.glyf_GlyphStat, ptr %15, i32 0, i32 0
  %68 = load double, ptr %67, align 8, !tbaa !37
  %69 = load double, ptr %6, align 8, !tbaa !15
  %70 = fcmp olt double %68, %69
  br i1 %70, label %71, label %74

71:                                               ; preds = %34
  %72 = getelementptr inbounds %struct.glyf_GlyphStat, ptr %15, i32 0, i32 0
  %73 = load double, ptr %72, align 8, !tbaa !37
  store double %73, ptr %6, align 8, !tbaa !15
  br label %74

74:                                               ; preds = %71, %34
  %75 = getelementptr inbounds %struct.glyf_GlyphStat, ptr %15, i32 0, i32 1
  %76 = load double, ptr %75, align 8, !tbaa !39
  %77 = load double, ptr %7, align 8, !tbaa !15
  %78 = fcmp ogt double %76, %77
  br i1 %78, label %79, label %82

79:                                               ; preds = %74
  %80 = getelementptr inbounds %struct.glyf_GlyphStat, ptr %15, i32 0, i32 1
  %81 = load double, ptr %80, align 8, !tbaa !39
  store double %81, ptr %7, align 8, !tbaa !15
  br label %82

82:                                               ; preds = %79, %74
  %83 = getelementptr inbounds %struct.glyf_GlyphStat, ptr %15, i32 0, i32 2
  %84 = load double, ptr %83, align 8, !tbaa !40
  %85 = load double, ptr %8, align 8, !tbaa !15
  %86 = fcmp olt double %84, %85
  br i1 %86, label %87, label %90

87:                                               ; preds = %82
  %88 = getelementptr inbounds %struct.glyf_GlyphStat, ptr %15, i32 0, i32 2
  %89 = load double, ptr %88, align 8, !tbaa !40
  store double %89, ptr %8, align 8, !tbaa !15
  br label %90

90:                                               ; preds = %87, %82
  %91 = getelementptr inbounds %struct.glyf_GlyphStat, ptr %15, i32 0, i32 3
  %92 = load double, ptr %91, align 8, !tbaa !41
  %93 = load double, ptr %9, align 8, !tbaa !15
  %94 = fcmp ogt double %92, %93
  br i1 %94, label %95, label %98

95:                                               ; preds = %90
  %96 = getelementptr inbounds %struct.glyf_GlyphStat, ptr %15, i32 0, i32 3
  %97 = load double, ptr %96, align 8, !tbaa !41
  store double %97, ptr %9, align 8, !tbaa !15
  br label %98

98:                                               ; preds = %95, %90
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %11) #5
  br label %99

99:                                               ; preds = %98
  %100 = load i16, ptr %10, align 2, !tbaa !17
  %101 = add i16 %100, 1
  store i16 %101, ptr %10, align 2, !tbaa !17
  br label %24, !llvm.loop !42

102:                                              ; preds = %33
  %103 = load double, ptr %6, align 8, !tbaa !15
  %104 = fptosi double %103 to i16
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._caryll_font, ptr %105, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !44
  %108 = getelementptr inbounds %struct.table_head, ptr %107, i32 0, i32 8
  store i16 %104, ptr %108, align 8, !tbaa !45
  %109 = load double, ptr %7, align 8, !tbaa !15
  %110 = fptosi double %109 to i16
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct._caryll_font, ptr %111, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !44
  %114 = getelementptr inbounds %struct.table_head, ptr %113, i32 0, i32 10
  store i16 %110, ptr %114, align 4, !tbaa !47
  %115 = load double, ptr %8, align 8, !tbaa !15
  %116 = fptosi double %115 to i16
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct._caryll_font, ptr %117, i32 0, i32 2
  %119 = load ptr, ptr %118, align 8, !tbaa !44
  %120 = getelementptr inbounds %struct.table_head, ptr %119, i32 0, i32 9
  store i16 %116, ptr %120, align 2, !tbaa !48
  %121 = load double, ptr %9, align 8, !tbaa !15
  %122 = fptosi double %121 to i16
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct._caryll_font, ptr %123, i32 0, i32 2
  %125 = load ptr, ptr %124, align 8, !tbaa !44
  %126 = getelementptr inbounds %struct.table_head, ptr %125, i32 0, i32 11
  store i16 %122, ptr %126, align 2, !tbaa !49
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %127) #5
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @__caryll_allocate_clean(i64 noundef, i64 noundef) #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: nounwind
declare void @free(ptr noundef) #4

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" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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/C++ TBAA"}
!9 = !{!10, !6, i64 104}
!10 = !{!"_caryll_font", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"", !14, i64 0, !14, i64 8, !6, i64 16}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"short", !7, i64 0}
!19 = !{!20, !6, i64 64}
!20 = !{!"otfcc_HandlePackage", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!21 = !{i64 0, i64 4, !22, i64 4, i64 2, !17, i64 8, i64 8, !5}
!22 = !{!11, !11, i64 0}
!23 = !{!24, !6, i64 184}
!24 = !{!"__caryll_vectorinterface_VQ", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216}
!25 = !{i64 0, i64 8, !15, i64 8, i64 8, !26, i64 16, i64 8, !26, i64 24, i64 8, !5}
!26 = !{!14, !14, i64 0}
!27 = !{!28, !16, i64 88}
!28 = !{!"", !29, i64 0, !29, i64 32, !30, i64 64, !30, i64 65, !31, i64 72, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !11, i64 120, !18, i64 124, !18, i64 126}
!29 = !{!"", !16, i64 0, !13, i64 8}
!30 = !{!"_Bool", !7, i64 0}
!31 = !{!"otfcc_Handle", !11, i64 0, !18, i64 4, !6, i64 8}
!32 = !{!28, !16, i64 96}
!33 = !{!28, !16, i64 104}
!34 = !{!28, !16, i64 112}
!35 = !{!13, !6, i64 16}
!36 = !{i64 0, i64 8, !15, i64 8, i64 8, !15, i64 16, i64 8, !15, i64 24, i64 8, !15, i64 32, i64 2, !17, i64 34, i64 2, !17, i64 36, i64 2, !17, i64 38, i64 2, !17, i64 40, i64 2, !17}
!37 = !{!38, !16, i64 0}
!38 = !{!"", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !18, i64 32, !18, i64 34, !18, i64 36, !18, i64 38, !18, i64 40}
!39 = !{!38, !16, i64 8}
!40 = !{!38, !16, i64 16}
!41 = !{!38, !16, i64 24}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}
!44 = !{!10, !6, i64 16}
!45 = !{!46, !18, i64 40}
!46 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !18, i64 16, !18, i64 18, !14, i64 24, !14, i64 32, !18, i64 40, !18, i64 42, !18, i64 44, !18, i64 46, !18, i64 48, !18, i64 50, !18, i64 52, !18, i64 54, !18, i64 56}
!47 = !{!46, !18, i64 44}
!48 = !{!46, !18, i64 42}
!49 = !{!46, !18, i64 46}


; 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.__caryll_vectorinterface_VQ = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otfcc_HandlePackage = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.glyf_GlyphStat = type { double, double, double, double, i16, i16, i16, i16, i16 }
%struct.glyf_ComponentReference = type { %struct.VQ, %struct.VQ, i8, i8, %struct.otfcc_Handle, double, double, double, double, i32, i16, i16 }
%struct.VQ = type { double, %struct.vq_SegList }
%struct.vq_SegList = type { i64, i64, ptr }
%struct.otfcc_Handle = type { i32, i16, ptr }

@iVQ = external local_unnamed_addr constant %struct.__caryll_vectorinterface_VQ, align 8
@otfcc_iHandle = external local_unnamed_addr constant %struct.otfcc_HandlePackage, align 8

; Function Attrs: nounwind uwtable
declare dso_local void @stat_single_glyph(ptr dead_on_unwind noalias writable sret(%struct.glyf_GlyphStat) align 8, ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local void @statGlyf(ptr nocapture noundef readonly %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.glyf_ComponentReference, align 8
  %4 = alloca %struct.VQ, align 8
  %5 = alloca %struct.VQ, align 8
  %6 = alloca %struct.glyf_GlyphStat, align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 104
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = load i64, ptr %8, align 8, !tbaa !11
  %10 = shl i64 %9, 2
  %11 = tail call ptr @__caryll_allocate_clean(i64 noundef %10, i64 noundef 99)
  %12 = load ptr, ptr %7, align 8, !tbaa !5
  %13 = load i64, ptr %12, align 8, !tbaa !11
  %.not = icmp eq i64 %13, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %14 = getelementptr inbounds i8, ptr %3, i64 72
  %15 = load ptr, ptr getelementptr inbounds (i8, ptr @otfcc_iHandle, i64 64), align 8, !tbaa !14
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 80
  %16 = load ptr, ptr getelementptr inbounds (i8, ptr @iVQ, i64 184), align 8
  %17 = getelementptr inbounds i8, ptr %3, i64 32
  %18 = getelementptr inbounds i8, ptr %3, i64 88
  %19 = getelementptr inbounds i8, ptr %3, i64 96
  %20 = getelementptr inbounds i8, ptr %3, i64 112
  br label %26

._crit_edge.loopexit:                             ; preds = %26
  %21 = fptosi <4 x double> %43 to <4 x i16>
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %2
  %22 = phi <4 x i16> [ <i16 poison, i16 poison, i16 1, i16 1>, %2 ], [ %21, %._crit_edge.loopexit ]
  %23 = getelementptr inbounds i8, ptr %0, i64 16
  %24 = load ptr, ptr %23, align 8, !tbaa !16
  %25 = getelementptr inbounds i8, ptr %24, i64 40
  store <4 x i16> %22, ptr %25, align 8, !tbaa !17
  call void @free(ptr noundef %11) #6
  ret void

26:                                               ; preds = %.lr.ph, %26
  %27 = phi i64 [ 0, %.lr.ph ], [ %45, %26 ]
  %.03436 = phi i16 [ 0, %.lr.ph ], [ %44, %26 ]
  %28 = phi <4 x double> [ <double 0x41EFFFFFFFE00000, double 0x41EFFFFFFFE00000, double 1.000000e+00, double 1.000000e+00>, %.lr.ph ], [ %43, %26 ]
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %3) #6
  %29 = call { i64, ptr } %15(i16 noundef zeroext %.03436) #6
  %30 = extractvalue { i64, ptr } %29, 0
  %31 = extractvalue { i64, ptr } %29, 1
  store i64 %30, ptr %14, align 8
  store ptr %31, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void %16(ptr dead_on_unwind nonnull writable sret(%struct.VQ) align 8 %4, double noundef 0.000000e+00) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %4, i64 32, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void %16(ptr dead_on_unwind nonnull writable sret(%struct.VQ) align 8 %5, double noundef 0.000000e+00) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %5, i64 32, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  store double 1.000000e+00, ptr %18, align 8, !tbaa !24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 0, i64 16, i1 false)
  store double 1.000000e+00, ptr %20, align 8, !tbaa !29
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %34 = load ptr, ptr %33, align 8, !tbaa !30
  %35 = getelementptr inbounds ptr, ptr %34, i64 %27
  %36 = load ptr, ptr %35, align 8, !tbaa !19
  %37 = getelementptr inbounds i8, ptr %36, i64 328
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #6
  call void @stat_single_glyph(ptr dead_on_unwind nonnull writable sret(%struct.glyf_GlyphStat) align 8 %6, ptr noundef %32, ptr noundef nonnull %3, ptr noundef %11, i8 noundef zeroext 0, i16 noundef zeroext %.03436, ptr noundef %1)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %37, ptr noundef nonnull align 8 dereferenceable(48) %6, i64 48, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #6
  %38 = load <4 x double>, ptr %37, align 8, !tbaa !21
  %39 = shufflevector <4 x double> %38, <4 x double> poison, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
  %40 = fcmp olt <4 x double> %39, %28
  %41 = fcmp ogt <4 x double> %39, %28
  %42 = shufflevector <4 x i1> %40, <4 x i1> %41, <4 x i32> <i32 0, i32 1, i32 6, i32 7>
  %43 = select <4 x i1> %42, <4 x double> %39, <4 x double> %28
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #6
  %44 = add i16 %.03436, 1
  %45 = zext i16 %44 to i64
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = load i64, ptr %46, align 8, !tbaa !11
  %48 = icmp ugt i64 %47, %45
  br i1 %48, label %26, label %._crit_edge.loopexit, !llvm.loop !32
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @__caryll_allocate_clean(i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress 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: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

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

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" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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, !10, i64 104}
!6 = !{!"_caryll_font", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 8, !10, i64 16}
!13 = !{!"long", !8, i64 0}
!14 = !{!15, !10, i64 64}
!15 = !{!"otfcc_HandlePackage", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88}
!16 = !{!6, !10, i64 16}
!17 = !{!18, !18, i64 0}
!18 = !{!"short", !8, i64 0}
!19 = !{!10, !10, i64 0}
!20 = !{i64 0, i64 8, !21, i64 8, i64 8, !23, i64 16, i64 8, !23, i64 24, i64 8, !19}
!21 = !{!22, !22, i64 0}
!22 = !{!"double", !8, i64 0}
!23 = !{!13, !13, i64 0}
!24 = !{!25, !22, i64 88}
!25 = !{!"", !26, i64 0, !26, i64 32, !27, i64 64, !27, i64 65, !28, i64 72, !22, i64 88, !22, i64 96, !22, i64 104, !22, i64 112, !7, i64 120, !18, i64 124, !18, i64 126}
!26 = !{!"", !22, i64 0, !12, i64 8}
!27 = !{!"_Bool", !8, i64 0}
!28 = !{!"otfcc_Handle", !7, i64 0, !18, i64 4, !10, i64 8}
!29 = !{!25, !22, i64 112}
!30 = !{!12, !10, i64 16}
!31 = !{i64 0, i64 8, !21, i64 8, i64 8, !21, i64 16, i64 8, !21, i64 24, i64 8, !21, i64 32, i64 2, !17, i64 34, i64 2, !17, i64 36, i64 2, !17, i64 38, i64 2, !17, i64 40, i64 2, !17}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass