; LLVM IR from unum-cloud/usearch :: c (test)

; 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.usearch_init_options_t = type { i32, ptr, i32, i64, i64, i64, i64, i8 }

@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @expect(i1 noundef zeroext, ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @create_vectors(i64 noundef, i64 noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @create_options(ptr dead_on_unwind noalias writable sret(%struct.usearch_init_options_t) align 8, i64 noundef) #0

declare ptr @usearch_init(ptr noundef, ptr noundef) #1

declare void @usearch_free(ptr noundef, ptr noundef) #1

declare i64 @usearch_size(ptr noundef, ptr noundef) #1

declare i64 @usearch_capacity(ptr noundef, ptr noundef) #1

declare i64 @usearch_dimensions(ptr noundef, ptr noundef) #1

declare i64 @usearch_connectivity(ptr noundef, ptr noundef) #1

declare void @usearch_reserve(ptr noundef, i64 noundef, ptr noundef) #1

declare void @usearch_add(ptr noundef, i64 noundef, ptr noundef, i32 noundef, ptr noundef) #1

declare zeroext i1 @usearch_contains(ptr noundef, i64 noundef, ptr noundef) #1

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

declare i64 @usearch_search(ptr noundef, ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @test_save_load(i64 noundef %0, i64 noundef %1) #0 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.usearch_init_options_t, align 8
  %8 = alloca %struct.usearch_init_options_t, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store i64 %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !5
  %19 = load i64, ptr %3, align 8, !tbaa !5
  %20 = load i64, ptr %4, align 8, !tbaa !5
  %21 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i64 noundef %19, i64 noundef %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %22 = load i64, ptr %3, align 8, !tbaa !5
  %23 = load i64, ptr %4, align 8, !tbaa !5
  %24 = call ptr @create_vectors(i64 noundef %22, i64 noundef %23)
  store ptr %24, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store ptr null, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 64, ptr %7) #6
  %25 = load i64, ptr %4, align 8, !tbaa !5
  call void @create_options(ptr dead_on_unwind writable sret(%struct.usearch_init_options_t) align 8 %7, i64 noundef %25)
  call void @llvm.lifetime.start.p0(i64 64, ptr %8) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %7, i64 64, i1 false), !tbaa.struct !11
  %26 = getelementptr inbounds %struct.usearch_init_options_t, ptr %8, i32 0, i32 4
  store i64 11, ptr %26, align 8, !tbaa !16
  %27 = getelementptr inbounds %struct.usearch_init_options_t, ptr %8, i32 0, i32 5
  store i64 15, ptr %27, align 8, !tbaa !18
  %28 = getelementptr inbounds %struct.usearch_init_options_t, ptr %8, i32 0, i32 6
  store i64 19, ptr %28, align 8, !tbaa !19
  %29 = getelementptr inbounds %struct.usearch_init_options_t, ptr %8, i32 0, i32 0
  store i32 6, ptr %29, align 8, !tbaa !20
  %30 = getelementptr inbounds %struct.usearch_init_options_t, ptr %8, i32 0, i32 2
  store i32 2, ptr %30, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %31 = call ptr @usearch_init(ptr noundef %8, ptr noundef %6)
  store ptr %31, ptr %9, align 8, !tbaa !9
  %32 = load ptr, ptr %9, align 8, !tbaa !9
  %33 = load i64, ptr %3, align 8, !tbaa !5
  call void @usearch_reserve(ptr noundef %32, i64 noundef %33, ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %52, %2
  %35 = load i64, ptr %10, align 8, !tbaa !5
  %36 = load i64, ptr %3, align 8, !tbaa !5
  %37 = icmp ult i64 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %55

39:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %40 = load i64, ptr %10, align 8, !tbaa !5
  store i64 %40, ptr %11, align 8, !tbaa !5
  %41 = load ptr, ptr %9, align 8, !tbaa !9
  %42 = load i64, ptr %11, align 8, !tbaa !5
  %43 = load ptr, ptr %5, align 8, !tbaa !9
  %44 = load i64, ptr %10, align 8, !tbaa !5
  %45 = load i64, ptr %4, align 8, !tbaa !5
  %46 = mul i64 %44, %45
  %47 = getelementptr inbounds float, ptr %43, i64 %46
  call void @usearch_add(ptr noundef %41, i64 noundef %42, ptr noundef %47, i32 noundef 1, ptr noundef %6)
  %48 = load ptr, ptr %6, align 8, !tbaa !9
  %49 = icmp ne ptr %48, null
  %50 = xor i1 %49, true
  %51 = load ptr, ptr %6, align 8, !tbaa !9
  call void @expect(i1 noundef zeroext %50, ptr noundef %51)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %52

52:                                               ; preds = %39
  %53 = load i64, ptr %10, align 8, !tbaa !5
  %54 = add i64 %53, 1
  store i64 %54, ptr %10, align 8, !tbaa !5
  br label %34, !llvm.loop !22

55:                                               ; preds = %38
  %56 = load ptr, ptr %9, align 8, !tbaa !9
  call void @usearch_save(ptr noundef %56, ptr noundef @.str.16, ptr noundef %6)
  %57 = load ptr, ptr %6, align 8, !tbaa !9
  %58 = icmp ne ptr %57, null
  %59 = xor i1 %58, true
  %60 = load ptr, ptr %6, align 8, !tbaa !9
  call void @expect(i1 noundef zeroext %59, ptr noundef %60)
  %61 = load ptr, ptr %9, align 8, !tbaa !9
  call void @usearch_free(ptr noundef %61, ptr noundef %6)
  %62 = load ptr, ptr %6, align 8, !tbaa !9
  %63 = icmp ne ptr %62, null
  %64 = xor i1 %63, true
  %65 = load ptr, ptr %6, align 8, !tbaa !9
  call void @expect(i1 noundef zeroext %64, ptr noundef %65)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %66 = getelementptr inbounds %struct.usearch_init_options_t, ptr %7, i32 0, i32 4
  store i64 0, ptr %66, align 8, !tbaa !16
  %67 = getelementptr inbounds %struct.usearch_init_options_t, ptr %7, i32 0, i32 3
  store i64 0, ptr %67, align 8, !tbaa !24
  %68 = getelementptr inbounds %struct.usearch_init_options_t, ptr %7, i32 0, i32 5
  store i64 0, ptr %68, align 8, !tbaa !18
  %69 = getelementptr inbounds %struct.usearch_init_options_t, ptr %7, i32 0, i32 6
  store i64 0, ptr %69, align 8, !tbaa !19
  %70 = getelementptr inbounds %struct.usearch_init_options_t, ptr %7, i32 0, i32 1
  store ptr null, ptr %70, align 8, !tbaa !25
  %71 = getelementptr inbounds %struct.usearch_init_options_t, ptr %7, i32 0, i32 2
  store i32 0, ptr %71, align 8, !tbaa !21
  %72 = getelementptr inbounds %struct.usearch_init_options_t, ptr %7, i32 0, i32 0
  store i32 0, ptr %72, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %73 = call ptr @usearch_init(ptr noundef null, ptr noundef %6)
  store ptr %73, ptr %12, align 8, !tbaa !9
  %74 = load ptr, ptr %6, align 8, !tbaa !9
  %75 = icmp ne ptr %74, null
  %76 = xor i1 %75, true
  %77 = load ptr, ptr %6, align 8, !tbaa !9
  call void @expect(i1 noundef zeroext %76, ptr noundef %77)
  %78 = load ptr, ptr %12, align 8, !tbaa !9
  call void @usearch_load(ptr noundef %78, ptr noundef @.str.16, ptr noundef %6)
  %79 = load ptr, ptr %6, align 8, !tbaa !9
  %80 = icmp ne ptr %79, null
  %81 = xor i1 %80, true
  %82 = load ptr, ptr %6, align 8, !tbaa !9
  call void @expect(i1 noundef zeroext %81, ptr noundef %82)
  %83 = load ptr, ptr %12, align 8, !tbaa !9
  %84 = call i64 @usearch_size(ptr noundef %83, ptr noundef %6)
  %85 = load i64, ptr %3, align 8, !tbaa !5
  %86 = icmp eq i64 %84, %85
  %87 = load ptr, ptr %6, align 8, !tbaa !9
  call void @expect(i1 noundef zeroext %86, ptr noundef %87)
  %88 = load ptr, ptr %12, align 8, !tbaa !9
  %89 = call i64 @usearch_capacity(ptr noundef %88, ptr noundef %6)
  %90 = load i64, ptr %3, align 8, !tbaa !5
  %91 = icmp eq i64 %89, %90
  %92 = load ptr, ptr %6, align 8, !tbaa !9
  call void @expect(i1 noundef zeroext %91, ptr noundef %92)
  %93 = load ptr, ptr %12, align 8, !tbaa !9
  %94 = call i64 @usearch_dimensions(ptr noundef %93, ptr noundef %6)
  %95 = load i64, ptr %4, align 8, !tbaa !5
  %96 = icmp eq i64 %94, %95
  %97 = load ptr, ptr %6, align 8, !tbaa !9
  call void @expect(i1 noundef zeroext %96, ptr noundef %97)
  %98 = load ptr, ptr %12, align 8, !tbaa !9
  %99 = call i64 @usearch_connectivity(ptr noundef %98, ptr noundef %6)
  %100 = getelementptr inbounds %struct.usearch_init_options_t, ptr %8, i32 0, i32 4
  %101 = load i64, ptr %100, align 8, !tbaa !16
  %102 = icmp eq i64 %99, %101
  %103 = load ptr, ptr %6, align 8, !tbaa !9
  call void @expect(i1 noundef zeroext %102, ptr noundef %103)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %115, %55
  %105 = load i64, ptr %13, align 8, !tbaa !5
  %106 = load i64, ptr %3, align 8, !tbaa !5
  %107 = icmp ult i64 %105, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %118

109:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %110 = load i64, ptr %13, align 8, !tbaa !5
  store i64 %110, ptr %14, align 8, !tbaa !5
  %111 = load ptr, ptr %12, align 8, !tbaa !9
  %112 = load i64, ptr %14, align 8, !tbaa !5
  %113 = call zeroext i1 @usearch_contains(ptr noundef %111, i64 noundef %112, ptr noundef %6)
  %114 = load ptr, ptr %6, align 8, !tbaa !9
  call void @expect(i1 noundef zeroext %113, ptr noundef %114)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %115

115:                                              ; preds = %109
  %116 = load i64, ptr %13, align 8, !tbaa !5
  %117 = add i64 %116, 1
  store i64 %117, ptr %13, align 8, !tbaa !5
  br label %104, !llvm.loop !26

118:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %119 = load i64, ptr %3, align 8, !tbaa !5
  %120 = mul i64 %119, 8
  %121 = call noalias ptr @malloc(i64 noundef %120) #7
  store ptr %121, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %122 = load i64, ptr %3, align 8, !tbaa !5
  %123 = mul i64 %122, 4
  %124 = call noalias ptr @malloc(i64 noundef %123) #7
  store ptr %124, ptr %16, align 8, !tbaa !9
  %125 = load ptr, ptr %15, align 8, !tbaa !9
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %130

127:                                              ; preds = %118
  %128 = load ptr, ptr %16, align 8, !tbaa !9
  %129 = icmp ne ptr %128, null
  br label %130

130:                                              ; preds = %127, %118
  %131 = phi i1 [ false, %118 ], [ %129, %127 ]
  call void @expect(i1 noundef zeroext %131, ptr noundef @.str.2)
  %132 = load ptr, ptr %12, align 8, !tbaa !9
  call void @usearch_change_threads_search(ptr noundef %132, i64 noundef 1, ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store i64 0, ptr %17, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %161, %130
  %134 = load i64, ptr %17, align 8, !tbaa !5
  %135 = load i64, ptr %3, align 8, !tbaa !5
  %136 = icmp ult i64 %134, %135
  br i1 %136, label %138, label %137

137:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %164

138:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %139 = load ptr, ptr %12, align 8, !tbaa !9
  %140 = load ptr, ptr %5, align 8, !tbaa !9
  %141 = load i64, ptr %17, align 8, !tbaa !5
  %142 = load i64, ptr %4, align 8, !tbaa !5
  %143 = mul i64 %141, %142
  %144 = getelementptr inbounds float, ptr %140, i64 %143
  %145 = load i64, ptr %3, align 8, !tbaa !5
  %146 = load ptr, ptr %15, align 8, !tbaa !9
  %147 = load ptr, ptr %16, align 8, !tbaa !9
  %148 = call i64 @usearch_search(ptr noundef %139, ptr noundef %144, i32 noundef 1, i64 noundef %145, ptr noundef %146, ptr noundef %147, ptr noundef %6)
  store i64 %148, ptr %18, align 8, !tbaa !5
  %149 = load ptr, ptr %6, align 8, !tbaa !9
  %150 = icmp ne ptr %149, null
  %151 = xor i1 %150, true
  %152 = load ptr, ptr %6, align 8, !tbaa !9
  call void @expect(i1 noundef zeroext %151, ptr noundef %152)
  %153 = load i64, ptr %18, align 8, !tbaa !5
  %154 = icmp uge i64 %153, 1
  br i1 %154, label %155, label %159

155:                                              ; preds = %138
  %156 = load i64, ptr %18, align 8, !tbaa !5
  %157 = load i64, ptr %3, align 8, !tbaa !5
  %158 = icmp ule i64 %156, %157
  br label %159

159:                                              ; preds = %155, %138
  %160 = phi i1 [ false, %138 ], [ %158, %155 ]
  call void @expect(i1 noundef zeroext %160, ptr noundef @.str.8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %161

161:                                              ; preds = %159
  %162 = load i64, ptr %17, align 8, !tbaa !5
  %163 = add i64 %162, 1
  store i64 %163, ptr %17, align 8, !tbaa !5
  br label %133, !llvm.loop !27

164:                                              ; preds = %137
  %165 = load ptr, ptr %15, align 8, !tbaa !9
  call void @free(ptr noundef %165) #6
  %166 = load ptr, ptr %16, align 8, !tbaa !9
  call void @free(ptr noundef %166) #6
  %167 = load ptr, ptr %12, align 8, !tbaa !9
  call void @usearch_free(ptr noundef %167, ptr noundef %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %168 = load ptr, ptr %5, align 8, !tbaa !9
  call void @free(ptr noundef %168) #6
  %169 = call i32 @remove(ptr noundef @.str.16) #6
  %170 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void
}

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

declare void @usearch_save(ptr noundef, ptr noundef, ptr noundef) #1

declare void @usearch_load(ptr noundef, ptr noundef, ptr noundef) #1

declare void @usearch_change_threads_search(ptr noundef, i64 noundef, ptr noundef) #1

; Function Attrs: nounwind
declare i32 @remove(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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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 = !{!"long", !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 = !{i64 0, i64 4, !12, i64 8, i64 8, !9, i64 16, i64 4, !12, i64 24, i64 8, !5, i64 32, i64 8, !5, i64 40, i64 8, !5, i64 48, i64 8, !5, i64 56, i64 1, !14}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!17, !6, i64 32}
!17 = !{!"usearch_init_options_t", !13, i64 0, !10, i64 8, !13, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !15, i64 56}
!18 = !{!17, !6, i64 40}
!19 = !{!17, !6, i64 48}
!20 = !{!17, !13, i64 0}
!21 = !{!17, !13, i64 16}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!17, !6, i64 24}
!25 = !{!17, !10, i64 8}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !23}


; 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.usearch_init_options_t = type { i32, ptr, i32, i64, i64, i64, i64, i8 }

@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @expect(i1 noundef zeroext, ptr noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 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) #2

; Function Attrs: nounwind uwtable
declare dso_local void @create_options(ptr dead_on_unwind noalias writable sret(%struct.usearch_init_options_t) align 8, i64 noundef) local_unnamed_addr #0

declare ptr @usearch_init(ptr noundef, ptr noundef) local_unnamed_addr #4

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

declare i64 @usearch_size(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i64 @usearch_capacity(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i64 @usearch_dimensions(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i64 @usearch_connectivity(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @usearch_reserve(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #4

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

declare zeroext i1 @usearch_contains(ptr noundef, i64 noundef, 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

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

; Function Attrs: nounwind uwtable
define dso_local void @test_save_load(i64 noundef %0, i64 noundef %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca %struct.usearch_init_options_t, align 8
  %5 = alloca %struct.usearch_init_options_t, align 8
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i64 noundef %0, i64 noundef %1)
  %7 = tail call ptr @create_vectors(i64 noundef %0, i64 noundef %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #8
  call void @create_options(ptr dead_on_unwind nonnull writable sret(%struct.usearch_init_options_t) align 8 %4, i64 noundef %1)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %5, ptr noundef nonnull align 8 dereferenceable(64) %4, i64 64, i1 false), !tbaa.struct !9
  %8 = getelementptr inbounds i8, ptr %5, i64 32
  store i64 11, ptr %8, align 8, !tbaa !16
  %9 = getelementptr inbounds i8, ptr %5, i64 40
  store i64 15, ptr %9, align 8, !tbaa !18
  %10 = getelementptr inbounds i8, ptr %5, i64 48
  store i64 19, ptr %10, align 8, !tbaa !19
  store i32 6, ptr %5, align 8, !tbaa !20
  %11 = getelementptr inbounds i8, ptr %5, i64 16
  store i32 2, ptr %11, align 8, !tbaa !21
  %12 = call ptr @usearch_init(ptr noundef nonnull %5, ptr noundef nonnull %3) #8
  call void @usearch_reserve(ptr noundef %12, i64 noundef %0, ptr noundef nonnull %3) #8
  %.not70 = icmp eq i64 %0, 0
  br i1 %.not70, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %2
  call void @usearch_save(ptr noundef %12, ptr noundef nonnull @.str.16, ptr noundef nonnull %3) #8
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %.not = icmp eq ptr %13, null
  call void @expect(i1 noundef zeroext %.not, ptr noundef %13)
  call void @usearch_free(ptr noundef %12, ptr noundef nonnull %3) #8
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %.not56 = icmp eq ptr %14, null
  call void @expect(i1 noundef zeroext %.not56, ptr noundef %14)
  %15 = getelementptr inbounds i8, ptr %4, i64 24
  %16 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr null, ptr %16, align 8, !tbaa !22
  %17 = getelementptr inbounds i8, ptr %4, i64 16
  store i32 0, ptr %17, align 8, !tbaa !21
  store i32 0, ptr %4, align 8, !tbaa !20
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %15, i8 0, i64 32, i1 false)
  %18 = call ptr @usearch_init(ptr noundef null, ptr noundef nonnull %3) #8
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %.not57 = icmp eq ptr %19, null
  call void @expect(i1 noundef zeroext %.not57, ptr noundef %19)
  call void @usearch_load(ptr noundef %18, ptr noundef nonnull @.str.16, ptr noundef nonnull %3) #8
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %.not58 = icmp eq ptr %20, null
  call void @expect(i1 noundef zeroext %.not58, ptr noundef %20)
  %21 = call i64 @usearch_size(ptr noundef %18, ptr noundef nonnull %3) #8
  %22 = icmp eq i64 %21, %0
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  call void @expect(i1 noundef zeroext %22, ptr noundef %23)
  %24 = call i64 @usearch_capacity(ptr noundef %18, ptr noundef nonnull %3) #8
  %25 = icmp eq i64 %24, %0
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  call void @expect(i1 noundef zeroext %25, ptr noundef %26)
  %27 = call i64 @usearch_dimensions(ptr noundef %18, ptr noundef nonnull %3) #8
  %28 = icmp eq i64 %27, %1
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  call void @expect(i1 noundef zeroext %28, ptr noundef %29)
  %30 = call i64 @usearch_connectivity(ptr noundef %18, ptr noundef nonnull %3) #8
  %31 = load i64, ptr %8, align 8, !tbaa !16
  %32 = icmp eq i64 %30, %31
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  call void @expect(i1 noundef zeroext %32, ptr noundef %33)
  br i1 %.not70, label %._crit_edge65, label %.lr.ph64

.lr.ph:                                           ; preds = %2, %.lr.ph
  %.061 = phi i64 [ %37, %.lr.ph ], [ 0, %2 ]
  %34 = mul i64 %.061, %1
  %35 = getelementptr inbounds float, ptr %7, i64 %34
  call void @usearch_add(ptr noundef %12, i64 noundef %.061, ptr noundef %35, i32 noundef 1, ptr noundef nonnull %3) #8
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %.not60 = icmp eq ptr %36, null
  call void @expect(i1 noundef zeroext %.not60, ptr noundef %36)
  %37 = add nuw i64 %.061, 1
  %exitcond.not = icmp eq i64 %37, %0
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !23

._crit_edge65:                                    ; preds = %.lr.ph64, %._crit_edge
  %38 = shl i64 %0, 3
  %39 = call noalias ptr @malloc(i64 noundef %38) #9
  %40 = shl i64 %0, 2
  %41 = call noalias ptr @malloc(i64 noundef %40) #9
  %42 = icmp ne ptr %39, null
  %43 = icmp ne ptr %41, null
  %44 = and i1 %42, %43
  call void @expect(i1 noundef zeroext %44, ptr noundef nonnull @.str.2)
  call void @usearch_change_threads_search(ptr noundef %18, i64 noundef 1, ptr noundef nonnull %3) #8
  br i1 %.not70, label %._crit_edge69, label %.lr.ph68

.lr.ph64:                                         ; preds = %._crit_edge, %.lr.ph64
  %.05462 = phi i64 [ %47, %.lr.ph64 ], [ 0, %._crit_edge ]
  %45 = call zeroext i1 @usearch_contains(ptr noundef %18, i64 noundef %.05462, ptr noundef nonnull %3) #8
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  call void @expect(i1 noundef zeroext %45, ptr noundef %46)
  %47 = add nuw i64 %.05462, 1
  %exitcond73.not = icmp eq i64 %47, %0
  br i1 %exitcond73.not, label %._crit_edge65, label %.lr.ph64, !llvm.loop !25

._crit_edge69:                                    ; preds = %.lr.ph68, %._crit_edge65
  call void @free(ptr noundef %39) #8
  call void @free(ptr noundef %41) #8
  call void @usearch_free(ptr noundef %18, ptr noundef nonnull %3) #8
  call void @free(ptr noundef %7) #8
  %48 = call i32 @remove(ptr noundef nonnull @.str.16) #8
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  ret void

.lr.ph68:                                         ; preds = %._crit_edge65, %.lr.ph68
  %.05366 = phi i64 [ %56, %.lr.ph68 ], [ 0, %._crit_edge65 ]
  %50 = mul i64 %.05366, %1
  %51 = getelementptr inbounds float, ptr %7, i64 %50
  %52 = call i64 @usearch_search(ptr noundef %18, ptr noundef %51, i32 noundef 1, i64 noundef %0, ptr noundef %39, ptr noundef %41, ptr noundef nonnull %3) #8
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %.not59 = icmp eq ptr %53, null
  call void @expect(i1 noundef zeroext %.not59, ptr noundef %53)
  %54 = add i64 %52, -1
  %55 = icmp ult i64 %54, %0
  call void @expect(i1 noundef zeroext %55, ptr noundef nonnull @.str.8)
  %56 = add nuw i64 %.05366, 1
  %exitcond74.not = icmp eq i64 %56, %0
  br i1 %exitcond74.not, label %._crit_edge69, label %.lr.ph68, !llvm.loop !26
}

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

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

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

declare void @usearch_change_threads_search(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @remove(ptr nocapture noundef readonly) local_unnamed_addr #1

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

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }

!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 = !{i64 0, i64 4, !10, i64 8, i64 8, !5, i64 16, i64 4, !10, i64 24, i64 8, !12, i64 32, i64 8, !12, i64 40, i64 8, !12, i64 48, i64 8, !12, i64 56, i64 1, !14}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!17, !13, i64 32}
!17 = !{!"usearch_init_options_t", !11, i64 0, !6, i64 8, !11, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !15, i64 56}
!18 = !{!17, !13, i64 40}
!19 = !{!17, !13, i64 48}
!20 = !{!17, !11, i64 0}
!21 = !{!17, !11, i64 16}
!22 = !{!17, !6, i64 8}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = distinct !{!26, !24}


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