; LLVM IR from ryanlayer/giggle :: src/metadata (metadata_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"

@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @metadata_index_add_all_intervals_from_file(ptr noundef, i32 noundef, ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #3
  store ptr @.str.4, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  store ptr @.str.5, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = call ptr @metadata_index_init(ptr noundef %23, ptr noundef %24)
  store ptr %25, ptr %4, align 8, !tbaa !5
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef %26)
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  call void @print_metadata_index(ptr noundef %28)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  store ptr @.str.7, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 5, ptr %6, align 4, !tbaa !9
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  call void @metadata_index_add_all_intervals_from_file(ptr noundef %29, i32 noundef %30, ptr noundef %31)
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef %32, ptr noundef %33)
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  call void @metadata_index_store(ptr noundef %35)
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef %36)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 1, ptr %7, align 4, !tbaa !9
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %47

40:                                               ; preds = %0
  call void @metadata_index_destroy(ptr noundef %4)
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = call ptr @metadata_index_load(ptr noundef %42)
  store ptr %43, ptr %4, align 8, !tbaa !5
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, ptr noundef %44)
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  call void @print_metadata_index(ptr noundef %46)
  br label %47

47:                                               ; preds = %40, %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = call ptr @read_metadata_rows(ptr noundef %48)
  store ptr %49, ptr %8, align 8, !tbaa !5
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, ptr noundef %50)
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  call void @print_metadata_rows(ptr noundef %52)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = call ptr @read_metadata_row(ptr noundef %53, i64 noundef 1)
  store ptr %54, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = call ptr @read_metadata_row(ptr noundef %55, i64 noundef 3)
  store ptr %56, ptr %10, align 8, !tbaa !5
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, ptr noundef %57)
  %59 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  call void @print_metadata_row(ptr noundef %60)
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  call void @print_metadata_row(ptr noundef %62)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = call ptr @read_metadata_item_by_column_id(ptr noundef %63, i64 noundef 0, i8 noundef zeroext 2)
  store ptr %64, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = call ptr @read_metadata_item_by_column_name(ptr noundef %65, i64 noundef 2, ptr noundef @.str.16)
  store ptr %66, ptr %12, align 8, !tbaa !5
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, ptr noundef %67)
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  call void @print_metadata_item(ptr noundef %70)
  %71 = call i32 (ptr, ...) @printf(ptr noundef @.str.19)
  %72 = call i32 (ptr, ...) @printf(ptr noundef @.str.20)
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  call void @print_metadata_item(ptr noundef %73)
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.19)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store ptr @.str.21, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  store ptr @.str.22, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = call ptr @parse_query_filter_string(ptr noundef %75, ptr noundef %76)
  store ptr %77, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = call ptr @parse_query_filter_string(ptr noundef %78, ptr noundef %79)
  store ptr %80, ptr %16, align 8, !tbaa !5
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, ptr noundef %81)
  %83 = load ptr, ptr %15, align 8, !tbaa !5
  call void @print_query_filter(ptr noundef %83)
  %84 = load ptr, ptr %14, align 8, !tbaa !5
  %85 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, ptr noundef %84)
  %86 = load ptr, ptr %16, align 8, !tbaa !5
  call void @print_query_filter(ptr noundef %86)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = load ptr, ptr %15, align 8, !tbaa !5
  %89 = call i32 @filter_metadata_row_by_row(ptr noundef %87, ptr noundef %88)
  store i32 %89, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  %92 = call i32 @filter_metadata_row_by_row(ptr noundef %90, ptr noundef %91)
  store i32 %92, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = call i32 @filter_metadata_row_by_row(ptr noundef %93, ptr noundef %94)
  store i32 %95, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  %97 = load ptr, ptr %16, align 8, !tbaa !5
  %98 = call i32 @filter_metadata_row_by_row(ptr noundef %96, ptr noundef %97)
  store i32 %98, ptr %20, align 4, !tbaa !9
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.24)
  %100 = load i32, ptr %17, align 4, !tbaa !9
  %101 = load i32, ptr %18, align 4, !tbaa !9
  %102 = call i32 (ptr, ...) @printf(ptr noundef @.str.25, i32 noundef %100, i32 noundef %101)
  %103 = load i32, ptr %19, align 4, !tbaa !9
  %104 = load i32, ptr %20, align 4, !tbaa !9
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.26, i32 noundef %103, i32 noundef %104)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  %106 = load ptr, ptr %11, align 8, !tbaa !5
  %107 = load ptr, ptr %15, align 8, !tbaa !5
  %108 = call i32 @filter_metadata_row_by_item(ptr noundef %106, ptr noundef %107)
  store i32 %108, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = load ptr, ptr %16, align 8, !tbaa !5
  %111 = call i32 @filter_metadata_row_by_item(ptr noundef %109, ptr noundef %110)
  store i32 %111, ptr %22, align 4, !tbaa !9
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.27)
  %113 = load i32, ptr %21, align 4, !tbaa !9
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.28, i32 noundef %113)
  %115 = load i32, ptr %22, align 4, !tbaa !9
  %116 = call i32 (ptr, ...) @printf(ptr noundef @.str.29, i32 noundef %115)
  call void @metadata_index_destroy(ptr noundef %4)
  call void @query_filter_destroy(ptr noundef %15)
  call void @query_filter_destroy(ptr noundef %16)
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  call void @metadata_item_destroy(ptr noundef %117)
  %118 = load ptr, ptr %12, align 8, !tbaa !5
  call void @metadata_item_destroy(ptr noundef %118)
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  call void @metadata_row_destroy(ptr noundef %119)
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  call void @metadata_row_destroy(ptr noundef %120)
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  call void @metadata_rows_destroy(ptr noundef %121)
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #3
  ret i32 0
}

declare ptr @metadata_index_init(ptr noundef, ptr noundef) #2

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

declare void @print_metadata_index(ptr noundef) #2

declare void @metadata_index_store(ptr noundef) #2

declare void @metadata_index_destroy(ptr noundef) #2

declare ptr @metadata_index_load(ptr noundef) #2

declare ptr @read_metadata_rows(ptr noundef) #2

declare void @print_metadata_rows(ptr noundef) #2

declare ptr @read_metadata_row(ptr noundef, i64 noundef) #2

declare void @print_metadata_row(ptr noundef) #2

declare ptr @read_metadata_item_by_column_id(ptr noundef, i64 noundef, i8 noundef zeroext) #2

declare ptr @read_metadata_item_by_column_name(ptr noundef, i64 noundef, ptr noundef) #2

declare void @print_metadata_item(ptr noundef) #2

declare ptr @parse_query_filter_string(ptr noundef, ptr noundef) #2

declare void @print_query_filter(ptr noundef) #2

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

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

declare void @query_filter_destroy(ptr noundef) #2

declare void @metadata_item_destroy(ptr noundef) #2

declare void @metadata_row_destroy(ptr noundef) #2

declare void @metadata_rows_destroy(ptr noundef) #2

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 }

!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}


; 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.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [17 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %4 = tail call ptr @metadata_index_init(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5) #4
  store ptr %4, ptr %1, align 8, !tbaa !5
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull @.str.5)
  tail call void @print_metadata_index(ptr noundef %4) #4
  tail call void @metadata_index_add_all_intervals_from_file(ptr noundef %4, i32 noundef 5, ptr noundef nonnull @.str.7)
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.5)
  tail call void @metadata_index_store(ptr noundef %4) #4
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull @.str.5)
  call void @metadata_index_destroy(ptr noundef nonnull %1) #4
  %8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %9 = call ptr @metadata_index_load(ptr noundef nonnull @.str.5) #4
  store ptr %9, ptr %1, align 8, !tbaa !5
  %10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.5)
  %11 = load ptr, ptr %1, align 8, !tbaa !5
  call void @print_metadata_index(ptr noundef %11) #4
  %12 = load ptr, ptr %1, align 8, !tbaa !5
  %13 = call ptr @read_metadata_rows(ptr noundef %12) #4
  %14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, ptr noundef nonnull @.str.5)
  call void @print_metadata_rows(ptr noundef %13) #4
  %15 = load ptr, ptr %1, align 8, !tbaa !5
  %16 = call ptr @read_metadata_row(ptr noundef %15, i64 noundef 1) #4
  %17 = load ptr, ptr %1, align 8, !tbaa !5
  %18 = call ptr @read_metadata_row(ptr noundef %17, i64 noundef 3) #4
  %19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, ptr noundef nonnull @.str.5)
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  call void @print_metadata_row(ptr noundef %16) #4
  %21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  call void @print_metadata_row(ptr noundef %18) #4
  %22 = load ptr, ptr %1, align 8, !tbaa !5
  %23 = call ptr @read_metadata_item_by_column_id(ptr noundef %22, i64 noundef 0, i8 noundef zeroext 2) #4
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  %25 = call ptr @read_metadata_item_by_column_name(ptr noundef %24, i64 noundef 2, ptr noundef nonnull @.str.16) #4
  %26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, ptr noundef nonnull @.str.5)
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  call void @print_metadata_item(ptr noundef %23) #4
  %28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19)
  %29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20)
  call void @print_metadata_item(ptr noundef %25) #4
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %31 = load ptr, ptr %1, align 8, !tbaa !5
  %32 = call ptr @parse_query_filter_string(ptr noundef %31, ptr noundef nonnull @.str.21) #4
  store ptr %32, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %33 = load ptr, ptr %1, align 8, !tbaa !5
  %34 = call ptr @parse_query_filter_string(ptr noundef %33, ptr noundef nonnull @.str.22) #4
  store ptr %34, ptr %3, align 8, !tbaa !5
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, ptr noundef nonnull @.str.21)
  call void @print_query_filter(ptr noundef %32) #4
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, ptr noundef nonnull @.str.22)
  call void @print_query_filter(ptr noundef %34) #4
  %37 = call i32 @filter_metadata_row_by_row(ptr noundef %16, ptr noundef %32) #4
  %38 = call i32 @filter_metadata_row_by_row(ptr noundef %16, ptr noundef %34) #4
  %39 = call i32 @filter_metadata_row_by_row(ptr noundef %18, ptr noundef %32) #4
  %40 = call i32 @filter_metadata_row_by_row(ptr noundef %18, ptr noundef %34) #4
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24)
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25, i32 noundef %37, i32 noundef %38)
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26, i32 noundef %39, i32 noundef %40)
  %44 = call i32 @filter_metadata_row_by_item(ptr noundef %23, ptr noundef %32) #4
  %45 = call i32 @filter_metadata_row_by_item(ptr noundef %25, ptr noundef %34) #4
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27)
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.28, i32 noundef %44)
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.29, i32 noundef %45)
  call void @metadata_index_destroy(ptr noundef nonnull %1) #4
  call void @query_filter_destroy(ptr noundef nonnull %2) #4
  call void @query_filter_destroy(ptr noundef nonnull %3) #4
  call void @metadata_item_destroy(ptr noundef %23) #4
  call void @metadata_item_destroy(ptr noundef %25) #4
  call void @metadata_row_destroy(ptr noundef %16) #4
  call void @metadata_row_destroy(ptr noundef %18) #4
  call void @metadata_rows_destroy(ptr noundef %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  ret i32 0
}

declare ptr @metadata_index_init(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare void @print_metadata_index(ptr noundef) local_unnamed_addr #2

declare void @metadata_index_store(ptr noundef) local_unnamed_addr #2

declare void @metadata_index_destroy(ptr noundef) local_unnamed_addr #2

declare ptr @metadata_index_load(ptr noundef) local_unnamed_addr #2

declare ptr @read_metadata_rows(ptr noundef) local_unnamed_addr #2

declare void @print_metadata_rows(ptr noundef) local_unnamed_addr #2

declare ptr @read_metadata_row(ptr noundef, i64 noundef) local_unnamed_addr #2

declare void @print_metadata_row(ptr noundef) local_unnamed_addr #2

declare ptr @read_metadata_item_by_column_id(ptr noundef, i64 noundef, i8 noundef zeroext) local_unnamed_addr #2

declare ptr @read_metadata_item_by_column_name(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @print_metadata_item(ptr noundef) local_unnamed_addr #2

declare ptr @parse_query_filter_string(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @print_query_filter(ptr noundef) local_unnamed_addr #2

declare i32 @filter_metadata_row_by_row(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @filter_metadata_row_by_item(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @query_filter_destroy(ptr noundef) local_unnamed_addr #2

declare void @metadata_item_destroy(ptr noundef) local_unnamed_addr #2

declare void @metadata_row_destroy(ptr noundef) local_unnamed_addr #2

declare void @metadata_rows_destroy(ptr noundef) local_unnamed_addr #2

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 = { "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 = { 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 #4 = { 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"}


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