; LLVM IR from huawei-noah/bolt :: inference/engine/src (bolt_c)

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

%"class.std::map.52" = type { %"class.std::_Rb_tree.53" }
%"class.std::_Rb_tree.53" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, TensorDesc>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, TensorDesc>>, 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>, TensorDesc>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, TensorDesc>>, 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 }
%struct.ModelHandleInner = type { ptr, ptr, i32, ptr, i8 }

@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@__FUNCTION__.PrepareModel5D = external hidden unnamed_addr constant [15 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z18print_model_handleP16ModelHandleInner(ptr noundef) #0

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

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) #4

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

declare i32 @fflush(ptr noundef) #5

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @PrepareModel5D(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) #7 personality ptr @__gxx_personality_v0 {
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"class.std::map.52", align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::map.52", align 8
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store i32 %1, ptr %12, align 4, !tbaa !9
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store ptr %4, ptr %15, align 8, !tbaa !5
  store ptr %5, ptr %16, align 8, !tbaa !5
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  store ptr %9, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %30 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %30, ptr %21, align 8, !tbaa !5
  %31 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_Z18assert_not_nullptrPKcS0_PKv(ptr noundef @__FUNCTION__.PrepareModel5D, ptr noundef @.str.1, ptr noundef %31)
  %32 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_Z18print_model_handleP16ModelHandleInner(ptr noundef %32)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %33 = load ptr, ptr %21, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.ModelHandleInner, ptr %33, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8, !tbaa !11
  store ptr %35, ptr %22, align 8, !tbaa !5
  %36 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_Z18assert_not_nullptrPKcS0_PKv(ptr noundef @__FUNCTION__.PrepareModel5D, ptr noundef @.str.2, ptr noundef %36)
  call void @llvm.lifetime.start.p0(i64 48, ptr %23) #8
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = load i32, ptr %12, align 4, !tbaa !9
  %39 = load ptr, ptr %13, align 8, !tbaa !5
  %40 = load ptr, ptr %14, align 8, !tbaa !5
  %41 = load ptr, ptr %15, align 8, !tbaa !5
  %42 = load ptr, ptr %16, align 8, !tbaa !5
  %43 = load ptr, ptr %17, align 8, !tbaa !5
  %44 = load ptr, ptr %18, align 8, !tbaa !5
  %45 = load ptr, ptr %19, align 8, !tbaa !5
  %46 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZL26getInputDataFormatFromUserB5cxx11PviPPKcPKiS4_S4_S4_S4_PK9DATA_TYPEPK11DATA_FORMAT(ptr dead_on_unwind writable sret(%"class.std::map.52") align 8 %23, ptr noundef %37, i32 noundef %38, ptr noundef %39, ptr noundef %40, ptr noundef %41, ptr noundef %42, ptr noundef %43, ptr noundef %44, ptr noundef %45, ptr noundef %46)
  %47 = load ptr, ptr %21, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ModelHandleInner, ptr %47, i32 0, i32 2
  %49 = load i32, ptr %48, align 8, !tbaa !15
  %50 = icmp eq i32 %49, 10
  br i1 %50, label %56, label %51

51:                                               ; preds = %10
  %52 = load ptr, ptr %21, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ModelHandleInner, ptr %52, i32 0, i32 2
  %54 = load i32, ptr %53, align 8, !tbaa !15
  %55 = icmp eq i32 %54, 11
  br i1 %55, label %56, label %70

56:                                               ; preds = %51, %10
  %57 = load ptr, ptr %22, align 8, !tbaa !5
  %58 = load ptr, ptr %21, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.ModelHandleInner, ptr %58, i32 0, i32 3
  %60 = load ptr, ptr %59, align 8, !tbaa !16
  %61 = load ptr, ptr %21, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ModelHandleInner, ptr %61, i32 0, i32 4
  %63 = load i8, ptr %62, align 8, !tbaa !17, !range !18, !noundef !19
  %64 = trunc i8 %63 to i1
  invoke void @_ZN5Model16loadAlgorithmMapEPKcb(ptr noundef nonnull align 8 dereferenceable(4720) %57, ptr noundef %60, i1 noundef zeroext %64)
          to label %65 unwind label %66

65:                                               ; preds = %56
  br label %70

66:                                               ; preds = %76, %70, %56
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %24, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %25, align 4
  br label %125

70:                                               ; preds = %65, %51
  %71 = load ptr, ptr %22, align 8, !tbaa !5
  invoke void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE10TensorDescSt4lessIS5_ESaISt4pairIKS5_S6_EEEC2ERKSD_(ptr noundef nonnull align 8 dereferenceable(48) %26, ptr noundef nonnull align 8 dereferenceable(48) %23)
          to label %72 unwind label %66

72:                                               ; preds = %70
  %73 = load ptr, ptr %71, align 8, !tbaa !20
  %74 = getelementptr inbounds ptr, ptr %73, i64 2
  %75 = load ptr, ptr %74, align 8
  invoke void %75(ptr noundef nonnull align 8 dereferenceable(5265) %71, ptr noundef %26)
          to label %76 unwind label %105

76:                                               ; preds = %72
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE10TensorDescSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %26) #8
  %77 = load ptr, ptr %22, align 8, !tbaa !5
  %78 = invoke noundef i32 @_ZN3CNN17mark_input_outputEv(ptr noundef nonnull align 8 dereferenceable(5265) %77)
          to label %79 unwind label %66

79:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %80 = load ptr, ptr %21, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ModelHandleInner, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !22
  store ptr %82, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  %83 = load ptr, ptr %27, align 8, !tbaa !5
  %84 = invoke noundef i32 @_Z16mt_destroy_modelP9ModelSpec(ptr noundef %83)
          to label %85 unwind label %109

85:                                               ; preds = %79
  store i32 %84, ptr %28, align 4, !tbaa !23
  %86 = load i32, ptr %28, align 4, !tbaa !23
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %117

88:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %89 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %90 = trunc i64 %89 to i32
  store i32 %90, ptr %29, align 4, !tbaa !9
  %91 = load i32, ptr %29, align 4, !tbaa !9
  %92 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %91)
          to label %93 unwind label %113

93:                                               ; preds = %88
  %94 = load ptr, ptr @stdout, align 8, !tbaa !5
  %95 = invoke i32 @fflush(ptr noundef %94)
          to label %96 unwind label %113

96:                                               ; preds = %93
  %97 = load i32, ptr %28, align 4, !tbaa !23
  %98 = invoke ptr @ee2str(i32 noundef %97)
          to label %99 unwind label %113

99:                                               ; preds = %96
  %100 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.13, ptr noundef %98)
          to label %101 unwind label %113

101:                                              ; preds = %99
  %102 = load ptr, ptr @stdout, align 8, !tbaa !5
  %103 = invoke i32 @fflush(ptr noundef %102)
          to label %104 unwind label %113

104:                                              ; preds = %101
  call void @exit(i32 noundef 1) #9
  unreachable

105:                                              ; preds = %72
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %24, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %25, align 4
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE10TensorDescSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %26) #8
  br label %125

109:                                              ; preds = %79
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %24, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %25, align 4
  br label %124

113:                                              ; preds = %101, %99, %96, %93, %88
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %24, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %124

117:                                              ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  %118 = load ptr, ptr %27, align 8, !tbaa !5
  %119 = icmp eq ptr %118, null
  br i1 %119, label %121, label %120

120:                                              ; preds = %117
  call void @_ZdlPvm(ptr noundef %118, i64 noundef 232) #10
  br label %121

121:                                              ; preds = %120, %117
  %122 = load ptr, ptr %21, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ModelHandleInner, ptr %122, i32 0, i32 0
  store ptr null, ptr %123, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE10TensorDescSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %23) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  ret void

124:                                              ; preds = %113, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %125

125:                                              ; preds = %124, %105, %66
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE10TensorDescSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %23) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %24, align 8
  %128 = load i32, ptr %25, align 4
  %129 = insertvalue { ptr, i32 } poison, ptr %127, 0
  %130 = insertvalue { ptr, i32 } %129, i32 %128, 1
  resume { ptr, i32 } %130
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL26getInputDataFormatFromUserB5cxx11PviPPKcPKiS4_S4_S4_S4_PK9DATA_TYPEPK11DATA_FORMAT(ptr dead_on_unwind noalias writable sret(%"class.std::map.52") align 8, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #7

declare void @_ZN5Model16loadAlgorithmMapEPKcb(ptr noundef nonnull align 8 dereferenceable(4720), ptr noundef, i1 noundef zeroext) #5

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

declare noundef i32 @_ZN3CNN17mark_input_outputEv(ptr noundef nonnull align 8 dereferenceable(5265)) #5

declare noundef i32 @_Z16mt_destroy_modelP9ModelSpec(ptr noundef) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTS16ModelHandleInner", !6, i64 0, !6, i64 8, !13, i64 16, !6, i64 24, !14, i64 32}
!13 = !{!"_ZTS13HARDWARE_TYPE", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!12, !13, i64 16}
!16 = !{!12, !6, i64 24}
!17 = !{!12, !14, i64 32}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!21, !21, i64 0}
!21 = !{!"vtable pointer", !8, i64 0}
!22 = !{!12, !6, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"_ZTS2EE", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::map.52" = type { %"class.std::_Rb_tree.53" }
%"class.std::_Rb_tree.53" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, TensorDesc>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, TensorDesc>>, 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>, TensorDesc>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, TensorDesc>>, 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 }

@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@__FUNCTION__.PrepareModel5D = external hidden unnamed_addr constant [15 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z18print_model_handleP16ModelHandleInner(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) local_unnamed_addr #4

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

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @PrepareModel5D(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #7 personality ptr @__gxx_personality_v0 {
  %11 = alloca %"class.std::map.52", align 8
  %12 = alloca %"class.std::map.52", align 8
  tail call void @_Z18assert_not_nullptrPKcS0_PKv(ptr noundef nonnull @__FUNCTION__.PrepareModel5D, ptr noundef nonnull @.str.1, ptr noundef %0)
  tail call void @_Z18print_model_handleP16ModelHandleInner(ptr noundef %0)
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  tail call void @_Z18assert_not_nullptrPKcS0_PKv(ptr noundef nonnull @__FUNCTION__.PrepareModel5D, ptr noundef nonnull @.str.2, ptr noundef %14)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %11) #9
  call void @_ZL26getInputDataFormatFromUserB5cxx11PviPPKcPKiS4_S4_S4_S4_PK9DATA_TYPEPK11DATA_FORMAT(ptr dead_on_unwind nonnull writable sret(%"class.std::map.52") align 8 %11, ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9)
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = load i32, ptr %15, align 8, !tbaa !12
  %17 = and i32 %16, -2
  %switch = icmp eq i32 %17, 10
  br i1 %switch, label %18, label %26

18:                                               ; preds = %10
  %19 = getelementptr inbounds i8, ptr %0, i64 24
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  %21 = getelementptr inbounds i8, ptr %0, i64 32
  %22 = load i8, ptr %21, align 8, !tbaa !14, !range !15, !noundef !16
  %23 = trunc nuw i8 %22 to i1
  invoke void @_ZN5Model16loadAlgorithmMapEPKcb(ptr noundef nonnull align 8 dereferenceable(4720) %14, ptr noundef %20, i1 noundef zeroext %23)
          to label %26 unwind label %24

24:                                               ; preds = %31, %26, %18
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %55

26:                                               ; preds = %10, %18
  invoke void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE10TensorDescSt4lessIS5_ESaISt4pairIKS5_S6_EEEC2ERKSD_(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 8 dereferenceable(48) %11)
          to label %27 unwind label %24

27:                                               ; preds = %26
  %28 = load ptr, ptr %14, align 8, !tbaa !17
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %30 = load ptr, ptr %29, align 8
  invoke void %30(ptr noundef nonnull align 8 dereferenceable(5265) %14, ptr noundef nonnull %12)
          to label %31 unwind label %47

31:                                               ; preds = %27
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE10TensorDescSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #9
  %32 = invoke noundef i32 @_ZN3CNN17mark_input_outputEv(ptr noundef nonnull align 8 dereferenceable(5265) %14)
          to label %33 unwind label %24

33:                                               ; preds = %31
  %34 = load ptr, ptr %0, align 8, !tbaa !19
  %35 = invoke noundef i32 @_Z16mt_destroy_modelP9ModelSpec(ptr noundef %34)
          to label %36 unwind label %49

36:                                               ; preds = %33
  %.not = icmp eq i32 %35, 0
  br i1 %.not, label %51, label %37

37:                                               ; preds = %36
  %38 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %39 = trunc i64 %38 to i32
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %39)
  %41 = load ptr, ptr @stdout, align 8, !tbaa !20
  %42 = call i32 @fflush(ptr noundef %41)
  %43 = call ptr @ee2str(i32 noundef %35)
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, ptr noundef %43)
  %45 = load ptr, ptr @stdout, align 8, !tbaa !20
  %46 = call i32 @fflush(ptr noundef %45)
  call void @exit(i32 noundef 1) #10
  unreachable

47:                                               ; preds = %27
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE10TensorDescSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #9
  br label %55

49:                                               ; preds = %33
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %55

51:                                               ; preds = %36
  %52 = icmp eq ptr %34, null
  br i1 %52, label %54, label %53

53:                                               ; preds = %51
  call void @_ZdlPvm(ptr noundef nonnull %34, i64 noundef 232) #11
  br label %54

54:                                               ; preds = %53, %51
  store ptr null, ptr %0, align 8, !tbaa !19
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE10TensorDescSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #9
  ret void

55:                                               ; preds = %49, %47, %24
  %.pn = phi { ptr, i32 } [ %50, %49 ], [ %25, %24 ], [ %48, %47 ]
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE10TensorDescSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #9
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL26getInputDataFormatFromUserB5cxx11PviPPKcPKiS4_S4_S4_S4_PK9DATA_TYPEPK11DATA_FORMAT(ptr dead_on_unwind noalias writable sret(%"class.std::map.52") align 8, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #7

declare void @_ZN5Model16loadAlgorithmMapEPKcb(ptr noundef nonnull align 8 dereferenceable(4720), ptr noundef, i1 noundef zeroext) local_unnamed_addr #8

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

declare noundef i32 @_ZN3CNN17mark_input_outputEv(ptr noundef nonnull align 8 dereferenceable(5265)) local_unnamed_addr #8

declare noundef i32 @_Z16mt_destroy_modelP9ModelSpec(ptr noundef) local_unnamed_addr #8

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTS16ModelHandleInner", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !11, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS13HARDWARE_TYPE", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !7, i64 24}
!14 = !{!6, !11, i64 32}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !9, i64 0}
!19 = !{!6, !7, i64 0}
!20 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass