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

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

@.str.6 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [20 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN3BST11predecessorEP4Node(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #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
declare dso_local noundef ptr @_ZN3BST9successorEP4Node(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare i32 @printf(ptr noundef, ...) #4

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca [55 x i8], align 16
  %3 = alloca i8, align 1
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 55, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #7
  store i8 0, ptr %3, align 1, !tbaa !5
  %9 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %10

10:                                               ; preds = %36, %0
  br label %11

11:                                               ; preds = %10
  %12 = getelementptr inbounds [55 x i8], ptr %2, i64 0, i64 0
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.7, ptr noundef %12)
  %14 = getelementptr inbounds [55 x i8], ptr %2, i64 0, i64 0
  %15 = load i8, ptr %14, align 16, !tbaa !9
  %16 = sext i8 %15 to i32
  %17 = icmp eq i32 %16, 89
  br i1 %17, label %23, label %18

18:                                               ; preds = %11
  %19 = getelementptr inbounds [55 x i8], ptr %2, i64 0, i64 0
  %20 = load i8, ptr %19, align 16, !tbaa !9
  %21 = sext i8 %20 to i32
  %22 = icmp eq i32 %21, 121
  br i1 %22, label %23, label %24

23:                                               ; preds = %18, %11
  store i8 1, ptr %3, align 1, !tbaa !5
  br label %38

24:                                               ; preds = %18
  %25 = getelementptr inbounds [55 x i8], ptr %2, i64 0, i64 0
  %26 = load i8, ptr %25, align 16, !tbaa !9
  %27 = sext i8 %26 to i32
  %28 = icmp eq i32 %27, 78
  br i1 %28, label %34, label %29

29:                                               ; preds = %24
  %30 = getelementptr inbounds [55 x i8], ptr %2, i64 0, i64 0
  %31 = load i8, ptr %30, align 16, !tbaa !9
  %32 = sext i8 %31 to i32
  %33 = icmp eq i32 %32, 110
  br i1 %33, label %34, label %35

34:                                               ; preds = %29, %24
  br label %38

35:                                               ; preds = %29
  br label %36

36:                                               ; preds = %35
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  br label %10, !llvm.loop !10

38:                                               ; preds = %34, %23
  %39 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  br label %40

40:                                               ; preds = %66, %38
  br label %41

41:                                               ; preds = %40
  %42 = getelementptr inbounds [55 x i8], ptr %2, i64 0, i64 0
  %43 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.7, ptr noundef %42)
  %44 = getelementptr inbounds [55 x i8], ptr %2, i64 0, i64 0
  %45 = load i8, ptr %44, align 16, !tbaa !9
  %46 = sext i8 %45 to i32
  %47 = icmp eq i32 %46, 89
  br i1 %47, label %53, label %48

48:                                               ; preds = %41
  %49 = getelementptr inbounds [55 x i8], ptr %2, i64 0, i64 0
  %50 = load i8, ptr %49, align 16, !tbaa !9
  %51 = sext i8 %50 to i32
  %52 = icmp eq i32 %51, 121
  br i1 %52, label %53, label %54

53:                                               ; preds = %48, %41
  br label %68

54:                                               ; preds = %48
  %55 = getelementptr inbounds [55 x i8], ptr %2, i64 0, i64 0
  %56 = load i8, ptr %55, align 16, !tbaa !9
  %57 = sext i8 %56 to i32
  %58 = icmp eq i32 %57, 78
  br i1 %58, label %64, label %59

59:                                               ; preds = %54
  %60 = getelementptr inbounds [55 x i8], ptr %2, i64 0, i64 0
  %61 = load i8, ptr %60, align 16, !tbaa !9
  %62 = sext i8 %61 to i32
  %63 = icmp eq i32 %62, 110
  br i1 %63, label %64, label %65

64:                                               ; preds = %59, %54
  br label %68

65:                                               ; preds = %59
  br label %66

66:                                               ; preds = %65
  %67 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  br label %40, !llvm.loop !12

68:                                               ; preds = %64, %53
  %69 = getelementptr inbounds [55 x i8], ptr %2, i64 0, i64 0
  %70 = load i8, ptr %69, align 16, !tbaa !9
  %71 = sext i8 %70 to i32
  %72 = icmp eq i32 %71, 89
  br i1 %72, label %78, label %73

73:                                               ; preds = %68
  %74 = getelementptr inbounds [55 x i8], ptr %2, i64 0, i64 0
  %75 = load i8, ptr %74, align 16, !tbaa !9
  %76 = sext i8 %75 to i32
  %77 = icmp eq i32 %76, 121
  br i1 %77, label %78, label %88

78:                                               ; preds = %73, %68
  %79 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %80 = trunc i8 %79 to i1
  br i1 %80, label %84, label %81

81:                                               ; preds = %78
  %82 = load ptr, ptr @stdout, align 8, !tbaa !15
  %83 = call ptr @freopen(ptr noundef @.str.10, ptr noundef @.str.11, ptr noundef %82)
  br label %87

84:                                               ; preds = %78
  %85 = load ptr, ptr @stdout, align 8, !tbaa !15
  %86 = call ptr @freopen(ptr noundef @.str.12, ptr noundef @.str.11, ptr noundef %85)
  br label %87

87:                                               ; preds = %84, %81
  br label %88

88:                                               ; preds = %87, %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %89 = call i64 @time(ptr noundef null) #7
  store i64 %89, ptr %4, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %90 = call ptr @localtime(ptr noundef %4) #7
  store ptr %90, ptr %5, align 8, !tbaa !15
  %91 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %92 = load ptr, ptr %5, align 8, !tbaa !15
  %93 = getelementptr inbounds %struct.tm, ptr %92, i32 0, i32 5
  %94 = load i32, ptr %93, align 4, !tbaa !19
  %95 = add nsw i32 %94, 1900
  %96 = load ptr, ptr %5, align 8, !tbaa !15
  %97 = getelementptr inbounds %struct.tm, ptr %96, i32 0, i32 4
  %98 = load i32, ptr %97, align 8, !tbaa !22
  %99 = add nsw i32 %98, 1
  %100 = load ptr, ptr %5, align 8, !tbaa !15
  %101 = getelementptr inbounds %struct.tm, ptr %100, i32 0, i32 3
  %102 = load i32, ptr %101, align 4, !tbaa !23
  %103 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, i32 noundef %95, i32 noundef %99, i32 noundef %102)
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %106 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #8
  invoke void @_ZN3BSTC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %106)
          to label %107 unwind label %113

107:                                              ; preds = %88
  store ptr %106, ptr %6, align 8, !tbaa !15
  %108 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %109 = trunc i8 %108 to i1
  br i1 %109, label %117, label %110

110:                                              ; preds = %107
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %112 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %112, i1 noundef zeroext true)
  br label %120

113:                                              ; preds = %88
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %7, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %106, i64 noundef 8) #9
  br label %359

117:                                              ; preds = %107
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %119 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %119)
  br label %120

120:                                              ; preds = %117, %110
  %121 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.19)
  %123 = load ptr, ptr %6, align 8, !tbaa !15
  %124 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %124, i8 noundef signext 68, i32 noundef 0)
          to label %125 unwind label %131

125:                                              ; preds = %120
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef %124)
  %126 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %127 = trunc i8 %126 to i1
  br i1 %127, label %135, label %128

128:                                              ; preds = %125
  %129 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %130 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %130, i1 noundef zeroext true)
  br label %138

131:                                              ; preds = %120
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %7, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %124, i64 noundef 40) #9
  br label %359

135:                                              ; preds = %125
  %136 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %137 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %137)
  br label %138

138:                                              ; preds = %135, %128
  %139 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str.20)
  %141 = load ptr, ptr %6, align 8, !tbaa !15
  %142 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %142, i8 noundef signext 73, i32 noundef 0)
          to label %143 unwind label %149

143:                                              ; preds = %138
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef %142)
  %144 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %145 = trunc i8 %144 to i1
  br i1 %145, label %153, label %146

146:                                              ; preds = %143
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %148 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %148, i1 noundef zeroext true)
  br label %156

149:                                              ; preds = %138
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %7, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %142, i64 noundef 40) #9
  br label %359

153:                                              ; preds = %143
  %154 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %155 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %155)
  br label %156

156:                                              ; preds = %153, %146
  %157 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %158 = call i32 (ptr, ...) @printf(ptr noundef @.str.21)
  %159 = load ptr, ptr %6, align 8, !tbaa !15
  %160 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %160, i8 noundef signext 78, i32 noundef 0)
          to label %161 unwind label %167

161:                                              ; preds = %156
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef %160)
  %162 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %163 = trunc i8 %162 to i1
  br i1 %163, label %171, label %164

164:                                              ; preds = %161
  %165 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %166 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %166, i1 noundef zeroext true)
  br label %174

167:                                              ; preds = %156
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %7, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %160, i64 noundef 40) #9
  br label %359

171:                                              ; preds = %161
  %172 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %173 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %173)
  br label %174

174:                                              ; preds = %171, %164
  %175 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %176 = call i32 (ptr, ...) @printf(ptr noundef @.str.22)
  %177 = load ptr, ptr %6, align 8, !tbaa !15
  %178 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %178, i8 noundef signext 79, i32 noundef 0)
          to label %179 unwind label %185

179:                                              ; preds = %174
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %177, ptr noundef %178)
  %180 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %181 = trunc i8 %180 to i1
  br i1 %181, label %189, label %182

182:                                              ; preds = %179
  %183 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %184 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %184, i1 noundef zeroext true)
  br label %192

185:                                              ; preds = %174
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %7, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %178, i64 noundef 40) #9
  br label %359

189:                                              ; preds = %179
  %190 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %191 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %191)
  br label %192

192:                                              ; preds = %189, %182
  %193 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %194 = call i32 (ptr, ...) @printf(ptr noundef @.str.23)
  %195 = load ptr, ptr %6, align 8, !tbaa !15
  %196 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %196, i8 noundef signext 83, i32 noundef 0)
          to label %197 unwind label %203

197:                                              ; preds = %192
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %195, ptr noundef %196)
  %198 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %199 = trunc i8 %198 to i1
  br i1 %199, label %207, label %200

200:                                              ; preds = %197
  %201 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %202 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %202, i1 noundef zeroext true)
  br label %210

203:                                              ; preds = %192
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %7, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %196, i64 noundef 40) #9
  br label %359

207:                                              ; preds = %197
  %208 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %209 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %209)
  br label %210

210:                                              ; preds = %207, %200
  %211 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %212 = call i32 (ptr, ...) @printf(ptr noundef @.str.24)
  %213 = load ptr, ptr %6, align 8, !tbaa !15
  %214 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %214, i8 noundef signext 65, i32 noundef 0)
          to label %215 unwind label %221

215:                                              ; preds = %210
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %213, ptr noundef %214)
  %216 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %217 = trunc i8 %216 to i1
  br i1 %217, label %225, label %218

218:                                              ; preds = %215
  %219 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %220 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %220, i1 noundef zeroext true)
  br label %228

221:                                              ; preds = %210
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %7, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %214, i64 noundef 40) #9
  br label %359

225:                                              ; preds = %215
  %226 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %227 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %227)
  br label %228

228:                                              ; preds = %225, %218
  %229 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %230 = call i32 (ptr, ...) @printf(ptr noundef @.str.25)
  %231 = load ptr, ptr %6, align 8, !tbaa !15
  %232 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %232, i8 noundef signext 85, i32 noundef 0)
          to label %233 unwind label %239

233:                                              ; preds = %228
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %231, ptr noundef %232)
  %234 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %235 = trunc i8 %234 to i1
  br i1 %235, label %243, label %236

236:                                              ; preds = %233
  %237 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %238 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %238, i1 noundef zeroext true)
  br label %246

239:                                              ; preds = %228
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %7, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %232, i64 noundef 40) #9
  br label %359

243:                                              ; preds = %233
  %244 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %245 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %245)
  br label %246

246:                                              ; preds = %243, %236
  %247 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %248 = call i32 (ptr, ...) @printf(ptr noundef @.str.26)
  %249 = load ptr, ptr %6, align 8, !tbaa !15
  %250 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %250, i8 noundef signext 82, i32 noundef 0)
          to label %251 unwind label %257

251:                                              ; preds = %246
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %249, ptr noundef %250)
  %252 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %253 = trunc i8 %252 to i1
  br i1 %253, label %261, label %254

254:                                              ; preds = %251
  %255 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %256 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %256, i1 noundef zeroext true)
  br label %264

257:                                              ; preds = %246
  %258 = landingpad { ptr, i32 }
          cleanup
  %259 = extractvalue { ptr, i32 } %258, 0
  store ptr %259, ptr %7, align 8
  %260 = extractvalue { ptr, i32 } %258, 1
  store i32 %260, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %250, i64 noundef 40) #9
  br label %359

261:                                              ; preds = %251
  %262 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %263 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %263)
  br label %264

264:                                              ; preds = %261, %254
  %265 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %266 = call i32 (ptr, ...) @printf(ptr noundef @.str.27)
  %267 = load ptr, ptr %6, align 8, !tbaa !15
  %268 = load ptr, ptr %6, align 8, !tbaa !15
  %269 = call noundef ptr @_ZN3BST6searchEc(ptr noundef nonnull align 8 dereferenceable(8) %268, i8 noundef signext 68)
  %270 = call noundef ptr @_ZN3BST11predecessorEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %267, ptr noundef %269)
  %271 = getelementptr inbounds %class.Node, ptr %270, i32 0, i32 0
  %272 = load i8, ptr %271, align 8, !tbaa !24
  %273 = sext i8 %272 to i32
  %274 = call i32 (ptr, ...) @printf(ptr noundef @.str.28, i32 noundef %273)
  %275 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %276 = call i32 (ptr, ...) @printf(ptr noundef @.str.29)
  %277 = load ptr, ptr %6, align 8, !tbaa !15
  %278 = load ptr, ptr %6, align 8, !tbaa !15
  %279 = call noundef ptr @_ZN3BST6searchEc(ptr noundef nonnull align 8 dereferenceable(8) %278, i8 noundef signext 73)
  call void @_ZN3BST6DeleteEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %277, ptr noundef %279)
  %280 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %281 = trunc i8 %280 to i1
  br i1 %281, label %285, label %282

282:                                              ; preds = %264
  %283 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %284 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %284, i1 noundef zeroext true)
  br label %288

285:                                              ; preds = %264
  %286 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %287 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %287)
  br label %288

288:                                              ; preds = %285, %282
  %289 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %290 = call i32 (ptr, ...) @printf(ptr noundef @.str.30)
  %291 = load ptr, ptr %6, align 8, !tbaa !15
  %292 = call noundef ptr @_ZN3BST7maximumEv(ptr noundef nonnull align 8 dereferenceable(8) %291)
  %293 = getelementptr inbounds %class.Node, ptr %292, i32 0, i32 0
  %294 = load i8, ptr %293, align 8, !tbaa !24
  %295 = sext i8 %294 to i32
  %296 = call i32 (ptr, ...) @printf(ptr noundef @.str.31, i32 noundef %295)
  %297 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %298 = call i32 (ptr, ...) @printf(ptr noundef @.str.32)
  %299 = load ptr, ptr %6, align 8, !tbaa !15
  %300 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %300, i8 noundef signext 90, i32 noundef 0)
          to label %301 unwind label %307

301:                                              ; preds = %288
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %299, ptr noundef %300)
  %302 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %303 = trunc i8 %302 to i1
  br i1 %303, label %311, label %304

304:                                              ; preds = %301
  %305 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %306 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %306, i1 noundef zeroext true)
  br label %314

307:                                              ; preds = %288
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %7, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %300, i64 noundef 40) #9
  br label %359

311:                                              ; preds = %301
  %312 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %313 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %313)
  br label %314

314:                                              ; preds = %311, %304
  %315 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %316 = call i32 (ptr, ...) @printf(ptr noundef @.str.33)
  %317 = load ptr, ptr %6, align 8, !tbaa !15
  %318 = load ptr, ptr %6, align 8, !tbaa !15
  %319 = call noundef ptr @_ZN3BST6searchEc(ptr noundef nonnull align 8 dereferenceable(8) %318, i8 noundef signext 82)
  %320 = call noundef ptr @_ZN3BST9successorEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %317, ptr noundef %319)
  %321 = getelementptr inbounds %class.Node, ptr %320, i32 0, i32 0
  %322 = load i8, ptr %321, align 8, !tbaa !24
  %323 = sext i8 %322 to i32
  %324 = call i32 (ptr, ...) @printf(ptr noundef @.str.34, i32 noundef %323)
  %325 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %326 = call i32 (ptr, ...) @printf(ptr noundef @.str.35)
  %327 = load ptr, ptr %6, align 8, !tbaa !15
  %328 = load ptr, ptr %6, align 8, !tbaa !15
  %329 = call noundef ptr @_ZN3BST6searchEc(ptr noundef nonnull align 8 dereferenceable(8) %328, i8 noundef signext 83)
  call void @_ZN3BST6DeleteEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %327, ptr noundef %329)
  %330 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %331 = trunc i8 %330 to i1
  br i1 %331, label %335, label %332

332:                                              ; preds = %314
  %333 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %334 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %334, i1 noundef zeroext true)
  br label %338

335:                                              ; preds = %314
  %336 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %337 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %337)
  br label %338

338:                                              ; preds = %335, %332
  %339 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %340 = call i32 (ptr, ...) @printf(ptr noundef @.str.36)
  %341 = load ptr, ptr %6, align 8, !tbaa !15
  %342 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %342, i8 noundef signext 84, i32 noundef 0)
          to label %343 unwind label %349

343:                                              ; preds = %338
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %341, ptr noundef %342)
  %344 = load i8, ptr %3, align 1, !tbaa !5, !range !13, !noundef !14
  %345 = trunc i8 %344 to i1
  br i1 %345, label %353, label %346

346:                                              ; preds = %343
  %347 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %348 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %348, i1 noundef zeroext true)
  br label %356

349:                                              ; preds = %338
  %350 = landingpad { ptr, i32 }
          cleanup
  %351 = extractvalue { ptr, i32 } %350, 0
  store ptr %351, ptr %7, align 8
  %352 = extractvalue { ptr, i32 } %350, 1
  store i32 %352, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %342, i64 noundef 40) #9
  br label %359

353:                                              ; preds = %343
  %354 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %355 = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %355)
  br label %356

356:                                              ; preds = %353, %346
  %357 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %358 = call i32 (ptr, ...) @printf(ptr noundef @.str.37)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 55, ptr %2) #7
  ret i32 0

359:                                              ; preds = %349, %307, %257, %239, %221, %203, %185, %167, %149, %131, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 55, ptr %2) #7
  br label %360

360:                                              ; preds = %359
  %361 = load ptr, ptr %7, align 8
  %362 = load i32, ptr %8, align 4
  %363 = insertvalue { ptr, i32 } poison, ptr %361, 0
  %364 = insertvalue { ptr, i32 } %363, i32 %362, 1
  resume { ptr, i32 } %364
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #4

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #6

; Function Attrs: nounwind
declare ptr @localtime(ptr noundef) #6

declare void @_ZN4NodeC1Eci(ptr, i8, i32)

declare void @_ZN3BSTC1Ev(ptr)

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 = { 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 = { "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 norecurse 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!20, !21, i64 20}
!20 = !{!"_ZTS2tm", !21, i64 0, !21, i64 4, !21, i64 8, !21, i64 12, !21, i64 16, !21, i64 20, !21, i64 24, !21, i64 28, !21, i64 32, !18, i64 40, !16, i64 48}
!21 = !{!"int", !7, i64 0}
!22 = !{!20, !21, i64 16}
!23 = !{!20, !21, i64 12}
!24 = !{!25, !7, i64 0}
!25 = !{!"_ZTS4Node", !7, i64 0, !21, i64 4, !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32}


; 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.6 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [20 x i8], align 1

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

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

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

; 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 uwtable
declare dso_local noundef ptr @_ZN3BST9successorEP4Node(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

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

; 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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca [55 x i8], align 16
  %2 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 55, ptr nonnull %1) #8
  %3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  br label %4

4:                                                ; preds = %7, %0
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.7, ptr noundef nonnull %1)
  %6 = load i8, ptr %1, align 16
  switch i8 %6, label %7 [
    i8 121, label %.peel.begin
    i8 110, label %.peel.begin
    i8 89, label %.peel.begin
    i8 78, label %.peel.begin
  ]

7:                                                ; preds = %4
  %8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %4, !llvm.loop !5

.peel.begin:                                      ; preds = %4, %4, %4, %4
  %9 = and i8 %6, -33
  %or.cond.le = icmp eq i8 %9, 89
  %10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.7, ptr noundef nonnull %1)
  %12 = load i8, ptr %1, align 16
  switch i8 %12, label %.peel.newph [
    i8 121, label %.loopexit
    i8 110, label %.loopexit
    i8 89, label %.loopexit
    i8 78, label %.loopexit
  ]

.peel.newph:                                      ; preds = %.peel.begin, %.peel.newph
  %13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.7, ptr noundef nonnull %1)
  %15 = load i8, ptr %1, align 16
  switch i8 %15, label %.peel.newph [
    i8 121, label %.loopexit
    i8 110, label %.loopexit
    i8 89, label %.loopexit
    i8 78, label %.loopexit
  ], !llvm.loop !7

.loopexit:                                        ; preds = %.peel.newph, %.peel.newph, %.peel.newph, %.peel.newph, %.peel.begin, %.peel.begin, %.peel.begin, %.peel.begin
  %.lcssa = phi i8 [ %12, %.peel.begin ], [ %12, %.peel.begin ], [ %12, %.peel.begin ], [ %12, %.peel.begin ], [ %15, %.peel.newph ], [ %15, %.peel.newph ], [ %15, %.peel.newph ], [ %15, %.peel.newph ]
  %16 = and i8 %.lcssa, -33
  %or.cond19 = icmp eq i8 %16, 89
  br i1 %or.cond19, label %.sink.split, label %19

.sink.split:                                      ; preds = %.loopexit
  %17 = load ptr, ptr @stdout, align 8, !tbaa !9
  %.str.12..str.10 = select i1 %or.cond.le, ptr @.str.12, ptr @.str.10
  %18 = call ptr @freopen(ptr noundef nonnull %.str.12..str.10, ptr noundef nonnull @.str.11, ptr noundef %17)
  br label %19

19:                                               ; preds = %.sink.split, %.loopexit
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %20 = call i64 @time(ptr noundef null) #8
  store i64 %20, ptr %2, align 8, !tbaa !13
  %21 = call ptr @localtime(ptr noundef nonnull %2) #8
  %22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %23 = getelementptr inbounds i8, ptr %21, i64 20
  %24 = load i32, ptr %23, align 4, !tbaa !15
  %25 = add nsw i32 %24, 1900
  %26 = getelementptr inbounds i8, ptr %21, i64 16
  %27 = load i32, ptr %26, align 8, !tbaa !18
  %28 = add nsw i32 %27, 1
  %29 = getelementptr inbounds i8, ptr %21, i64 12
  %30 = load i32, ptr %29, align 4, !tbaa !19
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef %25, i32 noundef %28, i32 noundef %30)
  %32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  %34 = call noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #9
  invoke void @_ZN3BSTC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %35 unwind label %38

35:                                               ; preds = %19
  br i1 %or.cond.le, label %40, label %36

36:                                               ; preds = %35
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %34, i1 noundef zeroext true)
  br label %42

38:                                               ; preds = %19
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %34, i64 noundef 8) #10
  br label %191

40:                                               ; preds = %35
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %42

42:                                               ; preds = %40, %36
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19)
  %45 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %45, i8 noundef signext 68, i32 noundef 0)
          to label %46 unwind label %49

46:                                               ; preds = %42
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull %45)
  br i1 %or.cond.le, label %51, label %47

47:                                               ; preds = %46
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %34, i1 noundef zeroext true)
  br label %53

49:                                               ; preds = %42
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %45, i64 noundef 40) #10
  br label %191

51:                                               ; preds = %46
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %53

53:                                               ; preds = %51, %47
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20)
  %56 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %56, i8 noundef signext 73, i32 noundef 0)
          to label %57 unwind label %60

57:                                               ; preds = %53
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull %56)
  br i1 %or.cond.le, label %62, label %58

58:                                               ; preds = %57
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %34, i1 noundef zeroext true)
  br label %64

60:                                               ; preds = %53
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %56, i64 noundef 40) #10
  br label %191

62:                                               ; preds = %57
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %64

64:                                               ; preds = %62, %58
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21)
  %67 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %67, i8 noundef signext 78, i32 noundef 0)
          to label %68 unwind label %71

68:                                               ; preds = %64
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull %67)
  br i1 %or.cond.le, label %73, label %69

69:                                               ; preds = %68
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %34, i1 noundef zeroext true)
  br label %75

71:                                               ; preds = %64
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %67, i64 noundef 40) #10
  br label %191

73:                                               ; preds = %68
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %75

75:                                               ; preds = %73, %69
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22)
  %78 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %78, i8 noundef signext 79, i32 noundef 0)
          to label %79 unwind label %82

79:                                               ; preds = %75
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull %78)
  br i1 %or.cond.le, label %84, label %80

80:                                               ; preds = %79
  %81 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %34, i1 noundef zeroext true)
  br label %86

82:                                               ; preds = %75
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %78, i64 noundef 40) #10
  br label %191

84:                                               ; preds = %79
  %85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %86

86:                                               ; preds = %84, %80
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23)
  %89 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %89, i8 noundef signext 83, i32 noundef 0)
          to label %90 unwind label %93

90:                                               ; preds = %86
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull %89)
  br i1 %or.cond.le, label %95, label %91

91:                                               ; preds = %90
  %92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %34, i1 noundef zeroext true)
  br label %97

93:                                               ; preds = %86
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %89, i64 noundef 40) #10
  br label %191

95:                                               ; preds = %90
  %96 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %97

97:                                               ; preds = %95, %91
  %98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %99 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24)
  %100 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %100, i8 noundef signext 65, i32 noundef 0)
          to label %101 unwind label %104

101:                                              ; preds = %97
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull %100)
  br i1 %or.cond.le, label %106, label %102

102:                                              ; preds = %101
  %103 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %34, i1 noundef zeroext true)
  br label %108

104:                                              ; preds = %97
  %105 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %100, i64 noundef 40) #10
  br label %191

106:                                              ; preds = %101
  %107 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %108

108:                                              ; preds = %106, %102
  %109 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %110 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25)
  %111 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %111, i8 noundef signext 85, i32 noundef 0)
          to label %112 unwind label %115

112:                                              ; preds = %108
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull %111)
  br i1 %or.cond.le, label %117, label %113

113:                                              ; preds = %112
  %114 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %34, i1 noundef zeroext true)
  br label %119

115:                                              ; preds = %108
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %111, i64 noundef 40) #10
  br label %191

117:                                              ; preds = %112
  %118 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %119

119:                                              ; preds = %117, %113
  %120 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %121 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26)
  %122 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %122, i8 noundef signext 82, i32 noundef 0)
          to label %123 unwind label %126

123:                                              ; preds = %119
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull %122)
  br i1 %or.cond.le, label %128, label %124

124:                                              ; preds = %123
  %125 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %34, i1 noundef zeroext true)
  br label %130

126:                                              ; preds = %119
  %127 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %122, i64 noundef 40) #10
  br label %191

128:                                              ; preds = %123
  %129 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %130

130:                                              ; preds = %128, %124
  %131 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %132 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27)
  %133 = call noundef ptr @_ZN3BST6searchEc(ptr noundef nonnull align 8 dereferenceable(8) %34, i8 noundef signext 68)
  %134 = call noundef ptr @_ZN3BST11predecessorEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef %133)
  %135 = load i8, ptr %134, align 8, !tbaa !20
  %136 = sext i8 %135 to i32
  %137 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.28, i32 noundef %136)
  %138 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %139 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.29)
  %140 = call noundef ptr @_ZN3BST6searchEc(ptr noundef nonnull align 8 dereferenceable(8) %34, i8 noundef signext 73)
  call void @_ZN3BST6DeleteEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef %140)
  br i1 %or.cond.le, label %143, label %141

141:                                              ; preds = %130
  %142 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %34, i1 noundef zeroext true)
  br label %145

143:                                              ; preds = %130
  %144 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %145

145:                                              ; preds = %143, %141
  %146 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %147 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.30)
  %148 = call noundef ptr @_ZN3BST7maximumEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  %149 = load i8, ptr %148, align 8, !tbaa !20
  %150 = sext i8 %149 to i32
  %151 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.31, i32 noundef %150)
  %152 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %153 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32)
  %154 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %154, i8 noundef signext 90, i32 noundef 0)
          to label %155 unwind label %158

155:                                              ; preds = %145
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull %154)
  br i1 %or.cond.le, label %160, label %156

156:                                              ; preds = %155
  %157 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %34, i1 noundef zeroext true)
  br label %162

158:                                              ; preds = %145
  %159 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %154, i64 noundef 40) #10
  br label %191

160:                                              ; preds = %155
  %161 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %162

162:                                              ; preds = %160, %156
  %163 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %164 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.33)
  %165 = call noundef ptr @_ZN3BST6searchEc(ptr noundef nonnull align 8 dereferenceable(8) %34, i8 noundef signext 82)
  %166 = call noundef ptr @_ZN3BST9successorEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef %165)
  %167 = load i8, ptr %166, align 8, !tbaa !20
  %168 = sext i8 %167 to i32
  %169 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.34, i32 noundef %168)
  %170 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %171 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.35)
  %172 = call noundef ptr @_ZN3BST6searchEc(ptr noundef nonnull align 8 dereferenceable(8) %34, i8 noundef signext 83)
  call void @_ZN3BST6DeleteEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef %172)
  br i1 %or.cond.le, label %175, label %173

173:                                              ; preds = %162
  %174 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %34, i1 noundef zeroext true)
  br label %177

175:                                              ; preds = %162
  %176 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %177

177:                                              ; preds = %175, %173
  %178 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %179 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.36)
  %180 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
  invoke void @_ZN4NodeC1Eci(ptr noundef nonnull align 8 dereferenceable(40) %180, i8 noundef signext 84, i32 noundef 0)
          to label %181 unwind label %184

181:                                              ; preds = %177
  call void @_ZN3BST6InsertEP4Node(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull %180)
  br i1 %or.cond.le, label %186, label %182

182:                                              ; preds = %181
  %183 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @_ZN3BST12inOrderPrintEb(ptr noundef nonnull align 8 dereferenceable(8) %34, i1 noundef zeroext true)
  br label %188

184:                                              ; preds = %177
  %185 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %180, i64 noundef 40) #10
  br label %191

186:                                              ; preds = %181
  %187 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @_ZN3BST11prettyPrintEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %188

188:                                              ; preds = %186, %182
  %189 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %190 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.37)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 55, ptr nonnull %1) #8
  ret i32 0

191:                                              ; preds = %184, %158, %126, %115, %104, %93, %82, %71, %60, %49, %38
  %.pn = phi { ptr, i32 } [ %185, %184 ], [ %159, %158 ], [ %127, %126 ], [ %116, %115 ], [ %105, %104 ], [ %94, %93 ], [ %83, %82 ], [ %72, %71 ], [ %61, %60 ], [ %50, %49 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 55, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #7

; Function Attrs: nounwind
declare ptr @localtime(ptr noundef) local_unnamed_addr #7

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

declare void @_ZN3BSTC1Ev(ptr) local_unnamed_addr

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nofree 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 = { mustprogress norecurse 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 #6 = { "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 "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 #8 = { nounwind }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6, !8}
!8 = !{!"llvm.loop.peeled.count", i32 1}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !11, i64 0}
!15 = !{!16, !17, i64 20}
!16 = !{!"_ZTS2tm", !17, i64 0, !17, i64 4, !17, i64 8, !17, i64 12, !17, i64 16, !17, i64 20, !17, i64 24, !17, i64 28, !17, i64 32, !14, i64 40, !10, i64 48}
!17 = !{!"int", !11, i64 0}
!18 = !{!16, !17, i64 16}
!19 = !{!16, !17, i64 12}
!20 = !{!21, !11, i64 0}
!21 = !{!"_ZTS4Node", !11, i64 0, !17, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}


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