; LLVM IR from intel/qpl :: tools/utils/generators/deflate_generator (gen)

; 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"

%"class.gz_generator::gen_c" = type { %struct.anon, i8, %"class.gz_generator::huffman_c", %"class.gz_generator::grammar_c", %"class.gz_generator::BitBuffer", ptr, i32, [286 x i32], i32, [32 x i32], i32, [19 x i32], i32, [19 x i32], i32, [1024 x i32], i32, [1024 x i32], i32, [19 x i32], i32, i32, i32, i8, [32768 x i8], i32, i32, [3 x i8], i32 }
%struct.anon = type { i8, i8, i8, i8 }
%"class.gz_generator::huffman_c" = type { %class.symbol_list, %class.histogram, [288 x i32], [32 x i32], i8, i8, i8, i32, %"class.std::vector" }
%class.symbol_list = type { ptr, ptr, i32, i32 }
%class.histogram = type { [32768 x i32], [513 x i32], [32 x i32], [286 x i32] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.gz_generator::grammar_c" = type { %class.token_parser_c, ptr }
%class.token_parser_c = type { ptr, %class.token_c, i8, i32 }
%class.token_c = type { i8, i32 }
%"class.gz_generator::BitBuffer" = type { i8, i32, %struct.anon.0, ptr }
%struct.anon.0 = type { i64, i32 }

@.str.2 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12gz_generator5gen_c3dieEPKcz(ptr noundef nonnull align 8 dereferenceable(178336), ptr noundef, ...) #0 align 2

; Function Attrs: nounwind
declare i32 @rand() #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12gz_generator5gen_c13proc_len_distEjj(ptr noundef nonnull align 8 dereferenceable(178336) %0, i32 noundef %1, i32 noundef %2) #0 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %11 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #3
  store i8 0, ptr %8, align 1, !tbaa !11
  %12 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 0
  %13 = getelementptr inbounds %struct.anon, ptr %12, i32 0, i32 0
  %14 = load i8, ptr %13, align 8, !tbaa !12, !range !31, !noundef !32
  %15 = trunc i8 %14 to i1
  br i1 %15, label %17, label %16

16:                                               ; preds = %3
  call void (ptr, ptr, ...) @_ZN12gz_generator5gen_c3dieEPKcz(ptr noundef nonnull align 8 dereferenceable(178336) %11, ptr noundef @.str.2)
  br label %17

17:                                               ; preds = %16, %3
  %18 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 1
  %19 = load i8, ptr %18, align 4, !tbaa !33
  %20 = zext i8 %19 to i32
  %21 = icmp eq i32 %20, 2
  br i1 %21, label %22, label %23

22:                                               ; preds = %17
  call void (ptr, ptr, ...) @_ZN12gz_generator5gen_c3dieEPKcz(ptr noundef nonnull align 8 dereferenceable(178336) %11, ptr noundef @.str.3)
  br label %23

23:                                               ; preds = %22, %17
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = icmp eq i32 %24, -1
  br i1 %25, label %26, label %38

26:                                               ; preds = %23
  %27 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 6
  %28 = load i32, ptr %27, align 8, !tbaa !34
  store i32 %28, ptr %7, align 4, !tbaa !9
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = icmp ugt i32 %29, 4096
  br i1 %30, label %31, label %32

31:                                               ; preds = %26
  store i32 4096, ptr %7, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %31, %26
  %33 = call i32 @rand() #3
  %34 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 6
  %35 = load i32, ptr %34, align 8, !tbaa !34
  %36 = urem i32 %33, %35
  %37 = add i32 1, %36
  store i32 %37, ptr %6, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %32, %23
  %39 = load i32, ptr %5, align 4, !tbaa !9
  %40 = icmp eq i32 %39, -1
  br i1 %40, label %41, label %45

41:                                               ; preds = %38
  %42 = call i32 @rand() #3
  %43 = and i32 255, %42
  %44 = add i32 3, %43
  store i32 %44, ptr %5, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %41, %38
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = icmp eq i32 %46, 32798
  br i1 %47, label %51, label %48

48:                                               ; preds = %45
  %49 = load i32, ptr %6, align 4, !tbaa !9
  %50 = icmp eq i32 %49, 32799
  br i1 %50, label %51, label %55

51:                                               ; preds = %48, %45
  %52 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 2
  %53 = load i32, ptr %5, align 4, !tbaa !9
  %54 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN12gz_generator9huffman_c12add_len_distEjj(ptr noundef nonnull align 8 dereferenceable(135736) %52, i32 noundef %53, i32 noundef %54)
  store i32 1, ptr %9, align 4
  br label %125

55:                                               ; preds = %48
  %56 = load i32, ptr %5, align 4, !tbaa !9
  %57 = icmp ult i32 %56, 3
  br i1 %57, label %61, label %58

58:                                               ; preds = %55
  %59 = load i32, ptr %5, align 4, !tbaa !9
  %60 = icmp ugt i32 %59, 259
  br i1 %60, label %61, label %63

61:                                               ; preds = %58, %55
  %62 = load i32, ptr %5, align 4, !tbaa !9
  call void (ptr, ptr, ...) @_ZN12gz_generator5gen_c3dieEPKcz(ptr noundef nonnull align 8 dereferenceable(178336) %11, ptr noundef @.str.4, i32 noundef %62)
  br label %63

63:                                               ; preds = %61, %58
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = icmp eq i32 %64, 0
  br i1 %65, label %69, label %66

66:                                               ; preds = %63
  %67 = load i32, ptr %6, align 4, !tbaa !9
  %68 = icmp ugt i32 %67, 32768
  br i1 %68, label %69, label %71

69:                                               ; preds = %66, %63
  %70 = load i32, ptr %6, align 4, !tbaa !9
  call void (ptr, ptr, ...) @_ZN12gz_generator5gen_c3dieEPKcz(ptr noundef nonnull align 8 dereferenceable(178336) %11, ptr noundef @.str.5, i32 noundef %70)
  br label %71

71:                                               ; preds = %69, %66
  %72 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 2
  %73 = load i32, ptr %5, align 4, !tbaa !9
  %74 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN12gz_generator9huffman_c12add_len_distEjj(ptr noundef nonnull align 8 dereferenceable(135736) %72, i32 noundef %73, i32 noundef %74)
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = icmp eq i32 %75, 259
  br i1 %76, label %77, label %78

77:                                               ; preds = %71
  store i32 258, ptr %5, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %77, %71
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 6
  %81 = load i32, ptr %80, align 8, !tbaa !34
  %82 = add i32 %81, %79
  store i32 %82, ptr %80, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %117, %78
  %84 = load i32, ptr %10, align 4, !tbaa !9
  %85 = load i32, ptr %5, align 4, !tbaa !9
  %86 = icmp ult i32 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %120

88:                                               ; preds = %83
  %89 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 24
  %90 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 25
  %91 = load i32, ptr %90, align 8, !tbaa !35
  %92 = load i32, ptr %6, align 4, !tbaa !9
  %93 = sub i32 %91, %92
  %94 = and i32 %93, 32767
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds [32768 x i8], ptr %89, i64 0, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !11
  store i8 %97, ptr %8, align 1, !tbaa !11
  %98 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 0
  %99 = getelementptr inbounds %struct.anon, ptr %98, i32 0, i32 2
  %100 = load i8, ptr %99, align 2, !tbaa !36, !range !31, !noundef !32
  %101 = trunc i8 %100 to i1
  br i1 %101, label %102, label %105

102:                                              ; preds = %88
  %103 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 5
  %104 = load ptr, ptr %103, align 8, !tbaa !37
  call void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %104, ptr noundef nonnull align 1 dereferenceable(1) %8)
  br label %105

105:                                              ; preds = %102, %88
  %106 = load i8, ptr %8, align 1, !tbaa !11
  %107 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 24
  %108 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 25
  %109 = load i32, ptr %108, align 8, !tbaa !35
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds [32768 x i8], ptr %107, i64 0, i64 %110
  store i8 %106, ptr %111, align 1, !tbaa !11
  %112 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 25
  %113 = load i32, ptr %112, align 8, !tbaa !35
  %114 = add i32 %113, 1
  %115 = and i32 %114, 32767
  %116 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 25
  store i32 %115, ptr %116, align 8, !tbaa !35
  br label %117

117:                                              ; preds = %105
  %118 = load i32, ptr %10, align 4, !tbaa !9
  %119 = add i32 %118, 1
  store i32 %119, ptr %10, align 4, !tbaa !9
  br label %83, !llvm.loop !38

120:                                              ; preds = %87
  %121 = load i32, ptr %5, align 4, !tbaa !9
  %122 = getelementptr inbounds %"class.gz_generator::gen_c", ptr %11, i32 0, i32 26
  %123 = load i32, ptr %122, align 4, !tbaa !40
  %124 = add i32 %123, %121
  store i32 %124, ptr %122, align 4, !tbaa !40
  store i32 0, ptr %9, align 4
  br label %125

