; LLVM IR from DanEngelbrecht/longtail :: cmd (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.Longtail_LogFieldFmt_Private = type { ptr, ptr, ptr }
%struct.Longtail_LogContextFmt_Private = type { ptr, ptr, i64 }
%struct.Longtail_BlockStoreAPI = type { %struct.Longtail_API, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.Longtail_API = type { ptr }
%struct.Longtail_StorageAPI = type { %struct.Longtail_API, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.Longtail_CompressionRegistryAPI = type { %struct.Longtail_API, ptr }
%struct.Longtail_HashRegistryAPI = type { %struct.Longtail_API, ptr }
%struct.Longtail_JobAPI = type { %struct.Longtail_API, 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 }
%struct.Longtail_ChunkerAPI = type { %struct.Longtail_API, ptr, ptr, ptr, ptr, ptr }
%struct.Longtail_FileInfos = type { i32, i32, ptr, ptr, ptr, ptr }
%struct.Longtail_ProgressAPI = type { %struct.Longtail_API, ptr }
%struct.Longtail_VersionDiff = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.Longtail_ConcurrentChunkWriteAPI = type { %struct.Longtail_API, ptr, ptr, ptr, ptr, ptr }

@.str.52 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [19 x i8], align 1
@__func__.DownSync = external hidden unnamed_addr constant [9 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [55 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: nounwind uwtable
declare dso_local void @InitMonitor(ptr noundef, ptr noundef, ptr noundef) #1

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

declare void @Longtail_Free(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @MakeProgressAPI(ptr noundef, i32 noundef) #1

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

; Function Attrs: nounwind uwtable
declare hidden ptr @NormalizePath(ptr noundef) #1

declare ptr @Longtail_CreateFullHashRegistry(...) #2

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

declare i32 @Longtail_GetCPUCount(...) #2

declare ptr @Longtail_CreateFullCompressionRegistry(...) #2

declare ptr @Longtail_CreateFSStorageAPI(...) #2

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

declare ptr @Longtail_CreateCompressBlockStoreAPI(ptr noundef, ptr noundef) #2

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

declare void @Longtail_DisposeAPI(ptr noundef) #2

declare ptr @Longtail_CreateHPCDCChunkerAPI(...) #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @DownSync(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8) #1 {
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca [9 x %struct.Longtail_LogFieldFmt_Private], align 16
  %21 = alloca %struct.Longtail_LogContextFmt_Private, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca i32, align 4
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca i32, align 4
  %43 = alloca ptr, align 8
  %44 = alloca ptr, align 8
  %45 = alloca i32, align 4
  %46 = alloca ptr, align 8
  %47 = alloca ptr, align 8
  %48 = alloca ptr, align 8
  %49 = alloca ptr, align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store ptr %4, ptr %15, align 8, !tbaa !5
  store i32 %5, ptr %16, align 4, !tbaa !9
  store i32 %6, ptr %17, align 4, !tbaa !9
  store i32 %7, ptr %18, align 4, !tbaa !9
  store i32 %8, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 216, ptr %20) #3
  %50 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %20, i32 0, i32 0
  store ptr @.str.52, ptr %50, align 8, !tbaa !11
  %51 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %20, i32 0, i32 1
  store ptr @.str.53, ptr %51, align 8, !tbaa !13
  %52 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %20, i32 0, i32 2
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = ptrtoint ptr %53 to i64
  %55 = inttoptr i64 %54 to ptr
  store ptr %55, ptr %52, align 8, !tbaa !14
  %56 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %20, i64 1
  %57 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %56, i32 0, i32 0
  store ptr @.str.81, ptr %57, align 8, !tbaa !11
  %58 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %56, i32 0, i32 1
  store ptr @.str.53, ptr %58, align 8, !tbaa !13
  %59 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %56, i32 0, i32 2
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = ptrtoint ptr %60 to i64
  %62 = inttoptr i64 %61 to ptr
  store ptr %62, ptr %59, align 8, !tbaa !14
  %63 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %20, i64 2
  %64 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %63, i32 0, i32 0
  store ptr @.str.54, ptr %64, align 8, !tbaa !11
  %65 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %63, i32 0, i32 1
  store ptr @.str.53, ptr %65, align 8, !tbaa !13
  %66 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %63, i32 0, i32 2
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  %68 = ptrtoint ptr %67 to i64
  %69 = inttoptr i64 %68 to ptr
  store ptr %69, ptr %66, align 8, !tbaa !14
  %70 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %20, i64 3
  %71 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %70, i32 0, i32 0
  store ptr @.str.82, ptr %71, align 8, !tbaa !11
  %72 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %70, i32 0, i32 1
  store ptr @.str.53, ptr %72, align 8, !tbaa !13
  %73 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %70, i32 0, i32 2
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = ptrtoint ptr %74 to i64
  %76 = inttoptr i64 %75 to ptr
  store ptr %76, ptr %73, align 8, !tbaa !14
  %77 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %20, i64 4
  %78 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %77, i32 0, i32 0
  store ptr @.str.83, ptr %78, align 8, !tbaa !11
  %79 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %77, i32 0, i32 1
  store ptr @.str.56, ptr %79, align 8, !tbaa !13
  %80 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %77, i32 0, i32 2
  %81 = load ptr, ptr %15, align 8, !tbaa !5
  %82 = ptrtoint ptr %81 to i64
  %83 = inttoptr i64 %82 to ptr
  store ptr %83, ptr %80, align 8, !tbaa !14
  %84 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %20, i64 5
  %85 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %84, i32 0, i32 0
  store ptr @.str.84, ptr %85, align 8, !tbaa !11
  %86 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %84, i32 0, i32 1
  store ptr @.str.66, ptr %86, align 8, !tbaa !13
  %87 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %84, i32 0, i32 2
  %88 = load i32, ptr %16, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = inttoptr i64 %89 to ptr
  store ptr %90, ptr %87, align 8, !tbaa !14
  %91 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %20, i64 6
  %92 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %91, i32 0, i32 0
  store ptr @.str.65, ptr %92, align 8, !tbaa !11
  %93 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %91, i32 0, i32 1
  store ptr @.str.66, ptr %93, align 8, !tbaa !13
  %94 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %91, i32 0, i32 2
  %95 = load i32, ptr %17, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = inttoptr i64 %96 to ptr
  store ptr %97, ptr %94, align 8, !tbaa !14
  %98 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %20, i64 7
  %99 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %98, i32 0, i32 0
  store ptr @.str.67, ptr %99, align 8, !tbaa !11
  %100 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %98, i32 0, i32 1
  store ptr @.str.66, ptr %100, align 8, !tbaa !13
  %101 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %98, i32 0, i32 2
  %102 = load i32, ptr %18, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = inttoptr i64 %103 to ptr
  store ptr %104, ptr %101, align 8, !tbaa !14
  %105 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %20, i64 8
  %106 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %105, i32 0, i32 0
  store ptr @.str.68, ptr %106, align 8, !tbaa !11
  %107 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %105, i32 0, i32 1
  store ptr @.str.66, ptr %107, align 8, !tbaa !13
  %108 = getelementptr inbounds %struct.Longtail_LogFieldFmt_Private, ptr %105, i32 0, i32 2
  %109 = load i32, ptr %19, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = inttoptr i64 %110 to ptr
  store ptr %111, ptr %108, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #3
  %112 = getelementptr inbounds %struct.Longtail_LogContextFmt_Private, ptr %21, i32 0, i32 0
  store ptr null, ptr %112, align 8, !tbaa !15
  %113 = getelementptr inbounds %struct.Longtail_LogContextFmt_Private, ptr %21, i32 0, i32 1
  %114 = getelementptr inbounds [9 x %struct.Longtail_LogFieldFmt_Private], ptr %20, i64 0, i64 0
  store ptr %114, ptr %113, align 8, !tbaa !18
  %115 = getelementptr inbounds %struct.Longtail_LogContextFmt_Private, ptr %21, i32 0, i32 2
  store i64 9, ptr %115, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  store ptr %21, ptr %22, align 8, !tbaa !5
  %116 = load ptr, ptr %22, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.69, ptr noundef @__func__.DownSync, i32 noundef 1257, ptr noundef %116, i32 noundef 0, ptr noundef @.str.70, ptr noundef @.str.71)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = call ptr @NormalizePath(ptr noundef %117)
  store ptr %118, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %119 = call i32 (...) @Longtail_GetCPUCount()
  %120 = call ptr @Longtail_CreateBikeshedJobAPI(i32 noundef %119, i32 noundef 0)
  store ptr %120, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  %121 = call ptr (...) @Longtail_CreateFullHashRegistry()
  store ptr %121, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  %122 = call ptr (...) @Longtail_CreateFullCompressionRegistry()
  store ptr %122, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  %123 = call ptr (...) @Longtail_CreateFSStorageAPI()
  store ptr %123, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  %124 = load ptr, ptr %24, align 8, !tbaa !5
  %125 = load ptr, ptr %27, align 8, !tbaa !5
  %126 = load ptr, ptr %23, align 8, !tbaa !5
  %127 = load i32, ptr %18, align 4, !tbaa !9
  %128 = call ptr @Longtail_CreateFSBlockStoreAPI(ptr noundef %124, ptr noundef %125, ptr noundef %126, ptr noundef null, i32 noundef %127)
  store ptr %128, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  store ptr null, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  store ptr null, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  store ptr null, ptr %31, align 8, !tbaa !5
  %129 = load ptr, ptr %12, align 8, !tbaa !5
  %130 = icmp ne ptr %129, null
  br i1 %130, label %131, label %144

131:                                              ; preds = %9
  %132 = load ptr, ptr %24, align 8, !tbaa !5
  %133 = load ptr, ptr %27, align 8, !tbaa !5
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  %135 = load i32, ptr %18, align 4, !tbaa !9
  %136 = call ptr @Longtail_CreateFSBlockStoreAPI(ptr noundef %132, ptr noundef %133, ptr noundef %134, ptr noundef null, i32 noundef %135)
  store ptr %136, ptr %29, align 8, !tbaa !5
  %137 = load ptr, ptr %24, align 8, !tbaa !5
  %138 = load ptr, ptr %29, align 8, !tbaa !5
  %139 = load ptr, ptr %28, align 8, !tbaa !5
  %140 = call ptr @Longtail_CreateCacheBlockStoreAPI(ptr noundef %137, ptr noundef %138, ptr noundef %139)
  store ptr %140, ptr %30, align 8, !tbaa !5
  %141 = load ptr, ptr %30, align 8, !tbaa !5
  %142 = load ptr, ptr %26, align 8, !tbaa !5
  %143 = call ptr @Longtail_CreateCompressBlockStoreAPI(ptr noundef %141, ptr noundef %142)
  store ptr %143, ptr %31, align 8, !tbaa !5
  br label %148

144:                                              ; preds = %9
  %145 = load ptr, ptr %28, align 8, !tbaa !5
  %146 = load ptr, ptr %26, align 8, !tbaa !5
  %147 = call ptr @Longtail_CreateCompressBlockStoreAPI(ptr noundef %145, ptr noundef %146)
  store ptr %147, ptr %31, align 8, !tbaa !5
  br label %148

148:                                              ; preds = %144, %131
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #3
  store ptr null, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #3
  %149 = load ptr, ptr %27, align 8, !tbaa !5
  %150 = load ptr, ptr %13, align 8, !tbaa !5
  %151 = call i32 @Longtail_ReadVersionIndex(ptr noundef %149, ptr noundef %150, ptr noundef %32)
  store i32 %151, ptr %33, align 4, !tbaa !9
  %152 = load i32, ptr %33, align 4, !tbaa !9
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %208

154:                                              ; preds = %148
  %155 = load ptr, ptr %22, align 8, !tbaa !5
  %156 = load ptr, ptr %13, align 8, !tbaa !5
  %157 = load i32, ptr %33, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.69, ptr noundef @__func__.DownSync, i32 noundef 1283, ptr noundef %155, i32 noundef 3, ptr noundef @.str.72, ptr noundef %156, i32 noundef %157)
  %158 = load ptr, ptr %31, align 8, !tbaa !5
  %159 = icmp ne ptr %158, null
  br i1 %159, label %160, label %163

160:                                              ; preds = %154
  %161 = load ptr, ptr %31, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %161, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %162)
  br label %163

163:                                              ; preds = %160, %154
  %164 = load ptr, ptr %30, align 8, !tbaa !5
  %165 = icmp ne ptr %164, null
  br i1 %165, label %166, label %169

166:                                              ; preds = %163
  %167 = load ptr, ptr %30, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %167, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %168)
  br label %169

169:                                              ; preds = %166, %163
  %170 = load ptr, ptr %29, align 8, !tbaa !5
  %171 = icmp ne ptr %170, null
  br i1 %171, label %172, label %175

172:                                              ; preds = %169
  %173 = load ptr, ptr %29, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %173, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %174)
  br label %175

175:                                              ; preds = %172, %169
  %176 = load ptr, ptr %28, align 8, !tbaa !5
  %177 = icmp ne ptr %176, null
  br i1 %177, label %178, label %181

178:                                              ; preds = %175
  %179 = load ptr, ptr %28, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %179, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %180)
  br label %181

181:                                              ; preds = %178, %175
  %182 = load ptr, ptr %27, align 8, !tbaa !5
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %187

184:                                              ; preds = %181
  %185 = load ptr, ptr %27, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.Longtail_StorageAPI, ptr %185, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %186)
  br label %187

187:                                              ; preds = %184, %181
  %188 = load ptr, ptr %26, align 8, !tbaa !5
  %189 = icmp ne ptr %188, null
  br i1 %189, label %190, label %193

190:                                              ; preds = %187
  %191 = load ptr, ptr %26, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.Longtail_CompressionRegistryAPI, ptr %191, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %192)
  br label %193

193:                                              ; preds = %190, %187
  %194 = load ptr, ptr %25, align 8, !tbaa !5
  %195 = icmp ne ptr %194, null
  br i1 %195, label %196, label %199

