	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_decref_and_unlock_    ## -- Begin function evbuffer_decref_and_unlock_
	.p2align	4, 0x90
_evbuffer_decref_and_unlock_:           ## @evbuffer_decref_and_unlock_
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_ASSERT_EVBUFFER_LOCKED
	xorl	%edi, %edi
	cmpq	$0, (%r14)
	setg	%dil
	callq	_EVUTIL_ASSERT
	movq	(%r14), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, (%r14)
	cmpq	$2, %rax
	jl	LBB0_1
## %bb.8:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_EVBUFFER_UNLOCK                ## TAILCALL
LBB0_1:
	movq	40(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdi), %rbx
	callq	_evbuffer_chain_free
	movq	%rbx, %rdi
	testq	%rbx, %rbx
	jne	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	callq	_evbuffer_remove_all_callbacks
	cmpq	$0, 32(%r14)
	je	LBB0_5
## %bb.4:
	movl	28(%r14), %edi
	leaq	24(%r14), %rsi
	callq	_event_deferred_cb_cancel_
LBB0_5:
	movq	%r14, %rdi
	callq	_EVBUFFER_UNLOCK
	cmpq	$0, 16(%r14)
	je	LBB0_7
## %bb.6:
	movl	8(%r14), %edi
	movq	_EVTHREAD_LOCKTYPE_RECURSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_EVTHREAD_FREE_LOCK
LBB0_7:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mm_free                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EVTHREAD_LOCKTYPE_RECURSIVE,4,2 ## @EVTHREAD_LOCKTYPE_RECURSIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_decref_and_unlock_    ; -- Begin function evbuffer_decref_and_unlock_
	.p2align	2
_evbuffer_decref_and_unlock_:           ; @evbuffer_decref_and_unlock_
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_ASSERT_EVBUFFER_LOCKED
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, gt
	bl	_EVUTIL_ASSERT
	ldr	x8, [x19]
	sub	x9, x8, #1
	str	x9, [x19]
	cmp	x8, #2
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_EVBUFFER_UNLOCK
LBB0_2:
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x0]
	bl	_evbuffer_chain_free
	mov	x0, x20
	cbnz	x20, LBB0_3
LBB0_4:
	mov	x0, x19
	bl	_evbuffer_remove_all_callbacks
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w0, [x19, #28]
	add	x1, x19, #24
	bl	_event_deferred_cb_cancel_
LBB0_6:
	mov	x0, x19
	bl	_EVBUFFER_UNLOCK
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x8, _EVTHREAD_LOCKTYPE_RECURSIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVTHREAD_LOCKTYPE_RECURSIVE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_EVTHREAD_FREE_LOCK
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mm_free
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EVTHREAD_LOCKTYPE_RECURSIVE,4,2 ; @EVTHREAD_LOCKTYPE_RECURSIVE
.subsections_via_symbols