125:                                              ; preds = %120, %51
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  %126 = load i32, ptr %9, align 4
  switch i32 %126, label %128 [
    i32 0, label %127
    i32 1, label %127
  ]

127:                                              ; preds = %125, %125
  ret void

128:                                              ; preds = %125
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12gz_generator9huffman_c12add_len_distEjj(ptr noundef nonnull align 8 dereferenceable(135736), i32 noundef, i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) #0 align 2

attributes #0 = { 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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !15, i64 0}
!13 = !{!"_ZTSN12gz_generator5gen_cE", !14, i64 0, !16, i64 4, !17, i64 8, !24, i64 135744, !28, i64 135776, !6, i64 135808, !10, i64 135816, !7, i64 135820, !10, i64 136964, !7, i64 136968, !10, i64 137096, !7, i64 137100, !10, i64 137176, !7, i64 137180, !10, i64 137256, !7, i64 137260, !10, i64 141356, !7, i64 141360, !10, i64 145456, !7, i64 145460, !10, i64 145536, !10, i64 145540, !10, i64 145544, !15, i64 145548, !7, i64 145549, !10, i64 178320, !10, i64 178324, !7, i64 178328, !10, i64 178332}
!14 = !{!"_ZTSN12gz_generator5gen_cUt_E", !15, i64 0, !15, i64 1, !15, i64 2, !15, i64 3}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN12gz_generator5gen_cUt0_E", !7, i64 0}
!17 = !{!"_ZTSN12gz_generator9huffman_cE", !18, i64 0, !19, i64 24, !7, i64 134420, !7, i64 135572, !15, i64 135700, !15, i64 135701, !15, i64 135702, !10, i64 135704, !20, i64 135712}
!18 = !{!"_ZTS11symbol_list", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20}
!19 = !{!"_ZTS9histogram", !7, i64 0, !7, i64 131072, !7, i64 133124, !7, i64 133252}
!20 = !{!"_ZTSSt6vectorIjSaIjEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSN12gz_generator9grammar_cE", !25, i64 0, !6, i64 24}
!25 = !{!"_ZTS14token_parser_c", !6, i64 0, !26, i64 8, !15, i64 16, !10, i64 20}
!26 = !{!"_ZTS7token_c", !27, i64 0, !10, i64 4}
!27 = !{!"_ZTS12token_type_t", !7, i64 0}
!28 = !{!"_ZTSN12gz_generator9BitBufferE", !15, i64 0, !10, i64 4, !29, i64 8, !6, i64 24}
!29 = !{!"_ZTSN12gz_generator9BitBufferUt_E", !30, i64 0, !10, i64 8}
!30 = !{!"long", !7, i64 0}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!13, !16, i64 4}
!34 = !{!13, !10, i64 135816}
!35 = !{!13, !10, i64 178320}
!36 = !{!13, !15, i64 2}
!37 = !{!13, !6, i64 135808}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!13, !10, i64 178324}


; 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"

@.str.2 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12gz_generator5gen_c3dieEPKcz(ptr noundef nonnull align 8 dereferenceable(178336), ptr noundef, ...) local_unnamed_addr #0 align 2

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12gz_generator5gen_c13proc_len_distEjj(ptr noundef nonnull align 8 dereferenceable(178336) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 align 2 {
  %4 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #3
  store i8 0, ptr %4, align 1, !tbaa !5
  %5 = load i8, ptr %0, align 8, !tbaa !8, !range !29, !noundef !30
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %8, label %7

7:                                                ; preds = %3
  tail call void (ptr, ptr, ...) @_ZN12gz_generator5gen_c3dieEPKcz(ptr noundef nonnull align 8 dereferenceable(178336) %0, ptr noundef nonnull @.str.2)
  br label %8

8:                                                ; preds = %7, %3
  %9 = getelementptr inbounds i8, ptr %0, i64 4
  %10 = load i8, ptr %9, align 4, !tbaa !31
  %11 = icmp eq i8 %10, 2
  br i1 %11, label %12, label %13

12:                                               ; preds = %8
  tail call void (ptr, ptr, ...) @_ZN12gz_generator5gen_c3dieEPKcz(ptr noundef nonnull align 8 dereferenceable(178336) %0, ptr noundef nonnull @.str.3)
  br label %13

13:                                               ; preds = %12, %8
  %14 = icmp eq i32 %2, -1
  br i1 %14, label %15, label %21

15:                                               ; preds = %13
  %16 = getelementptr inbounds i8, ptr %0, i64 135816
  %17 = tail call i32 @rand() #3
  %18 = load i32, ptr %16, align 8, !tbaa !32
  %19 = urem i32 %17, %18
  %20 = add nuw i32 %19, 1
  br label %21

21:                                               ; preds = %15, %13
  %.028 = phi i32 [ %20, %15 ], [ %2, %13 ]
  %22 = icmp eq i32 %1, -1
  br i1 %22, label %23, label %27

23:                                               ; preds = %21
  %24 = tail call i32 @rand() #3
  %25 = and i32 %24, 255
  %26 = add nuw nsw i32 %25, 3
  br label %27

27:                                               ; preds = %23, %21
  %.029 = phi i32 [ %26, %23 ], [ %1, %21 ]
  %28 = and i32 %.028, -2
  %or.cond = icmp eq i32 %28, 32798
  br i1 %or.cond, label %29, label %31

29:                                               ; preds = %27
  %30 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN12gz_generator9huffman_c12add_len_distEjj(ptr noundef nonnull align 8 dereferenceable(135736) %30, i32 noundef %.029, i32 noundef %.028)
  br label %103

31:                                               ; preds = %27
  %32 = add i32 %.029, -260
  %or.cond3 = icmp ult i32 %32, -257
  br i1 %or.cond3, label %33, label %34

33:                                               ; preds = %31
  tail call void (ptr, ptr, ...) @_ZN12gz_generator5gen_c3dieEPKcz(ptr noundef nonnull align 8 dereferenceable(178336) %0, ptr noundef nonnull @.str.4, i32 noundef %.029)
  br label %34

34:                                               ; preds = %31, %33
  %35 = add i32 %.028, -32769
  %or.cond5 = icmp ult i32 %35, -32768
  br i1 %or.cond5, label %36, label %37

36:                                               ; preds = %34
  tail call void (ptr, ptr, ...) @_ZN12gz_generator5gen_c3dieEPKcz(ptr noundef nonnull align 8 dereferenceable(178336) %0, ptr noundef nonnull @.str.5, i32 noundef %.028)
  br label %37

37:                                               ; preds = %34, %36
  %38 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN12gz_generator9huffman_c12add_len_distEjj(ptr noundef nonnull align 8 dereferenceable(135736) %38, i32 noundef %.029, i32 noundef %.028)
  %39 = icmp eq i32 %.029, 259
  %spec.store.select6 = select i1 %39, i32 258, i32 %.029
  %40 = getelementptr inbounds i8, ptr %0, i64 135816
  %41 = load i32, ptr %40, align 8, !tbaa !32
  %42 = add i32 %41, %spec.store.select6
  store i32 %42, ptr %40, align 8, !tbaa !32
  %.not = icmp eq i32 %spec.store.select6, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %37
  %43 = getelementptr inbounds i8, ptr %0, i64 145549
  %44 = getelementptr inbounds i8, ptr %0, i64 178320
  %45 = getelementptr inbounds i8, ptr %0, i64 2
  %46 = getelementptr inbounds i8, ptr %0, i64 135808
  %47 = load i8, ptr %45, align 2, !tbaa !33, !range !29, !noundef !30
  %48 = trunc nuw i8 %47 to i1
  %.pre34 = load i32, ptr %44, align 8, !tbaa !34
  br i1 %48, label %.lr.ph.split, label %.lr.ph.split.us.preheader

.lr.ph.split.us.preheader:                        ; preds = %.lr.ph
  %xtraiter = and i32 %spec.store.select6, 1
  %49 = icmp eq i32 %spec.store.select6, 1
  br i1 %49, label %._crit_edge.loopexit38.unr-lcssa, label %.lr.ph.split.us.preheader.new

.lr.ph.split.us.preheader.new:                    ; preds = %.lr.ph.split.us.preheader
  %unroll_iter = and i32 %spec.store.select6, -2
  br label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %.lr.ph.split.us, %.lr.ph.split.us.preheader.new
  %50 = phi i32 [ %.pre34, %.lr.ph.split.us.preheader.new ], [ %70, %.lr.ph.split.us ]
  %niter = phi i32 [ 0, %.lr.ph.split.us.preheader.new ], [ %niter.next.1, %.lr.ph.split.us ]
  %51 = sub i32 %50, %.028
  %52 = and i32 %51, 32767
  %53 = zext nneg i32 %52 to i64
  %54 = getelementptr inbounds [32768 x i8], ptr %43, i64 0, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !5
  %56 = zext i32 %50 to i64
  %57 = getelementptr inbounds [32768 x i8], ptr %43, i64 0, i64 %56
  store i8 %55, ptr %57, align 1, !tbaa !5
  %58 = load i32, ptr %44, align 8, !tbaa !34
  %59 = add i32 %58, 1
  %60 = and i32 %59, 32767
  store i32 %60, ptr %44, align 8, !tbaa !34
  %61 = sub i32 %59, %.028
  %62 = and i32 %61, 32767
  %63 = zext nneg i32 %62 to i64
  %64 = getelementptr inbounds [32768 x i8], ptr %43, i64 0, i64 %63
  %65 = load i8, ptr %64, align 1, !tbaa !5
  %66 = zext nneg i32 %60 to i64
  %67 = getelementptr inbounds [32768 x i8], ptr %43, i64 0, i64 %66
  store i8 %65, ptr %67, align 1, !tbaa !5
  %68 = load i32, ptr %44, align 8, !tbaa !34
  %69 = add i32 %68, 1
  %70 = and i32 %69, 32767
  store i32 %70, ptr %44, align 8, !tbaa !34
  %niter.next.1 = add i32 %niter, 2
  %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit38.unr-lcssa, label %.lr.ph.split.us, !llvm.loop !35

._crit_edge.loopexit38.unr-lcssa:                 ; preds = %.lr.ph.split.us, %.lr.ph.split.us.preheader
  %.unr = phi i32 [ %.pre34, %.lr.ph.split.us.preheader ], [ %70, %.lr.ph.split.us ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.split.us.epil

.lr.ph.split.us.epil:                             ; preds = %._crit_edge.loopexit38.unr-lcssa
  %71 = sub i32 %.unr, %.028
  %72 = and i32 %71, 32767
  %73 = zext nneg i32 %72 to i64
  %74 = getelementptr inbounds [32768 x i8], ptr %43, i64 0, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !5
  %76 = zext i32 %.unr to i64
  %77 = getelementptr inbounds [32768 x i8], ptr %43, i64 0, i64 %76
  store i8 %75, ptr %77, align 1, !tbaa !5
  %78 = load i32, ptr %44, align 8, !tbaa !34
  %79 = add i32 %78, 1
  %80 = and i32 %79, 32767
  store i32 %80, ptr %44, align 8, !tbaa !34
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.split.us.epil, %._crit_edge.loopexit38.unr-lcssa, %94, %37
  %81 = getelementptr inbounds i8, ptr %0, i64 178324
  %82 = load i32, ptr %81, align 4, !tbaa !37
  %83 = add i32 %82, %spec.store.select6
  store i32 %83, ptr %81, align 4, !tbaa !37
  br label %103

.lr.ph.split:                                     ; preds = %.lr.ph, %94
  %84 = phi i32 [ %101, %94 ], [ %.pre34, %.lr.ph ]
  %.032 = phi i32 [ %102, %94 ], [ 0, %.lr.ph ]
  %85 = sub i32 %84, %.028
  %86 = and i32 %85, 32767
  %87 = zext nneg i32 %86 to i64
  %88 = getelementptr inbounds [32768 x i8], ptr %43, i64 0, i64 %87
  %89 = load i8, ptr %88, align 1, !tbaa !5
  store i8 %89, ptr %4, align 1, !tbaa !5
  %90 = load i8, ptr %45, align 2, !tbaa !33, !range !29, !noundef !30
  %91 = trunc nuw i8 %90 to i1
  br i1 %91, label %92, label %94

92:                                               ; preds = %.lr.ph.split
  %93 = load ptr, ptr %46, align 8, !tbaa !38
  call void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %93, ptr noundef nonnull align 1 dereferenceable(1) %4)
  %.pre35 = load i8, ptr %4, align 1, !tbaa !5
  %.pre36 = load i32, ptr %44, align 8, !tbaa !34
  br label %94

94:                                               ; preds = %92, %.lr.ph.split
  %95 = phi i32 [ %.pre36, %92 ], [ %84, %.lr.ph.split ]
  %96 = phi i8 [ %.pre35, %92 ], [ %89, %.lr.ph.split ]
  %97 = zext i32 %95 to i64
  %98 = getelementptr inbounds [32768 x i8], ptr %43, i64 0, i64 %97
  store i8 %96, ptr %98, align 1, !tbaa !5
  %99 = load i32, ptr %44, align 8, !tbaa !34
  %100 = add i32 %99, 1
  %101 = and i32 %100, 32767
  store i32 %101, ptr %44, align 8, !tbaa !34
  %102 = add nuw i32 %.032, 1
  %exitcond33.not = icmp eq i32 %102, %spec.store.select6
  br i1 %exitcond33.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !39

103:                                              ; preds = %._crit_edge, %29
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12gz_generator9huffman_c12add_len_distEjj(ptr noundef nonnull align 8 dereferenceable(135736), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #0 align 2

attributes #0 = { 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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !11, i64 0}
!9 = !{!"_ZTSN12gz_generator5gen_cE", !10, i64 0, !12, i64 4, !13, i64 8, !22, i64 135744, !26, i64 135776, !15, i64 135808, !16, i64 135816, !6, i64 135820, !16, i64 136964, !6, i64 136968, !16, i64 137096, !6, i64 137100, !16, i64 137176, !6, i64 137180, !16, i64 137256, !6, i64 137260, !16, i64 141356, !6, i64 141360, !16, i64 145456, !6, i64 145460, !16, i64 145536, !16, i64 145540, !16, i64 145544, !11, i64 145548, !6, i64 145549, !16, i64 178320, !16, i64 178324, !6, i64 178328, !16, i64 178332}
!10 = !{!"_ZTSN12gz_generator5gen_cUt_E", !11, i64 0, !11, i64 1, !11, i64 2, !11, i64 3}
!11 = !{!"bool", !6, i64 0}
!12 = !{!"_ZTSN12gz_generator5gen_cUt0_E", !6, i64 0}
!13 = !{!"_ZTSN12gz_generator9huffman_cE", !14, i64 0, !17, i64 24, !6, i64 134420, !6, i64 135572, !11, i64 135700, !11, i64 135701, !11, i64 135702, !16, i64 135704, !18, i64 135712}
!14 = !{!"_ZTS11symbol_list", !15, i64 0, !15, i64 8, !16, i64 16, !16, i64 20}
!15 = !{!"any pointer", !6, i64 0}
!16 = !{!"int", !6, i64 0}
!17 = !{!"_ZTS9histogram", !6, i64 0, !6, i64 131072, !6, i64 133124, !6, i64 133252}
!18 = !{!"_ZTSSt6vectorIjSaIjEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!22 = !{!"_ZTSN12gz_generator9grammar_cE", !23, i64 0, !15, i64 24}
!23 = !{!"_ZTS14token_parser_c", !15, i64 0, !24, i64 8, !11, i64 16, !16, i64 20}
!24 = !{!"_ZTS7token_c", !25, i64 0, !16, i64 4}
!25 = !{!"_ZTS12token_type_t", !6, i64 0}
!26 = !{!"_ZTSN12gz_generator9BitBufferE", !11, i64 0, !16, i64 4, !27, i64 8, !15, i64 24}
!27 = !{!"_ZTSN12gz_generator9BitBufferUt_E", !28, i64 0, !16, i64 8}
!28 = !{!"long", !6, i64 0}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!9, !12, i64 4}
!32 = !{!9, !16, i64 135816}
!33 = !{!9, !11, i64 2}
!34 = !{!9, !16, i64 178320}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!9, !16, i64 178324}
!38 = !{!9, !15, i64 135808}
!39 = distinct !{!39, !36, !40}
!40 = !{!"llvm.loop.unswitch.partial.disable"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass