; 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.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.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::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::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::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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #3 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)) #3 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 #3 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)) #1

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

; 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph2op2v020CrossEntropyBackprop28pre_validate_and_infer_typesEv(ptr noundef nonnull align 8 dereferenceable(696) %0) unnamed_addr #3 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
  store ptr %0, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %13 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6ngraph4Node22get_input_element_typeEm(ptr noundef nonnull align 8 dereferenceable(680) %12, i64 noundef 0)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %3, ptr align 4 %13, i64 4, i1 false), !tbaa.struct !9
  br label %14

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

16:                                               ; preds = %14
  br i1 %15, label %57, label %17

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

19:                                               ; preds = %17
  br i1 %18, label %57, label %20

20:                                               ; preds = %19
  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 %21 unwind label %35

21:                                               ; preds = %20
  %22 = getelementptr inbounds i8, ptr %6, i64 16
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA67_cJRNS_7element4TypeERA3_KcEEERSoS8_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %22, 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 %24 unwind label %39

24:                                               ; preds = %21
  store i1 true, ptr %9, align 1
  %25 = call ptr @__cxa_allocate_exception(i64 16) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #8
  %26 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %7, i32 0, i32 0
  store ptr @.str.2, ptr %26, align 8, !tbaa !12
  %27 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %7, i32 0, i32 1
  store i32 230, ptr %27, align 8, !tbaa !15
  %28 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %7, i32 0, i32 2
  store ptr @.str.3, ptr %28, 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 %29 unwind label %43

29:                                               ; preds = %24
  invoke void @_ZN6ngraph21NodeValidationFailureC2ERKNS_12CheckLocInfoEPKNS_4NodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef %12, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %30 unwind label %47

30:                                               ; preds = %29
  store i1 false, ptr %9, align 1
  invoke void @__cxa_throw(ptr %25, ptr @_ZTIN6ngraph21NodeValidationFailureE, ptr @_ZNSt13runtime_errorD2Ev) #9
          to label %90 unwind label %47

31:                                               ; preds = %59, %17, %14
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %4, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %5, align 4
  br label %84

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

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

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

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

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

53:                                               ; preds = %51
  call void @__cxa_free_exception(ptr %25) #8
  br label %54

54:                                               ; preds = %53, %51
  br label %55

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

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

57:                                               ; preds = %19, %16
  br label %58

58:                                               ; preds = %57
  br label %59

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

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

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

73:                                               ; preds = %63
  invoke void @_ZN6ngraph4Node15set_output_typeEmRKNS_7element4TypeERKNS_12PartialShapeE(ptr noundef nonnull align 8 dereferenceable(680) %12, i64 noundef 0, ptr noundef nonnull align 4 dereferenceable(4) %60, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %74 unwind label %79

74:                                               ; preds = %73
  call void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  call void @_ZN6ngraph7element4TypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  ret void

75:                                               ; preds = %63, %61
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %4, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %5, align 4
  br label %83

79:                                               ; preds = %73
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %4, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %5, align 4
  call void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  br label %83

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

84:                                               ; preds = %83, %56, %31
  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 %85

85:                                               ; preds = %84
  %86 = load ptr, ptr %4, align 8
  %87 = load i32, ptr %5, align 4
  %88 = insertvalue { ptr, i32 } poison, ptr %86, 0
  %89 = insertvalue { ptr, i32 } %88, i32 %87, 1
  resume { ptr, i32 } %89

90:                                               ; preds = %30
  unreachable
}

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


; 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::__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.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::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::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 }

@.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

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

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #2 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 #2 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 #2 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 #1

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

; 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph2op2v020CrossEntropyBackprop28pre_validate_and_infer_typesEv(ptr noundef nonnull align 8 dereferenceable(696) %0) unnamed_addr #2 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 230, 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 %.thread19

.thread19:                                        ; 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 %51 unwind label %32

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

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 = %.thread19, %.thread
  %.pn18 = phi { ptr, i32 } [ %31, %.thread ], [ %23, %.thread19 ]
  call void @__cxa_free_exception(ptr %19) #7
  br label %35

35:                                               ; preds = %32, %34, %29
  %.pn.pn = phi { ptr, i32 } [ %.pn18, %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 %50

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 %45

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 %47

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

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

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

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

50:                                               ; preds = %49, %36, %25
  %.pn13.pn = phi { ptr, i32 } [ %.pn13, %49 ], [ %26, %25 ], [ %.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 } %.pn13.pn

51:                                               ; preds = %24
  unreachable
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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}


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