; LLVM IR from AdaptiveCpp/AdaptiveCpp :: src/runtime (kernel_cache)

; 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.std::array" = type { [2 x i64] }
%class.anon.208 = type { ptr, ptr }

@.str.22 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [63 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 noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv() #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #3

declare noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv() #4

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

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

declare noundef nonnull align 8 dereferenceable(104) ptr @_ZN7hipsycl6common10filesystem18persistent_storage3getEv() #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(160) ptr @_ZN7hipsycl6common10filesystem18persistent_storage15get_this_app_dbEv(ptr noundef nonnull align 8 dereferenceable(104)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7hipsycl2rt12kernel_cache22persistent_cache_storeESt5arrayImLm2EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(97) %0, i64 %1, i64 %2, ptr noundef nonnull align 8 dereferenceable(32) %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.std::array", align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"struct.std::array", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %class.anon.208, align 8
  %14 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 0
  store i64 %1, ptr %14, align 8
  %15 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 1
  store i64 %2, ptr %15, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %3, ptr %7, align 8, !tbaa !5
  %16 = load ptr, ptr %6, align 8
  %17 = call noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv()
  %18 = call noundef zeroext i1 @_ZNK7hipsycl2rt8settings3getILNS0_7settingE14EEENS0_13setting_traitIXT_EE4typeEv(ptr noundef nonnull align 8 dereferenceable(217) %17)
  br i1 %18, label %19, label %20

19:                                               ; preds = %4
  br label %95

20:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %5, i64 16, i1 false), !tbaa.struct !9
  %21 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 0
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 1
  %24 = load i64, ptr %23, align 8
  call void @_ZN7hipsycl2rt12kernel_cache25get_persistent_cache_fileB5cxx11ESt5arrayImLm2EE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, i64 %22, i64 %24)
  %25 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %26 unwind label %31

26:                                               ; preds = %20
  %27 = invoke noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %25)
          to label %28 unwind label %31

28:                                               ; preds = %26
  %29 = icmp sgt i32 3, %27
  br i1 %29, label %30, label %35

30:                                               ; preds = %28
  br label %62

31:                                               ; preds = %89, %87, %83, %81, %79, %77, %75, %73, %68, %66, %62, %41, %39, %37, %35, %26, %20
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %10, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %11, align 4
  br label %100

35:                                               ; preds = %28
  %36 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %37 unwind label %31

37:                                               ; preds = %35
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %36)
          to label %39 unwind label %31

39:                                               ; preds = %37
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef @.str.25)
          to label %41 unwind label %31

41:                                               ; preds = %39
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef @.str.46)
          to label %43 unwind label %31

43:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  invoke void @_ZN7hipsycl2rt20kernel_configuration9to_stringB5cxx11ERKSt5arrayImLm2EE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %44 unwind label %53

44:                                               ; preds = %43
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %46 unwind label %57

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef @.str.47)
          to label %48 unwind label %57

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %50 unwind label %57

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %52 unwind label %57

52:                                               ; preds = %50
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  br label %62

53:                                               ; preds = %43
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %10, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %11, align 4
  br label %61

57:                                               ; preds = %50, %48, %46, %44
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %10, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %61

61:                                               ; preds = %57, %53
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  br label %100

62:                                               ; preds = %52, %30
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = invoke noundef zeroext i1 @_ZN7hipsycl6common10filesystem12atomic_writeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %63)
          to label %65 unwind label %31

65:                                               ; preds = %62
  br i1 %64, label %87, label %66

66:                                               ; preds = %65
  %67 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %68 unwind label %31

68:                                               ; preds = %66
  %69 = invoke noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %67)
          to label %70 unwind label %31

70:                                               ; preds = %68
  %71 = icmp sgt i32 1, %69
  br i1 %71, label %72, label %73

72:                                               ; preds = %70
  br label %86

73:                                               ; preds = %70
  %74 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %75 unwind label %31

75:                                               ; preds = %73
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %74)
          to label %77 unwind label %31

77:                                               ; preds = %75
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef @.str.22)
          to label %79 unwind label %31

79:                                               ; preds = %77
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef @.str.48)
          to label %81 unwind label %31

81:                                               ; preds = %79
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %83 unwind label %31

83:                                               ; preds = %81
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %85 unwind label %31

85:                                               ; preds = %83
  br label %86

86:                                               ; preds = %85, %72
  br label %87

87:                                               ; preds = %86, %65
  %88 = invoke noundef nonnull align 8 dereferenceable(104) ptr @_ZN7hipsycl6common10filesystem18persistent_storage3getEv()
          to label %89 unwind label %31

89:                                               ; preds = %87
  %90 = invoke noundef nonnull align 8 dereferenceable(160) ptr @_ZN7hipsycl6common10filesystem18persistent_storage15get_this_app_dbEv(ptr noundef nonnull align 8 dereferenceable(104) %88)
          to label %91 unwind label %31

91:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %92 = getelementptr inbounds %class.anon.208, ptr %13, i32 0, i32 0
  store ptr %5, ptr %92, align 8, !tbaa !5
  %93 = getelementptr inbounds %class.anon.208, ptr %13, i32 0, i32 1
  store ptr %8, ptr %93, align 8, !tbaa !5
  invoke void @"_ZN7hipsycl6common2db5appdb17read_write_accessIZNKS_2rt12kernel_cache22persistent_cache_storeESt5arrayImLm2EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0EEDaOT_"(ptr noundef nonnull align 8 dereferenceable(160) %90, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %94 unwind label %96

94:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  br label %95

95:                                               ; preds = %94, %19
  ret void

96:                                               ; preds = %91
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %10, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  br label %100

100:                                              ; preds = %96, %61, %31
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  br label %101

101:                                              ; preds = %100
  %102 = load ptr, ptr %10, align 8
  %103 = load i32, ptr %11, align 4
  %104 = insertvalue { ptr, i32 } poison, ptr %102, 0
  %105 = insertvalue { ptr, i32 } %104, i32 %103, 1
  resume { ptr, i32 } %105
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7hipsycl2rt8settings3getILNS0_7settingE14EEENS0_13setting_traitIXT_EE4typeEv(ptr noundef nonnull align 8 dereferenceable(217)) #1 align 2

declare noundef zeroext i1 @_ZN7hipsycl6common10filesystem12atomic_writeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN7hipsycl6common2db5appdb17read_write_accessIZNKS_2rt12kernel_cache22persistent_cache_storeESt5arrayImLm2EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0EEDaOT_"(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(16)) #2 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 = { 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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 = !{i64 0, i64 16, !10}
!10 = !{!7, !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] }
%"struct.std::array" = type { [2 x i64] }
%class.anon.208 = type { ptr, ptr }

@.str.22 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [63 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 noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv() local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

declare noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv() local_unnamed_addr #4

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

declare noundef nonnull align 8 dereferenceable(104) ptr @_ZN7hipsycl6common10filesystem18persistent_storage3getEv() local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(160) ptr @_ZN7hipsycl6common10filesystem18persistent_storage15get_this_app_dbEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7hipsycl2rt12kernel_cache22persistent_cache_storeESt5arrayImLm2EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr nocapture noundef nonnull readnone align 8 dereferenceable(97) %0, i64 %1, i64 %2, ptr noundef nonnull align 8 dereferenceable(32) %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.std::array", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %class.anon.208, align 8
  store i64 %1, ptr %5, align 8
  %9 = getelementptr inbounds i8, ptr %5, i64 8
  store i64 %2, ptr %9, align 8
  %10 = tail call noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv()
  %11 = tail call noundef zeroext i1 @_ZNK7hipsycl2rt8settings3getILNS0_7settingE14EEENS0_13setting_traitIXT_EE4typeEv(ptr noundef nonnull align 8 dereferenceable(217) %10)
  br i1 %11, label %66, label %12

12:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @_ZN7hipsycl2rt12kernel_cache25get_persistent_cache_fileB5cxx11ESt5arrayImLm2EE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, i64 %1, i64 %2)
  %13 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %14 unwind label %17

14:                                               ; preds = %12
  %15 = call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %13)
  %16 = icmp slt i32 %15, 3
  br i1 %16, label %41, label %19

17:                                               ; preds = %60, %58, %56, %54, %51, %49, %44, %41, %24, %21, %19, %12
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %69

19:                                               ; preds = %14
  %20 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %21 unwind label %17

21:                                               ; preds = %19
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %20)
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @.str.25)
          to label %24 unwind label %17

24:                                               ; preds = %21
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull @.str.46)
          to label %26 unwind label %17

26:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  invoke void @_ZN7hipsycl2rt20kernel_configuration9to_stringB5cxx11ERKSt5arrayImLm2EE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %27 unwind label %36

27:                                               ; preds = %26
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %29 unwind label %38

29:                                               ; preds = %27
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @.str.47)
          to label %31 unwind label %38

31:                                               ; preds = %29
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %33 unwind label %38

33:                                               ; preds = %31
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %35 unwind label %38

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

36:                                               ; preds = %26
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %40

38:                                               ; preds = %33, %31, %29, %27
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %40

40:                                               ; preds = %38, %36
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %69

41:                                               ; preds = %14, %35
  %42 = invoke noundef zeroext i1 @_ZN7hipsycl6common10filesystem12atomic_writeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %43 unwind label %17

43:                                               ; preds = %41
  br i1 %42, label %60, label %44

44:                                               ; preds = %43
  %45 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %46 unwind label %17

46:                                               ; preds = %44
  %47 = call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %45)
  %48 = icmp slt i32 %47, 1
  br i1 %48, label %60, label %49

49:                                               ; preds = %46
  %50 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %51 unwind label %17

51:                                               ; preds = %49
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %50)
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull @.str.22)
          to label %54 unwind label %17

54:                                               ; preds = %51
  %55 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @.str.48)
          to label %56 unwind label %17

56:                                               ; preds = %54
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %58 unwind label %17

58:                                               ; preds = %56
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %60 unwind label %17

60:                                               ; preds = %46, %58, %43
  %61 = invoke noundef nonnull align 8 dereferenceable(104) ptr @_ZN7hipsycl6common10filesystem18persistent_storage3getEv()
          to label %62 unwind label %17

62:                                               ; preds = %60
  %63 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZN7hipsycl6common10filesystem18persistent_storage15get_this_app_dbEv(ptr noundef nonnull align 8 dereferenceable(104) %61)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  store ptr %5, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %6, ptr %64, align 8, !tbaa !5
  invoke void @"_ZN7hipsycl6common2db5appdb17read_write_accessIZNKS_2rt12kernel_cache22persistent_cache_storeESt5arrayImLm2EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0EEDaOT_"(ptr noundef nonnull align 8 dereferenceable(160) %63, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %65 unwind label %67

65:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %66

66:                                               ; preds = %4, %65
  ret void

67:                                               ; preds = %62
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %69

69:                                               ; preds = %67, %40, %17
  %.pn6 = phi { ptr, i32 } [ %68, %67 ], [ %18, %17 ], [ %.pn, %40 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  resume { ptr, i32 } %.pn6
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7hipsycl2rt8settings3getILNS0_7settingE14EEENS0_13setting_traitIXT_EE4typeEv(ptr noundef nonnull align 8 dereferenceable(217)) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZN7hipsycl6common10filesystem12atomic_writeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN7hipsycl6common2db5appdb17read_write_accessIZNKS_2rt12kernel_cache22persistent_cache_storeESt5arrayImLm2EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0EEDaOT_"(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 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 = { 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 = { "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 }

!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"}


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