; LLVM IR from intel/qpl :: sources/middle-layer/compression/inflate (deflate_header_decompression)

; 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.inflate_state = type { ptr, i32, i32, ptr, i64, i32, i32, %struct.inflate_huff_code_large, %struct.inflate_huff_code_small, i32, i32, i32, i32, i32, i32, %union.anon, i32, i32, i32, i32, i16, i16, i32, i32, [328 x i8], [65824 x i8] }
%struct.inflate_huff_code_large = type { [4096 x i32], [1264 x i16] }
%struct.inflate_huff_code_small = type { [1024 x i16], [80 x i16] }
%union.anon = type { i32 }

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN3qpl2ml11compression20read_header_statefulER13inflate_state(ptr noundef nonnull align 8 dereferenceable(87368) %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.inflate_state, ptr %13, i32 0, i32 4
  %15 = load i64, ptr %14, align 8, !tbaa !9
  store i64 %15, ptr %4, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.inflate_state, ptr %16, i32 0, i32 6
  %18 = load i32, ptr %17, align 4, !tbaa !18
  store i32 %18, ptr %5, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.inflate_state, ptr %19, i32 0, i32 5
  %21 = load i32, ptr %20, align 8, !tbaa !20
  store i32 %21, ptr %6, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.inflate_state, ptr %22, i32 0, i32 3
  %24 = load ptr, ptr %23, align 8, !tbaa !21
  store ptr %24, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.inflate_state, ptr %25, i32 0, i32 9
  %27 = load i32, ptr %26, align 8, !tbaa !22
  store i32 %27, ptr %8, align 4, !tbaa !23
  %28 = load i32, ptr %8, align 4, !tbaa !23
  %29 = icmp eq i32 1, %28
  br i1 %29, label %30, label %75

30:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.inflate_state, ptr %31, i32 0, i32 21
  %33 = load i16, ptr %32, align 2, !tbaa !24
  %34 = sext i16 %33 to i32
  %35 = sub nsw i32 328, %34
  store i32 %35, ptr %9, align 4, !tbaa !19
  %36 = load i32, ptr %9, align 4, !tbaa !19
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.inflate_state, ptr %37, i32 0, i32 5
  %39 = load i32, ptr %38, align 8, !tbaa !20
  %40 = icmp ugt i32 %36, %39
  br i1 %40, label %41, label %45

41:                                               ; preds = %30
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.inflate_state, ptr %42, i32 0, i32 5
  %44 = load i32, ptr %43, align 8, !tbaa !20
  store i32 %44, ptr %9, align 4, !tbaa !19
  br label %45

45:                                               ; preds = %41, %30
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.inflate_state, ptr %46, i32 0, i32 3
  %48 = load ptr, ptr %47, align 8, !tbaa !21
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.inflate_state, ptr %49, i32 0, i32 3
  %51 = load ptr, ptr %50, align 8, !tbaa !21
  %52 = load i32, ptr %9, align 4, !tbaa !19
  %53 = zext i32 %52 to i64
  %54 = getelementptr inbounds i8, ptr %51, i64 %53
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.inflate_state, ptr %55, i32 0, i32 24
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.inflate_state, ptr %57, i32 0, i32 21
  %59 = load i16, ptr %58, align 2, !tbaa !24
  %60 = sext i16 %59 to i64
  %61 = getelementptr inbounds [328 x i8], ptr %56, i64 0, i64 %60
  call void @_ZN3qpl7core_sw4util4copyIPhS3_EEvT_S4_T0_(ptr noundef %48, ptr noundef %54, ptr noundef %61) #4
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.inflate_state, ptr %62, i32 0, i32 24
  %64 = getelementptr inbounds [328 x i8], ptr %63, i64 0, i64 0
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.inflate_state, ptr %65, i32 0, i32 3
  store ptr %64, ptr %66, align 8, !tbaa !21
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.inflate_state, ptr %67, i32 0, i32 21
  %69 = load i16, ptr %68, align 2, !tbaa !24
  %70 = sext i16 %69 to i32
  %71 = load i32, ptr %9, align 4, !tbaa !19
  %72 = add i32 %70, %71
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.inflate_state, ptr %73, i32 0, i32 5
  store i32 %72, ptr %74, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %75

75:                                               ; preds = %45, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = call noundef i32 @_ZN3qpl2ml11compression12isal_kernels19read_deflate_headerER13inflate_state(ptr noundef nonnull align 8 dereferenceable(87368) %76) #4
  store i32 %77, ptr %10, align 4, !tbaa !19
  %78 = load i32, ptr %10, align 4, !tbaa !19
  %79 = icmp ugt i32 %78, 200
  br i1 %79, label %80, label %82

80:                                               ; preds = %75
  %81 = load i32, ptr %10, align 4, !tbaa !19
  store i32 %81, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %167

82:                                               ; preds = %75
  %83 = load i32, ptr %8, align 4, !tbaa !23
  %84 = icmp eq i32 1, %83
  br i1 %84, label %85, label %116

85:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.inflate_state, ptr %86, i32 0, i32 3
  %88 = load ptr, ptr %87, align 8, !tbaa !21
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.inflate_state, ptr %89, i32 0, i32 24
  %91 = getelementptr inbounds [328 x i8], ptr %90, i64 0, i64 0
  %92 = ptrtoint ptr %88 to i64
  %93 = ptrtoint ptr %91 to i64
  %94 = sub i64 %92, %93
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.inflate_state, ptr %95, i32 0, i32 21
  %97 = load i16, ptr %96, align 2, !tbaa !24
  %98 = sext i16 %97 to i64
  %99 = sub nsw i64 %94, %98
  %100 = trunc i64 %99 to i32
  store i32 %100, ptr %12, align 4, !tbaa !19
  %101 = load i32, ptr %12, align 4, !tbaa !19
  %102 = icmp slt i32 %101, 0
  br i1 %102, label %103, label %104

103:                                              ; preds = %85
  store i32 0, ptr %12, align 4, !tbaa !19
  br label %104

104:                                              ; preds = %103, %85
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = load i32, ptr %12, align 4, !tbaa !19
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds i8, ptr %105, i64 %107
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.inflate_state, ptr %109, i32 0, i32 3
  store ptr %108, ptr %110, align 8, !tbaa !21
  %111 = load i32, ptr %6, align 4, !tbaa !19
  %112 = load i32, ptr %12, align 4, !tbaa !19
  %113 = sub i32 %111, %112
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.inflate_state, ptr %114, i32 0, i32 5
  store i32 %113, ptr %115, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %116

116:                                              ; preds = %104, %82
  %117 = load i32, ptr %10, align 4, !tbaa !19
  %118 = icmp eq i32 3, %117
  br i1 %118, label %119, label %162

119:                                              ; preds = %116
  %120 = load i64, ptr %4, align 8, !tbaa !17
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.inflate_state, ptr %121, i32 0, i32 4
  store i64 %120, ptr %122, align 8, !tbaa !9
  %123 = load i32, ptr %5, align 4, !tbaa !19
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.inflate_state, ptr %124, i32 0, i32 6
  store i32 %123, ptr %125, align 4, !tbaa !18
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = load i32, ptr %6, align 4, !tbaa !19
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds i8, ptr %127, i64 %129
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.inflate_state, ptr %131, i32 0, i32 24
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.inflate_state, ptr %133, i32 0, i32 21
  %135 = load i16, ptr %134, align 2, !tbaa !24
  %136 = sext i16 %135 to i64
  %137 = getelementptr inbounds [328 x i8], ptr %132, i64 0, i64 %136
  call void @_ZN3qpl7core_sw4util4copyIPhS3_EEvT_S4_T0_(ptr noundef %126, ptr noundef %130, ptr noundef %137) #4
  %138 = load i32, ptr %6, align 4, !tbaa !19
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.inflate_state, ptr %139, i32 0, i32 21
  %141 = load i16, ptr %140, align 2, !tbaa !24
  %142 = sext i16 %141 to i32
  %143 = add i32 %142, %138
  %144 = trunc i32 %143 to i16
  store i16 %144, ptr %140, align 2, !tbaa !24
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.inflate_state, ptr %145, i32 0, i32 5
  store i32 0, ptr %146, align 8, !tbaa !20
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = load i32, ptr %6, align 4, !tbaa !19
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds i8, ptr %147, i64 %149
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.inflate_state, ptr %151, i32 0, i32 3
  store ptr %150, ptr %152, align 8, !tbaa !21
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.inflate_state, ptr %153, i32 0, i32 21
  %155 = load i16, ptr %154, align 2, !tbaa !24
  %156 = sext i16 %155 to i32
  %157 = icmp sgt i32 %156, 0
  br i1 %157, label %158, label %161

158:                                              ; preds = %119
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.inflate_state, ptr %159, i32 0, i32 9
  store i32 1, ptr %160, align 8, !tbaa !22
  br label %161

161:                                              ; preds = %158, %119
  br label %165

162:                                              ; preds = %116
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.inflate_state, ptr %163, i32 0, i32 21
  store i16 0, ptr %164, align 2, !tbaa !24
  br label %165

165:                                              ; preds = %162, %161
  %166 = load i32, ptr %10, align 4, !tbaa !19
  store i32 %166, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %167

167:                                              ; preds = %165, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  %168 = load i32, ptr %2, align 4
  ret i32 %168
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qpl7core_sw4util4copyIPhS3_EEvT_S4_T0_(ptr noundef, ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression12isal_kernels19read_deflate_headerER13inflate_state(ptr noundef nonnull align 8 dereferenceable(87368)) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 24}
!10 = !{!"_ZTS13inflate_state", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16, !12, i64 24, !11, i64 32, !11, i64 36, !13, i64 40, !14, i64 18952, !15, i64 21160, !11, i64 21164, !11, i64 21168, !11, i64 21172, !11, i64 21176, !11, i64 21180, !7, i64 21184, !11, i64 21188, !11, i64 21192, !11, i64 21196, !11, i64 21200, !16, i64 21204, !16, i64 21206, !11, i64 21208, !11, i64 21212, !7, i64 21216, !7, i64 21544}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTS23inflate_huff_code_large", !7, i64 0, !7, i64 16384}
!14 = !{!"_ZTS23inflate_huff_code_small", !7, i64 0, !7, i64 2048}
!15 = !{!"_ZTS16isal_block_state", !7, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!12, !12, i64 0}
!18 = !{!10, !11, i64 36}
!19 = !{!11, !11, i64 0}
!20 = !{!10, !11, i64 32}
!21 = !{!10, !6, i64 16}
!22 = !{!10, !15, i64 21160}
!23 = !{!15, !15, i64 0}
!24 = !{!10, !16, i64 21206}


; 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: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN3qpl2ml11compression20read_header_statefulER13inflate_state(ptr noundef nonnull align 8 dereferenceable(87368) %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 24
  %3 = load i64, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 36
  %5 = load i32, ptr %4, align 4, !tbaa !16
  %6 = getelementptr inbounds i8, ptr %0, i64 32
  %7 = load i32, ptr %6, align 8, !tbaa !17
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  %9 = load ptr, ptr %8, align 8, !tbaa !18
  %10 = getelementptr inbounds i8, ptr %0, i64 21160
  %11 = load i32, ptr %10, align 8, !tbaa !19
  %12 = icmp eq i32 %11, 1
  br i1 %12, label %13, label %.thread

13:                                               ; preds = %1
  %14 = getelementptr inbounds i8, ptr %0, i64 21206
  %15 = load i16, ptr %14, align 2, !tbaa !20
  %16 = sext i16 %15 to i32
  %17 = sub nsw i32 328, %16
  %spec.select = tail call i32 @llvm.umin.i32(i32 %17, i32 %7)
  %18 = zext i32 %spec.select to i64
  %19 = getelementptr inbounds i8, ptr %9, i64 %18
  %20 = getelementptr inbounds i8, ptr %0, i64 21216
  %21 = sext i16 %15 to i64
  %22 = getelementptr inbounds [328 x i8], ptr %20, i64 0, i64 %21
  tail call void @_ZN3qpl7core_sw4util4copyIPhS3_EEvT_S4_T0_(ptr noundef %9, ptr noundef %19, ptr noundef nonnull %22) #4
  store ptr %20, ptr %8, align 8, !tbaa !18
  %23 = load i16, ptr %14, align 2, !tbaa !20
  %24 = sext i16 %23 to i32
  %25 = add i32 %spec.select, %24
  store i32 %25, ptr %6, align 8, !tbaa !17
  %26 = tail call noundef i32 @_ZN3qpl2ml11compression12isal_kernels19read_deflate_headerER13inflate_state(ptr noundef nonnull align 8 dereferenceable(87368) %0) #4
  %27 = icmp ugt i32 %26, 200
  br i1 %27, label %59, label %30

.thread:                                          ; preds = %1
  %28 = tail call noundef i32 @_ZN3qpl2ml11compression12isal_kernels19read_deflate_headerER13inflate_state(ptr noundef nonnull align 8 dereferenceable(87368) %0) #4
  %29 = icmp ugt i32 %28, 200
  br i1 %29, label %59, label %.thread57

30:                                               ; preds = %13
  %31 = load ptr, ptr %8, align 8, !tbaa !18
  %32 = ptrtoint ptr %31 to i64
  %33 = ptrtoint ptr %20 to i64
  %34 = load i16, ptr %14, align 2, !tbaa !20
  %35 = sext i16 %34 to i64
  %36 = add i64 %33, %35
  %37 = sub i64 %32, %36
  %38 = trunc i64 %37 to i32
  %spec.store.select = tail call i32 @llvm.smax.i32(i32 %38, i32 0)
  %39 = zext nneg i32 %spec.store.select to i64
  %40 = getelementptr inbounds i8, ptr %9, i64 %39
  store ptr %40, ptr %8, align 8, !tbaa !18
  %41 = sub i32 %7, %spec.store.select
  store i32 %41, ptr %6, align 8, !tbaa !17
  br label %.thread57

.thread57:                                        ; preds = %.thread, %30
  %42 = phi i32 [ %26, %30 ], [ %28, %.thread ]
  %43 = icmp eq i32 %42, 3
  br i1 %43, label %44, label %57

44:                                               ; preds = %.thread57
  store i64 %3, ptr %2, align 8, !tbaa !5
  store i32 %5, ptr %4, align 4, !tbaa !16
  %45 = zext i32 %7 to i64
  %46 = getelementptr inbounds i8, ptr %9, i64 %45
  %47 = getelementptr inbounds i8, ptr %0, i64 21216
  %48 = getelementptr inbounds i8, ptr %0, i64 21206
  %49 = load i16, ptr %48, align 2, !tbaa !20
  %50 = sext i16 %49 to i64
  %51 = getelementptr inbounds [328 x i8], ptr %47, i64 0, i64 %50
  tail call void @_ZN3qpl7core_sw4util4copyIPhS3_EEvT_S4_T0_(ptr noundef %9, ptr noundef %46, ptr noundef nonnull %51) #4
  %52 = load i16, ptr %48, align 2, !tbaa !20
  %53 = trunc i32 %7 to i16
  %54 = add i16 %52, %53
  store i16 %54, ptr %48, align 2, !tbaa !20
  store i32 0, ptr %6, align 8, !tbaa !17
  store ptr %46, ptr %8, align 8, !tbaa !18
  %55 = icmp sgt i16 %54, 0
  br i1 %55, label %56, label %59

56:                                               ; preds = %44
  store i32 1, ptr %10, align 8, !tbaa !19
  br label %59

57:                                               ; preds = %.thread57
  %58 = getelementptr inbounds i8, ptr %0, i64 21206
  store i16 0, ptr %58, align 2, !tbaa !20
  br label %59

59:                                               ; preds = %.thread, %57, %56, %44, %13
  %60 = phi i32 [ %28, %.thread ], [ %42, %57 ], [ 3, %56 ], [ 3, %44 ], [ %26, %13 ]
  ret i32 %60
}

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

; Function Attrs: nounwind
declare noundef i32 @_ZN3qpl2ml11compression12isal_kernels19read_deflate_headerER13inflate_state(ptr noundef nonnull align 8 dereferenceable(87368)) local_unnamed_addr #2

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

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

attributes #0 = { 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 #1 = { inlinehint 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 #2 = { nounwind "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 24}
!6 = !{!"_ZTS13inflate_state", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16, !11, i64 24, !10, i64 32, !10, i64 36, !12, i64 40, !13, i64 18952, !14, i64 21160, !10, i64 21164, !10, i64 21168, !10, i64 21172, !10, i64 21176, !10, i64 21180, !8, i64 21184, !10, i64 21188, !10, i64 21192, !10, i64 21196, !10, i64 21200, !15, i64 21204, !15, i64 21206, !10, i64 21208, !10, i64 21212, !8, i64 21216, !8, i64 21544}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"_ZTS23inflate_huff_code_large", !8, i64 0, !8, i64 16384}
!13 = !{!"_ZTS23inflate_huff_code_small", !8, i64 0, !8, i64 2048}
!14 = !{!"_ZTS16isal_block_state", !8, i64 0}
!15 = !{!"short", !8, i64 0}
!16 = !{!6, !10, i64 36}
!17 = !{!6, !10, i64 32}
!18 = !{!6, !7, i64 16}
!19 = !{!6, !14, i64 21160}
!20 = !{!6, !15, i64 21206}


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