; 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 = type { i32, %struct.Main }
%struct.Main = type { %struct.Rwlock, %struct.File, %struct.Engine, %struct.Wal, %struct.Service, %struct.WorkerMgr, %struct.CloudMgr, %struct.MemoryMgr, %struct.CompressionMgr, %struct.EncryptionMgr, %struct.Random, %struct.Comparator, %struct.Logger, %struct.Context, %struct.Control, %struct.Config, %struct.Global }
%struct.Rwlock = type { %union.pthread_rwlock_t }
%union.pthread_rwlock_t = type { %struct.__pthread_rwlock_arch_t }
%struct.__pthread_rwlock_arch_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, [7 x i8], i64, i32 }
%struct.File = type { i32, i64, %struct.Str, %struct.List }
%struct.Str = type { ptr, ptr, i8 }
%struct.List = type { ptr, ptr }
%struct.Engine = type { %struct.Mutex, %struct.CondVar, %struct.Mapping, %struct.Pipeline, %struct.StorageMgr, ptr, ptr, ptr }
%struct.Mutex = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct.CondVar = type { %union.pthread_cond_t }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%struct.Mapping = type { %struct.Rbtree, i32 }
%struct.Rbtree = type { ptr }
%struct.Pipeline = type { %struct.List, i32, ptr }
%struct.StorageMgr = type { %struct.List, i32, ptr }
%struct.Wal = type { %struct.Mutex, %struct.WalId, ptr }
%struct.WalId = type { %struct.Spinlock, i32, %struct.Buf }
%struct.Spinlock = type { i32 }
%struct.Buf = type { ptr, ptr, ptr }
%struct.Service = type { %struct.Mutex, %struct.CondVar, %struct.List, i32, i32, i8 }
%struct.WorkerMgr = type { i32, ptr }
%struct.CloudMgr = type { %struct.List, i32 }
%struct.MemoryMgr = type { %struct.Mutex, %struct.CondVar, i32, ptr, i32, i32, i64, i8, i8, i64, i64 }
%struct.CompressionMgr = type { %struct.Cache, %struct.Cache }
%struct.Cache = type { %struct.Spinlock, %struct.List, i32 }
%struct.EncryptionMgr = type { %struct.Cache }
%struct.Random = type { %struct.Spinlock, [2 x i64] }
%struct.Comparator = type { i32 }
%struct.Logger = type { i8, i8, i32 }
%struct.Context = type { ptr, ptr, ptr }
%struct.Control = type { ptr, ptr, ptr, ptr }
%struct.Config = type { %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.Var, %struct.List, %struct.List, i32, i32, i32, i32 }
%struct.Var = type { i32, i32, %struct.Str, %struct.List, %struct.List, %union.anon }
%union.anon = type { %struct.Str }
%struct.Global = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }

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

; Function Attrs: nounwind uwtable
define dso_local ptr @monotone_init() #0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %struct.Exception, align 8
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #10
  %6 = call noalias ptr @malloc(i64 noundef 4424) #11
  store ptr %6, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = icmp eq ptr %7, null
  %9 = xor i1 %8, true
  %10 = xor i1 %9, true
  %11 = zext i1 %10 to i32
  %12 = sext i32 %11 to i64
  %13 = call i64 @llvm.expect.i64(i64 %12, i64 0)
  %14 = icmp ne i64 %13, 0
  br i1 %14, label %15, label %16

15:                                               ; preds = %0
  store ptr null, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %52

16:                                               ; preds = %0
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.monotone, ptr %17, i32 0, i32 0
  store i32 1068587329, ptr %18, align 8, !tbaa !9
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.monotone, ptr %19, i32 0, i32 1
  call void @main_init(ptr noundef %20)
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  call void @monotone_enter(ptr noundef %21)
  call void @llvm.lifetime.start.p0(i64 224, ptr %4) #10
  %22 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %23 = getelementptr inbounds %struct.Runtime, ptr %22, i32 0, i32 0
  %24 = getelementptr inbounds %struct.ExceptionMgr, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !45
  %26 = getelementptr inbounds %struct.Exception, ptr %4, i32 0, i32 0
  store ptr %25, ptr %26, align 8, !tbaa !49
  %27 = getelementptr inbounds %struct.Exception, ptr %4, i32 0, i32 1
  store i8 0, ptr %27, align 8, !tbaa !51
  %28 = getelementptr inbounds %struct.Exception, ptr %4, i32 0, i32 2
  store ptr null, ptr %28, align 8, !tbaa !52
  %29 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %30 = getelementptr inbounds %struct.Runtime, ptr %29, i32 0, i32 0
  %31 = getelementptr inbounds %struct.ExceptionMgr, ptr %30, i32 0, i32 0
  store ptr %4, ptr %31, align 8, !tbaa !45
  %32 = getelementptr inbounds %struct.Exception, ptr %4, i32 0, i32 3
  %33 = getelementptr inbounds [1 x %struct.__jmp_buf_tag], ptr %32, i64 0, i64 0
  %34 = call i32 @_setjmp(ptr noundef %33) #12
  %35 = icmp eq i32 %34, 0
  %36 = zext i1 %35 to i32
  store i32 %36, ptr %5, align 4, !tbaa !53
  %37 = load i32, ptr %5, align 4, !tbaa !53
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %42

39:                                               ; preds = %16
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.monotone, ptr %40, i32 0, i32 1
  call void @main_prepare(ptr noundef %41)
  br label %42

42:                                               ; preds = %39, %16
  %43 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %44 = getelementptr inbounds %struct.Runtime, ptr %43, i32 0, i32 0
  %45 = call zeroext i1 @exception_mgr_leave(ptr noundef %44, ptr noundef %4)
  br i1 %45, label %46, label %50

46:                                               ; preds = %42
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.monotone, ptr %47, i32 0, i32 1
  call void @main_free(ptr noundef %48)
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %49) #10
  store ptr null, ptr %2, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %46, %42
  %51 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %51, ptr %1, align 8
  store i32 1, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 224, ptr %4) #10
  br label %52

52:                                               ; preds = %50, %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #10
  %53 = load ptr, ptr %1, align 8
  ret ptr %53
}

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

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

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

declare void @main_init(ptr noundef) #4

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

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

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

declare void @main_prepare(ptr noundef) #4

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

declare void @main_free(ptr noundef) #4

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

; 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 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(none) }
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 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { nounwind allocsize(0) }
attributes #12 = { nounwind returns_twice }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"monotone", !11, i64 0, !12, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!"Main", !13, i64 0, !14, i64 56, !19, i64 112, !26, i64 304, !30, i64 384, !31, i64 504, !32, i64 520, !33, i64 544, !34, i64 688, !36, i64 752, !37, i64 784, !38, i64 808, !39, i64 812, !40, i64 824, !41, i64 848, !42, i64 880, !44, i64 4360}
!13 = !{!"Rwlock", !7, i64 0}
!14 = !{!"File", !11, i64 0, !15, i64 8, !16, i64 16, !18, i64 40}
!15 = !{!"long", !7, i64 0}
!16 = !{!"Str", !6, i64 0, !6, i64 8, !17, i64 16}
!17 = !{!"_Bool", !7, i64 0}
!18 = !{!"List", !6, i64 0, !6, i64 8}
!19 = !{!"Engine", !20, i64 0, !21, i64 40, !22, i64 88, !24, i64 104, !25, i64 136, !6, i64 168, !6, i64 176, !6, i64 184}
!20 = !{!"Mutex", !7, i64 0}
!21 = !{!"CondVar", !7, i64 0}
!22 = !{!"Mapping", !23, i64 0, !11, i64 8}
!23 = !{!"Rbtree", !6, i64 0}
!24 = !{!"Pipeline", !18, i64 0, !11, i64 16, !6, i64 24}
!25 = !{!"StorageMgr", !18, i64 0, !11, i64 16, !6, i64 24}
!26 = !{!"Wal", !20, i64 0, !27, i64 40, !6, i64 72}
!27 = !{!"WalId", !28, i64 0, !11, i64 4, !29, i64 8}
!28 = !{!"Spinlock", !11, i64 0}
!29 = !{!"Buf", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"Service", !20, i64 0, !21, i64 40, !18, i64 88, !11, i64 104, !11, i64 108, !17, i64 112}
!31 = !{!"WorkerMgr", !11, i64 0, !6, i64 8}
!32 = !{!"CloudMgr", !18, i64 0, !11, i64 16}
!33 = !{!"MemoryMgr", !20, i64 0, !21, i64 40, !11, i64 88, !6, i64 96, !11, i64 104, !11, i64 108, !15, i64 112, !17, i64 120, !17, i64 121, !15, i64 128, !15, i64 136}
!34 = !{!"CompressionMgr", !35, i64 0, !35, i64 32}
!35 = !{!"Cache", !28, i64 0, !18, i64 8, !11, i64 24}
!36 = !{!"EncryptionMgr", !35, i64 0}
!37 = !{!"Random", !28, i64 0, !7, i64 8}
!38 = !{!"Comparator", !11, i64 0}
!39 = !{!"Logger", !17, i64 0, !17, i64 1, !11, i64 4}
!40 = !{!"Context", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!"Control", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!42 = !{!"Config", !43, i64 0, !43, i64 88, !43, i64 176, !43, i64 264, !43, i64 352, !43, i64 440, !43, i64 528, !43, i64 616, !43, i64 704, !43, i64 792, !43, i64 880, !43, i64 968, !43, i64 1056, !43, i64 1144, !43, i64 1232, !43, i64 1320, !43, i64 1408, !43, i64 1496, !43, i64 1584, !43, i64 1672, !43, i64 1760, !43, i64 1848, !43, i64 1936, !43, i64 2024, !43, i64 2112, !43, i64 2200, !43, i64 2288, !43, i64 2376, !43, i64 2464, !43, i64 2552, !43, i64 2640, !43, i64 2728, !43, i64 2816, !43, i64 2904, !43, i64 2992, !43, i64 3080, !43, i64 3168, !43, i64 3256, !43, i64 3344, !18, i64 3432, !18, i64 3448, !11, i64 3464, !11, i64 3468, !11, i64 3472, !11, i64 3476}
!43 = !{!"Var", !11, i64 0, !11, i64 4, !16, i64 8, !18, i64 32, !18, i64 48, !7, i64 64}
!44 = !{!"Global", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!45 = !{!46, !6, i64 0}
!46 = !{!"Runtime", !47, i64 0, !48, i64 8, !6, i64 312}
!47 = !{!"ExceptionMgr", !6, i64 0}
!48 = !{!"Error", !7, i64 0, !11, i64 256, !6, i64 264, !6, i64 272, !11, i64 280, !6, i64 288, !6, i64 296}
!49 = !{!50, !6, i64 0}
!50 = !{!"Exception", !6, i64 0, !17, i64 8, !6, i64 16, !7, i64 24}
!51 = !{!50, !17, i64 8}
!52 = !{!50, !6, i64 16}
!53 = !{!11, !11, 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"

%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: nounwind uwtable
define dso_local noundef ptr @monotone_init() local_unnamed_addr #0 {
  %1 = alloca %struct.Exception, align 8
  %2 = call noalias dereferenceable_or_null(4424) ptr @malloc(i64 noundef 4424) #9
  %3 = icmp eq ptr %2, null
  br i1 %3, label %18, label %4, !prof !5

4:                                                ; preds = %0
  store i32 1068587329, ptr %2, align 8, !tbaa !6
  %5 = getelementptr inbounds i8, ptr %2, i64 8
  call void @main_init(ptr noundef nonnull %5) #10
  call void @monotone_enter(ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %1) #10
  %6 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %7 = load ptr, ptr %6, align 8, !tbaa !45
  store ptr %7, ptr %1, align 8, !tbaa !49
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  store i8 0, ptr %8, align 8, !tbaa !51
  %9 = getelementptr inbounds i8, ptr %1, i64 16
  store ptr null, ptr %9, align 8, !tbaa !52
  store ptr %1, ptr %6, align 8, !tbaa !45
  %10 = getelementptr inbounds i8, ptr %1, i64 24
  %11 = call i32 @_setjmp(ptr noundef nonnull %10) #11
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %13, label %14

13:                                               ; preds = %4
  call void @main_prepare(ptr noundef nonnull %5) #10
  br label %14

14:                                               ; preds = %13, %4
  %15 = call zeroext i1 @exception_mgr_leave(ptr noundef nonnull %6, ptr noundef nonnull %1)
  br i1 %15, label %16, label %17

16:                                               ; preds = %14
  call void @main_free(ptr noundef nonnull %5) #10
  call void @free(ptr noundef nonnull %2) #10
  br label %17

17:                                               ; preds = %16, %14
  %.09 = phi ptr [ null, %16 ], [ %2, %14 ]
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %1) #10
  br label %18

18:                                               ; preds = %0, %17
  %.0 = phi ptr [ %.09, %17 ], [ null, %0 ]
  ret ptr %.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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

declare void @main_init(ptr noundef) local_unnamed_addr #3

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

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

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

declare void @main_prepare(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 #7

declare void @main_free(ptr noundef) local_unnamed_addr #3

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

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

!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 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!6 = !{!7, !8, i64 0}
!7 = !{!"monotone", !8, i64 0, !11, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"Main", !12, i64 0, !13, i64 56, !19, i64 112, !26, i64 304, !30, i64 384, !31, i64 504, !32, i64 520, !33, i64 544, !34, i64 688, !36, i64 752, !37, i64 784, !38, i64 808, !39, i64 812, !40, i64 824, !41, i64 848, !42, i64 880, !44, i64 4360}
!12 = !{!"Rwlock", !9, i64 0}
!13 = !{!"File", !8, i64 0, !14, i64 8, !15, i64 16, !18, i64 40}
!14 = !{!"long", !9, i64 0}
!15 = !{!"Str", !16, i64 0, !16, i64 8, !17, i64 16}
!16 = !{!"any pointer", !9, i64 0}
!17 = !{!"_Bool", !9, i64 0}
!18 = !{!"List", !16, i64 0, !16, i64 8}
!19 = !{!"Engine", !20, i64 0, !21, i64 40, !22, i64 88, !24, i64 104, !25, i64 136, !16, i64 168, !16, i64 176, !16, i64 184}
!20 = !{!"Mutex", !9, i64 0}
!21 = !{!"CondVar", !9, i64 0}
!22 = !{!"Mapping", !23, i64 0, !8, i64 8}
!23 = !{!"Rbtree", !16, i64 0}
!24 = !{!"Pipeline", !18, i64 0, !8, i64 16, !16, i64 24}
!25 = !{!"StorageMgr", !18, i64 0, !8, i64 16, !16, i64 24}
!26 = !{!"Wal", !20, i64 0, !27, i64 40, !16, i64 72}
!27 = !{!"WalId", !28, i64 0, !8, i64 4, !29, i64 8}
!28 = !{!"Spinlock", !8, i64 0}
!29 = !{!"Buf", !16, i64 0, !16, i64 8, !16, i64 16}
!30 = !{!"Service", !20, i64 0, !21, i64 40, !18, i64 88, !8, i64 104, !8, i64 108, !17, i64 112}
!31 = !{!"WorkerMgr", !8, i64 0, !16, i64 8}
!32 = !{!"CloudMgr", !18, i64 0, !8, i64 16}
!33 = !{!"MemoryMgr", !20, i64 0, !21, i64 40, !8, i64 88, !16, i64 96, !8, i64 104, !8, i64 108, !14, i64 112, !17, i64 120, !17, i64 121, !14, i64 128, !14, i64 136}
!34 = !{!"CompressionMgr", !35, i64 0, !35, i64 32}
!35 = !{!"Cache", !28, i64 0, !18, i64 8, !8, i64 24}
!36 = !{!"EncryptionMgr", !35, i64 0}
!37 = !{!"Random", !28, i64 0, !9, i64 8}
!38 = !{!"Comparator", !8, i64 0}
!39 = !{!"Logger", !17, i64 0, !17, i64 1, !8, i64 4}
!40 = !{!"Context", !16, i64 0, !16, i64 8, !16, i64 16}
!41 = !{!"Control", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24}
!42 = !{!"Config", !43, i64 0, !43, i64 88, !43, i64 176, !43, i64 264, !43, i64 352, !43, i64 440, !43, i64 528, !43, i64 616, !43, i64 704, !43, i64 792, !43, i64 880, !43, i64 968, !43, i64 1056, !43, i64 1144, !43, i64 1232, !43, i64 1320, !43, i64 1408, !43, i64 1496, !43, i64 1584, !43, i64 1672, !43, i64 1760, !43, i64 1848, !43, i64 1936, !43, i64 2024, !43, i64 2112, !43, i64 2200, !43, i64 2288, !43, i64 2376, !43, i64 2464, !43, i64 2552, !43, i64 2640, !43, i64 2728, !43, i64 2816, !43, i64 2904, !43, i64 2992, !43, i64 3080, !43, i64 3168, !43, i64 3256, !43, i64 3344, !18, i64 3432, !18, i64 3448, !8, i64 3464, !8, i64 3468, !8, i64 3472, !8, i64 3476}
!43 = !{!"Var", !8, i64 0, !8, i64 4, !15, i64 8, !18, i64 32, !18, i64 48, !9, i64 64}
!44 = !{!"Global", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 48}
!45 = !{!46, !16, i64 0}
!46 = !{!"Runtime", !47, i64 0, !48, i64 8, !16, i64 312}
!47 = !{!"ExceptionMgr", !16, i64 0}
!48 = !{!"Error", !9, i64 0, !8, i64 256, !16, i64 264, !16, i64 272, !8, i64 280, !16, i64 288, !16, i64 296}
!49 = !{!50, !16, i64 0}
!50 = !{!"Exception", !16, i64 0, !17, i64 8, !16, i64 16, !9, i64 24}
!51 = !{!50, !17, i64 8}
!52 = !{!50, !16, i64 16}


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