; LLVM IR from tyoma/agge :: src/agge.text/layout_builder.ll (ZN4agge14layout_builder11commit_lineEv)

; 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.agge::agge_vector" = type { float, float }
%"struct.agge::font_metrics" = type { float, float, float }
%"class.agge::layout_builder" = type { %"struct.agge::layout_builder::state", ptr, ptr, float, ptr, ptr, ptr }
%"struct.agge::layout_builder::state" = type { float, i32 }
%"class.agge::range.8" = type { i64, i64, ptr }
%"struct.agge::text_line" = type { %"class.agge::range.8", %"struct.agge::agge_vector", float, float }
%"struct.agge::glyph_run" = type { %"class.agge::range", %"class.std::shared_ptr", %"struct.agge::agge_vector" }
%"class.agge::range" = type { i64, i64, ptr }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

; 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 nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN4agge4fontELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #1 align 2

declare { <2 x float>, float } @_ZNK4agge4font11get_metricsEv(ptr noundef nonnull align 8 dereferenceable(1172)) #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 nounwind uwtable
declare dso_local <2 x float> @_ZN4agge13create_vectorIfEENS_11agge_vectorIT_EES2_S2_(float noundef, float noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4agge14layout_builder11commit_lineEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #5 align 2 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"struct.agge::agge_vector", align 4
  %6 = alloca i32, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca i64, align 8
  %11 = alloca %"struct.agge::font_metrics", align 4
  %12 = alloca { <2 x float>, float }, align 8
  %13 = alloca %"struct.agge::agge_vector", align 4
  %14 = alloca %"struct.agge::agge_vector", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %16 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 5
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = call noundef i64 @_ZNKSt6vectorIN4agge9glyph_runESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  %19 = sub i64 %18, 1
  store i64 %19, ptr %4, align 8, !tbaa !14
  %20 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 2
  %21 = load ptr, ptr %20, align 8, !tbaa !16
  %22 = getelementptr inbounds %"class.agge::range.8", ptr %21, i32 0, i32 0
  %23 = load i64, ptr %22, align 8, !tbaa !17
  %24 = load i64, ptr %4, align 8, !tbaa !14
  %25 = icmp eq i64 %23, %24
  br i1 %25, label %26, label %39

26:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %27 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 3
  %28 = load float, ptr %27, align 8, !tbaa !19
  %29 = call <2 x float> @_ZN4agge13create_vectorIfEENS_11agge_vectorIT_EES2_S2_(float noundef 0.000000e+00, float noundef %28)
  store <2 x float> %29, ptr %5, align 4
  %30 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 2
  %31 = load ptr, ptr %30, align 8, !tbaa !16
  %32 = getelementptr inbounds %"struct.agge::text_line", ptr %31, i32 0, i32 1
  %33 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN4aggepLIfEERKNS_11agge_vectorIT_EERS3_S5_(ptr noundef nonnull align 4 dereferenceable(8) %32, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  %34 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !16
  %36 = getelementptr inbounds %"struct.agge::text_line", ptr %35, i32 0, i32 2
  store float 0.000000e+00, ptr %36, align 8, !tbaa !20
  %37 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 0
  %38 = getelementptr inbounds %"struct.agge::layout_builder::state", ptr %37, i32 0, i32 0
  store float 0.000000e+00, ptr %38, align 8, !tbaa !23
  store i1 false, ptr %2, align 1
  store i32 1, ptr %6, align 4
  br label %102

39:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store float 0.000000e+00, ptr %7, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store float 0.000000e+00, ptr %8, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store float 0.000000e+00, ptr %9, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %40 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 2
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  %42 = getelementptr inbounds %"class.agge::range.8", ptr %41, i32 0, i32 0
  %43 = load i64, ptr %42, align 8, !tbaa !17
  store i64 %43, ptr %10, align 8, !tbaa !14
  br label %44

44:                                               ; preds = %66, %39
  %45 = load i64, ptr %10, align 8, !tbaa !14
  %46 = load i64, ptr %4, align 8, !tbaa !14
  %47 = icmp ne i64 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %69

49:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #8
  %50 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 5
  %51 = load ptr, ptr %50, align 8, !tbaa !9
  %52 = load i64, ptr %10, align 8, !tbaa !14
  %53 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorIN4agge9glyph_runESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %52) #8
  %54 = getelementptr inbounds %"struct.agge::glyph_run", ptr %53, i32 0, i32 1
  %55 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4agge4fontELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %54) #8
  %56 = call { <2 x float>, float } @_ZNK4agge4font11get_metricsEv(ptr noundef nonnull align 8 dereferenceable(1172) %55)
  store { <2 x float>, float } %56, ptr %12, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 8 %12, i64 12, i1 false)
  %57 = getelementptr inbounds %"struct.agge::font_metrics", ptr %11, i32 0, i32 0
  %58 = load float, ptr %57, align 4, !tbaa !25
  call void @_ZN4agge10update_maxIfEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %7, float noundef %58)
  %59 = getelementptr inbounds %"struct.agge::font_metrics", ptr %11, i32 0, i32 1
  %60 = load float, ptr %59, align 4, !tbaa !27
  %61 = getelementptr inbounds %"struct.agge::font_metrics", ptr %11, i32 0, i32 2
  %62 = load float, ptr %61, align 4, !tbaa !28
  %63 = fadd float %60, %62
  call void @_ZN4agge10update_maxIfEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %9, float noundef %63)
  %64 = getelementptr inbounds %"struct.agge::font_metrics", ptr %11, i32 0, i32 1
  %65 = load float, ptr %64, align 4, !tbaa !27
  call void @_ZN4agge10update_maxIfEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %8, float noundef %65)
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #8
  br label %66

66:                                               ; preds = %49
  %67 = load i64, ptr %10, align 8, !tbaa !14
  %68 = add i64 %67, 1
  store i64 %68, ptr %10, align 8, !tbaa !14
  br label %44, !llvm.loop !29

69:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %70 = load float, ptr %7, align 4, !tbaa !24
  %71 = call <2 x float> @_ZN4agge13create_vectorIfEENS_11agge_vectorIT_EES2_S2_(float noundef 0.000000e+00, float noundef %70)
  store <2 x float> %71, ptr %13, align 4
  %72 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !16
  %74 = getelementptr inbounds %"struct.agge::text_line", ptr %73, i32 0, i32 1
  %75 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN4aggepLIfEERKNS_11agge_vectorIT_EERS3_S5_(ptr noundef nonnull align 4 dereferenceable(8) %74, ptr noundef nonnull align 4 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  %76 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 0
  %77 = getelementptr inbounds %"struct.agge::layout_builder::state", ptr %76, i32 0, i32 0
  %78 = load float, ptr %77, align 8, !tbaa !23
  %79 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 2
  %80 = load ptr, ptr %79, align 8, !tbaa !16
  %81 = getelementptr inbounds %"struct.agge::text_line", ptr %80, i32 0, i32 2
  store float %78, ptr %81, align 8, !tbaa !20
  %82 = load float, ptr %8, align 4, !tbaa !24
  %83 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 2
  %84 = load ptr, ptr %83, align 8, !tbaa !16
  %85 = getelementptr inbounds %"struct.agge::text_line", ptr %84, i32 0, i32 3
  store float %82, ptr %85, align 4, !tbaa !31
  %86 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 6
  %87 = load ptr, ptr %86, align 8, !tbaa !32
  %88 = load i64, ptr %4, align 8, !tbaa !14
  %89 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN4agge12_GLOBAL__N_114duplicate_lastISt6vectorINS_9text_lineESaIS3_EEmEERNT_10value_typeERS6_T0_(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %88)
  %90 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 2
  store ptr %89, ptr %90, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %91 = load float, ptr %9, align 4, !tbaa !24
  %92 = call <2 x float> @_ZN4agge13create_vectorIfEENS_11agge_vectorIT_EES2_S2_(float noundef 0.000000e+00, float noundef %91)
  store <2 x float> %92, ptr %14, align 4
  %93 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 2
  %94 = load ptr, ptr %93, align 8, !tbaa !16
  %95 = getelementptr inbounds %"struct.agge::text_line", ptr %94, i32 0, i32 1
  %96 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN4aggepLIfEERKNS_11agge_vectorIT_EERS3_S5_(ptr noundef nonnull align 4 dereferenceable(8) %95, ptr noundef nonnull align 4 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  %97 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 2
  %98 = load ptr, ptr %97, align 8, !tbaa !16
  %99 = getelementptr inbounds %"struct.agge::text_line", ptr %98, i32 0, i32 2
  store float 0.000000e+00, ptr %99, align 8, !tbaa !20
  %100 = getelementptr inbounds %"class.agge::layout_builder", ptr %15, i32 0, i32 0
  %101 = getelementptr inbounds %"struct.agge::layout_builder::state", ptr %100, i32 0, i32 0
  store float 0.000000e+00, ptr %101, align 8, !tbaa !23
  store i1 true, ptr %2, align 1
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %102

102:                                              ; preds = %69, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  %103 = load i1, ptr %2, align 1
  ret i1 %103
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN4agge9glyph_runESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN4aggepLIfEERKNS_11agge_vectorIT_EERS3_S5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorIN4agge9glyph_runESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4agge10update_maxIfEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4), float noundef) #6

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(40) ptr @_ZN4agge12_GLOBAL__N_114duplicate_lastISt6vectorINS_9text_lineESaIS3_EEmEERNT_10value_typeERS6_T0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="64" "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 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 #7 = { 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 #8 = { 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, !6, i64 40}
!10 = !{!"_ZTSN4agge14layout_builderE", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!11 = !{!"_ZTSN4agge14layout_builder5stateE", !12, i64 0, !13, i64 4}
!12 = !{!"float", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!10, !6, i64 16}
!17 = !{!18, !15, i64 0}
!18 = !{!"_ZTSN4agge5rangeIKSt6vectorINS_9glyph_runESaIS2_EEEE", !15, i64 0, !15, i64 8, !6, i64 16}
!19 = !{!10, !12, i64 24}
!20 = !{!21, !12, i64 32}
!21 = !{!"_ZTSN4agge9text_lineE", !18, i64 0, !22, i64 24, !12, i64 32, !12, i64 36}
!22 = !{!"_ZTSN4agge11agge_vectorIfEE", !12, i64 0, !12, i64 4}
!23 = !{!10, !12, i64 0}
!24 = !{!12, !12, i64 0}
!25 = !{!26, !12, i64 0}
!26 = !{!"_ZTSN4agge12font_metricsE", !12, i64 0, !12, i64 4, !12, i64 8}
!27 = !{!26, !12, i64 4}
!28 = !{!26, !12, i64 8}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!21, !12, i64 36}
!32 = !{!10, !6, i64 48}


; 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.agge::agge_vector" = type { float, float }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN4agge4fontELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1 align 2

declare { <2 x float>, float } @_ZNK4agge4font11get_metricsEv(ptr noundef nonnull align 8 dereferenceable(1172)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local <2 x float> @_ZN4agge13create_vectorIfEENS_11agge_vectorIT_EES2_S2_(float noundef, float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4agge14layout_builder11commit_lineEv(ptr nocapture noundef nonnull align 8 dereferenceable(56) %0) local_unnamed_addr #4 align 2 {
  %2 = alloca %"struct.agge::agge_vector", align 8
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca %"struct.agge::agge_vector", align 8
  %7 = alloca %"struct.agge::agge_vector", align 8
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = tail call noundef i64 @_ZNKSt6vectorIN4agge9glyph_runESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %11 = add i64 %10, -1
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  %14 = load i64, ptr %13, align 8, !tbaa !14
  %15 = icmp ne i64 %14, %11
  br i1 %15, label %25, label %16

16:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  %18 = load float, ptr %17, align 8, !tbaa !17
  %19 = tail call <2 x float> @_ZN4agge13create_vectorIfEENS_11agge_vectorIT_EES2_S2_(float noundef 0.000000e+00, float noundef %18)
  store <2 x float> %19, ptr %2, align 8
  %20 = load ptr, ptr %12, align 8, !tbaa !13
  %21 = getelementptr inbounds i8, ptr %20, i64 24
  %22 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN4aggepLIfEERKNS_11agge_vectorIT_EERS3_S5_(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(8) %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %23 = load ptr, ptr %12, align 8, !tbaa !13
  %24 = getelementptr inbounds i8, ptr %23, i64 32
  store float 0.000000e+00, ptr %24, align 8, !tbaa !18
  store float 0.000000e+00, ptr %0, align 8, !tbaa !21
  br label %55

25:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store float 0.000000e+00, ptr %3, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store float 0.000000e+00, ptr %4, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store float 0.000000e+00, ptr %5, align 4, !tbaa !22
  br label %47

26:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %27 = load float, ptr %3, align 4, !tbaa !22
  %28 = call <2 x float> @_ZN4agge13create_vectorIfEENS_11agge_vectorIT_EES2_S2_(float noundef 0.000000e+00, float noundef %27)
  store <2 x float> %28, ptr %6, align 8
  %29 = load ptr, ptr %12, align 8, !tbaa !13
  %30 = getelementptr inbounds i8, ptr %29, i64 24
  %31 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN4aggepLIfEERKNS_11agge_vectorIT_EERS3_S5_(ptr noundef nonnull align 4 dereferenceable(8) %30, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %32 = load float, ptr %0, align 8, !tbaa !21
  %33 = load ptr, ptr %12, align 8, !tbaa !13
  %34 = getelementptr inbounds i8, ptr %33, i64 32
  store float %32, ptr %34, align 8, !tbaa !18
  %35 = load float, ptr %4, align 4, !tbaa !22
  %36 = getelementptr inbounds i8, ptr %33, i64 36
  store float %35, ptr %36, align 4, !tbaa !23
  %37 = getelementptr inbounds i8, ptr %0, i64 48
  %38 = load ptr, ptr %37, align 8, !tbaa !24
  %39 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN4agge12_GLOBAL__N_114duplicate_lastISt6vectorINS_9text_lineESaIS3_EEmEERNT_10value_typeERS6_T0_(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %11)
  store ptr %39, ptr %12, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %40 = load float, ptr %5, align 4, !tbaa !22
  %41 = call <2 x float> @_ZN4agge13create_vectorIfEENS_11agge_vectorIT_EES2_S2_(float noundef 0.000000e+00, float noundef %40)
  store <2 x float> %41, ptr %7, align 8
  %42 = load ptr, ptr %12, align 8, !tbaa !13
  %43 = getelementptr inbounds i8, ptr %42, i64 24
  %44 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN4aggepLIfEERKNS_11agge_vectorIT_EERS3_S5_(ptr noundef nonnull align 4 dereferenceable(8) %43, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %45 = load ptr, ptr %12, align 8, !tbaa !13
  %46 = getelementptr inbounds i8, ptr %45, i64 32
  store float 0.000000e+00, ptr %46, align 8, !tbaa !18
  store float 0.000000e+00, ptr %0, align 8, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %55

47:                                               ; preds = %25, %47
  %.01012 = phi i64 [ %14, %25 ], [ %54, %47 ]
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorIN4agge9glyph_runESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %.01012) #7
  %50 = getelementptr inbounds i8, ptr %49, i64 24
  %51 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4agge4fontELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %50) #7
  %52 = call { <2 x float>, float } @_ZNK4agge4font11get_metricsEv(ptr noundef nonnull align 8 dereferenceable(1172) %51)
  %.fca.0.extract = extractvalue { <2 x float>, float } %52, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %52, 1
  %.sroa.01.0.vec.extract = extractelement <2 x float> %.fca.0.extract, i64 0
  call void @_ZN4agge10update_maxIfEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %3, float noundef %.sroa.01.0.vec.extract)
  %.sroa.01.4.vec.extract = extractelement <2 x float> %.fca.0.extract, i64 1
  %53 = fadd float %.fca.1.extract, %.sroa.01.4.vec.extract
  call void @_ZN4agge10update_maxIfEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %5, float noundef %53)
  call void @_ZN4agge10update_maxIfEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %4, float noundef %.sroa.01.4.vec.extract)
  %54 = add i64 %.01012, 1
  %.not = icmp eq i64 %54, %11
  br i1 %.not, label %26, label %47, !llvm.loop !25

55:                                               ; preds = %26, %16
  ret i1 %15
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN4agge9glyph_runESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN4aggepLIfEERKNS_11agge_vectorIT_EERS3_S5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorIN4agge9glyph_runESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4agge10update_maxIfEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4), float noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(40) ptr @_ZN4agge12_GLOBAL__N_114duplicate_lastISt6vectorINS_9text_lineESaIS3_EEmEERNT_10value_typeERS6_T0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="64" "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"="64" "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 = { 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 #7 = { 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, !12, i64 40}
!6 = !{!"_ZTSN4agge14layout_builderE", !7, i64 0, !12, i64 8, !12, i64 16, !8, i64 24, !12, i64 32, !12, i64 40, !12, i64 48}
!7 = !{!"_ZTSN4agge14layout_builder5stateE", !8, i64 0, !11, i64 4}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!6, !12, i64 16}
!14 = !{!15, !16, i64 0}
!15 = !{!"_ZTSN4agge5rangeIKSt6vectorINS_9glyph_runESaIS2_EEEE", !16, i64 0, !16, i64 8, !12, i64 16}
!16 = !{!"long", !9, i64 0}
!17 = !{!6, !8, i64 24}
!18 = !{!19, !8, i64 32}
!19 = !{!"_ZTSN4agge9text_lineE", !15, i64 0, !20, i64 24, !8, i64 32, !8, i64 36}
!20 = !{!"_ZTSN4agge11agge_vectorIfEE", !8, i64 0, !8, i64 4}
!21 = !{!6, !8, i64 0}
!22 = !{!8, !8, i64 0}
!23 = !{!19, !8, i64 36}
!24 = !{!6, !12, i64 48}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass