	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_reserve_space         ## -- Begin function evbuffer_reserve_space
	.p2align	4, 0x90
_evbuffer_reserve_space:                ## @evbuffer_reserve_space
	.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
	movl	%ecx, %ebx
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_EVBUFFER_LOCK
	movl	$-1, %r12d
	testl	%ebx, %ebx
	jle	LBB0_7
## %bb.1:
	cmpq	$0, (%r13)
	jne	LBB0_7
## %bb.2:
	movq	%r13, %rdi
	movq	%r14, %rsi
	cmpl	$1, %ebx
	jne	LBB0_5
## %bb.3:
	callq	_evbuffer_expand_singlechain
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_CHAIN_SPACE_PTR
	movl	%eax, 8(%r15)
	movq	%rbx, %rdi
	callq	_CHAIN_SPACE_LEN
	movq	%rax, (%r15)
	testq	%r14, %r14
	sets	%cl
	cmpq	%r14, %rax
	setae	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_EVUTIL_ASSERT
	movl	$1, %r12d
	jmp	LBB0_7
LBB0_5:
	movl	%ebx, %edx
	callq	_evbuffer_expand_fast_
	testq	%rax, %rax
	js	LBB0_7
## %bb.6:
	leaq	-48(%rbp), %r8
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movl	%ebx, %ecx
	xorl	%r9d, %r9d
	callq	_evbuffer_read_setup_vecs_
	movl	%eax, %r12d
LBB0_7:
	movq	%r13, %rdi
	callq	_EVBUFFER_UNLOCK
	movl	%r12d, %eax
	addq	$8, %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_reserve_space         ; -- Begin function evbuffer_reserve_space
	.p2align	2
_evbuffer_reserve_space:                ; @evbuffer_reserve_space
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_EVBUFFER_LOCK
	mov	w23, #-1
	cmp	w22, #1
	b.lt	LBB0_8
; %bb.1:
	ldr	x8, [x19]
	cbnz	x8, LBB0_8
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	cmp	w22, #1
	b.ne	LBB0_5
; %bb.3:
	bl	_evbuffer_expand_singlechain
	cbz	x0, LBB0_7
; %bb.4:
	mov	x22, x0
	bl	_CHAIN_SPACE_PTR
	str	w0, [x21, #8]
	mov	x0, x22
	bl	_CHAIN_SPACE_LEN
	str	x0, [x21]
	cmp	x20, #0
	ccmp	x0, x20, #2, ge
	cset	w0, hs
	bl	_EVUTIL_ASSERT
	mov	w23, #1
	b	LBB0_8
LBB0_5:
	mov	x2, x22
	bl	_evbuffer_expand_fast_
	tbnz	x0, #63, LBB0_7
; %bb.6:
	add	x4, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	mov	w5, #0
	bl	_evbuffer_read_setup_vecs_
	mov	x23, x0
	b	LBB0_8
LBB0_7:
	mov	w23, #-1
LBB0_8:
	mov	x0, x19
	bl	_EVBUFFER_UNLOCK
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
