	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mevent_update
_mevent_update:                         ## @mevent_update
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_mevent_qlock
	movq	_EV_DELETE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%rbx), %eax
	sete	%dil
	callq	_assert
	movl	(%rbx), %ecx
	testl	%r14d, %r14d
	movq	_EV_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_EV_ENABLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %esi
	cmovel	%eax, %esi
	cmovel	%edx, %eax
	orl	%ecx, %esi
	notl	%eax
	andl	%esi, %eax
	cmpl	%eax, %ecx
	je	LBB0_3
## %bb.1:
	movl	%eax, (%rbx)
	cmpl	$0, 4(%rbx)
	jne	LBB0_3
## %bb.2:
	movl	$1, 4(%rbx)
	movq	_me_list@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_LIST_REMOVE
	movl	(%r14), %edx
	movq	_change_head@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_LIST_INSERT_HEAD
	xorl	%eax, %eax
	callq	_mevent_notify
LBB0_3:
	xorl	%eax, %eax
	callq	_mevent_qunlock
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_DELETE,4,2                  ## @EV_DELETE
	.comm	_EV_ENABLE,4,2                  ## @EV_ENABLE
	.comm	_EV_DISABLE,4,2                 ## @EV_DISABLE
	.comm	_me_list,4,2                    ## @me_list
	.comm	_change_head,4,2                ## @change_head
	.no_dead_strip	_mevent_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mevent_update
_mevent_update:                         ; @mevent_update
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_mevent_qlock
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _EV_DELETE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EV_DELETE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	bl	_assert
	ldr	w9, [x19]
Lloh3:
	adrp	x8, _EV_DISABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EV_DISABLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x10, _EV_ENABLE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _EV_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w20, #0
	csel	w11, w8, w10, eq
	orr	w11, w11, w9
	csel	w8, w10, w8, eq
	bic	w8, w11, w8
	cmp	w9, w8
	b.eq	LBB0_3
; %bb.1:
	str	w8, [x19]
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_3
; %bb.2:
	mov	w8, #1
	str	w8, [x19, #4]
Lloh9:
	adrp	x20, _me_list@GOTPAGE
Lloh10:
	ldr	x20, [x20, _me_list@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_LIST_REMOVE
	ldr	w2, [x20]
Lloh11:
	adrp	x0, _change_head@GOTPAGE
Lloh12:
	ldr	x0, [x0, _change_head@GOTPAGEOFF]
	mov	x1, x19
	bl	_LIST_INSERT_HEAD
	bl	_mevent_notify
LBB0_3:
	bl	_mevent_qunlock
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_DELETE,4,2                  ; @EV_DELETE
	.comm	_EV_ENABLE,4,2                  ; @EV_ENABLE
	.comm	_EV_DISABLE,4,2                 ; @EV_DISABLE
	.comm	_me_list,4,2                    ; @me_list
	.comm	_change_head,4,2                ; @change_head
	.no_dead_strip	_mevent_update
.subsections_via_symbols