196:                                              ; preds = %193
  %197 = load ptr, ptr %25, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.Longtail_HashRegistryAPI, ptr %197, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %198)
  br label %199

199:                                              ; preds = %196, %193
  %200 = load ptr, ptr %24, align 8, !tbaa !5
  %201 = icmp ne ptr %200, null
  br i1 %201, label %202, label %205

202:                                              ; preds = %199
  %203 = load ptr, ptr %24, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.Longtail_JobAPI, ptr %203, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %204)
  br label %205

205:                                              ; preds = %202, %199
  %206 = load ptr, ptr %23, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %206)
  %207 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %207, ptr %10, align 4
  store i32 1, ptr %34, align 4
  br label %970

208:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #3
  %209 = load ptr, ptr %32, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.Longtail_VersionIndex, ptr %209, i32 0, i32 1
  %211 = load ptr, ptr %210, align 8, !tbaa !20
  %212 = load i32, ptr %211, align 4, !tbaa !9
  store i32 %212, ptr %35, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #3
  %213 = load ptr, ptr %25, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.Longtail_HashRegistryAPI, ptr %213, i32 0, i32 1
  %215 = load ptr, ptr %214, align 8, !tbaa !22
  %216 = load ptr, ptr %25, align 8, !tbaa !5
  %217 = load i32, ptr %35, align 4, !tbaa !9
  %218 = call i32 %215(ptr noundef %216, i32 noundef %217, ptr noundef %36)
  store i32 %218, ptr %33, align 4, !tbaa !9
  %219 = load i32, ptr %33, align 4, !tbaa !9
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %221, label %273

221:                                              ; preds = %208
  %222 = load ptr, ptr %32, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %222)
  %223 = load ptr, ptr %31, align 8, !tbaa !5
  %224 = icmp ne ptr %223, null
  br i1 %224, label %225, label %228

225:                                              ; preds = %221
  %226 = load ptr, ptr %31, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %226, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %227)
  br label %228

228:                                              ; preds = %225, %221
  %229 = load ptr, ptr %30, align 8, !tbaa !5
  %230 = icmp ne ptr %229, null
  br i1 %230, label %231, label %234

231:                                              ; preds = %228
  %232 = load ptr, ptr %30, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %232, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %233)
  br label %234

234:                                              ; preds = %231, %228
  %235 = load ptr, ptr %29, align 8, !tbaa !5
  %236 = icmp ne ptr %235, null
  br i1 %236, label %237, label %240

237:                                              ; preds = %234
  %238 = load ptr, ptr %29, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %238, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %239)
  br label %240

240:                                              ; preds = %237, %234
  %241 = load ptr, ptr %28, align 8, !tbaa !5
  %242 = icmp ne ptr %241, null
  br i1 %242, label %243, label %246

243:                                              ; preds = %240
  %244 = load ptr, ptr %28, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %244, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %245)
  br label %246

246:                                              ; preds = %243, %240
  %247 = load ptr, ptr %27, align 8, !tbaa !5
  %248 = icmp ne ptr %247, null
  br i1 %248, label %249, label %252

249:                                              ; preds = %246
  %250 = load ptr, ptr %27, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.Longtail_StorageAPI, ptr %250, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %251)
  br label %252

252:                                              ; preds = %249, %246
  %253 = load ptr, ptr %26, align 8, !tbaa !5
  %254 = icmp ne ptr %253, null
  br i1 %254, label %255, label %258

255:                                              ; preds = %252
  %256 = load ptr, ptr %26, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.Longtail_CompressionRegistryAPI, ptr %256, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %257)
  br label %258

258:                                              ; preds = %255, %252
  %259 = load ptr, ptr %25, align 8, !tbaa !5
  %260 = icmp ne ptr %259, null
  br i1 %260, label %261, label %264

261:                                              ; preds = %258
  %262 = load ptr, ptr %25, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.Longtail_HashRegistryAPI, ptr %262, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %263)
  br label %264

264:                                              ; preds = %261, %258
  %265 = load ptr, ptr %24, align 8, !tbaa !5
  %266 = icmp ne ptr %265, null
  br i1 %266, label %267, label %270

267:                                              ; preds = %264
  %268 = load ptr, ptr %24, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.Longtail_JobAPI, ptr %268, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %269)
  br label %270

270:                                              ; preds = %267, %264
  %271 = load ptr, ptr %23, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %271)
  %272 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %272, ptr %10, align 4
  store i32 1, ptr %34, align 4
  br label %969

273:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #3
  %274 = call ptr (...) @Longtail_CreateHPCDCChunkerAPI()
  store ptr %274, ptr %37, align 8, !tbaa !5
  %275 = load ptr, ptr %37, align 8, !tbaa !5
  %276 = icmp ne ptr %275, null
  br i1 %276, label %328, label %277

277:                                              ; preds = %273
  %278 = load ptr, ptr %32, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %278)
  %279 = load ptr, ptr %31, align 8, !tbaa !5
  %280 = icmp ne ptr %279, null
  br i1 %280, label %281, label %284

281:                                              ; preds = %277
  %282 = load ptr, ptr %31, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %282, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %283)
  br label %284

284:                                              ; preds = %281, %277
  %285 = load ptr, ptr %30, align 8, !tbaa !5
  %286 = icmp ne ptr %285, null
  br i1 %286, label %287, label %290

287:                                              ; preds = %284
  %288 = load ptr, ptr %30, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %288, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %289)
  br label %290

290:                                              ; preds = %287, %284
  %291 = load ptr, ptr %29, align 8, !tbaa !5
  %292 = icmp ne ptr %291, null
  br i1 %292, label %293, label %296

293:                                              ; preds = %290
  %294 = load ptr, ptr %29, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %294, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %295)
  br label %296

296:                                              ; preds = %293, %290
  %297 = load ptr, ptr %28, align 8, !tbaa !5
  %298 = icmp ne ptr %297, null
  br i1 %298, label %299, label %302

299:                                              ; preds = %296
  %300 = load ptr, ptr %28, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %300, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %301)
  br label %302

302:                                              ; preds = %299, %296
  %303 = load ptr, ptr %27, align 8, !tbaa !5
  %304 = icmp ne ptr %303, null
  br i1 %304, label %305, label %308

305:                                              ; preds = %302
  %306 = load ptr, ptr %27, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.Longtail_StorageAPI, ptr %306, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %307)
  br label %308

308:                                              ; preds = %305, %302
  %309 = load ptr, ptr %26, align 8, !tbaa !5
  %310 = icmp ne ptr %309, null
  br i1 %310, label %311, label %314

311:                                              ; preds = %308
  %312 = load ptr, ptr %26, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.Longtail_CompressionRegistryAPI, ptr %312, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %313)
  br label %314

314:                                              ; preds = %311, %308
  %315 = load ptr, ptr %25, align 8, !tbaa !5
  %316 = icmp ne ptr %315, null
  br i1 %316, label %317, label %320

317:                                              ; preds = %314
  %318 = load ptr, ptr %25, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.Longtail_HashRegistryAPI, ptr %318, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %319)
  br label %320

320:                                              ; preds = %317, %314
  %321 = load ptr, ptr %24, align 8, !tbaa !5
  %322 = icmp ne ptr %321, null
  br i1 %322, label %323, label %326

323:                                              ; preds = %320
  %324 = load ptr, ptr %24, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.Longtail_JobAPI, ptr %324, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %325)
  br label %326

326:                                              ; preds = %323, %320
  %327 = load ptr, ptr %23, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %327)
  store i32 12, ptr %10, align 4
  store i32 1, ptr %34, align 4
  br label %968

328:                                              ; preds = %273
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #3
  store ptr null, ptr %38, align 8, !tbaa !5
  %329 = load ptr, ptr %15, align 8, !tbaa !5
  %330 = icmp ne ptr %329, null
  br i1 %330, label %331, label %342

331:                                              ; preds = %328
  %332 = load ptr, ptr %27, align 8, !tbaa !5
  %333 = load ptr, ptr %15, align 8, !tbaa !5
  %334 = call i32 @Longtail_ReadVersionIndex(ptr noundef %332, ptr noundef %333, ptr noundef %38)
  store i32 %334, ptr %33, align 4, !tbaa !9
  %335 = load i32, ptr %33, align 4, !tbaa !9
  %336 = icmp ne i32 %335, 0
  br i1 %336, label %337, label %341

337:                                              ; preds = %331
  %338 = load ptr, ptr %22, align 8, !tbaa !5
  %339 = load ptr, ptr %15, align 8, !tbaa !5
  %340 = load i32, ptr %33, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.69, ptr noundef @__func__.DownSync, i32 noundef 1336, ptr noundef %338, i32 noundef 2, ptr noundef @.str.72, ptr noundef %339, i32 noundef %340)
  br label %341

341:                                              ; preds = %337, %331
  br label %342

342:                                              ; preds = %341, %328
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #3
  %343 = load ptr, ptr %32, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.Longtail_VersionIndex, ptr %343, i32 0, i32 2
  %345 = load ptr, ptr %344, align 8, !tbaa !25
  %346 = load i32, ptr %345, align 4, !tbaa !9
  store i32 %346, ptr %39, align 4, !tbaa !9
  %347 = load ptr, ptr %38, align 8, !tbaa !5
  %348 = icmp eq ptr %347, null
  br i1 %348, label %349, label %533

349:                                              ; preds = %342
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #3
  %350 = load ptr, ptr %27, align 8, !tbaa !5
  %351 = load ptr, ptr %24, align 8, !tbaa !5
  %352 = load ptr, ptr %14, align 8, !tbaa !5
  %353 = call i32 @Longtail_GetFilesRecursively2(ptr noundef %350, ptr noundef %351, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef %352, ptr noundef %40)
  store i32 %353, ptr %33, align 4, !tbaa !9
  %354 = load i32, ptr %33, align 4, !tbaa !9
  %355 = icmp ne i32 %354, 0
  br i1 %355, label %356, label %417

356:                                              ; preds = %349
  %357 = load ptr, ptr %22, align 8, !tbaa !5
  %358 = load ptr, ptr %14, align 8, !tbaa !5
  %359 = load i32, ptr %33, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.69, ptr noundef @__func__.DownSync, i32 noundef 1355, ptr noundef %357, i32 noundef 3, ptr noundef @.str.85, ptr noundef %358, i32 noundef %359)
  %360 = load ptr, ptr %32, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %360)
  %361 = load ptr, ptr %37, align 8, !tbaa !5
  %362 = icmp ne ptr %361, null
  br i1 %362, label %363, label %366

363:                                              ; preds = %356
  %364 = load ptr, ptr %37, align 8, !tbaa !5
  %365 = getelementptr inbounds %struct.Longtail_ChunkerAPI, ptr %364, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %365)
  br label %366

366:                                              ; preds = %363, %356
  %367 = load ptr, ptr %31, align 8, !tbaa !5
  %368 = icmp ne ptr %367, null
  br i1 %368, label %369, label %372

369:                                              ; preds = %366
  %370 = load ptr, ptr %31, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %370, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %371)
  br label %372

372:                                              ; preds = %369, %366
  %373 = load ptr, ptr %30, align 8, !tbaa !5
  %374 = icmp ne ptr %373, null
  br i1 %374, label %375, label %378

375:                                              ; preds = %372
  %376 = load ptr, ptr %30, align 8, !tbaa !5
  %377 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %376, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %377)
  br label %378

378:                                              ; preds = %375, %372
  %379 = load ptr, ptr %29, align 8, !tbaa !5
  %380 = icmp ne ptr %379, null
  br i1 %380, label %381, label %384

381:                                              ; preds = %378
  %382 = load ptr, ptr %29, align 8, !tbaa !5
  %383 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %382, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %383)
  br label %384

384:                                              ; preds = %381, %378
  %385 = load ptr, ptr %28, align 8, !tbaa !5
  %386 = icmp ne ptr %385, null
  br i1 %386, label %387, label %390

387:                                              ; preds = %384
  %388 = load ptr, ptr %28, align 8, !tbaa !5
  %389 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %388, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %389)
  br label %390

390:                                              ; preds = %387, %384
  %391 = load ptr, ptr %27, align 8, !tbaa !5
  %392 = icmp ne ptr %391, null
  br i1 %392, label %393, label %396

393:                                              ; preds = %390
  %394 = load ptr, ptr %27, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.Longtail_StorageAPI, ptr %394, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %395)
  br label %396

396:                                              ; preds = %393, %390
  %397 = load ptr, ptr %26, align 8, !tbaa !5
  %398 = icmp ne ptr %397, null
  br i1 %398, label %399, label %402

399:                                              ; preds = %396
  %400 = load ptr, ptr %26, align 8, !tbaa !5
  %401 = getelementptr inbounds %struct.Longtail_CompressionRegistryAPI, ptr %400, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %401)
  br label %402

402:                                              ; preds = %399, %396
  %403 = load ptr, ptr %25, align 8, !tbaa !5
  %404 = icmp ne ptr %403, null
  br i1 %404, label %405, label %408

405:                                              ; preds = %402
  %406 = load ptr, ptr %25, align 8, !tbaa !5
  %407 = getelementptr inbounds %struct.Longtail_HashRegistryAPI, ptr %406, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %407)
  br label %408

408:                                              ; preds = %405, %402
  %409 = load ptr, ptr %24, align 8, !tbaa !5
  %410 = icmp ne ptr %409, null
  br i1 %410, label %411, label %414

411:                                              ; preds = %408
  %412 = load ptr, ptr %24, align 8, !tbaa !5
  %413 = getelementptr inbounds %struct.Longtail_JobAPI, ptr %412, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %413)
  br label %414

414:                                              ; preds = %411, %408
  %415 = load ptr, ptr %23, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %415)
  %416 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %416, ptr %10, align 4
  store i32 1, ptr %34, align 4
  br label %530

417:                                              ; preds = %349
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #3
  %418 = load ptr, ptr %40, align 8, !tbaa !5
  %419 = getelementptr inbounds %struct.Longtail_FileInfos, ptr %418, i32 0, i32 0
  %420 = load i32, ptr %419, align 8, !tbaa !26
  %421 = zext i32 %420 to i64
  %422 = mul i64 4, %421
  %423 = call ptr @Longtail_Alloc(ptr noundef null, i64 noundef %422)
  store ptr %423, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #3
  store i32 0, ptr %42, align 4, !tbaa !9
  br label %424

424:                                              ; preds = %436, %417
  %425 = load i32, ptr %42, align 4, !tbaa !9
  %426 = load ptr, ptr %40, align 8, !tbaa !5
  %427 = getelementptr inbounds %struct.Longtail_FileInfos, ptr %426, i32 0, i32 0
  %428 = load i32, ptr %427, align 8, !tbaa !26
  %429 = icmp ult i32 %425, %428
  br i1 %429, label %431, label %430

430:                                              ; preds = %424
  store i32 2, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #3
  br label %439

431:                                              ; preds = %424
  %432 = load ptr, ptr %41, align 8, !tbaa !5
  %433 = load i32, ptr %42, align 4, !tbaa !9
  %434 = zext i32 %433 to i64
  %435 = getelementptr inbounds i32, ptr %432, i64 %434
  store i32 0, ptr %435, align 4, !tbaa !9
  br label %436

436:                                              ; preds = %431
  %437 = load i32, ptr %42, align 4, !tbaa !9
  %438 = add i32 %437, 1
  store i32 %438, ptr %42, align 4, !tbaa !9
  br label %424, !llvm.loop !28

439:                                              ; preds = %430
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #3
  %440 = call ptr @MakeProgressAPI(ptr noundef @.str.74, i32 noundef 5)
  store ptr %440, ptr %43, align 8, !tbaa !5
  %441 = load ptr, ptr %43, align 8, !tbaa !5
  %442 = icmp ne ptr %441, null
  br i1 %442, label %443, label %461

443:                                              ; preds = %439
  %444 = load ptr, ptr %27, align 8, !tbaa !5
  %445 = load ptr, ptr %36, align 8, !tbaa !5
  %446 = load ptr, ptr %37, align 8, !tbaa !5
  %447 = load ptr, ptr %24, align 8, !tbaa !5
  %448 = load ptr, ptr %43, align 8, !tbaa !5
  %449 = load ptr, ptr %14, align 8, !tbaa !5
  %450 = load ptr, ptr %40, align 8, !tbaa !5
  %451 = load ptr, ptr %41, align 8, !tbaa !5
  %452 = load i32, ptr %39, align 4, !tbaa !9
  %453 = load i32, ptr %17, align 4, !tbaa !9
  %454 = call i32 @Longtail_CreateVersionIndex(ptr noundef %444, ptr noundef %445, ptr noundef %446, ptr noundef %447, ptr noundef %448, ptr noundef null, ptr noundef null, ptr noundef %449, ptr noundef %450, ptr noundef %451, i32 noundef %452, i32 noundef %453, ptr noundef %38)
  store i32 %454, ptr %33, align 4, !tbaa !9
  %455 = load ptr, ptr %43, align 8, !tbaa !5
  %456 = icmp ne ptr %455, null
  br i1 %456, label %457, label %460

457:                                              ; preds = %443
  %458 = load ptr, ptr %43, align 8, !tbaa !5
  %459 = getelementptr inbounds %struct.Longtail_ProgressAPI, ptr %458, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %459)
  br label %460

460:                                              ; preds = %457, %443
  br label %462

461:                                              ; preds = %439
  store i32 12, ptr %33, align 4, !tbaa !9
  br label %462

462:                                              ; preds = %461, %460
  %463 = load ptr, ptr %41, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %463)
  %464 = load ptr, ptr %40, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %464)
  %465 = load i32, ptr %33, align 4, !tbaa !9
  %466 = icmp ne i32 %465, 0
  br i1 %466, label %467, label %528

467:                                              ; preds = %462
  %468 = load ptr, ptr %22, align 8, !tbaa !5
  %469 = load ptr, ptr %14, align 8, !tbaa !5
  %470 = load i32, ptr %33, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.69, ptr noundef @__func__.DownSync, i32 noundef 1403, ptr noundef %468, i32 noundef 3, ptr noundef @.str.75, ptr noundef %469, i32 noundef %470)
  %471 = load ptr, ptr %32, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %471)
  %472 = load ptr, ptr %37, align 8, !tbaa !5
  %473 = icmp ne ptr %472, null
  br i1 %473, label %474, label %477

474:                                              ; preds = %467
  %475 = load ptr, ptr %37, align 8, !tbaa !5
  %476 = getelementptr inbounds %struct.Longtail_ChunkerAPI, ptr %475, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %476)
  br label %477

477:                                              ; preds = %474, %467
  %478 = load ptr, ptr %31, align 8, !tbaa !5
  %479 = icmp ne ptr %478, null
  br i1 %479, label %480, label %483

480:                                              ; preds = %477
  %481 = load ptr, ptr %31, align 8, !tbaa !5
  %482 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %481, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %482)
  br label %483

483:                                              ; preds = %480, %477
  %484 = load ptr, ptr %30, align 8, !tbaa !5
  %485 = icmp ne ptr %484, null
  br i1 %485, label %486, label %489

486:                                              ; preds = %483
  %487 = load ptr, ptr %30, align 8, !tbaa !5
  %488 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %487, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %488)
  br label %489

489:                                              ; preds = %486, %483
  %490 = load ptr, ptr %29, align 8, !tbaa !5
  %491 = icmp ne ptr %490, null
  br i1 %491, label %492, label %495

492:                                              ; preds = %489
  %493 = load ptr, ptr %29, align 8, !tbaa !5
  %494 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %493, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %494)
  br label %495

495:                                              ; preds = %492, %489
  %496 = load ptr, ptr %28, align 8, !tbaa !5
  %497 = icmp ne ptr %496, null
  br i1 %497, label %498, label %501

498:                                              ; preds = %495
  %499 = load ptr, ptr %28, align 8, !tbaa !5
  %500 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %499, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %500)
  br label %501

501:                                              ; preds = %498, %495
  %502 = load ptr, ptr %27, align 8, !tbaa !5
  %503 = icmp ne ptr %502, null
  br i1 %503, label %504, label %507

504:                                              ; preds = %501
  %505 = load ptr, ptr %27, align 8, !tbaa !5
  %506 = getelementptr inbounds %struct.Longtail_StorageAPI, ptr %505, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %506)
  br label %507

507:                                              ; preds = %504, %501
  %508 = load ptr, ptr %26, align 8, !tbaa !5
  %509 = icmp ne ptr %508, null
  br i1 %509, label %510, label %513

510:                                              ; preds = %507
  %511 = load ptr, ptr %26, align 8, !tbaa !5
  %512 = getelementptr inbounds %struct.Longtail_CompressionRegistryAPI, ptr %511, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %512)
  br label %513

513:                                              ; preds = %510, %507
  %514 = load ptr, ptr %25, align 8, !tbaa !5
  %515 = icmp ne ptr %514, null
  br i1 %515, label %516, label %519

516:                                              ; preds = %513
  %517 = load ptr, ptr %25, align 8, !tbaa !5
  %518 = getelementptr inbounds %struct.Longtail_HashRegistryAPI, ptr %517, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %518)
  br label %519

519:                                              ; preds = %516, %513
  %520 = load ptr, ptr %24, align 8, !tbaa !5
  %521 = icmp ne ptr %520, null
  br i1 %521, label %522, label %525

522:                                              ; preds = %519
  %523 = load ptr, ptr %24, align 8, !tbaa !5
  %524 = getelementptr inbounds %struct.Longtail_JobAPI, ptr %523, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %524)
  br label %525

525:                                              ; preds = %522, %519
  %526 = load ptr, ptr %23, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %526)
  %527 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %527, ptr %10, align 4
  store i32 1, ptr %34, align 4
  br label %529

528:                                              ; preds = %462
  store i32 0, ptr %34, align 4
  br label %529

529:                                              ; preds = %528, %525
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #3
  br label %530

530:                                              ; preds = %529, %414
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #3
  %531 = load i32, ptr %34, align 4
  switch i32 %531, label %967 [
    i32 0, label %532
  ]

532:                                              ; preds = %530
  br label %533

533:                                              ; preds = %532, %342
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #3
  %534 = load ptr, ptr %36, align 8, !tbaa !5
  %535 = load ptr, ptr %38, align 8, !tbaa !5
  %536 = load ptr, ptr %32, align 8, !tbaa !5
  %537 = call i32 @Longtail_CreateVersionDiff(ptr noundef %534, ptr noundef %535, ptr noundef %536, ptr noundef %44)
  store i32 %537, ptr %33, align 4, !tbaa !9
  %538 = load i32, ptr %33, align 4, !tbaa !9
  %539 = icmp ne i32 %538, 0
  br i1 %539, label %540, label %603

540:                                              ; preds = %533
  %541 = load ptr, ptr %22, align 8, !tbaa !5
  %542 = load ptr, ptr %13, align 8, !tbaa !5
  %543 = load ptr, ptr %14, align 8, !tbaa !5
  %544 = load i32, ptr %33, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.69, ptr noundef @__func__.DownSync, i32 noundef 1427, ptr noundef %541, i32 noundef 3, ptr noundef @.str.86, ptr noundef %542, ptr noundef %543, i32 noundef %544)
  %545 = load ptr, ptr %38, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %545)
  %546 = load ptr, ptr %32, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %546)
  %547 = load ptr, ptr %37, align 8, !tbaa !5
  %548 = icmp ne ptr %547, null
  br i1 %548, label %549, label %552

549:                                              ; preds = %540
  %550 = load ptr, ptr %37, align 8, !tbaa !5
  %551 = getelementptr inbounds %struct.Longtail_ChunkerAPI, ptr %550, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %551)
  br label %552

552:                                              ; preds = %549, %540
  %553 = load ptr, ptr %31, align 8, !tbaa !5
  %554 = icmp ne ptr %553, null
  br i1 %554, label %555, label %558

555:                                              ; preds = %552
  %556 = load ptr, ptr %31, align 8, !tbaa !5
  %557 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %556, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %557)
  br label %558

558:                                              ; preds = %555, %552
  %559 = load ptr, ptr %30, align 8, !tbaa !5
  %560 = icmp ne ptr %559, null
  br i1 %560, label %561, label %564

561:                                              ; preds = %558
  %562 = load ptr, ptr %30, align 8, !tbaa !5
  %563 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %562, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %563)
  br label %564

564:                                              ; preds = %561, %558
  %565 = load ptr, ptr %29, align 8, !tbaa !5
  %566 = icmp ne ptr %565, null
  br i1 %566, label %567, label %570

567:                                              ; preds = %564
  %568 = load ptr, ptr %29, align 8, !tbaa !5
  %569 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %568, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %569)
  br label %570

570:                                              ; preds = %567, %564
  %571 = load ptr, ptr %28, align 8, !tbaa !5
  %572 = icmp ne ptr %571, null
  br i1 %572, label %573, label %576

573:                                              ; preds = %570
  %574 = load ptr, ptr %28, align 8, !tbaa !5
  %575 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %574, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %575)
  br label %576

576:                                              ; preds = %573, %570
  %577 = load ptr, ptr %27, align 8, !tbaa !5
  %578 = icmp ne ptr %577, null
  br i1 %578, label %579, label %582

579:                                              ; preds = %576
  %580 = load ptr, ptr %27, align 8, !tbaa !5
  %581 = getelementptr inbounds %struct.Longtail_StorageAPI, ptr %580, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %581)
  br label %582

582:                                              ; preds = %579, %576
  %583 = load ptr, ptr %26, align 8, !tbaa !5
  %584 = icmp ne ptr %583, null
  br i1 %584, label %585, label %588

585:                                              ; preds = %582
  %586 = load ptr, ptr %26, align 8, !tbaa !5
  %587 = getelementptr inbounds %struct.Longtail_CompressionRegistryAPI, ptr %586, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %587)
  br label %588

588:                                              ; preds = %585, %582
  %589 = load ptr, ptr %25, align 8, !tbaa !5
  %590 = icmp ne ptr %589, null
  br i1 %590, label %591, label %594

591:                                              ; preds = %588
  %592 = load ptr, ptr %25, align 8, !tbaa !5
  %593 = getelementptr inbounds %struct.Longtail_HashRegistryAPI, ptr %592, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %593)
  br label %594

594:                                              ; preds = %591, %588
  %595 = load ptr, ptr %24, align 8, !tbaa !5
  %596 = icmp ne ptr %595, null
  br i1 %596, label %597, label %600

597:                                              ; preds = %594
  %598 = load ptr, ptr %24, align 8, !tbaa !5
  %599 = getelementptr inbounds %struct.Longtail_JobAPI, ptr %598, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %599)
  br label %600

600:                                              ; preds = %597, %594
  %601 = load ptr, ptr %23, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %601)
  %602 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %602, ptr %10, align 4
  store i32 1, ptr %34, align 4
  br label %966

603:                                              ; preds = %533
  %604 = load ptr, ptr %44, align 8, !tbaa !5
  %605 = getelementptr inbounds %struct.Longtail_VersionDiff, ptr %604, i32 0, i32 0
  %606 = load ptr, ptr %605, align 8, !tbaa !30
  %607 = load i32, ptr %606, align 4, !tbaa !9
  %608 = icmp eq i32 %607, 0
  br i1 %608, label %609, label %689

609:                                              ; preds = %603
  %610 = load ptr, ptr %44, align 8, !tbaa !5
  %611 = getelementptr inbounds %struct.Longtail_VersionDiff, ptr %610, i32 0, i32 2
  %612 = load ptr, ptr %611, align 8, !tbaa !32
  %613 = load i32, ptr %612, align 4, !tbaa !9
  %614 = icmp eq i32 %613, 0
  br i1 %614, label %615, label %689

615:                                              ; preds = %609
  %616 = load ptr, ptr %44, align 8, !tbaa !5
  %617 = getelementptr inbounds %struct.Longtail_VersionDiff, ptr %616, i32 0, i32 1
  %618 = load ptr, ptr %617, align 8, !tbaa !33
  %619 = load i32, ptr %618, align 4, !tbaa !9
  %620 = icmp eq i32 %619, 0
  br i1 %620, label %621, label %689

621:                                              ; preds = %615
  %622 = load ptr, ptr %44, align 8, !tbaa !5
  %623 = getelementptr inbounds %struct.Longtail_VersionDiff, ptr %622, i32 0, i32 3
  %624 = load ptr, ptr %623, align 8, !tbaa !34
  %625 = load i32, ptr %624, align 4, !tbaa !9
  %626 = icmp eq i32 %625, 0
  br i1 %626, label %630, label %627

627:                                              ; preds = %621
  %628 = load i32, ptr %16, align 4, !tbaa !9
  %629 = icmp ne i32 %628, 0
  br i1 %629, label %689, label %630

630:                                              ; preds = %627, %621
  %631 = load ptr, ptr %44, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %631)
  %632 = load ptr, ptr %38, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %632)
  %633 = load ptr, ptr %32, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %633)
  %634 = load ptr, ptr %37, align 8, !tbaa !5
  %635 = icmp ne ptr %634, null
  br i1 %635, label %636, label %639

636:                                              ; preds = %630
  %637 = load ptr, ptr %37, align 8, !tbaa !5
  %638 = getelementptr inbounds %struct.Longtail_ChunkerAPI, ptr %637, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %638)
  br label %639

639:                                              ; preds = %636, %630
  %640 = load ptr, ptr %31, align 8, !tbaa !5
  %641 = icmp ne ptr %640, null
  br i1 %641, label %642, label %645

642:                                              ; preds = %639
  %643 = load ptr, ptr %31, align 8, !tbaa !5
  %644 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %643, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %644)
  br label %645

645:                                              ; preds = %642, %639
  %646 = load ptr, ptr %30, align 8, !tbaa !5
  %647 = icmp ne ptr %646, null
  br i1 %647, label %648, label %651

648:                                              ; preds = %645
  %649 = load ptr, ptr %30, align 8, !tbaa !5
  %650 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %649, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %650)
  br label %651

651:                                              ; preds = %648, %645
  %652 = load ptr, ptr %29, align 8, !tbaa !5
  %653 = icmp ne ptr %652, null
  br i1 %653, label %654, label %657

654:                                              ; preds = %651
  %655 = load ptr, ptr %29, align 8, !tbaa !5
  %656 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %655, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %656)
  br label %657

657:                                              ; preds = %654, %651
  %658 = load ptr, ptr %28, align 8, !tbaa !5
  %659 = icmp ne ptr %658, null
  br i1 %659, label %660, label %663

660:                                              ; preds = %657
  %661 = load ptr, ptr %28, align 8, !tbaa !5
  %662 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %661, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %662)
  br label %663

663:                                              ; preds = %660, %657
  %664 = load ptr, ptr %27, align 8, !tbaa !5
  %665 = icmp ne ptr %664, null
  br i1 %665, label %666, label %669

666:                                              ; preds = %663
  %667 = load ptr, ptr %27, align 8, !tbaa !5
  %668 = getelementptr inbounds %struct.Longtail_StorageAPI, ptr %667, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %668)
  br label %669

669:                                              ; preds = %666, %663
  %670 = load ptr, ptr %26, align 8, !tbaa !5
  %671 = icmp ne ptr %670, null
  br i1 %671, label %672, label %675

672:                                              ; preds = %669
  %673 = load ptr, ptr %26, align 8, !tbaa !5
  %674 = getelementptr inbounds %struct.Longtail_CompressionRegistryAPI, ptr %673, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %674)
  br label %675

675:                                              ; preds = %672, %669
  %676 = load ptr, ptr %25, align 8, !tbaa !5
  %677 = icmp ne ptr %676, null
  br i1 %677, label %678, label %681

678:                                              ; preds = %675
  %679 = load ptr, ptr %25, align 8, !tbaa !5
  %680 = getelementptr inbounds %struct.Longtail_HashRegistryAPI, ptr %679, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %680)
  br label %681

681:                                              ; preds = %678, %675
  %682 = load ptr, ptr %24, align 8, !tbaa !5
  %683 = icmp ne ptr %682, null
  br i1 %683, label %684, label %687

684:                                              ; preds = %681
  %685 = load ptr, ptr %24, align 8, !tbaa !5
  %686 = getelementptr inbounds %struct.Longtail_JobAPI, ptr %685, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %686)
  br label %687

687:                                              ; preds = %684, %681
  %688 = load ptr, ptr %23, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %688)
  store i32 0, ptr %10, align 4
  store i32 1, ptr %34, align 4
  br label %966

689:                                              ; preds = %627, %615, %609, %603
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #3
  %690 = load ptr, ptr %32, align 8, !tbaa !5
  %691 = getelementptr inbounds %struct.Longtail_VersionIndex, ptr %690, i32 0, i32 4
  %692 = load ptr, ptr %691, align 8, !tbaa !35
  %693 = load i32, ptr %692, align 4, !tbaa !9
  %694 = zext i32 %693 to i64
  %695 = mul i64 8, %694
  %696 = call ptr @Longtail_Alloc(ptr noundef null, i64 noundef %695)
  store ptr %696, ptr %46, align 8, !tbaa !5
  %697 = load ptr, ptr %32, align 8, !tbaa !5
  %698 = load ptr, ptr %44, align 8, !tbaa !5
  %699 = load ptr, ptr %46, align 8, !tbaa !5
  %700 = call i32 @Longtail_GetRequiredChunkHashes(ptr noundef %697, ptr noundef %698, ptr noundef %45, ptr noundef %699)
  store i32 %700, ptr %33, align 4, !tbaa !9
  %701 = load i32, ptr %33, align 4, !tbaa !9
  %702 = icmp ne i32 %701, 0
  br i1 %702, label %703, label %767

703:                                              ; preds = %689
  %704 = load ptr, ptr %22, align 8, !tbaa !5
  %705 = load ptr, ptr %13, align 8, !tbaa !5
  %706 = load i32, ptr %33, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.69, ptr noundef @__func__.DownSync, i32 noundef 1473, ptr noundef %704, i32 noundef 3, ptr noundef @.str.87, ptr noundef %705, i32 noundef %706)
  %707 = load ptr, ptr %46, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %707)
  %708 = load ptr, ptr %44, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %708)
  %709 = load ptr, ptr %38, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %709)
  %710 = load ptr, ptr %32, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %710)
  %711 = load ptr, ptr %37, align 8, !tbaa !5
  %712 = icmp ne ptr %711, null
  br i1 %712, label %713, label %716

713:                                              ; preds = %703
  %714 = load ptr, ptr %37, align 8, !tbaa !5
  %715 = getelementptr inbounds %struct.Longtail_ChunkerAPI, ptr %714, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %715)
  br label %716

716:                                              ; preds = %713, %703
  %717 = load ptr, ptr %31, align 8, !tbaa !5
  %718 = icmp ne ptr %717, null
  br i1 %718, label %719, label %722

719:                                              ; preds = %716
  %720 = load ptr, ptr %31, align 8, !tbaa !5
  %721 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %720, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %721)
  br label %722

722:                                              ; preds = %719, %716
  %723 = load ptr, ptr %30, align 8, !tbaa !5
  %724 = icmp ne ptr %723, null
  br i1 %724, label %725, label %728

725:                                              ; preds = %722
  %726 = load ptr, ptr %30, align 8, !tbaa !5
  %727 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %726, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %727)
  br label %728

728:                                              ; preds = %725, %722
  %729 = load ptr, ptr %29, align 8, !tbaa !5
  %730 = icmp ne ptr %729, null
  br i1 %730, label %731, label %734

731:                                              ; preds = %728
  %732 = load ptr, ptr %29, align 8, !tbaa !5
  %733 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %732, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %733)
  br label %734

734:                                              ; preds = %731, %728
  %735 = load ptr, ptr %28, align 8, !tbaa !5
  %736 = icmp ne ptr %735, null
  br i1 %736, label %737, label %740

737:                                              ; preds = %734
  %738 = load ptr, ptr %28, align 8, !tbaa !5
  %739 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %738, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %739)
  br label %740

740:                                              ; preds = %737, %734
  %741 = load ptr, ptr %27, align 8, !tbaa !5
  %742 = icmp ne ptr %741, null
  br i1 %742, label %743, label %746

743:                                              ; preds = %740
  %744 = load ptr, ptr %27, align 8, !tbaa !5
  %745 = getelementptr inbounds %struct.Longtail_StorageAPI, ptr %744, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %745)
  br label %746

746:                                              ; preds = %743, %740
  %747 = load ptr, ptr %26, align 8, !tbaa !5
  %748 = icmp ne ptr %747, null
  br i1 %748, label %749, label %752

749:                                              ; preds = %746
  %750 = load ptr, ptr %26, align 8, !tbaa !5
  %751 = getelementptr inbounds %struct.Longtail_CompressionRegistryAPI, ptr %750, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %751)
  br label %752

752:                                              ; preds = %749, %746
  %753 = load ptr, ptr %25, align 8, !tbaa !5
  %754 = icmp ne ptr %753, null
  br i1 %754, label %755, label %758

755:                                              ; preds = %752
  %756 = load ptr, ptr %25, align 8, !tbaa !5
  %757 = getelementptr inbounds %struct.Longtail_HashRegistryAPI, ptr %756, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %757)
  br label %758

758:                                              ; preds = %755, %752
  %759 = load ptr, ptr %24, align 8, !tbaa !5
  %760 = icmp ne ptr %759, null
  br i1 %760, label %761, label %764

761:                                              ; preds = %758
  %762 = load ptr, ptr %24, align 8, !tbaa !5
  %763 = getelementptr inbounds %struct.Longtail_JobAPI, ptr %762, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %763)
  br label %764

764:                                              ; preds = %761, %758
  %765 = load ptr, ptr %23, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %765)
  %766 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %766, ptr %10, align 4
  store i32 1, ptr %34, align 4
  br label %965

767:                                              ; preds = %689
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #3
  %768 = load ptr, ptr %31, align 8, !tbaa !5
  %769 = load i32, ptr %45, align 4, !tbaa !9
  %770 = load ptr, ptr %46, align 8, !tbaa !5
  %771 = call i32 @SyncGetExistingContent(ptr noundef %768, i32 noundef %769, ptr noundef %770, i32 noundef 0, ptr noundef %47)
  store i32 %771, ptr %33, align 4, !tbaa !9
  %772 = load i32, ptr %33, align 4, !tbaa !9
  %773 = icmp ne i32 %772, 0
  br i1 %773, label %774, label %838

774:                                              ; preds = %767
  %775 = load ptr, ptr %22, align 8, !tbaa !5
  %776 = load ptr, ptr %11, align 8, !tbaa !5
  %777 = load i32, ptr %33, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.69, ptr noundef @__func__.DownSync, i32 noundef 1500, ptr noundef %775, i32 noundef 3, ptr noundef @.str.88, ptr noundef %776, i32 noundef %777)
  %778 = load ptr, ptr %46, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %778)
  %779 = load ptr, ptr %44, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %779)
  %780 = load ptr, ptr %38, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %780)
  %781 = load ptr, ptr %32, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %781)
  %782 = load ptr, ptr %37, align 8, !tbaa !5
  %783 = icmp ne ptr %782, null
  br i1 %783, label %784, label %787

784:                                              ; preds = %774
  %785 = load ptr, ptr %37, align 8, !tbaa !5
  %786 = getelementptr inbounds %struct.Longtail_ChunkerAPI, ptr %785, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %786)
  br label %787

787:                                              ; preds = %784, %774
  %788 = load ptr, ptr %31, align 8, !tbaa !5
  %789 = icmp ne ptr %788, null
  br i1 %789, label %790, label %793

790:                                              ; preds = %787
  %791 = load ptr, ptr %31, align 8, !tbaa !5
  %792 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %791, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %792)
  br label %793

793:                                              ; preds = %790, %787
  %794 = load ptr, ptr %30, align 8, !tbaa !5
  %795 = icmp ne ptr %794, null
  br i1 %795, label %796, label %799

796:                                              ; preds = %793
  %797 = load ptr, ptr %30, align 8, !tbaa !5
  %798 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %797, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %798)
  br label %799

799:                                              ; preds = %796, %793
  %800 = load ptr, ptr %29, align 8, !tbaa !5
  %801 = icmp ne ptr %800, null
  br i1 %801, label %802, label %805

802:                                              ; preds = %799
  %803 = load ptr, ptr %29, align 8, !tbaa !5
  %804 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %803, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %804)
  br label %805

805:                                              ; preds = %802, %799
  %806 = load ptr, ptr %28, align 8, !tbaa !5
  %807 = icmp ne ptr %806, null
  br i1 %807, label %808, label %811

808:                                              ; preds = %805
  %809 = load ptr, ptr %28, align 8, !tbaa !5
  %810 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %809, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %810)
  br label %811

811:                                              ; preds = %808, %805
  %812 = load ptr, ptr %27, align 8, !tbaa !5
  %813 = icmp ne ptr %812, null
  br i1 %813, label %814, label %817

814:                                              ; preds = %811
  %815 = load ptr, ptr %27, align 8, !tbaa !5
  %816 = getelementptr inbounds %struct.Longtail_StorageAPI, ptr %815, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %816)
  br label %817

817:                                              ; preds = %814, %811
  %818 = load ptr, ptr %26, align 8, !tbaa !5
  %819 = icmp ne ptr %818, null
  br i1 %819, label %820, label %823

820:                                              ; preds = %817
  %821 = load ptr, ptr %26, align 8, !tbaa !5
  %822 = getelementptr inbounds %struct.Longtail_CompressionRegistryAPI, ptr %821, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %822)
  br label %823

823:                                              ; preds = %820, %817
  %824 = load ptr, ptr %25, align 8, !tbaa !5
  %825 = icmp ne ptr %824, null
  br i1 %825, label %826, label %829

826:                                              ; preds = %823
  %827 = load ptr, ptr %25, align 8, !tbaa !5
  %828 = getelementptr inbounds %struct.Longtail_HashRegistryAPI, ptr %827, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %828)
  br label %829

829:                                              ; preds = %826, %823
  %830 = load ptr, ptr %24, align 8, !tbaa !5
  %831 = icmp ne ptr %830, null
  br i1 %831, label %832, label %835

832:                                              ; preds = %829
  %833 = load ptr, ptr %24, align 8, !tbaa !5
  %834 = getelementptr inbounds %struct.Longtail_JobAPI, ptr %833, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %834)
  br label %835

835:                                              ; preds = %832, %829
  %836 = load ptr, ptr %23, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %836)
  %837 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %837, ptr %10, align 4
  store i32 1, ptr %34, align 4
  br label %964

838:                                              ; preds = %767
  %839 = load ptr, ptr %46, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %839)
  store ptr null, ptr %46, align 8, !tbaa !5
  %840 = load i32, ptr %19, align 4, !tbaa !9
  %841 = icmp ne i32 %840, 0
  br i1 %841, label %842, label %846

842:                                              ; preds = %838
  %843 = load ptr, ptr %47, align 8, !tbaa !5
  %844 = load ptr, ptr %32, align 8, !tbaa !5
  %845 = load ptr, ptr %44, align 8, !tbaa !5
  call void @InitMonitor(ptr noundef %843, ptr noundef %844, ptr noundef %845)
  br label %846

846:                                              ; preds = %842, %838
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #3
  %847 = load i32, ptr %19, align 4, !tbaa !9
  %848 = icmp ne i32 %847, 0
  %849 = zext i1 %848 to i64
  %850 = select i1 %848, i32 0, i32 5
  %851 = call ptr @MakeProgressAPI(ptr noundef @.str.89, i32 noundef %850)
  store ptr %851, ptr %48, align 8, !tbaa !5
  %852 = load ptr, ptr %48, align 8, !tbaa !5
  %853 = icmp ne ptr %852, null
  br i1 %853, label %854, label %893

854:                                              ; preds = %846
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #3
  %855 = load ptr, ptr %27, align 8, !tbaa !5
  %856 = load ptr, ptr %32, align 8, !tbaa !5
  %857 = load ptr, ptr %44, align 8, !tbaa !5
  %858 = load ptr, ptr %14, align 8, !tbaa !5
  %859 = call ptr @Longtail_CreateConcurrentChunkWriteAPI(ptr noundef %855, ptr noundef %856, ptr noundef %857, ptr noundef %858)
  store ptr %859, ptr %49, align 8, !tbaa !5
  %860 = load ptr, ptr %49, align 8, !tbaa !5
  %861 = icmp ne ptr %860, null
  br i1 %861, label %862, label %885

862:                                              ; preds = %854
  %863 = load ptr, ptr %31, align 8, !tbaa !5
  %864 = load ptr, ptr %27, align 8, !tbaa !5
  %865 = load ptr, ptr %49, align 8, !tbaa !5
  %866 = load ptr, ptr %36, align 8, !tbaa !5
  %867 = load ptr, ptr %24, align 8, !tbaa !5
  %868 = load ptr, ptr %48, align 8, !tbaa !5
  %869 = load ptr, ptr %47, align 8, !tbaa !5
  %870 = load ptr, ptr %38, align 8, !tbaa !5
  %871 = load ptr, ptr %32, align 8, !tbaa !5
  %872 = load ptr, ptr %44, align 8, !tbaa !5
  %873 = load ptr, ptr %14, align 8, !tbaa !5
  %874 = load i32, ptr %16, align 4, !tbaa !9
  %875 = icmp ne i32 %874, 0
  %876 = zext i1 %875 to i64
  %877 = select i1 %875, i32 1, i32 0
  %878 = call i32 @Longtail_ChangeVersion2(ptr noundef %863, ptr noundef %864, ptr noundef %865, ptr noundef %866, ptr noundef %867, ptr noundef %868, ptr noundef null, ptr noundef null, ptr noundef %869, ptr noundef %870, ptr noundef %871, ptr noundef %872, ptr noundef %873, i32 noundef %877)
  store i32 %878, ptr %33, align 4, !tbaa !9
  %879 = load ptr, ptr %49, align 8, !tbaa !5
  %880 = icmp ne ptr %879, null
  br i1 %880, label %881, label %884

881:                                              ; preds = %862
  %882 = load ptr, ptr %49, align 8, !tbaa !5
  %883 = getelementptr inbounds %struct.Longtail_ConcurrentChunkWriteAPI, ptr %882, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %883)
  br label %884

884:                                              ; preds = %881, %862
  br label %886

885:                                              ; preds = %854
  store i32 12, ptr %33, align 4, !tbaa !9
  br label %886

886:                                              ; preds = %885, %884
  %887 = load ptr, ptr %48, align 8, !tbaa !5
  %888 = icmp ne ptr %887, null
  br i1 %888, label %889, label %892

889:                                              ; preds = %886
  %890 = load ptr, ptr %48, align 8, !tbaa !5
  %891 = getelementptr inbounds %struct.Longtail_ProgressAPI, ptr %890, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %891)
  br label %892

892:                                              ; preds = %889, %886
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #3
  br label %894

893:                                              ; preds = %846
  store i32 12, ptr %33, align 4, !tbaa !9
  br label %894

894:                                              ; preds = %893, %892
  %895 = load i32, ptr %33, align 4, !tbaa !9
  %896 = icmp ne i32 %895, 0
  br i1 %896, label %897, label %903

897:                                              ; preds = %894
  %898 = load ptr, ptr %22, align 8, !tbaa !5
  %899 = load ptr, ptr %14, align 8, !tbaa !5
  %900 = load ptr, ptr %13, align 8, !tbaa !5
  %901 = load ptr, ptr %11, align 8, !tbaa !5
  %902 = load i32, ptr %33, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str.69, ptr noundef @__func__.DownSync, i32 noundef 1562, ptr noundef %898, i32 noundef 3, ptr noundef @.str.90, ptr noundef %899, ptr noundef %900, ptr noundef %901, i32 noundef %902)
  br label %903

903:                                              ; preds = %897, %894
  %904 = load ptr, ptr %47, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %904)
  %905 = load ptr, ptr %44, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %905)
  %906 = load ptr, ptr %38, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %906)
  %907 = load ptr, ptr %32, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %907)
  %908 = load ptr, ptr %37, align 8, !tbaa !5
  %909 = icmp ne ptr %908, null
  br i1 %909, label %910, label %913

910:                                              ; preds = %903
  %911 = load ptr, ptr %37, align 8, !tbaa !5
  %912 = getelementptr inbounds %struct.Longtail_ChunkerAPI, ptr %911, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %912)
  br label %913

913:                                              ; preds = %910, %903
  %914 = load ptr, ptr %31, align 8, !tbaa !5
  %915 = icmp ne ptr %914, null
  br i1 %915, label %916, label %919

916:                                              ; preds = %913
  %917 = load ptr, ptr %31, align 8, !tbaa !5
  %918 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %917, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %918)
  br label %919

919:                                              ; preds = %916, %913
  %920 = load ptr, ptr %30, align 8, !tbaa !5
  %921 = icmp ne ptr %920, null
  br i1 %921, label %922, label %925

922:                                              ; preds = %919
  %923 = load ptr, ptr %30, align 8, !tbaa !5
  %924 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %923, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %924)
  br label %925

925:                                              ; preds = %922, %919
  %926 = load ptr, ptr %29, align 8, !tbaa !5
  %927 = icmp ne ptr %926, null
  br i1 %927, label %928, label %931

928:                                              ; preds = %925
  %929 = load ptr, ptr %29, align 8, !tbaa !5
  %930 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %929, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %930)
  br label %931

931:                                              ; preds = %928, %925
  %932 = load ptr, ptr %28, align 8, !tbaa !5
  %933 = icmp ne ptr %932, null
  br i1 %933, label %934, label %937

934:                                              ; preds = %931
  %935 = load ptr, ptr %28, align 8, !tbaa !5
  %936 = getelementptr inbounds %struct.Longtail_BlockStoreAPI, ptr %935, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %936)
  br label %937

937:                                              ; preds = %934, %931
  %938 = load ptr, ptr %27, align 8, !tbaa !5
  %939 = icmp ne ptr %938, null
  br i1 %939, label %940, label %943

940:                                              ; preds = %937
  %941 = load ptr, ptr %27, align 8, !tbaa !5
  %942 = getelementptr inbounds %struct.Longtail_StorageAPI, ptr %941, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %942)
  br label %943

943:                                              ; preds = %940, %937
  %944 = load ptr, ptr %26, align 8, !tbaa !5
  %945 = icmp ne ptr %944, null
  br i1 %945, label %946, label %949

946:                                              ; preds = %943
  %947 = load ptr, ptr %26, align 8, !tbaa !5
  %948 = getelementptr inbounds %struct.Longtail_CompressionRegistryAPI, ptr %947, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %948)
  br label %949

949:                                              ; preds = %946, %943
  %950 = load ptr, ptr %25, align 8, !tbaa !5
  %951 = icmp ne ptr %950, null
  br i1 %951, label %952, label %955

952:                                              ; preds = %949
  %953 = load ptr, ptr %25, align 8, !tbaa !5
  %954 = getelementptr inbounds %struct.Longtail_HashRegistryAPI, ptr %953, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %954)
  br label %955

955:                                              ; preds = %952, %949
  %956 = load ptr, ptr %24, align 8, !tbaa !5
  %957 = icmp ne ptr %956, null
  br i1 %957, label %958, label %961

958:                                              ; preds = %955
  %959 = load ptr, ptr %24, align 8, !tbaa !5
  %960 = getelementptr inbounds %struct.Longtail_JobAPI, ptr %959, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %960)
  br label %961

961:                                              ; preds = %958, %955
  %962 = load ptr, ptr %23, align 8, !tbaa !5
  call void @Longtail_Free(ptr noundef %962)
  %963 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %963, ptr %10, align 4
  store i32 1, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #3
  br label %964

964:                                              ; preds = %961, %835
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #3
  br label %965

965:                                              ; preds = %964, %764
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #3
  br label %966

966:                                              ; preds = %965, %687, %600
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #3
  br label %967

967:                                              ; preds = %966, %530
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #3
  br label %968

968:                                              ; preds = %967, %326
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #3
  br label %969

969:                                              ; preds = %968, %270
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #3
  br label %970

970:                                              ; preds = %969, %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 216, ptr %20) #3
  %971 = load i32, ptr %10, align 4
  ret i32 %971
}

declare ptr @Longtail_CreateCacheBlockStoreAPI(ptr noundef, ptr noundef, ptr noundef) #2

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

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

declare ptr @Longtail_CreateConcurrentChunkWriteAPI(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = !{!21, !6, i64 8}
!21 = !{!"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}
!22 = !{!23, !6, i64 8}
!23 = !{!"Longtail_HashRegistryAPI", !24, i64 0, !6, i64 8}
!24 = !{!"Longtail_API", !6, i64 0}
!25 = !{!21, !6, i64 16}
!26 = !{!27, !10, i64 0}
!27 = !{!"Longtail_FileInfos", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!31, !6, i64 0}
!31 = !{!"Longtail_VersionDiff", !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}
!32 = !{!31, !6, i64 16}
!33 = !{!31, !6, i64 8}
!34 = !{!31, !6, i64 24}
!35 = !{!21, !6, i64 32}


; 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.52 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [19 x i8], align 1
@__func__.DownSync = external hidden unnamed_addr constant [9 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [55 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

; Function Attrs: nounwind uwtable
declare dso_local void @InitMonitor(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare void @Longtail_Free(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @MakeProgressAPI(ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare hidden ptr @NormalizePath(ptr noundef) local_unnamed_addr #1

declare ptr @Longtail_CreateFullHashRegistry(...) local_unnamed_addr #2

declare ptr @Longtail_CreateBikeshedJobAPI(i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @Longtail_GetCPUCount(...) local_unnamed_addr #2

declare ptr @Longtail_CreateFullCompressionRegistry(...) local_unnamed_addr #2

declare ptr @Longtail_CreateFSStorageAPI(...) local_unnamed_addr #2

declare ptr @Longtail_CreateFSBlockStoreAPI(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare ptr @Longtail_CreateCompressBlockStoreAPI(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @Longtail_ReadVersionIndex(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @Longtail_DisposeAPI(ptr noundef) local_unnamed_addr #2

declare ptr @Longtail_CreateHPCDCChunkerAPI(...) local_unnamed_addr #2

declare i32 @Longtail_GetFilesRecursively2(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @Longtail_CreateVersionIndex(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @DownSync(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8) local_unnamed_addr #1 {
  %10 = alloca [9 x %struct.Longtail_LogFieldFmt_Private], align 16
  %11 = alloca %struct.Longtail_LogContextFmt_Private, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 216, ptr nonnull %10) #3
  store ptr @.str.52, ptr %10, align 16, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr @.str.53, ptr %19, align 8, !tbaa !10
  %20 = getelementptr inbounds i8, ptr %10, i64 16
  store ptr %0, ptr %20, align 16, !tbaa !11
  %21 = getelementptr inbounds i8, ptr %10, i64 24
  store ptr @.str.81, ptr %21, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %10, i64 32
  store ptr @.str.53, ptr %22, align 16, !tbaa !10
  %23 = getelementptr inbounds i8, ptr %10, i64 40
  store ptr %1, ptr %23, align 8, !tbaa !11
  %24 = getelementptr inbounds i8, ptr %10, i64 48
  store ptr @.str.54, ptr %24, align 16, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %10, i64 56
  store ptr @.str.53, ptr %25, align 8, !tbaa !10
  %26 = getelementptr inbounds i8, ptr %10, i64 64
  store ptr %2, ptr %26, align 16, !tbaa !11
  %27 = getelementptr inbounds i8, ptr %10, i64 72
  store ptr @.str.82, ptr %27, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %10, i64 80
  store ptr @.str.53, ptr %28, align 16, !tbaa !10
  %29 = getelementptr inbounds i8, ptr %10, i64 88
  store ptr %3, ptr %29, align 8, !tbaa !11
  %30 = getelementptr inbounds i8, ptr %10, i64 96
  store ptr @.str.83, ptr %30, align 16, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %10, i64 104
  store ptr @.str.56, ptr %31, align 8, !tbaa !10
  %32 = getelementptr inbounds i8, ptr %10, i64 112
  store ptr %4, ptr %32, align 16, !tbaa !11
  %33 = getelementptr inbounds i8, ptr %10, i64 120
  store ptr @.str.84, ptr %33, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %10, i64 128
  store ptr @.str.66, ptr %34, align 16, !tbaa !10
  %35 = getelementptr inbounds i8, ptr %10, i64 136
  %36 = sext i32 %5 to i64
  %37 = inttoptr i64 %36 to ptr
  store ptr %37, ptr %35, align 8, !tbaa !11
  %38 = getelementptr inbounds i8, ptr %10, i64 144
  store ptr @.str.65, ptr %38, align 16, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %10, i64 152
  store ptr @.str.66, ptr %39, align 8, !tbaa !10
  %40 = getelementptr inbounds i8, ptr %10, i64 160
  %41 = sext i32 %6 to i64
  %42 = inttoptr i64 %41 to ptr
  store ptr %42, ptr %40, align 16, !tbaa !11
  %43 = getelementptr inbounds i8, ptr %10, i64 168
  store ptr @.str.67, ptr %43, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %10, i64 176
  store ptr @.str.66, ptr %44, align 16, !tbaa !10
  %45 = getelementptr inbounds i8, ptr %10, i64 184
  %46 = sext i32 %7 to i64
  %47 = inttoptr i64 %46 to ptr
  store ptr %47, ptr %45, align 8, !tbaa !11
  %48 = getelementptr inbounds i8, ptr %10, i64 192
  store ptr @.str.68, ptr %48, align 16, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %10, i64 200
  store ptr @.str.66, ptr %49, align 8, !tbaa !10
  %50 = getelementptr inbounds i8, ptr %10, i64 208
  %51 = sext i32 %8 to i64
  %52 = inttoptr i64 %51 to ptr
  store ptr %52, ptr %50, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #3
  store ptr null, ptr %11, align 8, !tbaa !12
  %53 = getelementptr inbounds i8, ptr %11, i64 8
  store ptr %10, ptr %53, align 8, !tbaa !15
  %54 = getelementptr inbounds i8, ptr %11, i64 16
  store i64 9, ptr %54, align 8, !tbaa !16
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.69, ptr noundef nonnull @__func__.DownSync, i32 noundef 1257, ptr noundef nonnull %11, i32 noundef 0, ptr noundef nonnull @.str.70, ptr noundef nonnull @.str.71) #3
  %55 = call ptr @NormalizePath(ptr noundef %0)
  %56 = call i32 (...) @Longtail_GetCPUCount() #3
  %57 = call ptr @Longtail_CreateBikeshedJobAPI(i32 noundef %56, i32 noundef 0) #3
  %58 = call ptr (...) @Longtail_CreateFullHashRegistry() #3
  %59 = call ptr (...) @Longtail_CreateFullCompressionRegistry() #3
  %60 = call ptr (...) @Longtail_CreateFSStorageAPI() #3
  %61 = call ptr @Longtail_CreateFSBlockStoreAPI(ptr noundef %57, ptr noundef %60, ptr noundef %55, ptr noundef null, i32 noundef %7) #3
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %65, label %62

62:                                               ; preds = %9
  %63 = call ptr @Longtail_CreateFSBlockStoreAPI(ptr noundef %57, ptr noundef %60, ptr noundef nonnull %1, ptr noundef null, i32 noundef %7) #3
  %64 = call ptr @Longtail_CreateCacheBlockStoreAPI(ptr noundef %57, ptr noundef %63, ptr noundef %61) #3
  br label %65

65:                                               ; preds = %9, %62
  %.sink = phi ptr [ %64, %62 ], [ %61, %9 ]
  %.0310 = phi ptr [ %64, %62 ], [ null, %9 ]
  %.0309 = phi ptr [ %63, %62 ], [ null, %9 ]
  %66 = call ptr @Longtail_CreateCompressBlockStoreAPI(ptr noundef %.sink, ptr noundef %59) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #3
  store ptr null, ptr %12, align 8, !tbaa !17
  %67 = call i32 @Longtail_ReadVersionIndex(ptr noundef %60, ptr noundef %2, ptr noundef nonnull %12) #3
  %.not379 = icmp eq i32 %67, 0
  br i1 %.not379, label %85, label %68

68:                                               ; preds = %65
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.69, ptr noundef nonnull @__func__.DownSync, i32 noundef 1283, ptr noundef nonnull %11, i32 noundef 3, ptr noundef nonnull @.str.72, ptr noundef %2, i32 noundef %67) #3
  %.not467 = icmp eq ptr %66, null
  br i1 %.not467, label %70, label %69

69:                                               ; preds = %68
  call void @Longtail_DisposeAPI(ptr noundef nonnull %66) #3
  br label %70

70:                                               ; preds = %69, %68
  %.not468 = icmp eq ptr %.0310, null
  br i1 %.not468, label %72, label %71

71:                                               ; preds = %70
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0310) #3
  br label %72

72:                                               ; preds = %71, %70
  %.not469 = icmp eq ptr %.0309, null
  br i1 %.not469, label %74, label %73

73:                                               ; preds = %72
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0309) #3
  br label %74

74:                                               ; preds = %73, %72
  %.not470 = icmp eq ptr %61, null
  br i1 %.not470, label %76, label %75

75:                                               ; preds = %74
  call void @Longtail_DisposeAPI(ptr noundef nonnull %61) #3
  br label %76

76:                                               ; preds = %75, %74
  %.not471 = icmp eq ptr %60, null
  br i1 %.not471, label %78, label %77

77:                                               ; preds = %76
  call void @Longtail_DisposeAPI(ptr noundef nonnull %60) #3
  br label %78

78:                                               ; preds = %77, %76
  %.not472 = icmp eq ptr %59, null
  br i1 %.not472, label %80, label %79

79:                                               ; preds = %78
  call void @Longtail_DisposeAPI(ptr noundef nonnull %59) #3
  br label %80

80:                                               ; preds = %79, %78
  %.not473 = icmp eq ptr %58, null
  br i1 %.not473, label %82, label %81

81:                                               ; preds = %80
  call void @Longtail_DisposeAPI(ptr noundef nonnull %58) #3
  br label %82

82:                                               ; preds = %81, %80
  %.not474 = icmp eq ptr %57, null
  br i1 %.not474, label %84, label %83

83:                                               ; preds = %82
  call void @Longtail_DisposeAPI(ptr noundef nonnull %57) #3
  br label %84

84:                                               ; preds = %83, %82
  call void @Longtail_Free(ptr noundef %55) #3
  br label %345

85:                                               ; preds = %65
  %86 = load ptr, ptr %12, align 8, !tbaa !17
  %87 = getelementptr inbounds i8, ptr %86, i64 8
  %88 = load ptr, ptr %87, align 8, !tbaa !18
  %89 = load i32, ptr %88, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #3
  %90 = getelementptr inbounds i8, ptr %58, i64 8
  %91 = load ptr, ptr %90, align 8, !tbaa !22
  %92 = call i32 %91(ptr noundef %58, i32 noundef %89, ptr noundef nonnull %13) #3
  %.not380 = icmp eq i32 %92, 0
  br i1 %.not380, label %109, label %93

93:                                               ; preds = %85
  %94 = load ptr, ptr %12, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %94) #3
  %.not459 = icmp eq ptr %66, null
  br i1 %.not459, label %96, label %95

95:                                               ; preds = %93
  call void @Longtail_DisposeAPI(ptr noundef nonnull %66) #3
  br label %96

96:                                               ; preds = %95, %93
  %.not460 = icmp eq ptr %.0310, null
  br i1 %.not460, label %98, label %97

97:                                               ; preds = %96
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0310) #3
  br label %98

98:                                               ; preds = %97, %96
  %.not461 = icmp eq ptr %.0309, null
  br i1 %.not461, label %100, label %99

99:                                               ; preds = %98
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0309) #3
  br label %100

100:                                              ; preds = %99, %98
  %.not462 = icmp eq ptr %61, null
  br i1 %.not462, label %102, label %101

101:                                              ; preds = %100
  call void @Longtail_DisposeAPI(ptr noundef nonnull %61) #3
  br label %102

102:                                              ; preds = %101, %100
  %.not463 = icmp eq ptr %60, null
  br i1 %.not463, label %104, label %103

103:                                              ; preds = %102
  call void @Longtail_DisposeAPI(ptr noundef nonnull %60) #3
  br label %104

104:                                              ; preds = %103, %102
  %.not464 = icmp eq ptr %59, null
  br i1 %.not464, label %106, label %105

105:                                              ; preds = %104
  call void @Longtail_DisposeAPI(ptr noundef nonnull %59) #3
  br label %106

106:                                              ; preds = %105, %104
  call void @Longtail_DisposeAPI(ptr noundef nonnull %58) #3
  %.not466 = icmp eq ptr %57, null
  br i1 %.not466, label %108, label %107

107:                                              ; preds = %106
  call void @Longtail_DisposeAPI(ptr noundef nonnull %57) #3
  br label %108

108:                                              ; preds = %107, %106
  call void @Longtail_Free(ptr noundef %55) #3
  br label %344

109:                                              ; preds = %85
  %110 = call ptr (...) @Longtail_CreateHPCDCChunkerAPI() #3
  %.not381 = icmp eq ptr %110, null
  br i1 %.not381, label %111, label %127

111:                                              ; preds = %109
  %112 = load ptr, ptr %12, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %112) #3
  %.not382 = icmp eq ptr %66, null
  br i1 %.not382, label %114, label %113

113:                                              ; preds = %111
  call void @Longtail_DisposeAPI(ptr noundef nonnull %66) #3
  br label %114

114:                                              ; preds = %113, %111
  %.not383 = icmp eq ptr %.0310, null
  br i1 %.not383, label %116, label %115

115:                                              ; preds = %114
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0310) #3
  br label %116

116:                                              ; preds = %115, %114
  %.not384 = icmp eq ptr %.0309, null
  br i1 %.not384, label %118, label %117

117:                                              ; preds = %116
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0309) #3
  br label %118

118:                                              ; preds = %117, %116
  %.not385 = icmp eq ptr %61, null
  br i1 %.not385, label %120, label %119

119:                                              ; preds = %118
  call void @Longtail_DisposeAPI(ptr noundef nonnull %61) #3
  br label %120

120:                                              ; preds = %119, %118
  %.not386 = icmp eq ptr %60, null
  br i1 %.not386, label %122, label %121

121:                                              ; preds = %120
  call void @Longtail_DisposeAPI(ptr noundef nonnull %60) #3
  br label %122

122:                                              ; preds = %121, %120
  %.not387 = icmp eq ptr %59, null
  br i1 %.not387, label %124, label %123

123:                                              ; preds = %122
  call void @Longtail_DisposeAPI(ptr noundef nonnull %59) #3
  br label %124

124:                                              ; preds = %123, %122
  call void @Longtail_DisposeAPI(ptr noundef nonnull %58) #3
  %.not389 = icmp eq ptr %57, null
  br i1 %.not389, label %126, label %125

125:                                              ; preds = %124
  call void @Longtail_DisposeAPI(ptr noundef nonnull %57) #3
  br label %126

126:                                              ; preds = %125, %124
  call void @Longtail_Free(ptr noundef %55) #3
  br label %344

127:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #3
  store ptr null, ptr %14, align 8, !tbaa !17
  %.not390 = icmp eq ptr %4, null
  br i1 %.not390, label %.thread, label %128

128:                                              ; preds = %127
  %129 = call i32 @Longtail_ReadVersionIndex(ptr noundef %60, ptr noundef nonnull %4, ptr noundef nonnull %14) #3
  %.not391 = icmp eq i32 %129, 0
  br i1 %.not391, label %131, label %130

130:                                              ; preds = %128
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.69, ptr noundef nonnull @__func__.DownSync, i32 noundef 1336, ptr noundef nonnull %11, i32 noundef 2, ptr noundef nonnull @.str.72, ptr noundef nonnull %4, i32 noundef %129) #3
  br label %131

131:                                              ; preds = %128, %130
  %.pr = load ptr, ptr %14, align 8, !tbaa !17
  %132 = icmp eq ptr %.pr, null
  br i1 %132, label %.thread, label %185

.thread:                                          ; preds = %127, %131
  %.pn = load ptr, ptr %12, align 8, !tbaa !17
  %.in.in = getelementptr inbounds i8, ptr %.pn, i64 16
  %.in = load ptr, ptr %.in.in, align 8, !tbaa !25
  %133 = load i32, ptr %.in, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #3
  %134 = call i32 @Longtail_GetFilesRecursively2(ptr noundef %60, ptr noundef %57, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef %3, ptr noundef nonnull %15) #3
  %.not392 = icmp eq i32 %134, 0
  br i1 %.not392, label %149, label %135

135:                                              ; preds = %.thread
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.69, ptr noundef nonnull @__func__.DownSync, i32 noundef 1355, ptr noundef nonnull %11, i32 noundef 3, ptr noundef nonnull @.str.85, ptr noundef %3, i32 noundef %134) #3
  %136 = load ptr, ptr %12, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %136) #3
  call void @Longtail_DisposeAPI(ptr noundef nonnull %110) #3
  %.not403 = icmp eq ptr %66, null
  br i1 %.not403, label %138, label %137

137:                                              ; preds = %135
  call void @Longtail_DisposeAPI(ptr noundef nonnull %66) #3
  br label %138

138:                                              ; preds = %137, %135
  %.not404 = icmp eq ptr %.0310, null
  br i1 %.not404, label %140, label %139

139:                                              ; preds = %138
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0310) #3
  br label %140

140:                                              ; preds = %139, %138
  %.not405 = icmp eq ptr %.0309, null
  br i1 %.not405, label %142, label %141

141:                                              ; preds = %140
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0309) #3
  br label %142

142:                                              ; preds = %141, %140
  %.not406 = icmp eq ptr %61, null
  br i1 %.not406, label %144, label %143

143:                                              ; preds = %142
  call void @Longtail_DisposeAPI(ptr noundef nonnull %61) #3
  br label %144

144:                                              ; preds = %143, %142
  %.not407 = icmp eq ptr %60, null
  br i1 %.not407, label %146, label %145

145:                                              ; preds = %144
  call void @Longtail_DisposeAPI(ptr noundef nonnull %60) #3
  br label %146

146:                                              ; preds = %145, %144
  %.not408 = icmp eq ptr %59, null
  br i1 %.not408, label %148, label %147

147:                                              ; preds = %146
  call void @Longtail_DisposeAPI(ptr noundef nonnull %59) #3
  br label %148

148:                                              ; preds = %147, %146
  call void @Longtail_DisposeAPI(ptr noundef nonnull %58) #3
  %.not410 = icmp eq ptr %57, null
  br i1 %.not410, label %.thread475, label %.thread475.sink.split

149:                                              ; preds = %.thread
  %150 = load ptr, ptr %15, align 8, !tbaa !17
  %151 = load i32, ptr %150, align 8, !tbaa !26
  %152 = zext i32 %151 to i64
  %153 = shl nuw nsw i64 %152, 2
  %154 = call ptr @Longtail_Alloc(ptr noundef null, i64 noundef %153) #3
  %155 = load ptr, ptr %15, align 8, !tbaa !17
  %156 = load i32, ptr %155, align 8, !tbaa !26
  %.not488 = icmp eq i32 %156, 0
  br i1 %.not488, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %149
  %157 = call ptr @MakeProgressAPI(ptr noundef nonnull @.str.74, i32 noundef 5)
  %.not393 = icmp eq ptr %157, null
  br i1 %.not393, label %166, label %162

.lr.ph:                                           ; preds = %149, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %149 ]
  %158 = getelementptr inbounds i32, ptr %154, i64 %indvars.iv
  store i32 0, ptr %158, align 4, !tbaa !21
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %159 = load i32, ptr %155, align 8, !tbaa !26
  %160 = zext i32 %159 to i64
  %161 = icmp ult i64 %indvars.iv.next, %160
  br i1 %161, label %.lr.ph, label %._crit_edge, !llvm.loop !28

162:                                              ; preds = %._crit_edge
  %163 = load ptr, ptr %13, align 8, !tbaa !17
  %164 = load ptr, ptr %15, align 8, !tbaa !17
  %165 = call i32 @Longtail_CreateVersionIndex(ptr noundef %60, ptr noundef %163, ptr noundef nonnull %110, ptr noundef %57, ptr noundef nonnull %157, ptr noundef null, ptr noundef null, ptr noundef %3, ptr noundef %164, ptr noundef %154, i32 noundef %133, i32 noundef %6, ptr noundef nonnull %14) #3
  call void @Longtail_DisposeAPI(ptr noundef nonnull %157) #3
  br label %166

166:                                              ; preds = %._crit_edge, %162
  %.0313 = phi i32 [ %165, %162 ], [ 12, %._crit_edge ]
  call void @Longtail_Free(ptr noundef %154) #3
  %167 = load ptr, ptr %15, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %167) #3
  %.not394 = icmp eq i32 %.0313, 0
  br i1 %.not394, label %184, label %168

168:                                              ; preds = %166
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.69, ptr noundef nonnull @__func__.DownSync, i32 noundef 1403, ptr noundef nonnull %11, i32 noundef 3, ptr noundef nonnull @.str.75, ptr noundef %3, i32 noundef %.0313) #3
  %169 = load ptr, ptr %12, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %169) #3
  call void @Longtail_DisposeAPI(ptr noundef nonnull %110) #3
  %.not395 = icmp eq ptr %66, null
  br i1 %.not395, label %171, label %170

170:                                              ; preds = %168
  call void @Longtail_DisposeAPI(ptr noundef nonnull %66) #3
  br label %171

171:                                              ; preds = %170, %168
  %.not396 = icmp eq ptr %.0310, null
  br i1 %.not396, label %173, label %172

172:                                              ; preds = %171
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0310) #3
  br label %173

173:                                              ; preds = %172, %171
  %.not397 = icmp eq ptr %.0309, null
  br i1 %.not397, label %175, label %174

174:                                              ; preds = %173
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0309) #3
  br label %175

175:                                              ; preds = %174, %173
  %.not398 = icmp eq ptr %61, null
  br i1 %.not398, label %177, label %176

176:                                              ; preds = %175
  call void @Longtail_DisposeAPI(ptr noundef nonnull %61) #3
  br label %177

177:                                              ; preds = %176, %175
  %.not399 = icmp eq ptr %60, null
  br i1 %.not399, label %179, label %178

178:                                              ; preds = %177
  call void @Longtail_DisposeAPI(ptr noundef nonnull %60) #3
  br label %179

179:                                              ; preds = %178, %177
  %.not400 = icmp eq ptr %59, null
  br i1 %.not400, label %181, label %180

180:                                              ; preds = %179
  call void @Longtail_DisposeAPI(ptr noundef nonnull %59) #3
  br label %181

181:                                              ; preds = %180, %179
  %.not401 = icmp eq ptr %58, null
  br i1 %.not401, label %183, label %182

182:                                              ; preds = %181
  call void @Longtail_DisposeAPI(ptr noundef nonnull %58) #3
  br label %183

183:                                              ; preds = %182, %181
  %.not402 = icmp eq ptr %57, null
  br i1 %.not402, label %.thread475, label %.thread475.sink.split

.thread475.sink.split:                            ; preds = %183, %148
  %.1.ph.ph = phi i32 [ %134, %148 ], [ %.0313, %183 ]
  call void @Longtail_DisposeAPI(ptr noundef nonnull %57) #3
  br label %.thread475

.thread475:                                       ; preds = %.thread475.sink.split, %183, %148
  %.1.ph = phi i32 [ %134, %148 ], [ %.0313, %183 ], [ %.1.ph.ph, %.thread475.sink.split ]
  call void @Longtail_Free(ptr noundef %55) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #3
  br label %343

184:                                              ; preds = %166
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #3
  %.pre = load ptr, ptr %14, align 8, !tbaa !17
  br label %185

185:                                              ; preds = %184, %131
  %186 = phi ptr [ %.pre, %184 ], [ %.pr, %131 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #3
  %187 = load ptr, ptr %13, align 8, !tbaa !17
  %188 = load ptr, ptr %12, align 8, !tbaa !17
  %189 = call i32 @Longtail_CreateVersionDiff(ptr noundef %187, ptr noundef %186, ptr noundef %188, ptr noundef nonnull %16) #3
  %.not411 = icmp eq i32 %189, 0
  br i1 %.not411, label %209, label %190

190:                                              ; preds = %185
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.69, ptr noundef nonnull @__func__.DownSync, i32 noundef 1427, ptr noundef nonnull %11, i32 noundef 3, ptr noundef nonnull @.str.86, ptr noundef %2, ptr noundef %3, i32 noundef %189) #3
  %191 = load ptr, ptr %14, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %191) #3
  %192 = load ptr, ptr %12, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %192) #3
  call void @Longtail_DisposeAPI(ptr noundef nonnull %110) #3
  %.not451 = icmp eq ptr %66, null
  br i1 %.not451, label %194, label %193

193:                                              ; preds = %190
  call void @Longtail_DisposeAPI(ptr noundef nonnull %66) #3
  br label %194

194:                                              ; preds = %193, %190
  %.not452 = icmp eq ptr %.0310, null
  br i1 %.not452, label %196, label %195

195:                                              ; preds = %194
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0310) #3
  br label %196

196:                                              ; preds = %195, %194
  %.not453 = icmp eq ptr %.0309, null
  br i1 %.not453, label %198, label %197

197:                                              ; preds = %196
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0309) #3
  br label %198

198:                                              ; preds = %197, %196
  %.not454 = icmp eq ptr %61, null
  br i1 %.not454, label %200, label %199

199:                                              ; preds = %198
  call void @Longtail_DisposeAPI(ptr noundef nonnull %61) #3
  br label %200

200:                                              ; preds = %199, %198
  %.not455 = icmp eq ptr %60, null
  br i1 %.not455, label %202, label %201

201:                                              ; preds = %200
  call void @Longtail_DisposeAPI(ptr noundef nonnull %60) #3
  br label %202

202:                                              ; preds = %201, %200
  %.not456 = icmp eq ptr %59, null
  br i1 %.not456, label %204, label %203

203:                                              ; preds = %202
  call void @Longtail_DisposeAPI(ptr noundef nonnull %59) #3
  br label %204

204:                                              ; preds = %203, %202
  %.not457 = icmp eq ptr %58, null
  br i1 %.not457, label %206, label %205

205:                                              ; preds = %204
  call void @Longtail_DisposeAPI(ptr noundef nonnull %58) #3
  br label %206

206:                                              ; preds = %205, %204
  %.not458 = icmp eq ptr %57, null
  br i1 %.not458, label %208, label %207

207:                                              ; preds = %206
  call void @Longtail_DisposeAPI(ptr noundef nonnull %57) #3
  br label %208

208:                                              ; preds = %207, %206
  call void @Longtail_Free(ptr noundef %55) #3
  br label %342

209:                                              ; preds = %185
  %210 = load ptr, ptr %16, align 8, !tbaa !17
  %211 = load ptr, ptr %210, align 8, !tbaa !30
  %212 = load i32, ptr %211, align 4, !tbaa !21
  %213 = icmp eq i32 %212, 0
  br i1 %213, label %214, label %249

214:                                              ; preds = %209
  %215 = getelementptr inbounds i8, ptr %210, i64 16
  %216 = load ptr, ptr %215, align 8, !tbaa !32
  %217 = load i32, ptr %216, align 4, !tbaa !21
  %218 = icmp eq i32 %217, 0
  br i1 %218, label %219, label %249

219:                                              ; preds = %214
  %220 = getelementptr inbounds i8, ptr %210, i64 8
  %221 = load ptr, ptr %220, align 8, !tbaa !33
  %222 = load i32, ptr %221, align 4, !tbaa !21
  %223 = icmp eq i32 %222, 0
  br i1 %223, label %224, label %249

224:                                              ; preds = %219
  %225 = getelementptr inbounds i8, ptr %210, i64 24
  %226 = load ptr, ptr %225, align 8, !tbaa !34
  %227 = load i32, ptr %226, align 4, !tbaa !21
  %228 = icmp ne i32 %227, 0
  %229 = icmp ne i32 %5, 0
  %or.cond = and i1 %229, %228
  br i1 %or.cond, label %249, label %230

230:                                              ; preds = %224
  call void @Longtail_Free(ptr noundef nonnull %210) #3
  %231 = load ptr, ptr %14, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %231) #3
  %232 = load ptr, ptr %12, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %232) #3
  call void @Longtail_DisposeAPI(ptr noundef nonnull %110) #3
  %.not412 = icmp eq ptr %66, null
  br i1 %.not412, label %234, label %233

233:                                              ; preds = %230
  call void @Longtail_DisposeAPI(ptr noundef nonnull %66) #3
  br label %234

234:                                              ; preds = %233, %230
  %.not413 = icmp eq ptr %.0310, null
  br i1 %.not413, label %236, label %235

235:                                              ; preds = %234
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0310) #3
  br label %236

236:                                              ; preds = %235, %234
  %.not414 = icmp eq ptr %.0309, null
  br i1 %.not414, label %238, label %237

237:                                              ; preds = %236
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0309) #3
  br label %238

238:                                              ; preds = %237, %236
  %.not415 = icmp eq ptr %61, null
  br i1 %.not415, label %240, label %239

239:                                              ; preds = %238
  call void @Longtail_DisposeAPI(ptr noundef nonnull %61) #3
  br label %240

240:                                              ; preds = %239, %238
  %.not416 = icmp eq ptr %60, null
  br i1 %.not416, label %242, label %241

241:                                              ; preds = %240
  call void @Longtail_DisposeAPI(ptr noundef nonnull %60) #3
  br label %242

242:                                              ; preds = %241, %240
  %.not417 = icmp eq ptr %59, null
  br i1 %.not417, label %244, label %243

243:                                              ; preds = %242
  call void @Longtail_DisposeAPI(ptr noundef nonnull %59) #3
  br label %244

244:                                              ; preds = %243, %242
  %.not418 = icmp eq ptr %58, null
  br i1 %.not418, label %246, label %245

245:                                              ; preds = %244
  call void @Longtail_DisposeAPI(ptr noundef nonnull %58) #3
  br label %246

246:                                              ; preds = %245, %244
  %.not419 = icmp eq ptr %57, null
  br i1 %.not419, label %248, label %247

247:                                              ; preds = %246
  call void @Longtail_DisposeAPI(ptr noundef nonnull %57) #3
  br label %248

248:                                              ; preds = %247, %246
  call void @Longtail_Free(ptr noundef %55) #3
  br label %342

249:                                              ; preds = %224, %219, %214, %209
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #3
  %250 = load ptr, ptr %12, align 8, !tbaa !17
  %251 = getelementptr inbounds i8, ptr %250, i64 32
  %252 = load ptr, ptr %251, align 8, !tbaa !35
  %253 = load i32, ptr %252, align 4, !tbaa !21
  %254 = zext i32 %253 to i64
  %255 = shl nuw nsw i64 %254, 3
  %256 = call ptr @Longtail_Alloc(ptr noundef null, i64 noundef %255) #3
  %257 = load ptr, ptr %12, align 8, !tbaa !17
  %258 = load ptr, ptr %16, align 8, !tbaa !17
  %259 = call i32 @Longtail_GetRequiredChunkHashes(ptr noundef %257, ptr noundef %258, ptr noundef nonnull %17, ptr noundef %256) #3
  %.not420 = icmp eq i32 %259, 0
  br i1 %.not420, label %280, label %260

260:                                              ; preds = %249
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.69, ptr noundef nonnull @__func__.DownSync, i32 noundef 1473, ptr noundef nonnull %11, i32 noundef 3, ptr noundef nonnull @.str.87, ptr noundef %2, i32 noundef %259) #3
  call void @Longtail_Free(ptr noundef %256) #3
  %261 = load ptr, ptr %16, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %261) #3
  %262 = load ptr, ptr %14, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %262) #3
  %263 = load ptr, ptr %12, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %263) #3
  call void @Longtail_DisposeAPI(ptr noundef nonnull %110) #3
  %.not443 = icmp eq ptr %66, null
  br i1 %.not443, label %265, label %264

264:                                              ; preds = %260
  call void @Longtail_DisposeAPI(ptr noundef nonnull %66) #3
  br label %265

265:                                              ; preds = %264, %260
  %.not444 = icmp eq ptr %.0310, null
  br i1 %.not444, label %267, label %266

266:                                              ; preds = %265
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0310) #3
  br label %267

267:                                              ; preds = %266, %265
  %.not445 = icmp eq ptr %.0309, null
  br i1 %.not445, label %269, label %268

268:                                              ; preds = %267
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0309) #3
  br label %269

269:                                              ; preds = %268, %267
  %.not446 = icmp eq ptr %61, null
  br i1 %.not446, label %271, label %270

270:                                              ; preds = %269
  call void @Longtail_DisposeAPI(ptr noundef nonnull %61) #3
  br label %271

271:                                              ; preds = %270, %269
  %.not447 = icmp eq ptr %60, null
  br i1 %.not447, label %273, label %272

272:                                              ; preds = %271
  call void @Longtail_DisposeAPI(ptr noundef nonnull %60) #3
  br label %273

273:                                              ; preds = %272, %271
  %.not448 = icmp eq ptr %59, null
  br i1 %.not448, label %275, label %274

274:                                              ; preds = %273
  call void @Longtail_DisposeAPI(ptr noundef nonnull %59) #3
  br label %275

275:                                              ; preds = %274, %273
  %.not449 = icmp eq ptr %58, null
  br i1 %.not449, label %277, label %276

276:                                              ; preds = %275
  call void @Longtail_DisposeAPI(ptr noundef nonnull %58) #3
  br label %277

277:                                              ; preds = %276, %275
  %.not450 = icmp eq ptr %57, null
  br i1 %.not450, label %279, label %278

278:                                              ; preds = %277
  call void @Longtail_DisposeAPI(ptr noundef nonnull %57) #3
  br label %279

279:                                              ; preds = %278, %277
  call void @Longtail_Free(ptr noundef %55) #3
  br label %341

280:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #3
  %281 = load i32, ptr %17, align 4, !tbaa !21
  %282 = call i32 @SyncGetExistingContent(ptr noundef %66, i32 noundef %281, ptr noundef %256, i32 noundef 0, ptr noundef nonnull %18)
  %.not421 = icmp eq i32 %282, 0
  br i1 %.not421, label %301, label %283

283:                                              ; preds = %280
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.69, ptr noundef nonnull @__func__.DownSync, i32 noundef 1500, ptr noundef nonnull %11, i32 noundef 3, ptr noundef nonnull @.str.88, ptr noundef %0, i32 noundef %282) #3
  call void @Longtail_Free(ptr noundef %256) #3
  %284 = load ptr, ptr %16, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %284) #3
  %285 = load ptr, ptr %14, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %285) #3
  %286 = load ptr, ptr %12, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %286) #3
  call void @Longtail_DisposeAPI(ptr noundef nonnull %110) #3
  %.not435 = icmp eq ptr %66, null
  br i1 %.not435, label %288, label %287

287:                                              ; preds = %283
  call void @Longtail_DisposeAPI(ptr noundef nonnull %66) #3
  br label %288

288:                                              ; preds = %287, %283
  %.not436 = icmp eq ptr %.0310, null
  br i1 %.not436, label %290, label %289

289:                                              ; preds = %288
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0310) #3
  br label %290

290:                                              ; preds = %289, %288
  %.not437 = icmp eq ptr %.0309, null
  br i1 %.not437, label %292, label %291

291:                                              ; preds = %290
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0309) #3
  br label %292

292:                                              ; preds = %291, %290
  %.not438 = icmp eq ptr %61, null
  br i1 %.not438, label %294, label %293

293:                                              ; preds = %292
  call void @Longtail_DisposeAPI(ptr noundef nonnull %61) #3
  br label %294

294:                                              ; preds = %293, %292
  %.not439 = icmp eq ptr %60, null
  br i1 %.not439, label %296, label %295

295:                                              ; preds = %294
  call void @Longtail_DisposeAPI(ptr noundef nonnull %60) #3
  br label %296

296:                                              ; preds = %295, %294
  %.not440 = icmp eq ptr %59, null
  br i1 %.not440, label %298, label %297

297:                                              ; preds = %296
  call void @Longtail_DisposeAPI(ptr noundef nonnull %59) #3
  br label %298

298:                                              ; preds = %297, %296
  %.not441 = icmp eq ptr %58, null
  br i1 %.not441, label %300, label %299

299:                                              ; preds = %298
  call void @Longtail_DisposeAPI(ptr noundef nonnull %58) #3
  br label %300

300:                                              ; preds = %299, %298
  %.not442 = icmp eq ptr %57, null
  br i1 %.not442, label %340, label %.sink.split

301:                                              ; preds = %280
  call void @Longtail_Free(ptr noundef %256) #3
  %.not422 = icmp eq i32 %8, 0
  br i1 %.not422, label %306, label %302

302:                                              ; preds = %301
  %303 = load ptr, ptr %18, align 8, !tbaa !17
  %304 = load ptr, ptr %12, align 8, !tbaa !17
  %305 = load ptr, ptr %16, align 8, !tbaa !17
  call void @InitMonitor(ptr noundef %303, ptr noundef %304, ptr noundef %305)
  br label %306

306:                                              ; preds = %302, %301
  %307 = phi i32 [ 0, %302 ], [ 5, %301 ]
  %308 = call ptr @MakeProgressAPI(ptr noundef nonnull @.str.89, i32 noundef %307)
  %.not423 = icmp eq ptr %308, null
  br i1 %.not423, label %.thread479, label %309

309:                                              ; preds = %306
  %310 = load ptr, ptr %12, align 8, !tbaa !17
  %311 = load ptr, ptr %16, align 8, !tbaa !17
  %312 = call ptr @Longtail_CreateConcurrentChunkWriteAPI(ptr noundef %60, ptr noundef %310, ptr noundef %311, ptr noundef %3) #3
  %.not424 = icmp eq ptr %312, null
  br i1 %.not424, label %.thread484, label %313

.thread484:                                       ; preds = %309
  call void @Longtail_DisposeAPI(ptr noundef nonnull %308) #3
  br label %.thread479

313:                                              ; preds = %309
  %314 = load ptr, ptr %13, align 8, !tbaa !17
  %315 = load ptr, ptr %18, align 8, !tbaa !17
  %316 = load ptr, ptr %14, align 8, !tbaa !17
  %317 = load ptr, ptr %12, align 8, !tbaa !17
  %318 = load ptr, ptr %16, align 8, !tbaa !17
  %.not425 = icmp ne i32 %5, 0
  %319 = zext i1 %.not425 to i32
  %320 = call i32 @Longtail_ChangeVersion2(ptr noundef %66, ptr noundef %60, ptr noundef nonnull %312, ptr noundef %314, ptr noundef %57, ptr noundef nonnull %308, ptr noundef null, ptr noundef null, ptr noundef %315, ptr noundef %316, ptr noundef %317, ptr noundef %318, ptr noundef %3, i32 noundef %319) #3
  call void @Longtail_DisposeAPI(ptr noundef nonnull %312) #3
  call void @Longtail_DisposeAPI(ptr noundef nonnull %308) #3
  %.not426 = icmp eq i32 %320, 0
  br i1 %.not426, label %321, label %.thread479

.thread479:                                       ; preds = %306, %.thread484, %313
  %.2315482 = phi i32 [ %320, %313 ], [ 12, %.thread484 ], [ 12, %306 ]
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str.69, ptr noundef nonnull @__func__.DownSync, i32 noundef 1562, ptr noundef nonnull %11, i32 noundef 3, ptr noundef nonnull @.str.90, ptr noundef %3, ptr noundef %2, ptr noundef %0, i32 noundef %.2315482) #3
  br label %321

321:                                              ; preds = %.thread479, %313
  %.2315483 = phi i32 [ %.2315482, %.thread479 ], [ 0, %313 ]
  %322 = load ptr, ptr %18, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %322) #3
  %323 = load ptr, ptr %16, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %323) #3
  %324 = load ptr, ptr %14, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %324) #3
  %325 = load ptr, ptr %12, align 8, !tbaa !17
  call void @Longtail_Free(ptr noundef %325) #3
  call void @Longtail_DisposeAPI(ptr noundef nonnull %110) #3
  %.not427 = icmp eq ptr %66, null
  br i1 %.not427, label %327, label %326

326:                                              ; preds = %321
  call void @Longtail_DisposeAPI(ptr noundef nonnull %66) #3
  br label %327

327:                                              ; preds = %326, %321
  %.not428 = icmp eq ptr %.0310, null
  br i1 %.not428, label %329, label %328

328:                                              ; preds = %327
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0310) #3
  br label %329

329:                                              ; preds = %328, %327
  %.not429 = icmp eq ptr %.0309, null
  br i1 %.not429, label %331, label %330

330:                                              ; preds = %329
  call void @Longtail_DisposeAPI(ptr noundef nonnull %.0309) #3
  br label %331

331:                                              ; preds = %330, %329
  %.not430 = icmp eq ptr %61, null
  br i1 %.not430, label %333, label %332

332:                                              ; preds = %331
  call void @Longtail_DisposeAPI(ptr noundef nonnull %61) #3
  br label %333

333:                                              ; preds = %332, %331
  %.not431 = icmp eq ptr %60, null
  br i1 %.not431, label %335, label %334

334:                                              ; preds = %333
  call void @Longtail_DisposeAPI(ptr noundef nonnull %60) #3
  br label %335

335:                                              ; preds = %334, %333
  %.not432 = icmp eq ptr %59, null
  br i1 %.not432, label %337, label %336

336:                                              ; preds = %335
  call void @Longtail_DisposeAPI(ptr noundef nonnull %59) #3
  br label %337

337:                                              ; preds = %336, %335
  %.not433 = icmp eq ptr %58, null
  br i1 %.not433, label %339, label %338

338:                                              ; preds = %337
  call void @Longtail_DisposeAPI(ptr noundef nonnull %58) #3
  br label %339

339:                                              ; preds = %338, %337
  %.not434 = icmp eq ptr %57, null
  br i1 %.not434, label %340, label %.sink.split

.sink.split:                                      ; preds = %339, %300
  %.2.ph = phi i32 [ %282, %300 ], [ %.2315483, %339 ]
  call void @Longtail_DisposeAPI(ptr noundef nonnull %57) #3
  br label %340

340:                                              ; preds = %.sink.split, %339, %300
  %.2 = phi i32 [ %282, %300 ], [ %.2315483, %339 ], [ %.2.ph, %.sink.split ]
  call void @Longtail_Free(ptr noundef %55) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #3
  br label %341

341:                                              ; preds = %340, %279
  %.3 = phi i32 [ %259, %279 ], [ %.2, %340 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #3
  br label %342

342:                                              ; preds = %341, %248, %208
  %.4 = phi i32 [ %189, %208 ], [ %.3, %341 ], [ 0, %248 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #3
  br label %343

343:                                              ; preds = %.thread475, %342
  %.5 = phi i32 [ %.4, %342 ], [ %.1.ph, %.thread475 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #3
  br label %344

344:                                              ; preds = %126, %343, %108
  %.7 = phi i32 [ %92, %108 ], [ %.5, %343 ], [ 12, %126 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #3
  br label %345

345:                                              ; preds = %344, %84
  %.8 = phi i32 [ %67, %84 ], [ %.7, %344 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 216, ptr nonnull %10) #3
  ret i32 %.8
}

declare ptr @Longtail_CreateCacheBlockStoreAPI(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @Longtail_CreateVersionDiff(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @Longtail_GetRequiredChunkHashes(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @Longtail_CreateConcurrentChunkWriteAPI(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @Longtail_ChangeVersion2(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = !{!7, !7, i64 0}
!18 = !{!19, !7, i64 8}
!19 = !{!"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, !20, i64 128, !7, i64 136, !7, i64 144}
!20 = !{!"int", !8, i64 0}
!21 = !{!20, !20, i64 0}
!22 = !{!23, !7, i64 8}
!23 = !{!"Longtail_HashRegistryAPI", !24, i64 0, !7, i64 8}
!24 = !{!"Longtail_API", !7, i64 0}
!25 = !{!19, !7, i64 16}
!26 = !{!27, !20, i64 0}
!27 = !{!"Longtail_FileInfos", !20, i64 0, !20, i64 4, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!31, !7, i64 0}
!31 = !{!"Longtail_VersionDiff", !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}
!32 = !{!31, !7, i64 16}
!33 = !{!31, !7, i64 8}
!34 = !{!31, !7, i64 24}
!35 = !{!19, !7, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass