; LLVM IR from vczh/herodb :: Kernel/Source/Vlpp.ll (ZN2vl6stream10BomDecoder5SetupEPNS0_7IStreamE)

; 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.vl::stream::BomDecoder" = type { %"class.vl::Object", %"class.vl::stream::IDecoder", ptr, ptr }
%"class.vl::Object" = type { ptr }
%"class.vl::stream::IDecoder" = type { %"class.vl::Interface" }
%"class.vl::Interface" = type { ptr }

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #0

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl6stream10BomDecoder9BomStreamC1EPNS0_7IStreamEPcl(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, ptr noundef, i64 noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl6stream10BomDecoder5SetupEPNS0_7IStreamE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [3 x i8], align 1
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 3, ptr %5) #7
  call void @llvm.memset.p0.i64(ptr align 1 %5, i8 0, i64 3, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 0
  %12 = load ptr, ptr %10, align 8, !tbaa !9
  %13 = getelementptr inbounds ptr, ptr %12, i64 14
  %14 = load ptr, ptr %13, align 8
  %15 = call noundef i64 %14(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef %11, i64 noundef 3)
  store i64 %15, ptr %6, align 8, !tbaa !11
  %16 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 0
  %17 = call i32 @strncmp(ptr noundef %16, ptr noundef @.str.576, i64 noundef 3) #8
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %47

19:                                               ; preds = %2
  %20 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN2vl6stream11Utf8DecoderC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %20)
          to label %21 unwind label %39

21:                                               ; preds = %19
  %22 = icmp eq ptr %20, null
  br i1 %22, label %25, label %23

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %20, i64 8
  br label %25

25:                                               ; preds = %23, %21
  %26 = phi ptr [ %24, %23 ], [ null, %21 ]
  %27 = getelementptr inbounds %"class.vl::stream::BomDecoder", ptr %9, i32 0, i32 2
  store ptr %26, ptr %27, align 8, !tbaa !13
  %28 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #9
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 0
  %31 = getelementptr inbounds i8, ptr %30, i64 3
  invoke void @_ZN2vl6stream10BomDecoder9BomStreamC1EPNS0_7IStreamEPcl(ptr noundef nonnull align 8 dereferenceable(48) %28, ptr noundef %29, ptr noundef %31, i64 noundef 0)
          to label %32 unwind label %43

32:                                               ; preds = %25
  %33 = icmp eq ptr %28, null
  br i1 %33, label %36, label %34

34:                                               ; preds = %32
  %35 = getelementptr inbounds i8, ptr %28, i64 8
  br label %36

36:                                               ; preds = %34, %32
  %37 = phi ptr [ %35, %34 ], [ null, %32 ]
  %38 = getelementptr inbounds %"class.vl::stream::BomDecoder", ptr %9, i32 0, i32 3
  store ptr %37, ptr %38, align 8, !tbaa !18
  br label %140

39:                                               ; preds = %19
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %7, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %20, i64 noundef 40) #10
  br label %148

43:                                               ; preds = %25
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %7, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %28, i64 noundef 48) #10
  br label %148

47:                                               ; preds = %2
  %48 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 0
  %49 = call i32 @strncmp(ptr noundef %48, ptr noundef @.str.577, i64 noundef 2) #8
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %79

51:                                               ; preds = %47
  %52 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN2vl6stream12Utf16DecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %52)
          to label %53 unwind label %71

53:                                               ; preds = %51
  %54 = icmp eq ptr %52, null
  br i1 %54, label %57, label %55

55:                                               ; preds = %53
  %56 = getelementptr inbounds i8, ptr %52, i64 8
  br label %57

57:                                               ; preds = %55, %53
  %58 = phi ptr [ %56, %55 ], [ null, %53 ]
  %59 = getelementptr inbounds %"class.vl::stream::BomDecoder", ptr %9, i32 0, i32 2
  store ptr %58, ptr %59, align 8, !tbaa !13
  %60 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #9
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 0
  %63 = getelementptr inbounds i8, ptr %62, i64 2
  invoke void @_ZN2vl6stream10BomDecoder9BomStreamC1EPNS0_7IStreamEPcl(ptr noundef nonnull align 8 dereferenceable(48) %60, ptr noundef %61, ptr noundef %63, i64 noundef 1)
          to label %64 unwind label %75

