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

; 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.llvh::itanium_demangle::Db" = type { ptr, ptr, %"class.llvh::itanium_demangle::PODSmallVector", %"class.llvh::itanium_demangle::PODSmallVector", %"class.llvh::itanium_demangle::PODSmallVector.0", %"class.llvh::itanium_demangle::PODSmallVector.1", ptr, ptr, i8, i8, i8, [13 x i8], %"class.(anonymous namespace)::DefaultAllocator" }
%"class.llvh::itanium_demangle::PODSmallVector" = type { ptr, ptr, ptr, [32 x ptr] }
%"class.llvh::itanium_demangle::PODSmallVector.0" = type { ptr, ptr, ptr, [8 x ptr] }
%"class.llvh::itanium_demangle::PODSmallVector.1" = type { ptr, ptr, ptr, [4 x ptr] }
%"class.(anonymous namespace)::DefaultAllocator" = type { %"class.(anonymous namespace)::BumpPointerAllocator" }
%"class.(anonymous namespace)::BumpPointerAllocator" = type { [4096 x i8], ptr, [8 x i8] }
%class.OutputStream = type { ptr, i64, i64, i32, i32 }

@.str = external hidden unnamed_addr constant [35 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [96 x i8], align 1
@__PRETTY_FUNCTION__._ZN4llvh15itaniumDemangleEPKcPcPmPi = external hidden unnamed_addr constant [67 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 noundef ptr @_ZN4llvh15itaniumDemangleEPKcPcPmPi(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #1 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.llvh::itanium_demangle::Db", align 16
  %12 = alloca %class.OutputStream, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %24, label %18

18:                                               ; preds = %4
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %30

21:                                               ; preds = %18
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %30

24:                                               ; preds = %21, %4
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %29

27:                                               ; preds = %24
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 -3, ptr %28, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %27, %24
  store ptr null, ptr %5, align 8
  br label %87

30:                                               ; preds = %21, %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4864, ptr %11) #7
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = call i64 @strlen(ptr noundef %33) #8
  %35 = getelementptr inbounds i8, ptr %32, i64 %34
  call void @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEEC2EPKcS6_(ptr noundef nonnull align 16 dereferenceable(4864) %11, ptr noundef %31, ptr noundef %35)
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #7
  call void @_ZN12OutputStreamC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %36 = invoke noundef ptr @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEE5parseEv(ptr noundef nonnull align 16 dereferenceable(4864) %11)
          to label %37 unwind label %41

37:                                               ; preds = %30
  store ptr %36, ptr %13, align 8, !tbaa !5
  %38 = load ptr, ptr %13, align 8, !tbaa !5
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %45

40:                                               ; preds = %37
  store i32 -2, ptr %10, align 4, !tbaa !9
  br label %73

41:                                               ; preds = %69, %65, %60, %58, %51, %45, %30
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %14, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEED2Ev(ptr noundef nonnull align 16 dereferenceable(4864) %11) #7
  call void @llvm.lifetime.end.p0(i64 4864, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %89

45:                                               ; preds = %37
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = invoke noundef zeroext i1 @_Z22initializeOutputStreamPcPmR12OutputStreamm(ptr noundef %46, ptr noundef %47, ptr noundef nonnull align 8 dereferenceable(32) %12, i64 noundef 1024)
          to label %49 unwind label %41

49:                                               ; preds = %45
  br i1 %48, label %50, label %51

50:                                               ; preds = %49
  store i32 -1, ptr %10, align 4, !tbaa !9
  br label %72

51:                                               ; preds = %49
  %52 = getelementptr inbounds %"struct.llvh::itanium_demangle::Db", ptr %11, i32 0, i32 5
  %53 = invoke noundef zeroext i1 @_ZNK4llvh16itanium_demangle14PODSmallVectorIPNS0_24ForwardTemplateReferenceELm4EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(56) %52)
          to label %54 unwind label %41

54:                                               ; preds = %51
  br i1 %53, label %55, label %56

55:                                               ; preds = %54
  br label %58

56:                                               ; preds = %54
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 340, ptr noundef @__PRETTY_FUNCTION__._ZN4llvh15itaniumDemangleEPKcPcPmPi) #9
  unreachable

57:                                               ; No predecessors!
  br label %58

58:                                               ; preds = %57, %55
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNK4llvh16itanium_demangle4Node5printER12OutputStream(ptr noundef nonnull align 8 dereferenceable(12) %59, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %60 unwind label %41

60:                                               ; preds = %58
  %61 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreampLEc(ptr noundef nonnull align 8 dereferenceable(32) %12, i8 noundef signext 0)
          to label %62 unwind label %41

62:                                               ; preds = %60
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %69

65:                                               ; preds = %62
  %66 = invoke noundef i64 @_ZNK12OutputStream18getCurrentPositionEv(ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %67 unwind label %41

67:                                               ; preds = %65
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  store i64 %66, ptr %68, align 8, !tbaa !11
  br label %69

69:                                               ; preds = %67, %62
  %70 = invoke noundef ptr @_ZN12OutputStream9getBufferEv(ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %71 unwind label %41

71:                                               ; preds = %69
  store ptr %70, ptr %7, align 8, !tbaa !5
  br label %72

72:                                               ; preds = %71, %50
  br label %73

73:                                               ; preds = %72, %40
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %79

76:                                               ; preds = %73
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %77, ptr %78, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %76, %73
  %80 = load i32, ptr %10, align 4, !tbaa !9
  %81 = icmp eq i32 %80, 0
  br i1 %81, label %82, label %84

82:                                               ; preds = %79
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  br label %85

84:                                               ; preds = %79
  br label %85

85:                                               ; preds = %84, %82
  %86 = phi ptr [ %83, %82 ], [ null, %84 ]
  store ptr %86, ptr %5, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEED2Ev(ptr noundef nonnull align 16 dereferenceable(4864) %11) #7
  call void @llvm.lifetime.end.p0(i64 4864, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %87

87:                                               ; preds = %85, %29
  %88 = load ptr, ptr %5, align 8
  ret ptr %88

89:                                               ; preds = %41
  %90 = load ptr, ptr %14, align 8
  %91 = load i32, ptr %15, align 4
  %92 = insertvalue { ptr, i32 } poison, ptr %90, 0
  %93 = insertvalue { ptr, i32 } %92, i32 %91, 1
  resume { ptr, i32 } %93
}

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEEC2EPKcS6_(ptr noundef nonnull align 16 dereferenceable(4864), ptr noundef, ptr noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12OutputStreamC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEE5parseEv(ptr noundef nonnull align 16 dereferenceable(4864)) #1 align 2

declare i32 @__gxx_personality_v0(...)

; 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) #4

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4llvh16itanium_demangle4Node5printER12OutputStream(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(32)) #1 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) #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEED2Ev(ptr noundef nonnull align 16 dereferenceable(4864)) unnamed_addr #6 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 = { nounwind willreturn memory(read) "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 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 #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 = { noreturn 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 #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 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn 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 = !{!"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"

%"struct.llvh::itanium_demangle::Db" = type { ptr, ptr, %"class.llvh::itanium_demangle::PODSmallVector", %"class.llvh::itanium_demangle::PODSmallVector", %"class.llvh::itanium_demangle::PODSmallVector.0", %"class.llvh::itanium_demangle::PODSmallVector.1", ptr, ptr, i8, i8, i8, [13 x i8], %"class.(anonymous namespace)::DefaultAllocator" }
%"class.llvh::itanium_demangle::PODSmallVector" = type { ptr, ptr, ptr, [32 x ptr] }
%"class.llvh::itanium_demangle::PODSmallVector.0" = type { ptr, ptr, ptr, [8 x ptr] }
%"class.llvh::itanium_demangle::PODSmallVector.1" = type { ptr, ptr, ptr, [4 x ptr] }
%"class.(anonymous namespace)::DefaultAllocator" = type { %"class.(anonymous namespace)::BumpPointerAllocator" }
%"class.(anonymous namespace)::BumpPointerAllocator" = type { [4096 x i8], ptr, [8 x i8] }
%class.OutputStream = type { ptr, i64, i64, i32, i32 }

@.str = external hidden unnamed_addr constant [35 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [96 x i8], align 1
@__PRETTY_FUNCTION__._ZN4llvh15itaniumDemangleEPKcPcPmPi = external hidden unnamed_addr constant [67 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 uwtable
define dso_local noundef ptr @_ZN4llvh15itaniumDemangleEPKcPcPmPi(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef writeonly %3) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.llvh::itanium_demangle::Db", align 16
  %6 = alloca %class.OutputStream, align 8
  %7 = icmp eq ptr %0, null
  br i1 %7, label %11, label %8

8:                                                ; preds = %4
  %9 = icmp ne ptr %1, null
  %10 = icmp eq ptr %2, null
  %or.cond = and i1 %9, %10
  br i1 %or.cond, label %11, label %13

11:                                               ; preds = %8, %4
  %.not29 = icmp eq ptr %3, null
  br i1 %.not29, label %40, label %12

12:                                               ; preds = %11
  store i32 -3, ptr %3, align 4, !tbaa !5
  br label %40

13:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 4864, ptr nonnull %5) #7
  %14 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %0) #8
  %15 = getelementptr inbounds i8, ptr %0, i64 %14
  call void @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEEC2EPKcS6_(ptr noundef nonnull align 16 dereferenceable(4864) %5, ptr noundef nonnull %0, ptr noundef nonnull %15)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @_ZN12OutputStreamC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  %16 = invoke noundef ptr @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEE5parseEv(ptr noundef nonnull align 16 dereferenceable(4864) %5)
          to label %17 unwind label %19

17:                                               ; preds = %13
  %18 = icmp eq ptr %16, null
  br i1 %18, label %36, label %21

19:                                               ; preds = %29, %28, %21, %13
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEED2Ev(ptr noundef nonnull align 16 dereferenceable(4864) %5) #7
  call void @llvm.lifetime.end.p0(i64 4864, ptr nonnull %5) #7
  resume { ptr, i32 } %20

21:                                               ; preds = %17
  %22 = invoke noundef zeroext i1 @_Z22initializeOutputStreamPcPmR12OutputStreamm(ptr noundef %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %6, i64 noundef 1024)
          to label %23 unwind label %19

23:                                               ; preds = %21
  br i1 %22, label %36, label %24

24:                                               ; preds = %23
  %25 = getelementptr inbounds i8, ptr %5, i64 664
  %26 = call noundef zeroext i1 @_ZNK4llvh16itanium_demangle14PODSmallVectorIPNS0_24ForwardTemplateReferenceELm4EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(56) %25)
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 340, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4llvh15itaniumDemangleEPKcPcPmPi) #9
  unreachable

28:                                               ; preds = %24
  invoke void @_ZNK4llvh16itanium_demangle4Node5printER12OutputStream(ptr noundef nonnull align 8 dereferenceable(12) %16, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %29 unwind label %19

29:                                               ; preds = %28
  %30 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreampLEc(ptr noundef nonnull align 8 dereferenceable(32) %6, i8 noundef signext 0)
          to label %31 unwind label %19

31:                                               ; preds = %29
  br i1 %10, label %34, label %32

32:                                               ; preds = %31
  %33 = call noundef i64 @_ZNK12OutputStream18getCurrentPositionEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  store i64 %33, ptr %2, align 8, !tbaa !9
  br label %34

34:                                               ; preds = %32, %31
  %35 = call noundef ptr @_ZN12OutputStream9getBufferEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  br label %36

36:                                               ; preds = %23, %17, %34
  %37 = phi ptr [ %35, %34 ], [ null, %17 ], [ null, %23 ]
  %.023 = phi i32 [ 0, %34 ], [ -2, %17 ], [ -1, %23 ]
  %.not28 = icmp eq ptr %3, null
  br i1 %.not28, label %39, label %38

38:                                               ; preds = %36
  store i32 %.023, ptr %3, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %38, %36
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEED2Ev(ptr noundef nonnull align 16 dereferenceable(4864) %5) #7
  call void @llvm.lifetime.end.p0(i64 4864, ptr nonnull %5) #7
  br label %40

40:                                               ; preds = %11, %12, %39
  %.0 = phi ptr [ %37, %39 ], [ null, %12 ], [ null, %11 ]
  ret ptr %.0
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEEC2EPKcS6_(ptr noundef nonnull align 16 dereferenceable(4864), ptr noundef, ptr noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12OutputStreamC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEE5parseEv(ptr noundef nonnull align 16 dereferenceable(4864)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; 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 #4

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; 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 #1 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 #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN4llvh16itanium_demangle2DbIN12_GLOBAL__N_116DefaultAllocatorEED2Ev(ptr noundef nonnull align 16 dereferenceable(4864)) unnamed_addr #6 align 2

attributes #0 = { mustprogress 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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 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 #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 = { noreturn 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 #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 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}


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