; LLVM IR from VAR-solutions/Algorithms :: data structures/trie/c (AVL)

; 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: nounwind uwtable
declare dso_local ptr @least(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: nounwind uwtable
declare dso_local i32 @height(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @max(i32 noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @rightrightZigZig(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @leftleftZigZig(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @leftrightZigZag(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @rightleftZigZag(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @getBalance(ptr noundef) #0

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

12:                                               ; preds = %2
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %13, ptr %3, align 8
  br label %164

14:                                               ; preds = %2
  %15 = load i32, ptr %5, align 4, !tbaa !9
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.node, ptr %16, i32 0, i32 0
  %18 = load i32, ptr %17, align 8, !tbaa !11
  %19 = icmp slt i32 %15, %18
  br i1 %19, label %20, label %28

20:                                               ; preds = %14
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.node, ptr %21, i32 0, i32 2
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = call ptr @deleteNode(ptr noundef %23, i32 noundef %24)
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.node, ptr %26, i32 0, i32 2
  store ptr %25, ptr %27, align 8, !tbaa !13
  br label %95

28:                                               ; preds = %14
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.node, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %33 = icmp sgt i32 %29, %32
  br i1 %33, label %34, label %42

34:                                               ; preds = %28
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.node, ptr %35, i32 0, i32 3
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = load i32, ptr %5, align 4, !tbaa !9
  %39 = call ptr @deleteNode(ptr noundef %37, i32 noundef %38)
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.node, ptr %40, i32 0, i32 3
  store ptr %39, ptr %41, align 8, !tbaa !14
  br label %94

42:                                               ; preds = %28
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.node, ptr %43, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  %46 = icmp eq ptr %45, null
  br i1 %46, label %47, label %60

47:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.node, ptr %48, i32 0, i32 3
  %50 = load ptr, ptr %49, align 8, !tbaa !14
  store ptr %50, ptr %6, align 8, !tbaa !5
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %55

53:                                               ; preds = %47
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %54, ptr %6, align 8, !tbaa !5
  store ptr null, ptr %4, align 8, !tbaa !5
  br label %58

55:                                               ; preds = %47
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %56, ptr align 8 %57, i64 24, i1 false), !tbaa.struct !15
  br label %58

58:                                               ; preds = %55, %53
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %59) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %93

60:                                               ; preds = %42
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.node, ptr %61, i32 0, i32 3
  %63 = load ptr, ptr %62, align 8, !tbaa !14
  %64 = icmp eq ptr %63, null
  br i1 %64, label %65, label %72

65:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.node, ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !13
  store ptr %68, ptr %7, align 8, !tbaa !5
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %69, ptr align 8 %70, i64 24, i1 false), !tbaa.struct !15
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %71) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %92

72:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.node, ptr %73, i32 0, i32 3
  %75 = load ptr, ptr %74, align 8, !tbaa !14
  store ptr %75, ptr %8, align 8, !tbaa !5
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = call ptr @least(ptr noundef %76)
  store ptr %77, ptr %8, align 8, !tbaa !5
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.node, ptr %78, i32 0, i32 0
  %80 = load i32, ptr %79, align 8, !tbaa !11
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.node, ptr %81, i32 0, i32 0
  store i32 %80, ptr %82, align 8, !tbaa !11
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.node, ptr %83, i32 0, i32 3
  %85 = load ptr, ptr %84, align 8, !tbaa !14
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.node, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !11
  %89 = call ptr @deleteNode(ptr noundef %85, i32 noundef %88)
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.node, ptr %90, i32 0, i32 3
  store ptr %89, ptr %91, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %92

92:                                               ; preds = %72, %65
  br label %93

93:                                               ; preds = %92, %58
  br label %94

94:                                               ; preds = %93, %34
  br label %95

95:                                               ; preds = %94, %20
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = icmp eq ptr %96, null
  br i1 %97, label %98, label %100

98:                                               ; preds = %95
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %99, ptr %3, align 8
  br label %164

100:                                              ; preds = %95
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.node, ptr %101, i32 0, i32 2
  %103 = load ptr, ptr %102, align 8, !tbaa !13
  %104 = call i32 @height(ptr noundef %103)
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.node, ptr %105, i32 0, i32 3
  %107 = load ptr, ptr %106, align 8, !tbaa !14
  %108 = call i32 @height(ptr noundef %107)
  %109 = call i32 @max(i32 noundef %104, i32 noundef %108)
  %110 = add nsw i32 %109, 1
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.node, ptr %111, i32 0, i32 1
  store i32 %110, ptr %112, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = call i32 @getBalance(ptr noundef %113)
  store i32 %114, ptr %9, align 4, !tbaa !9
  %115 = load i32, ptr %9, align 4, !tbaa !9
  %116 = icmp sgt i32 %115, 1
  br i1 %116, label %117, label %126

117:                                              ; preds = %100
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.node, ptr %118, i32 0, i32 2
  %120 = load ptr, ptr %119, align 8, !tbaa !13
  %121 = call i32 @getBalance(ptr noundef %120)
  %122 = icmp sge i32 %121, 0
  br i1 %122, label %123, label %126

123:                                              ; preds = %117
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = call ptr @leftleftZigZig(ptr noundef %124)
  store ptr %125, ptr %4, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %123, %117, %100
  %127 = load i32, ptr %9, align 4, !tbaa !9
  %128 = icmp sgt i32 %127, 1
  br i1 %128, label %129, label %138

129:                                              ; preds = %126
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.node, ptr %130, i32 0, i32 2
  %132 = load ptr, ptr %131, align 8, !tbaa !13
  %133 = call i32 @getBalance(ptr noundef %132)
  %134 = icmp slt i32 %133, 0
  br i1 %134, label %135, label %138

135:                                              ; preds = %129
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = call ptr @leftrightZigZag(ptr noundef %136)
  store ptr %137, ptr %4, align 8, !tbaa !5
  br label %138

138:                                              ; preds = %135, %129, %126
  %139 = load i32, ptr %9, align 4, !tbaa !9
  %140 = icmp slt i32 %139, -1
  br i1 %140, label %141, label %150

141:                                              ; preds = %138
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.node, ptr %142, i32 0, i32 3
  %144 = load ptr, ptr %143, align 8, !tbaa !14
  %145 = call i32 @getBalance(ptr noundef %144)
  %146 = icmp sle i32 %145, 0
  br i1 %146, label %147, label %150

147:                                              ; preds = %141
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = call ptr @rightrightZigZig(ptr noundef %148)
  store ptr %149, ptr %4, align 8, !tbaa !5
  br label %150

150:                                              ; preds = %147, %141, %138
  %151 = load i32, ptr %9, align 4, !tbaa !9
  %152 = icmp slt i32 %151, -1
  br i1 %152, label %153, label %162

153:                                              ; preds = %150
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.node, ptr %154, i32 0, i32 3
  %156 = load ptr, ptr %155, align 8, !tbaa !14
  %157 = call i32 @getBalance(ptr noundef %156)
  %158 = icmp sgt i32 %157, 0
  br i1 %158, label %159, label %162

159:                                              ; preds = %153
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = call ptr @rightleftZigZag(ptr noundef %160)
  store ptr %161, ptr %4, align 8, !tbaa !5
  br label %162

162:                                              ; preds = %159, %153, %150
  %163 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %163, ptr %3, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %164

164:                                              ; preds = %162, %98, %12
  %165 = load ptr, ptr %3, align 8
  ret ptr %165
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

attributes #0 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"node", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!13 = !{!12, !6, i64 8}
!14 = !{!12, !6, i64 16}
!15 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 8, !5, i64 16, i64 8, !5}
!16 = !{!12, !10, 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: nounwind uwtable
declare dso_local ptr @least(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @max(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @rightrightZigZig(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @leftleftZigZig(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @leftrightZigZag(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @rightleftZigZag(ptr noundef) local_unnamed_addr #0

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

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

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

7:                                                ; preds = %4
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !11
  %10 = tail call ptr @deleteNode(ptr noundef %9, i32 noundef %1)
  store ptr %10, ptr %8, align 8, !tbaa !11
  br label %.thread

11:                                               ; preds = %4
  %12 = icmp slt i32 %5, %1
  br i1 %12, label %13, label %17

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  %15 = load ptr, ptr %14, align 8, !tbaa !12
  %16 = tail call ptr @deleteNode(ptr noundef %15, i32 noundef %1)
  store ptr %16, ptr %14, align 8, !tbaa !12
  br label %.thread

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

24:                                               ; preds = %17
  br i1 %23, label %.thread62, label %32

.thread62:                                        ; preds = %24
  tail call void @free(ptr noundef nonnull %0) #3
  br label %.thread76

25:                                               ; preds = %17
  br i1 %23, label %26, label %27

26:                                               ; preds = %25
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %19, i64 24, i1 false), !tbaa.struct !13
  tail call void @free(ptr noundef nonnull %19) #3
  br label %.thread

27:                                               ; preds = %25
  %28 = tail call ptr @least(ptr noundef nonnull %22)
  %29 = load i32, ptr %28, align 8, !tbaa !5
  store i32 %29, ptr %0, align 8, !tbaa !5
  %30 = load ptr, ptr %21, align 8, !tbaa !12
  %31 = tail call ptr @deleteNode(ptr noundef %30, i32 noundef %29)
  store ptr %31, ptr %21, align 8, !tbaa !12
  br label %.thread

32:                                               ; preds = %24
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %22, i64 24, i1 false), !tbaa.struct !13
  tail call void @free(ptr noundef nonnull %22) #3
  br label %.thread

.thread:                                          ; preds = %27, %26, %13, %7, %32
  %33 = getelementptr inbounds i8, ptr %0, i64 8
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = tail call i32 @height(ptr noundef %34)
  %36 = getelementptr inbounds i8, ptr %0, i64 16
  %37 = load ptr, ptr %36, align 8, !tbaa !12
  %38 = tail call i32 @height(ptr noundef %37)
  %39 = tail call i32 @max(i32 noundef %35, i32 noundef %38)
  %40 = add nsw i32 %39, 1
  %41 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %40, ptr %41, align 4, !tbaa !16
  %42 = tail call i32 @getBalance(ptr noundef nonnull %0)
  %43 = icmp sgt i32 %42, 1
  br i1 %43, label %44, label %57

44:                                               ; preds = %.thread
  %45 = load ptr, ptr %33, align 8, !tbaa !11
  %46 = tail call i32 @getBalance(ptr noundef %45)
  %47 = icmp sgt i32 %46, -1
  br i1 %47, label %48, label %50

48:                                               ; preds = %44
  %49 = tail call ptr @leftleftZigZig(ptr noundef nonnull %0)
  br label %50

50:                                               ; preds = %48, %44
  %.2.ph = phi ptr [ %0, %44 ], [ %49, %48 ]
  %51 = getelementptr inbounds i8, ptr %.2.ph, i64 8
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %53 = tail call i32 @getBalance(ptr noundef %52)
  %54 = icmp slt i32 %53, 0
  br i1 %54, label %55, label %.thread76

55:                                               ; preds = %50
  %56 = tail call ptr @leftrightZigZag(ptr noundef nonnull %.2.ph)
  br label %.thread76

57:                                               ; preds = %.thread
  %58 = icmp slt i32 %42, -1
  br i1 %58, label %59, label %.thread76

59:                                               ; preds = %57
  %60 = load ptr, ptr %36, align 8, !tbaa !12
  %61 = tail call i32 @getBalance(ptr noundef %60)
  %62 = icmp slt i32 %61, 1
  br i1 %62, label %63, label %65

63:                                               ; preds = %59
  %64 = tail call ptr @rightrightZigZig(ptr noundef nonnull %0)
  br label %65

65:                                               ; preds = %63, %59
  %.4.ph = phi ptr [ %0, %59 ], [ %64, %63 ]
  %66 = getelementptr inbounds i8, ptr %.4.ph, i64 16
  %67 = load ptr, ptr %66, align 8, !tbaa !12
  %68 = tail call i32 @getBalance(ptr noundef %67)
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %70, label %.thread76

70:                                               ; preds = %65
  %71 = tail call ptr @rightleftZigZag(ptr noundef nonnull %.4.ph)
  br label %.thread76

.thread76:                                        ; preds = %57, %50, %55, %.thread62, %65, %70, %2
  %.0 = phi ptr [ null, %2 ], [ %71, %70 ], [ %.4.ph, %65 ], [ null, %.thread62 ], [ %.2.ph, %50 ], [ %56, %55 ], [ %0, %57 ]
  ret ptr %.0
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

attributes #0 = { 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 = !{!"node", !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/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!6, !10, i64 16}
!13 = !{i64 0, i64 4, !14, i64 4, i64 4, !14, i64 8, i64 8, !15, i64 16, i64 8, !15}
!14 = !{!7, !7, i64 0}
!15 = !{!10, !10, i64 0}
!16 = !{!6, !7, i64 4}


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