64:                                               ; preds = %57
  %65 = icmp eq ptr %60, null
  br i1 %65, label %68, label %66

66:                                               ; preds = %64
  %67 = getelementptr inbounds i8, ptr %60, i64 8
  br label %68

68:                                               ; preds = %66, %64
  %69 = phi ptr [ %67, %66 ], [ null, %64 ]
  %70 = getelementptr inbounds %"class.vl::stream::BomDecoder", ptr %9, i32 0, i32 3
  store ptr %69, ptr %70, align 8, !tbaa !18
  br label %139

71:                                               ; preds = %51
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %7, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %52, i64 noundef 40) #10
  br label %148

75:                                               ; preds = %57
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %7, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %60, i64 noundef 48) #10
  br label %148

79:                                               ; preds = %47
  %80 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 0
  %81 = call i32 @strncmp(ptr noundef %80, ptr noundef @.str.578, i64 noundef 2) #8
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %83, label %111

83:                                               ; preds = %79
  %84 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN2vl6stream14Utf16BEDecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %84)
          to label %85 unwind label %103

85:                                               ; preds = %83
  %86 = icmp eq ptr %84, null
  br i1 %86, label %89, label %87

87:                                               ; preds = %85
  %88 = getelementptr inbounds i8, ptr %84, i64 8
  br label %89

89:                                               ; preds = %87, %85
  %90 = phi ptr [ %88, %87 ], [ null, %85 ]
  %91 = getelementptr inbounds %"class.vl::stream::BomDecoder", ptr %9, i32 0, i32 2
  store ptr %90, ptr %91, align 8, !tbaa !13
  %92 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #9
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 0
  %95 = getelementptr inbounds i8, ptr %94, i64 2
  invoke void @_ZN2vl6stream10BomDecoder9BomStreamC1EPNS0_7IStreamEPcl(ptr noundef nonnull align 8 dereferenceable(48) %92, ptr noundef %93, ptr noundef %95, i64 noundef 1)
          to label %96 unwind label %107

96:                                               ; preds = %89
  %97 = icmp eq ptr %92, null
  br i1 %97, label %100, label %98

98:                                               ; preds = %96
  %99 = getelementptr inbounds i8, ptr %92, i64 8
  br label %100

100:                                              ; preds = %98, %96
  %101 = phi ptr [ %99, %98 ], [ null, %96 ]
  %102 = getelementptr inbounds %"class.vl::stream::BomDecoder", ptr %9, i32 0, i32 3
  store ptr %101, ptr %102, align 8, !tbaa !18
  br label %138

103:                                              ; preds = %83
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %7, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %84, i64 noundef 40) #10
  br label %148

107:                                              ; preds = %89
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %7, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %92, i64 noundef 48) #10
  br label %148

111:                                              ; preds = %79
  %112 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN2vl6stream11MbcsDecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %112)
          to label %113 unwind label %130

113:                                              ; preds = %111
  %114 = icmp eq ptr %112, null
  br i1 %114, label %117, label %115

115:                                              ; preds = %113
  %116 = getelementptr inbounds i8, ptr %112, i64 8
  br label %117

117:                                              ; preds = %115, %113
  %118 = phi ptr [ %116, %115 ], [ null, %113 ]
  %119 = getelementptr inbounds %"class.vl::stream::BomDecoder", ptr %9, i32 0, i32 2
  store ptr %118, ptr %119, align 8, !tbaa !13
  %120 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #9
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds [3 x i8], ptr %5, i64 0, i64 0
  invoke void @_ZN2vl6stream10BomDecoder9BomStreamC1EPNS0_7IStreamEPcl(ptr noundef nonnull align 8 dereferenceable(48) %120, ptr noundef %121, ptr noundef %122, i64 noundef 3)
          to label %123 unwind label %134

123:                                              ; preds = %117
  %124 = icmp eq ptr %120, null
  br i1 %124, label %127, label %125

125:                                              ; preds = %123
  %126 = getelementptr inbounds i8, ptr %120, i64 8
  br label %127

127:                                              ; preds = %125, %123
  %128 = phi ptr [ %126, %125 ], [ null, %123 ]
  %129 = getelementptr inbounds %"class.vl::stream::BomDecoder", ptr %9, i32 0, i32 3
  store ptr %128, ptr %129, align 8, !tbaa !18
  br label %138

130:                                              ; preds = %111
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %7, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %112, i64 noundef 40) #10
  br label %148

134:                                              ; preds = %117
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %7, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %120, i64 noundef 48) #10
  br label %148

138:                                              ; preds = %127, %100
  br label %139

139:                                              ; preds = %138, %68
  br label %140

140:                                              ; preds = %139, %36
  %141 = getelementptr inbounds %"class.vl::stream::BomDecoder", ptr %9, i32 0, i32 2
  %142 = load ptr, ptr %141, align 8, !tbaa !13
  %143 = getelementptr inbounds %"class.vl::stream::BomDecoder", ptr %9, i32 0, i32 3
  %144 = load ptr, ptr %143, align 8, !tbaa !18
  %145 = load ptr, ptr %142, align 8, !tbaa !9
  %146 = getelementptr inbounds ptr, ptr %145, i64 2
  %147 = load ptr, ptr %146, align 8
  call void %147(ptr noundef nonnull align 8 dereferenceable(8) %142, ptr noundef %144)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 3, ptr %5) #7
  ret void

148:                                              ; preds = %134, %130, %107, %103, %75, %71, %43, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 3, ptr %5) #7
  br label %149

149:                                              ; preds = %148
  %150 = load ptr, ptr %7, align 8
  %151 = load i32, ptr %8, align 4
  %152 = insertvalue { ptr, i32 } poison, ptr %150, 0
  %153 = insertvalue { ptr, i32 } %152, i32 %151, 1
  resume { ptr, i32 } %153
}

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strncmp(ptr noundef, ptr noundef, i64 noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2vl6stream12Utf16DecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2vl6stream14Utf16BEDecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2vl6stream11MbcsDecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6 align 2

declare void @_ZN2vl6stream11Utf8DecoderC1Ev(ptr)

attributes #0 = { nobuiltin 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nobuiltin allocsize(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 = { 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 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"_ZTSN2vl6stream10BomDecoderE", !15, i64 0, !16, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!"_ZTSN2vl6ObjectE"}
!16 = !{!"_ZTSN2vl6stream8IDecoderE", !17, i64 0}
!17 = !{!"_ZTSN2vl9InterfaceE"}
!18 = !{!14, !6, i64 24}


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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl6stream10BomDecoder9BomStreamC1EPNS0_7IStreamEPcl(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, ptr noundef, i64 noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl6stream10BomDecoder5SetupEPNS0_7IStreamE(ptr nocapture noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [3 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %3) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %3, i8 0, i64 3, i1 false)
  %4 = load ptr, ptr %1, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 112
  %6 = load ptr, ptr %5, align 8
  %7 = call noundef i64 %6(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %3, i64 noundef 3)
  %8 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.576, i64 noundef 3) #8
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %10, label %21

10:                                               ; preds = %2
  %11 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN2vl6stream11Utf8DecoderC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %11)
          to label %12 unwind label %17

12:                                               ; preds = %10
  %13 = getelementptr inbounds i8, ptr %11, i64 8
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %13, ptr %14, align 8, !tbaa !8
  %15 = call noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #9
  %16 = getelementptr inbounds i8, ptr %3, i64 3
  invoke void @_ZN2vl6stream10BomDecoder9BomStreamC1EPNS0_7IStreamEPcl(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef nonnull %1, ptr noundef nonnull %16, i64 noundef 0)
          to label %58 unwind label %19

17:                                               ; preds = %10
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %11, i64 noundef 40) #10
  br label %66

19:                                               ; preds = %12
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %15, i64 noundef 48) #10
  br label %66

21:                                               ; preds = %2
  %22 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.577, i64 noundef 2) #8
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %35

24:                                               ; preds = %21
  %25 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN2vl6stream12Utf16DecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %25)
          to label %26 unwind label %31

26:                                               ; preds = %24
  %27 = getelementptr inbounds i8, ptr %25, i64 8
  %28 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %27, ptr %28, align 8, !tbaa !8
  %29 = call noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #9
  %30 = getelementptr inbounds i8, ptr %3, i64 2
  invoke void @_ZN2vl6stream10BomDecoder9BomStreamC1EPNS0_7IStreamEPcl(ptr noundef nonnull align 8 dereferenceable(48) %29, ptr noundef nonnull %1, ptr noundef nonnull %30, i64 noundef 1)
          to label %58 unwind label %33

31:                                               ; preds = %24
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %25, i64 noundef 40) #10
  br label %66

33:                                               ; preds = %26
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %29, i64 noundef 48) #10
  br label %66

35:                                               ; preds = %21
  %36 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.578, i64 noundef 2) #8
  %37 = icmp eq i32 %36, 0
  %38 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
  br i1 %37, label %39, label %49

39:                                               ; preds = %35
  invoke void @_ZN2vl6stream14Utf16BEDecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %38)
          to label %40 unwind label %45

40:                                               ; preds = %39
  %41 = getelementptr inbounds i8, ptr %38, i64 8
  %42 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %41, ptr %42, align 8, !tbaa !8
  %43 = call noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #9
  %44 = getelementptr inbounds i8, ptr %3, i64 2
  invoke void @_ZN2vl6stream10BomDecoder9BomStreamC1EPNS0_7IStreamEPcl(ptr noundef nonnull align 8 dereferenceable(48) %43, ptr noundef nonnull %1, ptr noundef nonnull %44, i64 noundef 1)
          to label %58 unwind label %47

45:                                               ; preds = %39
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %38, i64 noundef 40) #10
  br label %66

47:                                               ; preds = %40
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %43, i64 noundef 48) #10
  br label %66

49:                                               ; preds = %35
  invoke void @_ZN2vl6stream11MbcsDecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %38)
          to label %50 unwind label %54

50:                                               ; preds = %49
  %51 = getelementptr inbounds i8, ptr %38, i64 8
  %52 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %51, ptr %52, align 8, !tbaa !8
  %53 = call noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #9
  invoke void @_ZN2vl6stream10BomDecoder9BomStreamC1EPNS0_7IStreamEPcl(ptr noundef nonnull align 8 dereferenceable(48) %53, ptr noundef nonnull %1, ptr noundef nonnull %3, i64 noundef 3)
          to label %58 unwind label %56

54:                                               ; preds = %49
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %38, i64 noundef 40) #10
  br label %66

56:                                               ; preds = %50
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %53, i64 noundef 48) #10
  br label %66

58:                                               ; preds = %50, %40, %26, %12
  %.sink17 = phi ptr [ %15, %12 ], [ %29, %26 ], [ %43, %40 ], [ %53, %50 ]
  %59 = getelementptr inbounds i8, ptr %.sink17, i64 8
  %60 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %59, ptr %60, align 8, !tbaa !15
  %61 = getelementptr inbounds i8, ptr %0, i64 16
  %62 = load ptr, ptr %61, align 8, !tbaa !8
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %63, i64 16
  %65 = load ptr, ptr %64, align 8
  call void %65(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull %59)
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %3) #7
  ret void

66:                                               ; preds = %56, %54, %47, %45, %33, %31, %19, %17
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %18, %17 ], [ %34, %33 ], [ %32, %31 ], [ %48, %47 ], [ %46, %45 ], [ %57, %56 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strncmp(ptr nocapture noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2vl6stream12Utf16DecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2vl6stream14Utf16BEDecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2vl6stream11MbcsDecoderC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6 align 2

declare void @_ZN2vl6stream11Utf8DecoderC1Ev(ptr) local_unnamed_addr

attributes #0 = { nobuiltin 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nobuiltin allocsize(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 = { 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 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !13, i64 16}
!9 = !{!"_ZTSN2vl6stream10BomDecoderE", !10, i64 0, !11, i64 8, !13, i64 16, !13, i64 24}
!10 = !{!"_ZTSN2vl6ObjectE"}
!11 = !{!"_ZTSN2vl6stream8IDecoderE", !12, i64 0}
!12 = !{!"_ZTSN2vl9InterfaceE"}
!13 = !{!"any pointer", !14, i64 0}
!14 = !{!"omnipotent char", !7, i64 0}
!15 = !{!9, !13, i64 24}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass