; LLVM IR from DanEngelbrecht/longtail :: test (test)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Longtail_LogFieldFmt_Private = type { ptr, ptr, ptr }
%struct.Longtail_LogContextFmt_Private = type { ptr, ptr, i64 }
%struct.TestGetBlockRequest = type { i64, ptr }
%class.TestAsyncBlockStore = type { %struct.Longtail_BlockStoreAPI, ptr, ptr, i32, ptr, ptr, ptr, [8 x ptr], i32, ptr, i64, ptr, i64, ptr, i64, ptr, ptr, ptr }
%struct.Longtail_BlockStoreAPI = type { %struct.Longtail_API, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.Longtail_API = type { ptr }
%struct.stbds_array_header = type { i64, i64, ptr, i64 }

@.str.3 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.586 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.587 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.588 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.590 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.592 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.593 = external hidden unnamed_addr constant [4 x i8], align 1
@__func__._ZN19TestAsyncBlockStore14GetStoredBlockEP22Longtail_BlockStoreAPImP31Longtail_AsyncGetStoredBlockAPI = external hidden unnamed_addr constant [15 x i8], align 1

; 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(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

declare void @Longtail_LockSpinLock(ptr noundef) #2

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

declare void @Longtail_UnlockSpinLock(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN19TestAsyncBlockStore14GetStoredBlockEP22Longtail_BlockStoreAPImP31Longtail_AsyncGetStoredBlockAPI(ptr noundef %0, i64 noundef %1, ptr noundef %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca [3 x %struct.Longtail_LogFieldFmt_Private], align 16
  %8 = alloca %struct.Longtail_LogContextFmt_Private, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %struct.TestGetBlockRequest, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 72, ptr %7) #4
  %12 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %7, i32 0, i32 0
  store ptr @.str.590, ptr %12, align 8, !tbaa !11
  %13 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %7, i32 0, i32 1
  store ptr @.str.586, ptr %13, align 8, !tbaa !13
  %14 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %7, i32 0, i32 2
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = ptrtoint ptr %15 to i64
  %17 = inttoptr i64 %16 to ptr
  store ptr %17, ptr %14, align 8, !tbaa !14
  %18 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %7, i64 1
  %19 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %18, i32 0, i32 0
  store ptr @.str.106, ptr %19, align 8, !tbaa !11
  %20 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %18, i32 0, i32 1
  store ptr @.str.593, ptr %20, align 8, !tbaa !13
  %21 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %18, i32 0, i32 2
  %22 = load i64, ptr %5, align 8, !tbaa !9
  %23 = inttoptr i64 %22 to ptr
  store ptr %23, ptr %21, align 8, !tbaa !14
  %24 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %7, i64 2
  %25 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %24, i32 0, i32 0
  store ptr @.str.592, ptr %25, align 8, !tbaa !11
  %26 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %24, i32 0, i32 1
  store ptr @.str.586, ptr %26, align 8, !tbaa !13
  %27 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %24, i32 0, i32 2
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = ptrtoint ptr %28 to i64
  %30 = inttoptr i64 %29 to ptr
  store ptr %30, ptr %27, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  %31 = getelementptr inbounds %struct.Longtail_LogContextFmt_Private, ptr %8, i32 0, i32 0
  store ptr null, ptr %31, align 8, !tbaa !15
  %32 = getelementptr inbounds %struct.Longtail_LogContextFmt_Private, ptr %8, i32 0, i32 1
  %33 = getelementptr inbounds [3 x %struct.Longtail_LogFieldFmt_Private], ptr %7, i64 0, i64 0
  store ptr %33, ptr %32, align 8, !tbaa !17
  %34 = getelementptr inbounds %struct.Longtail_LogContextFmt_Private, ptr %8, i32 0, i32 2
  store i64 3, ptr %34, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store ptr %8, ptr %9, align 8, !tbaa !5
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.3, ptr noundef @__func__._ZN19TestAsyncBlockStore14GetStoredBlockEP22Longtail_BlockStoreAPImP31Longtail_AsyncGetStoredBlockAPI, i32 noundef 4061, ptr noundef %35, i32 noundef 0, ptr noundef @.str.587, ptr noundef @.str.588)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %36, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  %37 = load i64, ptr %5, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.TestGetBlockRequest, ptr %11, i32 0, i32 0
  store i64 %37, ptr %38, align 8, !tbaa !19
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.TestGetBlockRequest, ptr %11, i32 0, i32 1
  store ptr %39, ptr %40, align 8, !tbaa !21
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %class.TestAsyncBlockStore, ptr %41, i32 0, i32 8
  %43 = call i32 @Longtail_AtomicAdd32(ptr noundef %42, i32 noundef 1)
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = getelementptr inbounds %class.TestAsyncBlockStore, ptr %44, i32 0, i32 4
  %46 = load ptr, ptr %45, align 8, !tbaa !22
  call void @Longtail_LockSpinLock(ptr noundef %46)
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = getelementptr inbounds %class.TestAsyncBlockStore, ptr %47, i32 0, i32 13
  %49 = load ptr, ptr %48, align 8, !tbaa !27
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %66

51:                                               ; preds = %3
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = getelementptr inbounds %class.TestAsyncBlockStore, ptr %52, i32 0, i32 13
  %54 = load ptr, ptr %53, align 8, !tbaa !27
  %55 = getelementptr inbounds %struct.stbds_array_header, ptr %54, i64 -1
  %56 = getelementptr inbounds %struct.stbds_array_header, ptr %55, i32 0, i32 0
  %57 = load i64, ptr %56, align 8, !tbaa !28
  %58 = add i64 %57, 1
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = getelementptr inbounds %class.TestAsyncBlockStore, ptr %59, i32 0, i32 13
  %61 = load ptr, ptr %60, align 8, !tbaa !27
  %62 = getelementptr inbounds %struct.stbds_array_header, ptr %61, i64 -1
  %63 = getelementptr inbounds %struct.stbds_array_header, ptr %62, i32 0, i32 1
  %64 = load i64, ptr %63, align 8, !tbaa !30
  %65 = icmp ugt i64 %58, %64
  br i1 %65, label %66, label %73

66:                                               ; preds = %51, %3
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = getelementptr inbounds %class.TestAsyncBlockStore, ptr %67, i32 0, i32 13
  %69 = load ptr, ptr %68, align 8, !tbaa !27
  %70 = call noundef ptr @_ZL22stbds_arrgrowf_wrapperI19TestGetBlockRequestEPT_S2_mmm(ptr noundef %69, i64 noundef 16, i64 noundef 1, i64 noundef 0)
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = getelementptr inbounds %class.TestAsyncBlockStore, ptr %71, i32 0, i32 13
  store ptr %70, ptr %72, align 8, !tbaa !27
  br label %74

73:                                               ; preds = %51
  br label %74

74:                                               ; preds = %73, %66
  %75 = phi i32 [ 0, %66 ], [ 0, %73 ]
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %class.TestAsyncBlockStore, ptr %76, i32 0, i32 13
  %78 = load ptr, ptr %77, align 8, !tbaa !27
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = getelementptr inbounds %class.TestAsyncBlockStore, ptr %79, i32 0, i32 13
  %81 = load ptr, ptr %80, align 8, !tbaa !27
  %82 = getelementptr inbounds %struct.stbds_array_header, ptr %81, i64 -1
  %83 = getelementptr inbounds %struct.stbds_array_header, ptr %82, i32 0, i32 0
  %84 = load i64, ptr %83, align 8, !tbaa !28
  %85 = add i64 %84, 1
  store i64 %85, ptr %83, align 8, !tbaa !28
  %86 = getelementptr inbounds %struct.TestGetBlockRequest, ptr %78, i64 %84
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %86, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !31
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = getelementptr inbounds %class.TestAsyncBlockStore, ptr %87, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !22
  call void @Longtail_UnlockSpinLock(ptr noundef %89)
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = getelementptr inbounds %class.TestAsyncBlockStore, ptr %90, i32 0, i32 6
  %92 = load ptr, ptr %91, align 8, !tbaa !32
  %93 = call i32 @Longtail_PostSema(ptr noundef %92, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr %7) #4
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL22stbds_arrgrowf_wrapperI19TestGetBlockRequestEPT_S2_mmm(ptr noundef, i64 noundef, i64 noundef, i64 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree 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 = { mustprogress 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS28Longtail_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 = !{!"_ZTS30Longtail_LogContextFmt_Private", !6, i64 0, !6, i64 8, !10, i64 16}
!17 = !{!16, !6, i64 8}
!18 = !{!16, !10, i64 16}
!19 = !{!20, !10, i64 0}
!20 = !{!"_ZTS19TestGetBlockRequest", !10, i64 0, !6, i64 8}
!21 = !{!20, !6, i64 8}
!22 = !{!23, !6, i64 88}
!23 = !{!"_ZTS19TestAsyncBlockStore", !24, i64 0, !6, i64 64, !6, i64 72, !26, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !7, i64 112, !26, i64 176, !6, i64 184, !10, i64 192, !6, i64 200, !10, i64 208, !6, i64 216, !10, i64 224, !6, i64 232, !6, i64 240, !6, i64 248}
!24 = !{!"_ZTS22Longtail_BlockStoreAPI", !25, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!25 = !{!"_ZTS12Longtail_API", !6, i64 0}
!26 = !{!"int", !7, i64 0}
!27 = !{!23, !6, i64 216}
!28 = !{!29, !10, i64 0}
!29 = !{!"_ZTS18stbds_array_header", !10, i64 0, !10, i64 8, !6, i64 16, !10, i64 24}
!30 = !{!29, !10, i64 8}
!31 = !{i64 0, i64 8, !9, i64 8, i64 8, !5}
!32 = !{!23, !6, i64 104}


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

@.str.3 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.586 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.587 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.588 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.590 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.592 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.593 = external hidden unnamed_addr constant [4 x i8], align 1
@__func__._ZN19TestAsyncBlockStore14GetStoredBlockEP22Longtail_BlockStoreAPImP31Longtail_AsyncGetStoredBlockAPI = external hidden unnamed_addr constant [15 x i8], align 1

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

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

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

declare void @Longtail_LockSpinLock(ptr noundef) local_unnamed_addr #1

declare i32 @Longtail_AtomicAdd32(ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @Longtail_UnlockSpinLock(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN19TestAsyncBlockStore14GetStoredBlockEP22Longtail_BlockStoreAPImP31Longtail_AsyncGetStoredBlockAPI(ptr noundef %0, i64 noundef %1, ptr noundef %2) local_unnamed_addr #2 align 2 {
  %4 = alloca [3 x %struct.Longtail_LogFieldFmt_Private], align 16
  %5 = alloca %struct.Longtail_LogContextFmt_Private, align 8
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %4) #3
  store ptr @.str.590, ptr %4, align 16, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr @.str.586, ptr %6, align 8, !tbaa !10
  %7 = getelementptr inbounds i8, ptr %4, i64 16
  store ptr %0, ptr %7, align 16, !tbaa !11
  %8 = getelementptr inbounds i8, ptr %4, i64 24
  store ptr @.str.106, ptr %8, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %4, i64 32
  store ptr @.str.593, ptr %9, align 16, !tbaa !10
  %10 = getelementptr inbounds i8, ptr %4, i64 40
  %11 = inttoptr i64 %1 to ptr
  store ptr %11, ptr %10, align 8, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %4, i64 48
  store ptr @.str.592, ptr %12, align 16, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %4, i64 56
  store ptr @.str.586, ptr %13, align 8, !tbaa !10
  %14 = getelementptr inbounds i8, ptr %4, i64 64
  store ptr %2, ptr %14, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #3
  store ptr null, ptr %5, align 8, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr %4, ptr %15, align 8, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %5, i64 16
  store i64 3, ptr %16, align 8, !tbaa !16
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__._ZN19TestAsyncBlockStore14GetStoredBlockEP22Longtail_BlockStoreAPImP31Longtail_AsyncGetStoredBlockAPI, i32 noundef 4061, ptr noundef nonnull %5, i32 noundef 0, ptr noundef nonnull @.str.587, ptr noundef nonnull @.str.588)
  %17 = getelementptr inbounds i8, ptr %0, i64 176
  %18 = call i32 @Longtail_AtomicAdd32(ptr noundef nonnull %17, i32 noundef 1)
  %19 = getelementptr inbounds i8, ptr %0, i64 88
  %20 = load ptr, ptr %19, align 8, !tbaa !17
  call void @Longtail_LockSpinLock(ptr noundef %20)
  %21 = getelementptr inbounds i8, ptr %0, i64 216
  %22 = load ptr, ptr %21, align 8, !tbaa !22
  %.not = icmp eq ptr %22, null
  br i1 %.not, label %30, label %23

23:                                               ; preds = %3
  %24 = getelementptr inbounds i8, ptr %22, i64 -32
  %25 = load i64, ptr %24, align 8, !tbaa !23
  %26 = add i64 %25, 1
  %27 = getelementptr inbounds i8, ptr %22, i64 -24
  %28 = load i64, ptr %27, align 8, !tbaa !25
  %29 = icmp ugt i64 %26, %28
  br i1 %29, label %30, label %32

30:                                               ; preds = %23, %3
  %31 = call noundef ptr @_ZL22stbds_arrgrowf_wrapperI19TestGetBlockRequestEPT_S2_mmm(ptr noundef %22, i64 noundef 16, i64 noundef 1, i64 noundef 0)
  store ptr %31, ptr %21, align 8, !tbaa !22
  %.phi.trans.insert = getelementptr inbounds i8, ptr %31, i64 -32
  %.pre = load i64, ptr %.phi.trans.insert, align 8, !tbaa !23
  %.pre17 = add i64 %.pre, 1
  br label %32

32:                                               ; preds = %23, %30
  %.pre-phi = phi i64 [ %26, %23 ], [ %.pre17, %30 ]
  %33 = phi i64 [ %25, %23 ], [ %.pre, %30 ]
  %34 = phi ptr [ %22, %23 ], [ %31, %30 ]
  %35 = getelementptr inbounds i8, ptr %34, i64 -32
  store i64 %.pre-phi, ptr %35, align 8, !tbaa !23
  %36 = getelementptr inbounds %struct.TestGetBlockRequest, ptr %34, i64 %33
  store i64 %1, ptr %36, align 8, !tbaa !26
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %36, i64 8
  store ptr %2, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !27
  %37 = load ptr, ptr %19, align 8, !tbaa !17
  call void @Longtail_UnlockSpinLock(ptr noundef %37)
  %38 = getelementptr inbounds i8, ptr %0, i64 104
  %39 = load ptr, ptr %38, align 8, !tbaa !28
  %40 = call i32 @Longtail_PostSema(ptr noundef %39, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #3
  ret i32 0
}

declare i32 @Longtail_PostSema(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL22stbds_arrgrowf_wrapperI19TestGetBlockRequestEPT_S2_mmm(ptr noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress 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 = !{!"_ZTS28Longtail_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++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!6, !7, i64 16}
!12 = !{!13, !7, i64 0}
!13 = !{!"_ZTS30Longtail_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 88}
!18 = !{!"_ZTS19TestAsyncBlockStore", !19, i64 0, !7, i64 64, !7, i64 72, !21, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !8, i64 112, !21, i64 176, !7, i64 184, !14, i64 192, !7, i64 200, !14, i64 208, !7, i64 216, !14, i64 224, !7, i64 232, !7, i64 240, !7, i64 248}
!19 = !{!"_ZTS22Longtail_BlockStoreAPI", !20, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56}
!20 = !{!"_ZTS12Longtail_API", !7, i64 0}
!21 = !{!"int", !8, i64 0}
!22 = !{!18, !7, i64 216}
!23 = !{!24, !14, i64 0}
!24 = !{!"_ZTS18stbds_array_header", !14, i64 0, !14, i64 8, !7, i64 16, !14, i64 24}
!25 = !{!24, !14, i64 8}
!26 = !{!14, !14, i64 0}
!27 = !{!7, !7, i64 0}
!28 = !{!18, !7, i64 104}


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