; LLVM IR from mahanzavari/ARBAB :: src (main)

; 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.HashMap = type { [10 x ptr] }
%struct.HashMapNode = type { [32 x i8], ptr, ptr }
%struct.Table = type { [32 x i8], ptr, i32, ptr, ptr, ptr, i32 }
%struct.Record = type { [8 x ptr], ptr, ptr }

@hashmap = external global %struct.HashMap, align 8
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@stdin = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [54 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [256 x i8], align 16
  %3 = alloca i32, align 4
  %4 = alloca [32 x i8], align 16
  %5 = alloca [256 x i8], align 16
  %6 = alloca ptr, align 8
  %7 = alloca [32 x i8], align 16
  %8 = alloca [256 x i8], align 16
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 256, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %24, %0
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = icmp slt i32 %17, 10
  br i1 %18, label %20, label %19

19:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %27

20:                                               ; preds = %16
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [10 x ptr], ptr @hashmap, i64 0, i64 %22
  store ptr null, ptr %23, align 8, !tbaa !9
  br label %24

24:                                               ; preds = %20
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %3, align 4, !tbaa !5
  br label %16, !llvm.loop !11

27:                                               ; preds = %19
  br label %28

28:                                               ; preds = %175, %27
  br label %29

29:                                               ; preds = %28
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %31 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %32 = load ptr, ptr @stdin, align 8, !tbaa !9
  %33 = call ptr @fgets(ptr noundef %31, i32 noundef 256, ptr noundef %32)
  %34 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %35 = call i64 @strcspn(ptr noundef %34, ptr noundef @.str.1) #6
  %36 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 %35
  store i8 0, ptr %36, align 1, !tbaa !13
  %37 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %38 = call i32 @strncmp(ptr noundef %37, ptr noundef @.str.2, i64 noundef 12) #6
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %42

40:                                               ; preds = %29
  %41 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  call void @create_table_cmd(ptr noundef %41)
  br label %175

42:                                               ; preds = %29
  %43 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %44 = call i32 @strncmp(ptr noundef %43, ptr noundef @.str.3, i64 noundef 12) #6
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %46, label %48

46:                                               ; preds = %42
  %47 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  call void @delete_table_cmd(ptr noundef %47)
  br label %174

48:                                               ; preds = %42
  %49 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %50 = call i32 @strncmp(ptr noundef %49, ptr noundef @.str.4, i64 noundef 12) #6
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %54

52:                                               ; preds = %48
  %53 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  call void @create_index_cmd(ptr noundef %53)
  br label %173

54:                                               ; preds = %48
  %55 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %56 = call i32 @strncmp(ptr noundef %55, ptr noundef @.str.5, i64 noundef 3) #6
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %60

58:                                               ; preds = %54
  %59 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  call void @add_record_cmd(ptr noundef %59)
  br label %172

60:                                               ; preds = %54
  %61 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %62 = call i32 @strncmp(ptr noundef %61, ptr noundef @.str.6, i64 noundef 6) #6
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %66

64:                                               ; preds = %60
  %65 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  call void @delete_record_cmd(ptr noundef %65)
  br label %171

66:                                               ; preds = %60
  %67 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %68 = call i32 @strncmp(ptr noundef %67, ptr noundef @.str.7, i64 noundef 6) #6
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %70, label %72

70:                                               ; preds = %66
  %71 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  call void @update_record_cmd(ptr noundef %71)
  br label %170

72:                                               ; preds = %66
  %73 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %74 = call i32 @strncmp(ptr noundef %73, ptr noundef @.str.8, i64 noundef 6) #6
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %85

76:                                               ; preds = %72
  %77 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %78 = call ptr @strstr(ptr noundef %77, ptr noundef @.str.9) #6
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %82

80:                                               ; preds = %76
  %81 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  call void @select_records_where_cmd(ptr noundef %81)
  br label %84

82:                                               ; preds = %76
  %83 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  call void @select_records_cmd(ptr noundef %83)
  br label %84

84:                                               ; preds = %82, %80
  br label %169

85:                                               ; preds = %72
  %86 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %87 = call i32 @strcmp(ptr noundef %86, ptr noundef @.str.10) #6
  %88 = icmp eq i32 %87, 0
  br i1 %88, label %89, label %90

89:                                               ; preds = %85
  call void (...) @help()
  br label %168

90:                                               ; preds = %85
  %91 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %92 = call i32 @strcmp(ptr noundef %91, ptr noundef @.str.11) #6
  %93 = icmp eq i32 %92, 0
  br i1 %93, label %94, label %95

94:                                               ; preds = %90
  call void (...) @begin_transaction()
  br label %167

95:                                               ; preds = %90
  %96 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %97 = call i32 @strcmp(ptr noundef %96, ptr noundef @.str.12) #6
  %98 = icmp eq i32 %97, 0
  br i1 %98, label %99, label %100

99:                                               ; preds = %95
  call void (...) @commit_transaction()
  br label %166

100:                                              ; preds = %95
  %101 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %102 = call i32 @strcmp(ptr noundef %101, ptr noundef @.str.13) #6
  %103 = icmp eq i32 %102, 0
  br i1 %103, label %104, label %105

104:                                              ; preds = %100
  call void (...) @rollback_transaction()
  br label %165

105:                                              ; preds = %100
  %106 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %107 = call i32 @strncmp(ptr noundef %106, ptr noundef @.str.14, i64 noundef 11) #6
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %109, label %130

109:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 256, ptr %5) #5
  %110 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %111 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  %112 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %113 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %110, ptr noundef @.str.15, ptr noundef %111, ptr noundef %112) #5
  %114 = icmp eq i32 %113, 2
  br i1 %114, label %115, label %127

115:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %116 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  %117 = call ptr @find_table(ptr noundef %116)
  store ptr %117, ptr %6, align 8, !tbaa !9
  %118 = load ptr, ptr %6, align 8, !tbaa !9
  %119 = icmp eq ptr %118, null
  br i1 %119, label %120, label %123

120:                                              ; preds = %115
  %121 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, ptr noundef %121)
  br label %126

123:                                              ; preds = %115
  %124 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %125 = load ptr, ptr %6, align 8, !tbaa !9
  call void @save_to_binary(ptr noundef %124, ptr noundef %125)
  br label %126

126:                                              ; preds = %123, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %129

127:                                              ; preds = %109
  %128 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  br label %129

129:                                              ; preds = %127, %126
  call void @llvm.lifetime.end.p0(i64 256, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  br label %164

130:                                              ; preds = %105
  %131 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %132 = call i32 @strncmp(ptr noundef %131, ptr noundef @.str.18, i64 noundef 11) #6
  %133 = icmp eq i32 %132, 0
  br i1 %133, label %134, label %155

134:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 256, ptr %8) #5
  %135 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %136 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 0
  %137 = getelementptr inbounds [256 x i8], ptr %8, i64 0, i64 0
  %138 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %135, ptr noundef @.str.19, ptr noundef %136, ptr noundef %137) #5
  %139 = icmp eq i32 %138, 2
  br i1 %139, label %140, label %152

140:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %141 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 0
  %142 = call ptr @find_table(ptr noundef %141)
  store ptr %142, ptr %9, align 8, !tbaa !9
  %143 = load ptr, ptr %9, align 8, !tbaa !9
  %144 = icmp eq ptr %143, null
  br i1 %144, label %145, label %148

145:                                              ; preds = %140
  %146 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 0
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, ptr noundef %146)
  br label %151

148:                                              ; preds = %140
  %149 = getelementptr inbounds [256 x i8], ptr %8, i64 0, i64 0
  %150 = load ptr, ptr %9, align 8, !tbaa !9
  call void @load_from_binary(ptr noundef %149, ptr noundef %150)
  br label %151

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

152:                                              ; preds = %134
  %153 = call i32 (ptr, ...) @printf(ptr noundef @.str.20)
  br label %154

154:                                              ; preds = %152, %151
  call void @llvm.lifetime.end.p0(i64 256, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  br label %163

155:                                              ; preds = %130
  %156 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %157 = call i32 @strcmp(ptr noundef %156, ptr noundef @.str.21) #6
  %158 = icmp eq i32 %157, 0
  br i1 %158, label %159, label %160

159:                                              ; preds = %155
  br label %176

160:                                              ; preds = %155
  %161 = call i32 (ptr, ...) @printf(ptr noundef @.str.22)
  br label %162

162:                                              ; preds = %160
  br label %163

163:                                              ; preds = %162, %154
  br label %164

164:                                              ; preds = %163, %129
  br label %165

165:                                              ; preds = %164, %104
  br label %166

166:                                              ; preds = %165, %99
  br label %167

167:                                              ; preds = %166, %94
  br label %168

168:                                              ; preds = %167, %89
  br label %169

169:                                              ; preds = %168, %84
  br label %170

170:                                              ; preds = %169, %70
  br label %171

171:                                              ; preds = %170, %64
  br label %172

172:                                              ; preds = %171, %58
  br label %173

173:                                              ; preds = %172, %52
  br label %174

174:                                              ; preds = %173, %46
  br label %175

175:                                              ; preds = %174, %40
  br label %28

176:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %177

177:                                              ; preds = %217, %176
  %178 = load i32, ptr %10, align 4, !tbaa !5
  %179 = icmp slt i32 %178, 10
  br i1 %179, label %181, label %180

180:                                              ; preds = %177
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %220

181:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %182 = load i32, ptr %10, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [10 x ptr], ptr @hashmap, i64 0, i64 %183
  %185 = load ptr, ptr %184, align 8, !tbaa !9
  store ptr %185, ptr %11, align 8, !tbaa !9
  br label %186

186:                                              ; preds = %209, %181
  %187 = load ptr, ptr %11, align 8, !tbaa !9
  %188 = icmp ne ptr %187, null
  br i1 %188, label %189, label %216

189:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %190 = load ptr, ptr %11, align 8, !tbaa !9
  %191 = getelementptr inbounds %struct.HashMapNode, ptr %190, i32 0, i32 2
  %192 = load ptr, ptr %191, align 8, !tbaa !14
  store ptr %192, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %193 = load ptr, ptr %11, align 8, !tbaa !9
  %194 = getelementptr inbounds %struct.HashMapNode, ptr %193, i32 0, i32 1
  %195 = load ptr, ptr %194, align 8, !tbaa !16
  store ptr %195, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %196 = load ptr, ptr %13, align 8, !tbaa !9
  %197 = getelementptr inbounds %struct.Table, ptr %196, i32 0, i32 3
  %198 = load ptr, ptr %197, align 8, !tbaa !17
  store ptr %198, ptr %14, align 8, !tbaa !9
  br label %199

199:                                              ; preds = %202, %189
  %200 = load ptr, ptr %14, align 8, !tbaa !9
  %201 = icmp ne ptr %200, null
  br i1 %201, label %202, label %209

202:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %203 = load ptr, ptr %14, align 8, !tbaa !9
  %204 = getelementptr inbounds %struct.Record, ptr %203, i32 0, i32 1
  %205 = load ptr, ptr %204, align 8, !tbaa !19
  store ptr %205, ptr %15, align 8, !tbaa !9
  %206 = load ptr, ptr %13, align 8, !tbaa !9
  %207 = load ptr, ptr %14, align 8, !tbaa !9
  call void @free_record_data(ptr noundef %206, ptr noundef %207)
  %208 = load ptr, ptr %15, align 8, !tbaa !9
  store ptr %208, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %199, !llvm.loop !21

209:                                              ; preds = %199
  %210 = load ptr, ptr %13, align 8, !tbaa !9
  %211 = getelementptr inbounds %struct.Table, ptr %210, i32 0, i32 5
  %212 = load ptr, ptr %211, align 8, !tbaa !22
  call void @rbt_free_tree(ptr noundef %212)
  %213 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %213) #5
  %214 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %214) #5
  %215 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr %215, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %186, !llvm.loop !23

216:                                              ; preds = %186
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %10, align 4, !tbaa !5
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %10, align 4, !tbaa !5
  br label %177, !llvm.loop !24

220:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 256, ptr %2) #5
  ret i32 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

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

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strcspn(ptr noundef, ptr noundef) #3

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

declare void @create_table_cmd(ptr noundef) #2

declare void @delete_table_cmd(ptr noundef) #2

declare void @create_index_cmd(ptr noundef) #2

declare void @add_record_cmd(ptr noundef) #2

declare void @delete_record_cmd(ptr noundef) #2

declare void @update_record_cmd(ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strstr(ptr noundef, ptr noundef) #3

declare void @select_records_where_cmd(ptr noundef) #2

declare void @select_records_cmd(ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #3

declare void @help(...) #2

declare void @begin_transaction(...) #2

declare void @commit_transaction(...) #2

declare void @rollback_transaction(...) #2

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #4

declare ptr @find_table(ptr noundef) #2

declare void @save_to_binary(ptr noundef, ptr noundef) #2

declare void @load_from_binary(ptr noundef, ptr noundef) #2

declare void @free_record_data(ptr noundef, ptr noundef) #2

declare void @rbt_free_tree(ptr noundef) #2

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

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 = { "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 willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !10, i64 40}
!15 = !{!"HashMapNode", !7, i64 0, !10, i64 32, !10, i64 40}
!16 = !{!15, !10, i64 32}
!17 = !{!18, !10, i64 48}
!18 = !{!"Table", !7, i64 0, !10, i64 32, !6, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !6, i64 72}
!19 = !{!20, !10, i64 64}
!20 = !{!"Record", !7, i64 0, !10, i64 64, !10, i64 72}
!21 = distinct !{!21, !12}
!22 = !{!18, !10, i64 64}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}


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

%struct.HashMap = type { [10 x ptr] }

@hashmap = external local_unnamed_addr global %struct.HashMap, align 8
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [54 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
.preheader29.preheader:
  %0 = alloca [256 x i8], align 16
  %1 = alloca [32 x i8], align 16
  %2 = alloca [256 x i8], align 16
  %3 = alloca [32 x i8], align 16
  %4 = alloca [256 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %0) #7
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) @hashmap, i8 0, i64 80, i1 false), !tbaa !5
  br label %.preheader29

.preheader29:                                     ; preds = %.preheader29.backedge, %.preheader29.preheader
  %5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %6 = load ptr, ptr @stdin, align 8, !tbaa !5
  %7 = call ptr @fgets(ptr noundef nonnull %0, i32 noundef 256, ptr noundef %6)
  %8 = call i64 @strcspn(ptr noundef nonnull %0, ptr noundef nonnull @.str.1) #8
  %9 = getelementptr inbounds [256 x i8], ptr %0, i64 0, i64 %8
  store i8 0, ptr %9, align 1, !tbaa !9
  %10 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef 12) #8
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %13

12:                                               ; preds = %.preheader29
  call void @create_table_cmd(ptr noundef nonnull %0) #7
  br label %.preheader29.backedge

13:                                               ; preds = %.preheader29
  %14 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef 12) #8
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %16, label %17

16:                                               ; preds = %13
  call void @delete_table_cmd(ptr noundef nonnull %0) #7
  br label %.preheader29.backedge

.preheader29.backedge:                            ; preds = %16, %24, %32, %43, %51, %70, %90, %85, %55, %47, %38, %39, %28, %20, %12
  br label %.preheader29

17:                                               ; preds = %13
  %18 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef 12) #8
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %21

20:                                               ; preds = %17
  call void @create_index_cmd(ptr noundef nonnull %0) #7
  br label %.preheader29.backedge

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

24:                                               ; preds = %21
  call void @add_record_cmd(ptr noundef nonnull %0) #7
  br label %.preheader29.backedge

25:                                               ; preds = %21
  %26 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.6, i64 noundef 6) #8
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %25
  call void @delete_record_cmd(ptr noundef nonnull %0) #7
  br label %.preheader29.backedge

29:                                               ; preds = %25
  %30 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.7, i64 noundef 6) #8
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %29
  call void @update_record_cmd(ptr noundef nonnull %0) #7
  br label %.preheader29.backedge

33:                                               ; preds = %29
  %34 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.8, i64 noundef 6) #8
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %40

36:                                               ; preds = %33
  %37 = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.9) #8
  %.not28 = icmp eq ptr %37, null
  br i1 %.not28, label %39, label %38

38:                                               ; preds = %36
  call void @select_records_where_cmd(ptr noundef nonnull %0) #7
  br label %.preheader29.backedge

39:                                               ; preds = %36
  call void @select_records_cmd(ptr noundef nonnull %0) #7
  br label %.preheader29.backedge

40:                                               ; preds = %33
  %41 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.10) #8
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %44

43:                                               ; preds = %40
  call void (...) @help() #7
  br label %.preheader29.backedge

44:                                               ; preds = %40
  %45 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.11) #8
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %48

47:                                               ; preds = %44
  call void (...) @begin_transaction() #7
  br label %.preheader29.backedge

48:                                               ; preds = %44
  %49 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.12) #8
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  call void (...) @commit_transaction() #7
  br label %.preheader29.backedge

52:                                               ; preds = %48
  %53 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.13) #8
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %52
  call void (...) @rollback_transaction() #7
  br label %.preheader29.backedge

56:                                               ; preds = %52
  %57 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.14, i64 noundef 11) #8
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %71

59:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %2) #7
  %60 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %0, ptr noundef nonnull @.str.15, ptr noundef nonnull %1, ptr noundef nonnull %2) #7
  %61 = icmp eq i32 %60, 2
  br i1 %61, label %62, label %68

62:                                               ; preds = %59
  %63 = call ptr @find_table(ptr noundef nonnull %1) #7
  %64 = icmp eq ptr %63, null
  br i1 %64, label %65, label %67

65:                                               ; preds = %62
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, ptr noundef nonnull %1)
  br label %70

67:                                               ; preds = %62
  call void @save_to_binary(ptr noundef nonnull %2, ptr noundef nonnull %63) #7
  br label %70

68:                                               ; preds = %59
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  br label %70

70:                                               ; preds = %65, %67, %68
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  br label %.preheader29.backedge

71:                                               ; preds = %56
  %72 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.18, i64 noundef 11) #8
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %74, label %86

74:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #7
  %75 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %0, ptr noundef nonnull @.str.19, ptr noundef nonnull %3, ptr noundef nonnull %4) #7
  %76 = icmp eq i32 %75, 2
  br i1 %76, label %77, label %83

77:                                               ; preds = %74
  %78 = call ptr @find_table(ptr noundef nonnull %3) #7
  %79 = icmp eq ptr %78, null
  br i1 %79, label %80, label %82

80:                                               ; preds = %77
  %81 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, ptr noundef nonnull %3)
  br label %85

82:                                               ; preds = %77
  call void @load_from_binary(ptr noundef nonnull %4, ptr noundef nonnull %78) #7
  br label %85

83:                                               ; preds = %74
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20)
  br label %85

85:                                               ; preds = %80, %82, %83
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  br label %.preheader29.backedge

86:                                               ; preds = %71
  %87 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.21) #8
  %88 = icmp eq i32 %87, 0
  br i1 %88, label %.preheader.preheader, label %90

.preheader.preheader:                             ; preds = %86
  %89 = load ptr, ptr @hashmap, align 8, !tbaa !5
  %.not33 = icmp eq ptr %89, null
  br i1 %.not33, label %._crit_edge37, label %.lr.ph36

90:                                               ; preds = %86
  %91 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22)
  br label %.preheader29.backedge

.lr.ph36:                                         ; preds = %.preheader.preheader, %._crit_edge
  %.02434 = phi ptr [ %93, %._crit_edge ], [ %89, %.preheader.preheader ]
  %92 = getelementptr inbounds i8, ptr %.02434, i64 40
  %93 = load ptr, ptr %92, align 8, !tbaa !10
  %94 = getelementptr inbounds i8, ptr %.02434, i64 32
  %95 = load ptr, ptr %94, align 8, !tbaa !12
  %96 = getelementptr inbounds i8, ptr %95, i64 48
  %97 = load ptr, ptr %96, align 8, !tbaa !13
  %.not2731 = icmp eq ptr %97, null
  br i1 %.not2731, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph36, %.lr.ph
  %.02232 = phi ptr [ %99, %.lr.ph ], [ %97, %.lr.ph36 ]
  %98 = getelementptr inbounds i8, ptr %.02232, i64 64
  %99 = load ptr, ptr %98, align 8, !tbaa !16
  call void @free_record_data(ptr noundef %95, ptr noundef nonnull %.02232) #7
  %.not27 = icmp eq ptr %99, null
  br i1 %.not27, label %._crit_edge, label %.lr.ph, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph36
  %100 = getelementptr inbounds i8, ptr %95, i64 64
  %101 = load ptr, ptr %100, align 8, !tbaa !20
  call void @rbt_free_tree(ptr noundef %101) #7
  call void @free(ptr noundef %95) #7
  call void @free(ptr noundef %.02434) #7
  %.not = icmp eq ptr %93, null
  br i1 %.not, label %._crit_edge37, label %.lr.ph36, !llvm.loop !21

._crit_edge37:                                    ; preds = %._crit_edge, %.preheader.preheader
  %102 = load ptr, ptr getelementptr inbounds (i8, ptr @hashmap, i64 8), align 8, !tbaa !5
  %.not33.1 = icmp eq ptr %102, null
  br i1 %.not33.1, label %._crit_edge37.1, label %.lr.ph36.1

.lr.ph36.1:                                       ; preds = %._crit_edge37, %._crit_edge.1
  %.02434.1 = phi ptr [ %104, %._crit_edge.1 ], [ %102, %._crit_edge37 ]
  %103 = getelementptr inbounds i8, ptr %.02434.1, i64 40
  %104 = load ptr, ptr %103, align 8, !tbaa !10
  %105 = getelementptr inbounds i8, ptr %.02434.1, i64 32
  %106 = load ptr, ptr %105, align 8, !tbaa !12
  %107 = getelementptr inbounds i8, ptr %106, i64 48
  %108 = load ptr, ptr %107, align 8, !tbaa !13
  %.not2731.1 = icmp eq ptr %108, null
  br i1 %.not2731.1, label %._crit_edge.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.lr.ph36.1, %.lr.ph.1
  %.02232.1 = phi ptr [ %110, %.lr.ph.1 ], [ %108, %.lr.ph36.1 ]
  %109 = getelementptr inbounds i8, ptr %.02232.1, i64 64
  %110 = load ptr, ptr %109, align 8, !tbaa !16
  call void @free_record_data(ptr noundef %106, ptr noundef nonnull %.02232.1) #7
  %.not27.1 = icmp eq ptr %110, null
  br i1 %.not27.1, label %._crit_edge.1, label %.lr.ph.1, !llvm.loop !18

._crit_edge.1:                                    ; preds = %.lr.ph.1, %.lr.ph36.1
  %111 = getelementptr inbounds i8, ptr %106, i64 64
  %112 = load ptr, ptr %111, align 8, !tbaa !20
  call void @rbt_free_tree(ptr noundef %112) #7
  call void @free(ptr noundef %106) #7
  call void @free(ptr noundef %.02434.1) #7
  %.not.1 = icmp eq ptr %104, null
  br i1 %.not.1, label %._crit_edge37.1, label %.lr.ph36.1, !llvm.loop !21

._crit_edge37.1:                                  ; preds = %._crit_edge.1, %._crit_edge37
  %113 = load ptr, ptr getelementptr inbounds (i8, ptr @hashmap, i64 16), align 8, !tbaa !5
  %.not33.2 = icmp eq ptr %113, null
  br i1 %.not33.2, label %._crit_edge37.2, label %.lr.ph36.2

.lr.ph36.2:                                       ; preds = %._crit_edge37.1, %._crit_edge.2
  %.02434.2 = phi ptr [ %115, %._crit_edge.2 ], [ %113, %._crit_edge37.1 ]
  %114 = getelementptr inbounds i8, ptr %.02434.2, i64 40
  %115 = load ptr, ptr %114, align 8, !tbaa !10
  %116 = getelementptr inbounds i8, ptr %.02434.2, i64 32
  %117 = load ptr, ptr %116, align 8, !tbaa !12
  %118 = getelementptr inbounds i8, ptr %117, i64 48
  %119 = load ptr, ptr %118, align 8, !tbaa !13
  %.not2731.2 = icmp eq ptr %119, null
  br i1 %.not2731.2, label %._crit_edge.2, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %.lr.ph36.2, %.lr.ph.2
  %.02232.2 = phi ptr [ %121, %.lr.ph.2 ], [ %119, %.lr.ph36.2 ]
  %120 = getelementptr inbounds i8, ptr %.02232.2, i64 64
  %121 = load ptr, ptr %120, align 8, !tbaa !16
  call void @free_record_data(ptr noundef %117, ptr noundef nonnull %.02232.2) #7
  %.not27.2 = icmp eq ptr %121, null
  br i1 %.not27.2, label %._crit_edge.2, label %.lr.ph.2, !llvm.loop !18

._crit_edge.2:                                    ; preds = %.lr.ph.2, %.lr.ph36.2
  %122 = getelementptr inbounds i8, ptr %117, i64 64
  %123 = load ptr, ptr %122, align 8, !tbaa !20
  call void @rbt_free_tree(ptr noundef %123) #7
  call void @free(ptr noundef %117) #7
  call void @free(ptr noundef %.02434.2) #7
  %.not.2 = icmp eq ptr %115, null
  br i1 %.not.2, label %._crit_edge37.2, label %.lr.ph36.2, !llvm.loop !21

._crit_edge37.2:                                  ; preds = %._crit_edge.2, %._crit_edge37.1
  %124 = load ptr, ptr getelementptr inbounds (i8, ptr @hashmap, i64 24), align 8, !tbaa !5
  %.not33.3 = icmp eq ptr %124, null
  br i1 %.not33.3, label %._crit_edge37.3, label %.lr.ph36.3

.lr.ph36.3:                                       ; preds = %._crit_edge37.2, %._crit_edge.3
  %.02434.3 = phi ptr [ %126, %._crit_edge.3 ], [ %124, %._crit_edge37.2 ]
  %125 = getelementptr inbounds i8, ptr %.02434.3, i64 40
  %126 = load ptr, ptr %125, align 8, !tbaa !10
  %127 = getelementptr inbounds i8, ptr %.02434.3, i64 32
  %128 = load ptr, ptr %127, align 8, !tbaa !12
  %129 = getelementptr inbounds i8, ptr %128, i64 48
  %130 = load ptr, ptr %129, align 8, !tbaa !13
  %.not2731.3 = icmp eq ptr %130, null
  br i1 %.not2731.3, label %._crit_edge.3, label %.lr.ph.3

.lr.ph.3:                                         ; preds = %.lr.ph36.3, %.lr.ph.3
  %.02232.3 = phi ptr [ %132, %.lr.ph.3 ], [ %130, %.lr.ph36.3 ]
  %131 = getelementptr inbounds i8, ptr %.02232.3, i64 64
  %132 = load ptr, ptr %131, align 8, !tbaa !16
  call void @free_record_data(ptr noundef %128, ptr noundef nonnull %.02232.3) #7
  %.not27.3 = icmp eq ptr %132, null
  br i1 %.not27.3, label %._crit_edge.3, label %.lr.ph.3, !llvm.loop !18

