	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function be_pair_flush
_be_pair_flush:                         ## @be_pair_flush
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r13
	callq	_upcast
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_incref_and_lock
	movl	(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_1
## %bb.2:
	callq	_downcast
	movq	%rax, %rbx
	movq	_BEV_NORMAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpl	%r12d, (%rax)
	je	LBB0_10
## %bb.3:
	movq	_EV_READ@GOTPCREL(%rip), %rax
	testw	%r15w, (%rax)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	$1, %edx
	callq	_be_pair_transfer
LBB0_5:
	movq	_EV_WRITE@GOTPCREL(%rip), %rax
	testw	%r15w, (%rax)
	je	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_be_pair_transfer
LBB0_7:
	movq	_BEV_FINISHED@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_9
## %bb.8:
	movq	_BEV_EVENT_EOF@GOTPCREL(%rip), %rax
	orw	(%rax), %r15w
	movswl	%r15w, %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_bufferevent_run_eventcb_
LBB0_9:
	movq	%r13, %rdi
	callq	_decref_and_unlock
	jmp	LBB0_10
LBB0_1:
	movl	$-1, %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BEV_NORMAL,4,2                 ## @BEV_NORMAL
	.comm	_EV_READ,2,1                    ## @EV_READ
	.comm	_EV_WRITE,2,1                   ## @EV_WRITE
	.comm	_BEV_FINISHED,4,2               ## @BEV_FINISHED
	.comm	_BEV_EVENT_EOF,2,1              ## @BEV_EVENT_EOF
	.no_dead_strip	_be_pair_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function be_pair_flush
_be_pair_flush:                         ; @be_pair_flush
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_upcast
	mov	x22, x0
	mov	x0, x19
	bl	_incref_and_lock
	ldr	w0, [x22]
	cbz	w0, LBB0_10
; %bb.1:
	bl	_downcast
Lloh0:
	adrp	x8, _BEV_NORMAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BEV_NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_9
; %bb.2:
	mov	x22, x0
Lloh3:
	adrp	x8, _EV_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
	ldrh	w8, [x8]
	tst	w20, w8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x22
	mov	x1, x19
	mov	w2, #1
	bl	_be_pair_transfer
LBB0_4:
Lloh5:
	adrp	x8, _EV_WRITE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EV_WRITE@GOTPAGEOFF]
	ldrh	w8, [x8]
	tst	w20, w8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x22
	mov	w2, #1
	bl	_be_pair_transfer
LBB0_6:
Lloh7:
	adrp	x8, _BEV_FINISHED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BEV_FINISHED@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_8
; %bb.7:
Lloh10:
	adrp	x8, _BEV_EVENT_EOF@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BEV_EVENT_EOF@GOTPAGEOFF]
	ldrh	w8, [x8]
	orr	w8, w8, w20
	sxth	w1, w8
	mov	x0, x22
	mov	w2, #0
	bl	_bufferevent_run_eventcb_
LBB0_8:
	mov	x0, x19
	bl	_decref_and_unlock
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
	mov	w0, #-1
LBB0_11:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_BEV_NORMAL,4,2                 ; @BEV_NORMAL
	.comm	_EV_READ,2,1                    ; @EV_READ
	.comm	_EV_WRITE,2,1                   ; @EV_WRITE
	.comm	_BEV_FINISHED,4,2               ; @BEV_FINISHED
	.comm	_BEV_EVENT_EOF,2,1              ; @BEV_EVENT_EOF
	.no_dead_strip	_be_pair_flush
.subsections_via_symbols
