; LLVM IR from cashapp/zipline :: zipline/native (InboundCallChannel)

; 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 }
%class.InboundCallChannel = type <{ ptr, i32, [4 x i8] }>

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [87 x i8], align 1
@__PRETTY_FUNCTION__._ZNK18InboundCallChannel4callEP7ContextP7JNIEnv_P8_jstring = external hidden unnamed_addr constant [69 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK18InboundCallChannel4callEP7ContextP7JNIEnv_P8_jstring(ptr noundef nonnull align 8 dereferenceable(12) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %struct.JSValue, align 8
  %11 = alloca %struct.JSValue, align 8
  %12 = alloca %struct.JSValue, align 8
  %13 = alloca [1 x %struct.JSValue], align 16
  %14 = alloca %struct.JSValue, align 8
  %15 = alloca %struct.JSValue, align 8
  %16 = alloca %struct.JSValue, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %struct.JSValue, align 8
  %20 = alloca %struct.JSValue, align 8
  %21 = alloca %struct.JSValue, align 8
  %22 = alloca %struct.JSValue, align 8
  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
  %23 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %class.Context, ptr %24, i32 0, i32 3
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  store ptr %26, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = call { i64, i64 } @JS_GetGlobalObject(ptr noundef %27)
  %29 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %30 = extractvalue { i64, i64 } %28, 0
  store i64 %30, ptr %29, align 8
  %31 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %32 = extractvalue { i64, i64 } %28, 1
  store i64 %32, ptr %31, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %10, i64 16, i1 false), !tbaa.struct !22
  %34 = getelementptr inbounds %class.InboundCallChannel, ptr %23, i32 0, i32 1
  %35 = load i32, ptr %34, align 8, !tbaa !25
  %36 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %37 = load i64, ptr %36, align 8
  %38 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %39 = load i64, ptr %38, align 8
  %40 = call { i64, i64 } @_ZL14JS_GetPropertyP9JSContext7JSValuej(ptr noundef %33, i64 %37, i64 %39, i32 noundef %35)
  %41 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 0
  %42 = extractvalue { i64, i64 } %40, 0
  store i64 %42, ptr %41, align 8
  %43 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 1
  %44 = extractvalue { i64, i64 } %40, 1
  store i64 %44, ptr %43, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = call { i64, i64 } @_ZNK7Context10toJsStringEP7JNIEnv_P8_jstring(ptr noundef nonnull align 8 dereferenceable(280) %45, ptr noundef %46, ptr noundef %47)
  %49 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 0
  %50 = extractvalue { i64, i64 } %48, 0
  store i64 %50, ptr %49, align 8
  %51 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 1
  %52 = extractvalue { i64, i64 } %48, 1
  store i64 %52, ptr %51, align 8
  %53 = getelementptr inbounds [1 x %struct.JSValue], ptr %13, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %53, ptr align 8 %14, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !22
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %class.Context, ptr %55, i32 0, i32 7
  %57 = load i32, ptr %56, align 8, !tbaa !27
  %58 = getelementptr inbounds [1 x %struct.JSValue], ptr %13, i64 0, i64 0
  %59 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 0
  %60 = load i64, ptr %59, align 8
  %61 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 1
  %62 = load i64, ptr %61, align 8
  %63 = call { i64, i64 } @JS_Invoke(ptr noundef %54, i64 %60, i64 %62, i32 noundef %57, i32 noundef 1, ptr noundef %58)
  %64 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 0
  %65 = extractvalue { i64, i64 } %63, 0
  store i64 %65, ptr %64, align 8
  %66 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 1
  %67 = extractvalue { i64, i64 } %63, 1
  store i64 %67, ptr %66, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %68 = getelementptr inbounds %struct.JSValue, ptr %15, i32 0, i32 1
  %69 = load i64, ptr %68, align 8, !tbaa !28
  %70 = trunc i64 %69 to i32
  store i32 %70, ptr %18, align 4, !tbaa !30
  %71 = load i32, ptr %18, align 4, !tbaa !30
  %72 = icmp eq i32 %71, 6
  br i1 %72, label %73, label %76

73:                                               ; preds = %4
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK7Context16throwJsExceptionEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280) %74, ptr noundef %75, ptr noundef nonnull align 8 dereferenceable(16) %15)
  store ptr null, ptr %17, align 8, !tbaa !5
  br label %85

76:                                               ; preds = %4
  %77 = load i32, ptr %18, align 4, !tbaa !30
  %78 = icmp eq i32 %77, -7
  br i1 %78, label %79, label %83

79:                                               ; preds = %76
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = call noundef ptr @_ZNK7Context12toJavaStringEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280) %80, ptr noundef %81, ptr noundef nonnull align 8 dereferenceable(16) %15)
  store ptr %82, ptr %17, align 8, !tbaa !5
  br label %84

83:                                               ; preds = %76
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 48, ptr noundef @__PRETTY_FUNCTION__._ZNK18InboundCallChannel4callEP7ContextP7JNIEnv_P8_jstring) #8
  unreachable

84:                                               ; preds = %79
  br label %85

85:                                               ; preds = %84, %73
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds [1 x %struct.JSValue], ptr %13, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 16 %87, i64 16, i1 false), !tbaa.struct !22
  %88 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 0
  %89 = load i64, ptr %88, align 8
  %90 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 1
  %91 = load i64, ptr %90, align 8
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %86, i64 %89, i64 %91)
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !22
  %93 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 0
  %94 = load i64, ptr %93, align 8
  %95 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 1
  %96 = load i64, ptr %95, align 8
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %92, i64 %94, i64 %96)
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !22
  %98 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 0
  %99 = load i64, ptr %98, align 8
  %100 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 1
  %101 = load i64, ptr %100, align 8
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %97, i64 %99, i64 %101)
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %10, i64 16, i1 false), !tbaa.struct !22
  %103 = getelementptr inbounds { i64, i64 }, ptr %22, i32 0, i32 0
  %104 = load i64, ptr %103, align 8
  %105 = getelementptr inbounds { i64, i64 }, ptr %22, i32 0, i32 1
  %106 = load i64, ptr %105, align 8
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %102, i64 %104, i64 %106)
  %107 = load ptr, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  ret ptr %107
}

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

declare { i64, i64 } @JS_GetGlobalObject(ptr noundef) #2

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden { i64, i64 } @_ZL14JS_GetPropertyP9JSContext7JSValuej(ptr noundef, i64, i64, i32 noundef) #3

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

declare { i64, i64 } @_ZNK7Context10toJsStringEP7JNIEnv_P8_jstring(ptr noundef nonnull align 8 dereferenceable(280), ptr noundef, ptr noundef) #2

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

declare { i64, i64 } @JS_Invoke(ptr noundef, i64, i64, i32 noundef, i32 noundef, ptr noundef) #2

declare void @_ZNK7Context16throwJsExceptionEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280), ptr noundef, ptr noundef nonnull align 8 dereferenceable(16)) #2

declare noundef ptr @_ZNK7Context12toJavaStringEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280), ptr noundef, ptr noundef nonnull align 8 dereferenceable(16)) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { alwaysinline 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { noreturn 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn 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 = !{!26, !11, i64 8}
!26 = !{!"_ZTS18InboundCallChannel", !6, i64 0, !11, i64 8}
!27 = !{!10, !11, i64 48}
!28 = !{!29, !18, i64 8}
!29 = !{!"_ZTS7JSValue", !7, i64 0, !18, i64 8}
!30 = !{!11, !11, 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"

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

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [87 x i8], align 1
@__PRETTY_FUNCTION__._ZNK18InboundCallChannel4callEP7ContextP7JNIEnv_P8_jstring = external hidden unnamed_addr constant [69 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK18InboundCallChannel4callEP7ContextP7JNIEnv_P8_jstring(ptr nocapture noundef nonnull readonly align 8 dereferenceable(12) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 align 2 {
  %5 = alloca [1 x %struct.JSValue], align 16
  %6 = alloca %struct.JSValue, align 8
  %7 = getelementptr inbounds i8, ptr %1, i64 24
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = tail call { i64, i64 } @JS_GetGlobalObject(ptr noundef %8)
  %10 = extractvalue { i64, i64 } %9, 0
  %11 = extractvalue { i64, i64 } %9, 1
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load i32, ptr %12, align 8, !tbaa !21
  %14 = tail call { i64, i64 } @_ZL14JS_GetPropertyP9JSContext7JSValuej(ptr noundef %8, i64 %10, i64 %11, i32 noundef %13)
  %15 = extractvalue { i64, i64 } %14, 0
  %16 = extractvalue { i64, i64 } %14, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %17 = tail call { i64, i64 } @_ZNK7Context10toJsStringEP7JNIEnv_P8_jstring(ptr noundef nonnull align 8 dereferenceable(280) %1, ptr noundef %2, ptr noundef %3)
  %18 = extractvalue { i64, i64 } %17, 0
  %19 = extractvalue { i64, i64 } %17, 1
  store i64 %18, ptr %5, align 16, !tbaa !23
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  store i64 %19, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  %20 = getelementptr inbounds i8, ptr %1, i64 48
  %21 = load i32, ptr %20, align 8, !tbaa !25
  %22 = call { i64, i64 } @JS_Invoke(ptr noundef %8, i64 %15, i64 %16, i32 noundef %21, i32 noundef 1, ptr noundef nonnull %5)
  %23 = extractvalue { i64, i64 } %22, 0
  store i64 %23, ptr %6, align 8
  %24 = getelementptr inbounds i8, ptr %6, i64 8
  %25 = extractvalue { i64, i64 } %22, 1
  store i64 %25, ptr %24, align 8
  %26 = trunc i64 %25 to i32
  switch i32 %26, label %30 [
    i32 6, label %27
    i32 -7, label %28
  ]

27:                                               ; preds = %4
  call void @_ZNK7Context16throwJsExceptionEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280) %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(16) %6)
  br label %31

28:                                               ; preds = %4
  %29 = call noundef ptr @_ZNK7Context12toJavaStringEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280) %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(16) %6)
  br label %31

30:                                               ; preds = %4
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 48, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK18InboundCallChannel4callEP7ContextP7JNIEnv_P8_jstring) #7
  unreachable

31:                                               ; preds = %28, %27
  %.0 = phi ptr [ null, %27 ], [ %29, %28 ]
  %.sroa.05.0.copyload = load i64, ptr %5, align 16, !tbaa !23
  %.sroa.26.0.copyload = load i64, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !24
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %8, i64 %.sroa.05.0.copyload, i64 %.sroa.26.0.copyload)
  %.sroa.03.0.copyload = load i64, ptr %6, align 8, !tbaa !23
  %.sroa.24.0.copyload = load i64, ptr %24, align 8, !tbaa !24
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %8, i64 %.sroa.03.0.copyload, i64 %.sroa.24.0.copyload)
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %8, i64 %15, i64 %16)
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %8, i64 %10, i64 %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  ret ptr %.0
}

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

declare { i64, i64 } @JS_GetGlobalObject(ptr noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden { i64, i64 } @_ZL14JS_GetPropertyP9JSContext7JSValuej(ptr noundef, i64, i64, i32 noundef) local_unnamed_addr #3

declare { i64, i64 } @_ZNK7Context10toJsStringEP7JNIEnv_P8_jstring(ptr noundef nonnull align 8 dereferenceable(280), ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare { i64, i64 } @JS_Invoke(ptr noundef, i64, i64, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZNK7Context16throwJsExceptionEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280), ptr noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

declare noundef ptr @_ZNK7Context12toJavaStringEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280), ptr noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { alwaysinline 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 = { noreturn 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!22, !10, i64 8}
!22 = !{!"_ZTS18InboundCallChannel", !7, i64 0, !10, i64 8}
!23 = !{!8, !8, i64 0}
!24 = !{!17, !17, i64 0}
!25 = !{!6, !10, i64 48}


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