	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_commit_write_         ## -- Begin function evbuffer_commit_write_
	.p2align	4, 0x90
_evbuffer_commit_write_:                ## @evbuffer_commit_write_
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_upcast_evbuffer
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_EVBUFFER_LOCK
	cmpq	$0, (%r14)
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpl	$0, 8(%r14)
	sete	%dil
	jmp	LBB0_3
LBB0_1:
	xorl	%edi, %edi
LBB0_3:
	callq	_EVUTIL_ASSERT
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_evbuffer_unfreeze
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_evbuffer_drain
	movq	_EVBUFFER_MEM_PINNED_W@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pin_release
	movq	$0, (%r14)
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_evbuffer_decref_and_unlock_    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EVBUFFER_MEM_PINNED_W,4,2      ## @EVBUFFER_MEM_PINNED_W
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_commit_write_         ; -- Begin function evbuffer_commit_write_
	.p2align	2
_evbuffer_commit_write_:                ; @evbuffer_commit_write_
	.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, x1
	mov	x19, x0
	bl	_upcast_evbuffer
	mov	x20, x0
	mov	x0, x19
	bl	_EVBUFFER_LOCK
	ldr	x8, [x20]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w8, [x20, #8]
	cmp	w8, #0
	cset	w0, eq
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_EVUTIL_ASSERT
	mov	x0, x19
	mov	w1, #1
	bl	_evbuffer_unfreeze
	mov	x0, x19
	mov	x1, x21
	bl	_evbuffer_drain
Lloh0:
	adrp	x8, _EVBUFFER_MEM_PINNED_W@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVBUFFER_MEM_PINNED_W@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pin_release
	str	xzr, [x20]
	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
	b	_evbuffer_decref_and_unlock_
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EVBUFFER_MEM_PINNED_W,4,2      ; @EVBUFFER_MEM_PINNED_W
.subsections_via_symbols
