; LLVM IR from TobiasKozel/VAE :: external/tracy/common (tracy_lz4)

; 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.tracy::LZ4_stream_t_internal" = type { [4096 x i32], i32, i32, ptr, ptr, i32 }

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

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5tracy26LZ4_compress_fast_continueEPNS_12LZ4_stream_uEPKcPciii(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) #2 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 2, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %20, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %21 = load ptr, ptr %15, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %21, i32 0, i32 3
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %24 = load ptr, ptr %15, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %24, i32 0, i32 5
  %26 = load i32, ptr %25, align 8, !tbaa !15
  %27 = zext i32 %26 to i64
  %28 = getelementptr inbounds i8, ptr %23, i64 %27
  store ptr %28, ptr %16, align 8, !tbaa !5
  %29 = load ptr, ptr %15, align 8, !tbaa !5
  %30 = load i32, ptr %11, align 4, !tbaa !9
  call void @_ZN5tracyL15LZ4_renormDictTEPNS_21LZ4_stream_t_internalEi(ptr noundef %29, i32 noundef %30)
  %31 = load i32, ptr %13, align 4, !tbaa !9
  %32 = icmp slt i32 %31, 1
  br i1 %32, label %33, label %34

33:                                               ; preds = %6
  store i32 1, ptr %13, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %33, %6
  %35 = load i32, ptr %13, align 4, !tbaa !9
  %36 = icmp sgt i32 %35, 65537
  br i1 %36, label %37, label %38

37:                                               ; preds = %34
  store i32 65537, ptr %13, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %37, %34
  %39 = load ptr, ptr %15, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %39, i32 0, i32 5
  %41 = load i32, ptr %40, align 8, !tbaa !15
  %42 = sub i32 %41, 1
  %43 = icmp ult i32 %42, 3
  br i1 %43, label %44, label %55

44:                                               ; preds = %38
  %45 = load ptr, ptr %16, align 8, !tbaa !5
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = icmp ne ptr %45, %46
  br i1 %47, label %48, label %55

48:                                               ; preds = %44
  %49 = load ptr, ptr %15, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %49, i32 0, i32 5
  store i32 0, ptr %50, align 8, !tbaa !15
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = load ptr, ptr %15, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %52, i32 0, i32 3
  store ptr %51, ptr %53, align 8, !tbaa !13
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %54, ptr %16, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %48, %44, %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i8, ptr %56, i64 %58
  store ptr %59, ptr %17, align 8, !tbaa !5
  %60 = load ptr, ptr %17, align 8, !tbaa !5
  %61 = load ptr, ptr %15, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %61, i32 0, i32 3
  %63 = load ptr, ptr %62, align 8, !tbaa !13
  %64 = icmp ugt ptr %60, %63
  br i1 %64, label %65, label %103

65:                                               ; preds = %55
  %66 = load ptr, ptr %17, align 8, !tbaa !5
  %67 = load ptr, ptr %16, align 8, !tbaa !5
  %68 = icmp ult ptr %66, %67
  br i1 %68, label %69, label %103

69:                                               ; preds = %65
  %70 = load ptr, ptr %16, align 8, !tbaa !5
  %71 = load ptr, ptr %17, align 8, !tbaa !5
  %72 = ptrtoint ptr %70 to i64
  %73 = ptrtoint ptr %71 to i64
  %74 = sub i64 %72, %73
  %75 = trunc i64 %74 to i32
  %76 = load ptr, ptr %15, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %76, i32 0, i32 5
  store i32 %75, ptr %77, align 8, !tbaa !15
  %78 = load ptr, ptr %15, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %78, i32 0, i32 5
  %80 = load i32, ptr %79, align 8, !tbaa !15
  %81 = icmp ugt i32 %80, 65536
  br i1 %81, label %82, label %85

82:                                               ; preds = %69
  %83 = load ptr, ptr %15, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %83, i32 0, i32 5
  store i32 65536, ptr %84, align 8, !tbaa !15
  br label %85

85:                                               ; preds = %82, %69
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %86, i32 0, i32 5
  %88 = load i32, ptr %87, align 8, !tbaa !15
  %89 = icmp ult i32 %88, 4
  br i1 %89, label %90, label %93

90:                                               ; preds = %85
  %91 = load ptr, ptr %15, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %91, i32 0, i32 5
  store i32 0, ptr %92, align 8, !tbaa !15
  br label %93

93:                                               ; preds = %90, %85
  %94 = load ptr, ptr %16, align 8, !tbaa !5
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %95, i32 0, i32 5
  %97 = load i32, ptr %96, align 8, !tbaa !15
  %98 = zext i32 %97 to i64
  %99 = sub i64 0, %98
  %100 = getelementptr inbounds i8, ptr %94, i64 %99
  %101 = load ptr, ptr %15, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %101, i32 0, i32 3
  store ptr %100, ptr %102, align 8, !tbaa !13
  br label %103

103:                                              ; preds = %93, %65, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = icmp eq ptr %104, %105
  br i1 %106, label %107, label %136

107:                                              ; preds = %103
  %108 = load ptr, ptr %15, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %108, i32 0, i32 5
  %110 = load i32, ptr %109, align 8, !tbaa !15
  %111 = icmp ult i32 %110, 65536
  br i1 %111, label %112, label %128

112:                                              ; preds = %107
  %113 = load ptr, ptr %15, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %113, i32 0, i32 5
  %115 = load i32, ptr %114, align 8, !tbaa !15
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %116, i32 0, i32 1
  %118 = load i32, ptr %117, align 8, !tbaa !16
  %119 = icmp ult i32 %115, %118
  br i1 %119, label %120, label %128

120:                                              ; preds = %112
  %121 = load ptr, ptr %15, align 8, !tbaa !5
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = load i32, ptr %11, align 4, !tbaa !9
  %125 = load i32, ptr %12, align 4, !tbaa !9
  %126 = load i32, ptr %13, align 4, !tbaa !9
  %127 = call noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef %121, ptr noundef %122, ptr noundef %123, i32 noundef %124, ptr noundef null, i32 noundef %125, i32 noundef 1, i32 noundef 2, i32 noundef 1, i32 noundef 1, i32 noundef %126)
  store i32 %127, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %203

128:                                              ; preds = %112, %107
  %129 = load ptr, ptr %15, align 8, !tbaa !5
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = load i32, ptr %11, align 4, !tbaa !9
  %133 = load i32, ptr %12, align 4, !tbaa !9
  %134 = load i32, ptr %13, align 4, !tbaa !9
  %135 = call noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef %129, ptr noundef %130, ptr noundef %131, i32 noundef %132, ptr noundef null, i32 noundef %133, i32 noundef 1, i32 noundef 2, i32 noundef 1, i32 noundef 0, i32 noundef %134)
  store i32 %135, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %203

136:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %137 = load ptr, ptr %15, align 8, !tbaa !5
  %138 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %137, i32 0, i32 4
  %139 = load ptr, ptr %138, align 8, !tbaa !17
  %140 = icmp ne ptr %139, null
  br i1 %140, label %141, label %165

141:                                              ; preds = %136
  %142 = load i32, ptr %11, align 4, !tbaa !9
  %143 = icmp sgt i32 %142, 4096
  br i1 %143, label %144, label %156

144:                                              ; preds = %141
  %145 = load ptr, ptr %15, align 8, !tbaa !5
  %146 = load ptr, ptr %15, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %146, i32 0, i32 4
  %148 = load ptr, ptr %147, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %145, ptr align 8 %148, i64 16416, i1 false)
  %149 = load ptr, ptr %15, align 8, !tbaa !5
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  %152 = load i32, ptr %11, align 4, !tbaa !9
  %153 = load i32, ptr %12, align 4, !tbaa !9
  %154 = load i32, ptr %13, align 4, !tbaa !9
  %155 = call noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef %149, ptr noundef %150, ptr noundef %151, i32 noundef %152, ptr noundef null, i32 noundef %153, i32 noundef 1, i32 noundef 2, i32 noundef 2, i32 noundef 0, i32 noundef %154)
  store i32 %155, ptr %19, align 4, !tbaa !9
  br label %164

156:                                              ; preds = %141
  %157 = load ptr, ptr %15, align 8, !tbaa !5
  %158 = load ptr, ptr %9, align 8, !tbaa !5
  %159 = load ptr, ptr %10, align 8, !tbaa !5
  %160 = load i32, ptr %11, align 4, !tbaa !9
  %161 = load i32, ptr %12, align 4, !tbaa !9
  %162 = load i32, ptr %13, align 4, !tbaa !9
  %163 = call noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef %157, ptr noundef %158, ptr noundef %159, i32 noundef %160, ptr noundef null, i32 noundef %161, i32 noundef 1, i32 noundef 2, i32 noundef 3, i32 noundef 0, i32 noundef %162)
  store i32 %163, ptr %19, align 4, !tbaa !9
  br label %164

164:                                              ; preds = %156, %144
  br label %195

165:                                              ; preds = %136
  %166 = load ptr, ptr %15, align 8, !tbaa !5
  %167 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %166, i32 0, i32 5
  %168 = load i32, ptr %167, align 8, !tbaa !15
  %169 = icmp ult i32 %168, 65536
  br i1 %169, label %170, label %186

170:                                              ; preds = %165
  %171 = load ptr, ptr %15, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %171, i32 0, i32 5
  %173 = load i32, ptr %172, align 8, !tbaa !15
  %174 = load ptr, ptr %15, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %174, i32 0, i32 1
  %176 = load i32, ptr %175, align 8, !tbaa !16
  %177 = icmp ult i32 %173, %176
  br i1 %177, label %178, label %186

178:                                              ; preds = %170
  %179 = load ptr, ptr %15, align 8, !tbaa !5
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  %181 = load ptr, ptr %10, align 8, !tbaa !5
  %182 = load i32, ptr %11, align 4, !tbaa !9
  %183 = load i32, ptr %12, align 4, !tbaa !9
  %184 = load i32, ptr %13, align 4, !tbaa !9
  %185 = call noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef %179, ptr noundef %180, ptr noundef %181, i32 noundef %182, ptr noundef null, i32 noundef %183, i32 noundef 1, i32 noundef 2, i32 noundef 2, i32 noundef 1, i32 noundef %184)
  store i32 %185, ptr %19, align 4, !tbaa !9
  br label %194

186:                                              ; preds = %170, %165
  %187 = load ptr, ptr %15, align 8, !tbaa !5
  %188 = load ptr, ptr %9, align 8, !tbaa !5
  %189 = load ptr, ptr %10, align 8, !tbaa !5
  %190 = load i32, ptr %11, align 4, !tbaa !9
  %191 = load i32, ptr %12, align 4, !tbaa !9
  %192 = load i32, ptr %13, align 4, !tbaa !9
  %193 = call noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef %187, ptr noundef %188, ptr noundef %189, i32 noundef %190, ptr noundef null, i32 noundef %191, i32 noundef 1, i32 noundef 2, i32 noundef 2, i32 noundef 0, i32 noundef %192)
  store i32 %193, ptr %19, align 4, !tbaa !9
  br label %194

194:                                              ; preds = %186, %178
  br label %195

195:                                              ; preds = %194, %164
  %196 = load ptr, ptr %9, align 8, !tbaa !5
  %197 = load ptr, ptr %15, align 8, !tbaa !5
  %198 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %197, i32 0, i32 3
  store ptr %196, ptr %198, align 8, !tbaa !13
  %199 = load i32, ptr %11, align 4, !tbaa !9
  %200 = load ptr, ptr %15, align 8, !tbaa !5
  %201 = getelementptr inbounds %"struct.tracy::LZ4_stream_t_internal", ptr %200, i32 0, i32 5
  store i32 %199, ptr %201, align 8, !tbaa !15
  %202 = load i32, ptr %19, align 4, !tbaa !9
  store i32 %202, ptr %7, align 4
  store i32 1, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %203

