; LLVM IR from seppo0010/rlite :: src (type_hash)

; 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.rl_hashkey = type { i64, i64 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare hidden i32 @rl_hash_get_objects(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

declare i32 @sha1(ptr noundef, i64 noundef, ptr noundef) #3

declare i32 @rl_btree_find_score(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @rl_multi_string_delete(ptr noundef, i64 noundef) #3

declare i32 @rl_multi_string_set(ptr noundef, ptr noundef, ptr noundef, i64 noundef) #3

declare i32 @rl_btree_update_element(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

declare i32 @rl_btree_add_element(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

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

declare i32 @rl_multi_string_get(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @rl_hincrby(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, i64 noundef %5, ptr noundef %6) #1 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i64 %2, ptr %10, align 8, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i64 %4, ptr %12, align 8, !tbaa !9
  store i64 %5, ptr %13, align 8, !tbaa !9
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store ptr null, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store ptr null, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = load i64, ptr %10, align 8, !tbaa !9
  %28 = call i32 @rl_hash_get_objects(ptr noundef %25, ptr noundef %26, i64 noundef %27, ptr noundef %22, ptr noundef %16, i32 noundef 1, i32 noundef 1)
  store i32 %28, ptr %15, align 4, !tbaa !11
  %29 = load i32, ptr %15, align 4, !tbaa !11
  %30 = icmp ne i32 0, %29
  br i1 %30, label %31, label %32

31:                                               ; preds = %7
  br label %229

32:                                               ; preds = %7
  %33 = call noalias ptr @malloc(i64 noundef 20) #8
  store ptr %33, ptr %18, align 8, !tbaa !5
  %34 = load ptr, ptr %18, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 4, ptr %15, align 4, !tbaa !11
  br label %229

37:                                               ; preds = %32
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  %39 = load i64, ptr %12, align 8, !tbaa !9
  %40 = load ptr, ptr %18, align 8, !tbaa !5
  %41 = call i32 @sha1(ptr noundef %38, i64 noundef %39, ptr noundef %40)
  store i32 %41, ptr %15, align 4, !tbaa !11
  %42 = load i32, ptr %15, align 4, !tbaa !11
  %43 = icmp ne i32 0, %42
  br i1 %43, label %44, label %45

44:                                               ; preds = %37
  br label %229

45:                                               ; preds = %37
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = load ptr, ptr %16, align 8, !tbaa !5
  %48 = load ptr, ptr %18, align 8, !tbaa !5
  %49 = call i32 @rl_btree_find_score(ptr noundef %46, ptr noundef %47, ptr noundef %48, ptr noundef %17, ptr noundef null, ptr noundef null)
  store i32 %49, ptr %15, align 4, !tbaa !11
  %50 = load i32, ptr %15, align 4, !tbaa !11
  %51 = icmp eq i32 %50, 2
  br i1 %51, label %52, label %172

52:                                               ; preds = %45
  %53 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %53, ptr %24, align 8, !tbaa !5
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = load ptr, ptr %24, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.rl_hashkey, ptr %55, i32 0, i32 1
  %57 = load i64, ptr %56, align 8, !tbaa !13
  %58 = call i32 @rl_multi_string_get(ptr noundef %54, i64 noundef %57, ptr noundef %19, ptr noundef %21)
  %59 = load ptr, ptr %19, align 8, !tbaa !5
  %60 = load i64, ptr %21, align 8, !tbaa !9
  %61 = add nsw i64 %60, 1
  %62 = mul i64 1, %61
  %63 = call ptr @realloc(ptr noundef %59, i64 noundef %62) #9
  store ptr %63, ptr %17, align 8, !tbaa !5
  %64 = load ptr, ptr %17, align 8, !tbaa !5
  %65 = icmp ne ptr %64, null
  br i1 %65, label %67, label %66

66:                                               ; preds = %52
  store i32 4, ptr %15, align 4, !tbaa !11
  br label %229

67:                                               ; preds = %52
  %68 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %68, ptr %19, align 8, !tbaa !5
  %69 = load ptr, ptr %19, align 8, !tbaa !5
  %70 = load i64, ptr %21, align 8, !tbaa !9
  %71 = getelementptr inbounds i8, ptr %69, i64 %70
  store i8 0, ptr %71, align 1, !tbaa !15
  %72 = load ptr, ptr %19, align 8, !tbaa !5
  %73 = call i64 @strtoll(ptr noundef %72, ptr noundef %20, i32 noundef 10) #7
  store i64 %73, ptr %23, align 8, !tbaa !16
  %74 = call ptr @__ctype_b_loc() #10
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = load ptr, ptr %19, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 0
  %78 = load i8, ptr %77, align 1, !tbaa !15
  %79 = sext i8 %78 to i32
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i16, ptr %75, i64 %80
  %82 = load i16, ptr %81, align 2, !tbaa !18
  %83 = zext i16 %82 to i32
  %84 = and i32 %83, 8192
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %96, label %86

86:                                               ; preds = %67
  %87 = load ptr, ptr %20, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %87, i64 0
  %89 = load i8, ptr %88, align 1, !tbaa !15
  %90 = sext i8 %89 to i32
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %96, label %92

92:                                               ; preds = %86
  %93 = call ptr @__errno_location() #10
  %94 = load i32, ptr %93, align 4, !tbaa !11
  %95 = icmp eq i32 %94, 34
  br i1 %95, label %96, label %98

96:                                               ; preds = %92, %86, %67
  %97 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free(ptr noundef %97) #7
  store i32 11, ptr %15, align 4, !tbaa !11
  br label %229

98:                                               ; preds = %92
  %99 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free(ptr noundef %99) #7
  store ptr null, ptr %19, align 8, !tbaa !5
  %100 = load i64, ptr %13, align 8, !tbaa !9
  %101 = icmp slt i64 %100, 0
  br i1 %101, label %102, label %110

102:                                              ; preds = %98
  %103 = load i64, ptr %23, align 8, !tbaa !16
  %104 = icmp slt i64 %103, 0
  br i1 %104, label %105, label %110

105:                                              ; preds = %102
  %106 = load i64, ptr %13, align 8, !tbaa !9
  %107 = load i64, ptr %23, align 8, !tbaa !16
  %108 = sub nsw i64 -9223372036854775808, %107
  %109 = icmp slt i64 %106, %108
  br i1 %109, label %121, label %110

110:                                              ; preds = %105, %102, %98
  %111 = load i64, ptr %13, align 8, !tbaa !9
  %112 = icmp sgt i64 %111, 0
  br i1 %112, label %113, label %123

113:                                              ; preds = %110
  %114 = load i64, ptr %23, align 8, !tbaa !16
  %115 = icmp sgt i64 %114, 0
  br i1 %115, label %116, label %123

116:                                              ; preds = %113
  %117 = load i64, ptr %13, align 8, !tbaa !9
  %118 = load i64, ptr %23, align 8, !tbaa !16
  %119 = sub nsw i64 9223372036854775807, %118
  %120 = icmp sgt i64 %117, %119
  br i1 %120, label %121, label %123

121:                                              ; preds = %116, %105
  %122 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free(ptr noundef %122) #7
  store i32 12, ptr %15, align 4, !tbaa !11
  br label %229

123:                                              ; preds = %116, %113, %110
  %124 = load i64, ptr %13, align 8, !tbaa !9
  %125 = load i64, ptr %23, align 8, !tbaa !16
  %126 = add nsw i64 %125, %124
  store i64 %126, ptr %23, align 8, !tbaa !16
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = load ptr, ptr %24, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.rl_hashkey, ptr %128, i32 0, i32 1
  %130 = load i64, ptr %129, align 8, !tbaa !13
  %131 = call i32 @rl_multi_string_delete(ptr noundef %127, i64 noundef %130)
  %132 = call noalias ptr @malloc(i64 noundef 22) #8
  store ptr %132, ptr %19, align 8, !tbaa !5
  %133 = load ptr, ptr %19, align 8, !tbaa !5
  %134 = icmp ne ptr %133, null
  br i1 %134, label %136, label %135

135:                                              ; preds = %123
  store i32 4, ptr %15, align 4, !tbaa !11
  br label %229

136:                                              ; preds = %123
  %137 = load ptr, ptr %19, align 8, !tbaa !5
  %138 = load i64, ptr %23, align 8, !tbaa !16
  %139 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %137, i64 noundef 22, ptr noundef @.str, i64 noundef %138) #7
  %140 = sext i32 %139 to i64
  store i64 %140, ptr %21, align 8, !tbaa !9
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = load ptr, ptr %24, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.rl_hashkey, ptr %142, i32 0, i32 1
  %144 = load ptr, ptr %19, align 8, !tbaa !5
  %145 = load i64, ptr %21, align 8, !tbaa !9
  %146 = call i32 @rl_multi_string_set(ptr noundef %141, ptr noundef %143, ptr noundef %144, i64 noundef %145)
  store i32 %146, ptr %15, align 4, !tbaa !11
  %147 = load i32, ptr %15, align 4, !tbaa !11
  %148 = icmp ne i32 0, %147
  br i1 %148, label %149, label %150

149:                                              ; preds = %136
  br label %229

150:                                              ; preds = %136
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = load ptr, ptr %16, align 8, !tbaa !5
  %153 = load ptr, ptr %18, align 8, !tbaa !5
  %154 = load ptr, ptr %24, align 8, !tbaa !5
  %155 = call i32 @rl_btree_update_element(ptr noundef %151, ptr noundef %152, ptr noundef %153, ptr noundef %154)
  store i32 %155, ptr %15, align 4, !tbaa !11
  %156 = load i32, ptr %15, align 4, !tbaa !11
  %157 = icmp eq i32 %156, 0
  br i1 %157, label %158, label %166

158:                                              ; preds = %150
  %159 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free(ptr noundef %159) #7
  store ptr null, ptr %18, align 8, !tbaa !5
  %160 = load ptr, ptr %14, align 8, !tbaa !5
  %161 = icmp ne ptr %160, null
  br i1 %161, label %162, label %165

162:                                              ; preds = %158
  %163 = load i64, ptr %23, align 8, !tbaa !16
  %164 = load ptr, ptr %14, align 8, !tbaa !5
  store i64 %163, ptr %164, align 8, !tbaa !9
  br label %165

165:                                              ; preds = %162, %158
  br label %171

166:                                              ; preds = %150
  %167 = load i32, ptr %15, align 4, !tbaa !11
  %168 = icmp ne i32 %167, 3
  br i1 %168, label %169, label %170

169:                                              ; preds = %166
  br label %229

170:                                              ; preds = %166
  br label %171

171:                                              ; preds = %170, %165
  br label %228

172:                                              ; preds = %45
  %173 = load i32, ptr %15, align 4, !tbaa !11
  %174 = icmp eq i32 %173, 3
  br i1 %174, label %175, label %226

175:                                              ; preds = %172
  %176 = call noalias ptr @malloc(i64 noundef 22) #8
  store ptr %176, ptr %19, align 8, !tbaa !5
  %177 = load ptr, ptr %19, align 8, !tbaa !5
  %178 = icmp ne ptr %177, null
  br i1 %178, label %180, label %179

179:                                              ; preds = %175
  store i32 4, ptr %15, align 4, !tbaa !11
  br label %229

180:                                              ; preds = %175
  %181 = load ptr, ptr %19, align 8, !tbaa !5
  %182 = load i64, ptr %13, align 8, !tbaa !9
  %183 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %181, i64 noundef 22, ptr noundef @.str.1, i64 noundef %182) #7
  %184 = sext i32 %183 to i64
  store i64 %184, ptr %21, align 8, !tbaa !9
  %185 = call noalias ptr @malloc(i64 noundef 16) #8
  store ptr %185, ptr %24, align 8, !tbaa !5
  %186 = load ptr, ptr %24, align 8, !tbaa !5
  %187 = icmp ne ptr %186, null
  br i1 %187, label %189, label %188

188:                                              ; preds = %180
  store i32 4, ptr %15, align 4, !tbaa !11
  br label %229

189:                                              ; preds = %180
  %190 = load ptr, ptr %8, align 8, !tbaa !5
  %191 = load ptr, ptr %24, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.rl_hashkey, ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %11, align 8, !tbaa !5
  %194 = load i64, ptr %12, align 8, !tbaa !9
  %195 = call i32 @rl_multi_string_set(ptr noundef %190, ptr noundef %192, ptr noundef %193, i64 noundef %194)
  store i32 %195, ptr %15, align 4, !tbaa !11
  %196 = load i32, ptr %15, align 4, !tbaa !11
  %197 = icmp ne i32 0, %196
  br i1 %197, label %198, label %199

198:                                              ; preds = %189
  br label %229

199:                                              ; preds = %189
  %200 = load ptr, ptr %8, align 8, !tbaa !5
  %201 = load ptr, ptr %24, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.rl_hashkey, ptr %201, i32 0, i32 1
  %203 = load ptr, ptr %19, align 8, !tbaa !5
  %204 = load i64, ptr %21, align 8, !tbaa !9
  %205 = call i32 @rl_multi_string_set(ptr noundef %200, ptr noundef %202, ptr noundef %203, i64 noundef %204)
  store i32 %205, ptr %15, align 4, !tbaa !11
  %206 = load i32, ptr %15, align 4, !tbaa !11
  %207 = icmp ne i32 0, %206
  br i1 %207, label %208, label %209

208:                                              ; preds = %199
  br label %229

209:                                              ; preds = %199
  %210 = load ptr, ptr %8, align 8, !tbaa !5
  %211 = load ptr, ptr %16, align 8, !tbaa !5
  %212 = load i64, ptr %22, align 8, !tbaa !9
  %213 = load ptr, ptr %18, align 8, !tbaa !5
  %214 = load ptr, ptr %24, align 8, !tbaa !5
  %215 = call i32 @rl_btree_add_element(ptr noundef %210, ptr noundef %211, i64 noundef %212, ptr noundef %213, ptr noundef %214)
  store i32 %215, ptr %15, align 4, !tbaa !11
  %216 = load i32, ptr %15, align 4, !tbaa !11
  %217 = icmp ne i32 0, %216
  br i1 %217, label %218, label %219

218:                                              ; preds = %209
  br label %229

219:                                              ; preds = %209
  %220 = load ptr, ptr %14, align 8, !tbaa !5
  %221 = icmp ne ptr %220, null
  br i1 %221, label %222, label %225

222:                                              ; preds = %219
  %223 = load i64, ptr %13, align 8, !tbaa !9
  %224 = load ptr, ptr %14, align 8, !tbaa !5
  store i64 %223, ptr %224, align 8, !tbaa !9
  br label %225

225:                                              ; preds = %222, %219
  br label %227

226:                                              ; preds = %172
  br label %229

227:                                              ; preds = %225
  br label %228

228:                                              ; preds = %227, %171
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %229

229:                                              ; preds = %228, %226, %218, %208, %198, %188, %179, %169, %149, %135, %121, %96, %66, %44, %36, %31
  %230 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free(ptr noundef %230) #7
  %231 = load i32, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  ret i32 %231
}

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #5

; Function Attrs: nounwind
declare i64 @strtoll(ptr noundef, ptr noundef, i32 noundef) #4

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() #6

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #6

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind 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 = { "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 allocsize(1) "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 willreturn memory(none) "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 = { nounwind allocsize(0) }
attributes #9 = { nounwind allocsize(1) }
attributes #10 = { nounwind willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"rl_hashkey", !10, i64 0, !10, i64 8}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"long long", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"short", !7, i64 0}


; 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 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare hidden i32 @rl_hash_get_objects(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

declare i32 @sha1(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare i32 @rl_btree_find_score(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @rl_multi_string_delete(ptr noundef, i64 noundef) local_unnamed_addr #3

declare i32 @rl_multi_string_set(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

declare i32 @rl_btree_update_element(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare i32 @rl_btree_add_element(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare i32 @rl_multi_string_get(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local i32 @rl_hincrby(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, i64 noundef %5, ptr noundef writeonly %6) local_unnamed_addr #1 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  %14 = call i32 @rl_hash_get_objects(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef nonnull %13, ptr noundef nonnull %8, i32 noundef 1, i32 noundef 1)
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %15, label %93

15:                                               ; preds = %7
  %16 = call noalias dereferenceable_or_null(20) ptr @malloc(i64 noundef 20) #10
  %.not80 = icmp eq ptr %16, null
  br i1 %.not80, label %93, label %17

17:                                               ; preds = %15
  %18 = call i32 @sha1(ptr noundef %3, i64 noundef %4, ptr noundef nonnull %16) #9
  %.not81 = icmp eq i32 %18, 0
  br i1 %.not81, label %19, label %93

19:                                               ; preds = %17
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = call i32 @rl_btree_find_score(ptr noundef %0, ptr noundef %20, ptr noundef nonnull %16, ptr noundef nonnull %9, ptr noundef null, ptr noundef null) #9
  switch i32 %21, label %93 [
    i32 2, label %22
    i32 3, label %76
  ]

22:                                               ; preds = %19
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = load i64, ptr %24, align 8, !tbaa !9
  %26 = call i32 @rl_multi_string_get(ptr noundef %0, i64 noundef %25, ptr noundef nonnull %10, ptr noundef nonnull %12) #9
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  %28 = load i64, ptr %12, align 8, !tbaa !12
  %29 = add nsw i64 %28, 1
  %30 = call ptr @realloc(ptr noundef %27, i64 noundef %29) #11
  store ptr %30, ptr %9, align 8, !tbaa !5
  %.not88 = icmp eq ptr %30, null
  br i1 %.not88, label %93, label %31

31:                                               ; preds = %22
  store ptr %30, ptr %10, align 8, !tbaa !5
  %32 = load i64, ptr %12, align 8, !tbaa !12
  %33 = getelementptr inbounds i8, ptr %30, i64 %32
  store i8 0, ptr %33, align 1, !tbaa !13
  %34 = call i64 @strtoll(ptr noundef nonnull %30, ptr noundef nonnull %11, i32 noundef 10) #9
  %35 = tail call ptr @__ctype_b_loc() #12
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = load i8, ptr %37, align 1, !tbaa !13
  %39 = sext i8 %38 to i64
  %40 = getelementptr inbounds i16, ptr %36, i64 %39
  %41 = load i16, ptr %40, align 2, !tbaa !14
  %42 = and i16 %41, 8192
  %.not89 = icmp eq i16 %42, 0
  br i1 %.not89, label %43, label %50

43:                                               ; preds = %31
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = load i8, ptr %44, align 1, !tbaa !13
  %.not90 = icmp eq i8 %45, 0
  br i1 %.not90, label %46, label %50

46:                                               ; preds = %43
  %47 = tail call ptr @__errno_location() #12
  %48 = load i32, ptr %47, align 4, !tbaa !16
  %49 = icmp eq i32 %48, 34
  br i1 %49, label %50, label %51

50:                                               ; preds = %46, %43, %31
  call void @free(ptr noundef nonnull %16) #9
  br label %93

51:                                               ; preds = %46
  call void @free(ptr noundef nonnull %37) #9
  store ptr null, ptr %10, align 8, !tbaa !5
  %52 = icmp slt i64 %5, 0
  %53 = icmp slt i64 %34, 0
  %or.cond = select i1 %52, i1 %53, i1 false
  %54 = sub nsw i64 -9223372036854775808, %34
  %55 = icmp sgt i64 %54, %5
  %or.cond96 = select i1 %or.cond, i1 %55, i1 false
  br i1 %or.cond96, label %61, label %56

56:                                               ; preds = %51
  %57 = icmp sgt i64 %5, 0
  %58 = icmp sgt i64 %34, 0
  %or.cond3 = select i1 %57, i1 %58, i1 false
  %59 = sub nuw nsw i64 9223372036854775807, %34
  %60 = icmp slt i64 %59, %5
  %or.cond98 = select i1 %or.cond3, i1 %60, i1 false
  br i1 %or.cond98, label %61, label %62

61:                                               ; preds = %56, %51
  call void @free(ptr noundef nonnull %16) #9
  br label %93

62:                                               ; preds = %56
  %63 = add nsw i64 %34, %5
  %64 = load i64, ptr %24, align 8, !tbaa !9
  %65 = call i32 @rl_multi_string_delete(ptr noundef %0, i64 noundef %64) #9
  %66 = call noalias dereferenceable_or_null(22) ptr @malloc(i64 noundef 22) #10
  store ptr %66, ptr %10, align 8, !tbaa !5
  %.not91 = icmp eq ptr %66, null
  br i1 %.not91, label %93, label %67

67:                                               ; preds = %62
  %68 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %66, i64 noundef 22, ptr noundef nonnull @.str, i64 noundef %63) #9
  %69 = sext i32 %68 to i64
  store i64 %69, ptr %12, align 8, !tbaa !12
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = call i32 @rl_multi_string_set(ptr noundef %0, ptr noundef nonnull %24, ptr noundef %70, i64 noundef %69) #9
  %.not92 = icmp eq i32 %71, 0
  br i1 %.not92, label %72, label %93

72:                                               ; preds = %67
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = call i32 @rl_btree_update_element(ptr noundef %0, ptr noundef %73, ptr noundef nonnull %16, ptr noundef nonnull %23) #9
  switch i32 %74, label %93 [
    i32 0, label %75
    i32 3, label %92
  ]

75:                                               ; preds = %72
  call void @free(ptr noundef nonnull %16) #9
  %.not94 = icmp eq ptr %6, null
  br i1 %.not94, label %92, label %.sink.split

76:                                               ; preds = %19
  %77 = call noalias dereferenceable_or_null(22) ptr @malloc(i64 noundef 22) #10
  store ptr %77, ptr %10, align 8, !tbaa !5
  %.not82 = icmp eq ptr %77, null
  br i1 %.not82, label %93, label %78

78:                                               ; preds = %76
  %79 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %77, i64 noundef 22, ptr noundef nonnull @.str.1, i64 noundef %5) #9
  %80 = sext i32 %79 to i64
  store i64 %80, ptr %12, align 8, !tbaa !12
  %81 = call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #10
  %.not83 = icmp eq ptr %81, null
  br i1 %.not83, label %93, label %82

82:                                               ; preds = %78
  %83 = call i32 @rl_multi_string_set(ptr noundef %0, ptr noundef nonnull %81, ptr noundef %3, i64 noundef %4) #9
  %.not84 = icmp eq i32 %83, 0
  br i1 %.not84, label %84, label %93

84:                                               ; preds = %82
  %85 = getelementptr inbounds i8, ptr %81, i64 8
  %86 = call i32 @rl_multi_string_set(ptr noundef %0, ptr noundef nonnull %85, ptr noundef nonnull %77, i64 noundef %80) #9
  %.not85 = icmp eq i32 %86, 0
  br i1 %.not85, label %87, label %93

87:                                               ; preds = %84
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = load i64, ptr %13, align 8, !tbaa !12
  %90 = call i32 @rl_btree_add_element(ptr noundef %0, ptr noundef %88, i64 noundef %89, ptr noundef nonnull %16, ptr noundef nonnull %81) #9
  %.not86 = icmp eq i32 %90, 0
  br i1 %.not86, label %91, label %93

91:                                               ; preds = %87
  %.not87 = icmp eq ptr %6, null
  br i1 %.not87, label %92, label %.sink.split

.sink.split:                                      ; preds = %91, %75
  %.sink = phi i64 [ %63, %75 ], [ %5, %91 ]
  store i64 %.sink, ptr %6, align 8, !tbaa !12
  br label %92

92:                                               ; preds = %.sink.split, %72, %91, %75
  br label %93

93:                                               ; preds = %78, %76, %19, %72, %62, %22, %15, %87, %84, %82, %67, %17, %7, %92, %61, %50
  %.0 = phi i32 [ %14, %7 ], [ %18, %17 ], [ 11, %50 ], [ 12, %61 ], [ %71, %67 ], [ 0, %92 ], [ %83, %82 ], [ %86, %84 ], [ %90, %87 ], [ 4, %15 ], [ 4, %22 ], [ 4, %62 ], [ %74, %72 ], [ %21, %19 ], [ 4, %76 ], [ 4, %78 ]
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %94) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  ret i32 %.0
}

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtoll(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() local_unnamed_addr #7

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #7

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #8

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { 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 #5 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) 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 = { mustprogress nofree nounwind willreturn "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 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { 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 #9 = { nounwind }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { nounwind allocsize(1) }
attributes #12 = { nounwind willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"rl_hashkey", !11, i64 0, !11, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}


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