; LLVM IR from DanEngelbrecht/longtail :: lib/hpcdcchunker (longtail_hpcdcchunker)

; 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_HPCDCChunkerParams = type { i32, i32, i32 }
%struct.Longtail_HPCDCChunkerAPI = type { %struct.Longtail_ChunkerAPI, ptr, [232 x ptr], i32 }
%struct.Longtail_ChunkerAPI = type { %struct.Longtail_API, ptr, ptr, ptr, ptr, ptr }
%struct.Longtail_API = type { ptr }

@.str = external hidden unnamed_addr constant [98 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@__func__.HPCDCChunker_CreateChunker = external hidden unnamed_addr constant [27 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

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

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

declare void @Longtail_LockSpinLock(ptr noundef) #1

declare void @Longtail_UnlockSpinLock(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @HPCDCChunker_CreateChunker(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4) #2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %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 ptr, align 8
  %17 = alloca %struct.Longtail_HPCDCChunkerParams, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  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.6, ptr %20, align 8, !tbaa !11
  %21 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %12, i32 0, i32 1
  store ptr @.str.3, 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.9, ptr %27, align 8, !tbaa !11
  %28 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %26, i32 0, i32 1
  store ptr @.str.10, ptr %28, align 8, !tbaa !13
  %29 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %26, i32 0, i32 2
  %30 = load i32, ptr %8, align 4, !tbaa !9
  %31 = zext i32 %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.11, ptr %34, align 8, !tbaa !11
  %35 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %33, i32 0, i32 1
  store ptr @.str.10, ptr %35, align 8, !tbaa !13
  %36 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %33, i32 0, i32 2
  %37 = load i32, ptr %9, align 4, !tbaa !9
  %38 = zext i32 %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.12, ptr %41, align 8, !tbaa !11
  %42 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %40, i32 0, i32 1
  store ptr @.str.10, 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 = zext 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.13, ptr %48, align 8, !tbaa !11
  %49 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %47, i32 0, i32 1
  store ptr @.str.3, ptr %49, align 8, !tbaa !13
  %50 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %47, i32 0, i32 2
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = ptrtoint ptr %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, ptr noundef @__func__.HPCDCChunker_CreateChunker, i32 noundef 361, ptr noundef %58, i32 noundef 0, ptr noundef @.str.4, ptr noundef @.str.5)
  %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, ptr noundef @__func__.HPCDCChunker_CreateChunker, i32 noundef 363, ptr noundef %62, i32 noundef 3, ptr noundef @.str.8, ptr noundef @.str.6)
  store i32 22, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %111

63:                                               ; preds = %5
  %64 = load ptr, ptr %11, 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, ptr noundef @__func__.HPCDCChunker_CreateChunker, i32 noundef 364, ptr noundef %67, i32 noundef 3, ptr noundef @.str.8, ptr noundef @.str.13)
  store i32 22, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %111

68:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %69, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #3
  %70 = load i32, ptr %8, align 4, !tbaa !9
  %71 = getelementptr inbounds %struct.Longtail_HPCDCChunkerParams, ptr %17, i32 0, i32 0
  store i32 %70, ptr %71, align 4, !tbaa !20
  %72 = load i32, ptr %9, align 4, !tbaa !9
  %73 = getelementptr inbounds %struct.Longtail_HPCDCChunkerParams, ptr %17, i32 0, i32 1
  store i32 %72, ptr %73, align 4, !tbaa !22
  %74 = load i32, ptr %10, align 4, !tbaa !9
  %75 = getelementptr inbounds %struct.Longtail_HPCDCChunkerParams, ptr %17, i32 0, i32 2
  store i32 %74, ptr %75, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  store ptr null, ptr %18, align 8, !tbaa !5
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.Longtail_HPCDCChunkerAPI, ptr %76, i32 0, i32 1
  %78 = load ptr, ptr %77, align 8, !tbaa !24
  call void @Longtail_LockSpinLock(ptr noundef %78)
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.Longtail_HPCDCChunkerAPI, ptr %79, i32 0, i32 3
  %81 = load i32, ptr %80, align 8, !tbaa !28
  %82 = icmp ugt i32 %81, 0
  br i1 %82, label %83, label %103

83:                                               ; preds = %68
  %84 = load ptr, ptr %16, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.Longtail_HPCDCChunkerAPI, ptr %84, i32 0, i32 3
  %86 = load i32, ptr %85, align 8, !tbaa !28
  %87 = add i32 %86, -1
  store i32 %87, ptr %85, align 8, !tbaa !28
  %88 = load ptr, ptr %16, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.Longtail_HPCDCChunkerAPI, ptr %88, i32 0, i32 2
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.Longtail_HPCDCChunkerAPI, ptr %90, i32 0, i32 3
  %92 = load i32, ptr %91, align 8, !tbaa !28
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds [232 x ptr], ptr %89, i64 0, i64 %93
  %95 = load ptr, ptr %94, align 8, !tbaa !5
  store ptr %95, ptr %18, align 8, !tbaa !5
  %96 = load ptr, ptr %16, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.Longtail_HPCDCChunkerAPI, ptr %96, i32 0, i32 2
  %98 = load ptr, ptr %16, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.Longtail_HPCDCChunkerAPI, ptr %98, i32 0, i32 3
  %100 = load i32, ptr %99, align 8, !tbaa !28
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds [232 x ptr], ptr %97, i64 0, i64 %101
  store ptr null, ptr %102, align 8, !tbaa !5
  br label %103

103:                                              ; preds = %83, %68
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.Longtail_HPCDCChunkerAPI, ptr %104, i32 0, i32 1
  %106 = load ptr, ptr %105, align 8, !tbaa !24
  call void @Longtail_UnlockSpinLock(ptr noundef %106)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %107 = load ptr, ptr %18, align 8, !tbaa !5
  %108 = call i32 @Longtail_HPCDCCreateChunker(ptr noundef %17, ptr noundef %107, ptr noundef %19)
  %109 = load ptr, ptr %19, align 8, !tbaa !5
  %110 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %109, ptr %110, align 8, !tbaa !5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %111

111:                                              ; preds = %103, %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
  %112 = load i32, ptr %6, align 4
  ret i32 %112
}

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

attributes #0 = { 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 = { 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, !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 = !{!21, !10, i64 0}
!21 = !{!"Longtail_HPCDCChunkerParams", !10, i64 0, !10, i64 4, !10, i64 8}
!22 = !{!21, !10, i64 4}
!23 = !{!21, !10, i64 8}
!24 = !{!25, !6, i64 48}
!25 = !{!"Longtail_HPCDCChunkerAPI", !26, i64 0, !6, i64 48, !7, i64 56, !10, i64 1912}
!26 = !{!"Longtail_ChunkerAPI", !27, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!27 = !{!"Longtail_API", !6, i64 0}
!28 = !{!25, !10, i64 1912}


; 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.Longtail_HPCDCChunkerParams = type { i32, i32, i32 }

@.str = external hidden unnamed_addr constant [98 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@__func__.HPCDCChunker_CreateChunker = external hidden unnamed_addr constant [27 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

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

; 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_LockSpinLock(ptr noundef) local_unnamed_addr #1

declare void @Longtail_UnlockSpinLock(ptr noundef) local_unnamed_addr #1

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

32:                                               ; preds = %5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str, ptr noundef nonnull @__func__.HPCDCChunker_CreateChunker, i32 noundef 363, ptr noundef nonnull %7, i32 noundef 3, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.6) #3
  br label %52

33:                                               ; preds = %5
  %.not28 = icmp eq ptr %4, null
  br i1 %.not28, label %34, label %35

34:                                               ; preds = %33
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str, ptr noundef nonnull @__func__.HPCDCChunker_CreateChunker, i32 noundef 364, ptr noundef nonnull %7, i32 noundef 3, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.13) #3
  br label %52

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #3
  store i32 %1, ptr %8, align 4, !tbaa !17
  %36 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 %2, ptr %36, align 4, !tbaa !20
  %37 = getelementptr inbounds i8, ptr %8, i64 8
  store i32 %3, ptr %37, align 4, !tbaa !21
  %38 = getelementptr inbounds i8, ptr %0, i64 48
  %39 = load ptr, ptr %38, align 8, !tbaa !22
  call void @Longtail_LockSpinLock(ptr noundef %39) #3
  %40 = getelementptr inbounds i8, ptr %0, i64 1912
  %41 = load i32, ptr %40, align 8, !tbaa !26
  %.not29 = icmp eq i32 %41, 0
  br i1 %.not29, label %48, label %42

42:                                               ; preds = %35
  %43 = add i32 %41, -1
  store i32 %43, ptr %40, align 8, !tbaa !26
  %44 = getelementptr inbounds i8, ptr %0, i64 56
  %45 = zext i32 %43 to i64
  %46 = getelementptr inbounds [232 x ptr], ptr %44, i64 0, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !27
  store ptr null, ptr %46, align 8, !tbaa !27
  br label %48

48:                                               ; preds = %42, %35
  %.0 = phi ptr [ %47, %42 ], [ null, %35 ]
  %49 = load ptr, ptr %38, align 8, !tbaa !22
  call void @Longtail_UnlockSpinLock(ptr noundef %49) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  %50 = call i32 @Longtail_HPCDCCreateChunker(ptr noundef nonnull %8, ptr noundef %.0, ptr noundef nonnull %9)
  %51 = load ptr, ptr %9, align 8, !tbaa !27
  store ptr %51, ptr %4, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #3
  br label %52

52:                                               ; preds = %48, %34, %32
  %.024 = phi i32 [ 0, %48 ], [ 22, %34 ], [ 22, %32 ]
  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 i32 %.024
}

; Function Attrs: nounwind uwtable
declare hidden i32 @Longtail_HPCDCCreateChunker(ptr noundef, ptr noundef, ptr 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 = { 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 = !{!"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, !19, i64 0}
!18 = !{!"Longtail_HPCDCChunkerParams", !19, i64 0, !19, i64 4, !19, i64 8}
!19 = !{!"int", !8, i64 0}
!20 = !{!18, !19, i64 4}
!21 = !{!18, !19, i64 8}
!22 = !{!23, !7, i64 48}
!23 = !{!"Longtail_HPCDCChunkerAPI", !24, i64 0, !7, i64 48, !8, i64 56, !19, i64 1912}
!24 = !{!"Longtail_ChunkerAPI", !25, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!25 = !{!"Longtail_API", !7, i64 0}
!26 = !{!23, !19, i64 1912}
!27 = !{!7, !7, i64 0}


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