; LLVM IR from begeekmyfriend/bplustree :: tests (bplustree_coverage)

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

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@huge_array = external hidden global [268435455 x i8], align 16
@valid_ins = external hidden global i32, align 4
@.str.3 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1
@valid_query = external hidden global i32, align 4
@.str.5 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.exec_file = external hidden unnamed_addr constant [44 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [44 x i8], align 1
@valid_del = external hidden global i32, align 4
@.str.9 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [45 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @exec_file(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = call noalias ptr @fopen(ptr noundef %12, ptr noundef @.str)
  store ptr %13, ptr %10, align 8, !tbaa !5
  %14 = load ptr, ptr %10, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %19, label %16

16:                                               ; preds = %2
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef @.str.1) #5
  call void @exit(i32 noundef -1) #6
  unreachable

19:                                               ; preds = %2
  br label %20

20:                                               ; preds = %192, %19
  %21 = load ptr, ptr %10, align 8, !tbaa !5
  %22 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %21, ptr noundef @.str.2, ptr noundef %9, ptr noundef %7)
  store i32 %22, ptr %8, align 4, !tbaa !9
  %23 = load i32, ptr %8, align 4, !tbaa !9
  %24 = icmp eq i32 %23, -1
  br i1 %24, label %25, label %28

25:                                               ; preds = %20
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = call i32 @fclose(ptr noundef %26)
  store i32 1, ptr %11, align 4
  br label %193

28:                                               ; preds = %20
  %29 = load i8, ptr %9, align 1, !tbaa !11
  %30 = sext i8 %29 to i32
  switch i32 %30, label %192 [
    i32 105, label %31
    i32 115, label %86
    i32 114, label %132
    i32 113, label %189
  ]

31:                                               ; preds = %28
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = ashr i32 %32, 3
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [268435455 x i8], ptr @huge_array, i64 0, i64 %34
  %36 = load i8, ptr %35, align 1, !tbaa !11
  %37 = zext i8 %36 to i32
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = and i32 %38, 7
  %40 = shl i32 1, %39
  %41 = and i32 %37, %40
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %44

43:                                               ; preds = %31
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %56

44:                                               ; preds = %31
  store i32 0, ptr %6, align 4, !tbaa !9
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = and i32 %45, 7
  %47 = shl i32 1, %46
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = ashr i32 %48, 3
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [268435455 x i8], ptr @huge_array, i64 0, i64 %50
  %52 = load i8, ptr %51, align 1, !tbaa !11
  %53 = zext i8 %52 to i32
  %54 = or i32 %53, %47
  %55 = trunc i32 %54 to i8
  store i8 %55, ptr %51, align 1, !tbaa !11
  br label %56

56:                                               ; preds = %44, %43
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = load i32, ptr %7, align 4, !tbaa !9
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = call i32 @bplus_tree_put(ptr noundef %57, i32 noundef %58, i64 noundef %60)
  %62 = icmp eq i32 0, %61
  br i1 %62, label %63, label %77

63:                                               ; preds = %56
  %64 = load i32, ptr @valid_ins, align 4, !tbaa !9
  %65 = add i32 %64, 1
  store i32 %65, ptr @valid_ins, align 4, !tbaa !9
  %66 = load i32, ptr %7, align 4, !tbaa !9
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %69

68:                                               ; preds = %63
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %68, %63
  %70 = load i32, ptr %6, align 4, !tbaa !9
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %76

72:                                               ; preds = %69
  %73 = load ptr, ptr @stderr, align 8, !tbaa !5
  %74 = load i32, ptr %7, align 4, !tbaa !9
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef @.str.3, i32 noundef %74) #5
  call void @exit(i32 noundef -1) #6
  unreachable

76:                                               ; preds = %69
  br label %85

77:                                               ; preds = %56
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %84, label %80

80:                                               ; preds = %77
  %81 = load ptr, ptr @stderr, align 8, !tbaa !5
  %82 = load i32, ptr %7, align 4, !tbaa !9
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef @.str.4, i32 noundef %82) #5
  call void @exit(i32 noundef -1) #6
  unreachable

84:                                               ; preds = %77
  br label %85

85:                                               ; preds = %84, %76
  br label %192

86:                                               ; preds = %28
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = ashr i32 %87, 3
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [268435455 x i8], ptr @huge_array, i64 0, i64 %89
  %91 = load i8, ptr %90, align 1, !tbaa !11
  %92 = zext i8 %91 to i32
  %93 = load i32, ptr %7, align 4, !tbaa !9
  %94 = and i32 %93, 7
  %95 = shl i32 1, %94
  %96 = and i32 %92, %95
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %99

98:                                               ; preds = %86
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %100

99:                                               ; preds = %86
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %100

100:                                              ; preds = %99, %98
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = load i32, ptr %7, align 4, !tbaa !9
  %103 = call i64 @bplus_tree_get(ptr noundef %101, i32 noundef %102)
  %104 = trunc i64 %103 to i32
  store i32 %104, ptr %8, align 4, !tbaa !9
  %105 = load i32, ptr %8, align 4, !tbaa !9
  %106 = icmp ne i32 %105, -1
  br i1 %106, label %107, label %123

107:                                              ; preds = %100
  %108 = load i32, ptr @valid_query, align 4, !tbaa !9
  %109 = add i32 %108, 1
  store i32 %109, ptr @valid_query, align 4, !tbaa !9
  %110 = load i32, ptr %6, align 4, !tbaa !9
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %116, label %112

112:                                              ; preds = %107
  %113 = load ptr, ptr @stderr, align 8, !tbaa !5
  %114 = load i32, ptr %7, align 4, !tbaa !9
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %113, ptr noundef @.str.5, i32 noundef %114) #5
  call void @exit(i32 noundef -1) #6
  unreachable

116:                                              ; preds = %107
  %117 = load i32, ptr %8, align 4, !tbaa !9
  %118 = load i32, ptr %7, align 4, !tbaa !9
  %119 = icmp eq i32 %117, %118
  br i1 %119, label %120, label %121

120:                                              ; preds = %116
  br label %122

121:                                              ; preds = %116
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.7, i32 noundef 100, ptr noundef @__PRETTY_FUNCTION__.exec_file) #6
  unreachable

122:                                              ; preds = %120
  br label %131

123:                                              ; preds = %100
  %124 = load i32, ptr %6, align 4, !tbaa !9
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %130

126:                                              ; preds = %123
  %127 = load ptr, ptr @stderr, align 8, !tbaa !5
  %128 = load i32, ptr %7, align 4, !tbaa !9
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %127, ptr noundef @.str.8, i32 noundef %128) #5
  call void @exit(i32 noundef -1) #6
  unreachable

130:                                              ; preds = %123
  br label %131

131:                                              ; preds = %130, %122
  br label %192

132:                                              ; preds = %28
  %133 = load i32, ptr %7, align 4, !tbaa !9
  %134 = ashr i32 %133, 3
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [268435455 x i8], ptr @huge_array, i64 0, i64 %135
  %137 = load i8, ptr %136, align 1, !tbaa !11
  %138 = zext i8 %137 to i32
  %139 = load i32, ptr %7, align 4, !tbaa !9
  %140 = and i32 %139, 7
  %141 = shl i32 1, %140
  %142 = and i32 %138, %141
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %157

144:                                              ; preds = %132
  store i32 1, ptr %6, align 4, !tbaa !9
  %145 = load i32, ptr %7, align 4, !tbaa !9
  %146 = and i32 %145, 7
  %147 = shl i32 1, %146
  %148 = xor i32 %147, -1
  %149 = load i32, ptr %7, align 4, !tbaa !9
  %150 = ashr i32 %149, 3
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [268435455 x i8], ptr @huge_array, i64 0, i64 %151
  %153 = load i8, ptr %152, align 1, !tbaa !11
  %154 = zext i8 %153 to i32
  %155 = and i32 %154, %148
  %156 = trunc i32 %155 to i8
  store i8 %156, ptr %152, align 1, !tbaa !11
  br label %158

157:                                              ; preds = %132
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %158

158:                                              ; preds = %157, %144
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = load i32, ptr %7, align 4, !tbaa !9
  %161 = call i32 @bplus_tree_put(ptr noundef %159, i32 noundef %160, i64 noundef 0)
  %162 = icmp eq i32 0, %161
  br i1 %162, label %163, label %180

163:                                              ; preds = %158
  %164 = load i32, ptr @valid_del, align 4, !tbaa !9
  %165 = add i32 %164, 1
  store i32 %165, ptr @valid_del, align 4, !tbaa !9
  %166 = load i32, ptr %7, align 4, !tbaa !9
  %167 = icmp eq i32 %166, 0
  br i1 %167, label %168, label %172

168:                                              ; preds = %163
  %169 = load i32, ptr %5, align 4, !tbaa !9
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %171, label %172

171:                                              ; preds = %168
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %172

172:                                              ; preds = %171, %168, %163
  %173 = load i32, ptr %6, align 4, !tbaa !9
  %174 = icmp ne i32 %173, 0
  br i1 %174, label %179, label %175

175:                                              ; preds = %172
  %176 = load ptr, ptr @stderr, align 8, !tbaa !5
  %177 = load i32, ptr %7, align 4, !tbaa !9
  %178 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %176, ptr noundef @.str.9, i32 noundef %177) #5
  call void @exit(i32 noundef -1) #6
  unreachable

179:                                              ; preds = %172
  br label %188

180:                                              ; preds = %158
  %181 = load i32, ptr %6, align 4, !tbaa !9
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %187

183:                                              ; preds = %180
  %184 = load ptr, ptr @stderr, align 8, !tbaa !5
  %185 = load i32, ptr %7, align 4, !tbaa !9
  %186 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %184, ptr noundef @.str.10, i32 noundef %185) #5
  call void @exit(i32 noundef -1) #6
  unreachable

187:                                              ; preds = %180
  br label %188

188:                                              ; preds = %187, %179
  br label %192

189:                                              ; preds = %28
  %190 = load ptr, ptr %10, align 8, !tbaa !5
  %191 = call i32 @fclose(ptr noundef %190)
  store i32 1, ptr %11, align 4
  br label %193

192:                                              ; preds = %188, %131, %85, %28
  br label %20

193:                                              ; preds = %189, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void
}

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

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

declare i32 @fclose(ptr noundef) #2

declare i32 @bplus_tree_put(ptr noundef, i32 noundef, i64 noundef) #2

declare i64 @bplus_tree_get(ptr noundef, i32 noundef) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

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

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 "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 = { noreturn 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 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !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 [2 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@huge_array = external hidden local_unnamed_addr global [268435455 x i8], align 16
@valid_ins = external hidden local_unnamed_addr global i32, align 4
@.str.3 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1
@valid_query = external hidden local_unnamed_addr global i32, align 4
@.str.5 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.exec_file = external hidden unnamed_addr constant [44 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [44 x i8], align 1
@valid_del = external hidden local_unnamed_addr global i32, align 4
@.str.9 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [45 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @exec_file(ptr nocapture noundef readonly %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  %5 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str)
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %8, label %.preheader

.preheader:                                       ; preds = %2
  %6 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %5, ptr noundef nonnull @.str.2, ptr noundef nonnull %4, ptr noundef nonnull %3) #5
  %7 = icmp eq i32 %6, -1
  br i1 %7, label %._crit_edge, label %.lr.ph

8:                                                ; preds = %2
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.1) #6
  tail call void @exit(i32 noundef -1) #7
  unreachable

.lr.ph:                                           ; preds = %.preheader, %.thread32
  %11 = load i8, ptr %4, align 1, !tbaa !9
  switch i8 %11, label %.thread32 [
    i8 105, label %12
    i8 115, label %41
    i8 114, label %69
    i8 113, label %._crit_edge
  ]

12:                                               ; preds = %.lr.ph
  %13 = load i32, ptr %3, align 4, !tbaa !10
  %14 = ashr i32 %13, 3
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [268435455 x i8], ptr @huge_array, i64 0, i64 %15
  %17 = load i8, ptr %16, align 1, !tbaa !9
  %18 = zext i8 %17 to i32
  %19 = and i32 %13, 7
  %20 = shl nuw nsw i32 1, %19
  %21 = and i32 %20, %18
  %.not29 = icmp eq i32 %21, 0
  br i1 %.not29, label %22, label %.thread

22:                                               ; preds = %12
  %23 = trunc nuw i32 %20 to i8
  %24 = or i8 %17, %23
  store i8 %24, ptr %16, align 1, !tbaa !9
  %25 = sext i32 %13 to i64
  %26 = call i32 @bplus_tree_put(ptr noundef %1, i32 noundef %13, i64 noundef %25) #5
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %.thread32.sink.split, label %37

.thread:                                          ; preds = %12
  %28 = sext i32 %13 to i64
  %29 = call i32 @bplus_tree_put(ptr noundef %1, i32 noundef %13, i64 noundef %28) #5
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %31, label %.thread32

31:                                               ; preds = %.thread
  %32 = load i32, ptr @valid_ins, align 4, !tbaa !10
  %33 = add i32 %32, 1
  store i32 %33, ptr @valid_ins, align 4, !tbaa !10
  %34 = load i32, ptr %3, align 4, !tbaa !10
  %35 = load ptr, ptr @stderr, align 8, !tbaa !5
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef nonnull @.str.3, i32 noundef %34) #6
  call void @exit(i32 noundef -1) #7
  unreachable

37:                                               ; preds = %22
  %38 = load ptr, ptr @stderr, align 8, !tbaa !5
  %39 = load i32, ptr %3, align 4, !tbaa !10
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.4, i32 noundef %39) #6
  call void @exit(i32 noundef -1) #7
  unreachable

41:                                               ; preds = %.lr.ph
  %42 = load i32, ptr %3, align 4, !tbaa !10
  %43 = ashr i32 %42, 3
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [268435455 x i8], ptr @huge_array, i64 0, i64 %44
  %46 = load i8, ptr %45, align 1, !tbaa !9
  %47 = zext i8 %46 to i32
  %48 = and i32 %42, 7
  %49 = shl nuw nsw i32 1, %48
  %50 = and i32 %49, %47
  %.not25 = icmp eq i32 %50, 0
  %51 = call i64 @bplus_tree_get(ptr noundef %1, i32 noundef %42) #5
  %52 = trunc i64 %51 to i32
  %.not26 = icmp eq i32 %52, -1
  br i1 %.not26, label %64, label %53

53:                                               ; preds = %41
  %54 = load i32, ptr @valid_query, align 4, !tbaa !10
  %55 = add i32 %54, 1
  store i32 %55, ptr @valid_query, align 4, !tbaa !10
  br i1 %.not25, label %56, label %60

56:                                               ; preds = %53
  %57 = load ptr, ptr @stderr, align 8, !tbaa !5
  %58 = load i32, ptr %3, align 4, !tbaa !10
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.5, i32 noundef %58) #6
  call void @exit(i32 noundef -1) #7
  unreachable

60:                                               ; preds = %53
  %61 = load i32, ptr %3, align 4, !tbaa !10
  %62 = icmp eq i32 %61, %52
  br i1 %62, label %.thread32, label %63

63:                                               ; preds = %60
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i32 noundef 100, ptr noundef nonnull @__PRETTY_FUNCTION__.exec_file) #7
  unreachable

64:                                               ; preds = %41
  br i1 %.not25, label %.thread32, label %65

65:                                               ; preds = %64
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  %67 = load i32, ptr %3, align 4, !tbaa !10
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef nonnull @.str.8, i32 noundef %67) #6
  call void @exit(i32 noundef -1) #7
  unreachable

69:                                               ; preds = %.lr.ph
  %70 = load i32, ptr %3, align 4, !tbaa !10
  %71 = ashr i32 %70, 3
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [268435455 x i8], ptr @huge_array, i64 0, i64 %72
  %74 = load i8, ptr %73, align 1, !tbaa !9
  %75 = zext i8 %74 to i32
  %76 = and i32 %70, 7
  %77 = shl nuw nsw i32 1, %76
  %78 = and i32 %77, %75
  %.not22 = icmp eq i32 %78, 0
  br i1 %.not22, label %79, label %.thread33

79:                                               ; preds = %69
  %80 = call i32 @bplus_tree_put(ptr noundef %1, i32 noundef %70, i64 noundef 0) #5
  %81 = icmp eq i32 %80, 0
  br i1 %81, label %87, label %.thread32

.thread33:                                        ; preds = %69
  %82 = trunc nuw i32 %77 to i8
  %83 = xor i8 %82, -1
  %84 = and i8 %74, %83
  store i8 %84, ptr %73, align 1, !tbaa !9
  %85 = call i32 @bplus_tree_put(ptr noundef %1, i32 noundef %70, i64 noundef 0) #5
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %.thread32.sink.split, label %93

87:                                               ; preds = %79
  %88 = load i32, ptr @valid_del, align 4, !tbaa !10
  %89 = add i32 %88, 1
  store i32 %89, ptr @valid_del, align 4, !tbaa !10
  %90 = load i32, ptr %3, align 4, !tbaa !10
  %91 = load ptr, ptr @stderr, align 8, !tbaa !5
  %92 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef nonnull @.str.9, i32 noundef %90) #6
  call void @exit(i32 noundef -1) #7
  unreachable

93:                                               ; preds = %.thread33
  %94 = load ptr, ptr @stderr, align 8, !tbaa !5
  %95 = load i32, ptr %3, align 4, !tbaa !10
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef nonnull @.str.10, i32 noundef %95) #6
  call void @exit(i32 noundef -1) #7
  unreachable

.thread32.sink.split:                             ; preds = %.thread33, %22
  %valid_del.sink41 = phi ptr [ @valid_ins, %22 ], [ @valid_del, %.thread33 ]
  %97 = load i32, ptr %valid_del.sink41, align 4, !tbaa !10
  %98 = add i32 %97, 1
  store i32 %98, ptr %valid_del.sink41, align 4, !tbaa !10
  br label %.thread32

.thread32:                                        ; preds = %.thread32.sink.split, %.thread, %79, %60, %64, %.lr.ph
  %99 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %5, ptr noundef nonnull @.str.2, ptr noundef nonnull %4, ptr noundef nonnull %3) #5
  %100 = icmp eq i32 %99, -1
  br i1 %100, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.thread32, %.preheader
  %101 = call i32 @fclose(ptr noundef nonnull %5)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  ret void
}

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #4

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

declare i32 @bplus_tree_put(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #4

declare i64 @bplus_tree_get(ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 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) #1

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

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

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


; Effective O3 passes: BDCEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass