; LLVM IR from gzc/CLRS :: C16-Greedy-Algorithms/huffman (HUFFMAN)

; 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.std::map.3" = type { %"class.std::_Rb_tree.4" }
%"class.std::_Rb_tree.4" = type { %"struct.std::_Rb_tree<char, std::pair<const char, int>, std::_Select1st<std::pair<const char, int>>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, std::pair<const char, int>, std::_Select1st<std::pair<const char, int>>, std::less<char>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Htree *, std::allocator<Htree *>>::_Vector_impl" }
%"struct.std::_Vector_base<Htree *, std::allocator<Htree *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Htree *, std::allocator<Htree *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Htree *, std::allocator<Htree *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.std::vector.11" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"struct.std::pair" = type { i8, i32 }
%struct.Htree = type <{ ptr, ptr, i32, i8, [3 x i8] }>
%class.HUFFMAN = type { ptr, %"class.std::map", ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<char, std::pair<const char, std::vector<bool>>, std::_Select1st<std::pair<const char, std::vector<bool>>>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, std::pair<const char, std::vector<bool>>, std::_Select1st<std::pair<const char, std::vector<bool>>>, std::less<char>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7HUFFMAN9buildTreeERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %2) #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::map.3", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.std::priority_queue", align 8
  %14 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"class.std::vector.11", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %22 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #6
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  %25 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %24, ptr %25, align 8
  br label %26

26:                                               ; preds = %38, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  %29 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %28, ptr %29, align 8
  %30 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br i1 %30, label %32, label %31

31:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %45

32:                                               ; preds = %26
  %33 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %34 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %35 unwind label %41

35:                                               ; preds = %32
  %36 = load i32, ptr %34, align 4, !tbaa !9
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %34, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %35
  %39 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef 0) #6
  %40 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %39, ptr %40, align 8
  br label %26, !llvm.loop !11

41:                                               ; preds = %32
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %10, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %145

45:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  invoke void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %13)
          to label %46 unwind label %54

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %47 = call ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  %48 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %14, i32 0, i32 0
  store ptr %47, ptr %48, align 8
  br label %49

49:                                               ; preds = %69, %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %50 = call ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  %51 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %15, i32 0, i32 0
  store ptr %50, ptr %51, align 8
  %52 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKciEES5_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br i1 %52, label %58, label %53

53:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %81

54:                                               ; preds = %45
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %10, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %11, align 4
  br label %144

58:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %59 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #7
          to label %60 unwind label %72

60:                                               ; preds = %58
  %61 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKciEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %62 = getelementptr inbounds %"struct.std::pair", ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !13
  %64 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKciEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %65 = getelementptr inbounds %"struct.std::pair", ptr %64, i32 0, i32 0
  %66 = load i8, ptr %65, align 4, !tbaa !15
  invoke void @_ZN5HtreeC2EPS_S0_ic(ptr noundef nonnull align 8 dereferenceable(21) %59, ptr noundef null, ptr noundef null, i32 noundef %63, i8 noundef signext %66)
          to label %67 unwind label %76

67:                                               ; preds = %60
  store ptr %59, ptr %16, align 8, !tbaa !5
  invoke void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(25) %13, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %68 unwind label %72

68:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %69

69:                                               ; preds = %68
  %70 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKciEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef 0) #6
  %71 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %17, i32 0, i32 0
  store ptr %70, ptr %71, align 8
  br label %49, !llvm.loop !16

72:                                               ; preds = %67, %58
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %10, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %11, align 4
  br label %80

76:                                               ; preds = %60
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %10, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %59, i64 noundef 24) #8
  br label %80

80:                                               ; preds = %76, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %143

81:                                               ; preds = %53
  br label %82

82:                                               ; preds = %107, %81
  %83 = invoke noundef i64 @_ZNKSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %13)
          to label %84 unwind label %108

84:                                               ; preds = %82
  %85 = icmp ugt i64 %83, 1
  br i1 %85, label %86, label %131

86:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %13)
          to label %88 unwind label %112

88:                                               ; preds = %86
  %89 = load ptr, ptr %87, align 8, !tbaa !5
  store ptr %89, ptr %18, align 8, !tbaa !5
  invoke void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %13)
          to label %90 unwind label %112

90:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %13)
          to label %92 unwind label %116

92:                                               ; preds = %90
  %93 = load ptr, ptr %91, align 8, !tbaa !5
  store ptr %93, ptr %19, align 8, !tbaa !5
  invoke void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %13)
          to label %94 unwind label %116

94:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %95 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #7
          to label %96 unwind label %120

96:                                               ; preds = %94
  %97 = load ptr, ptr %18, align 8, !tbaa !5
  %98 = load ptr, ptr %19, align 8, !tbaa !5
  %99 = load ptr, ptr %18, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.Htree, ptr %99, i32 0, i32 2
  %101 = load i32, ptr %100, align 8, !tbaa !17
  %102 = load ptr, ptr %19, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.Htree, ptr %102, i32 0, i32 2
  %104 = load i32, ptr %103, align 8, !tbaa !17
  %105 = add nsw i32 %101, %104
  invoke void @_ZN5HtreeC2EPS_S0_ic(ptr noundef nonnull align 8 dereferenceable(21) %95, ptr noundef %97, ptr noundef %98, i32 noundef %105, i8 noundef signext 0)
          to label %106 unwind label %124

106:                                              ; preds = %96
  store ptr %95, ptr %20, align 8, !tbaa !5
  invoke void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(25) %13, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %107 unwind label %120

107:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %82, !llvm.loop !19

108:                                              ; preds = %131, %82
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %10, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %11, align 4
  br label %143

112:                                              ; preds = %88, %86
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %10, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %11, align 4
  br label %130

116:                                              ; preds = %92, %90
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %10, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %11, align 4
  br label %129

120:                                              ; preds = %106, %94
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %10, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %11, align 4
  br label %128

124:                                              ; preds = %96
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %10, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %95, i64 noundef 24) #8
  br label %128

128:                                              ; preds = %124, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %129

129:                                              ; preds = %128, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %130

130:                                              ; preds = %129, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %143

131:                                              ; preds = %84
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %13)
          to label %133 unwind label %108

133:                                              ; preds = %131
  %134 = load ptr, ptr %132, align 8, !tbaa !5
  %135 = getelementptr inbounds %class.HUFFMAN, ptr %22, i32 0, i32 0
  store ptr %134, ptr %135, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #6
  call void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #6
  %136 = getelementptr inbounds %class.HUFFMAN, ptr %22, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !20
  invoke void @_ZN7HUFFMAN9buildDictEP5HtreeRSt6vectorIbSaIbEE(ptr noundef nonnull align 8 dereferenceable(72) %22, ptr noundef %137, ptr noundef nonnull align 8 dereferenceable(40) %21)
          to label %138 unwind label %139

138:                                              ; preds = %133
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #6
  call void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #6
  ret void

139:                                              ; preds = %133
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %10, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %11, align 4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #6
  br label %143

143:                                              ; preds = %139, %130, %108, %80
  call void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %13) #6
  br label %144

144:                                              ; preds = %143, %54
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  br label %145

145:                                              ; preds = %144, %41
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #6
  br label %146

146:                                              ; preds = %145
  %147 = load ptr, ptr %10, align 8
  %148 = load i32, ptr %11, align 4
  %149 = insertvalue { ptr, i32 } poison, ptr %147, 0
  %150 = insertvalue { ptr, i32 } %149, i32 %148, 1
  resume { ptr, i32 } %150
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 1 dereferenceable(1)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKciEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKciEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5HtreeC2EPS_S0_ic(ptr noundef nonnull align 8 dereferenceable(21), ptr noundef, ptr noundef, i32 noundef, i8 noundef signext) unnamed_addr #2 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKciEEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7HUFFMAN9buildDictEP5HtreeRSt6vectorIbSaIbEE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef, ptr noundef nonnull align 8 dereferenceable(40)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { nobuiltin allocsize(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 #5 = { nobuiltin 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !10, i64 4}
!14 = !{!"_ZTSSt4pairIKciE", !7, i64 0, !10, i64 4}
!15 = !{!14, !7, i64 0}
!16 = distinct !{!16, !12}
!17 = !{!18, !10, i64 16}
!18 = !{!"_ZTS5Htree", !6, i64 0, !6, i64 8, !10, i64 16, !7, i64 20}
!19 = distinct !{!19, !12}
!20 = !{!21, !6, i64 0}
!21 = !{!"_ZTS7HUFFMAN", !6, i64 0, !22, i64 8, !6, i64 56, !6, i64 64}
!22 = !{!"_ZTSSt3mapIcSt6vectorIbSaIbEESt4lessIcESaISt4pairIKcS2_EEE", !23, i64 0}
!23 = !{!"_ZTSSt8_Rb_treeIcSt4pairIKcSt6vectorIbSaIbEEESt10_Select1stIS5_ESt4lessIcESaIS5_EE", !24, i64 0}
!24 = !{!"_ZTSNSt8_Rb_treeIcSt4pairIKcSt6vectorIbSaIbEEESt10_Select1stIS5_ESt4lessIcESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !25, i64 0, !27, i64 8}
!25 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIcEE", !26, i64 0}
!26 = !{!"_ZTSSt4lessIcE"}
!27 = !{!"_ZTSSt15_Rb_tree_header", !28, i64 0, !30, i64 32}
!28 = !{!"_ZTSSt18_Rb_tree_node_base", !29, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!29 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!30 = !{!"long", !7, i64 0}


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

%"class.std::map.3" = type { %"class.std::_Rb_tree.4" }
%"class.std::_Rb_tree.4" = type { %"struct.std::_Rb_tree<char, std::pair<const char, int>, std::_Select1st<std::pair<const char, int>>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, std::pair<const char, int>, std::_Select1st<std::pair<const char, int>>, std::less<char>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Htree *, std::allocator<Htree *>>::_Vector_impl" }
%"struct.std::_Vector_base<Htree *, std::allocator<Htree *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Htree *, std::allocator<Htree *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Htree *, std::allocator<Htree *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.std::vector.11" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7HUFFMAN9buildTreeERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr nocapture noundef readnone %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::map.3", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.std::priority_queue", align 8
  %8 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::vector.11", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #5
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %13 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  store ptr %13, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %14 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  store ptr %14, ptr %6, align 8
  %15 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %21, %3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %16 = call ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  store ptr %16, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %17 = call ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  store ptr %17, ptr %9, align 8
  %18 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKciEES5_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br i1 %18, label %.lr.ph20, label %._crit_edge21

.lr.ph:                                           ; preds = %3, %21
  %19 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %20 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %21 unwind label %27

21:                                               ; preds = %.lr.ph
  %22 = load i32, ptr %20, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr %20, align 4, !tbaa !5
  %24 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef 0) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %25 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  store ptr %25, ptr %6, align 8
  %26 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br i1 %26, label %.lr.ph, label %._crit_edge, !llvm.loop !9

27:                                               ; preds = %.lr.ph
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %73

._crit_edge21:                                    ; preds = %38, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %29 = call noundef i64 @_ZNKSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
  %30 = icmp ugt i64 %29, 1
  br i1 %30, label %.lr.ph23, label %._crit_edge24

.lr.ph20:                                         ; preds = %._crit_edge, %38
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %31 = invoke noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #6
          to label %32 unwind label %42

32:                                               ; preds = %.lr.ph20
  %33 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKciEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %34 = getelementptr inbounds i8, ptr %33, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !11
  %36 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKciEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %37 = load i8, ptr %36, align 4, !tbaa !13
  call void @_ZN5HtreeC2EPS_S0_ic(ptr noundef nonnull align 8 dereferenceable(21) %31, ptr noundef null, ptr noundef null, i32 noundef %35, i8 noundef signext %37)
  store ptr %31, ptr %10, align 8, !tbaa !14
  invoke void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(25) %7, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %38 unwind label %42

38:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %39 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKciEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef 0) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %40 = call ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  store ptr %40, ptr %9, align 8
  %41 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKciEES5_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br i1 %41, label %.lr.ph20, label %._crit_edge21, !llvm.loop !16

42:                                               ; preds = %32, %.lr.ph20
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %72

.lr.ph23:                                         ; preds = %._crit_edge21, %57
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  invoke void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
          to label %46 unwind label %60

46:                                               ; preds = %.lr.ph23
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
  %48 = load ptr, ptr %47, align 8, !tbaa !14
  invoke void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
          to label %49 unwind label %62

49:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %50 = invoke noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #6
          to label %51 unwind label %64

51:                                               ; preds = %49
  %52 = getelementptr inbounds i8, ptr %45, i64 16
  %53 = load i32, ptr %52, align 8, !tbaa !17
  %54 = getelementptr inbounds i8, ptr %48, i64 16
  %55 = load i32, ptr %54, align 8, !tbaa !17
  %56 = add nsw i32 %55, %53
  call void @_ZN5HtreeC2EPS_S0_ic(ptr noundef nonnull align 8 dereferenceable(21) %50, ptr noundef %45, ptr noundef %48, i32 noundef %56, i8 noundef signext 0)
  store ptr %50, ptr %11, align 8, !tbaa !14
  invoke void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(25) %7, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %57 unwind label %64

57:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  %58 = call noundef i64 @_ZNKSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
  %59 = icmp ugt i64 %58, 1
  br i1 %59, label %.lr.ph23, label %._crit_edge24, !llvm.loop !19

60:                                               ; preds = %.lr.ph23
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %72

62:                                               ; preds = %46
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %72

64:                                               ; preds = %51, %49
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  br label %72

._crit_edge24:                                    ; preds = %57, %._crit_edge21
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
  %67 = load ptr, ptr %66, align 8, !tbaa !14
  store ptr %67, ptr %0, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %12) #5
  call void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #5
  %68 = load ptr, ptr %0, align 8, !tbaa !20
  invoke void @_ZN7HUFFMAN9buildDictEP5HtreeRSt6vectorIbSaIbEE(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef %68, ptr noundef nonnull align 8 dereferenceable(40) %12)
          to label %69 unwind label %70

69:                                               ; preds = %._crit_edge24
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #5
  call void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  ret void

70:                                               ; preds = %._crit_edge24
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #5
  br label %72

72:                                               ; preds = %60, %64, %62, %70, %42
  %.pn15 = phi { ptr, i32 } [ %43, %42 ], [ %71, %70 ], [ %61, %60 ], [ %65, %64 ], [ %63, %62 ]
  call void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %73

73:                                               ; preds = %72, %27
  %.pn17 = phi { ptr, i32 } [ %28, %27 ], [ %.pn15, %72 ]
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn17
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKciEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKciEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5HtreeC2EPS_S0_ic(ptr noundef nonnull align 8 dereferenceable(21), ptr noundef, ptr noundef, i32 noundef, i8 noundef signext) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKciEEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7HUFFMAN9buildDictEP5HtreeRSt6vectorIbSaIbEE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueIP5HtreeSt6vectorIS1_SaIS1_EE13myComparisionED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { nobuiltin allocsize(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 #5 = { nounwind }
attributes #6 = { builtin allocsize(0) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 4}
!12 = !{!"_ZTSSt4pairIKciE", !7, i64 0, !6, i64 4}
!13 = !{!12, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = distinct !{!16, !10}
!17 = !{!18, !6, i64 16}
!18 = !{!"_ZTS5Htree", !15, i64 0, !15, i64 8, !6, i64 16, !7, i64 20}
!19 = distinct !{!19, !10}
!20 = !{!21, !15, i64 0}
!21 = !{!"_ZTS7HUFFMAN", !15, i64 0, !22, i64 8, !15, i64 56, !15, i64 64}
!22 = !{!"_ZTSSt3mapIcSt6vectorIbSaIbEESt4lessIcESaISt4pairIKcS2_EEE", !23, i64 0}
!23 = !{!"_ZTSSt8_Rb_treeIcSt4pairIKcSt6vectorIbSaIbEEESt10_Select1stIS5_ESt4lessIcESaIS5_EE", !24, i64 0}
!24 = !{!"_ZTSNSt8_Rb_treeIcSt4pairIKcSt6vectorIbSaIbEEESt10_Select1stIS5_ESt4lessIcESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !25, i64 0, !27, i64 8}
!25 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIcEE", !26, i64 0}
!26 = !{!"_ZTSSt4lessIcE"}
!27 = !{!"_ZTSSt15_Rb_tree_header", !28, i64 0, !30, i64 32}
!28 = !{!"_ZTSSt18_Rb_tree_node_base", !29, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!29 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!30 = !{!"long", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass