; 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__._ZNK18InboundCallChannel10disconnectEP7ContextP7JNIEnv_P8_jstring = external hidden unnamed_addr constant [76 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 { i64, i64 } @JS_GetGlobalObject(ptr noundef) #1

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden { i64, i64 } @_ZL14JS_GetPropertyP9JSContext7JSValuej(ptr noundef, i64, i64, i32 noundef) #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) #3

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

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

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

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

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

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

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

72:                                               ; preds = %4
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK7Context16throwJsExceptionEP7JNIEnv_RK7JSValue(ptr noundef nonnull align 8 dereferenceable(280) %73, ptr noundef %74, ptr noundef nonnull align 8 dereferenceable(16) %15)
  store i8 0, ptr %17, align 1, !tbaa !23
  br label %84

75:                                               ; preds = %4
  %76 = load i32, ptr %18, align 4, !tbaa !30
  %77 = icmp eq i32 %76, 1
  br i1 %77, label %78, label %82

78:                                               ; preds = %75
  %79 = getelementptr inbounds %struct.JSValue, ptr %15, i32 0, i32 0
  %80 = load i32, ptr %79, align 8, !tbaa !23
  %81 = trunc i32 %80 to i8
  store i8 %81, ptr %17, align 1, !tbaa !23
  br label %83

82:                                               ; preds = %75
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 75, ptr noundef @__PRETTY_FUNCTION__._ZNK18InboundCallChannel10disconnectEP7ContextP7JNIEnv_P8_jstring) #8
  unreachable

83:                                               ; preds = %78
  br label %84

84:                                               ; preds = %83, %72
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = 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 %86, i64 16, i1 false), !tbaa.struct !22
  %87 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 0
  %88 = load i64, ptr %87, align 8
  %89 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 1
  %90 = load i64, ptr %89, align 8
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %85, i64 %88, i64 %90)
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !22
  %92 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 0
  %93 = load i64, ptr %92, align 8
  %94 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 1
  %95 = load i64, ptr %94, align 8
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %91, i64 %93, i64 %95)
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %10, i64 16, i1 false), !tbaa.struct !22
  %97 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 0
  %98 = load i64, ptr %97, align 8
  %99 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 1
  %100 = load i64, ptr %99, align 8
  call void @_ZL12JS_FreeValueP9JSContext7JSValue(ptr noundef %96, i64 %98, i64 %100)
  %101 = load i8, ptr %17, align 1, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 1, 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 i8 %101
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 52}
!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__._ZNK18InboundCallChannel10disconnectEP7ContextP7JNIEnv_P8_jstring = external hidden unnamed_addr constant [76 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 { i64, i64 } @JS_GetGlobalObject(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i8 @_ZNK18InboundCallChannel10disconnectEP7ContextP7JNIEnv_P8_jstring(ptr nocapture noundef nonnull readonly align 8 dereferenceable(12) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #5 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 52
  %21 = load i32, ptr %20, align 4, !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 1, 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 = trunc i64 %23 to i8
  br label %31

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

31:                                               ; preds = %28, %27
  %.0 = phi i8 [ 0, %27 ], [ %29, %28 ]
  %.sroa.03.0.copyload = load i64, ptr %5, align 16, !tbaa !23
  %.sroa.24.0.copyload = load i64, ptr %.sroa.4.0..sroa_idx, 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 i8 %.0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 52}


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