; LLVM IR from DanEngelbrecht/longtail :: lib/archiveblockstore (longtail_archiveblockstore)

; 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.Longtail_LogFieldFmt_Private = type { ptr, ptr, ptr }
%struct.Longtail_LogContextFmt_Private = type { ptr, ptr, i64 }
%struct.Longtail_ArchiveIndex = type { ptr, ptr, %struct.Longtail_StoreIndex, ptr, ptr, %struct.Longtail_VersionIndex }
%struct.Longtail_StoreIndex = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.Longtail_VersionIndex = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr }

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [108 x i8], align 1
@__func__.Longtail_CreateArchiveBlockStore = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [40 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @Longtail_CreateArchiveBlockStore(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca [5 x %struct.Longtail_LogFieldFmt_Private], align 16
  %13 = alloca %struct.Longtail_LogContextFmt_Private, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 120, ptr %12) #3
  %20 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %12, i32 0, i32 0
  store ptr @.str, ptr %20, align 8, !tbaa !11
  %21 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %12, i32 0, i32 1
  store ptr @.str.1, ptr %21, align 8, !tbaa !13
  %22 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %12, i32 0, i32 2
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = ptrtoint ptr %23 to i64
  %25 = inttoptr i64 %24 to ptr
  store ptr %25, ptr %22, align 8, !tbaa !14
  %26 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %12, i64 1
  %27 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %26, i32 0, i32 0
  store ptr @.str.2, ptr %27, align 8, !tbaa !11
  %28 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %26, i32 0, i32 1
  store ptr @.str.3, ptr %28, align 8, !tbaa !13
  %29 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %26, i32 0, i32 2
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = ptrtoint ptr %30 to i64
  %32 = inttoptr i64 %31 to ptr
  store ptr %32, ptr %29, align 8, !tbaa !14
  %33 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %12, i64 2
  %34 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %33, i32 0, i32 0
  store ptr @.str.4, ptr %34, align 8, !tbaa !11
  %35 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %33, i32 0, i32 1
  store ptr @.str.1, ptr %35, align 8, !tbaa !13
  %36 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %33, i32 0, i32 2
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = ptrtoint ptr %37 to i64
  %39 = inttoptr i64 %38 to ptr
  store ptr %39, ptr %36, align 8, !tbaa !14
  %40 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %12, i64 3
  %41 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %40, i32 0, i32 0
  store ptr @.str.5, ptr %41, align 8, !tbaa !11
  %42 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %40, i32 0, i32 1
  store ptr @.str.6, ptr %42, align 8, !tbaa !13
  %43 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %40, i32 0, i32 2
  %44 = load i32, ptr %10, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = inttoptr i64 %45 to ptr
  store ptr %46, ptr %43, align 8, !tbaa !14
  %47 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %12, i64 4
  %48 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %47, i32 0, i32 0
  store ptr @.str.7, ptr %48, align 8, !tbaa !11
  %49 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %47, i32 0, i32 1
  store ptr @.str.6, ptr %49, align 8, !tbaa !13
  %50 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %47, i32 0, i32 2
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = inttoptr i64 %52 to ptr
  store ptr %53, ptr %50, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #3
  %54 = getelementptr inbounds %struct.Longtail_LogContextFmt_Private, ptr %13, i32 0, i32 0
  store ptr null, ptr %54, align 8, !tbaa !15
  %55 = getelementptr inbounds %struct.Longtail_LogContextFmt_Private, ptr %13, i32 0, i32 1
  %56 = getelementptr inbounds [5 x %struct.Longtail_LogFieldFmt_Private], ptr %12, i64 0, i64 0
  store ptr %56, ptr %55, align 8, !tbaa !18
  %57 = getelementptr inbounds %struct.Longtail_LogContextFmt_Private, ptr %13, i32 0, i32 2
  store i64 5, ptr %57, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  store ptr %13, ptr %14, align 8, !tbaa !5
  %58 = load ptr, ptr %14, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.8, ptr noundef @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 572, ptr noundef %58, i32 noundef 0, ptr noundef @.str.9, ptr noundef @.str.10)
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %63, label %61

61:                                               ; preds = %5
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.8, ptr noundef @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 574, ptr noundef %62, i32 noundef 3, ptr noundef @.str.11, ptr noundef @.str.12)
  store ptr null, ptr %6, align 8
  store i32 1, ptr %15, align 4
  br label %122

63:                                               ; preds = %5
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = icmp ne ptr %64, null
  br i1 %65, label %68, label %66

66:                                               ; preds = %63
  %67 = load ptr, ptr %14, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.8, ptr noundef @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 575, ptr noundef %67, i32 noundef 3, ptr noundef @.str.11, ptr noundef @.str.13)
  store ptr null, ptr %6, align 8
  store i32 1, ptr %15, align 4
  br label %122

68:                                               ; preds = %63
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = icmp ne ptr %69, null
  br i1 %70, label %73, label %71

71:                                               ; preds = %68
  %72 = load ptr, ptr %14, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.8, ptr noundef @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 576, ptr noundef %72, i32 noundef 3, ptr noundef @.str.11, ptr noundef @.str.4)
  store ptr null, ptr %6, align 8
  store i32 1, ptr %15, align 4
  br label %122

73:                                               ; preds = %68
  %74 = load i32, ptr %10, align 4, !tbaa !9
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %81, label %76

76:                                               ; preds = %73
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = icmp eq i32 %77, 1
  br i1 %78, label %81, label %79

79:                                               ; preds = %76
  %80 = load ptr, ptr %14, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.8, ptr noundef @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 577, ptr noundef %80, i32 noundef 3, ptr noundef @.str.11, ptr noundef @.str.14)
  store ptr null, ptr %6, align 8
  store i32 1, ptr %15, align 4
  br label %122

81:                                               ; preds = %76, %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store i64 328, ptr %16, align 8, !tbaa !20
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.Longtail_ArchiveIndex, ptr %82, i32 0, i32 2
  %84 = getelementptr inbounds %struct.Longtail_StoreIndex, ptr %83, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !21
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = call i64 @LongtailPrivate_LookupTable_GetSize(i32 noundef %86)
  %88 = load i64, ptr %16, align 8, !tbaa !20
  %89 = add i64 %88, %87
  store i64 %89, ptr %16, align 8, !tbaa !20
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.Longtail_ArchiveIndex, ptr %90, i32 0, i32 2
  %92 = getelementptr inbounds %struct.Longtail_StoreIndex, ptr %91, i32 0, i32 2
  %93 = load ptr, ptr %92, align 8, !tbaa !21
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = call i64 @LongtailPrivate_LookupTable_GetSize(i32 noundef %94)
  %96 = load i64, ptr %16, align 8, !tbaa !20
  %97 = add i64 %96, %95
  store i64 %97, ptr %16, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %98 = load i64, ptr %16, align 8, !tbaa !20
  %99 = call ptr @Longtail_Alloc(ptr noundef @.str.15, i64 noundef %98)
  store ptr %99, ptr %17, align 8, !tbaa !5
  %100 = load ptr, ptr %17, align 8, !tbaa !5
  %101 = icmp ne ptr %100, null
  br i1 %101, label %104, label %102

102:                                              ; preds = %81
  %103 = load ptr, ptr %14, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.8, ptr noundef @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 587, ptr noundef %103, i32 noundef 3, ptr noundef @.str.16, i32 noundef 12)
  store ptr null, ptr %6, align 8
  store i32 1, ptr %15, align 4
  br label %121

104:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %105 = load ptr, ptr %17, align 8, !tbaa !5
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = load i32, ptr %10, align 4, !tbaa !9
  %110 = load i32, ptr %11, align 4, !tbaa !9
  %111 = call i32 @ArchiveBlockStore_Init(ptr noundef %105, ptr noundef %106, ptr noundef %107, ptr noundef %108, i32 noundef %109, i32 noundef %110, ptr noundef %18)
  store i32 %111, ptr %19, align 4, !tbaa !9
  %112 = load i32, ptr %19, align 4, !tbaa !9
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %118

114:                                              ; preds = %104
  %115 = load ptr, ptr %14, align 8, !tbaa !5
  %116 = load i32, ptr %19, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.8, ptr noundef @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 602, ptr noundef %115, i32 noundef 3, ptr noundef @.str.17, i32 noundef %116)
  %117 = load ptr, ptr %17, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %117)
  store ptr null, ptr %6, align 8
  store i32 1, ptr %15, align 4
  br label %120

118:                                              ; preds = %104
  %119 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %119, ptr %6, align 8
  store i32 1, ptr %15, align 4
  br label %120

120:                                              ; preds = %118, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  br label %121

121:                                              ; preds = %120, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %122

122:                                              ; preds = %121, %79, %71, %66, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 120, ptr %12) #3
  %123 = load ptr, ptr %6, align 8
  ret ptr %123
}

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

declare void @Longtail_CallLogger(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #2

declare i64 @LongtailPrivate_LookupTable_GetSize(i32 noundef) #2

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

; Function Attrs: nounwind uwtable
declare hidden i32 @ArchiveBlockStore_Init(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #0

declare void @Longtail_Free(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 = { 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}
!11 = !{!12, !6, i64 0}
!12 = !{!"Longtail_LogFieldFmt_Private", !6, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!12, !6, i64 8}
!14 = !{!12, !6, i64 16}
!15 = !{!16, !6, i64 0}
!16 = !{!"Longtail_LogContextFmt_Private", !6, i64 0, !6, i64 8, !17, i64 16}
!17 = !{!"long", !7, i64 0}
!18 = !{!16, !6, i64 8}
!19 = !{!16, !17, i64 16}
!20 = !{!17, !17, i64 0}
!21 = !{!22, !6, i64 32}
!22 = !{!"Longtail_ArchiveIndex", !6, i64 0, !6, i64 8, !23, i64 16, !6, i64 96, !6, i64 104, !24, i64 112}
!23 = !{!"Longtail_StoreIndex", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!24 = !{!"Longtail_VersionIndex", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !10, i64 128, !6, i64 136, !6, i64 144}


; 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.Longtail_LogFieldFmt_Private = type { ptr, ptr, ptr }
%struct.Longtail_LogContextFmt_Private = type { ptr, ptr, i64 }

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [108 x i8], align 1
@__func__.Longtail_CreateArchiveBlockStore = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [40 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @Longtail_CreateArchiveBlockStore(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #0 {
  %6 = alloca [5 x %struct.Longtail_LogFieldFmt_Private], align 16
  %7 = alloca %struct.Longtail_LogContextFmt_Private, align 8
  %8 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %6) #3
  store ptr @.str, ptr %6, align 16, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr @.str.1, ptr %9, align 8, !tbaa !10
  %10 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr %0, ptr %10, align 16, !tbaa !11
  %11 = getelementptr inbounds i8, ptr %6, i64 24
  store ptr @.str.2, ptr %11, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %6, i64 32
  store ptr @.str.3, ptr %12, align 16, !tbaa !10
  %13 = getelementptr inbounds i8, ptr %6, i64 40
  store ptr %1, ptr %13, align 8, !tbaa !11
  %14 = getelementptr inbounds i8, ptr %6, i64 48
  store ptr @.str.4, ptr %14, align 16, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %6, i64 56
  store ptr @.str.1, ptr %15, align 8, !tbaa !10
  %16 = getelementptr inbounds i8, ptr %6, i64 64
  store ptr %2, ptr %16, align 16, !tbaa !11
  %17 = getelementptr inbounds i8, ptr %6, i64 72
  store ptr @.str.5, ptr %17, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %6, i64 80
  store ptr @.str.6, ptr %18, align 16, !tbaa !10
  %19 = getelementptr inbounds i8, ptr %6, i64 88
  %20 = sext i32 %3 to i64
  %21 = inttoptr i64 %20 to ptr
  store ptr %21, ptr %19, align 8, !tbaa !11
  %22 = getelementptr inbounds i8, ptr %6, i64 96
  store ptr @.str.7, ptr %22, align 16, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %6, i64 104
  store ptr @.str.6, ptr %23, align 8, !tbaa !10
  %24 = getelementptr inbounds i8, ptr %6, i64 112
  %25 = sext i32 %4 to i64
  %26 = inttoptr i64 %25 to ptr
  store ptr %26, ptr %24, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #3
  store ptr null, ptr %7, align 8, !tbaa !12
  %27 = getelementptr inbounds i8, ptr %7, i64 8
  store ptr %6, ptr %27, align 8, !tbaa !15
  %28 = getelementptr inbounds i8, ptr %7, i64 16
  store i64 5, ptr %28, align 8, !tbaa !16
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.8, ptr noundef nonnull @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 572, ptr noundef nonnull %7, i32 noundef 0, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10) #3
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %29, label %30

29:                                               ; preds = %5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.8, ptr noundef nonnull @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 574, ptr noundef nonnull %7, i32 noundef 3, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.12) #3
  br label %54

30:                                               ; preds = %5
  %.not38 = icmp eq ptr %1, null
  br i1 %.not38, label %31, label %32

31:                                               ; preds = %30
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.8, ptr noundef nonnull @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 575, ptr noundef nonnull %7, i32 noundef 3, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.13) #3
  br label %54

32:                                               ; preds = %30
  %.not39 = icmp eq ptr %2, null
  br i1 %.not39, label %33, label %34

33:                                               ; preds = %32
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.8, ptr noundef nonnull @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 576, ptr noundef nonnull %7, i32 noundef 3, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.4) #3
  br label %54

34:                                               ; preds = %32
  %or.cond = icmp ult i32 %3, 2
  br i1 %or.cond, label %36, label %35

35:                                               ; preds = %34
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.8, ptr noundef nonnull @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 577, ptr noundef nonnull %7, i32 noundef 3, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.14) #3
  br label %54

36:                                               ; preds = %34
  %37 = getelementptr inbounds i8, ptr %2, i64 32
  %38 = load ptr, ptr %37, align 8, !tbaa !17
  %39 = load i32, ptr %38, align 4, !tbaa !22
  %40 = call i64 @LongtailPrivate_LookupTable_GetSize(i32 noundef %39) #3
  %41 = add i64 %40, 328
  %42 = load ptr, ptr %37, align 8, !tbaa !17
  %43 = load i32, ptr %42, align 4, !tbaa !22
  %44 = call i64 @LongtailPrivate_LookupTable_GetSize(i32 noundef %43) #3
  %45 = add i64 %41, %44
  %46 = call ptr @Longtail_Alloc(ptr noundef nonnull @.str.15, i64 noundef %45) #3
  %.not40 = icmp eq ptr %46, null
  br i1 %.not40, label %47, label %48

47:                                               ; preds = %36
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.8, ptr noundef nonnull @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 587, ptr noundef nonnull %7, i32 noundef 3, ptr noundef nonnull @.str.16, i32 noundef 12) #3
  br label %54

48:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  %49 = call i32 @ArchiveBlockStore_Init(ptr noundef nonnull %46, ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef %3, i32 noundef %4, ptr noundef nonnull %8)
  %.not41 = icmp eq i32 %49, 0
  br i1 %.not41, label %51, label %50

50:                                               ; preds = %48
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.8, ptr noundef nonnull @__func__.Longtail_CreateArchiveBlockStore, i32 noundef 602, ptr noundef nonnull %7, i32 noundef 3, ptr noundef nonnull @.str.17, i32 noundef %49) #3
  call void @Longtail_Free(ptr noundef nonnull %46) #3
  br label %53

51:                                               ; preds = %48
  %52 = load ptr, ptr %8, align 8, !tbaa !23
  br label %53

53:                                               ; preds = %51, %50
  %.0 = phi ptr [ null, %50 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  br label %54

54:                                               ; preds = %47, %53, %35, %33, %31, %29
  %.2 = phi ptr [ null, %35 ], [ null, %33 ], [ null, %31 ], [ null, %29 ], [ %.0, %53 ], [ null, %47 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %6) #3
  ret ptr %.2
}

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

declare void @Longtail_CallLogger(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #2

declare i64 @LongtailPrivate_LookupTable_GetSize(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare hidden i32 @ArchiveBlockStore_Init(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare void @Longtail_Free(ptr noundef) local_unnamed_addr #2

; 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 = { "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 = !{!"Longtail_LogFieldFmt_Private", !7, i64 0, !7, i64 8, !7, i64 16}
!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 = !{!13, !7, i64 0}
!13 = !{!"Longtail_LogContextFmt_Private", !7, i64 0, !7, i64 8, !14, i64 16}
!14 = !{!"long", !8, i64 0}
!15 = !{!13, !7, i64 8}
!16 = !{!13, !14, i64 16}
!17 = !{!18, !7, i64 32}
!18 = !{!"Longtail_ArchiveIndex", !7, i64 0, !7, i64 8, !19, i64 16, !7, i64 96, !7, i64 104, !20, i64 112}
!19 = !{!"Longtail_StoreIndex", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72}
!20 = !{!"Longtail_VersionIndex", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !21, i64 128, !7, i64 136, !7, i64 144}
!21 = !{!"int", !8, i64 0}
!22 = !{!21, !21, i64 0}
!23 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass