; LLVM IR from NervanaSystems/ngraph :: src/ngraph/op (crossentropy)

; 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.ngraph::element::Type" = type { i32 }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::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 }
%"struct.ngraph::CheckLocInfo" = type { ptr, i32, ptr }
%"class.ngraph::PartialShape" = type { i8, %"class.std::vector.105" }
%"class.std::vector.105" = type { %"struct.std::_Vector_base.106" }
%"struct.std::_Vector_base.106" = type { %"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl" }
%"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl" = type { %"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ngraph::Dimension" = type { %"class.ngraph::Interval" }
%"class.ngraph::Interval" = type { i64, i64 }

@.str = external hidden unnamed_addr constant [67 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [64 x i8], align 1
@_ZTIN6ngraph21NodeValidationFailureE = external dso_local constant { ptr, ptr, ptr }, align 8

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph2op2v012CrossEntropy28pre_validate_and_infer_typesEv(ptr noundef nonnull align 8 dereferenceable(696) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.ngraph::element::Type", align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %7 = alloca %"struct.ngraph::CheckLocInfo", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca i1, align 1
  %10 = alloca %"class.ngraph::PartialShape", align 8
  %11 = alloca %"class.ngraph::Dimension", align 8
  %12 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %14 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6ngraph4Node22get_input_element_typeEm(ptr noundef nonnull align 8 dereferenceable(680) %13, i64 noundef 0)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %3, ptr align 4 %14, i64 4, i1 false), !tbaa.struct !9
  br label %15

15:                                               ; preds = %1
  %16 = invoke noundef zeroext i1 @_ZNK6ngraph7element4Type10is_dynamicEv(ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %17 unwind label %32

17:                                               ; preds = %15
  br i1 %16, label %58, label %18

18:                                               ; preds = %17
  %19 = invoke noundef zeroext i1 @_ZNK6ngraph7element4Type7is_realEv(ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %20 unwind label %32

20:                                               ; preds = %18
  br i1 %19, label %58, label %21

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 392, ptr %6) #8
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6)
          to label %22 unwind label %36

22:                                               ; preds = %21
  %23 = getelementptr inbounds i8, ptr %6, i64 16
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA67_cJRNS_7element4TypeERA3_KcEEERSoS8_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 1 dereferenceable(67) @.str, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 1 dereferenceable(3) @.str.1)
          to label %25 unwind label %40

25:                                               ; preds = %22
  store i1 true, ptr %9, align 1
  %26 = call ptr @__cxa_allocate_exception(i64 16) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #8
  %27 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %7, i32 0, i32 0
  store ptr @.str.2, ptr %27, align 8, !tbaa !12
  %28 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %7, i32 0, i32 1
  store i32 199, ptr %28, align 8, !tbaa !15
  %29 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %7, i32 0, i32 2
  store ptr @.str.3, ptr %29, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #8
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(128) %6)
          to label %30 unwind label %44

30:                                               ; preds = %25
  invoke void @_ZN6ngraph21NodeValidationFailureC2ERKNS_12CheckLocInfoEPKNS_4NodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef %13, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %31 unwind label %48

31:                                               ; preds = %30
  store i1 false, ptr %9, align 1
  invoke void @__cxa_throw(ptr %26, ptr @_ZTIN6ngraph21NodeValidationFailureE, ptr @_ZNSt13runtime_errorD2Ev) #9
          to label %101 unwind label %48

32:                                               ; preds = %75, %60, %18, %15
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %4, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %5, align 4
  br label %95

36:                                               ; preds = %21
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %4, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %5, align 4
  br label %57

40:                                               ; preds = %22
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %4, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %5, align 4
  br label %56

44:                                               ; preds = %25
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %4, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %5, align 4
  br label %52

48:                                               ; preds = %31, %30
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %4, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  br label %52

52:                                               ; preds = %48, %44
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #8
  %53 = load i1, ptr %9, align 1
  br i1 %53, label %54, label %55

54:                                               ; preds = %52
  call void @__cxa_free_exception(ptr %26) #8
  br label %55

55:                                               ; preds = %54, %52
  br label %56

56:                                               ; preds = %55, %40
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #8
  br label %57

57:                                               ; preds = %56, %36
  call void @llvm.lifetime.end.p0(i64 392, ptr %6) #8
  br label %95

58:                                               ; preds = %20, %17
  br label %59

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  %61 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6ngraph4Node22get_input_element_typeEm(ptr noundef nonnull align 8 dereferenceable(680) %13, i64 noundef 0)
          to label %62 unwind label %32

62:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #8
  %63 = invoke { i64, i64 } @_ZN6ngraph9Dimension7dynamicEv()
          to label %64 unwind label %82

64:                                               ; preds = %62
  %65 = getelementptr inbounds %"class.ngraph::Dimension", ptr %11, i32 0, i32 0
  %66 = getelementptr inbounds { i64, i64 }, ptr %65, i32 0, i32 0
  %67 = extractvalue { i64, i64 } %63, 0
  store i64 %67, ptr %66, align 8
  %68 = getelementptr inbounds { i64, i64 }, ptr %65, i32 0, i32 1
  %69 = extractvalue { i64, i64 } %63, 1
  store i64 %69, ptr %68, align 8
  %70 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 0
  %71 = load i64, ptr %70, align 8
  %72 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 1
  %73 = load i64, ptr %72, align 8
  invoke void @_ZN6ngraph12PartialShape7dynamicENS_9DimensionE(ptr dead_on_unwind writable sret(%"class.ngraph::PartialShape") align 8 %10, i64 %71, i64 %73)
          to label %74 unwind label %82

74:                                               ; preds = %64
  invoke void @_ZN6ngraph4Node15set_output_typeEmRKNS_7element4TypeERKNS_12PartialShapeE(ptr noundef nonnull align 8 dereferenceable(680) %13, i64 noundef 0, ptr noundef nonnull align 4 dereferenceable(4) %61, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %75 unwind label %86

75:                                               ; preds = %74
  call void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  %76 = load ptr, ptr %13, align 8, !tbaa !17
  %77 = getelementptr inbounds ptr, ptr %76, i64 25
  %78 = load ptr, ptr %77, align 8
  %79 = invoke noundef zeroext i1 %78(ptr noundef nonnull align 8 dereferenceable(680) %13)
          to label %80 unwind label %32

80:                                               ; preds = %75
  br i1 %79, label %81, label %91

81:                                               ; preds = %80
  store i32 1, ptr %12, align 4
  br label %92

82:                                               ; preds = %64, %62
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %4, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %5, align 4
  br label %90

86:                                               ; preds = %74
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %4, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %5, align 4
  call void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  br label %90

90:                                               ; preds = %86, %82
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  br label %95

91:                                               ; preds = %80
  store i32 0, ptr %12, align 4
  br label %92

92:                                               ; preds = %91, %81
  call void @_ZN6ngraph7element4TypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  %93 = load i32, ptr %12, align 4
  switch i32 %93, label %101 [
    i32 0, label %94
    i32 1, label %94
  ]

94:                                               ; preds = %92, %92
  ret void

95:                                               ; preds = %90, %57, %32
  call void @_ZN6ngraph7element4TypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %96

96:                                               ; preds = %95
  %97 = load ptr, ptr %4, align 8
  %98 = load i32, ptr %5, align 4
  %99 = insertvalue { ptr, i32 } poison, ptr %97, 0
  %100 = insertvalue { ptr, i32 } %99, i32 %98, 1
  resume { ptr, i32 } %100

101:                                              ; preds = %92, %31
  unreachable
}

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6ngraph4Node22get_input_element_typeEm(ptr noundef nonnull align 8 dereferenceable(680), i64 noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK6ngraph7element4Type10is_dynamicEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

declare noundef zeroext i1 @_ZNK6ngraph7element4Type7is_realEv(ptr noundef nonnull align 4 dereferenceable(4)) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA67_cJRNS_7element4TypeERA3_KcEEERSoS8_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(67), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(3)) #4

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) #1 align 2

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

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #6 align 2

declare void @_ZN6ngraph4Node15set_output_typeEmRKNS_7element4TypeERKNS_12PartialShapeE(ptr noundef nonnull align 8 dereferenceable(680), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(32)) #2

declare void @_ZN6ngraph12PartialShape7dynamicENS_9DimensionE(ptr dead_on_unwind writable sret(%"class.ngraph::PartialShape") align 8, i64, i64) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZN6ngraph9Dimension7dynamicEv() #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #7 align 2

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

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

!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 = !{i64 0, i64 4, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"_ZTSN6ngraph7element6Type_tE", !7, i64 0}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTSN6ngraph12CheckLocInfoE", !6, i64 0, !14, i64 8, !6, i64 16}
!14 = !{!"int", !7, i64 0}
!15 = !{!13, !14, i64 8}
!16 = !{!13, !6, i64 16}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, 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.ngraph::element::Type" = type { i32 }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::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 }
%"struct.ngraph::CheckLocInfo" = type { ptr, i32, ptr }
%"class.ngraph::PartialShape" = type { i8, %"class.std::vector.105" }
%"class.std::vector.105" = type { %"struct.std::_Vector_base.106" }
%"struct.std::_Vector_base.106" = type { %"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl" }
%"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl" = type { %"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [67 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [64 x i8], align 1
@_ZTIN6ngraph21NodeValidationFailureE = external dso_local constant { ptr, ptr, ptr }, align 8

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph2op2v012CrossEntropy28pre_validate_and_infer_typesEv(ptr noundef nonnull align 8 dereferenceable(696) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.ngraph::element::Type", align 4
  %3 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %4 = alloca %"struct.ngraph::CheckLocInfo", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.ngraph::PartialShape", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %7 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6ngraph4Node22get_input_element_typeEm(ptr noundef nonnull align 8 dereferenceable(680) %0, i64 noundef 0)
  %8 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %8, ptr %2, align 4, !tbaa !5
  %9 = invoke noundef zeroext i1 @_ZNK6ngraph7element4Type10is_dynamicEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %10 unwind label %25

10:                                               ; preds = %1
  br i1 %9, label %37, label %11

11:                                               ; preds = %10
  %12 = invoke noundef zeroext i1 @_ZNK6ngraph7element4Type7is_realEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %13 unwind label %25

13:                                               ; preds = %11
  br i1 %12, label %37, label %14

14:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %3) #7
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %3)
          to label %15 unwind label %27

15:                                               ; preds = %14
  %16 = getelementptr inbounds i8, ptr %3, i64 16
  %17 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA67_cJRNS_7element4TypeERA3_KcEEERSoS8_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 1 dereferenceable(67) @.str, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 1 dereferenceable(3) @.str.1)
          to label %18 unwind label %29

18:                                               ; preds = %15
  %19 = call ptr @__cxa_allocate_exception(i64 16) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  store ptr @.str.2, ptr %4, align 8, !tbaa !9
  %20 = getelementptr inbounds i8, ptr %4, i64 8
  store i32 199, ptr %20, align 8, !tbaa !13
  %21 = getelementptr inbounds i8, ptr %4, i64 16
  store ptr @.str.3, ptr %21, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(128) %3)
          to label %22 unwind label %.thread

22:                                               ; preds = %18
  invoke void @_ZN6ngraph21NodeValidationFailureC2ERKNS_12CheckLocInfoEPKNS_4NodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %0, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %24 unwind label %.thread20

.thread20:                                        ; preds = %22
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %34

24:                                               ; preds = %22
  invoke void @__cxa_throw(ptr nonnull %19, ptr nonnull @_ZTIN6ngraph21NodeValidationFailureE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #8
          to label %56 unwind label %32

25:                                               ; preds = %44, %37, %11, %1
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %55

27:                                               ; preds = %14
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %36

29:                                               ; preds = %15
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %35

.thread:                                          ; preds = %18
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %34

32:                                               ; preds = %24
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %35

34:                                               ; preds = %.thread20, %.thread
  %.pn19 = phi { ptr, i32 } [ %31, %.thread ], [ %23, %.thread20 ]
  call void @__cxa_free_exception(ptr %19) #7
  br label %35

35:                                               ; preds = %32, %34, %29
  %.pn.pn = phi { ptr, i32 } [ %.pn19, %34 ], [ %33, %32 ], [ %30, %29 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %3) #7
  br label %36

36:                                               ; preds = %35, %27
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %35 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %3) #7
  br label %55

37:                                               ; preds = %13, %10
  %38 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6ngraph4Node22get_input_element_typeEm(ptr noundef nonnull align 8 dereferenceable(680) %0, i64 noundef 0)
          to label %39 unwind label %25

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  %40 = call { i64, i64 } @_ZN6ngraph9Dimension7dynamicEv()
  %41 = extractvalue { i64, i64 } %40, 0
  %42 = extractvalue { i64, i64 } %40, 1
  invoke void @_ZN6ngraph12PartialShape7dynamicENS_9DimensionE(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::PartialShape") align 8 %6, i64 %41, i64 %42)
          to label %43 unwind label %49

43:                                               ; preds = %39
  invoke void @_ZN6ngraph4Node15set_output_typeEmRKNS_7element4TypeERKNS_12PartialShapeE(ptr noundef nonnull align 8 dereferenceable(680) %0, i64 noundef 0, ptr noundef nonnull align 4 dereferenceable(4) %38, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %44 unwind label %51

44:                                               ; preds = %43
  call void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  %45 = load ptr, ptr %0, align 8, !tbaa !15
  %46 = getelementptr inbounds i8, ptr %45, i64 200
  %47 = load ptr, ptr %46, align 8
  %48 = invoke noundef zeroext i1 %47(ptr noundef nonnull align 8 dereferenceable(680) %0)
          to label %54 unwind label %25

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

51:                                               ; preds = %43
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  br label %53

53:                                               ; preds = %51, %49
  %.pn13 = phi { ptr, i32 } [ %52, %51 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %55

54:                                               ; preds = %44
  call void @_ZN6ngraph7element4TypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  ret void

55:                                               ; preds = %53, %36, %25
  %.pn15 = phi { ptr, i32 } [ %26, %25 ], [ %.pn13, %53 ], [ %.pn.pn.pn, %36 ]
  call void @_ZN6ngraph7element4TypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn15

56:                                               ; preds = %24
  unreachable
}

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6ngraph4Node22get_input_element_typeEm(ptr noundef nonnull align 8 dereferenceable(680), i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK6ngraph7element4Type10is_dynamicEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZNK6ngraph7element4Type7is_realEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA67_cJRNS_7element4TypeERA3_KcEEERSoS8_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(67), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(3)) local_unnamed_addr #3

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #1 align 2

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

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #5 align 2

declare void @_ZN6ngraph4Node15set_output_typeEmRKNS_7element4TypeERKNS_12PartialShapeE(ptr noundef nonnull align 8 dereferenceable(680), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

declare void @_ZN6ngraph12PartialShape7dynamicENS_9DimensionE(ptr dead_on_unwind writable sret(%"class.ngraph::PartialShape") align 8, i64, i64) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZN6ngraph9Dimension7dynamicEv() local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6 align 2

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

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

!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 = !{!"_ZTSN6ngraph7element6Type_tE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN6ngraph12CheckLocInfoE", !11, i64 0, !12, i64 8, !11, i64 16}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !12, i64 8}
!14 = !{!10, !11, i64 16}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}


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