; LLVM IR from openvinotoolkit/model_server :: src/test/custom_nodes (node_perform_different_operations)

; 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] }
%struct.CustomNodeTensorInfo = type { ptr, ptr, i64, i32 }

@_ZL17INPUT_TENSOR_NAMEB5cxx11 = external hidden global %"class.std::__cxx11::basic_string", align 8
@_ZL19FACTORS_TENSOR_NAMEB5cxx11 = external hidden global %"class.std::__cxx11::basic_string", align 8

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local i32 @getInputsInfo(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) #1 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  %11 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 2, ptr %11, align 4, !tbaa !9
  %12 = load ptr, ptr %7, align 8, !tbaa !5
  %13 = load i32, ptr %12, align 4, !tbaa !9
  %14 = sext i32 %13 to i64
  %15 = mul i64 %14, 32
  %16 = call noalias ptr @malloc(i64 noundef %15) #2
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %16, ptr %17, align 8, !tbaa !5
  %18 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZL17INPUT_TENSOR_NAMEB5cxx11) #3
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %20, i64 0
  %22 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %21, i32 0, i32 0
  store ptr %18, ptr %22, align 8, !tbaa !11
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %24, i64 0
  %26 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %25, i32 0, i32 3
  store i32 1, ptr %26, align 8, !tbaa !15
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %28, i64 0
  %30 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %29, i32 0, i32 2
  store i64 2, ptr %30, align 8, !tbaa !16
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %32, i64 0
  %34 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %33, i32 0, i32 2
  %35 = load i64, ptr %34, align 8, !tbaa !16
  %36 = mul i64 %35, 8
  %37 = call noalias ptr @malloc(i64 noundef %36) #2
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %39, i64 0
  %41 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %40, i32 0, i32 1
  store ptr %37, ptr %41, align 8, !tbaa !17
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %43, i64 0
  %45 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %44, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !17
  %47 = getelementptr inbounds i64, ptr %46, i64 0
  store i64 1, ptr %47, align 8, !tbaa !18
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %49, i64 0
  %51 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %50, i32 0, i32 1
  %52 = load ptr, ptr %51, align 8, !tbaa !17
  %53 = getelementptr inbounds i64, ptr %52, i64 1
  store i64 10, ptr %53, align 8, !tbaa !18
  %54 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZL19FACTORS_TENSOR_NAMEB5cxx11) #3
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %56, i64 1
  %58 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %57, i32 0, i32 0
  store ptr %54, ptr %58, align 8, !tbaa !11
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %60, i64 1
  %62 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %61, i32 0, i32 3
  store i32 1, ptr %62, align 8, !tbaa !15
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %64, i64 1
  %66 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %65, i32 0, i32 2
  store i64 2, ptr %66, align 8, !tbaa !16
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %68, i64 0
  %70 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %69, i32 0, i32 2
  %71 = load i64, ptr %70, align 8, !tbaa !16
  %72 = mul i64 %71, 8
  %73 = call noalias ptr @malloc(i64 noundef %72) #2
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %75, i64 1
  %77 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %76, i32 0, i32 1
  store ptr %73, ptr %77, align 8, !tbaa !17
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %79, i64 1
  %81 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %80, i32 0, i32 1
  %82 = load ptr, ptr %81, align 8, !tbaa !17
  %83 = getelementptr inbounds i64, ptr %82, i64 0
  store i64 1, ptr %83, align 8, !tbaa !18
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %85, i64 1
  %87 = getelementptr inbounds %struct.CustomNodeTensorInfo, ptr %86, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !17
  %89 = getelementptr inbounds i64, ptr %88, i64 1
  store i64 4, ptr %89, align 8, !tbaa !18
  ret i32 0
}

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

attributes #0 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind allocsize(0) }
attributes #3 = { 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 0}
!12 = !{!"_ZTS20CustomNodeTensorInfo", !6, i64 0, !6, i64 8, !13, i64 16, !14, i64 24}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTS25CustomNodeTensorPrecision", !7, i64 0}
!15 = !{!12, !14, i64 24}
!16 = !{!12, !13, i64 16}
!17 = !{!12, !6, i64 8}
!18 = !{!13, !13, 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::__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] }

@_ZL17INPUT_TENSOR_NAMEB5cxx11 = external hidden global %"class.std::__cxx11::basic_string", align 8
@_ZL19FACTORS_TENSOR_NAMEB5cxx11 = external hidden global %"class.std::__cxx11::basic_string", align 8

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @getInputsInfo(ptr nocapture noundef %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef readnone %2, i32 noundef %3, ptr nocapture noundef readnone %4) local_unnamed_addr #1 {
  store i32 2, ptr %1, align 4, !tbaa !5
  %6 = tail call noalias dereferenceable_or_null(64) ptr @malloc(i64 noundef 64) #2
  store ptr %6, ptr %0, align 8, !tbaa !9
  %7 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZL17INPUT_TENSOR_NAMEB5cxx11) #3
  %8 = load ptr, ptr %0, align 8, !tbaa !9
  store ptr %7, ptr %8, align 8, !tbaa !11
  %9 = load ptr, ptr %0, align 8, !tbaa !9
  %10 = getelementptr inbounds i8, ptr %9, i64 24
  store i32 1, ptr %10, align 8, !tbaa !15
  %11 = getelementptr inbounds i8, ptr %9, i64 16
  store i64 2, ptr %11, align 8, !tbaa !16
  %12 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #2
  %13 = getelementptr inbounds i8, ptr %9, i64 8
  store ptr %12, ptr %13, align 8, !tbaa !17
  %14 = load ptr, ptr %0, align 8, !tbaa !9
  %15 = getelementptr inbounds i8, ptr %14, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !17
  store i64 1, ptr %16, align 8, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  store i64 10, ptr %17, align 8, !tbaa !18
  %18 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZL19FACTORS_TENSOR_NAMEB5cxx11) #3
  %19 = load ptr, ptr %0, align 8, !tbaa !9
  %20 = getelementptr inbounds i8, ptr %19, i64 32
  store ptr %18, ptr %20, align 8, !tbaa !11
  %21 = load ptr, ptr %0, align 8, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %21, i64 56
  store i32 1, ptr %22, align 8, !tbaa !15
  %23 = getelementptr inbounds i8, ptr %21, i64 48
  store i64 2, ptr %23, align 8, !tbaa !16
  %24 = getelementptr inbounds i8, ptr %21, i64 16
  %25 = load i64, ptr %24, align 8, !tbaa !16
  %26 = shl i64 %25, 3
  %27 = tail call noalias ptr @malloc(i64 noundef %26) #2
  %28 = getelementptr inbounds i8, ptr %21, i64 40
  store ptr %27, ptr %28, align 8, !tbaa !17
  %29 = load ptr, ptr %0, align 8, !tbaa !9
  %30 = getelementptr inbounds i8, ptr %29, i64 40
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  store i64 1, ptr %31, align 8, !tbaa !18
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  store i64 4, ptr %32, align 8, !tbaa !18
  ret i32 0
}

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

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind allocsize(0) }
attributes #3 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS20CustomNodeTensorInfo", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 24}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTS25CustomNodeTensorPrecision", !7, i64 0}
!15 = !{!12, !14, i64 24}
!16 = !{!12, !13, i64 16}
!17 = !{!12, !10, i64 8}
!18 = !{!13, !13, i64 0}


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