; LLVM IR from facebook/hermes :: external/llvh/lib/Demangle (ItaniumDemangle)

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

%class.OutputStream = type { ptr, i64, i64, i32, i32 }
%class.StringView = type { ptr, ptr }
%"struct.llvh::ItaniumPartialDemangler" = type { ptr, ptr }
%"struct.llvh::itanium_demangle::AbiTagAttr" = type { %"class.llvh::itanium_demangle::Node.base", ptr, %class.StringView }
%"class.llvh::itanium_demangle::Node.base" = type <{ ptr, i8, i8, i8, i8 }>
%"struct.llvh::itanium_demangle::NameWithTemplateArgs" = type { %"class.llvh::itanium_demangle::Node.base", ptr, ptr }
%"struct.llvh::itanium_demangle::NestedName" = type { %"class.llvh::itanium_demangle::Node.base", ptr, ptr }
%"struct.llvh::itanium_demangle::LocalName" = type { %"class.llvh::itanium_demangle::Node.base", ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 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 nounwind uwtable
declare dso_local void @_ZN12OutputStreamC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z22initializeOutputStreamPcPmR12OutputStreamm(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4llvh16itanium_demangle4Node5printER12OutputStream(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreampLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4llvh23ItaniumPartialDemangler10isFunctionEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK4llvh16itanium_demangle4Node7getKindEv(ptr noundef nonnull align 8 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK4llvh23ItaniumPartialDemangler26getFunctionDeclContextNameEPcPm(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1, ptr noundef %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %class.OutputStream, align 8
  %10 = alloca i32, align 4
  %11 = alloca %class.StringView, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %class.StringView, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8
  %15 = call noundef zeroext i1 @_ZNK4llvh23ItaniumPartialDemangler10isFunctionEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
  br i1 %15, label %17, label %16

16:                                               ; preds = %3
  store ptr null, ptr %4, align 8
  br label %85

17:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %18 = getelementptr inbounds %"struct.llvh::ItaniumPartialDemangler", ptr %14, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = call noundef ptr @_ZNK4llvh16itanium_demangle16FunctionEncoding7getNameEv(ptr noundef nonnull align 8 dereferenceable(64) %19)
  store ptr %20, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #4
  call void @_ZN12OutputStreamC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = call noundef zeroext i1 @_Z22initializeOutputStreamPcPmR12OutputStreamm(ptr noundef %21, ptr noundef %22, ptr noundef nonnull align 8 dereferenceable(32) %9, i64 noundef 128)
  br i1 %23, label %24, label %25

24:                                               ; preds = %17
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %84

25:                                               ; preds = %17
  br label %26

26:                                               ; preds = %61, %25
  br label %27

27:                                               ; preds = %42, %33, %26
  br label %28

28:                                               ; preds = %27
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = call noundef zeroext i8 @_ZNK4llvh16itanium_demangle4Node7getKindEv(ptr noundef nonnull align 8 dereferenceable(12) %29)
  %31 = zext i8 %30 to i32
  %32 = icmp eq i32 %31, 8
  br i1 %32, label %33, label %37

33:                                               ; preds = %28
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.llvh::itanium_demangle::AbiTagAttr", ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  store ptr %36, ptr %8, align 8, !tbaa !5
  br label %27, !llvm.loop !17

37:                                               ; preds = %28
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = call noundef zeroext i8 @_ZNK4llvh16itanium_demangle4Node7getKindEv(ptr noundef nonnull align 8 dereferenceable(12) %38)
  %40 = zext i8 %39 to i32
  %41 = icmp eq i32 %40, 32
  br i1 %41, label %42, label %46

42:                                               ; preds = %37
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.llvh::itanium_demangle::NameWithTemplateArgs", ptr %43, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !19
  store ptr %45, ptr %8, align 8, !tbaa !5
  br label %27, !llvm.loop !17

46:                                               ; preds = %37
  br label %47

47:                                               ; preds = %46
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = call noundef zeroext i8 @_ZNK4llvh16itanium_demangle4Node7getKindEv(ptr noundef nonnull align 8 dereferenceable(12) %48)
  %50 = zext i8 %49 to i32
  switch i32 %50, label %74 [
    i32 34, label %51
    i32 23, label %57
    i32 24, label %61
  ]

51:                                               ; preds = %47
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef @.str.2)
  %52 = getelementptr inbounds { ptr, ptr }, ptr %11, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8
  %54 = getelementptr inbounds { ptr, ptr }, ptr %11, i32 0, i32 1
  %55 = load ptr, ptr %54, align 8
  %56 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreampLE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr %53, ptr %55)
  br label %75

57:                                               ; preds = %47
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.llvh::itanium_demangle::NestedName", ptr %58, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !21
  call void @_ZNK4llvh16itanium_demangle4Node5printER12OutputStream(ptr noundef nonnull align 8 dereferenceable(12) %60, ptr noundef nonnull align 8 dereferenceable(32) %9)
  br label %75

61:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %62, ptr %12, align 8, !tbaa !5
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.llvh::itanium_demangle::LocalName", ptr %63, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !23
  call void @_ZNK4llvh16itanium_demangle4Node5printER12OutputStream(ptr noundef nonnull align 8 dereferenceable(12) %65, ptr noundef nonnull align 8 dereferenceable(32) %9)
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef @.str.3)
  %66 = getelementptr inbounds { ptr, ptr }, ptr %13, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8
  %68 = getelementptr inbounds { ptr, ptr }, ptr %13, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8
  %70 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreampLE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr %67, ptr %69)
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.llvh::itanium_demangle::LocalName", ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !25
  store ptr %73, ptr %8, align 8, !tbaa !5
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %26

74:                                               ; preds = %47
  br label %75

75:                                               ; preds = %74, %57, %51
  %76 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreampLEc(ptr noundef nonnull align 8 dereferenceable(32) %9, i8 noundef signext 0)
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %82

79:                                               ; preds = %75
  %80 = call noundef i64 @_ZNK12OutputStream18getCurrentPositionEv(ptr noundef nonnull align 8 dereferenceable(32) %9)
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 %80, ptr %81, align 8, !tbaa !26
  br label %82

82:                                               ; preds = %79, %75
  %83 = call noundef ptr @_ZN12OutputStream9getBufferEv(ptr noundef nonnull align 8 dereferenceable(32) %9)
  store ptr %83, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %84

84:                                               ; preds = %82, %24
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %85

85:                                               ; preds = %84, %16
  %86 = load ptr, ptr %4, align 8
  ret ptr %86
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreampLE10StringView(ptr noundef nonnull align 8 dereferenceable(32), ptr, ptr) #3 align 2

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 = { 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 #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 = { 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 0}
!10 = !{!"_ZTSN4llvh23ItaniumPartialDemanglerE", !6, i64 0, !6, i64 8}
!11 = !{!12, !6, i64 16}
!12 = !{!"_ZTSN4llvh16itanium_demangle10AbiTagAttrE", !13, i64 0, !6, i64 16, !16, i64 24}
!13 = !{!"_ZTSN4llvh16itanium_demangle4NodeE", !14, i64 8, !15, i64 9, !15, i64 10, !15, i64 11}
!14 = !{!"_ZTSN4llvh16itanium_demangle4Node4KindE", !7, i64 0}
!15 = !{!"_ZTSN4llvh16itanium_demangle4Node5CacheE", !7, i64 0}
!16 = !{!"_ZTS10StringView", !6, i64 0, !6, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !6, i64 16}
!20 = !{!"_ZTSN4llvh16itanium_demangle20NameWithTemplateArgsE", !13, i64 0, !6, i64 16, !6, i64 24}
!21 = !{!22, !6, i64 16}
!22 = !{!"_ZTSN4llvh16itanium_demangle10NestedNameE", !13, i64 0, !6, i64 16, !6, i64 24}
!23 = !{!24, !6, i64 16}
!24 = !{!"_ZTSN4llvh16itanium_demangle9LocalNameE", !13, i64 0, !6, i64 16, !6, i64 24}
!25 = !{!24, !6, i64 24}
!26 = !{!27, !27, i64 0}
!27 = !{!"long", !7, i64 0}


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

%class.OutputStream = type { ptr, i64, i64, i32, i32 }
%class.StringView = type { ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; 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 void @_ZN12OutputStreamC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z22initializeOutputStreamPcPmR12OutputStreamm(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4llvh16itanium_demangle4Node5printER12OutputStream(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreampLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4llvh23ItaniumPartialDemangler10isFunctionEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK4llvh16itanium_demangle4Node7getKindEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK4llvh23ItaniumPartialDemangler26getFunctionDeclContextNameEPcPm(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #3 align 2 {
  %4 = alloca %class.OutputStream, align 8
  %5 = alloca %class.StringView, align 8
  %6 = alloca %class.StringView, align 8
  %7 = tail call noundef zeroext i1 @_ZNK4llvh23ItaniumPartialDemangler10isFunctionEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  br i1 %7, label %8, label %42

8:                                                ; preds = %3
  %9 = load ptr, ptr %0, align 8, !tbaa !5
  %10 = tail call noundef ptr @_ZNK4llvh16itanium_demangle16FunctionEncoding7getNameEv(ptr noundef nonnull align 8 dereferenceable(64) %9)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @_ZN12OutputStreamC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  %11 = call noundef zeroext i1 @_Z22initializeOutputStreamPcPmR12OutputStreamm(ptr noundef %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef 128)
  br i1 %11, label %41, label %.preheader

.preheader:                                       ; preds = %8
  %12 = getelementptr inbounds i8, ptr %6, i64 8
  br label %13

13:                                               ; preds = %.backedge26, %.preheader
  %.116 = phi ptr [ %10, %.preheader ], [ %.116.be27, %.backedge26 ]
  %14 = call noundef zeroext i8 @_ZNK4llvh16itanium_demangle4Node7getKindEv(ptr noundef nonnull align 8 dereferenceable(12) %.116)
  %15 = icmp eq i8 %14, 8
  br i1 %15, label %.backedge, label %16

.backedge:                                        ; preds = %16, %13
  %.116.be.in = getelementptr inbounds i8, ptr %.116, i64 16
  br label %.backedge26

.backedge26:                                      ; preds = %.backedge, %29
  %.116.be27.in = phi ptr [ %.116.be.in, %.backedge ], [ %35, %29 ]
  %.116.be27 = load ptr, ptr %.116.be27.in, align 8, !tbaa !10
  br label %13, !llvm.loop !11

16:                                               ; preds = %13
  %17 = call noundef zeroext i8 @_ZNK4llvh16itanium_demangle4Node7getKindEv(ptr noundef nonnull align 8 dereferenceable(12) %.116)
  %18 = icmp eq i8 %17, 32
  br i1 %18, label %.backedge, label %19

19:                                               ; preds = %16
  %20 = call noundef zeroext i8 @_ZNK4llvh16itanium_demangle4Node7getKindEv(ptr noundef nonnull align 8 dereferenceable(12) %.116)
  switch i8 %20, label %.loopexit [
    i8 34, label %21
    i8 23, label %26
    i8 24, label %29
  ]

21:                                               ; preds = %19
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull @.str.2)
  %22 = load ptr, ptr %5, align 8
  %23 = getelementptr inbounds i8, ptr %5, i64 8
  %24 = load ptr, ptr %23, align 8
  %25 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreampLE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr %22, ptr %24)
  br label %.loopexit

26:                                               ; preds = %19
  %27 = getelementptr inbounds i8, ptr %.116, i64 16
  %28 = load ptr, ptr %27, align 8, !tbaa !13
  call void @_ZNK4llvh16itanium_demangle4Node5printER12OutputStream(ptr noundef nonnull align 8 dereferenceable(12) %28, ptr noundef nonnull align 8 dereferenceable(32) %4)
  br label %.loopexit

29:                                               ; preds = %19
  %30 = getelementptr inbounds i8, ptr %.116, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !18
  call void @_ZNK4llvh16itanium_demangle4Node5printER12OutputStream(ptr noundef nonnull align 8 dereferenceable(12) %31, ptr noundef nonnull align 8 dereferenceable(32) %4)
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull @.str.3)
  %32 = load ptr, ptr %6, align 8
  %33 = load ptr, ptr %12, align 8
  %34 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreampLE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr %32, ptr %33)
  %35 = getelementptr inbounds i8, ptr %.116, i64 24
  br label %.backedge26

.loopexit:                                        ; preds = %19, %26, %21
  %36 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreampLEc(ptr noundef nonnull align 8 dereferenceable(32) %4, i8 noundef signext 0)
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %39, label %37

37:                                               ; preds = %.loopexit
  %38 = call noundef i64 @_ZNK12OutputStream18getCurrentPositionEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  store i64 %38, ptr %2, align 8, !tbaa !20
  br label %39

39:                                               ; preds = %37, %.loopexit
  %40 = call noundef ptr @_ZN12OutputStream9getBufferEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  br label %41

41:                                               ; preds = %8, %39
  %.0 = phi ptr [ %40, %39 ], [ null, %8 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  br label %42

42:                                               ; preds = %3, %41
  %.1 = phi ptr [ %.0, %41 ], [ null, %3 ]
  ret ptr %.1
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreampLE10StringView(ptr noundef nonnull align 8 dereferenceable(32), ptr, ptr) local_unnamed_addr #3 align 2

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 = { 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 #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 = { 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, !7, i64 0}
!6 = !{!"_ZTSN4llvh23ItaniumPartialDemanglerE", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!7, !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !7, i64 16}
!14 = !{!"_ZTSN4llvh16itanium_demangle10NestedNameE", !15, i64 0, !7, i64 16, !7, i64 24}
!15 = !{!"_ZTSN4llvh16itanium_demangle4NodeE", !16, i64 8, !17, i64 9, !17, i64 10, !17, i64 11}
!16 = !{!"_ZTSN4llvh16itanium_demangle4Node4KindE", !8, i64 0}
!17 = !{!"_ZTSN4llvh16itanium_demangle4Node5CacheE", !8, i64 0}
!18 = !{!19, !7, i64 16}
!19 = !{!"_ZTSN4llvh16itanium_demangle9LocalNameE", !15, i64 0, !7, i64 16, !7, i64 24}
!20 = !{!21, !21, i64 0}
!21 = !{!"long", !8, i64 0}


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