; LLVM IR from lynx-family/primjs :: src/napi/env/napi_env.ll/Z15napi_get_loaderP10napi_env (PP12napi_value__)

; 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.Napi::Env" = type { ptr }
%"class.Napi::Object" = type { %"class.Napi::Value" }
%"class.Napi::Value" = type { ptr, ptr }
%"class.Napi::Function" = type { %"class.Napi::Object" }
%"class.Napi::Object::PropertyLValue" = type { ptr, ptr, ptr }
%"class.Napi::Maybe" = type { i8 }
%"class.(anonymous namespace)::ModuleRegistry" = type { %"class.Napi::Reference", %"class.std::unordered_map" }
%"class.Napi::Reference" = type { ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable.2" }
%"class.std::_Hashtable.2" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z21napi_clear_last_errorP10napi_env__(ptr noundef) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15napi_get_loaderP10napi_env__PP12napi_value__(ptr noundef %0, ptr noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.Napi::Env", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.Napi::Object", align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.Napi::Object", align 8
  %13 = alloca %"class.Napi::Function", align 8
  %14 = alloca %"class.Napi::Object::PropertyLValue", align 8
  %15 = alloca %"class.Napi::Maybe", align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN4Napi3EnvC2EP10napi_env__(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %16)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %17 = call noundef ptr @_ZN4Napi3Env15GetInstanceDataIN12_GLOBAL__N_114ModuleRegistryEvEEPT_v(ptr noundef nonnull align 8 dereferenceable(8) %6)
  store ptr %17, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %37

20:                                               ; preds = %2
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = getelementptr inbounds %"class.(anonymous namespace)::ModuleRegistry", ptr %21, i32 0, i32 0
  %23 = call noundef zeroext i1 @_ZNK4Napi9ReferenceINS_6ObjectEE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(16) %22)
  br i1 %23, label %37, label %24

24:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds %"class.(anonymous namespace)::ModuleRegistry", ptr %25, i32 0, i32 0
  %27 = call { ptr, ptr } @_ZNK4Napi9ReferenceINS_6ObjectEE5ValueEv(ptr noundef nonnull align 8 dereferenceable(16) %26)
  %28 = getelementptr inbounds %"class.Napi::Object", ptr %8, i32 0, i32 0
  %29 = getelementptr inbounds { ptr, ptr }, ptr %28, i32 0, i32 0
  %30 = extractvalue { ptr, ptr } %27, 0
  store ptr %30, ptr %29, align 8
  %31 = getelementptr inbounds { ptr, ptr }, ptr %28, i32 0, i32 1
  %32 = extractvalue { ptr, ptr } %27, 1
  store ptr %32, ptr %31, align 8
  %33 = call noundef ptr @_ZNK4Napi5ValuecvP12napi_value__Ev(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %33, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  %35 = call noundef ptr @_ZNK4Napi3EnvcvP10napi_env__Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %36 = call noundef i32 @_Z21napi_clear_last_errorP10napi_env__(ptr noundef %35)
  store i32 %36, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %72

37:                                               ; preds = %20, %2
  %38 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 72) #9
  call void @llvm.memset.p0.i64(ptr align 16 %38, i8 0, i64 72, i1 false)
  invoke void @_ZN12_GLOBAL__N_114ModuleRegistryC2Ev(ptr noundef nonnull align 8 dereferenceable(72) %38)
          to label %39 unwind label %68

39:                                               ; preds = %37
  store ptr %38, ptr %7, align 8, !tbaa !5
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4Napi3Env15SetInstanceDataIN12_GLOBAL__N_114ModuleRegistryEvEEvPT_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %40)
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  %41 = call noundef ptr @_ZNK4Napi3EnvcvP10napi_env__Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %42 = call { ptr, ptr } @_ZN4Napi6Object3NewEP10napi_env__(ptr noundef %41)
  %43 = getelementptr inbounds %"class.Napi::Object", ptr %12, i32 0, i32 0
  %44 = getelementptr inbounds { ptr, ptr }, ptr %43, i32 0, i32 0
  %45 = extractvalue { ptr, ptr } %42, 0
  store ptr %45, ptr %44, align 8
  %46 = getelementptr inbounds { ptr, ptr }, ptr %43, i32 0, i32 1
  %47 = extractvalue { ptr, ptr } %42, 1
  store ptr %47, ptr %46, align 8
  %48 = call noundef ptr @_ZNK4Napi3EnvcvP10napi_env__Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %49 = call { ptr, ptr } @_ZN4Napi8Function3NewEP10napi_env__PFNS_5ValueERKNS_12CallbackInfoEEPKcPv(ptr noundef %48, ptr noundef @_ZN12_GLOBAL__N_110LoadModuleERKN4Napi12CallbackInfoE, ptr noundef @.str.2, ptr noundef null)
  %50 = getelementptr inbounds %"class.Napi::Function", ptr %13, i32 0, i32 0
  %51 = getelementptr inbounds %"class.Napi::Object", ptr %50, i32 0, i32 0
  %52 = getelementptr inbounds { ptr, ptr }, ptr %51, i32 0, i32 0
  %53 = extractvalue { ptr, ptr } %49, 0
  store ptr %53, ptr %52, align 8
  %54 = getelementptr inbounds { ptr, ptr }, ptr %51, i32 0, i32 1
  %55 = extractvalue { ptr, ptr } %49, 1
  store ptr %55, ptr %54, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #8
  call void @_ZN4Napi6ObjectixEPKc(ptr dead_on_unwind writable sret(%"class.Napi::Object::PropertyLValue") align 8 %14, ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef @.str.2)
  %56 = getelementptr inbounds { ptr, ptr }, ptr %13, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8
  %58 = getelementptr inbounds { ptr, ptr }, ptr %13, i32 0, i32 1
  %59 = load ptr, ptr %58, align 8
  %60 = call i8 @_ZN4Napi6Object14PropertyLValueIPKcEaSINS_8FunctionEEENS_5MaybeIvEET_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr %57, ptr %59)
  %61 = getelementptr inbounds %"class.Napi::Maybe", ptr %15, i32 0, i32 0
  store i8 %60, ptr %61, align 1
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %"class.(anonymous namespace)::ModuleRegistry", ptr %62, i32 0, i32 0
  call void @_ZN4Napi9ReferenceINS_6ObjectEE5ResetERKS1_j(ptr noundef nonnull align 8 dereferenceable(16) %63, ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 1)
  %64 = call noundef ptr @_ZNK4Napi5ValuecvP12napi_value__Ev(ptr noundef nonnull align 8 dereferenceable(16) %12)
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %64, ptr %65, align 8, !tbaa !5
  %66 = call noundef ptr @_ZNK4Napi3EnvcvP10napi_env__Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %67 = call noundef i32 @_Z21napi_clear_last_errorP10napi_env__(ptr noundef %66)
  store i32 %67, ptr %3, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %72

68:                                               ; preds = %37
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %10, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %38, i64 noundef 72) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %74

72:                                               ; preds = %39, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %73 = load i32, ptr %3, align 4
  ret i32 %73

74:                                               ; preds = %68
  %75 = load ptr, ptr %10, align 8
  %76 = load i32, ptr %11, align 4
  %77 = insertvalue { ptr, i32 } poison, ptr %75, 0
  %78 = insertvalue { ptr, i32 } %77, i32 %76, 1
  resume { ptr, i32 } %78
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4Napi3EnvC2EP10napi_env__(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4Napi9ReferenceINS_6ObjectEE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, ptr } @_ZNK4Napi9ReferenceINS_6ObjectEE5ValueEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4Napi3EnvcvP10napi_env__Ev(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_114ModuleRegistryC2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

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

declare { ptr, ptr } @_ZN4Napi6Object3NewEP10napi_env__(ptr noundef) #7

declare { ptr, ptr } @_ZN4Napi8Function3NewEP10napi_env__PFNS_5ValueERKNS_12CallbackInfoEEPKcPv(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #7

; Function Attrs: mustprogress uwtable
declare hidden { ptr, ptr } @_ZN12_GLOBAL__N_110LoadModuleERKN4Napi12CallbackInfoE(ptr noundef nonnull align 8 dereferenceable(112)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4Napi6ObjectixEPKc(ptr dead_on_unwind noalias writable sret(%"class.Napi::Object::PropertyLValue") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i8 @_ZN4Napi6Object14PropertyLValueIPKcEaSINS_8FunctionEEENS_5MaybeIvEET_(ptr noundef nonnull align 8 dereferenceable(24), ptr, ptr) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4Napi9ReferenceINS_6ObjectEE5ResetERKS1_j(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #3 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nobuiltin 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nobuiltin 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 #7 = { "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 = { builtin allocsize(0) }
attributes #10 = { builtin 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"}


; 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.Napi::Env" = type { ptr }
%"class.Napi::Object" = type { %"class.Napi::Value" }
%"class.Napi::Value" = type { ptr, ptr }
%"class.Napi::Object::PropertyLValue" = type { ptr, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z21napi_clear_last_errorP10napi_env__(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15napi_get_loaderP10napi_env__PP12napi_value__(ptr noundef %0, ptr nocapture noundef writeonly %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.Napi::Env", align 8
  %4 = alloca %"class.Napi::Object", align 8
  %5 = alloca %"class.Napi::Object", align 8
  %6 = alloca %"class.Napi::Object::PropertyLValue", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @_ZN4Napi3EnvC2EP10napi_env__(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef %0)
  %7 = call noundef ptr @_ZN4Napi3Env15GetInstanceDataIN12_GLOBAL__N_114ModuleRegistryEvEEPT_v(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %18, label %8

8:                                                ; preds = %2
  %9 = call noundef zeroext i1 @_ZNK4Napi9ReferenceINS_6ObjectEE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  br i1 %9, label %18, label %10

10:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  %11 = call { ptr, ptr } @_ZNK4Napi9ReferenceINS_6ObjectEE5ValueEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  %12 = extractvalue { ptr, ptr } %11, 0
  store ptr %12, ptr %4, align 8
  %13 = getelementptr inbounds i8, ptr %4, i64 8
  %14 = extractvalue { ptr, ptr } %11, 1
  store ptr %14, ptr %13, align 8
  %15 = call noundef ptr @_ZNK4Napi5ValuecvP12napi_value__Ev(ptr noundef nonnull align 8 dereferenceable(16) %4)
  store ptr %15, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  %16 = call noundef ptr @_ZNK4Napi3EnvcvP10napi_env__Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %17 = call noundef i32 @_Z21napi_clear_last_errorP10napi_env__(ptr noundef %16)
  br label %36

18:                                               ; preds = %8, %2
  %19 = call noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(72) %19, i8 0, i64 72, i1 false)
  invoke void @_ZN12_GLOBAL__N_114ModuleRegistryC2Ev(ptr noundef nonnull align 8 dereferenceable(72) %19)
          to label %20 unwind label %34

20:                                               ; preds = %18
  call void @_ZN4Napi3Env15SetInstanceDataIN12_GLOBAL__N_114ModuleRegistryEvEEvPT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %19)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  %21 = call noundef ptr @_ZNK4Napi3EnvcvP10napi_env__Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %22 = call { ptr, ptr } @_ZN4Napi6Object3NewEP10napi_env__(ptr noundef %21)
  %23 = extractvalue { ptr, ptr } %22, 0
  store ptr %23, ptr %5, align 8
  %24 = getelementptr inbounds i8, ptr %5, i64 8
  %25 = extractvalue { ptr, ptr } %22, 1
  store ptr %25, ptr %24, align 8
  %26 = call noundef ptr @_ZNK4Napi3EnvcvP10napi_env__Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %27 = call { ptr, ptr } @_ZN4Napi8Function3NewEP10napi_env__PFNS_5ValueERKNS_12CallbackInfoEEPKcPv(ptr noundef %26, ptr noundef nonnull @_ZN12_GLOBAL__N_110LoadModuleERKN4Napi12CallbackInfoE, ptr noundef nonnull @.str.2, ptr noundef null)
  %28 = extractvalue { ptr, ptr } %27, 0
  %29 = extractvalue { ptr, ptr } %27, 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  call void @_ZN4Napi6ObjectixEPKc(ptr dead_on_unwind nonnull writable sret(%"class.Napi::Object::PropertyLValue") align 8 %6, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull @.str.2)
  %30 = call i8 @_ZN4Napi6Object14PropertyLValueIPKcEaSINS_8FunctionEEENS_5MaybeIvEET_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr %28, ptr %29)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  call void @_ZN4Napi9ReferenceINS_6ObjectEE5ResetERKS1_j(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef 1)
  %31 = call noundef ptr @_ZNK4Napi5ValuecvP12napi_value__Ev(ptr noundef nonnull align 8 dereferenceable(16) %5)
  store ptr %31, ptr %1, align 8, !tbaa !5
  %32 = call noundef ptr @_ZNK4Napi3EnvcvP10napi_env__Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %33 = call noundef i32 @_Z21napi_clear_last_errorP10napi_env__(ptr noundef %32)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  br label %36

34:                                               ; preds = %18
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %19, i64 noundef 72) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  resume { ptr, i32 } %35

36:                                               ; preds = %20, %10
  %.0 = phi i32 [ %33, %20 ], [ %17, %10 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  ret i32 %.0
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4Napi3EnvC2EP10napi_env__(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4Napi9ReferenceINS_6ObjectEE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, ptr } @_ZNK4Napi9ReferenceINS_6ObjectEE5ValueEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4Napi3EnvcvP10napi_env__Ev(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_114ModuleRegistryC2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #6

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

declare { ptr, ptr } @_ZN4Napi6Object3NewEP10napi_env__(ptr noundef) local_unnamed_addr #7

declare { ptr, ptr } @_ZN4Napi8Function3NewEP10napi_env__PFNS_5ValueERKNS_12CallbackInfoEEPKcPv(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare hidden { ptr, ptr } @_ZN12_GLOBAL__N_110LoadModuleERKN4Napi12CallbackInfoE(ptr noundef nonnull align 8 dereferenceable(112)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4Napi6ObjectixEPKc(ptr dead_on_unwind noalias writable sret(%"class.Napi::Object::PropertyLValue") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i8 @_ZN4Napi6Object14PropertyLValueIPKcEaSINS_8FunctionEEENS_5MaybeIvEET_(ptr noundef nonnull align 8 dereferenceable(24), ptr, ptr) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4Napi9ReferenceINS_6ObjectEE5ResetERKS1_j(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nobuiltin 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nobuiltin 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 #7 = { "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 = { builtin allocsize(0) }
attributes #10 = { builtin 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: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass