	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bufferevent_output_filter
_bufferevent_output_filter:             ## @bufferevent_output_filter
	.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
	movq	_test_ok@GOTPCREL(%rip), %rdx
	movl	(%rdx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rdx)
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_BEV_ERROR@GOTPCREL(%rip), %rbx
	jmp	LBB0_8
LBB0_2:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	callq	_evbuffer_get_length
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_evbuffer_pullup
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_evbuffer_get_length
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	leaq	L_.str(%rip), %r13
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	$1, %edx
	xorl	%eax, %eax
	callq	_evbuffer_add
	leaq	(%r12,%r14), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	xorl	%eax, %eax
	callq	_evbuffer_add
	incq	%r14
	movq	%r15, %rdi
	callq	_evbuffer_get_length
	movl	%eax, %eax
	cmpq	%rax, %r14
	jb	LBB0_4
LBB0_5:
	movq	%r15, %rdi
	callq	_evbuffer_get_length
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_evbuffer_drain
	movq	_BEV_OK@GOTPCREL(%rip), %rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	_test_ok@GOTPCREL(%rip), %r14
	cmpl	$1, (%r14)
	jne	LBB0_8
## %bb.7:
	movl	$2, (%r14)
	movq	(%rax), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edx
	callq	_bufferevent_write
	xorl	%edi, %edi
	cmpl	$2, (%r14)
	sete	%dil
	callq	_assert
	decl	(%r14)
LBB0_8:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_test_ok,4,2                    ## @test_ok
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"x"

	.comm	_BEV_ERROR,4,2                  ## @BEV_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"-"

	.comm	_BEV_OK,4,2                     ## @BEV_OK
	.no_dead_strip	_bufferevent_output_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bufferevent_output_filter
_bufferevent_output_filter:             ; @bufferevent_output_filter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
Lloh0:
	adrp	x23, _test_ok@GOTPAGE
Lloh1:
	ldr	x23, [x23, _test_ok@GOTPAGEOFF]
	ldr	w8, [x23]
	add	w9, w8, #1
	str	w9, [x23]
	cbz	w8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _BEV_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BEV_ERROR@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	mov	x19, x4
	mov	x21, x1
	mov	x20, x0
	bl	_evbuffer_get_length
	mov	x1, x0
	mov	x0, x20
	bl	_evbuffer_pullup
	mov	x22, x0
	mov	x0, x20
	bl	_evbuffer_get_length
	cbz	w0, LBB0_5
; %bb.3:
	mov	x24, #0
	mov	w25, #1
Lloh4:
	adrp	x26, l_.str@PAGE
Lloh5:
	add	x26, x26, l_.str@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	stp	x26, x25, [sp]
	mov	x0, x21
	bl	_evbuffer_add
	add	x8, x22, x24
	stp	x8, x25, [sp]
	mov	x0, x21
	bl	_evbuffer_add
	add	x24, x24, #1
	mov	x0, x20
	bl	_evbuffer_get_length
	cmp	x24, w0, uxtw
	b.lo	LBB0_4
LBB0_5:
	mov	x0, x20
	bl	_evbuffer_get_length
	mov	x1, x0
	mov	x0, x20
	bl	_evbuffer_drain
Lloh6:
	adrp	x8, _BEV_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BEV_OK@GOTPAGEOFF]
	cbz	x19, LBB0_8
; %bb.6:
	ldr	w9, [x23]
	cmp	w9, #1
	b.ne	LBB0_8
; %bb.7:
	mov	w8, #2
	str	w8, [x23]
	ldr	x0, [x19]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #1
	bl	_bufferevent_write
	ldr	w8, [x23]
	cmp	w8, #2
	cset	w0, eq
	bl	_assert
	ldr	w8, [x23]
	sub	w8, w8, #1
	str	w8, [x23]
Lloh10:
	adrp	x8, _BEV_OK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BEV_OK@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_test_ok,4,2                    ; @test_ok
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"x"

	.comm	_BEV_ERROR,4,2                  ; @BEV_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"-"

	.comm	_BEV_OK,4,2                     ; @BEV_OK
	.no_dead_strip	_bufferevent_output_filter
.subsections_via_symbols
