	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_prepend_buffer        ## -- Begin function evbuffer_prepend_buffer
	.p2align	4, 0x90
_evbuffer_prepend_buffer:               ## @evbuffer_prepend_buffer
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	movq	%r14, %rsi
	callq	_EVBUFFER_LOCK2
	xorl	%r15d, %r15d
	cmpq	%r14, %rbx
	je	LBB0_9
## %bb.1:
	movq	(%rbx), %r12
	testq	%r12, %r12
	je	LBB0_9
## %bb.2:
	movl	$-1, %r15d
	cmpq	$0, 32(%r14)
	jne	LBB0_9
## %bb.3:
	cmpq	$0, 32(%rbx)
	jne	LBB0_9
## %bb.4:
	movq	(%r14), %r13
	leaq	-56(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_PRESERVE_PINNED
	testq	%rax, %rax
	js	LBB0_9
## %bb.5:
	testq	%r13, %r13
	je	LBB0_6
## %bb.7:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_PREPEND_CHAIN
	jmp	LBB0_8
LBB0_6:
	movl	24(%r14), %edi
	callq	_evbuffer_free_all_chains
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_COPY_CHAIN
LBB0_8:
	movq	-56(%rbp), %rsi
	movq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_RESTORE_PINNED
	addq	%r12, 8(%rbx)
	addq	%r12, 16(%r14)
	movq	%rbx, %rdi
	callq	_evbuffer_invoke_callbacks_
	movq	%r14, %rdi
	callq	_evbuffer_invoke_callbacks_
	xorl	%r15d, %r15d
LBB0_9:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_EVBUFFER_UNLOCK2
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_prepend_buffer        ; -- Begin function evbuffer_prepend_buffer
	.p2align	2
_evbuffer_prepend_buffer:               ; @evbuffer_prepend_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	mov	x0, x1
	mov	x1, x19
	bl	_EVBUFFER_LOCK2
	mov	w21, #0
	cmp	x20, x19
	b.eq	LBB0_5
; %bb.1:
	ldr	x22, [x20]
	cbz	x22, LBB0_5
; %bb.2:
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_4
; %bb.3:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_6
LBB0_4:
	mov	w21, #-1
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	bl	_EVBUFFER_UNLOCK2
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
	ldr	x21, [x19]
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x20
	bl	_PRESERVE_PINNED
	tbnz	x0, #63, LBB0_4
; %bb.7:
	cbz	x21, LBB0_9
; %bb.8:
	mov	x0, x19
	mov	x1, x20
	bl	_PREPEND_CHAIN
	b	LBB0_10
LBB0_9:
	ldr	w0, [x19, #24]
	bl	_evbuffer_free_all_chains
	mov	x0, x19
	mov	x1, x20
	bl	_COPY_CHAIN
LBB0_10:
	ldp	x2, x1, [sp]
	mov	x0, x20
	bl	_RESTORE_PINNED
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	str	x8, [x20, #8]
	ldr	x8, [x19, #16]
	add	x8, x8, x22
	str	x8, [x19, #16]
	mov	x0, x20
	bl	_evbuffer_invoke_callbacks_
	mov	x0, x19
	bl	_evbuffer_invoke_callbacks_
	mov	w21, #0
	b	LBB0_5
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
