	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_event_base_once                ## -- Begin function event_base_once
	.p2align	4, 0x90
_event_base_once:                       ## @event_base_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	%edx, %r15d
	movq	_EV_SIGNAL@GOTPCREL(%rip), %r12
	movq	_EV_PERSIST@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
	orw	(%r12), %ax
	movl	$-1, %ebx
	testw	%r15w, %ax
	je	LBB0_1
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r8, %r14
	movq	%rcx, %r13
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	$1, %edi
	movl	$24, %esi
	callq	_mm_calloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	movq	%r13, (%rax)
	movq	%r14, 16(%rax)
	movq	_EV_TIMEOUT@GOTPCREL(%rip), %r14
	movzwl	(%r14), %ecx
	movq	_EV_READ@GOTPCREL(%rip), %rsi
	movq	_EV_WRITE@GOTPCREL(%rip), %rdx
	movzwl	(%rdx), %edx
	orw	(%rsi), %dx
	movq	_EV_CLOSED@GOTPCREL(%rip), %rdi
	movl	%ecx, %esi
	orl	%edx, %esi
	orw	(%r12), %si
	movzwl	(%rdi), %r8d
	orl	%r8d, %esi
	movl	%r15d, %edi
	andl	%esi, %edi
	cmpw	%cx, %di
	jne	LBB0_7
## %bb.3:
	leaq	8(%rax), %r12
	movq	_event_once_cb@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r12, %rdi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%rax, %rbx
	movq	%rax, %rcx
	callq	_evtimer_assign
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	testq	%r13, %r13
	je	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	callq	_evutil_timerisset
	testl	%eax, %eax
	jne	LBB0_9
LBB0_5:
	movq	_th_base_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_EVBASE_ACQUIRE_LOCK
	movswl	(%r14), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_event_active_nolock_
	movq	%rbx, %rsi
	jmp	LBB0_6
LBB0_7:
	orl	%r8d, %edx
	andw	%r15w, %dx
	je	LBB0_11
## %bb.8:
	leaq	8(%rax), %rdi
	movq	_event_once_cb@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movswl	%dx, %ecx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rbx
	movq	%rax, %r9
	callq	_event_assign
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_9:
	movq	_th_base_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_EVBASE_ACQUIRE_LOCK
	movq	%rbx, %rdi
	addq	$8, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_event_add_nolock_
	movq	%rbx, %rsi
	testl	%eax, %eax
	je	LBB0_6
## %bb.10:
	movl	%eax, %ebx
	movq	%rsi, %rdi
	jmp	LBB0_12
LBB0_6:
	movq	_next_once@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_LIST_INSERT_HEAD
	movq	_th_base_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_EVBASE_RELEASE_LOCK
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_11:
	movq	%rax, %rdi
LBB0_12:
	callq	_mm_free
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_SIGNAL,2,1                  ## @EV_SIGNAL
	.comm	_EV_PERSIST,2,1                 ## @EV_PERSIST
	.comm	_EV_TIMEOUT,2,1                 ## @EV_TIMEOUT
	.comm	_EV_READ,2,1                    ## @EV_READ
	.comm	_EV_WRITE,2,1                   ## @EV_WRITE
	.comm	_EV_CLOSED,2,1                  ## @EV_CLOSED
	.comm	_event_once_cb,4,2              ## @event_once_cb
	.comm	_th_base_lock,4,2               ## @th_base_lock
	.comm	_next_once,4,2                  ## @next_once
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_event_base_once                ; -- Begin function event_base_once
	.p2align	2
_event_base_once:                       ; @event_base_once
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x26, _EV_SIGNAL@GOTPAGE
Lloh1:
	ldr	x26, [x26, _EV_SIGNAL@GOTPAGEOFF]
	ldrh	w8, [x26]
Lloh2:
	adrp	x9, _EV_PERSIST@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EV_PERSIST@GOTPAGEOFF]
	ldrh	w9, [x9]
	orr	w8, w9, w8
	and	w8, w8, w2
	tst	w8, #0xffff
	b.eq	LBB0_3
LBB0_1:
	mov	w21, #-1
LBB0_2:
	mov	x0, x21
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x21, x5
	mov	x24, x4
	mov	x25, x3
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
	mov	w0, #1
	mov	w1, #24
	bl	_mm_calloc
	cbz	x0, LBB0_1
; %bb.4:
	mov	x20, x0
	str	x25, [x0]
	str	x24, [x0, #16]
Lloh4:
	adrp	x25, _EV_TIMEOUT@GOTPAGE
Lloh5:
	ldr	x25, [x25, _EV_TIMEOUT@GOTPAGEOFF]
	ldrh	w10, [x25]
	ldrh	w11, [x26]
Lloh6:
	adrp	x8, _EV_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
	ldrh	w9, [x8]
Lloh8:
	adrp	x8, _EV_WRITE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EV_WRITE@GOTPAGEOFF]
	ldrh	w12, [x8]
Lloh10:
	adrp	x8, _EV_CLOSED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EV_CLOSED@GOTPAGEOFF]
	ldrh	w8, [x8]
	orr	w9, w12, w9
	orr	w12, w9, w10
	orr	w11, w12, w11
	orr	w11, w11, w8
	and	w11, w11, w23
	cmp	w10, w11, uxth
Lloh12:
	adrp	x24, _th_base_lock@GOTPAGE
Lloh13:
	ldr	x24, [x24, _th_base_lock@GOTPAGEOFF]
	b.ne	LBB0_8
; %bb.5:
	add	x22, x20, #8
Lloh14:
	adrp	x8, _event_once_cb@GOTPAGE
Lloh15:
	ldr	x8, [x8, _event_once_cb@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x19
	mov	x3, x20
	bl	_evtimer_assign
	cbz	x21, LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_evutil_timerisset
	cbnz	w0, LBB0_10
LBB0_7:
	ldr	w1, [x24]
	mov	x0, x19
	bl	_EVBASE_ACQUIRE_LOCK
	ldrsh	w1, [x25]
	mov	x0, x22
	mov	w2, #1
	bl	_event_active_nolock_
	b	LBB0_12
LBB0_8:
	orr	w8, w9, w8
	and	w8, w8, w23
	tst	w8, #0xffff
	b.eq	LBB0_13
; %bb.9:
	add	x0, x20, #8
Lloh17:
	adrp	x9, _event_once_cb@GOTPAGE
Lloh18:
	ldr	x9, [x9, _event_once_cb@GOTPAGEOFF]
Lloh19:
	ldr	w4, [x9]
	sxth	w3, w8
	mov	x1, x19
	mov	x2, x22
	mov	x5, x20
	bl	_event_assign
LBB0_10:
	ldr	w1, [x24]
	mov	x0, x19
	bl	_EVBASE_ACQUIRE_LOCK
	add	x0, x20, #8
	mov	x1, x21
	mov	w2, #0
	bl	_event_add_nolock_
	cbz	w0, LBB0_12
; %bb.11:
	mov	x21, x0
	mov	x0, x20
	bl	_mm_free
	b	LBB0_2
LBB0_12:
Lloh20:
	adrp	x8, _next_once@GOTPAGE
Lloh21:
	ldr	x8, [x8, _next_once@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_LIST_INSERT_HEAD
	ldr	w1, [x24]
	mov	x0, x19
	bl	_EVBASE_RELEASE_LOCK
	mov	w21, #0
	b	LBB0_2
LBB0_13:
	mov	x0, x20
	bl	_mm_free
	b	LBB0_1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_SIGNAL,2,1                  ; @EV_SIGNAL
	.comm	_EV_PERSIST,2,1                 ; @EV_PERSIST
	.comm	_EV_TIMEOUT,2,1                 ; @EV_TIMEOUT
	.comm	_EV_READ,2,1                    ; @EV_READ
	.comm	_EV_WRITE,2,1                   ; @EV_WRITE
	.comm	_EV_CLOSED,2,1                  ; @EV_CLOSED
	.comm	_event_once_cb,4,2              ; @event_once_cb
	.comm	_th_base_lock,4,2               ; @th_base_lock
	.comm	_next_once,4,2                  ; @next_once
.subsections_via_symbols