203:                                              ; preds = %195, %128, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  %204 = load i32, ptr %7, align 4
  ret i32 %204
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN5tracyL15LZ4_renormDictTEPNS_21LZ4_stream_t_internalEi(ptr noundef, i32 noundef) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN5tracy11tableType_tE", !7, i64 0}
!13 = !{!14, !6, i64 16392}
!14 = !{!"_ZTSN5tracy21LZ4_stream_t_internalE", !7, i64 0, !10, i64 16384, !10, i64 16388, !6, i64 16392, !6, i64 16400, !10, i64 16408}
!15 = !{!14, !10, i64 16408}
!16 = !{!14, !10, i64 16384}
!17 = !{!14, !6, i64 16400}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5tracy26LZ4_compress_fast_continueEPNS_12LZ4_stream_uEPKcPciii(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #1 {
  %7 = getelementptr inbounds i8, ptr %0, i64 16392
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 16408
  %10 = load i32, ptr %9, align 8, !tbaa !11
  %11 = zext i32 %10 to i64
  %12 = getelementptr inbounds i8, ptr %8, i64 %11
  tail call void @_ZN5tracyL15LZ4_renormDictTEPNS_21LZ4_stream_t_internalEi(ptr noundef %0, i32 noundef %3)
  %spec.store.select = tail call i32 @llvm.smax.i32(i32 %5, i32 1)
  %spec.store.select1 = tail call i32 @llvm.umin.i32(i32 %spec.store.select, i32 65537)
  %13 = load i32, ptr %9, align 8, !tbaa !11
  %14 = add i32 %13, -4
  %15 = icmp ult i32 %14, -3
  %.not = icmp eq ptr %12, %1
  %or.cond = select i1 %15, i1 true, i1 %.not
  br i1 %or.cond, label %._crit_edge, label %16

._crit_edge:                                      ; preds = %6
  %.pre = load ptr, ptr %7, align 8, !tbaa !5
  br label %17

16:                                               ; preds = %6
  store i32 0, ptr %9, align 8, !tbaa !11
  store ptr %1, ptr %7, align 8, !tbaa !5
  br label %17

17:                                               ; preds = %._crit_edge, %16
  %18 = phi i32 [ 0, %16 ], [ %13, %._crit_edge ]
  %19 = phi ptr [ %1, %16 ], [ %.pre, %._crit_edge ]
  %.085 = phi ptr [ %1, %16 ], [ %12, %._crit_edge ]
  %20 = sext i32 %3 to i64
  %21 = getelementptr inbounds i8, ptr %1, i64 %20
  %22 = icmp ugt ptr %21, %19
  %23 = icmp ult ptr %21, %.085
  %or.cond96 = select i1 %22, i1 %23, i1 false
  br i1 %or.cond96, label %24, label %33

24:                                               ; preds = %17
  %25 = ptrtoint ptr %.085 to i64
  %26 = ptrtoint ptr %21 to i64
  %27 = sub i64 %25, %26
  %28 = trunc i64 %27 to i32
  %spec.select = tail call i32 @llvm.umin.i32(i32 %28, i32 65536)
  %29 = icmp ult i32 %28, 4
  %storemerge94 = select i1 %29, i32 0, i32 %spec.select
  store i32 %storemerge94, ptr %9, align 8, !tbaa !11
  %30 = zext nneg i32 %storemerge94 to i64
  %31 = sub nsw i64 0, %30
  %32 = getelementptr inbounds i8, ptr %.085, i64 %31
  store ptr %32, ptr %7, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %24, %17
  %34 = phi i32 [ %storemerge94, %24 ], [ %18, %17 ]
  %35 = icmp eq ptr %.085, %1
  br i1 %35, label %36, label %46

36:                                               ; preds = %33
  %37 = icmp ult i32 %34, 65536
  br i1 %37, label %38, label %44

38:                                               ; preds = %36
  %39 = getelementptr inbounds i8, ptr %0, i64 16384
  %40 = load i32, ptr %39, align 8, !tbaa !12
  %41 = icmp ult i32 %34, %40
  br i1 %41, label %42, label %44

42:                                               ; preds = %38
  %43 = tail call noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef null, i32 noundef %4, i32 noundef 1, i32 noundef 2, i32 noundef 1, i32 noundef 1, i32 noundef %spec.store.select1)
  br label %66

44:                                               ; preds = %38, %36
  %45 = tail call noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef null, i32 noundef %4, i32 noundef 1, i32 noundef 2, i32 noundef 1, i32 noundef 0, i32 noundef %spec.store.select1)
  br label %66

46:                                               ; preds = %33
  %47 = getelementptr inbounds i8, ptr %0, i64 16400
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  %.not95 = icmp eq ptr %48, null
  br i1 %.not95, label %55, label %49

49:                                               ; preds = %46
  %50 = icmp sgt i32 %3, 4096
  br i1 %50, label %51, label %53

51:                                               ; preds = %49
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16416) %0, ptr noundef nonnull align 8 dereferenceable(16416) %48, i64 16416, i1 false)
  %52 = tail call noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef null, i32 noundef %4, i32 noundef 1, i32 noundef 2, i32 noundef 2, i32 noundef 0, i32 noundef %spec.store.select1)
  br label %65

53:                                               ; preds = %49
  %54 = tail call noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef null, i32 noundef %4, i32 noundef 1, i32 noundef 2, i32 noundef 3, i32 noundef 0, i32 noundef %spec.store.select1)
  br label %65

55:                                               ; preds = %46
  %56 = icmp ult i32 %34, 65536
  br i1 %56, label %57, label %63

57:                                               ; preds = %55
  %58 = getelementptr inbounds i8, ptr %0, i64 16384
  %59 = load i32, ptr %58, align 8, !tbaa !12
  %60 = icmp ult i32 %34, %59
  br i1 %60, label %61, label %63

61:                                               ; preds = %57
  %62 = tail call noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef null, i32 noundef %4, i32 noundef 1, i32 noundef 2, i32 noundef 2, i32 noundef 1, i32 noundef %spec.store.select1)
  br label %65

63:                                               ; preds = %57, %55
  %64 = tail call noundef i32 @_ZN5tracyL20LZ4_compress_genericEPNS_21LZ4_stream_t_internalEPKcPciPii23limitedOutput_directiveNS_11tableType_tENS_14dict_directiveENS_19dictIssue_directiveEi(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef null, i32 noundef %4, i32 noundef 1, i32 noundef 2, i32 noundef 2, i32 noundef 0, i32 noundef %spec.store.select1)
  br label %65

65:                                               ; preds = %61, %63, %51, %53
  %.0 = phi i32 [ %52, %51 ], [ %54, %53 ], [ %62, %61 ], [ %64, %63 ]
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %9, align 8, !tbaa !11
  br label %66

66:                                               ; preds = %65, %44, %42
  %.084 = phi i32 [ %43, %42 ], [ %45, %44 ], [ %.0, %65 ]
  ret i32 %.084
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN5tracyL15LZ4_renormDictTEPNS_21LZ4_stream_t_internalEi(ptr noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #4

attributes #0 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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, !10, i64 16392}
!6 = !{!"_ZTSN5tracy21LZ4_stream_t_internalE", !7, i64 0, !9, i64 16384, !9, i64 16388, !10, i64 16392, !10, i64 16400, !9, i64 16408}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!6, !9, i64 16408}
!12 = !{!6, !9, i64 16384}
!13 = !{!6, !10, i64 16400}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass