; LLVM IR from pmwkaa/monotone :: monotone/main/api (monotone)

; 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.Runtime = type { %struct.ExceptionMgr, %struct.Error, ptr }
%struct.ExceptionMgr = type { ptr }
%struct.Error = type { [256 x i8], i32, ptr, ptr, i32, ptr, ptr }
%struct.Exception = type { ptr, i8, ptr, [1 x %struct.__jmp_buf_tag] }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.monotone_cursor = type { i32, %struct.EngineCursor, ptr }
%struct.EngineCursor = type { ptr, %struct.PartCursor, ptr }
%struct.PartCursor = type { ptr, %struct.PartIterator, %struct.MemtableIterator, %struct.MemtableIterator, %struct.MergeIterator }
%struct.PartIterator = type { %struct.Iterator, %struct.RegionIterator, %struct.IndexIterator, ptr, ptr, %struct.Reader }
%struct.Iterator = type { ptr, ptr, ptr, ptr }
%struct.RegionIterator = type { %struct.Iterator, ptr, i32, ptr, ptr }
%struct.IndexIterator = type { ptr, ptr, ptr, i32 }
%struct.Reader = type { ptr, ptr, ptr, %struct.Buf, %struct.Buf, %struct.Buf }
%struct.Buf = type { ptr, ptr, ptr }
%struct.MemtableIterator = type { %struct.Iterator, ptr, ptr, i32, ptr, %struct.List }
%struct.List = type { ptr, ptr }
%struct.MergeIterator = type { %struct.Iterator, ptr, %struct.Buf, i32, ptr }
%struct.Event = type <{ i64, i8, i8, i32, [0 x i8] }>
%struct.monotone_event = type { i32, i64, ptr, i64, ptr, i64 }

@mn_runtime = external thread_local global %struct.Runtime, align 8

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @monotone_enter(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #3

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden zeroext i1 @exception_mgr_leave(ptr noundef, ptr noundef) #5

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

; Function Attrs: hot nounwind uwtable
define dso_local i32 @monotone_read(ptr noundef %0, ptr noundef %1) #6 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %struct.Exception, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.monotone_cursor, ptr %9, i32 0, i32 2
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  call void @monotone_enter(ptr noundef %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.start.p0(i64 224, ptr %6) #9
  %12 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %13 = getelementptr inbounds %struct.Runtime, ptr %12, i32 0, i32 0
  %14 = getelementptr inbounds %struct.ExceptionMgr, ptr %13, i32 0, i32 0
  %15 = load ptr, ptr %14, align 8, !tbaa !23
  %16 = getelementptr inbounds %struct.Exception, ptr %6, i32 0, i32 0
  store ptr %15, ptr %16, align 8, !tbaa !27
  %17 = getelementptr inbounds %struct.Exception, ptr %6, i32 0, i32 1
  store i8 0, ptr %17, align 8, !tbaa !30
  %18 = getelementptr inbounds %struct.Exception, ptr %6, i32 0, i32 2
  store ptr null, ptr %18, align 8, !tbaa !31
  %19 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %20 = getelementptr inbounds %struct.Runtime, ptr %19, i32 0, i32 0
  %21 = getelementptr inbounds %struct.ExceptionMgr, ptr %20, i32 0, i32 0
  store ptr %6, ptr %21, align 8, !tbaa !23
  %22 = getelementptr inbounds %struct.Exception, ptr %6, i32 0, i32 3
  %23 = getelementptr inbounds [1 x %struct.__jmp_buf_tag], ptr %22, i64 0, i64 0
  %24 = call i32 @_setjmp(ptr noundef %23) #10
  %25 = icmp eq i32 %24, 0
  %26 = zext i1 %25 to i32
  store i32 %26, ptr %7, align 4, !tbaa !32
  %27 = load i32, ptr %7, align 4, !tbaa !32
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %91

29:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.monotone_cursor, ptr %30, i32 0, i32 1
  %32 = call ptr @engine_cursor_at(ptr noundef %31) #11
  store ptr %32, ptr %8, align 8, !tbaa !5
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  %35 = xor i1 %34, true
  %36 = xor i1 %35, true
  %37 = zext i1 %36 to i32
  %38 = sext i32 %37 to i64
  %39 = call i64 @llvm.expect.i64(i64 %38, i64 1)
  %40 = icmp ne i64 %39, 0
  br i1 %40, label %41, label %89

41:                                               ; preds = %29
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.Event, ptr %42, i32 0, i32 1
  %44 = load i8, ptr %43, align 1, !tbaa !33
  %45 = zext i8 %44 to i32
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.monotone_event, ptr %46, i32 0, i32 0
  store i32 %45, ptr %47, align 8, !tbaa !34
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.Event, ptr %48, i32 0, i32 0
  %50 = load i64, ptr %49, align 1, !tbaa !37
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.monotone_event, ptr %51, i32 0, i32 1
  store i64 %50, ptr %52, align 8, !tbaa !38
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.Event, ptr %53, i32 0, i32 2
  %55 = load i8, ptr %54, align 1, !tbaa !33
  %56 = zext i8 %55 to i64
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.monotone_event, ptr %57, i32 0, i32 3
  store i64 %56, ptr %58, align 8, !tbaa !39
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = call ptr @event_key(ptr noundef %59) #11
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.monotone_event, ptr %61, i32 0, i32 2
  store ptr %60, ptr %62, align 8, !tbaa !40
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.Event, ptr %63, i32 0, i32 3
  %65 = load i32, ptr %64, align 1, !tbaa !32
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.Event, ptr %66, i32 0, i32 2
  %68 = load i8, ptr %67, align 1, !tbaa !33
  %69 = zext i8 %68 to i32
  %70 = sub i32 %65, %69
  %71 = zext i32 %70 to i64
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.monotone_event, ptr %72, i32 0, i32 5
  store i64 %71, ptr %73, align 8, !tbaa !41
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = call ptr @event_value(ptr noundef %74) #11
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.monotone_event, ptr %76, i32 0, i32 4
  store ptr %75, ptr %77, align 8, !tbaa !42
  store i32 1, ptr %5, align 4, !tbaa !32
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = call i32 @event_is_delete(ptr noundef %78) #11
  %80 = icmp ne i32 %79, 0
  %81 = xor i1 %80, true
  %82 = xor i1 %81, true
  %83 = zext i1 %82 to i32
  %84 = sext i32 %83 to i64
  %85 = call i64 @llvm.expect.i64(i64 %84, i64 0)
  %86 = icmp ne i64 %85, 0
  br i1 %86, label %87, label %88

87:                                               ; preds = %41
  store i32 0, ptr %5, align 4, !tbaa !32
  br label %88

88:                                               ; preds = %87, %41
  br label %90

89:                                               ; preds = %29
  store i32 0, ptr %5, align 4, !tbaa !32
  br label %90

90:                                               ; preds = %89, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  br label %91

91:                                               ; preds = %90, %2
  %92 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %93 = getelementptr inbounds %struct.Runtime, ptr %92, i32 0, i32 0
  %94 = call zeroext i1 @exception_mgr_leave(ptr noundef %93, ptr noundef %6)
  br i1 %94, label %95, label %96

95:                                               ; preds = %91
  store i32 -1, ptr %5, align 4, !tbaa !32
  br label %96

96:                                               ; preds = %95, %91
  %97 = load i32, ptr %5, align 4, !tbaa !32
  call void @llvm.lifetime.end.p0(i64 224, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  ret i32 %97
}

; Function Attrs: hot inlinehint nounwind uwtable
declare hidden ptr @engine_cursor_at(ptr noundef) #7

; Function Attrs: alwaysinline hot nounwind uwtable
declare hidden ptr @event_key(ptr noundef) #8

; Function Attrs: alwaysinline hot nounwind uwtable
declare hidden ptr @event_value(ptr noundef) #8

; Function Attrs: alwaysinline hot nounwind uwtable
declare hidden i32 @event_is_delete(ptr noundef) #8

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #2 = { inlinehint 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind returns_twice "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 = { alwaysinline 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 #6 = { hot 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 #7 = { hot inlinehint 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 #8 = { alwaysinline hot 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 #9 = { nounwind }
attributes #10 = { nounwind returns_twice }
attributes #11 = { hot }

!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, !6, i64 512}
!10 = !{!"monotone_cursor", !11, i64 0, !12, i64 8, !6, i64 512}
!11 = !{!"int", !7, i64 0}
!12 = !{!"EngineCursor", !6, i64 0, !13, i64 8, !6, i64 496}
!13 = !{!"PartCursor", !6, i64 0, !14, i64 8, !20, i64 248, !20, i64 328, !22, i64 408}
!14 = !{!"PartIterator", !15, i64 0, !16, i64 32, !17, i64 96, !6, i64 128, !6, i64 136, !18, i64 144}
!15 = !{!"Iterator", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"RegionIterator", !15, i64 0, !6, i64 32, !11, i64 40, !6, i64 48, !6, i64 56}
!17 = !{!"IndexIterator", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24}
!18 = !{!"Reader", !6, i64 0, !6, i64 8, !6, i64 16, !19, i64 24, !19, i64 48, !19, i64 72}
!19 = !{!"Buf", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"MemtableIterator", !15, i64 0, !6, i64 32, !6, i64 40, !11, i64 48, !6, i64 56, !21, i64 64}
!21 = !{!"List", !6, i64 0, !6, i64 8}
!22 = !{!"MergeIterator", !15, i64 0, !6, i64 32, !19, i64 40, !11, i64 64, !6, i64 72}
!23 = !{!24, !6, i64 0}
!24 = !{!"Runtime", !25, i64 0, !26, i64 8, !6, i64 312}
!25 = !{!"ExceptionMgr", !6, i64 0}
!26 = !{!"Error", !7, i64 0, !11, i64 256, !6, i64 264, !6, i64 272, !11, i64 280, !6, i64 288, !6, i64 296}
!27 = !{!28, !6, i64 0}
!28 = !{!"Exception", !6, i64 0, !29, i64 8, !6, i64 16, !7, i64 24}
!29 = !{!"_Bool", !7, i64 0}
!30 = !{!28, !29, i64 8}
!31 = !{!28, !6, i64 16}
!32 = !{!11, !11, i64 0}
!33 = !{!7, !7, i64 0}
!34 = !{!35, !11, i64 0}
!35 = !{!"monotone_event", !11, i64 0, !36, i64 8, !6, i64 16, !36, i64 24, !6, i64 32, !36, i64 40}
!36 = !{!"long", !7, i64 0}
!37 = !{!36, !36, i64 0}
!38 = !{!35, !36, i64 8}
!39 = !{!35, !36, i64 24}
!40 = !{!35, !6, i64 16}
!41 = !{!35, !36, i64 40}
!42 = !{!35, !6, i64 32}


; 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.Runtime = type { %struct.ExceptionMgr, %struct.Error, ptr }
%struct.ExceptionMgr = type { ptr }
%struct.Error = type { [256 x i8], i32, ptr, ptr, i32, ptr, ptr }
%struct.Exception = type { ptr, i8, ptr, [1 x %struct.__jmp_buf_tag] }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

@mn_runtime = external thread_local global %struct.Runtime, align 8

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @monotone_enter(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #2

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) local_unnamed_addr #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden zeroext i1 @exception_mgr_leave(ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: hot nounwind uwtable
define dso_local i32 @monotone_read(ptr noundef %0, ptr nocapture noundef writeonly %1) local_unnamed_addr #5 {
  %3 = alloca %struct.Exception, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 512
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  call void @monotone_enter(ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %3) #8
  %6 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %7 = load ptr, ptr %6, align 8, !tbaa !22
  store ptr %7, ptr %3, align 8, !tbaa !26
  %8 = getelementptr inbounds i8, ptr %3, i64 8
  store i8 0, ptr %8, align 8, !tbaa !29
  %9 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr null, ptr %9, align 8, !tbaa !30
  store ptr %3, ptr %6, align 8, !tbaa !22
  %10 = getelementptr inbounds i8, ptr %3, i64 24
  %11 = call i32 @_setjmp(ptr noundef nonnull %10) #9
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %13, label %39

13:                                               ; preds = %2
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = call ptr @engine_cursor_at(ptr noundef nonnull %14) #10
  %.not = icmp eq ptr %15, null
  br i1 %.not, label %39, label %16, !prof !31

16:                                               ; preds = %13
  %17 = getelementptr inbounds i8, ptr %15, i64 8
  %18 = load i8, ptr %17, align 1, !tbaa !32
  %19 = zext i8 %18 to i32
  store i32 %19, ptr %1, align 8, !tbaa !33
  %20 = load i64, ptr %15, align 1, !tbaa !36
  %21 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 %20, ptr %21, align 8, !tbaa !37
  %22 = getelementptr inbounds i8, ptr %15, i64 9
  %23 = load i8, ptr %22, align 1, !tbaa !32
  %24 = zext i8 %23 to i64
  %25 = getelementptr inbounds i8, ptr %1, i64 24
  store i64 %24, ptr %25, align 8, !tbaa !38
  %26 = call ptr @event_key(ptr noundef nonnull %15) #10
  %27 = getelementptr inbounds i8, ptr %1, i64 16
  store ptr %26, ptr %27, align 8, !tbaa !39
  %28 = getelementptr inbounds i8, ptr %15, i64 10
  %29 = load i32, ptr %28, align 1, !tbaa !40
  %30 = load i8, ptr %22, align 1, !tbaa !32
  %31 = zext i8 %30 to i32
  %32 = sub i32 %29, %31
  %33 = zext i32 %32 to i64
  %34 = getelementptr inbounds i8, ptr %1, i64 40
  store i64 %33, ptr %34, align 8, !tbaa !41
  %35 = call ptr @event_value(ptr noundef nonnull %15) #10
  %36 = getelementptr inbounds i8, ptr %1, i64 32
  store ptr %35, ptr %36, align 8, !tbaa !42
  %37 = call i32 @event_is_delete(ptr noundef nonnull %15) #10
  %.not19 = icmp eq i32 %37, 0
  br i1 %.not19, label %39, label %38, !prof !43

38:                                               ; preds = %16
  br label %39

39:                                               ; preds = %38, %16, %13, %2
  %.1 = phi i32 [ undef, %2 ], [ 0, %38 ], [ 1, %16 ], [ 0, %13 ]
  %40 = call zeroext i1 @exception_mgr_leave(ptr noundef nonnull %6, ptr noundef nonnull %3)
  %spec.select = select i1 %40, i32 -1, i32 %.1
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %3) #8
  ret i32 %spec.select
}

; Function Attrs: hot inlinehint nounwind uwtable
declare hidden ptr @engine_cursor_at(ptr noundef) local_unnamed_addr #6

; Function Attrs: alwaysinline hot nounwind uwtable
declare hidden ptr @event_key(ptr noundef) local_unnamed_addr #7

; Function Attrs: alwaysinline hot nounwind uwtable
declare hidden ptr @event_value(ptr noundef) local_unnamed_addr #7

; Function Attrs: alwaysinline hot nounwind uwtable
declare hidden i32 @event_is_delete(ptr noundef) local_unnamed_addr #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind returns_twice "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 = { alwaysinline 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 #5 = { hot 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 #6 = { hot inlinehint 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 #7 = { alwaysinline hot 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 #8 = { nounwind }
attributes #9 = { nounwind returns_twice }
attributes #10 = { hot }

!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, !11, i64 512}
!6 = !{!"monotone_cursor", !7, i64 0, !10, i64 8, !11, i64 512}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"EngineCursor", !11, i64 0, !12, i64 8, !11, i64 496}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"PartCursor", !11, i64 0, !13, i64 8, !19, i64 248, !19, i64 328, !21, i64 408}
!13 = !{!"PartIterator", !14, i64 0, !15, i64 32, !16, i64 96, !11, i64 128, !11, i64 136, !17, i64 144}
!14 = !{!"Iterator", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!15 = !{!"RegionIterator", !14, i64 0, !11, i64 32, !7, i64 40, !11, i64 48, !11, i64 56}
!16 = !{!"IndexIterator", !11, i64 0, !11, i64 8, !11, i64 16, !7, i64 24}
!17 = !{!"Reader", !11, i64 0, !11, i64 8, !11, i64 16, !18, i64 24, !18, i64 48, !18, i64 72}
!18 = !{!"Buf", !11, i64 0, !11, i64 8, !11, i64 16}
!19 = !{!"MemtableIterator", !14, i64 0, !11, i64 32, !11, i64 40, !7, i64 48, !11, i64 56, !20, i64 64}
!20 = !{!"List", !11, i64 0, !11, i64 8}
!21 = !{!"MergeIterator", !14, i64 0, !11, i64 32, !18, i64 40, !7, i64 64, !11, i64 72}
!22 = !{!23, !11, i64 0}
!23 = !{!"Runtime", !24, i64 0, !25, i64 8, !11, i64 312}
!24 = !{!"ExceptionMgr", !11, i64 0}
!25 = !{!"Error", !8, i64 0, !7, i64 256, !11, i64 264, !11, i64 272, !7, i64 280, !11, i64 288, !11, i64 296}
!26 = !{!27, !11, i64 0}
!27 = !{!"Exception", !11, i64 0, !28, i64 8, !11, i64 16, !8, i64 24}
!28 = !{!"_Bool", !8, i64 0}
!29 = !{!27, !28, i64 8}
!30 = !{!27, !11, i64 16}
!31 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!32 = !{!8, !8, i64 0}
!33 = !{!34, !7, i64 0}
!34 = !{!"monotone_event", !7, i64 0, !35, i64 8, !11, i64 16, !35, i64 24, !11, i64 32, !35, i64 40}
!35 = !{!"long", !8, i64 0}
!36 = !{!35, !35, i64 0}
!37 = !{!34, !35, i64 8}
!38 = !{!34, !35, i64 24}
!39 = !{!34, !11, i64 16}
!40 = !{!7, !7, i64 0}
!41 = !{!34, !35, i64 40}
!42 = !{!34, !11, i64 32}
!43 = !{!"branch_weights", !"expected", i32 2000, i32 1}


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