	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bufferevent_writecb
_bufferevent_writecb:                   ## @bufferevent_writecb
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	_EVBUFFER_WRITE@GOTPCREL(%rip), %rax
	movzwl	(%rax), %r15d
	movq	_EV_TIMEOUT@GOTPCREL(%rip), %rax
	cmpw	%si, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_EVBUFFER_TIMEOUT@GOTPCREL(%rip), %rax
LBB0_18:
	orw	(%rax), %r15w
LBB0_19:
	movq	8(%rbx), %rax
	movl	(%rbx), %edx
	movswl	%r15w, %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_2:
	movl	%edi, %r14d
	movl	24(%rbx), %edi
	callq	_EVBUFFER_LENGTH
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movl	24(%rbx), %edi
	movl	%r14d, %esi
	callq	_evbuffer_write
	testl	%eax, %eax
	je	LBB0_17
## %bb.4:
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.5:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.6:
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.7:
	movq	_EINPROGRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.8:
	movq	_EVBUFFER_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_17:
	movq	_EVBUFFER_EOF@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_9:
	testl	%eax, %eax
	jle	LBB0_19
LBB0_10:
	movl	24(%rbx), %edi
	callq	_EVBUFFER_LENGTH
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	20(%rbx), %rdi
	movl	16(%rbx), %esi
	callq	_bufferevent_add
LBB0_12:
	cmpq	$0, 32(%rbx)
	je	LBB0_20
## %bb.13:
	movl	24(%rbx), %edi
	callq	_EVBUFFER_LENGTH
	cmpq	40(%rbx), %rax
	jg	LBB0_20
## %bb.14:
	movq	32(%rbx), %rax
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_15:
	movl	24(%rbx), %edi
	callq	_EVBUFFER_LENGTH
	testq	%rax, %rax
	je	LBB0_20
## %bb.16:
	movl	16(%rbx), %esi
	addq	$20, %rbx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bufferevent_add                ## TAILCALL
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EVBUFFER_WRITE,2,1             ## @EVBUFFER_WRITE
	.comm	_EV_TIMEOUT,2,1                 ## @EV_TIMEOUT
	.comm	_EVBUFFER_TIMEOUT,2,1           ## @EVBUFFER_TIMEOUT
	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_EINPROGRESS,8,3                ## @EINPROGRESS
	.comm	_EVBUFFER_ERROR,2,1             ## @EVBUFFER_ERROR
	.comm	_EVBUFFER_EOF,2,1               ## @EVBUFFER_EOF
	.no_dead_strip	_bufferevent_writecb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bufferevent_writecb
_bufferevent_writecb:                   ; @bufferevent_writecb
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
Lloh0:
	adrp	x8, _EVBUFFER_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVBUFFER_WRITE@GOTPAGEOFF]
	ldrh	w21, [x8]
Lloh2:
	adrp	x8, _EV_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EV_TIMEOUT@GOTPAGEOFF]
	ldrh	w8, [x8]
	cmp	w8, w1, uxth
	b.ne	LBB0_4
; %bb.1:
Lloh4:
	adrp	x8, _EVBUFFER_TIMEOUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EVBUFFER_TIMEOUT@GOTPAGEOFF]
LBB0_2:
	ldrh	w8, [x8]
	orr	w21, w8, w21
LBB0_3:
	ldr	x3, [x19, #8]
	ldr	w2, [x19]
	sxth	w1, w21
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	br	x3
LBB0_4:
	mov	x20, x0
	ldr	w0, [x19, #24]
	bl	_EVBUFFER_LENGTH
	cbz	x0, LBB0_12
; %bb.5:
	ldr	w0, [x19, #24]
	mov	x1, x20
	bl	_evbuffer_write
	cbz	w0, LBB0_10
; %bb.6:
	cmn	w0, #1
	b.ne	LBB0_11
; %bb.7:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _EINTR@GOTPAGE
Lloh13:
	ldr	x10, [x10, _EINTR@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
Lloh15:
	adrp	x11, _EINPROGRESS@GOTPAGE
Lloh16:
	ldr	x11, [x11, _EINPROGRESS@GOTPAGEOFF]
Lloh17:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_18
; %bb.8:
	ldr	w0, [x19, #24]
	bl	_EVBUFFER_LENGTH
	cbz	x0, LBB0_16
; %bb.9:
	add	x0, x19, #20
	ldr	w1, [x19, #16]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_bufferevent_add
LBB0_10:
Lloh18:
	adrp	x8, _EVBUFFER_EOF@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EVBUFFER_EOF@GOTPAGEOFF]
	b	LBB0_2
LBB0_11:
	cmp	w0, #1
	b.lt	LBB0_3
LBB0_12:
	ldr	w0, [x19, #24]
	bl	_EVBUFFER_LENGTH
	cbz	x0, LBB0_14
; %bb.13:
	add	x0, x19, #20
	ldr	w1, [x19, #16]
	bl	_bufferevent_add
LBB0_14:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_16
; %bb.15:
	ldr	w0, [x19, #24]
	bl	_EVBUFFER_LENGTH
	ldr	x8, [x19, #40]
	cmp	x0, x8
	b.le	LBB0_17
LBB0_16:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_17:
	ldr	x2, [x19, #32]
	ldr	w1, [x19]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	br	x2
LBB0_18:
Lloh20:
	adrp	x8, _EVBUFFER_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EVBUFFER_ERROR@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EVBUFFER_WRITE,2,1             ; @EVBUFFER_WRITE
	.comm	_EV_TIMEOUT,2,1                 ; @EV_TIMEOUT
	.comm	_EVBUFFER_TIMEOUT,2,1           ; @EVBUFFER_TIMEOUT
	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_EINPROGRESS,8,3                ; @EINPROGRESS
	.comm	_EVBUFFER_ERROR,2,1             ; @EVBUFFER_ERROR
	.comm	_EVBUFFER_EOF,2,1               ; @EVBUFFER_EOF
	.no_dead_strip	_bufferevent_writecb
.subsections_via_symbols