._crit_edge.3:                                    ; preds = %.lr.ph.3, %.lr.ph36.3
  %133 = getelementptr inbounds i8, ptr %128, i64 64
  %134 = load ptr, ptr %133, align 8, !tbaa !20
  call void @rbt_free_tree(ptr noundef %134) #7
  call void @free(ptr noundef %128) #7
  call void @free(ptr noundef %.02434.3) #7
  %.not.3 = icmp eq ptr %126, null
  br i1 %.not.3, label %._crit_edge37.3, label %.lr.ph36.3, !llvm.loop !21

._crit_edge37.3:                                  ; preds = %._crit_edge.3, %._crit_edge37.2
  %135 = load ptr, ptr getelementptr inbounds (i8, ptr @hashmap, i64 32), align 8, !tbaa !5
  %.not33.4 = icmp eq ptr %135, null
  br i1 %.not33.4, label %._crit_edge37.4, label %.lr.ph36.4

.lr.ph36.4:                                       ; preds = %._crit_edge37.3, %._crit_edge.4
  %.02434.4 = phi ptr [ %137, %._crit_edge.4 ], [ %135, %._crit_edge37.3 ]
  %136 = getelementptr inbounds i8, ptr %.02434.4, i64 40
  %137 = load ptr, ptr %136, align 8, !tbaa !10
  %138 = getelementptr inbounds i8, ptr %.02434.4, i64 32
  %139 = load ptr, ptr %138, align 8, !tbaa !12
  %140 = getelementptr inbounds i8, ptr %139, i64 48
  %141 = load ptr, ptr %140, align 8, !tbaa !13
  %.not2731.4 = icmp eq ptr %141, null
  br i1 %.not2731.4, label %._crit_edge.4, label %.lr.ph.4

.lr.ph.4:                                         ; preds = %.lr.ph36.4, %.lr.ph.4
  %.02232.4 = phi ptr [ %143, %.lr.ph.4 ], [ %141, %.lr.ph36.4 ]
  %142 = getelementptr inbounds i8, ptr %.02232.4, i64 64
  %143 = load ptr, ptr %142, align 8, !tbaa !16
  call void @free_record_data(ptr noundef %139, ptr noundef nonnull %.02232.4) #7
  %.not27.4 = icmp eq ptr %143, null
  br i1 %.not27.4, label %._crit_edge.4, label %.lr.ph.4, !llvm.loop !18

._crit_edge.4:                                    ; preds = %.lr.ph.4, %.lr.ph36.4
  %144 = getelementptr inbounds i8, ptr %139, i64 64
  %145 = load ptr, ptr %144, align 8, !tbaa !20
  call void @rbt_free_tree(ptr noundef %145) #7
  call void @free(ptr noundef %139) #7
  call void @free(ptr noundef %.02434.4) #7
  %.not.4 = icmp eq ptr %137, null
  br i1 %.not.4, label %._crit_edge37.4, label %.lr.ph36.4, !llvm.loop !21

._crit_edge37.4:                                  ; preds = %._crit_edge.4, %._crit_edge37.3
  %146 = load ptr, ptr getelementptr inbounds (i8, ptr @hashmap, i64 40), align 8, !tbaa !5
  %.not33.5 = icmp eq ptr %146, null
  br i1 %.not33.5, label %._crit_edge37.5, label %.lr.ph36.5

.lr.ph36.5:                                       ; preds = %._crit_edge37.4, %._crit_edge.5
  %.02434.5 = phi ptr [ %148, %._crit_edge.5 ], [ %146, %._crit_edge37.4 ]
  %147 = getelementptr inbounds i8, ptr %.02434.5, i64 40
  %148 = load ptr, ptr %147, align 8, !tbaa !10
  %149 = getelementptr inbounds i8, ptr %.02434.5, i64 32
  %150 = load ptr, ptr %149, align 8, !tbaa !12
  %151 = getelementptr inbounds i8, ptr %150, i64 48
  %152 = load ptr, ptr %151, align 8, !tbaa !13
  %.not2731.5 = icmp eq ptr %152, null
  br i1 %.not2731.5, label %._crit_edge.5, label %.lr.ph.5

.lr.ph.5:                                         ; preds = %.lr.ph36.5, %.lr.ph.5
  %.02232.5 = phi ptr [ %154, %.lr.ph.5 ], [ %152, %.lr.ph36.5 ]
  %153 = getelementptr inbounds i8, ptr %.02232.5, i64 64
  %154 = load ptr, ptr %153, align 8, !tbaa !16
  call void @free_record_data(ptr noundef %150, ptr noundef nonnull %.02232.5) #7
  %.not27.5 = icmp eq ptr %154, null
  br i1 %.not27.5, label %._crit_edge.5, label %.lr.ph.5, !llvm.loop !18

._crit_edge.5:                                    ; preds = %.lr.ph.5, %.lr.ph36.5
  %155 = getelementptr inbounds i8, ptr %150, i64 64
  %156 = load ptr, ptr %155, align 8, !tbaa !20
  call void @rbt_free_tree(ptr noundef %156) #7
  call void @free(ptr noundef %150) #7
  call void @free(ptr noundef %.02434.5) #7
  %.not.5 = icmp eq ptr %148, null
  br i1 %.not.5, label %._crit_edge37.5, label %.lr.ph36.5, !llvm.loop !21

._crit_edge37.5:                                  ; preds = %._crit_edge.5, %._crit_edge37.4
  %157 = load ptr, ptr getelementptr inbounds (i8, ptr @hashmap, i64 48), align 8, !tbaa !5
  %.not33.6 = icmp eq ptr %157, null
  br i1 %.not33.6, label %._crit_edge37.6, label %.lr.ph36.6

.lr.ph36.6:                                       ; preds = %._crit_edge37.5, %._crit_edge.6
  %.02434.6 = phi ptr [ %159, %._crit_edge.6 ], [ %157, %._crit_edge37.5 ]
  %158 = getelementptr inbounds i8, ptr %.02434.6, i64 40
  %159 = load ptr, ptr %158, align 8, !tbaa !10
  %160 = getelementptr inbounds i8, ptr %.02434.6, i64 32
  %161 = load ptr, ptr %160, align 8, !tbaa !12
  %162 = getelementptr inbounds i8, ptr %161, i64 48
  %163 = load ptr, ptr %162, align 8, !tbaa !13
  %.not2731.6 = icmp eq ptr %163, null
  br i1 %.not2731.6, label %._crit_edge.6, label %.lr.ph.6

.lr.ph.6:                                         ; preds = %.lr.ph36.6, %.lr.ph.6
  %.02232.6 = phi ptr [ %165, %.lr.ph.6 ], [ %163, %.lr.ph36.6 ]
  %164 = getelementptr inbounds i8, ptr %.02232.6, i64 64
  %165 = load ptr, ptr %164, align 8, !tbaa !16
  call void @free_record_data(ptr noundef %161, ptr noundef nonnull %.02232.6) #7
  %.not27.6 = icmp eq ptr %165, null
  br i1 %.not27.6, label %._crit_edge.6, label %.lr.ph.6, !llvm.loop !18

._crit_edge.6:                                    ; preds = %.lr.ph.6, %.lr.ph36.6
  %166 = getelementptr inbounds i8, ptr %161, i64 64
  %167 = load ptr, ptr %166, align 8, !tbaa !20
  call void @rbt_free_tree(ptr noundef %167) #7
  call void @free(ptr noundef %161) #7
  call void @free(ptr noundef %.02434.6) #7
  %.not.6 = icmp eq ptr %159, null
  br i1 %.not.6, label %._crit_edge37.6, label %.lr.ph36.6, !llvm.loop !21

._crit_edge37.6:                                  ; preds = %._crit_edge.6, %._crit_edge37.5
  %168 = load ptr, ptr getelementptr inbounds (i8, ptr @hashmap, i64 56), align 8, !tbaa !5
  %.not33.7 = icmp eq ptr %168, null
  br i1 %.not33.7, label %._crit_edge37.7, label %.lr.ph36.7

.lr.ph36.7:                                       ; preds = %._crit_edge37.6, %._crit_edge.7
  %.02434.7 = phi ptr [ %170, %._crit_edge.7 ], [ %168, %._crit_edge37.6 ]
  %169 = getelementptr inbounds i8, ptr %.02434.7, i64 40
  %170 = load ptr, ptr %169, align 8, !tbaa !10
  %171 = getelementptr inbounds i8, ptr %.02434.7, i64 32
  %172 = load ptr, ptr %171, align 8, !tbaa !12
  %173 = getelementptr inbounds i8, ptr %172, i64 48
  %174 = load ptr, ptr %173, align 8, !tbaa !13
  %.not2731.7 = icmp eq ptr %174, null
  br i1 %.not2731.7, label %._crit_edge.7, label %.lr.ph.7

.lr.ph.7:                                         ; preds = %.lr.ph36.7, %.lr.ph.7
  %.02232.7 = phi ptr [ %176, %.lr.ph.7 ], [ %174, %.lr.ph36.7 ]
  %175 = getelementptr inbounds i8, ptr %.02232.7, i64 64
  %176 = load ptr, ptr %175, align 8, !tbaa !16
  call void @free_record_data(ptr noundef %172, ptr noundef nonnull %.02232.7) #7
  %.not27.7 = icmp eq ptr %176, null
  br i1 %.not27.7, label %._crit_edge.7, label %.lr.ph.7, !llvm.loop !18

._crit_edge.7:                                    ; preds = %.lr.ph.7, %.lr.ph36.7
  %177 = getelementptr inbounds i8, ptr %172, i64 64
  %178 = load ptr, ptr %177, align 8, !tbaa !20
  call void @rbt_free_tree(ptr noundef %178) #7
  call void @free(ptr noundef %172) #7
  call void @free(ptr noundef %.02434.7) #7
  %.not.7 = icmp eq ptr %170, null
  br i1 %.not.7, label %._crit_edge37.7, label %.lr.ph36.7, !llvm.loop !21

._crit_edge37.7:                                  ; preds = %._crit_edge.7, %._crit_edge37.6
  %179 = load ptr, ptr getelementptr inbounds (i8, ptr @hashmap, i64 64), align 8, !tbaa !5
  %.not33.8 = icmp eq ptr %179, null
  br i1 %.not33.8, label %._crit_edge37.8, label %.lr.ph36.8

.lr.ph36.8:                                       ; preds = %._crit_edge37.7, %._crit_edge.8
  %.02434.8 = phi ptr [ %181, %._crit_edge.8 ], [ %179, %._crit_edge37.7 ]
  %180 = getelementptr inbounds i8, ptr %.02434.8, i64 40
  %181 = load ptr, ptr %180, align 8, !tbaa !10
  %182 = getelementptr inbounds i8, ptr %.02434.8, i64 32
  %183 = load ptr, ptr %182, align 8, !tbaa !12
  %184 = getelementptr inbounds i8, ptr %183, i64 48
  %185 = load ptr, ptr %184, align 8, !tbaa !13
  %.not2731.8 = icmp eq ptr %185, null
  br i1 %.not2731.8, label %._crit_edge.8, label %.lr.ph.8

.lr.ph.8:                                         ; preds = %.lr.ph36.8, %.lr.ph.8
  %.02232.8 = phi ptr [ %187, %.lr.ph.8 ], [ %185, %.lr.ph36.8 ]
  %186 = getelementptr inbounds i8, ptr %.02232.8, i64 64
  %187 = load ptr, ptr %186, align 8, !tbaa !16
  call void @free_record_data(ptr noundef %183, ptr noundef nonnull %.02232.8) #7
  %.not27.8 = icmp eq ptr %187, null
  br i1 %.not27.8, label %._crit_edge.8, label %.lr.ph.8, !llvm.loop !18

._crit_edge.8:                                    ; preds = %.lr.ph.8, %.lr.ph36.8
  %188 = getelementptr inbounds i8, ptr %183, i64 64
  %189 = load ptr, ptr %188, align 8, !tbaa !20
  call void @rbt_free_tree(ptr noundef %189) #7
  call void @free(ptr noundef %183) #7
  call void @free(ptr noundef %.02434.8) #7
  %.not.8 = icmp eq ptr %181, null
  br i1 %.not.8, label %._crit_edge37.8, label %.lr.ph36.8, !llvm.loop !21

._crit_edge37.8:                                  ; preds = %._crit_edge.8, %._crit_edge37.7
  %190 = load ptr, ptr getelementptr inbounds (i8, ptr @hashmap, i64 72), align 8, !tbaa !5
  %.not33.9 = icmp eq ptr %190, null
  br i1 %.not33.9, label %._crit_edge37.9, label %.lr.ph36.9

.lr.ph36.9:                                       ; preds = %._crit_edge37.8, %._crit_edge.9
  %.02434.9 = phi ptr [ %192, %._crit_edge.9 ], [ %190, %._crit_edge37.8 ]
  %191 = getelementptr inbounds i8, ptr %.02434.9, i64 40
  %192 = load ptr, ptr %191, align 8, !tbaa !10
  %193 = getelementptr inbounds i8, ptr %.02434.9, i64 32
  %194 = load ptr, ptr %193, align 8, !tbaa !12
  %195 = getelementptr inbounds i8, ptr %194, i64 48
  %196 = load ptr, ptr %195, align 8, !tbaa !13
  %.not2731.9 = icmp eq ptr %196, null
  br i1 %.not2731.9, label %._crit_edge.9, label %.lr.ph.9

.lr.ph.9:                                         ; preds = %.lr.ph36.9, %.lr.ph.9
  %.02232.9 = phi ptr [ %198, %.lr.ph.9 ], [ %196, %.lr.ph36.9 ]
  %197 = getelementptr inbounds i8, ptr %.02232.9, i64 64
  %198 = load ptr, ptr %197, align 8, !tbaa !16
  call void @free_record_data(ptr noundef %194, ptr noundef nonnull %.02232.9) #7
  %.not27.9 = icmp eq ptr %198, null
  br i1 %.not27.9, label %._crit_edge.9, label %.lr.ph.9, !llvm.loop !18

._crit_edge.9:                                    ; preds = %.lr.ph.9, %.lr.ph36.9
  %199 = getelementptr inbounds i8, ptr %194, i64 64
  %200 = load ptr, ptr %199, align 8, !tbaa !20
  call void @rbt_free_tree(ptr noundef %200) #7
  call void @free(ptr noundef %194) #7
  call void @free(ptr noundef %.02434.9) #7
  %.not.9 = icmp eq ptr %192, null
  br i1 %.not.9, label %._crit_edge37.9, label %.lr.ph36.9, !llvm.loop !21

._crit_edge37.9:                                  ; preds = %._crit_edge.9, %._crit_edge37.8
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %0) #7
  ret i32 0
}

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

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

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

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2

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

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

declare void @create_table_cmd(ptr noundef) local_unnamed_addr #4

declare void @delete_table_cmd(ptr noundef) local_unnamed_addr #4

declare void @create_index_cmd(ptr noundef) local_unnamed_addr #4

declare void @add_record_cmd(ptr noundef) local_unnamed_addr #4

declare void @delete_record_cmd(ptr noundef) local_unnamed_addr #4

declare void @update_record_cmd(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strstr(ptr noundef, ptr nocapture noundef) local_unnamed_addr #3

declare void @select_records_where_cmd(ptr noundef) local_unnamed_addr #4

declare void @select_records_cmd(ptr noundef) local_unnamed_addr #4

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

declare void @help(...) local_unnamed_addr #4

declare void @begin_transaction(...) local_unnamed_addr #4

declare void @commit_transaction(...) local_unnamed_addr #4

declare void @rollback_transaction(...) local_unnamed_addr #4

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

declare ptr @find_table(ptr noundef) local_unnamed_addr #4

declare void @save_to_binary(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @load_from_binary(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @free_record_data(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @rbt_free_tree(ptr noundef) local_unnamed_addr #4

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

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

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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 40}
!11 = !{!"HashMapNode", !7, i64 0, !6, i64 32, !6, i64 40}
!12 = !{!11, !6, i64 32}
!13 = !{!14, !6, i64 48}
!14 = !{!"Table", !7, i64 0, !6, i64 32, !15, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !15, i64 72}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !6, i64 64}
!17 = !{!"Record", !7, i64 0, !6, i64 64, !6, i64 72}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!14, !6, i64 64}
!21 = distinct !{!21, !19}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass