	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_end_event
_handle_end_event:                      ## @handle_end_event
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rsi, %rbx
	cmpl	$-1, (%rdi)
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %r15d
	jmp	LBB0_3
LBB0_1:
	movl	$-1, %r15d
LBB0_3:
	movq	8(%rbx), %r13
	movl	$1, %eax
	testq	%r13, %r13
	je	LBB0_8
## %bb.4:
	movq	16(%rbx), %r12
	testq	%r12, %r12
	je	LBB0_5
LBB0_9:
	addq	$8, %rbx
	xorl	%edi, %edi
	subq	%r13, %r14
	setl	%dil
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	callq	_BUG_ON
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_update_kvm_event               ## TAILCALL
LBB0_5:
	movq	(%rdx), %rcx
	movq	_INVALID_KEY@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	je	LBB0_8
## %bb.6:
	movq	%rdx, %rsi
	callq	_find_create_kvm_event
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_KEY,8,3                ## @INVALID_KEY
	.no_dead_strip	_handle_end_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_end_event
_handle_end_event:                      ; @handle_end_event
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x3
	ldr	w8, [x0]
	cmn	w8, #1
	b.eq	LBB0_2
; %bb.1:
	ldr	w19, [x1]
	b	LBB0_3
LBB0_2:
	mov	w19, #-1
LBB0_3:
	mov	x22, x1
	ldr	x23, [x22, #8]!
	cbz	x23, LBB0_7
; %bb.4:
	ldr	x21, [x1, #16]
	cbz	x21, LBB0_6
LBB0_5:
	subs	x20, x20, x23
	cset	w0, lt
	stp	xzr, xzr, [x22]
	bl	_BUG_ON
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_update_kvm_event
LBB0_6:
	ldr	x8, [x2]
Lloh0:
	adrp	x9, _INVALID_KEY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INVALID_KEY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
LBB0_7:
	mov	w0, #1
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x1, x2
	bl	_find_create_kvm_event
	mov	x21, x0
	cbnz	x0, LBB0_5
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_KEY,8,3                ; @INVALID_KEY
	.no_dead_strip	_handle_end_event
.subsections_via_symbols
