	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nameserver_write_waiting
_nameserver_write_waiting:              ## @nameserver_write_waiting
	.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	%rbx
	subq	$136, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	16(%rdi), %rdi
	callq	_ASSERT_LOCKED
	cmpb	%r15b, (%rbx)
	je	LBB0_5
## %bb.1:
	movb	%r15b, (%rbx)
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_event_del
	movq	16(%rbx), %rax
	movl	(%rax), %esi
	movl	12(%rbx), %edx
	movq	_EV_READ@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	testb	%r15b, %r15b
	je	LBB0_3
## %bb.2:
	movq	_EV_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_3:
	orl	(%rax), %ecx
	movq	_EV_PERSIST@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_nameserver_ready_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%rbx, %r9
	callq	_event_assign
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_event_add
	testq	%rax, %rax
	jns	LBB0_5
## %bb.4:
	movq	_EVDNS_LOG_WARN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	addq	$4, %rbx
	leaq	-160(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$128, %edx
	callq	_evutil_format_sockaddr_port_
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_log
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	addq	$136, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_READ,4,2                    ## @EV_READ
	.comm	_EV_WRITE,4,2                   ## @EV_WRITE
	.comm	_EV_PERSIST,4,2                 ## @EV_PERSIST
	.comm	_nameserver_ready_callback,4,2  ## @nameserver_ready_callback
	.comm	_EVDNS_LOG_WARN,4,2             ## @EVDNS_LOG_WARN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error from libevent when adding event for %s"

	.no_dead_strip	_nameserver_write_waiting
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nameserver_write_waiting
_nameserver_write_waiting:              ; @nameserver_write_waiting
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	and	w21, w1, #0xff
	ldr	x0, [x0, #16]
	bl	_ASSERT_LOCKED
	ldrb	w8, [x19]
	cmp	w8, w21
	b.eq	LBB0_3
; %bb.1:
	strb	w21, [x19]
	add	x20, x19, #8
	mov	x0, x20
	bl	_event_del
	ldr	x8, [x19, #16]
	ldr	w1, [x8]
	ldr	w2, [x19, #12]
Lloh3:
	adrp	x8, _EV_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
Lloh5:
	adrp	x9, _EV_WRITE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EV_WRITE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	cmp	w21, #0
	csel	w9, wzr, w9, eq
Lloh9:
	adrp	x10, _EV_PERSIST@GOTPAGE
Lloh10:
	ldr	x10, [x10, _EV_PERSIST@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh11:
	ldr	w9, [x10]
	orr	w3, w8, w9
Lloh12:
	adrp	x8, _nameserver_ready_callback@GOTPAGE
Lloh13:
	ldr	x8, [x8, _nameserver_ready_callback@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x5, x19
	bl	_event_assign
	mov	x0, x20
	mov	x1, #0
	bl	_event_add
	tbz	x0, #63, LBB0_3
; %bb.2:
Lloh15:
	adrp	x8, _EVDNS_LOG_WARN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EVDNS_LOG_WARN@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
	add	x0, x19, #4
	add	x1, sp, #8
	mov	w2, #128
	bl	_evutil_format_sockaddr_port_
	mov	x2, x0
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_log
LBB0_3:
	ldur	x8, [x29, #-40]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_READ,4,2                    ; @EV_READ
	.comm	_EV_WRITE,4,2                   ; @EV_WRITE
	.comm	_EV_PERSIST,4,2                 ; @EV_PERSIST
	.comm	_nameserver_ready_callback,4,2  ; @nameserver_ready_callback
	.comm	_EVDNS_LOG_WARN,4,2             ; @EVDNS_LOG_WARN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error from libevent when adding event for %s"

	.no_dead_strip	_nameserver_write_waiting
.subsections_via_symbols
