	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bufferevent_readcb
_bufferevent_readcb:                    ## @bufferevent_readcb
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	_EVBUFFER_READ@GOTPCREL(%rip), %rcx
	movzwl	(%rcx), %ebx
	movq	_EV_TIMEOUT@GOTPCREL(%rip), %rcx
	cmpw	%si, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	_EVBUFFER_TIMEOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_2:
	movl	%edi, %eax
	movl	40(%r12), %ecx
	xorl	%edx, %edx
	cmpl	$1, %ecx
	sbbl	%edx, %edx
	orl	%ecx, %edx
	movq	32(%r12), %rdi
	movl	%eax, %esi
	callq	_evbuffer_read
	testl	%eax, %eax
	je	LBB0_15
## %bb.3:
	cmpl	$-1, %eax
	jne	LBB0_7
## %bb.4:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.5:
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.6:
	movq	_EVBUFFER_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_15:
	movq	_EVBUFFER_EOF@GOTPCREL(%rip), %rax
LBB0_16:
	orw	(%rax), %bx
LBB0_17:
	movq	8(%r12), %rax
	movl	(%r12), %edx
	movswl	%bx, %esi
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_7:
	testl	%eax, %eax
	jle	LBB0_17
## %bb.8:
	leaq	20(%r12), %r14
	movl	16(%r12), %esi
	movq	%r14, %rdi
	callq	_bufferevent_add
	movq	32(%r12), %rdi
	callq	_EVBUFFER_LENGTH
	movq	48(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:
	cmpq	%rcx, %rax
	jae	LBB0_10
LBB0_18:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	16(%r12), %esi
	addq	$20, %r12
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bufferevent_add                ## TAILCALL
LBB0_10:
	movslq	40(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.11:
	cmpq	%rcx, %rax
	jbe	LBB0_12
## %bb.19:
	movq	32(%r12), %r15
	movq	%r14, %rdi
	callq	_event_del
	movq	_bufferevent_read_pressure_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_evbuffer_setcb                 ## TAILCALL
LBB0_12:
	movq	24(%r12), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.13:
	movl	(%r12), %esi
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EVBUFFER_READ,2,1              ## @EVBUFFER_READ
	.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	_EVBUFFER_ERROR,2,1             ## @EVBUFFER_ERROR
	.comm	_EVBUFFER_EOF,2,1               ## @EVBUFFER_EOF
	.comm	_bufferevent_read_pressure_cb,4,2 ## @bufferevent_read_pressure_cb
	.no_dead_strip	_bufferevent_readcb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bufferevent_readcb
_bufferevent_readcb:                    ; @bufferevent_readcb
	.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	x9, _EVBUFFER_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EVBUFFER_READ@GOTPAGEOFF]
	ldrh	w20, [x9]
Lloh2:
	adrp	x9, _EV_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EV_TIMEOUT@GOTPAGEOFF]
	ldrh	w9, [x9]
	cmp	w9, w1, uxth
	b.ne	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _EVBUFFER_TIMEOUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EVBUFFER_TIMEOUT@GOTPAGEOFF]
	b	LBB0_12
LBB0_2:
	mov	x8, x0
	ldr	w9, [x19, #40]
	cmp	w9, #0
	csinv	w2, w9, wzr, ne
	ldr	x0, [x19, #32]
	mov	x1, x8
	bl	_evbuffer_read
	cbz	w0, LBB0_6
; %bb.3:
	cmn	w0, #1
	b.ne	LBB0_7
; %bb.4:
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]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_11
; %bb.5:
	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_6:
Lloh15:
	adrp	x8, _EVBUFFER_EOF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EVBUFFER_EOF@GOTPAGEOFF]
	b	LBB0_12
LBB0_7:
	cmp	w0, #1
	b.lt	LBB0_13
; %bb.8:
	add	x20, x19, #20
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_bufferevent_add
	ldr	x0, [x19, #32]
	bl	_EVBUFFER_LENGTH
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_14
; %bb.9:
	cmp	x0, x8
	b.hs	LBB0_14
LBB0_10:
	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_11:
Lloh17:
	adrp	x8, _EVBUFFER_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EVBUFFER_ERROR@GOTPAGEOFF]
LBB0_12:
	ldrh	w8, [x8]
	orr	w20, w8, w20
LBB0_13:
	ldr	x3, [x19, #8]
	ldr	w2, [x19]
	sxth	w1, w20
	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_14:
	ldrsw	x8, [x19, #40]
	cbz	w8, LBB0_17
; %bb.15:
	cmp	x0, x8
	b.ls	LBB0_17
; %bb.16:
	ldr	x21, [x19, #32]
	mov	x0, x20
	bl	_event_del
Lloh19:
	adrp	x8, _bufferevent_read_pressure_cb@GOTPAGE
Lloh20:
	ldr	x8, [x8, _bufferevent_read_pressure_cb@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, 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
	b	_evbuffer_setcb
LBB0_17:
	ldr	x2, [x19, #24]
	cbz	x2, LBB0_10
; %bb.18:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EVBUFFER_READ,2,1              ; @EVBUFFER_READ
	.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	_EVBUFFER_ERROR,2,1             ; @EVBUFFER_ERROR
	.comm	_EVBUFFER_EOF,2,1               ; @EVBUFFER_EOF
	.comm	_bufferevent_read_pressure_cb,4,2 ; @bufferevent_read_pressure_cb
	.no_dead_strip	_bufferevent_readcb
.subsections_via_symbols
