; LLVM IR from Thre4dripper/DSA-Programs :: 15. AVL Tree/Deletion.ll (Z6RemoveiP4Node)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z6HeightP4Node(ptr 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: mustprogress uwtable
declare dso_local noundef i32 @_Z13BalanceFactorP4Node(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z18inorderPredecessorP4Node(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z16inorderSuccessorP4Node(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z10RRrotationP4Node(ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z10LLrotationP4Node(ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z10LRrotationP4Node(ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z10RLrotationP4Node(ptr noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z6RemoveiP4Node(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %7 = load ptr, ptr %5, align 8, !tbaa !9
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %10

9:                                                ; preds = %2
  store ptr null, ptr %3, align 8
  br label %205

10:                                               ; preds = %2
  %11 = load i32, ptr %4, align 4, !tbaa !5
  %12 = load ptr, ptr %5, align 8, !tbaa !9
  %13 = getelementptr inbounds %struct.Node, ptr %12, i32 0, i32 0
  %14 = load i32, ptr %13, align 8, !tbaa !11
  %15 = icmp slt i32 %11, %14
  br i1 %15, label %16, label %24

16:                                               ; preds = %10
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !9
  %19 = getelementptr inbounds %struct.Node, ptr %18, i32 0, i32 2
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  %21 = call noundef ptr @_Z6RemoveiP4Node(i32 noundef %17, ptr noundef %20)
  %22 = load ptr, ptr %5, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct.Node, ptr %22, i32 0, i32 2
  store ptr %21, ptr %23, align 8, !tbaa !13
  br label %104

24:                                               ; preds = %10
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = load ptr, ptr %5, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.Node, ptr %26, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !11
  %29 = icmp sgt i32 %25, %28
  br i1 %29, label %30, label %38

30:                                               ; preds = %24
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = load ptr, ptr %5, align 8, !tbaa !9
  %33 = getelementptr inbounds %struct.Node, ptr %32, i32 0, i32 3
  %34 = load ptr, ptr %33, align 8, !tbaa !14
  %35 = call noundef ptr @_Z6RemoveiP4Node(i32 noundef %31, ptr noundef %34)
  %36 = load ptr, ptr %5, align 8, !tbaa !9
  %37 = getelementptr inbounds %struct.Node, ptr %36, i32 0, i32 3
  store ptr %35, ptr %37, align 8, !tbaa !14
  br label %103

38:                                               ; preds = %24
  %39 = load ptr, ptr %5, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.Node, ptr %39, i32 0, i32 2
  %41 = load ptr, ptr %40, align 8, !tbaa !13
  %42 = icmp eq ptr %41, null
  br i1 %42, label %43, label %53

43:                                               ; preds = %38
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = getelementptr inbounds %struct.Node, ptr %44, i32 0, i32 3
  %46 = load ptr, ptr %45, align 8, !tbaa !14
  %47 = icmp eq ptr %46, null
  br i1 %47, label %48, label %53

48:                                               ; preds = %43
  %49 = load ptr, ptr %5, align 8, !tbaa !9
  %50 = icmp eq ptr %49, null
  br i1 %50, label %52, label %51

51:                                               ; preds = %48
  call void @_ZdlPvm(ptr noundef %49, i64 noundef 24) #4
  br label %52

52:                                               ; preds = %51, %48
  store ptr null, ptr %3, align 8
  br label %205

53:                                               ; preds = %43, %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store ptr null, ptr %6, align 8, !tbaa !9
  %54 = load ptr, ptr %5, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.Node, ptr %54, i32 0, i32 2
  %56 = load ptr, ptr %55, align 8, !tbaa !13
  %57 = call noundef i32 @_Z6HeightP4Node(ptr noundef %56)
  %58 = load ptr, ptr %5, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct.Node, ptr %58, i32 0, i32 3
  %60 = load ptr, ptr %59, align 8, !tbaa !14
  %61 = call noundef i32 @_Z6HeightP4Node(ptr noundef %60)
  %62 = icmp sgt i32 %57, %61
  br i1 %62, label %63, label %82

63:                                               ; preds = %53
  %64 = load ptr, ptr %5, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct.Node, ptr %64, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !13
  %67 = call noundef ptr @_Z18inorderPredecessorP4Node(ptr noundef %66)
  store ptr %67, ptr %6, align 8, !tbaa !9
  %68 = load ptr, ptr %6, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.Node, ptr %68, i32 0, i32 0
  %70 = load i32, ptr %69, align 8, !tbaa !11
  %71 = load ptr, ptr %5, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.Node, ptr %71, i32 0, i32 0
  store i32 %70, ptr %72, align 8, !tbaa !11
  %73 = load ptr, ptr %6, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.Node, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !11
  %76 = load ptr, ptr %5, align 8, !tbaa !9
  %77 = getelementptr inbounds %struct.Node, ptr %76, i32 0, i32 2
  %78 = load ptr, ptr %77, align 8, !tbaa !13
  %79 = call noundef ptr @_Z6RemoveiP4Node(i32 noundef %75, ptr noundef %78)
  %80 = load ptr, ptr %5, align 8, !tbaa !9
  %81 = getelementptr inbounds %struct.Node, ptr %80, i32 0, i32 2
  store ptr %79, ptr %81, align 8, !tbaa !13
  br label %101

82:                                               ; preds = %53
  %83 = load ptr, ptr %5, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.Node, ptr %83, i32 0, i32 3
  %85 = load ptr, ptr %84, align 8, !tbaa !14
  %86 = call noundef ptr @_Z16inorderSuccessorP4Node(ptr noundef %85)
  store ptr %86, ptr %6, align 8, !tbaa !9
  %87 = load ptr, ptr %6, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.Node, ptr %87, i32 0, i32 0
  %89 = load i32, ptr %88, align 8, !tbaa !11
  %90 = load ptr, ptr %5, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.Node, ptr %90, i32 0, i32 0
  store i32 %89, ptr %91, align 8, !tbaa !11
  %92 = load ptr, ptr %6, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct.Node, ptr %92, i32 0, i32 0
  %94 = load i32, ptr %93, align 8, !tbaa !11
  %95 = load ptr, ptr %5, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct.Node, ptr %95, i32 0, i32 3
  %97 = load ptr, ptr %96, align 8, !tbaa !14
  %98 = call noundef ptr @_Z6RemoveiP4Node(i32 noundef %94, ptr noundef %97)
  %99 = load ptr, ptr %5, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct.Node, ptr %99, i32 0, i32 3
  store ptr %98, ptr %100, align 8, !tbaa !14
  br label %101

101:                                              ; preds = %82, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102, %30
  br label %104

104:                                              ; preds = %103, %16
  %105 = load ptr, ptr %5, align 8, !tbaa !9
  %106 = call noundef i32 @_Z13BalanceFactorP4Node(ptr noundef %105)
  %107 = load ptr, ptr %5, align 8, !tbaa !9
  %108 = getelementptr inbounds %struct.Node, ptr %107, i32 0, i32 1
  store i32 %106, ptr %108, align 4, !tbaa !15
  %109 = load ptr, ptr %5, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.Node, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !15
  %112 = icmp eq i32 %111, 2
  br i1 %112, label %113, label %123

113:                                              ; preds = %104
  %114 = load ptr, ptr %5, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.Node, ptr %114, i32 0, i32 2
  %116 = load ptr, ptr %115, align 8, !tbaa !13
  %117 = getelementptr inbounds %struct.Node, ptr %116, i32 0, i32 1
  %118 = load i32, ptr %117, align 4, !tbaa !15
  %119 = icmp eq i32 %118, 1
  br i1 %119, label %120, label %123

120:                                              ; preds = %113
  %121 = load ptr, ptr %5, align 8, !tbaa !9
  %122 = call noundef ptr @_Z10RRrotationP4Node(ptr noundef %121)
  store ptr %122, ptr %3, align 8
  br label %205

123:                                              ; preds = %113, %104
  %124 = load ptr, ptr %5, align 8, !tbaa !9
  %125 = getelementptr inbounds %struct.Node, ptr %124, i32 0, i32 1
  %126 = load i32, ptr %125, align 4, !tbaa !15
  %127 = icmp eq i32 %126, -2
  br i1 %127, label %128, label %138

128:                                              ; preds = %123
  %129 = load ptr, ptr %5, align 8, !tbaa !9
  %130 = getelementptr inbounds %struct.Node, ptr %129, i32 0, i32 3
  %131 = load ptr, ptr %130, align 8, !tbaa !14
  %132 = getelementptr inbounds %struct.Node, ptr %131, i32 0, i32 1
  %133 = load i32, ptr %132, align 4, !tbaa !15
  %134 = icmp eq i32 %133, 0
  br i1 %134, label %135, label %138

135:                                              ; preds = %128
  %136 = load ptr, ptr %5, align 8, !tbaa !9
  %137 = call noundef ptr @_Z10LLrotationP4Node(ptr noundef %136)
  store ptr %137, ptr %3, align 8
  br label %205

138:                                              ; preds = %128, %123
  %139 = load ptr, ptr %5, align 8, !tbaa !9
  %140 = getelementptr inbounds %struct.Node, ptr %139, i32 0, i32 1
  %141 = load i32, ptr %140, align 4, !tbaa !15
  %142 = icmp eq i32 %141, 2
  br i1 %142, label %143, label %153

143:                                              ; preds = %138
  %144 = load ptr, ptr %5, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.Node, ptr %144, i32 0, i32 2
  %146 = load ptr, ptr %145, align 8, !tbaa !13
  %147 = getelementptr inbounds %struct.Node, ptr %146, i32 0, i32 1
  %148 = load i32, ptr %147, align 4, !tbaa !15
  %149 = icmp eq i32 %148, -1
  br i1 %149, label %150, label %153

150:                                              ; preds = %143
  %151 = load ptr, ptr %5, align 8, !tbaa !9
  %152 = call noundef ptr @_Z10LRrotationP4Node(ptr noundef %151)
  store ptr %152, ptr %3, align 8
  br label %205

153:                                              ; preds = %143, %138
  %154 = load ptr, ptr %5, align 8, !tbaa !9
  %155 = getelementptr inbounds %struct.Node, ptr %154, i32 0, i32 1
  %156 = load i32, ptr %155, align 4, !tbaa !15
  %157 = icmp eq i32 %156, -2
  br i1 %157, label %158, label %168

158:                                              ; preds = %153
  %159 = load ptr, ptr %5, align 8, !tbaa !9
  %160 = getelementptr inbounds %struct.Node, ptr %159, i32 0, i32 3
  %161 = load ptr, ptr %160, align 8, !tbaa !14
  %162 = getelementptr inbounds %struct.Node, ptr %161, i32 0, i32 1
  %163 = load i32, ptr %162, align 4, !tbaa !15
  %164 = icmp eq i32 %163, 1
  br i1 %164, label %165, label %168

165:                                              ; preds = %158
  %166 = load ptr, ptr %5, align 8, !tbaa !9
  %167 = call noundef ptr @_Z10RLrotationP4Node(ptr noundef %166)
  store ptr %167, ptr %3, align 8
  br label %205

168:                                              ; preds = %158, %153
  %169 = load ptr, ptr %5, align 8, !tbaa !9
  %170 = getelementptr inbounds %struct.Node, ptr %169, i32 0, i32 1
  %171 = load i32, ptr %170, align 4, !tbaa !15
  %172 = icmp eq i32 %171, 2
  br i1 %172, label %173, label %183

173:                                              ; preds = %168
  %174 = load ptr, ptr %5, align 8, !tbaa !9
  %175 = getelementptr inbounds %struct.Node, ptr %174, i32 0, i32 2
  %176 = load ptr, ptr %175, align 8, !tbaa !13
  %177 = getelementptr inbounds %struct.Node, ptr %176, i32 0, i32 1
  %178 = load i32, ptr %177, align 4, !tbaa !15
  %179 = icmp eq i32 %178, 0
  br i1 %179, label %180, label %183

180:                                              ; preds = %173
  %181 = load ptr, ptr %5, align 8, !tbaa !9
  %182 = call noundef ptr @_Z10RRrotationP4Node(ptr noundef %181)
  store ptr %182, ptr %3, align 8
  br label %205

183:                                              ; preds = %173, %168
  %184 = load ptr, ptr %5, align 8, !tbaa !9
  %185 = getelementptr inbounds %struct.Node, ptr %184, i32 0, i32 1
  %186 = load i32, ptr %185, align 4, !tbaa !15
  %187 = icmp eq i32 %186, -2
  br i1 %187, label %188, label %198

188:                                              ; preds = %183
  %189 = load ptr, ptr %5, align 8, !tbaa !9
  %190 = getelementptr inbounds %struct.Node, ptr %189, i32 0, i32 3
  %191 = load ptr, ptr %190, align 8, !tbaa !14
  %192 = getelementptr inbounds %struct.Node, ptr %191, i32 0, i32 1
  %193 = load i32, ptr %192, align 4, !tbaa !15
  %194 = icmp eq i32 %193, -1
  br i1 %194, label %195, label %198

195:                                              ; preds = %188
  %196 = load ptr, ptr %5, align 8, !tbaa !9
  %197 = call noundef ptr @_Z10LLrotationP4Node(ptr noundef %196)
  store ptr %197, ptr %3, align 8
  br label %205

198:                                              ; preds = %188, %183
  br label %199

199:                                              ; preds = %198
  br label %200

200:                                              ; preds = %199
  br label %201

201:                                              ; preds = %200
  br label %202

202:                                              ; preds = %201
  br label %203

203:                                              ; preds = %202
  %204 = load ptr, ptr %5, align 8, !tbaa !9
  store ptr %204, ptr %3, align 8
  br label %205

205:                                              ; preds = %203, %195, %180, %165, %150, %135, %120, %52, %9
  %206 = load ptr, ptr %3, align 8
  ret ptr %206
}

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 nounwind }
attributes #5 = { 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 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4, !10, i64 8, !10, i64 16}
!13 = !{!12, !10, i64 8}
!14 = !{!12, !10, i64 16}
!15 = !{!12, !6, i64 4}


; 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 uwtable
declare dso_local noundef i32 @_Z6HeightP4Node(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z13BalanceFactorP4Node(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z18inorderPredecessorP4Node(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z16inorderSuccessorP4Node(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z10RRrotationP4Node(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z10LLrotationP4Node(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z10LRrotationP4Node(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z10RLrotationP4Node(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z6RemoveiP4Node(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = icmp eq ptr %1, null
  br i1 %3, label %.thread59, label %4

4:                                                ; preds = %2
  %5 = load i32, ptr %1, align 8, !tbaa !5
  %6 = icmp sgt i32 %5, %0
  br i1 %6, label %7, label %9

7:                                                ; preds = %4
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  br label %36

9:                                                ; preds = %4
  %10 = icmp slt i32 %5, %0
  br i1 %10, label %11, label %13

11:                                               ; preds = %9
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  br label %36

13:                                               ; preds = %9
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %22

17:                                               ; preds = %13
  %18 = getelementptr inbounds i8, ptr %1, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !12
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %22

21:                                               ; preds = %17
  tail call void @_ZdlPvm(ptr noundef nonnull %1, i64 noundef 24) #3
  br label %.thread59

22:                                               ; preds = %17, %13
  %23 = tail call noundef i32 @_Z6HeightP4Node(ptr noundef %15)
  %24 = getelementptr inbounds i8, ptr %1, i64 16
  %25 = load ptr, ptr %24, align 8, !tbaa !12
  %26 = tail call noundef i32 @_Z6HeightP4Node(ptr noundef %25)
  %27 = icmp sgt i32 %23, %26
  br i1 %27, label %28, label %32

28:                                               ; preds = %22
  %29 = load ptr, ptr %14, align 8, !tbaa !11
  %30 = tail call noundef ptr @_Z18inorderPredecessorP4Node(ptr noundef %29)
  %31 = load i32, ptr %30, align 8, !tbaa !5
  store i32 %31, ptr %1, align 8, !tbaa !5
  br label %36

32:                                               ; preds = %22
  %33 = load ptr, ptr %24, align 8, !tbaa !12
  %34 = tail call noundef ptr @_Z16inorderSuccessorP4Node(ptr noundef %33)
  %35 = load i32, ptr %34, align 8, !tbaa !5
  store i32 %35, ptr %1, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %28, %32, %11, %7
  %.sink = phi ptr [ %14, %28 ], [ %24, %32 ], [ %12, %11 ], [ %8, %7 ]
  %.sink61 = phi i32 [ %31, %28 ], [ %35, %32 ], [ %0, %11 ], [ %0, %7 ]
  %37 = load ptr, ptr %.sink, align 8, !tbaa !13
  %38 = tail call noundef ptr @_Z6RemoveiP4Node(i32 noundef %.sink61, ptr noundef %37)
  store ptr %38, ptr %.sink, align 8, !tbaa !13
  %39 = tail call noundef i32 @_Z13BalanceFactorP4Node(ptr noundef nonnull %1)
  %40 = getelementptr inbounds i8, ptr %1, i64 4
  store i32 %39, ptr %40, align 4, !tbaa !14
  switch i32 %39, label %.thread59 [
    i32 2, label %41
    i32 -2, label %48
  ]

41:                                               ; preds = %36
  %42 = getelementptr inbounds i8, ptr %1, i64 8
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = getelementptr inbounds i8, ptr %43, i64 4
  %45 = load i32, ptr %44, align 4, !tbaa !14
  switch i32 %45, label %.thread59 [
    i32 1, label %46
    i32 -1, label %55
    i32 0, label %59
  ]

46:                                               ; preds = %41
  %47 = tail call noundef ptr @_Z10RRrotationP4Node(ptr noundef nonnull %1)
  br label %.thread59

48:                                               ; preds = %36
  %49 = getelementptr inbounds i8, ptr %1, i64 16
  %50 = load ptr, ptr %49, align 8, !tbaa !12
  %51 = getelementptr inbounds i8, ptr %50, i64 4
  %52 = load i32, ptr %51, align 4, !tbaa !14
  switch i32 %52, label %.thread59 [
    i32 0, label %53
    i32 1, label %57
    i32 -1, label %61
  ]

53:                                               ; preds = %48
  %54 = tail call noundef ptr @_Z10LLrotationP4Node(ptr noundef nonnull %1)
  br label %.thread59

55:                                               ; preds = %41
  %56 = tail call noundef ptr @_Z10LRrotationP4Node(ptr noundef nonnull %1)
  br label %.thread59

57:                                               ; preds = %48
  %58 = tail call noundef ptr @_Z10RLrotationP4Node(ptr noundef nonnull %1)
  br label %.thread59

59:                                               ; preds = %41
  %60 = tail call noundef ptr @_Z10RRrotationP4Node(ptr noundef nonnull %1)
  br label %.thread59

61:                                               ; preds = %48
  %62 = tail call noundef ptr @_Z10LLrotationP4Node(ptr noundef nonnull %1)
  br label %.thread59

.thread59:                                        ; preds = %48, %41, %36, %2, %61, %59, %57, %55, %53, %46, %21
  %.0 = phi ptr [ %47, %46 ], [ %54, %53 ], [ %56, %55 ], [ %58, %57 ], [ %60, %59 ], [ %62, %61 ], [ null, %21 ], [ null, %2 ], [ %1, %36 ], [ %1, %41 ], [ %1, %48 ]
  ret ptr %.0
}

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 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 = { 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 #3 = { 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, !7, i64 4, !10, i64 8, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!6, !10, i64 16}
!13 = !{!10, !10, i64 0}
!14 = !{!6, !7, i64 4}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass