; LLVM IR from ggml-org/ggml :: examples/gpt-j (quantize)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.gpt_vocab = type { %"class.std::map", %"class.std::map.6", %"class.std::vector" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<std::__cxx11::basic_string<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.std::map.6" = type { %"class.std::_Rb_tree.7" }
%"class.std::_Rb_tree.7" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const int, std::__cxx11::basic_string<char>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const int, std::__cxx11::basic_string<char>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.12 }
%union.anon.12 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%struct.gptj_hparams = type { i32, i32, i32, i32, i32, i32, i32 }
%"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::initializer_list" = type { ptr, i64 }
%"class.std::allocator.0" = type { i8 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [29 x i8], align 1
@__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype = external hidden unnamed_addr constant [20 x i8], align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [35 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.gpt_vocab, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::basic_ifstream", align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::basic_ofstream", align 8
  %14 = alloca i32, align 4
  %15 = alloca %struct.gptj_hparams, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::vector", align 8
  %23 = alloca %"class.std::initializer_list", align 8
  %24 = alloca [1 x %"class.std::__cxx11::basic_string"], align 8
  %25 = alloca ptr, align 8
  %26 = alloca %"class.std::allocator.0", align 1
  %27 = alloca i1, align 1
  %28 = alloca %"class.std::allocator", align 1
  %29 = alloca %"class.std::vector", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 120, ptr %8) #7
  call void @_ZN9gpt_vocabC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %8) #7
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %30) #7
  %32 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, ptr noundef %31)
          to label %33 unwind label %47

33:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 520, ptr %11) #7
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %11, ptr noundef nonnull align 8 dereferenceable(32) %34, i32 noundef 4)
          to label %35 unwind label %51

35:                                               ; preds = %33
  %36 = load ptr, ptr %11, align 8, !tbaa !11
  %37 = getelementptr i8, ptr %36, i64 -24
  %38 = load i64, ptr %37, align 8
  %39 = getelementptr inbounds i8, ptr %11, i64 %38
  %40 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %39)
          to label %41 unwind label %55

41:                                               ; preds = %35
  br i1 %40, label %42, label %59

42:                                               ; preds = %41
  %43 = load ptr, ptr @stderr, align 8, !tbaa !5
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %44) #7
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef @.str.1, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, ptr noundef %45) #7
  store i1 false, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %321

47:                                               ; preds = %3
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %9, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %10, align 4
  br label %325

51:                                               ; preds = %33
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %9, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %10, align 4
  br label %324

55:                                               ; preds = %35
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %9, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %10, align 4
  br label %323

59:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 512, ptr %13) #7
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %13, ptr noundef nonnull align 8 dereferenceable(32) %60, i32 noundef 4)
          to label %61 unwind label %73

61:                                               ; preds = %59
  %62 = load ptr, ptr %13, align 8, !tbaa !11
  %63 = getelementptr i8, ptr %62, i64 -24
  %64 = load i64, ptr %63, align 8
  %65 = getelementptr inbounds i8, ptr %13, i64 %64
  %66 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %65)
          to label %67 unwind label %77

67:                                               ; preds = %61
  br i1 %66, label %68, label %81

68:                                               ; preds = %67
  %69 = load ptr, ptr @stderr, align 8, !tbaa !5
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %70) #7
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef @.str.2, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, ptr noundef %71) #7
  store i1 false, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %318

73:                                               ; preds = %59
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %9, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %10, align 4
  br label %320

77:                                               ; preds = %61
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %9, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %10, align 4
  br label %319

81:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %82 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %14, i64 noundef 4)
          to label %83 unwind label %91

83:                                               ; preds = %81
  %84 = load i32, ptr %14, align 4, !tbaa !13
  %85 = icmp ne i32 %84, 1734831468
  br i1 %85, label %86, label %95

86:                                               ; preds = %83
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %88) #7
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.3, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, ptr noundef %89) #7
  store i1 false, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %98

91:                                               ; preds = %95, %81
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %9, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %319

95:                                               ; preds = %83
  %96 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %14, i64 noundef 4)
          to label %97 unwind label %91

97:                                               ; preds = %95
  store i32 0, ptr %12, align 4
  br label %98

98:                                               ; preds = %97, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  %99 = load i32, ptr %12, align 4
  switch i32 %99, label %318 [
    i32 0, label %100
  ]

100:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 28, ptr %15) #7
  call void @_ZN12gptj_hparamsC2Ev(ptr noundef nonnull align 4 dereferenceable(28) %15) #7
  %101 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 0
  %102 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %101, i64 noundef 4)
          to label %103 unwind label %195

103:                                              ; preds = %100
  %104 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 1
  %105 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %104, i64 noundef 4)
          to label %106 unwind label %195

106:                                              ; preds = %103
  %107 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 2
  %108 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %107, i64 noundef 4)
          to label %109 unwind label %195

109:                                              ; preds = %106
  %110 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 3
  %111 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %110, i64 noundef 4)
          to label %112 unwind label %195

112:                                              ; preds = %109
  %113 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 4
  %114 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %113, i64 noundef 4)
          to label %115 unwind label %195

115:                                              ; preds = %112
  %116 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 5
  %117 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %116, i64 noundef 4)
          to label %118 unwind label %195

118:                                              ; preds = %115
  %119 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 6
  %120 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %119, i64 noundef 4)
          to label %121 unwind label %195

121:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %122 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 6
  %123 = load i32, ptr %122, align 4, !tbaa !15
  %124 = sdiv i32 %123, 1000
  store i32 %124, ptr %16, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %125 = load i32, ptr %7, align 4, !tbaa !9
  %126 = add nsw i32 2000, %125
  store i32 %126, ptr %17, align 4, !tbaa !13
  %127 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 0
  %128 = load i32, ptr %127, align 4, !tbaa !17
  %129 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %128)
          to label %130 unwind label %199

130:                                              ; preds = %121
  %131 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 1
  %132 = load i32, ptr %131, align 4, !tbaa !18
  %133 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.5, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %132)
          to label %134 unwind label %199

134:                                              ; preds = %130
  %135 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 2
  %136 = load i32, ptr %135, align 4, !tbaa !19
  %137 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %136)
          to label %138 unwind label %199

138:                                              ; preds = %134
  %139 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 3
  %140 = load i32, ptr %139, align 4, !tbaa !20
  %141 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %140)
          to label %142 unwind label %199

142:                                              ; preds = %138
  %143 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 4
  %144 = load i32, ptr %143, align 4, !tbaa !21
  %145 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %144)
          to label %146 unwind label %199

146:                                              ; preds = %142
  %147 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 6
  %148 = load i32, ptr %147, align 4, !tbaa !15
  %149 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %148)
          to label %150 unwind label %199

150:                                              ; preds = %146
  %151 = load i32, ptr %16, align 4, !tbaa !13
  %152 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.10, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %151)
          to label %153 unwind label %199

153:                                              ; preds = %150
  %154 = load i32, ptr %17, align 4, !tbaa !13
  %155 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.11, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %154)
          to label %156 unwind label %199

156:                                              ; preds = %153
  %157 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.12, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef 2)
          to label %158 unwind label %199

158:                                              ; preds = %156
  %159 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 0
  %160 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %159, i64 noundef 4)
          to label %161 unwind label %199

161:                                              ; preds = %158
  %162 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 1
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %162, i64 noundef 4)
          to label %164 unwind label %199

164:                                              ; preds = %161
  %165 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 2
  %166 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %165, i64 noundef 4)
          to label %167 unwind label %199

167:                                              ; preds = %164
  %168 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 3
  %169 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %168, i64 noundef 4)
          to label %170 unwind label %199

170:                                              ; preds = %167
  %171 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 4
  %172 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %171, i64 noundef 4)
          to label %173 unwind label %199

173:                                              ; preds = %170
  %174 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 5
  %175 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %174, i64 noundef 4)
          to label %176 unwind label %199

176:                                              ; preds = %173
  %177 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %17, i64 noundef 4)
          to label %178 unwind label %199

178:                                              ; preds = %176
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !13
  %179 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %18, i64 noundef 4)
          to label %180 unwind label %203

180:                                              ; preds = %178
  %181 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %18, i64 noundef 4)
          to label %182 unwind label %203

182:                                              ; preds = %180
  %183 = load i32, ptr %18, align 4, !tbaa !13
  %184 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 0
  %185 = load i32, ptr %184, align 4, !tbaa !17
  %186 = icmp ne i32 %183, %185
  br i1 %186, label %187, label %207

