; LLVM IR from NervanaSystems/ngraph :: src/runtime/gpu (gpu_cuda_kernel_builder)

; 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::CodeWriter" = type { i64, %"class.std::__cxx11::basic_stringstream", i8, i64 }
%"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 }

@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.553 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.554 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.555 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.556 = external hidden unnamed_addr constant [3 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA2_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416), ptr noundef nonnull align 1 dereferenceable(2)) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416), ptr noundef nonnull align 1 dereferenceable(3)) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsImEERNS_10CodeWriterES2_RKT_(ptr noundef nonnull align 8 dereferenceable(416), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA28_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416), ptr noundef nonnull align 1 dereferenceable(28)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph7runtime3gpu17CudaKernelBuilder17get_device_helperERNS_10CodeWriterERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_RKSt6vectorISA_SaISA_EE(ptr noundef nonnull align 8 dereferenceable(416) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  %16 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #3
  %17 = icmp ne i64 %16, 0
  br i1 %17, label %18, label %85

18:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  %20 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #3
  %21 = sub i64 %20, 1
  store i64 %21, ptr %9, align 8, !tbaa !9
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA28_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %22, ptr noundef nonnull align 1 dereferenceable(28) @.str.20)
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = load i64, ptr %9, align 8, !tbaa !9
  %26 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %25) #3
  %27 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERNS_10CodeWriterES8_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %23, ptr noundef nonnull align 8 dereferenceable(32) %26)
  %28 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA2_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %27, ptr noundef nonnull align 1 dereferenceable(2) @.str.21)
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERNS_10CodeWriterES8_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %28, ptr noundef nonnull align 8 dereferenceable(32) %29)
  %31 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA2_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %30, ptr noundef nonnull align 1 dereferenceable(2) @.str.11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %32

32:                                               ; preds = %47, %18
  %33 = load i64, ptr %10, align 8, !tbaa !9
  %34 = load i64, ptr %9, align 8, !tbaa !9
  %35 = sub i64 %34, 1
  %36 = icmp ult i64 %33, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %50

38:                                               ; preds = %32
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load i64, ptr %10, align 8, !tbaa !9
  %42 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %41) #3
  %43 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERNS_10CodeWriterES8_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %39, ptr noundef nonnull align 8 dereferenceable(32) %42)
  %44 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %43, ptr noundef nonnull align 1 dereferenceable(3) @.str.553)
  %45 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsImEERNS_10CodeWriterES2_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %44, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %46 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %45, ptr noundef nonnull align 1 dereferenceable(3) @.str.28)
  br label %47

47:                                               ; preds = %38
  %48 = load i64, ptr %10, align 8, !tbaa !9
  %49 = add i64 %48, 1
  store i64 %49, ptr %10, align 8, !tbaa !9
  br label %32, !llvm.loop !11

50:                                               ; preds = %37
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = load i64, ptr %9, align 8, !tbaa !9
  %54 = sub i64 %53, 1
  %55 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %54) #3
  %56 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERNS_10CodeWriterES8_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %51, ptr noundef nonnull align 8 dereferenceable(32) %55)
  %57 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %56, ptr noundef nonnull align 1 dereferenceable(3) @.str.553)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %58 = load i64, ptr %9, align 8, !tbaa !9
  %59 = sub i64 %58, 1
  store i64 %59, ptr %11, align 8, !tbaa !9
  %60 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsImEERNS_10CodeWriterES2_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %57, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %61, ptr noundef nonnull align 1 dereferenceable(3) @.str.138)
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %63, ptr noundef nonnull align 1 dereferenceable(3) @.str.554)
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.ngraph::CodeWriter", ptr %65, i32 0, i32 0
  %67 = load i64, ptr %66, align 8, !tbaa !13
  %68 = add i64 %67, 1
  store i64 %68, ptr %66, align 8, !tbaa !13
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #3
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef @.str.555, ptr noundef nonnull align 8 dereferenceable(32) %70)
  %71 = invoke noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERNS_10CodeWriterES8_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %69, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %72 unwind label %81

72:                                               ; preds = %50
  %73 = invoke noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %71, ptr noundef nonnull align 1 dereferenceable(3) @.str.71)
          to label %74 unwind label %81

74:                                               ; preds = %72
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #3
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %"class.ngraph::CodeWriter", ptr %75, i32 0, i32 0
  %77 = load i64, ptr %76, align 8, !tbaa !13
  %78 = add i64 %77, -1
  store i64 %78, ptr %76, align 8, !tbaa !13
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %79, ptr noundef nonnull align 1 dereferenceable(3) @.str.556)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %85

81:                                               ; preds = %72, %50
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %13, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %86

85:                                               ; preds = %74, %4
  ret void

86:                                               ; preds = %81
  %87 = load ptr, ptr %13, align 8
  %88 = load i32, ptr %14, align 4
  %89 = insertvalue { ptr, i32 } poison, ptr %87, 0
  %90 = insertvalue { ptr, i32 } %89, i32 %88, 1
  resume { ptr, i32 } %90
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN6ngraph10CodeWriterE", !10, i64 0, !15, i64 8, !25, i64 400, !10, i64 408}
!15 = !{!"_ZTSNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE", !16, i64 0, !19, i64 24}
!16 = !{!"_ZTSSd", !17, i64 0, !18, i64 16}
!17 = !{!"_ZTSSi", !10, i64 8}
!18 = !{!"_ZTSSo"}
!19 = !{!"_ZTSNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE", !20, i64 0, !22, i64 64, !23, i64 72}
!20 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !21, i64 56}
!21 = !{!"_ZTSSt6locale", !6, i64 0}
!22 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !10, i64 8, !7, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!25 = !{!"bool", !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::__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] }

@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.553 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.554 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.555 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.556 = external hidden unnamed_addr constant [3 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA2_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416), ptr noundef nonnull align 1 dereferenceable(2)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416), ptr noundef nonnull align 1 dereferenceable(3)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA28_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416), ptr noundef nonnull align 1 dereferenceable(28)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph7runtime3gpu17CudaKernelBuilder17get_device_helperERNS_10CodeWriterERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_RKSt6vectorISA_SaISA_EE(ptr noundef nonnull align 8 dereferenceable(416) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #3
  %.not = icmp eq i64 %8, 0
  br i1 %.not, label %44, label %9

9:                                                ; preds = %4
  %10 = tail call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #3
  %11 = add i64 %10, -1
  %12 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA28_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %0, ptr noundef nonnull align 1 dereferenceable(28) @.str.20)
  %13 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %11) #3
  %14 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERNS_10CodeWriterES8_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %12, ptr noundef nonnull align 8 dereferenceable(32) %13)
  %15 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA2_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %14, ptr noundef nonnull align 1 dereferenceable(2) @.str.21)
  %16 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERNS_10CodeWriterES8_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %15, ptr noundef nonnull align 8 dereferenceable(32) %1)
  %17 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA2_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %16, ptr noundef nonnull align 1 dereferenceable(2) @.str.11)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %18 = add i64 %10, -2
  store i64 0, ptr %5, align 8, !tbaa !5
  %.not23 = icmp eq i64 %18, 0
  br i1 %.not23, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %19 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %18) #3
  %20 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERNS_10CodeWriterES8_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %0, ptr noundef nonnull align 8 dereferenceable(32) %19)
  %21 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %20, ptr noundef nonnull align 1 dereferenceable(3) @.str.553)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  store i64 %18, ptr %6, align 8, !tbaa !5
  %22 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsImEERNS_10CodeWriterES2_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %21, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  %23 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %0, ptr noundef nonnull align 1 dereferenceable(3) @.str.138)
  %24 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %0, ptr noundef nonnull align 1 dereferenceable(3) @.str.554)
  %25 = load i64, ptr %0, align 8, !tbaa !9
  %26 = add i64 %25, 1
  store i64 %26, ptr %0, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #3
  call void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull @.str.555, ptr noundef nonnull align 8 dereferenceable(32) %2)
  %27 = invoke noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERNS_10CodeWriterES8_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %0, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %36 unwind label %42

.lr.ph:                                           ; preds = %9, %.lr.ph
  %storemerge22 = phi i64 [ %34, %.lr.ph ], [ 0, %9 ]
  %28 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %storemerge22) #3
  %29 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERNS_10CodeWriterES8_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %0, ptr noundef nonnull align 8 dereferenceable(32) %28)
  %30 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %29, ptr noundef nonnull align 1 dereferenceable(3) @.str.553)
  %31 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsImEERNS_10CodeWriterES2_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %30, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %32 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %31, ptr noundef nonnull align 1 dereferenceable(3) @.str.28)
  %33 = load i64, ptr %5, align 8, !tbaa !5
  %34 = add i64 %33, 1
  store i64 %34, ptr %5, align 8, !tbaa !5
  %35 = icmp ult i64 %34, %18
  br i1 %35, label %.lr.ph, label %._crit_edge, !llvm.loop !23

36:                                               ; preds = %._crit_edge
  %37 = invoke noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %27, ptr noundef nonnull align 1 dereferenceable(3) @.str.71)
          to label %38 unwind label %42

38:                                               ; preds = %36
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #3
  %39 = load i64, ptr %0, align 8, !tbaa !9
  %40 = add i64 %39, -1
  store i64 %40, ptr %0, align 8, !tbaa !9
  %41 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZN6ngraphlsIA3_cEERNS_10CodeWriterES3_RKT_(ptr noundef nonnull align 8 dereferenceable(416) %0, ptr noundef nonnull align 1 dereferenceable(3) @.str.556)
  br label %44

42:                                               ; preds = %36, %._crit_edge
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #3
  resume { ptr, i32 } %43

44:                                               ; preds = %38, %4
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN6ngraph10CodeWriterE", !6, i64 0, !11, i64 8, !22, i64 400, !6, i64 408}
!11 = !{!"_ZTSNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE", !12, i64 0, !15, i64 24}
!12 = !{!"_ZTSSd", !13, i64 0, !14, i64 16}
!13 = !{!"_ZTSSi", !6, i64 8}
!14 = !{!"_ZTSSo"}
!15 = !{!"_ZTSNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE", !16, i64 0, !19, i64 64, !20, i64 72}
!16 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !18, i64 56}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!"_ZTSSt6locale", !17, i64 0}
!19 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !6, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !17, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass