; LLVM IR from cashapp/zipline :: zipline/native/Context.ll (ZNK7Context16throwJsExceptionEP7JNIEnv_RK7JSValue)

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

%struct.JSValue = type { %union.JSValueUnion, i64 }
%union.JSValueUnion = type { double }
%class.Context = type { ptr, i32, ptr, ptr, ptr, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::vector", %"class.std::unordered_map" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<InboundCallChannel *, std::allocator<InboundCallChannel *>>::_Vector_impl" }
%"struct.std::_Vector_base<InboundCallChannel *, std::allocator<InboundCallChannel *>>::_Vector_impl" = type { %"struct.std::_Vector_base<InboundCallChannel *, std::allocator<InboundCallChannel *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<InboundCallChannel *, std::allocator<InboundCallChannel *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = 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.35 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [43 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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7Context16throwJsExceptionEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(16) %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.JSValue, align 8
  %8 = alloca %struct.JSValue, align 8
  %9 = alloca %struct.JSValue, align 8
  %10 = alloca %struct.JSValue, align 8
  %11 = alloca %struct.JSValue, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %struct.JSValue, align 8
  %14 = alloca %struct.JSValue, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %struct.JSValue, align 8
  %17 = alloca %struct.JSValue, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %21 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  %22 = getelementptr inbounds %class.Context, ptr %21, i32 0, i32 3
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = call { i64, i64 } @JS_GetException(ptr noundef %23)
  %25 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 0
  %26 = extractvalue { i64, i64 } %24, 0
  store i64 %26, ptr %25, align 8
  %27 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 1
  %28 = extractvalue { i64, i64 } %24, 1
  store i64 %28, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  %29 = getelementptr inbounds %class.Context, ptr %21, i32 0, i32 3
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !22
  %31 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 0
  %32 = load i64, ptr %31, align 8
  %33 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 1
  %34 = load i64, ptr %33, align 8
  %35 = call { i64, i64 } @JS_GetPropertyStr(ptr noundef %30, i64 %32, i64 %34, ptr noundef @.str.35)
  %36 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 0
  %37 = extractvalue { i64, i64 } %35, 0
  store i64 %37, ptr %36, align 8
  %38 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 1
  %39 = extractvalue { i64, i64 } %35, 1
  store i64 %39, ptr %38, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  %40 = getelementptr inbounds %class.Context, ptr %21, i32 0, i32 3
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !22
  %42 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 0
  %43 = load i64, ptr %42, align 8
  %44 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 1
  %45 = load i64, ptr %44, align 8
  %46 = call { i64, i64 } @JS_GetPropertyStr(ptr noundef %41, i64 %43, i64 %45, ptr noundef @.str.36)
  %47 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %48 = extractvalue { i64, i64 } %46, 0
  store i64 %48, ptr %47, align 8
  %49 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %50 = extractvalue { i64, i64 } %46, 1
  store i64 %50, ptr %49, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !22
  %52 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 0
  %53 = load i64, ptr %52, align 8
  %54 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 1
  %55 = load i64, ptr %54, align 8
  %56 = call noundef i32 @_ZL14JS_IsUndefined7JSValue(i64 %53, i64 %55)
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %3
  br label %60

59:                                               ; preds = %3
  br label %60

60:                                               ; preds = %59, %58
  %61 = phi ptr [ %7, %58 ], [ %8, %59 ]
  %62 = call noundef ptr @_ZNK7Context12toJavaStringEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280) %21, ptr noundef %51, ptr noundef nonnull align 8 dereferenceable(16) %61)
  store ptr %62, ptr %12, align 8, !tbaa !5
  %63 = getelementptr inbounds %class.Context, ptr %21, i32 0, i32 3
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !22
  %65 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 0
  %66 = load i64, ptr %65, align 8
  %67 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 1
  %68 = load i64, ptr %67, align 8
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %64, i64 %66, i64 %68)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = call noundef ptr @_ZNK7Context12toJavaStringEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280) %21, ptr noundef %69, ptr noundef nonnull align 8 dereferenceable(16) %10)
  store ptr %70, ptr %15, align 8, !tbaa !5
  %71 = getelementptr inbounds %class.Context, ptr %21, i32 0, i32 3
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %10, i64 16, i1 false), !tbaa.struct !22
  %73 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 0
  %74 = load i64, ptr %73, align 8
  %75 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 1
  %76 = load i64, ptr %75, align 8
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %72, i64 %74, i64 %76)
  %77 = getelementptr inbounds %class.Context, ptr %21, i32 0, i32 3
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !22
  %79 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 0
  %80 = load i64, ptr %79, align 8
  %81 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 1
  %82 = load i64, ptr %81, align 8
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %78, i64 %80, i64 %82)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %83 = getelementptr inbounds %class.Context, ptr %21, i32 0, i32 3
  %84 = load ptr, ptr %83, align 8, !tbaa !9
  %85 = call ptr @JS_GetContextOpaque(ptr noundef %84)
  store ptr %85, ptr %18, align 8, !tbaa !5
  %86 = getelementptr inbounds %class.Context, ptr %21, i32 0, i32 3
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  call void @JS_SetContextOpaque(ptr noundef %87, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %88 = load ptr, ptr %18, align 8, !tbaa !5
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %106

90:                                               ; preds = %60
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = load ptr, ptr %18, align 8, !tbaa !5
  %93 = call noundef ptr @_ZN7JNIEnv_11NewLocalRefEP8_jobject(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef %92)
  store ptr %93, ptr %19, align 8, !tbaa !5
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN7JNIEnv_15DeleteGlobalRefEP8_jobject(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef %95)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %class.Context, ptr %21, i32 0, i32 16
  %98 = load ptr, ptr %97, align 8, !tbaa !25
  %99 = call noundef ptr @_ZN7JNIEnv_17GetStaticMethodIDEP7_jclassPKcS3_(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef %98, ptr noundef @.str.37, ptr noundef @.str.38)
  store ptr %99, ptr %20, align 8, !tbaa !5
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %class.Context, ptr %21, i32 0, i32 16
  %102 = load ptr, ptr %101, align 8, !tbaa !25
  %103 = load ptr, ptr %20, align 8, !tbaa !5
  %104 = load ptr, ptr %19, align 8, !tbaa !5
  %105 = load ptr, ptr %15, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @_ZN7JNIEnv_20CallStaticVoidMethodEP7_jclassP10_jmethodIDz(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef %102, ptr noundef %103, ptr noundef %104, ptr noundef %105)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %115

106:                                              ; preds = %60
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %class.Context, ptr %21, i32 0, i32 16
  %109 = load ptr, ptr %108, align 8, !tbaa !25
  %110 = getelementptr inbounds %class.Context, ptr %21, i32 0, i32 23
  %111 = load ptr, ptr %110, align 8, !tbaa !26
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = load ptr, ptr %15, align 8, !tbaa !5
  %114 = call noundef ptr (ptr, ptr, ptr, ...) @_ZN7JNIEnv_9NewObjectEP7_jclassP10_jmethodIDz(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef %109, ptr noundef %111, ptr noundef %112, ptr noundef %113)
  store ptr %114, ptr %19, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %106, %90
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN7JNIEnv_14DeleteLocalRefEP8_jobject(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef %117)
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN7JNIEnv_14DeleteLocalRefEP8_jobject(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef %119)
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = load ptr, ptr %19, align 8, !tbaa !5
  %122 = call noundef i32 @_ZN7JNIEnv_5ThrowEP11_jthrowable(ptr noundef nonnull align 8 dereferenceable(8) %120, ptr noundef %121)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef, i64, i64) #3

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

declare { i64, i64 } @JS_GetPropertyStr(ptr noundef, i64, i64, ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL14JS_IsUndefined7JSValue(i64, i64) #5

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

declare { i64, i64 } @JS_GetException(ptr noundef) #4

declare ptr @JS_GetContextOpaque(ptr noundef) #4

declare void @JS_SetContextOpaque(ptr noundef, ptr noundef) #4

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = !{!10, !6, i64 24}
!10 = !{!"_ZTS7Context", !6, i64 0, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !12, i64 200, !16, i64 224}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIP18InboundCallChannelSaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIP18InboundCallChannelSaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIP18InboundCallChannelSaIS1_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIP18InboundCallChannelSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7_jclassSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE", !17, i64 0}
!17 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P7_jclassESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !18, i64 8, !19, i64 16, !18, i64 24, !20, i64 32, !6, i64 48}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!20 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !21, i64 0, !18, i64 8}
!21 = !{!"float", !7, i64 0}
!22 = !{i64 0, i64 8, !23, i64 8, i64 8, !24}
!23 = !{!7, !7, i64 0}
!24 = !{!18, !18, i64 0}
!25 = !{!10, !6, i64 112}
!26 = !{!10, !6, i64 168}


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

%struct.JSValue = type { %union.JSValueUnion, i64 }
%union.JSValueUnion = type { double }

@.str.35 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [43 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

; 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 uwtable
declare dso_local noundef ptr @_ZN7JNIEnv_17GetStaticMethodIDEP7_jclassPKcS3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7Context16throwJsExceptionEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280) %0, ptr noundef %1, ptr nocapture noundef nonnull readnone align 8 dereferenceable(16) %2) local_unnamed_addr #1 align 2 {
  %4 = alloca %struct.JSValue, align 8
  %5 = alloca %struct.JSValue, align 8
  %6 = alloca %struct.JSValue, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = tail call { i64, i64 } @JS_GetException(ptr noundef %8)
  %10 = extractvalue { i64, i64 } %9, 0
  store i64 %10, ptr %4, align 8
  %11 = getelementptr inbounds i8, ptr %4, i64 8
  %12 = extractvalue { i64, i64 } %9, 1
  store i64 %12, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %13 = load ptr, ptr %7, align 8, !tbaa !5
  %14 = tail call { i64, i64 } @JS_GetPropertyStr(ptr noundef %13, i64 %10, i64 %12, ptr noundef nonnull @.str.35)
  %15 = extractvalue { i64, i64 } %14, 0
  store i64 %15, ptr %5, align 8
  %16 = getelementptr inbounds i8, ptr %5, i64 8
  %17 = extractvalue { i64, i64 } %14, 1
  store i64 %17, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = tail call { i64, i64 } @JS_GetPropertyStr(ptr noundef %18, i64 %10, i64 %12, ptr noundef nonnull @.str.36)
  %20 = extractvalue { i64, i64 } %19, 0
  store i64 %20, ptr %6, align 8
  %21 = getelementptr inbounds i8, ptr %6, i64 8
  %22 = extractvalue { i64, i64 } %19, 1
  store i64 %22, ptr %21, align 8
  %23 = tail call noundef i32 @_ZL14JS_IsUndefined7JSValue(i64 %15, i64 %17)
  %.not = icmp eq i32 %23, 0
  %. = select i1 %.not, ptr %5, ptr %4
  %24 = call noundef ptr @_ZNK7Context12toJavaStringEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(16) %.)
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %.sroa.011.0.copyload = load i64, ptr %5, align 8, !tbaa !21
  %.sroa.212.0.copyload = load i64, ptr %16, align 8, !tbaa !22
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %25, i64 %.sroa.011.0.copyload, i64 %.sroa.212.0.copyload)
  %26 = call noundef ptr @_ZNK7Context12toJavaStringEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %.sroa.06.0.copyload = load i64, ptr %6, align 8, !tbaa !21
  %.sroa.27.0.copyload = load i64, ptr %21, align 8, !tbaa !22
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %27, i64 %.sroa.06.0.copyload, i64 %.sroa.27.0.copyload)
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %.sroa.0.0.copyload = load i64, ptr %4, align 8, !tbaa !21
  %.sroa.2.0.copyload = load i64, ptr %11, align 8, !tbaa !22
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %28, i64 %.sroa.0.0.copyload, i64 %.sroa.2.0.copyload)
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = call ptr @JS_GetContextOpaque(ptr noundef %29)
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  call void @JS_SetContextOpaque(ptr noundef %31, ptr noundef null)
  %.not33 = icmp eq ptr %30, null
  br i1 %.not33, label %38, label %32

32:                                               ; preds = %3
  %33 = call noundef ptr @_ZN7JNIEnv_11NewLocalRefEP8_jobject(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %30)
  call void @_ZN7JNIEnv_15DeleteGlobalRefEP8_jobject(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %30)
  %34 = getelementptr inbounds i8, ptr %0, i64 112
  %35 = load ptr, ptr %34, align 8, !tbaa !23
  %36 = call noundef ptr @_ZN7JNIEnv_17GetStaticMethodIDEP7_jclassPKcS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %35, ptr noundef nonnull @.str.37, ptr noundef nonnull @.str.38)
  %37 = load ptr, ptr %34, align 8, !tbaa !23
  call void (ptr, ptr, ptr, ...) @_ZN7JNIEnv_20CallStaticVoidMethodEP7_jclassP10_jmethodIDz(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %37, ptr noundef %36, ptr noundef %33, ptr noundef %26)
  br label %44

38:                                               ; preds = %3
  %39 = getelementptr inbounds i8, ptr %0, i64 112
  %40 = load ptr, ptr %39, align 8, !tbaa !23
  %41 = getelementptr inbounds i8, ptr %0, i64 168
  %42 = load ptr, ptr %41, align 8, !tbaa !24
  %43 = call noundef ptr (ptr, ptr, ptr, ...) @_ZN7JNIEnv_9NewObjectEP7_jclassP10_jmethodIDz(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %40, ptr noundef %42, ptr noundef %24, ptr noundef %26)
  br label %44

44:                                               ; preds = %38, %32
  %.0 = phi ptr [ %33, %32 ], [ %43, %38 ]
  call void @_ZN7JNIEnv_14DeleteLocalRefEP8_jobject(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %26)
  call void @_ZN7JNIEnv_14DeleteLocalRefEP8_jobject(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %24)
  %45 = call noundef i32 @_ZN7JNIEnv_5ThrowEP11_jthrowable(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %.0)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef, i64, i64) local_unnamed_addr #2

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

declare { i64, i64 } @JS_GetPropertyStr(ptr noundef, i64, i64, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL14JS_IsUndefined7JSValue(i64, i64) local_unnamed_addr #4

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

declare { i64, i64 } @JS_GetException(ptr noundef) local_unnamed_addr #3

declare ptr @JS_GetContextOpaque(ptr noundef) local_unnamed_addr #3

declare void @JS_SetContextOpaque(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 #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, !7, i64 24}
!6 = !{!"_ZTS7Context", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !11, i64 200, !15, i64 224}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSSt6vectorIP18InboundCallChannelSaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIP18InboundCallChannelSaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIP18InboundCallChannelSaIS1_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIP18InboundCallChannelSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!15 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7_jclassSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE", !16, i64 0}
!16 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P7_jclassESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE", !7, i64 0, !17, i64 8, !18, i64 16, !17, i64 24, !19, i64 32, !7, i64 48}
!17 = !{!"long", !8, i64 0}
!18 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !7, i64 0}
!19 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !20, i64 0, !17, i64 8}
!20 = !{!"float", !8, i64 0}
!21 = !{!8, !8, i64 0}
!22 = !{!17, !17, i64 0}
!23 = !{!6, !7, i64 112}
!24 = !{!6, !7, i64 168}


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