187:                                              ; preds = %182
  %188 = load ptr, ptr @stderr, align 8, !tbaa !5
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %189) #7
  %191 = load i32, ptr %18, align 4, !tbaa !13
  %192 = getelementptr inbounds %struct.gptj_hparams, ptr %15, i32 0, i32 0
  %193 = load i32, ptr %192, align 4, !tbaa !17
  %194 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %188, ptr noundef @.str.13, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, ptr noundef %190, i32 noundef %191, i32 noundef %193) #7
  store i1 false, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %248

195:                                              ; preds = %118, %115, %112, %109, %106, %103, %100
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %9, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %10, align 4
  br label %317

199:                                              ; preds = %176, %173, %170, %167, %164, %161, %158, %156, %153, %150, %146, %142, %138, %134, %130, %121
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %9, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %317

203:                                              ; preds = %180, %178
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %9, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %10, align 4
  br label %275

207:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !13
  br label %208

208:                                              ; preds = %240, %207
  %209 = load i32, ptr %20, align 4, !tbaa !13
  %210 = load i32, ptr %18, align 4, !tbaa !13
  %211 = icmp slt i32 %209, %210
  br i1 %211, label %213, label %212

212:                                              ; preds = %208
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %247

213:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %214 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %21, i64 noundef 4)
          to label %215 unwind label %243

215:                                              ; preds = %213
  %216 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %21, i64 noundef 4)
          to label %217 unwind label %243

217:                                              ; preds = %215
  %218 = load i32, ptr %21, align 4, !tbaa !13
  %219 = zext i32 %218 to i64
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %19, i64 noundef %219)
          to label %220 unwind label %243

220:                                              ; preds = %217
  %221 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  %222 = load i32, ptr %21, align 4, !tbaa !13
  %223 = zext i32 %222 to i64
  %224 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %221, i64 noundef %223)
          to label %225 unwind label %243

225:                                              ; preds = %220
  %226 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  %227 = load i32, ptr %21, align 4, !tbaa !13
  %228 = zext i32 %227 to i64
  %229 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %226, i64 noundef %228)
          to label %230 unwind label %243

230:                                              ; preds = %225
  %231 = load i32, ptr %20, align 4, !tbaa !13
  %232 = getelementptr inbounds %struct.gpt_vocab, ptr %8, i32 0, i32 0
  %233 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %232, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %234 unwind label %243

234:                                              ; preds = %230
  store i32 %231, ptr %233, align 4, !tbaa !13
  %235 = getelementptr inbounds %struct.gpt_vocab, ptr %8, i32 0, i32 1
  %236 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %235, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %237 unwind label %243

237:                                              ; preds = %234
  %238 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %236, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %239 unwind label %243

239:                                              ; preds = %237
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %240

240:                                              ; preds = %239
  %241 = load i32, ptr %20, align 4, !tbaa !13
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr %20, align 4, !tbaa !13
  br label %208, !llvm.loop !22

243:                                              ; preds = %237, %234, %230, %225, %220, %217, %215, %213
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %9, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  br label %275

247:                                              ; preds = %212
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  store i32 0, ptr %12, align 4
  br label %248

248:                                              ; preds = %247, %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  %249 = load i32, ptr %12, align 4
  switch i32 %249, label %316 [
    i32 0, label %250
  ]

250:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #7
  store i1 true, ptr %27, align 1
  store ptr %24, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %251 unwind label %276

251:                                              ; preds = %250
  store i1 false, ptr %27, align 1
  %252 = getelementptr inbounds %"class.std::initializer_list", ptr %23, i32 0, i32 0
  store ptr %24, ptr %252, align 8, !tbaa !24
  %253 = getelementptr inbounds %"class.std::initializer_list", ptr %23, i32 0, i32 1
  store i64 1, ptr %253, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #7
  call void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #7
  %254 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 0
  %255 = load ptr, ptr %254, align 8
  %256 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 1
  %257 = load i64, ptr %256, align 8
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ESt16initializer_listIS5_ERKS6_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr %255, i64 %257, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %258 unwind label %280

258:                                              ; preds = %251
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #7
  %259 = getelementptr inbounds [1 x %"class.std::__cxx11::basic_string"], ptr %24, i32 0, i32 0
  %260 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %259, i64 1
  br label %261

261:                                              ; preds = %261, %258
  %262 = phi ptr [ %260, %258 ], [ %263, %261 ]
  %263 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %262, i64 -1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %263) #7
  %264 = icmp eq ptr %263, %259
  br i1 %264, label %265, label %261

265:                                              ; preds = %261
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  %266 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #7
  call void @llvm.memset.p0.i64(ptr align 8 %29, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #7
  %267 = invoke noundef zeroext i1 @_Z22ggml_common_quantize_0RSt14basic_ifstreamIcSt11char_traitsIcEERSt14basic_ofstreamIcS1_E10ggml_ftypeRKSt6vectorINSt7__cxx1112basic_stringIcS1_SaIcEEESaISC_EESG_(ptr noundef nonnull align 8 dereferenceable(256) %11, ptr noundef nonnull align 8 dereferenceable(248) %13, i32 noundef %266, ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %29)
          to label %268 unwind label %302

268:                                              ; preds = %265
  %269 = xor i1 %267, true
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #7
  br i1 %269, label %270, label %306

270:                                              ; preds = %268
  %271 = load ptr, ptr @stderr, align 8, !tbaa !5
  %272 = load ptr, ptr %5, align 8, !tbaa !5
  %273 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %272) #7
  %274 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %271, ptr noundef @.str.15, ptr noundef @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, ptr noundef %273) #7
  store i1 false, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %313

275:                                              ; preds = %243, %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %317

276:                                              ; preds = %250
  %277 = landingpad { ptr, i32 }
          cleanup
  %278 = extractvalue { ptr, i32 } %277, 0
  store ptr %278, ptr %9, align 8
  %279 = extractvalue { ptr, i32 } %277, 1
  store i32 %279, ptr %10, align 4
  br label %291

280:                                              ; preds = %251
  %281 = landingpad { ptr, i32 }
          cleanup
  %282 = extractvalue { ptr, i32 } %281, 0
  store ptr %282, ptr %9, align 8
  %283 = extractvalue { ptr, i32 } %281, 1
  store i32 %283, ptr %10, align 4
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #7
  %284 = getelementptr inbounds [1 x %"class.std::__cxx11::basic_string"], ptr %24, i32 0, i32 0
  %285 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %284, i64 1
  br label %286

286:                                              ; preds = %286, %280
  %287 = phi ptr [ %285, %280 ], [ %288, %286 ]
  %288 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %287, i64 -1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %288) #7
  %289 = icmp eq ptr %288, %284
  br i1 %289, label %290, label %286

290:                                              ; preds = %286
  br label %291

291:                                              ; preds = %290, %276
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #7
  %292 = load i1, ptr %27, align 1
  br i1 %292, label %293, label %301

293:                                              ; preds = %291
  %294 = load ptr, ptr %25, align 8
  %295 = icmp eq ptr %24, %294
  br i1 %295, label %300, label %296

296:                                              ; preds = %296, %293
  %297 = phi ptr [ %294, %293 ], [ %298, %296 ]
  %298 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %297, i64 -1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %298) #7
  %299 = icmp eq ptr %298, %24
  br i1 %299, label %300, label %296

300:                                              ; preds = %296, %293
  br label %301

301:                                              ; preds = %300, %291
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  br label %315

302:                                              ; preds = %265
  %303 = landingpad { ptr, i32 }
          cleanup
  %304 = extractvalue { ptr, i32 } %303, 0
  store ptr %304, ptr %9, align 8
  %305 = extractvalue { ptr, i32 } %303, 1
  store i32 %305, ptr %10, align 4
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #7
  br label %314

306:                                              ; preds = %268
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256) %11)
          to label %307 unwind label %309

307:                                              ; preds = %306
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %13)
          to label %308 unwind label %309

308:                                              ; preds = %307
  store i1 true, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %313

309:                                              ; preds = %307, %306
  %310 = landingpad { ptr, i32 }
          cleanup
  %311 = extractvalue { ptr, i32 } %310, 0
  store ptr %311, ptr %9, align 8
  %312 = extractvalue { ptr, i32 } %310, 1
  store i32 %312, ptr %10, align 4
  br label %314

313:                                              ; preds = %308, %270
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #7
  br label %316

314:                                              ; preds = %309, %302
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #7
  br label %315

315:                                              ; preds = %314, %301
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #7
  br label %317

316:                                              ; preds = %313, %248
  call void @llvm.lifetime.end.p0(i64 28, ptr %15) #7
  br label %318

317:                                              ; preds = %315, %275, %199, %195
  call void @llvm.lifetime.end.p0(i64 28, ptr %15) #7
  br label %319

318:                                              ; preds = %316, %98, %68
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %13) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr %13) #7
  br label %321

319:                                              ; preds = %317, %91, %77
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %13) #7
  br label %320

320:                                              ; preds = %319, %73
  call void @llvm.lifetime.end.p0(i64 512, ptr %13) #7
  br label %323

321:                                              ; preds = %318, %42
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %11) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr %11) #7
  call void @_ZN9gpt_vocabD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %8) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr %8) #7
  %322 = load i1, ptr %4, align 1
  ret i1 %322

323:                                              ; preds = %320, %55
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %11) #7
  br label %324

324:                                              ; preds = %323, %51
  call void @llvm.lifetime.end.p0(i64 520, ptr %11) #7
  br label %325

325:                                              ; preds = %324, %47
  call void @_ZN9gpt_vocabD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %8) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr %8) #7
  br label %326

326:                                              ; preds = %325
  %327 = load ptr, ptr %9, align 8
  %328 = load i32, ptr %10, align 4
  %329 = insertvalue { ptr, i32 } poison, ptr %327, 0
  %330 = insertvalue { ptr, i32 } %329, i32 %328, 1
  resume { ptr, i32 } %330
}

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

declare i32 @printf(ptr noundef, ...) #4

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) #2 align 2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #5

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i64 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12gptj_hparamsC2Ev(ptr noundef nonnull align 4 dereferenceable(28)) unnamed_addr #3 align 2

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

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

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

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

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

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

; 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 #2 align 2

declare noundef zeroext i1 @_Z22ggml_common_quantize_0RSt14basic_ifstreamIcSt11char_traitsIcEERSt14basic_ofstreamIcS1_E10ggml_ftypeRKSt6vectorINSt7__cxx1112basic_stringIcS1_SaIcEEESaISC_EESG_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(248), i32 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256)) #2 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248)) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9gpt_vocabD2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #3 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 nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { "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 "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 = !{!"_ZTS10ggml_ftype", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !14, i64 24}
!16 = !{!"_ZTS12gptj_hparams", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24}
!17 = !{!16, !14, i64 0}
!18 = !{!16, !14, i64 4}
!19 = !{!16, !14, i64 8}
!20 = !{!16, !14, i64 12}
!21 = !{!16, !14, i64 16}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !6, i64 0}
!25 = !{!"_ZTSSt16initializer_listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE", !6, i64 0, !26, i64 8}
!26 = !{!"long", !7, i64 0}
!27 = !{!25, !26, i64 8}


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

%struct.gpt_vocab = type { %"class.std::map", %"class.std::map.6", %"class.std::vector" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<std::__cxx11::basic_string<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.std::map.6" = type { %"class.std::_Rb_tree.7" }
%"class.std::_Rb_tree.7" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const int, std::__cxx11::basic_string<char>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const int, std::__cxx11::basic_string<char>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.12 }
%union.anon.12 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%struct.gptj_hparams = type { i32, i32, i32, i32, i32, i32, i32 }
%"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.0" = type { i8 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [29 x i8], align 1
@__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype = external hidden unnamed_addr constant [20 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [35 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ESt16initializer_listIS5_ERKS6_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) 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) #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.gpt_vocab, align 8
  %5 = alloca %"class.std::basic_ifstream", align 8
  %6 = alloca %"class.std::basic_ofstream", align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.gptj_hparams, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca [1 x %"class.std::__cxx11::basic_string"], align 8
  %16 = alloca %"class.std::allocator.0", align 1
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.std::vector", align 8
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %4) #7
  call void @_ZN9gpt_vocabC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %4) #7
  %19 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, ptr noundef %19)
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %5) #7
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %5, ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 4)
          to label %21 unwind label %32

21:                                               ; preds = %3
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr %5, i64 %24
  %26 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %25)
          to label %27 unwind label %34

27:                                               ; preds = %21
  br i1 %26, label %28, label %36

28:                                               ; preds = %27
  %29 = load ptr, ptr @stderr, align 8, !tbaa !8
  %30 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, ptr noundef %30) #8
  br label %196

32:                                               ; preds = %3
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %198

34:                                               ; preds = %21
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %197

36:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %6) #7
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %6, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 4)
          to label %37 unwind label %48

37:                                               ; preds = %36
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr i8, ptr %38, i64 -24
  %40 = load i64, ptr %39, align 8
  %41 = getelementptr inbounds i8, ptr %6, i64 %40
  %42 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %41)
          to label %43 unwind label %50

43:                                               ; preds = %37
  br i1 %42, label %44, label %52

44:                                               ; preds = %43
  %45 = load ptr, ptr @stderr, align 8, !tbaa !8
  %46 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, ptr noundef %46) #8
  br label %193

48:                                               ; preds = %36
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %195

50:                                               ; preds = %37
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %194

52:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %53 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %7, i64 noundef 4)
          to label %54 unwind label %56

54:                                               ; preds = %52
  %55 = load i32, ptr %7, align 4, !tbaa !11
  %.not = icmp eq i32 %55, 1734831468
  br i1 %.not, label %58, label %60

56:                                               ; preds = %58, %52
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  br label %194

58:                                               ; preds = %54
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %7, i64 noundef 4)
          to label %64 unwind label %56

60:                                               ; preds = %54
  %61 = load ptr, ptr @stderr, align 8, !tbaa !8
  %62 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, ptr noundef %62) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  br label %193

64:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %8) #7
  call void @_ZN12gptj_hparamsC2Ev(ptr noundef nonnull align 4 dereferenceable(28) %8) #7
  %65 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %8, i64 noundef 4)
          to label %66 unwind label %129

66:                                               ; preds = %64
  %67 = getelementptr inbounds i8, ptr %8, i64 4
  %68 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %67, i64 noundef 4)
          to label %69 unwind label %129

69:                                               ; preds = %66
  %70 = getelementptr inbounds i8, ptr %8, i64 8
  %71 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %70, i64 noundef 4)
          to label %72 unwind label %129

72:                                               ; preds = %69
  %73 = getelementptr inbounds i8, ptr %8, i64 12
  %74 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %73, i64 noundef 4)
          to label %75 unwind label %129

75:                                               ; preds = %72
  %76 = getelementptr inbounds i8, ptr %8, i64 16
  %77 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %76, i64 noundef 4)
          to label %78 unwind label %129

78:                                               ; preds = %75
  %79 = getelementptr inbounds i8, ptr %8, i64 20
  %80 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %79, i64 noundef 4)
          to label %81 unwind label %129

81:                                               ; preds = %78
  %82 = getelementptr inbounds i8, ptr %8, i64 24
  %83 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %82, i64 noundef 4)
          to label %84 unwind label %129

84:                                               ; preds = %81
  %85 = load i32, ptr %82, align 4, !tbaa !13
  %86 = sdiv i32 %85, 1000
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %87 = add nsw i32 %2, 2000
  store i32 %87, ptr %9, align 4, !tbaa !11
  %88 = load i32, ptr %8, align 4, !tbaa !15
  %89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %88)
  %90 = load i32, ptr %67, align 4, !tbaa !16
  %91 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %90)
  %92 = load i32, ptr %70, align 4, !tbaa !17
  %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %92)
  %94 = load i32, ptr %73, align 4, !tbaa !18
  %95 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %94)
  %96 = load i32, ptr %76, align 4, !tbaa !19
  %97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %96)
  %98 = load i32, ptr %82, align 4, !tbaa !13
  %99 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %98)
  %100 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %86)
  %101 = load i32, ptr %9, align 4, !tbaa !11
  %102 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef %101)
  %103 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, i32 noundef 2)
  %104 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %8, i64 noundef 4)
          to label %105 unwind label %131

105:                                              ; preds = %84
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %67, i64 noundef 4)
          to label %107 unwind label %131

107:                                              ; preds = %105
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %70, i64 noundef 4)
          to label %109 unwind label %131

109:                                              ; preds = %107
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %73, i64 noundef 4)
          to label %111 unwind label %131

111:                                              ; preds = %109
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %76, i64 noundef 4)
          to label %113 unwind label %131

113:                                              ; preds = %111
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %79, i64 noundef 4)
          to label %115 unwind label %131

115:                                              ; preds = %113
  %116 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %9, i64 noundef 4)
          to label %117 unwind label %131

117:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  store i32 0, ptr %10, align 4, !tbaa !11
  %118 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %10, i64 noundef 4)
          to label %119 unwind label %133

119:                                              ; preds = %117
  %120 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %10, i64 noundef 4)
          to label %121 unwind label %133

121:                                              ; preds = %119
  %122 = load i32, ptr %10, align 4, !tbaa !11
  %123 = load i32, ptr %8, align 4, !tbaa !15
  %.not38 = icmp eq i32 %122, %123
  br i1 %.not38, label %135, label %.thread50

.thread50:                                        ; preds = %121
  %124 = load ptr, ptr @stderr, align 8, !tbaa !8
  %125 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  %126 = load i32, ptr %10, align 4, !tbaa !11
  %127 = load i32, ptr %8, align 4, !tbaa !15
  %128 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef nonnull @.str.13, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, ptr noundef %125, i32 noundef %126, i32 noundef %127) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  br label %191

129:                                              ; preds = %81, %78, %75, %72, %69, %66, %64
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %192

131:                                              ; preds = %115, %113, %111, %109, %107, %105, %84
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %192

133:                                              ; preds = %119, %117
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %178

135:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  store i32 0, ptr %12, align 4, !tbaa !11
  %136 = load i32, ptr %10, align 4, !tbaa !11
  %137 = icmp sgt i32 %136, 0
  br i1 %137, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %135
  %138 = getelementptr inbounds i8, ptr %4, i64 48
  br label %139

139:                                              ; preds = %.lr.ph, %163
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  %140 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %13, i64 noundef 4)
          to label %141 unwind label %168

141:                                              ; preds = %139
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %13, i64 noundef 4)
          to label %143 unwind label %168

143:                                              ; preds = %141
  %144 = load i32, ptr %13, align 4, !tbaa !11
  %145 = zext i32 %144 to i64
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %11, i64 noundef %145)
          to label %146 unwind label %168

146:                                              ; preds = %143
  %147 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  %148 = load i32, ptr %13, align 4, !tbaa !11
  %149 = zext i32 %148 to i64
  %150 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %147, i64 noundef %149)
          to label %151 unwind label %168

151:                                              ; preds = %146
  %152 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  %153 = load i32, ptr %13, align 4, !tbaa !11
  %154 = zext i32 %153 to i64
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %152, i64 noundef %154)
          to label %156 unwind label %168

156:                                              ; preds = %151
  %157 = load i32, ptr %12, align 4, !tbaa !11
  %158 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %159 unwind label %168

159:                                              ; preds = %156
  store i32 %157, ptr %158, align 4, !tbaa !11
  %160 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %138, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %161 unwind label %168

161:                                              ; preds = %159
  %162 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %160, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %163 unwind label %168

163:                                              ; preds = %161
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  %164 = load i32, ptr %12, align 4, !tbaa !11
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %12, align 4, !tbaa !11
  %166 = load i32, ptr %10, align 4, !tbaa !11
  %167 = icmp slt i32 %165, %166
  br i1 %167, label %139, label %._crit_edge, !llvm.loop !20

168:                                              ; preds = %161, %159, %156, %151, %146, %143, %141, %139
  %169 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  br label %178

._crit_edge:                                      ; preds = %163, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %170 unwind label %179

170:                                              ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #7
  call void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ESt16initializer_listIS5_ERKS6_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr nonnull %15, i64 1, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %171 unwind label %.loopexit.loopexit

171:                                              ; preds = %170
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %18) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %18, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  %172 = invoke noundef zeroext i1 @_Z22ggml_common_quantize_0RSt14basic_ifstreamIcSt11char_traitsIcEERSt14basic_ofstreamIcS1_E10ggml_ftypeRKSt6vectorINSt7__cxx1112basic_stringIcS1_SaIcEEESaISC_EESG_(ptr noundef nonnull align 8 dereferenceable(256) %5, ptr noundef nonnull align 8 dereferenceable(248) %6, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %173 unwind label %182

173:                                              ; preds = %171
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #7
  br i1 %172, label %184, label %174

174:                                              ; preds = %173
  %175 = load ptr, ptr @stderr, align 8, !tbaa !8
  %176 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  %177 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %175, ptr noundef nonnull @.str.15, ptr noundef nonnull @__func__._Z19gptj_model_quantizeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_10ggml_ftype, ptr noundef %176) #8
  br label %188

178:                                              ; preds = %168, %133
  %.pn = phi { ptr, i32 } [ %169, %168 ], [ %134, %133 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  br label %192

179:                                              ; preds = %._crit_edge
  %180 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %170
  %181 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %179
  %.pn40 = phi { ptr, i32 } [ %180, %179 ], [ %181, %.loopexit.loopexit ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #7
  br label %190

182:                                              ; preds = %171
  %183 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #7
  br label %189

184:                                              ; preds = %173
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256) %5)
          to label %185 unwind label %186

185:                                              ; preds = %184
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %6)
          to label %188 unwind label %186

186:                                              ; preds = %185, %184
  %187 = landingpad { ptr, i32 }
          cleanup
  br label %189

188:                                              ; preds = %185, %174
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #7
  br label %191

189:                                              ; preds = %186, %182
  %.pn42 = phi { ptr, i32 } [ %187, %186 ], [ %183, %182 ]
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  br label %190

190:                                              ; preds = %189, %.loopexit
  %.pn42.pn = phi { ptr, i32 } [ %.pn42, %189 ], [ %.pn40, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #7
  br label %192

191:                                              ; preds = %.thread50, %188
  %.3 = phi i1 [ %172, %188 ], [ false, %.thread50 ]
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %8) #7
  br label %193

192:                                              ; preds = %190, %178, %131, %129
  %.pn42.pn.pn = phi { ptr, i32 } [ %.pn42.pn, %190 ], [ %.pn, %178 ], [ %132, %131 ], [ %130, %129 ]
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %8) #7
  br label %194

193:                                              ; preds = %60, %191, %44
  %.4 = phi i1 [ false, %44 ], [ %.3, %191 ], [ false, %60 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %6) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %6) #7
  br label %196

194:                                              ; preds = %192, %56, %50
  %.pn42.pn.pn.pn = phi { ptr, i32 } [ %.pn42.pn.pn, %192 ], [ %57, %56 ], [ %51, %50 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %6) #7
  br label %195

195:                                              ; preds = %194, %48
  %.pn42.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn42.pn.pn.pn, %194 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %6) #7
  br label %197

196:                                              ; preds = %193, %28
  %.5 = phi i1 [ false, %28 ], [ %.4, %193 ]
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %5) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %5) #7
  call void @_ZN9gpt_vocabD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %4) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %4) #7
  ret i1 %.5

197:                                              ; preds = %195, %34
  %.pn42.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn42.pn.pn.pn.pn, %195 ], [ %35, %34 ]
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %5) #7
  br label %198

198:                                              ; preds = %197, %32
  %.pn42.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn42.pn.pn.pn.pn.pn, %197 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %5) #7
  call void @_ZN9gpt_vocabD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %4) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn42.pn.pn.pn.pn.pn.pn
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #2 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12gptj_hparamsC2Ev(ptr noundef nonnull align 4 dereferenceable(28)) unnamed_addr #3 align 2

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

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

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

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

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

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

; 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 #2 align 2

declare noundef zeroext i1 @_Z22ggml_common_quantize_0RSt14basic_ifstreamIcSt11char_traitsIcEERSt14basic_ofstreamIcS1_E10ggml_ftypeRKSt6vectorINSt7__cxx1112basic_stringIcS1_SaIcEEESaISC_EESG_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(248), i32 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9gpt_vocabD2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #3 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 nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { nofree 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 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { cold 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = !{!14, !12, i64 24}
!14 = !{!"_ZTS12gptj_hparams", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24}
!15 = !{!14, !12, i64 0}
!16 = !{!14, !12, i64 4}
!17 = !{!14, !12, i64 8}
!18 = !{!14, !12, i64 12}
!19 = !{!14, !12, i64 16}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: ConstraintEliminationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass