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

; 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.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 }

; Function Attrs: nounwind uwtable
define dso_local void @main_init(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %4 = load ptr, ptr %2, align 8, !tbaa !5
  %5 = getelementptr inbounds %struct.Main, ptr %4, i32 0, i32 14
  store ptr %5, ptr %3, align 8, !tbaa !5
  %6 = load ptr, ptr %3, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.Control, ptr %6, i32 0, i32 0
  store ptr @main_control_save_config, ptr %7, align 8, !tbaa !9
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.Control, ptr %8, i32 0, i32 1
  store ptr @main_control_lock, ptr %9, align 8, !tbaa !11
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.Control, ptr %10, i32 0, i32 2
  store ptr @main_control_unlock, ptr %11, align 8, !tbaa !12
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.Control, ptr %13, i32 0, i32 3
  store ptr %12, ptr %14, align 8, !tbaa !13
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.Main, ptr %15, i32 0, i32 15
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.Main, ptr %17, i32 0, i32 16
  %19 = getelementptr inbounds %struct.Global, ptr %18, i32 0, i32 0
  store ptr %16, ptr %19, align 8, !tbaa !14
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.Main, ptr %20, i32 0, i32 14
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.Main, ptr %22, i32 0, i32 16
  %24 = getelementptr inbounds %struct.Global, ptr %23, i32 0, i32 1
  store ptr %21, ptr %24, align 8, !tbaa !48
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.Main, ptr %25, i32 0, i32 8
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.Main, ptr %27, i32 0, i32 16
  %29 = getelementptr inbounds %struct.Global, ptr %28, i32 0, i32 2
  store ptr %26, ptr %29, align 8, !tbaa !49
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.Main, ptr %30, i32 0, i32 9
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.Main, ptr %32, i32 0, i32 16
  %34 = getelementptr inbounds %struct.Global, ptr %33, i32 0, i32 3
  store ptr %31, ptr %34, align 8, !tbaa !50
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.Main, ptr %35, i32 0, i32 10
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.Main, ptr %37, i32 0, i32 16
  %39 = getelementptr inbounds %struct.Global, ptr %38, i32 0, i32 5
  store ptr %36, ptr %39, align 8, !tbaa !51
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.Main, ptr %40, i32 0, i32 7
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.Main, ptr %42, i32 0, i32 16
  %44 = getelementptr inbounds %struct.Global, ptr %43, i32 0, i32 6
  store ptr %41, ptr %44, align 8, !tbaa !52
  %45 = call zeroext i1 @crc32_sse_supported()
  br i1 %45, label %46, label %50

46:                                               ; preds = %1
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.Main, ptr %47, i32 0, i32 16
  %49 = getelementptr inbounds %struct.Global, ptr %48, i32 0, i32 4
  store ptr @crc32_sse, ptr %49, align 8, !tbaa !53
  br label %54

50:                                               ; preds = %1
  %51 = load ptr, ptr %2, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.Main, ptr %51, i32 0, i32 16
  %53 = getelementptr inbounds %struct.Global, ptr %52, i32 0, i32 4
  store ptr @crc32, ptr %53, align 8, !tbaa !53
  br label %54

54:                                               ; preds = %50, %46
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.Main, ptr %55, i32 0, i32 13
  %57 = getelementptr inbounds %struct.Context, ptr %56, i32 0, i32 0
  store ptr @logger_write, ptr %57, align 8, !tbaa !54
  %58 = load ptr, ptr %2, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.Main, ptr %58, i32 0, i32 12
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.Main, ptr %60, i32 0, i32 13
  %62 = getelementptr inbounds %struct.Context, ptr %61, i32 0, i32 1
  store ptr %59, ptr %62, align 8, !tbaa !55
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.Main, ptr %63, i32 0, i32 16
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.Main, ptr %65, i32 0, i32 13
  %67 = getelementptr inbounds %struct.Context, ptr %66, i32 0, i32 2
  store ptr %64, ptr %67, align 8, !tbaa !56
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.Main, ptr %68, i32 0, i32 11
  call void @comparator_init(ptr noundef %69)
  %70 = load ptr, ptr %2, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.Main, ptr %70, i32 0, i32 12
  call void @logger_init(ptr noundef %71)
  %72 = load ptr, ptr %2, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.Main, ptr %72, i32 0, i32 10
  call void @random_init(ptr noundef %73)
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.Main, ptr %74, i32 0, i32 7
  call void @memory_mgr_init(ptr noundef %75)
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.Main, ptr %76, i32 0, i32 8
  call void @compression_mgr_init(ptr noundef %77)
  %78 = load ptr, ptr %2, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.Main, ptr %78, i32 0, i32 9
  call void @encryption_mgr_init(ptr noundef %79)
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.Main, ptr %80, i32 0, i32 15
  call void @config_init(ptr noundef %81)
  %82 = load ptr, ptr %2, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.Main, ptr %82, i32 0, i32 1
  call void @file_init(ptr noundef %83)
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.Main, ptr %84, i32 0, i32 0
  call void @rwlock_init(ptr noundef %85)
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.Main, ptr %86, i32 0, i32 4
  call void @service_init(ptr noundef %87)
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.Main, ptr %88, i32 0, i32 6
  call void @cloud_mgr_init(ptr noundef %89)
  %90 = load ptr, ptr %2, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.Main, ptr %90, i32 0, i32 3
  call void @wal_init(ptr noundef %91)
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.Main, ptr %92, i32 0, i32 2
  %94 = load ptr, ptr %2, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.Main, ptr %94, i32 0, i32 11
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.Main, ptr %96, i32 0, i32 3
  %98 = load ptr, ptr %2, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.Main, ptr %98, i32 0, i32 4
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.Main, ptr %100, i32 0, i32 6
  call void @engine_init(ptr noundef %93, ptr noundef %95, ptr noundef %97, ptr noundef %99, ptr noundef %101)
  %102 = load ptr, ptr %2, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.Main, ptr %102, i32 0, i32 5
  call void @worker_mgr_init(ptr noundef %103)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void
}

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

; Function Attrs: nounwind uwtable
declare hidden void @main_control_save_config(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @main_control_unlock(ptr noundef) #0

declare zeroext i1 @crc32_sse_supported() #2

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

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

declare void @logger_write(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

declare void @logger_init(ptr noundef) #2

declare void @random_init(ptr noundef) #2

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

declare void @compression_mgr_init(ptr noundef) #2

declare void @encryption_mgr_init(ptr noundef) #2

declare void @config_init(ptr noundef) #2

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

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

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

declare void @cloud_mgr_init(ptr noundef) #2

declare void @wal_init(ptr noundef) #2

declare void @engine_init(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @worker_mgr_init(ptr noundef) #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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"}
!9 = !{!10, !6, i64 0}
!10 = !{!"Control", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!11 = !{!10, !6, i64 8}
!12 = !{!10, !6, i64 16}
!13 = !{!10, !6, i64 24}
!14 = !{!15, !6, i64 4360}
!15 = !{!"Main", !16, i64 0, !17, i64 56, !23, i64 112, !30, i64 304, !34, i64 384, !35, i64 504, !36, i64 520, !37, i64 544, !38, i64 688, !40, i64 752, !41, i64 784, !42, i64 808, !43, i64 812, !44, i64 824, !10, i64 848, !45, i64 880, !47, i64 4360}
!16 = !{!"Rwlock", !7, i64 0}
!17 = !{!"File", !18, i64 0, !19, i64 8, !20, i64 16, !22, i64 40}
!18 = !{!"int", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"Str", !6, i64 0, !6, i64 8, !21, i64 16}
!21 = !{!"_Bool", !7, i64 0}
!22 = !{!"List", !6, i64 0, !6, i64 8}
!23 = !{!"Engine", !24, i64 0, !25, i64 40, !26, i64 88, !28, i64 104, !29, i64 136, !6, i64 168, !6, i64 176, !6, i64 184}
!24 = !{!"Mutex", !7, i64 0}
!25 = !{!"CondVar", !7, i64 0}
!26 = !{!"Mapping", !27, i64 0, !18, i64 8}
!27 = !{!"Rbtree", !6, i64 0}
!28 = !{!"Pipeline", !22, i64 0, !18, i64 16, !6, i64 24}
!29 = !{!"StorageMgr", !22, i64 0, !18, i64 16, !6, i64 24}
!30 = !{!"Wal", !24, i64 0, !31, i64 40, !6, i64 72}
!31 = !{!"WalId", !32, i64 0, !18, i64 4, !33, i64 8}
!32 = !{!"Spinlock", !18, i64 0}
!33 = !{!"Buf", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"Service", !24, i64 0, !25, i64 40, !22, i64 88, !18, i64 104, !18, i64 108, !21, i64 112}
!35 = !{!"WorkerMgr", !18, i64 0, !6, i64 8}
!36 = !{!"CloudMgr", !22, i64 0, !18, i64 16}
!37 = !{!"MemoryMgr", !24, i64 0, !25, i64 40, !18, i64 88, !6, i64 96, !18, i64 104, !18, i64 108, !19, i64 112, !21, i64 120, !21, i64 121, !19, i64 128, !19, i64 136}
!38 = !{!"CompressionMgr", !39, i64 0, !39, i64 32}
!39 = !{!"Cache", !32, i64 0, !22, i64 8, !18, i64 24}
!40 = !{!"EncryptionMgr", !39, i64 0}
!41 = !{!"Random", !32, i64 0, !7, i64 8}
!42 = !{!"Comparator", !18, i64 0}
!43 = !{!"Logger", !21, i64 0, !21, i64 1, !18, i64 4}
!44 = !{!"Context", !6, i64 0, !6, i64 8, !6, i64 16}
!45 = !{!"Config", !46, i64 0, !46, i64 88, !46, i64 176, !46, i64 264, !46, i64 352, !46, i64 440, !46, i64 528, !46, i64 616, !46, i64 704, !46, i64 792, !46, i64 880, !46, i64 968, !46, i64 1056, !46, i64 1144, !46, i64 1232, !46, i64 1320, !46, i64 1408, !46, i64 1496, !46, i64 1584, !46, i64 1672, !46, i64 1760, !46, i64 1848, !46, i64 1936, !46, i64 2024, !46, i64 2112, !46, i64 2200, !46, i64 2288, !46, i64 2376, !46, i64 2464, !46, i64 2552, !46, i64 2640, !46, i64 2728, !46, i64 2816, !46, i64 2904, !46, i64 2992, !46, i64 3080, !46, i64 3168, !46, i64 3256, !46, i64 3344, !22, i64 3432, !22, i64 3448, !18, i64 3464, !18, i64 3468, !18, i64 3472, !18, i64 3476}
!46 = !{!"Var", !18, i64 0, !18, i64 4, !20, i64 8, !22, i64 32, !22, i64 48, !7, i64 64}
!47 = !{!"Global", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!48 = !{!15, !6, i64 4368}
!49 = !{!15, !6, i64 4376}
!50 = !{!15, !6, i64 4384}
!51 = !{!15, !6, i64 4400}
!52 = !{!15, !6, i64 4408}
!53 = !{!15, !6, i64 4392}
!54 = !{!15, !6, i64 824}
!55 = !{!15, !6, i64 832}
!56 = !{!15, !6, i64 840}


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

; Function Attrs: nounwind uwtable
define dso_local void @main_init(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 848
  store ptr @main_control_save_config, ptr %2, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 856
  store ptr @main_control_lock, ptr %3, align 8, !tbaa !10
  %4 = getelementptr inbounds i8, ptr %0, i64 864
  store ptr @main_control_unlock, ptr %4, align 8, !tbaa !11
  %5 = getelementptr inbounds i8, ptr %0, i64 872
  store ptr %0, ptr %5, align 8, !tbaa !12
  %6 = getelementptr inbounds i8, ptr %0, i64 880
  %7 = getelementptr inbounds i8, ptr %0, i64 4360
  store ptr %6, ptr %7, align 8, !tbaa !13
  %8 = getelementptr inbounds i8, ptr %0, i64 4368
  store ptr %2, ptr %8, align 8, !tbaa !47
  %9 = getelementptr inbounds i8, ptr %0, i64 688
  %10 = getelementptr inbounds i8, ptr %0, i64 4376
  store ptr %9, ptr %10, align 8, !tbaa !48
  %11 = getelementptr inbounds i8, ptr %0, i64 752
  %12 = getelementptr inbounds i8, ptr %0, i64 4384
  store ptr %11, ptr %12, align 8, !tbaa !49
  %13 = getelementptr inbounds i8, ptr %0, i64 784
  %14 = getelementptr inbounds i8, ptr %0, i64 4400
  store ptr %13, ptr %14, align 8, !tbaa !50
  %15 = getelementptr inbounds i8, ptr %0, i64 544
  %16 = getelementptr inbounds i8, ptr %0, i64 4408
  store ptr %15, ptr %16, align 8, !tbaa !51
  %17 = tail call zeroext i1 @crc32_sse_supported() #3
  %spec.select = select i1 %17, ptr @crc32_sse, ptr @crc32
  %18 = getelementptr inbounds i8, ptr %0, i64 4392
  store ptr %spec.select, ptr %18, align 8
  %19 = getelementptr inbounds i8, ptr %0, i64 824
  store ptr @logger_write, ptr %19, align 8, !tbaa !52
  %20 = getelementptr inbounds i8, ptr %0, i64 812
  %21 = getelementptr inbounds i8, ptr %0, i64 832
  store ptr %20, ptr %21, align 8, !tbaa !53
  %22 = getelementptr inbounds i8, ptr %0, i64 840
  store ptr %7, ptr %22, align 8, !tbaa !54
  %23 = getelementptr inbounds i8, ptr %0, i64 808
  tail call void @comparator_init(ptr noundef nonnull %23)
  tail call void @logger_init(ptr noundef nonnull %20) #3
  tail call void @random_init(ptr noundef nonnull %13) #3
  tail call void @memory_mgr_init(ptr noundef nonnull %15)
  tail call void @compression_mgr_init(ptr noundef nonnull %9) #3
  tail call void @encryption_mgr_init(ptr noundef nonnull %11) #3
  tail call void @config_init(ptr noundef nonnull %6) #3
  %24 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @file_init(ptr noundef nonnull %24)
  tail call void @rwlock_init(ptr noundef nonnull %0)
  %25 = getelementptr inbounds i8, ptr %0, i64 384
  tail call void @service_init(ptr noundef nonnull %25)
  %26 = getelementptr inbounds i8, ptr %0, i64 520
  tail call void @cloud_mgr_init(ptr noundef nonnull %26) #3
  %27 = getelementptr inbounds i8, ptr %0, i64 304
  tail call void @wal_init(ptr noundef nonnull %27) #3
  %28 = getelementptr inbounds i8, ptr %0, i64 112
  tail call void @engine_init(ptr noundef nonnull %28, ptr noundef nonnull %23, ptr noundef nonnull %27, ptr noundef nonnull %25, ptr noundef nonnull %26) #3
  %29 = getelementptr inbounds i8, ptr %0, i64 504
  tail call void @worker_mgr_init(ptr noundef nonnull %29) #3
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden void @main_control_save_config(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @main_control_unlock(ptr noundef) #0

declare zeroext i1 @crc32_sse_supported() local_unnamed_addr #1

declare i32 @crc32_sse(i32 noundef, ptr noundef, i32 noundef) #1

declare i32 @crc32(i32 noundef, ptr noundef, i32 noundef) #1

declare void @logger_write(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

declare void @logger_init(ptr noundef) local_unnamed_addr #1

declare void @random_init(ptr noundef) local_unnamed_addr #1

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

declare void @compression_mgr_init(ptr noundef) local_unnamed_addr #1

declare void @encryption_mgr_init(ptr noundef) local_unnamed_addr #1

declare void @config_init(ptr noundef) local_unnamed_addr #1

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

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

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

declare void @cloud_mgr_init(ptr noundef) local_unnamed_addr #1

declare void @wal_init(ptr noundef) local_unnamed_addr #1

declare void @engine_init(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MergedLoadStoreMotionPass,SROAPass,SimplifyCFGPass,TailCallElimPass