	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_filter_new         ## -- Begin function bufferevent_filter_new
	.p2align	4, 0x90
_bufferevent_filter_new:                ## @bufferevent_filter_new
	.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
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_BEV_OPT_THREADSAFE@GOTPCREL(%rip), %rdx
	testq	%rsi, %rsi
	movq	_be_null_filter@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmoveq	%rax, %r15
	movl	(%rdx), %r12d
	testq	%r13, %r13
	cmoveq	%rax, %r13
	movl	$1, %edi
	movl	$56, %esi
	movl	%ecx, %ebx
	callq	_mm_calloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	%ebx, %ecx
	movq	%rax, %rbx
	notl	%r12d
	andl	%ecx, %r12d
	movq	%rax, %rdi
	addq	$48, %rdi
	movl	4(%r14), %esi
	movq	_bufferevent_ops_filter@GOTPCREL(%rip), %rdx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%r12d, %ecx
	callq	_bufferevent_init_common_
	testq	%rax, %rax
	js	LBB0_3
## %bb.5:
	movq	_BEV_OPT_THREADSAFE@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_downcast
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_bufferevent_enable_locking_
LBB0_7:
	movq	%r14, 16(%rbx)
	movq	%r15, 40(%rbx)
	movq	%r13, 32(%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rbx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 24(%rbx)
	movq	_be_filter_readcb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_be_filter_writecb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_be_filter_eventcb@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %r8
	callq	_bufferevent_setcb
	movq	%rbx, %rdi
	callq	_downcast
	movl	(%rax), %edi
	movq	_bufferevent_filtered_outbuf_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_evbuffer_add_cb
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_downcast
	movq	%rax, %rdi
	callq	_bufferevent_init_generic_timeout_cbs_
	movq	%r14, %rdi
	callq	_bufferevent_incref_
	movq	_EV_READ@GOTPCREL(%rip), %rax
	movq	_EV_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bufferevent_enable
	movq	_BEV_SUSPEND_FILT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bufferevent_suspend_read_
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_downcast                       ## TAILCALL
LBB0_3:
	movq	%rbx, %rdi
	callq	_mm_free
LBB0_4:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BEV_OPT_THREADSAFE,4,2         ## @BEV_OPT_THREADSAFE
	.comm	_be_null_filter,8,3             ## @be_null_filter
	.comm	_bufferevent_ops_filter,4,2     ## @bufferevent_ops_filter
	.comm	_be_filter_readcb,4,2           ## @be_filter_readcb
	.comm	_be_filter_writecb,4,2          ## @be_filter_writecb
	.comm	_be_filter_eventcb,4,2          ## @be_filter_eventcb
	.comm	_bufferevent_filtered_outbuf_cb,4,2 ## @bufferevent_filtered_outbuf_cb
	.comm	_EV_READ,4,2                    ## @EV_READ
	.comm	_EV_WRITE,4,2                   ## @EV_WRITE
	.comm	_BEV_SUSPEND_FILT_READ,4,2      ## @BEV_SUSPEND_FILT_READ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_filter_new         ; -- Begin function bufferevent_filter_new
	.p2align	2
_bufferevent_filter_new:                ; @bufferevent_filter_new
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x0, LBB0_7
; %bb.1:
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x19, x0
Lloh0:
	adrp	x26, _BEV_OPT_THREADSAFE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _BEV_OPT_THREADSAFE@GOTPAGEOFF]
Lloh2:
	adrp	x8, _be_null_filter@GOTPAGE
Lloh3:
	ldr	x8, [x8, _be_null_filter@GOTPAGEOFF]
	ldr	w27, [x26]
Lloh4:
	ldr	x8, [x8]
	cmp	x1, #0
	csel	x24, x8, x1, eq
	cmp	x2, #0
	csel	x25, x8, x2, eq
	mov	w0, #1
	mov	w1, #56
	bl	_mm_calloc
	cbz	x0, LBB0_7
; %bb.2:
	mov	x20, x0
	bic	w3, w23, w27
	add	x0, x0, #48
	ldr	w1, [x19, #4]
Lloh5:
	adrp	x2, _bufferevent_ops_filter@GOTPAGE
Lloh6:
	ldr	x2, [x2, _bufferevent_ops_filter@GOTPAGEOFF]
	bl	_bufferevent_init_common_
	tbnz	x0, #63, LBB0_6
; %bb.3:
	ldr	w8, [x26]
	tst	w8, w23
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_downcast
	mov	x1, #0
	bl	_bufferevent_enable_locking_
LBB0_5:
	stp	x25, x24, [x20, #32]
	str	x22, [x20]
	stp	x19, x21, [x20, #16]
Lloh7:
	adrp	x8, _be_filter_readcb@GOTPAGE
Lloh8:
	ldr	x8, [x8, _be_filter_readcb@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _be_filter_writecb@GOTPAGE
Lloh11:
	ldr	x8, [x8, _be_filter_writecb@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x8, _be_filter_eventcb@GOTPAGE
Lloh14:
	ldr	x8, [x8, _be_filter_eventcb@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x4, x20
	bl	_bufferevent_setcb
	mov	x0, x20
	bl	_downcast
	ldr	w0, [x0]
Lloh16:
	adrp	x8, _bufferevent_filtered_outbuf_cb@GOTPAGE
Lloh17:
	ldr	x8, [x8, _bufferevent_filtered_outbuf_cb@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_evbuffer_add_cb
	str	w0, [x20, #8]
	mov	x0, x20
	bl	_downcast
	bl	_bufferevent_init_generic_timeout_cbs_
	mov	x0, x19
	bl	_bufferevent_incref_
Lloh19:
	adrp	x8, _EV_READ@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _EV_WRITE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _EV_WRITE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
	bl	_bufferevent_enable
Lloh25:
	adrp	x8, _BEV_SUSPEND_FILT_READ@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BEV_SUSPEND_FILT_READ@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bufferevent_suspend_read_
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_downcast
LBB0_6:
	mov	x0, x20
	bl	_mm_free
LBB0_7:
	mov	x0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BEV_OPT_THREADSAFE,4,2         ; @BEV_OPT_THREADSAFE
	.comm	_be_null_filter,8,3             ; @be_null_filter
	.comm	_bufferevent_ops_filter,4,2     ; @bufferevent_ops_filter
	.comm	_be_filter_readcb,4,2           ; @be_filter_readcb
	.comm	_be_filter_writecb,4,2          ; @be_filter_writecb
	.comm	_be_filter_eventcb,4,2          ; @be_filter_eventcb
	.comm	_bufferevent_filtered_outbuf_cb,4,2 ; @bufferevent_filtered_outbuf_cb
	.comm	_EV_READ,4,2                    ; @EV_READ
	.comm	_EV_WRITE,4,2                   ; @EV_WRITE
	.comm	_BEV_SUSPEND_FILT_READ,4,2      ; @BEV_SUSPEND_FILT_READ
.subsections_via_symbols
