; LLVM IR from sp-nitech/SPTK :: src/compression (huffman_coding)

; 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::priority_queue" = type <{ %"class.std::vector.8", [8 x i8] }>
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<(anonymous namespace)::Node *, std::allocator<(anonymous namespace)::Node *>>::_Vector_impl" }
%"struct.std::_Vector_base<(anonymous namespace)::Node *, std::allocator<(anonymous namespace)::Node *>>::_Vector_impl" = type { %"struct.std::_Vector_base<(anonymous namespace)::Node *, std::allocator<(anonymous namespace)::Node *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<(anonymous namespace)::Node *, std::allocator<(anonymous namespace)::Node *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.5" = type { i8 }
%"class.sptk::HuffmanCoding" = type <{ ptr, i32, i8, [3 x i8] }>

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK4sptk13HuffmanCoding3RunERKSt6vectorIdSaIdEEPS1_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EE(ptr noundef nonnull align 8 dereferenceable(13) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::priority_queue", align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator.5", align 1
  %18 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8
  %20 = getelementptr inbounds %"class.sptk::HuffmanCoding", ptr %19, i32 0, i32 2
  %21 = load i8, ptr %20, align 4, !tbaa !9, !range !13, !noundef !14
  %22 = trunc i8 %21 to i1
  br i1 %22, label %23, label %33

23:                                               ; preds = %3
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %26 = getelementptr inbounds %"class.sptk::HuffmanCoding", ptr %19, i32 0, i32 1
  %27 = load i32, ptr %26, align 8, !tbaa !15
  %28 = sext i32 %27 to i64
  %29 = icmp ne i64 %25, %28
  br i1 %29, label %33, label %30

30:                                               ; preds = %23
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = icmp eq ptr null, %31
  br i1 %32, label %33, label %34

33:                                               ; preds = %30, %23, %3
  store i1 false, ptr %4, align 1
  br label %197

34:                                               ; preds = %30
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #7
  %37 = getelementptr inbounds %"class.sptk::HuffmanCoding", ptr %19, i32 0, i32 1
  %38 = load i32, ptr %37, align 8, !tbaa !15
  %39 = sext i32 %38 to i64
  %40 = icmp ne i64 %36, %39
  br i1 %40, label %41, label %46

41:                                               ; preds = %34
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %"class.sptk::HuffmanCoding", ptr %19, i32 0, i32 1
  %44 = load i32, ptr %43, align 8, !tbaa !15
  %45 = sext i32 %44 to i64
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %45)
  br label %46

46:                                               ; preds = %41, %34
  %47 = getelementptr inbounds %"class.sptk::HuffmanCoding", ptr %19, i32 0, i32 1
  %48 = load i32, ptr %47, align 8, !tbaa !15
  %49 = icmp eq i32 1, %48
  br i1 %49, label %50, label %54

50:                                               ; preds = %46
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef 0) #7
  %53 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %52, ptr noundef @.str)
  store i1 true, ptr %4, align 1
  br label %197

54:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #7
  call void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEEC2IS5_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !16
  br label %55

55:                                               ; preds = %72, %54
  %56 = load i32, ptr %9, align 4, !tbaa !16
  %57 = getelementptr inbounds %"class.sptk::HuffmanCoding", ptr %19, i32 0, i32 1
  %58 = load i32, ptr %57, align 8, !tbaa !15
  %59 = icmp slt i32 %56, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %84

61:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %62 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
          to label %63 unwind label %75

63:                                               ; preds = %61
  %64 = load i32, ptr %9, align 4, !tbaa !16
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = load i32, ptr %9, align 4, !tbaa !16
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %67) #7
  %69 = load double, ptr %68, align 8, !tbaa !17
  invoke void @_ZN12_GLOBAL__N_14NodeC2Eid(ptr noundef nonnull align 8 dereferenceable(40) %62, i32 noundef %64, double noundef %69)
          to label %70 unwind label %79

70:                                               ; preds = %63
  store ptr %62, ptr %10, align 8, !tbaa !5
  invoke void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %8, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %71 unwind label %75

71:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %9, align 4, !tbaa !16
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %9, align 4, !tbaa !16
  br label %55, !llvm.loop !19

75:                                               ; preds = %70, %61
  %76 = landingpad { ptr, i32 }
          catch ptr null
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %11, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %12, align 4
  br label %83

79:                                               ; preds = %63
  %80 = landingpad { ptr, i32 }
          catch ptr null
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %11, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %12, align 4
  call void @_ZdlPvm(ptr noundef %62, i64 noundef 40) #9
  br label %83

83:                                               ; preds = %79, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %170

84:                                               ; preds = %60
  br label %85

85:                                               ; preds = %147, %84
  %86 = invoke noundef i64 @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
          to label %87 unwind label %104

87:                                               ; preds = %85
  %88 = icmp ult i64 1, %86
  br i1 %88, label %89, label %150

89:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
          to label %91 unwind label %108

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

93:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
          to label %95 unwind label %112

95:                                               ; preds = %93
  %96 = load ptr, ptr %94, align 8, !tbaa !5
  store ptr %96, ptr %14, align 8, !tbaa !5
  invoke void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
          to label %97 unwind label %112

97:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %98 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
          to label %99 unwind label %116

99:                                               ; preds = %97
  %100 = load ptr, ptr %13, align 8, !tbaa !5
  %101 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN12_GLOBAL__N_14NodeC2EPKS0_S2_(ptr noundef nonnull align 8 dereferenceable(40) %98, ptr noundef %100, ptr noundef %101)
          to label %102 unwind label %120

102:                                              ; preds = %99
  store ptr %98, ptr %15, align 8, !tbaa !5
  invoke void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %8, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %103 unwind label %116

103:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %147

104:                                              ; preds = %158, %156, %150, %85
  %105 = landingpad { ptr, i32 }
          catch ptr null
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %11, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %12, align 4
  br label %170

108:                                              ; preds = %91, %89
  %109 = landingpad { ptr, i32 }
          catch ptr null
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %11, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %12, align 4
  br label %149

112:                                              ; preds = %95, %93
  %113 = landingpad { ptr, i32 }
          catch ptr null
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %11, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %12, align 4
  br label %148

116:                                              ; preds = %102, %97
  %117 = landingpad { ptr, i32 }
          catch ptr null
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %11, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %12, align 4
  br label %124

120:                                              ; preds = %99
  %121 = landingpad { ptr, i32 }
          catch ptr null
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %11, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %12, align 4
  call void @_ZdlPvm(ptr noundef %98, i64 noundef 40) #9
  br label %124

124:                                              ; preds = %120, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %125

125:                                              ; preds = %124
  %126 = load ptr, ptr %11, align 8
  %127 = call ptr @__cxa_begin_catch(ptr %126) #7
  %128 = load ptr, ptr %13, align 8, !tbaa !5
  %129 = icmp eq ptr %128, null
  br i1 %129, label %134, label %130

130:                                              ; preds = %125
  %131 = load ptr, ptr %128, align 8, !tbaa !21
  %132 = getelementptr inbounds ptr, ptr %131, i64 1
  %133 = load ptr, ptr %132, align 8
  call void %133(ptr noundef nonnull align 8 dereferenceable(40) %128) #7
  br label %134

134:                                              ; preds = %130, %125
  %135 = load ptr, ptr %14, align 8, !tbaa !5
  %136 = icmp eq ptr %135, null
  br i1 %136, label %141, label %137

137:                                              ; preds = %134
  %138 = load ptr, ptr %135, align 8, !tbaa !21
  %139 = getelementptr inbounds ptr, ptr %138, i64 1
  %140 = load ptr, ptr %139, align 8
  call void %140(ptr noundef nonnull align 8 dereferenceable(40) %135) #7
  br label %141

141:                                              ; preds = %137, %134
  invoke void @__cxa_rethrow() #10
          to label %207 unwind label %142

142:                                              ; preds = %141
  %143 = landingpad { ptr, i32 }
          catch ptr null
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %11, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %12, align 4
  invoke void @__cxa_end_catch()
          to label %146 unwind label %204

146:                                              ; preds = %142
  br label %148

147:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %85, !llvm.loop !23

148:                                              ; preds = %146, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %149

149:                                              ; preds = %148, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %170

150:                                              ; preds = %87
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
          to label %152 unwind label %104

152:                                              ; preds = %150
  %153 = load ptr, ptr %151, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %154 unwind label %161

154:                                              ; preds = %152
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN12_GLOBAL__N_16EncodeEPKNS_4NodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPSt6vectorIS8_SaIS8_EE(ptr noundef %153, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef %155)
          to label %156 unwind label %165

156:                                              ; preds = %154
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  %157 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
          to label %158 unwind label %104

158:                                              ; preds = %156
  %159 = load ptr, ptr %157, align 8, !tbaa !5
  invoke void @_ZN12_GLOBAL__N_14FreeEPKNS_4NodeE(ptr noundef %159)
          to label %160 unwind label %104

160:                                              ; preds = %158
  br label %194

161:                                              ; preds = %152
  %162 = landingpad { ptr, i32 }
          catch ptr null
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %11, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %12, align 4
  br label %169

165:                                              ; preds = %154
  %166 = landingpad { ptr, i32 }
          catch ptr null
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %11, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %169

169:                                              ; preds = %165, %161
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  br label %170

170:                                              ; preds = %169, %149, %104, %83
  %171 = load ptr, ptr %11, align 8
  %172 = call ptr @__cxa_begin_catch(ptr %171) #7
  br label %173

173:                                              ; preds = %182, %170
  %174 = invoke noundef zeroext i1 @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
          to label %175 unwind label %183

175:                                              ; preds = %173
  %176 = xor i1 %174, true
  br i1 %176, label %177, label %187

177:                                              ; preds = %175
  %178 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
          to label %179 unwind label %183

179:                                              ; preds = %177
  %180 = load ptr, ptr %178, align 8, !tbaa !5
  invoke void @_ZN12_GLOBAL__N_14FreeEPKNS_4NodeE(ptr noundef %180)
          to label %181 unwind label %183

181:                                              ; preds = %179
  invoke void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
          to label %182 unwind label %183

182:                                              ; preds = %181
  br label %173, !llvm.loop !24

183:                                              ; preds = %181, %179, %177, %173
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %11, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %12, align 4
  invoke void @__cxa_end_catch()
          to label %193 unwind label %204

187:                                              ; preds = %175
  store i1 false, ptr %4, align 1
  store i32 1, ptr %18, align 4
  invoke void @__cxa_end_catch()
          to label %188 unwind label %189

188:                                              ; preds = %187
  br label %195

189:                                              ; preds = %187
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %11, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %12, align 4
  br label %196

193:                                              ; preds = %183
  br label %196

194:                                              ; preds = %160
  store i1 true, ptr %4, align 1
  store i32 1, ptr %18, align 4
  br label %195

195:                                              ; preds = %194, %188
  call void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  br label %197

196:                                              ; preds = %193, %189
  call void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  br label %199

197:                                              ; preds = %195, %50, %33
  %198 = load i1, ptr %4, align 1
  ret i1 %198

199:                                              ; preds = %196
  %200 = load ptr, ptr %11, align 8
  %201 = load i32, ptr %12, align 4
  %202 = insertvalue { ptr, i32 } poison, ptr %200, 0
  %203 = insertvalue { ptr, i32 } %202, i32 %201, 1
  resume { ptr, i32 } %203

204:                                              ; preds = %183, %142
  %205 = landingpad { ptr, i32 }
          catch ptr null
  %206 = extractvalue { ptr, i32 } %205, 0
  call void @__clang_call_terminate(ptr %206) #11
  unreachable

207:                                              ; preds = %141
  unreachable
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #0 align 2

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_14NodeC2Eid(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, double noundef) unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_14NodeC2EPKS0_S2_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef) unnamed_addr #0 align 2

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_rethrow()

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_16EncodeEPKNS_4NodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPSt6vectorIS8_SaIS8_EE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_14FreeEPKNS_4NodeE(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #6 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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { noinline noreturn nounwind uwtable "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 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }
attributes #10 = { noreturn }
attributes #11 = { noreturn 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 12}
!10 = !{!"_ZTSN4sptk13HuffmanCodingE", !11, i64 8, !12, i64 12}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!10, !11, i64 8}
!16 = !{!11, !11, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, i64 0}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}


; 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::priority_queue" = type <{ %"class.std::vector.8", [8 x i8] }>
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<(anonymous namespace)::Node *, std::allocator<(anonymous namespace)::Node *>>::_Vector_impl" }
%"struct.std::_Vector_base<(anonymous namespace)::Node *, std::allocator<(anonymous namespace)::Node *>>::_Vector_impl" = type { %"struct.std::_Vector_base<(anonymous namespace)::Node *, std::allocator<(anonymous namespace)::Node *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<(anonymous namespace)::Node *, std::allocator<(anonymous namespace)::Node *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.5" = type { i8 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK4sptk13HuffmanCoding3RunERKSt6vectorIdSaIdEEPS1_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(13) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::priority_queue", align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.5", align 1
  %9 = getelementptr inbounds i8, ptr %0, i64 12
  %10 = load i8, ptr %9, align 4, !tbaa !5, !range !11, !noundef !12
  %11 = trunc nuw i8 %10 to i1
  br i1 %11, label %12, label %110

12:                                               ; preds = %3
  %13 = tail call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !13
  %16 = sext i32 %15 to i64
  %17 = icmp ne i64 %13, %16
  %18 = icmp eq ptr %2, null
  %or.cond = or i1 %18, %17
  br i1 %or.cond, label %110, label %19

19:                                               ; preds = %12
  %20 = tail call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %21 = load i32, ptr %14, align 8, !tbaa !13
  %22 = sext i32 %21 to i64
  %.not = icmp eq i64 %20, %22
  br i1 %.not, label %24, label %23

23:                                               ; preds = %19
  tail call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %22)
  %.pr = load i32, ptr %14, align 8, !tbaa !13
  br label %24

24:                                               ; preds = %23, %19
  %25 = phi i32 [ %.pr, %23 ], [ %21, %19 ]
  %26 = icmp eq i32 %25, 1
  br i1 %26, label %27, label %30

27:                                               ; preds = %24
  %28 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #7
  %29 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull @.str)
  br label %110

30:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEEC2IS5_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  %31 = load i32, ptr %14, align 8, !tbaa !13
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %40, %30
  %33 = call noundef i64 @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  %34 = icmp ugt i64 %33, 1
  br i1 %34, label %.lr.ph42, label %._crit_edge

.lr.ph:                                           ; preds = %30, %40
  %indvars.iv = phi i64 [ %indvars.iv.next, %40 ], [ 0, %30 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %35 = invoke noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #8
          to label %36 unwind label %44

36:                                               ; preds = %.lr.ph
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #7
  %38 = load double, ptr %37, align 8, !tbaa !14
  %39 = trunc nuw nsw i64 %indvars.iv to i32
  call void @_ZN12_GLOBAL__N_14NodeC2Eid(ptr noundef nonnull align 8 dereferenceable(40) %35, i32 noundef %39, double noundef %38)
  store ptr %35, ptr %5, align 8, !tbaa !16
  invoke void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %40 unwind label %44

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %41 = load i32, ptr %14, align 8, !tbaa !13
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %indvars.iv.next, %42
  br i1 %43, label %.lr.ph, label %.preheader, !llvm.loop !18

44:                                               ; preds = %36, %.lr.ph
  %45 = landingpad { ptr, i32 }
          catch ptr null
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %95

.lr.ph42:                                         ; preds = %.preheader, %55
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  %47 = load ptr, ptr %46, align 8, !tbaa !16
  invoke void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
          to label %48 unwind label %60

48:                                               ; preds = %.lr.ph42
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  %50 = load ptr, ptr %49, align 8, !tbaa !16
  invoke void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
          to label %51 unwind label %62

51:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %52 = invoke noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #8
          to label %53 unwind label %64

53:                                               ; preds = %51
  invoke void @_ZN12_GLOBAL__N_14NodeC2EPKS0_S2_(ptr noundef nonnull align 8 dereferenceable(40) %52, ptr noundef %47, ptr noundef %50)
          to label %54 unwind label %66

54:                                               ; preds = %53
  store ptr %52, ptr %6, align 8, !tbaa !16
  invoke void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %55 unwind label %64

55:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %56 = call noundef i64 @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  %57 = icmp ugt i64 %56, 1
  br i1 %57, label %.lr.ph42, label %._crit_edge, !llvm.loop !20

58:                                               ; preds = %87
  %59 = landingpad { ptr, i32 }
          catch ptr null
  br label %95

60:                                               ; preds = %.lr.ph42
  %61 = landingpad { ptr, i32 }
          catch ptr null
  br label %95

62:                                               ; preds = %48
  %63 = landingpad { ptr, i32 }
          catch ptr null
  br label %95

64:                                               ; preds = %54, %51
  %65 = landingpad { ptr, i32 }
          catch ptr null
  br label %68

66:                                               ; preds = %53
  %67 = landingpad { ptr, i32 }
          catch ptr null
  call void @_ZdlPvm(ptr noundef nonnull %52, i64 noundef 40) #9
  br label %68

68:                                               ; preds = %66, %64
  %.pn29 = phi { ptr, i32 } [ %65, %64 ], [ %67, %66 ]
  %.023 = extractvalue { ptr, i32 } %.pn29, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %69 = call ptr @__cxa_begin_catch(ptr %.023) #7
  %70 = icmp eq ptr %47, null
  br i1 %70, label %75, label %71

71:                                               ; preds = %68
  %72 = load ptr, ptr %47, align 8, !tbaa !21
  %73 = getelementptr inbounds i8, ptr %72, i64 8
  %74 = load ptr, ptr %73, align 8
  call void %74(ptr noundef nonnull align 8 dereferenceable(40) %47) #7
  br label %75

75:                                               ; preds = %71, %68
  %76 = icmp eq ptr %50, null
  br i1 %76, label %81, label %77

77:                                               ; preds = %75
  %78 = load ptr, ptr %50, align 8, !tbaa !21
  %79 = getelementptr inbounds i8, ptr %78, i64 8
  %80 = load ptr, ptr %79, align 8
  call void %80(ptr noundef nonnull align 8 dereferenceable(40) %50) #7
  br label %81

81:                                               ; preds = %77, %75
  invoke void @__cxa_rethrow() #10
          to label %114 unwind label %82

82:                                               ; preds = %81
  %83 = landingpad { ptr, i32 }
          catch ptr null
  invoke void @__cxa_end_catch()
          to label %95 unwind label %111

._crit_edge:                                      ; preds = %55, %.preheader
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  %85 = load ptr, ptr %84, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %86 unwind label %90

86:                                               ; preds = %._crit_edge
  invoke void @_ZN12_GLOBAL__N_16EncodeEPKNS_4NodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPSt6vectorIS8_SaIS8_EE(ptr noundef %85, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull %2)
          to label %87 unwind label %92

87:                                               ; preds = %86
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  %89 = load ptr, ptr %88, align 8, !tbaa !16
  invoke void @_ZN12_GLOBAL__N_14FreeEPKNS_4NodeE(ptr noundef %89)
          to label %108 unwind label %58

90:                                               ; preds = %._crit_edge
  %91 = landingpad { ptr, i32 }
          catch ptr null
  br label %94

92:                                               ; preds = %86
  %93 = landingpad { ptr, i32 }
          catch ptr null
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %94

94:                                               ; preds = %92, %90
  %.pn = phi { ptr, i32 } [ %93, %92 ], [ %91, %90 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %95

95:                                               ; preds = %60, %82, %62, %94, %58, %44
  %.pn31 = phi { ptr, i32 } [ %45, %44 ], [ %59, %58 ], [ %.pn, %94 ], [ %61, %60 ], [ %83, %82 ], [ %63, %62 ]
  %.4 = extractvalue { ptr, i32 } %.pn31, 0
  %96 = call ptr @__cxa_begin_catch(ptr %.4) #7
  br label %97

97:                                               ; preds = %102, %95
  %98 = call noundef zeroext i1 @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  br i1 %98, label %105, label %99

99:                                               ; preds = %97
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  %101 = load ptr, ptr %100, align 8, !tbaa !16
  invoke void @_ZN12_GLOBAL__N_14FreeEPKNS_4NodeE(ptr noundef %101)
          to label %102 unwind label %103

102:                                              ; preds = %99
  invoke void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
          to label %97 unwind label %103, !llvm.loop !23

103:                                              ; preds = %102, %99
  %104 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %109 unwind label %111

105:                                              ; preds = %97
  invoke void @__cxa_end_catch()
          to label %108 unwind label %106

106:                                              ; preds = %105
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %109

108:                                              ; preds = %87, %105
  %.0 = phi i1 [ false, %105 ], [ true, %87 ]
  call void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %110

109:                                              ; preds = %103, %106
  %.pn32 = phi { ptr, i32 } [ %104, %103 ], [ %107, %106 ]
  call void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn32

110:                                              ; preds = %3, %12, %108, %27
  %.1 = phi i1 [ true, %27 ], [ %.0, %108 ], [ false, %12 ], [ false, %3 ]
  ret i1 %.1

111:                                              ; preds = %103, %82
  %112 = landingpad { ptr, i32 }
          catch ptr null
  %113 = extractvalue { ptr, i32 } %112, 0
  call void @__clang_call_terminate(ptr %113) #11
  unreachable

114:                                              ; preds = %81
  unreachable
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; 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 nounwind uwtable
declare hidden void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEEC2IS5_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #1 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_14NodeC2Eid(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, double noundef) unnamed_addr #1 align 2

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

; 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 nounwind uwtable
declare hidden noundef i64 @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_14NodeC2EPKS0_S2_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef) unnamed_addr #0 align 2

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_rethrow() local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_16EncodeEPKNS_4NodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPSt6vectorIS8_SaIS8_EE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_14FreeEPKNS_4NodeE(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZNKSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZNSt14priority_queueIPN12_GLOBAL__N_14NodeESt6vectorIS2_SaIS2_EENS0_7CompareEED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #6 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 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { noinline noreturn nounwind uwtable "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 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }
attributes #10 = { noreturn }
attributes #11 = { noreturn 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, !10, i64 12}
!6 = !{!"_ZTSN4sptk13HuffmanCodingE", !7, i64 8, !10, i64 12}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!6, !7, i64 8}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !8, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !8, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !9, i64 0}
!23 = distinct !{!23, !19}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass