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

; 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.StringView = type { ptr, ptr }
%"struct.llvh::ms_demangle::PointerTypeNode" = type { %"struct.llvh::ms_demangle::TypeNode.base", i32, ptr, ptr }
%"struct.llvh::ms_demangle::TypeNode.base" = type { %"struct.llvh::ms_demangle::Node.base", i8 }
%"struct.llvh::ms_demangle::Node.base" = type <{ ptr, i32 }>
%"struct.llvh::ms_demangle::TypeNode" = type { %"struct.llvh::ms_demangle::Node.base", i8, [3 x i8] }
%"struct.llvh::ms_demangle::FunctionSignatureNode" = type { %"struct.llvh::ms_demangle::TypeNode.base", i32, i8, i16, i32, ptr, i8, ptr }

@.str.29 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.126 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.127 = external hidden unnamed_addr constant [103 x i8], align 1
@__PRETTY_FUNCTION__._ZNK4llvh11ms_demangle15PointerTypeNode9outputPreER12OutputStreamNS0_11OutputFlagsE = external hidden unnamed_addr constant [94 x i8], align 1

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

; 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 hidden void @_ZL16outputQualifiersR12OutputStreamN4llvh11ms_demangle10QualifiersEbb(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext) #0

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL23outputCallingConventionR12OutputStreamN4llvh11ms_demangle11CallingConvE(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef zeroext) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4llvh11ms_demangle15PointerTypeNode9outputPreER12OutputStreamNS0_11OutputFlagsE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2) unnamed_addr #0 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %class.StringView, align 8
  %9 = alloca %class.StringView, align 8
  %10 = alloca %class.StringView, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %class.StringView, align 8
  %13 = alloca %class.StringView, align 8
  %14 = alloca %class.StringView, align 8
  %15 = alloca %class.StringView, align 8
  %16 = alloca %class.StringView, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %17 = load ptr, ptr %4, align 8
  %18 = getelementptr inbounds %"struct.llvh::ms_demangle::PointerTypeNode", ptr %17, i32 0, i32 3
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = call noundef i32 @_ZNK4llvh11ms_demangle4Node4kindEv(ptr noundef nonnull align 8 dereferenceable(12) %19)
  %21 = icmp eq i32 %20, 3
  br i1 %21, label %22, label %30

22:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %23 = getelementptr inbounds %"struct.llvh::ms_demangle::PointerTypeNode", ptr %17, i32 0, i32 3
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  store ptr %24, ptr %7, align 8, !tbaa !5
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = load ptr, ptr %25, align 8, !tbaa !18
  %28 = getelementptr inbounds ptr, ptr %27, i64 3
  %29 = load ptr, ptr %28, align 8
  call void %29(ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 8 dereferenceable(32) %26, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %38

30:                                               ; preds = %3
  %31 = getelementptr inbounds %"struct.llvh::ms_demangle::PointerTypeNode", ptr %17, i32 0, i32 3
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = load ptr, ptr %32, align 8, !tbaa !18
  %36 = getelementptr inbounds ptr, ptr %35, i64 3
  %37 = load ptr, ptr %36, align 8
  call void %37(ptr noundef nonnull align 8 dereferenceable(13) %32, ptr noundef nonnull align 8 dereferenceable(32) %33, i32 noundef %34)
  br label %38

38:                                               ; preds = %30, %22
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZL22outputSpaceIfNecessaryR12OutputStream(ptr noundef nonnull align 8 dereferenceable(32) %39)
  %40 = getelementptr inbounds %"struct.llvh::ms_demangle::TypeNode", ptr %17, i32 0, i32 1
  %41 = load i8, ptr %40, align 4, !tbaa !20
  %42 = zext i8 %41 to i32
  %43 = and i32 %42, 16
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %52

45:                                               ; preds = %38
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef @.str.122)
  %47 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8
  %49 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8
  %51 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreamlsE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %46, ptr %48, ptr %50)
  br label %52

52:                                               ; preds = %45, %38
  %53 = getelementptr inbounds %"struct.llvh::ms_demangle::PointerTypeNode", ptr %17, i32 0, i32 3
  %54 = load ptr, ptr %53, align 8, !tbaa !11
  %55 = call noundef i32 @_ZNK4llvh11ms_demangle4Node4kindEv(ptr noundef nonnull align 8 dereferenceable(12) %54)
  %56 = icmp eq i32 %55, 16
  br i1 %56, label %57, label %64

57:                                               ; preds = %52
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef @.str.109)
  %59 = getelementptr inbounds { ptr, ptr }, ptr %9, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8
  %61 = getelementptr inbounds { ptr, ptr }, ptr %9, i32 0, i32 1
  %62 = load ptr, ptr %61, align 8
  %63 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreamlsE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %58, ptr %60, ptr %62)
  br label %89

64:                                               ; preds = %52
  %65 = getelementptr inbounds %"struct.llvh::ms_demangle::PointerTypeNode", ptr %17, i32 0, i32 3
  %66 = load ptr, ptr %65, align 8, !tbaa !11
  %67 = call noundef i32 @_ZNK4llvh11ms_demangle4Node4kindEv(ptr noundef nonnull align 8 dereferenceable(12) %66)
  %68 = icmp eq i32 %67, 3
  br i1 %68, label %69, label %88

69:                                               ; preds = %64
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef @.str.109)
  %71 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8
  %73 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8
  %75 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreamlsE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %70, ptr %72, ptr %74)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %76 = getelementptr inbounds %"struct.llvh::ms_demangle::PointerTypeNode", ptr %17, i32 0, i32 3
  %77 = load ptr, ptr %76, align 8, !tbaa !11
  store ptr %77, ptr %11, align 8, !tbaa !5
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.llvh::ms_demangle::FunctionSignatureNode", ptr %79, i32 0, i32 2
  %81 = load i8, ptr %80, align 4, !tbaa !21
  call void @_ZL23outputCallingConventionR12OutputStreamN4llvh11ms_demangle11CallingConvE(ptr noundef nonnull align 8 dereferenceable(32) %78, i8 noundef zeroext %81)
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef @.str.103)
  %83 = getelementptr inbounds { ptr, ptr }, ptr %12, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8
  %85 = getelementptr inbounds { ptr, ptr }, ptr %12, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8
  %87 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreamlsE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %82, ptr %84, ptr %86)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %88

88:                                               ; preds = %69, %64
  br label %89

89:                                               ; preds = %88, %57
  %90 = getelementptr inbounds %"struct.llvh::ms_demangle::PointerTypeNode", ptr %17, i32 0, i32 2
  %91 = load ptr, ptr %90, align 8, !tbaa !27
  %92 = icmp ne ptr %91, null
  br i1 %92, label %93, label %107

93:                                               ; preds = %89
  %94 = getelementptr inbounds %"struct.llvh::ms_demangle::PointerTypeNode", ptr %17, i32 0, i32 2
  %95 = load ptr, ptr %94, align 8, !tbaa !27
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = load i32, ptr %6, align 4, !tbaa !9
  %98 = load ptr, ptr %95, align 8, !tbaa !18
  %99 = getelementptr inbounds ptr, ptr %98, i64 2
  %100 = load ptr, ptr %99, align 8
  call void %100(ptr noundef nonnull align 8 dereferenceable(24) %95, ptr noundef nonnull align 8 dereferenceable(32) %96, i32 noundef %97)
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef @.str.123)
  %102 = getelementptr inbounds { ptr, ptr }, ptr %13, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8
  %104 = getelementptr inbounds { ptr, ptr }, ptr %13, i32 0, i32 1
  %105 = load ptr, ptr %104, align 8
  %106 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreamlsE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %101, ptr %103, ptr %105)
  br label %107

107:                                              ; preds = %93, %89
  %108 = getelementptr inbounds %"struct.llvh::ms_demangle::PointerTypeNode", ptr %17, i32 0, i32 1
  %109 = load i32, ptr %108, align 8, !tbaa !28
  switch i32 %109, label %131 [
    i32 1, label %110
    i32 2, label %117
    i32 3, label %124
  ]

110:                                              ; preds = %107
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef @.str.124)
  %112 = getelementptr inbounds { ptr, ptr }, ptr %14, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8
  %114 = getelementptr inbounds { ptr, ptr }, ptr %14, i32 0, i32 1
  %115 = load ptr, ptr %114, align 8
  %116 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreamlsE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %111, ptr %113, ptr %115)
  br label %132

117:                                              ; preds = %107
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef @.str.29)
  %119 = getelementptr inbounds { ptr, ptr }, ptr %15, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8
  %121 = getelementptr inbounds { ptr, ptr }, ptr %15, i32 0, i32 1
  %122 = load ptr, ptr %121, align 8
  %123 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreamlsE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %118, ptr %120, ptr %122)
  br label %132

124:                                              ; preds = %107
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef @.str.125)
  %126 = getelementptr inbounds { ptr, ptr }, ptr %16, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8
  %128 = getelementptr inbounds { ptr, ptr }, ptr %16, i32 0, i32 1
  %129 = load ptr, ptr %128, align 8
  %130 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreamlsE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %125, ptr %127, ptr %129)
  br label %132

131:                                              ; preds = %107
  call void @__assert_fail(ptr noundef @.str.126, ptr noundef @.str.127, i32 noundef 484, ptr noundef @__PRETTY_FUNCTION__._ZNK4llvh11ms_demangle15PointerTypeNode9outputPreER12OutputStreamNS0_11OutputFlagsE) #5
  unreachable

132:                                              ; preds = %124, %117, %110
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.llvh::ms_demangle::TypeNode", ptr %17, i32 0, i32 1
  %135 = load i8, ptr %134, align 4, !tbaa !20
  call void @_ZL16outputQualifiersR12OutputStreamN4llvh11ms_demangle10QualifiersEbb(ptr noundef nonnull align 8 dereferenceable(32) %133, i8 noundef zeroext %135, i1 noundef zeroext false, i1 noundef zeroext false)
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL22outputSpaceIfNecessaryR12OutputStream(ptr noundef nonnull align 8 dereferenceable(32)) #0

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

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nounwind }
attributes #5 = { 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 = !{!"_ZTSN4llvh11ms_demangle11OutputFlagsE", !7, i64 0}
!11 = !{!12, !6, i64 32}
!12 = !{!"_ZTSN4llvh11ms_demangle15PointerTypeNodeE", !13, i64 0, !17, i64 16, !6, i64 24, !6, i64 32}
!13 = !{!"_ZTSN4llvh11ms_demangle8TypeNodeE", !14, i64 0, !16, i64 12}
!14 = !{!"_ZTSN4llvh11ms_demangle4NodeE", !15, i64 8}
!15 = !{!"_ZTSN4llvh11ms_demangle8NodeKindE", !7, i64 0}
!16 = !{!"_ZTSN4llvh11ms_demangle10QualifiersE", !7, i64 0}
!17 = !{!"_ZTSN4llvh11ms_demangle15PointerAffinityE", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"vtable pointer", !8, i64 0}
!20 = !{!13, !16, i64 12}
!21 = !{!22, !23, i64 20}
!22 = !{!"_ZTSN4llvh11ms_demangle21FunctionSignatureNodeE", !13, i64 0, !17, i64 16, !23, i64 20, !24, i64 22, !25, i64 24, !6, i64 32, !26, i64 40, !6, i64 48}
!23 = !{!"_ZTSN4llvh11ms_demangle11CallingConvE", !7, i64 0}
!24 = !{!"_ZTSN4llvh11ms_demangle9FuncClassE", !7, i64 0}
!25 = !{!"_ZTSN4llvh11ms_demangle20FunctionRefQualifierE", !7, i64 0}
!26 = !{!"bool", !7, i64 0}
!27 = !{!12, !6, i64 24}
!28 = !{!12, !17, i64 16}


; 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.StringView = type { ptr, ptr }

@.str.29 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.126 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.127 = external hidden unnamed_addr constant [103 x i8], align 1
@__PRETTY_FUNCTION__._ZNK4llvh11ms_demangle15PointerTypeNode9outputPreER12OutputStreamNS0_11OutputFlagsE = external hidden unnamed_addr constant [94 x i8], align 1

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

; 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 hidden void @_ZL16outputQualifiersR12OutputStreamN4llvh11ms_demangle10QualifiersEbb(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL23outputCallingConventionR12OutputStreamN4llvh11ms_demangle11CallingConvE(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef zeroext) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4llvh11ms_demangle15PointerTypeNode9outputPreER12OutputStreamNS0_11OutputFlagsE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2) unnamed_addr #0 align 2 {
  %4 = alloca %class.StringView, align 8
  %5 = alloca %class.StringView, align 8
  %6 = alloca %class.StringView, align 8
  %7 = alloca %class.StringView, align 8
  %8 = alloca %class.StringView, align 8
  %9 = alloca %class.StringView, align 8
  %10 = alloca %class.StringView, align 8
  %11 = alloca %class.StringView, align 8
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = tail call noundef i32 @_ZNK4llvh11ms_demangle4Node4kindEv(ptr noundef nonnull align 8 dereferenceable(12) %13)
  %15 = icmp eq i32 %14, 3
  %16 = load ptr, ptr %12, align 8, !tbaa !5
  %17 = load ptr, ptr %16, align 8, !tbaa !15
  %18 = getelementptr inbounds i8, ptr %17, i64 24
  %19 = load ptr, ptr %18, align 8
  %.sink25.sroa.gep = getelementptr inbounds i8, ptr %11, i64 8
  %.sink25.sroa.gep26 = getelementptr inbounds i8, ptr %10, i64 8
  %.sink25.sroa.gep27 = getelementptr inbounds i8, ptr %9, i64 8
  %.sink21.sroa.gep = getelementptr inbounds i8, ptr %7, i64 8
  %.sink21.sroa.gep28 = getelementptr inbounds i8, ptr %5, i64 8
  br i1 %15, label %20, label %21

20:                                               ; preds = %3
  tail call void %19(ptr noundef nonnull align 8 dereferenceable(56) %16, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 1)
  br label %22

21:                                               ; preds = %3
  tail call void %19(ptr noundef nonnull align 8 dereferenceable(13) %16, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2)
  br label %22

22:                                               ; preds = %21, %20
  tail call void @_ZL22outputSpaceIfNecessaryR12OutputStream(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %23 = getelementptr inbounds i8, ptr %0, i64 12
  %24 = load i8, ptr %23, align 4, !tbaa !17
  %25 = and i8 %24, 16
  %.not = icmp eq i8 %25, 0
  br i1 %.not, label %31, label %26

26:                                               ; preds = %22
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull @.str.122)
  %27 = load ptr, ptr %4, align 8
  %28 = getelementptr inbounds i8, ptr %4, i64 8
  %29 = load ptr, ptr %28, align 8
  %30 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreamlsE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr %27, ptr %29)
  br label %31

31:                                               ; preds = %26, %22
  %32 = load ptr, ptr %12, align 8, !tbaa !5
  %33 = call noundef i32 @_ZNK4llvh11ms_demangle4Node4kindEv(ptr noundef nonnull align 8 dereferenceable(12) %32)
  %34 = icmp eq i32 %33, 16
  br i1 %34, label %35, label %36

35:                                               ; preds = %31
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull @.str.109)
  br label %.sink.split

36:                                               ; preds = %31
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = call noundef i32 @_ZNK4llvh11ms_demangle4Node4kindEv(ptr noundef nonnull align 8 dereferenceable(12) %37)
  %39 = icmp eq i32 %38, 3
  br i1 %39, label %40, label %50

40:                                               ; preds = %36
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull @.str.109)
  %41 = load ptr, ptr %6, align 8
  %42 = getelementptr inbounds i8, ptr %6, i64 8
  %43 = load ptr, ptr %42, align 8
  %44 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreamlsE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr %41, ptr %43)
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %45, i64 20
  %47 = load i8, ptr %46, align 4, !tbaa !18
  call void @_ZL23outputCallingConventionR12OutputStreamN4llvh11ms_demangle11CallingConvE(ptr noundef nonnull align 8 dereferenceable(32) %1, i8 noundef zeroext %47)
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull @.str.103)
  br label %.sink.split

.sink.split:                                      ; preds = %35, %40
  %.sink21.sroa.phi = phi ptr [ %.sink21.sroa.gep, %40 ], [ %.sink21.sroa.gep28, %35 ]
  %.sink21 = phi ptr [ %7, %40 ], [ %5, %35 ]
  %.sink = load ptr, ptr %.sink21, align 8
  %48 = load ptr, ptr %.sink21.sroa.phi, align 8
  %49 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreamlsE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr %.sink, ptr %48)
  br label %50

50:                                               ; preds = %.sink.split, %36
  %51 = getelementptr inbounds i8, ptr %0, i64 24
  %52 = load ptr, ptr %51, align 8, !tbaa !24
  %.not18 = icmp eq ptr %52, null
  br i1 %.not18, label %61, label %53

53:                                               ; preds = %50
  %54 = load ptr, ptr %52, align 8, !tbaa !15
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %56 = load ptr, ptr %55, align 8
  call void %56(ptr noundef nonnull align 8 dereferenceable(24) %52, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2)
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull @.str.123)
  %57 = load ptr, ptr %8, align 8
  %58 = getelementptr inbounds i8, ptr %8, i64 8
  %59 = load ptr, ptr %58, align 8
  %60 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreamlsE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr %57, ptr %59)
  br label %61

61:                                               ; preds = %53, %50
  %62 = getelementptr inbounds i8, ptr %0, i64 16
  %63 = load i32, ptr %62, align 8, !tbaa !25
  switch i32 %63, label %67 [
    i32 1, label %64
    i32 2, label %65
    i32 3, label %66
  ]

64:                                               ; preds = %61
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull @.str.124)
  br label %68

65:                                               ; preds = %61
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull @.str.29)
  br label %68

66:                                               ; preds = %61
  call void @_ZN10StringViewC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull @.str.125)
  br label %68

67:                                               ; preds = %61
  call void @__assert_fail(ptr noundef nonnull @.str.126, ptr noundef nonnull @.str.127, i32 noundef 484, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK4llvh11ms_demangle15PointerTypeNode9outputPreER12OutputStreamNS0_11OutputFlagsE) #3
  unreachable

68:                                               ; preds = %66, %65, %64
  %.sink25.sroa.phi = phi ptr [ %.sink25.sroa.gep, %66 ], [ %.sink25.sroa.gep26, %65 ], [ %.sink25.sroa.gep27, %64 ]
  %.sink25 = phi ptr [ %11, %66 ], [ %10, %65 ], [ %9, %64 ]
  %.sink22 = load ptr, ptr %.sink25, align 8
  %69 = load ptr, ptr %.sink25.sroa.phi, align 8
  %70 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN12OutputStreamlsE10StringView(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr %.sink22, ptr %69)
  %71 = load i8, ptr %23, align 4, !tbaa !17
  call void @_ZL16outputQualifiersR12OutputStreamN4llvh11ms_demangle10QualifiersEbb(ptr noundef nonnull align 8 dereferenceable(32) %1, i8 noundef zeroext %71, i1 noundef zeroext false, i1 noundef zeroext false)
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL22outputSpaceIfNecessaryR12OutputStream(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0

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

attributes #0 = { 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 #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 = { 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 #3 = { 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, !14, i64 32}
!6 = !{!"_ZTSN4llvh11ms_demangle15PointerTypeNodeE", !7, i64 0, !13, i64 16, !14, i64 24, !14, i64 32}
!7 = !{!"_ZTSN4llvh11ms_demangle8TypeNodeE", !8, i64 0, !12, i64 12}
!8 = !{!"_ZTSN4llvh11ms_demangle4NodeE", !9, i64 8}
!9 = !{!"_ZTSN4llvh11ms_demangle8NodeKindE", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSN4llvh11ms_demangle10QualifiersE", !10, i64 0}
!13 = !{!"_ZTSN4llvh11ms_demangle15PointerAffinityE", !10, i64 0}
!14 = !{!"any pointer", !10, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !11, i64 0}
!17 = !{!7, !12, i64 12}
!18 = !{!19, !20, i64 20}
!19 = !{!"_ZTSN4llvh11ms_demangle21FunctionSignatureNodeE", !7, i64 0, !13, i64 16, !20, i64 20, !21, i64 22, !22, i64 24, !14, i64 32, !23, i64 40, !14, i64 48}
!20 = !{!"_ZTSN4llvh11ms_demangle11CallingConvE", !10, i64 0}
!21 = !{!"_ZTSN4llvh11ms_demangle9FuncClassE", !10, i64 0}
!22 = !{!"_ZTSN4llvh11ms_demangle20FunctionRefQualifierE", !10, i64 0}
!23 = !{!"bool", !10, i64 0}
!24 = !{!6, !14, i64 24}
!25 = !{!6, !13, i64 16}


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