	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_event_once                     ## -- Begin function event_once
	.p2align	4, 0x90
_event_once:                            ## @event_once
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	_EV_SIGNAL@GOTPCREL(%rip), %rax
	movl	$-1, %r13d
	testw	%bx, (%rax)
	jne	LBB0_12
## %bb.1:
	movq	%rcx, %r14
	movq	%rdx, %r12
	movl	%edi, -52(%rbp)                 ## 4-byte Spill
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movl	$1, %edi
	movl	$24, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.2:
	movq	%rax, %r15
	movq	%r12, (%rax)
	movq	%r14, 16(%rax)
	movq	_EV_TIMEOUT@GOTPCREL(%rip), %rax
	cmpw	%bx, (%rax)
	jne	LBB0_6
## %bb.3:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_5
## %bb.4:
	leaq	-56(%rbp), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_timerclear
LBB0_5:
	leaq	8(%r15), %rdi
	movq	_event_once_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_evtimer_set
	jmp	LBB0_8
LBB0_6:
	movq	_EV_READ@GOTPCREL(%rip), %rcx
	movq	_EV_WRITE@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
	orw	(%rcx), %ax
	andw	%bx, %ax
	je	LBB0_11
## %bb.7:
	leaq	8(%r15), %rdi
	movq	_event_once_cb@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movswl	%ax, %edx
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movq	%r15, %r8
	callq	_event_set
LBB0_8:
	movq	%r15, %rdi
	addq	$8, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_event_add
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, %r13d
LBB0_11:
	movq	%r15, %rdi
	callq	_free
	jmp	LBB0_12
LBB0_9:
	xorl	%r13d, %r13d
LBB0_12:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_SIGNAL,2,1                  ## @EV_SIGNAL
	.comm	_EV_TIMEOUT,2,1                 ## @EV_TIMEOUT
	.comm	_event_once_cb,4,2              ## @event_once_cb
	.comm	_EV_READ,2,1                    ## @EV_READ
	.comm	_EV_WRITE,2,1                   ## @EV_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_event_once                     ; -- Begin function event_once
	.p2align	2
_event_once:                            ; @event_once
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, _EV_SIGNAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EV_SIGNAL@GOTPAGEOFF]
	ldrh	w8, [x8]
	and	w8, w8, w1
	tst	w8, #0xffff
	b.eq	LBB0_3
LBB0_1:
	mov	w19, #-1
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_3:
	mov	x19, x4
	mov	x23, x3
	mov	x24, x2
	mov	x22, x1
	mov	x21, x0
	mov	w0, #1
	mov	w1, #24
	bl	_calloc
	cbz	x0, LBB0_1
; %bb.4:
	mov	x20, x0
	str	x24, [x0]
	str	x23, [x0, #16]
Lloh2:
	adrp	x8, _EV_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EV_TIMEOUT@GOTPAGEOFF]
	ldrh	w8, [x8]
	cmp	w8, w22, uxth
	b.ne	LBB0_8
; %bb.5:
	cbnz	x19, LBB0_7
; %bb.6:
	add	x19, sp, #8
	add	x0, sp, #8
	bl	_timerclear
LBB0_7:
	add	x0, x20, #8
Lloh4:
	adrp	x8, _event_once_cb@GOTPAGE
Lloh5:
	ldr	x8, [x8, _event_once_cb@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_evtimer_set
	b	LBB0_10
LBB0_8:
Lloh7:
	adrp	x8, _EV_READ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
	ldrh	w8, [x8]
Lloh9:
	adrp	x9, _EV_WRITE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EV_WRITE@GOTPAGEOFF]
	ldrh	w9, [x9]
	orr	w8, w9, w8
	and	w8, w8, w22
	tst	w8, #0xffff
	b.eq	LBB0_12
; %bb.9:
	add	x0, x20, #8
Lloh11:
	adrp	x9, _event_once_cb@GOTPAGE
Lloh12:
	ldr	x9, [x9, _event_once_cb@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x9]
	sxth	w2, w8
	mov	x1, x21
	mov	x4, x20
	bl	_event_set
LBB0_10:
	add	x0, x20, #8
	mov	x1, x19
	bl	_event_add
	mov	x19, x0
	cbz	w0, LBB0_2
; %bb.11:
	mov	x0, x20
	bl	_free
	b	LBB0_2
LBB0_12:
	mov	x0, x20
	bl	_free
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_SIGNAL,2,1                  ; @EV_SIGNAL
	.comm	_EV_TIMEOUT,2,1                 ; @EV_TIMEOUT
	.comm	_event_once_cb,4,2              ; @event_once_cb
	.comm	_EV_READ,2,1                    ; @EV_READ
	.comm	_EV_WRITE,2,1                   ; @EV_WRITE
.subsections_via_symbols
