; LLVM IR from PetarV-/Algorithms :: Data Structures/Binary Search Tree.ll (ZN3BST6InsertEP4Node)

; 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.Node = type { i8, i32, ptr, ptr, ptr, ptr }
%class.BST = type { ptr }

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

; 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: mustprogress uwtable
define dso_local void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8
  %15 = call noundef zeroext i1 @_ZN3BST7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  br i1 %15, label %16, label %35

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %17 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #6
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %class.Node, ptr %18, i32 0, i32 0
  %20 = load i8, ptr %19, align 8, !tbaa !9
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %class.Node, ptr %21, i32 0, i32 1
  %23 = load i32, ptr %22, align 4, !tbaa !12
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %17, i8 noundef signext %20, i32 noundef %23)
          to label %24 unwind label %31

24:                                               ; preds = %16
  store ptr %17, ptr %5, align 8, !tbaa !5
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %class.Node, ptr %25, i32 0, i32 4
  store ptr null, ptr %26, align 8, !tbaa !13
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %class.Node, ptr %27, i32 0, i32 5
  store ptr %14, ptr %28, align 8, !tbaa !14
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %class.BST, ptr %14, i32 0, i32 0
  store ptr %29, ptr %30, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %152

31:                                               ; preds = %16
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %6, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %17, i64 noundef 40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %153

35:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %36 = getelementptr inbounds %class.BST, ptr %14, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  store ptr %37, ptr %8, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %149, %35
  br label %39

39:                                               ; preds = %38
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %class.Node, ptr %40, i32 0, i32 0
  %42 = load i8, ptr %41, align 8, !tbaa !9
  %43 = sext i8 %42 to i32
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %class.Node, ptr %44, i32 0, i32 0
  %46 = load i8, ptr %45, align 8, !tbaa !9
  %47 = sext i8 %46 to i32
  %48 = icmp slt i32 %43, %47
  br i1 %48, label %49, label %93

49:                                               ; preds = %39
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %class.Node, ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %51, align 8, !tbaa !17
  %53 = icmp eq ptr %52, null
  br i1 %53, label %54, label %86

54:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %55 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #6
  invoke void @_ZN3BSTC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %55)
          to label %56 unwind label %77

56:                                               ; preds = %54
  store ptr %55, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %57 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #6
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %class.Node, ptr %58, i32 0, i32 0
  %60 = load i8, ptr %59, align 8, !tbaa !9
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %class.Node, ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !12
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %57, i8 noundef signext %60, i32 noundef %63)
          to label %64 unwind label %81

64:                                               ; preds = %56
  store ptr %57, ptr %10, align 8, !tbaa !5
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = getelementptr inbounds %class.Node, ptr %66, i32 0, i32 4
  store ptr %65, ptr %67, align 8, !tbaa !13
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = getelementptr inbounds %class.Node, ptr %69, i32 0, i32 5
  store ptr %68, ptr %70, align 8, !tbaa !14
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %class.BST, ptr %72, i32 0, i32 0
  store ptr %71, ptr %73, align 8, !tbaa !15
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %class.Node, ptr %75, i32 0, i32 2
  store ptr %74, ptr %76, align 8, !tbaa !17
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %150

77:                                               ; preds = %54
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %6, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %55, i64 noundef 8) #7
  br label %85

81:                                               ; preds = %56
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %6, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %57, i64 noundef 40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %85

85:                                               ; preds = %81, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %151

86:                                               ; preds = %49
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds %class.Node, ptr %87, i32 0, i32 2
  %89 = load ptr, ptr %88, align 8, !tbaa !17
  %90 = getelementptr inbounds %class.BST, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !15
  store ptr %91, ptr %8, align 8, !tbaa !5
  br label %92

92:                                               ; preds = %86
  br label %149

93:                                               ; preds = %39
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %class.Node, ptr %94, i32 0, i32 0
  %96 = load i8, ptr %95, align 8, !tbaa !9
  %97 = sext i8 %96 to i32
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds %class.Node, ptr %98, i32 0, i32 0
  %100 = load i8, ptr %99, align 8, !tbaa !9
  %101 = sext i8 %100 to i32
  %102 = icmp sgt i32 %97, %101
  br i1 %102, label %103, label %147

103:                                              ; preds = %93
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = getelementptr inbounds %class.Node, ptr %104, i32 0, i32 3
  %106 = load ptr, ptr %105, align 8, !tbaa !18
  %107 = icmp eq ptr %106, null
  br i1 %107, label %108, label %140

108:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %109 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #6
  invoke void @_ZN3BSTC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %109)
          to label %110 unwind label %131

110:                                              ; preds = %108
  store ptr %109, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %111 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #6
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %class.Node, ptr %112, i32 0, i32 0
  %114 = load i8, ptr %113, align 8, !tbaa !9
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %class.Node, ptr %115, i32 0, i32 1
  %117 = load i32, ptr %116, align 4, !tbaa !12
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %111, i8 noundef signext %114, i32 noundef %117)
          to label %118 unwind label %135

118:                                              ; preds = %110
  store ptr %111, ptr %13, align 8, !tbaa !5
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = load ptr, ptr %13, align 8, !tbaa !5
  %121 = getelementptr inbounds %class.Node, ptr %120, i32 0, i32 4
  store ptr %119, ptr %121, align 8, !tbaa !13
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = load ptr, ptr %13, align 8, !tbaa !5
  %124 = getelementptr inbounds %class.Node, ptr %123, i32 0, i32 5
  store ptr %122, ptr %124, align 8, !tbaa !14
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = load ptr, ptr %12, align 8, !tbaa !5
  %127 = getelementptr inbounds %class.BST, ptr %126, i32 0, i32 0
  store ptr %125, ptr %127, align 8, !tbaa !15
  %128 = load ptr, ptr %12, align 8, !tbaa !5
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %class.Node, ptr %129, i32 0, i32 3
  store ptr %128, ptr %130, align 8, !tbaa !18
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %150

131:                                              ; preds = %108
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %6, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %109, i64 noundef 8) #7
  br label %139

135:                                              ; preds = %110
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %6, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %111, i64 noundef 40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %139

139:                                              ; preds = %135, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %151

140:                                              ; preds = %103
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = getelementptr inbounds %class.Node, ptr %141, i32 0, i32 3
  %143 = load ptr, ptr %142, align 8, !tbaa !18
  %144 = getelementptr inbounds %class.BST, ptr %143, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !15
  store ptr %145, ptr %8, align 8, !tbaa !5
  br label %146

146:                                              ; preds = %140
  br label %148

147:                                              ; preds = %93
  store i32 1, ptr %11, align 4
  br label %150

148:                                              ; preds = %146
  br label %149

149:                                              ; preds = %148, %92
  br label %38, !llvm.loop !19

150:                                              ; preds = %147, %118, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %152

151:                                              ; preds = %139, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %153

152:                                              ; preds = %150, %24
  ret void

153:                                              ; preds = %151, %31
  %154 = load ptr, ptr %6, align 8
  %155 = load i32, ptr %7, align 4
  %156 = insertvalue { ptr, i32 } poison, ptr %154, 0
  %157 = insertvalue { ptr, i32 } %156, i32 %155, 1
  resume { ptr, i32 } %157
}

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN4NodeC1Eci(ptr, i8, i32)

declare void @_ZN3BSTC1Ev(ptr)

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = { 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 #5 = { nounwind }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { 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, !7, i64 0}
!10 = !{!"_ZTS4Node", !7, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!10, !6, i64 24}
!14 = !{!10, !6, i64 32}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTS3BST", !6, i64 0}
!17 = !{!10, !6, i64 8}
!18 = !{!10, !6, i64 16}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr nocapture noundef readonly %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = tail call noundef zeroext i1 @_ZN3BST7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  br i1 %3, label %5, label %.preheader

.preheader:                                       ; preds = %2
  %4 = load i8, ptr %1, align 8, !tbaa !5
  br label %15

5:                                                ; preds = %2
  %6 = tail call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #4
  %7 = load i8, ptr %1, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %1, i64 4
  %9 = load i32, ptr %8, align 4, !tbaa !11
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %6, i8 noundef signext %7, i32 noundef %9)
          to label %10 unwind label %13

10:                                               ; preds = %5
  %11 = getelementptr inbounds i8, ptr %6, i64 24
  store ptr null, ptr %11, align 8, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %6, i64 32
  store ptr %0, ptr %12, align 8, !tbaa !13
  store ptr %6, ptr %0, align 8, !tbaa !14
  br label %.loopexit

13:                                               ; preds = %5
  %14 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %6, i64 noundef 40) #5
  br label %58

15:                                               ; preds = %.backedge, %.preheader
  %.039.in = phi ptr [ %0, %.preheader ], [ %.039.in.be, %.backedge ]
  %.039 = load ptr, ptr %.039.in, align 8, !tbaa !14
  %16 = load i8, ptr %.039, align 8, !tbaa !5
  %17 = icmp slt i8 %4, %16
  br i1 %17, label %18, label %37

18:                                               ; preds = %15
  %19 = getelementptr inbounds i8, ptr %.039, i64 8
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %.backedge

22:                                               ; preds = %18
  %23 = getelementptr inbounds i8, ptr %.039, i64 8
  %24 = tail call noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #4
  invoke void @_ZN3BSTC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %25 unwind label %33

25:                                               ; preds = %22
  %26 = tail call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #4
  %27 = load i8, ptr %1, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %1, i64 4
  %29 = load i32, ptr %28, align 4, !tbaa !11
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %26, i8 noundef signext %27, i32 noundef %29)
          to label %30 unwind label %35

30:                                               ; preds = %25
  %31 = getelementptr inbounds i8, ptr %26, i64 24
  store ptr %.039, ptr %31, align 8, !tbaa !12
  %32 = getelementptr inbounds i8, ptr %26, i64 32
  store ptr %24, ptr %32, align 8, !tbaa !13
  store ptr %26, ptr %24, align 8, !tbaa !14
  store ptr %24, ptr %23, align 8, !tbaa !16
  br label %.loopexit

33:                                               ; preds = %22
  %34 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %24, i64 noundef 8) #5
  br label %58

35:                                               ; preds = %25
  %36 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %26, i64 noundef 40) #5
  br label %58

37:                                               ; preds = %15
  %38 = icmp sgt i8 %4, %16
  br i1 %38, label %39, label %.loopexit

39:                                               ; preds = %37
  %40 = getelementptr inbounds i8, ptr %.039, i64 16
  %41 = load ptr, ptr %40, align 8, !tbaa !17
  %42 = icmp eq ptr %41, null
  br i1 %42, label %43, label %.backedge

.backedge:                                        ; preds = %39, %18
  %.039.in.be = phi ptr [ %20, %18 ], [ %41, %39 ]
  br label %15, !llvm.loop !18

43:                                               ; preds = %39
  %44 = getelementptr inbounds i8, ptr %.039, i64 16
  %45 = tail call noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #4
  invoke void @_ZN3BSTC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %45)
          to label %46 unwind label %54

46:                                               ; preds = %43
  %47 = tail call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #4
  %48 = load i8, ptr %1, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %1, i64 4
  %50 = load i32, ptr %49, align 4, !tbaa !11
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %47, i8 noundef signext %48, i32 noundef %50)
          to label %51 unwind label %56

51:                                               ; preds = %46
  %52 = getelementptr inbounds i8, ptr %47, i64 24
  store ptr %.039, ptr %52, align 8, !tbaa !12
  %53 = getelementptr inbounds i8, ptr %47, i64 32
  store ptr %45, ptr %53, align 8, !tbaa !13
  store ptr %47, ptr %45, align 8, !tbaa !14
  store ptr %45, ptr %44, align 8, !tbaa !17
  br label %.loopexit

54:                                               ; preds = %43
  %55 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %45, i64 noundef 8) #5
  br label %58

56:                                               ; preds = %46
  %57 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %47, i64 noundef 40) #5
  br label %58

.loopexit:                                        ; preds = %37, %30, %51, %10
  ret void

58:                                               ; preds = %35, %33, %56, %54, %13
  %.pn49 = phi { ptr, i32 } [ %14, %13 ], [ %36, %35 ], [ %34, %33 ], [ %57, %56 ], [ %55, %54 ]
  resume { ptr, i32 } %.pn49
}

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN4NodeC1Eci(ptr, i8, i32) local_unnamed_addr

declare void @_ZN3BSTC1Ev(ptr) local_unnamed_addr

attributes #0 = { 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 #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 = { 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 #3 = { 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 #4 = { builtin allocsize(0) }
attributes #5 = { 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, !7, i64 0}
!6 = !{!"_ZTS4Node", !7, i64 0, !9, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!6, !9, i64 4}
!12 = !{!6, !10, i64 24}
!13 = !{!6, !10, i64 32}
!14 = !{!15, !10, i64 0}
!15 = !{!"_ZTS3BST", !10, i64 0}
!16 = !{!6, !10, i64 8}
!17 = !{!6, !10, i64 16}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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