	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_expand                ## -- Begin function evbuffer_expand
	.p2align	4, 0x90
_evbuffer_expand:                       ## @evbuffer_expand
	.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
	movq	(%rdi), %rdx
	movq	16(%rdi), %rcx
	leaq	(%rdx,%rsi), %rax
	addq	8(%rdi), %rax
	xorl	%r14d, %r14d
	cmpq	%rax, %rcx
	jae	LBB0_10
## %bb.1:
	movq	%rdi, %r15
	cmpq	%rsi, %rdx
	jae	LBB0_2
## %bb.3:
	cmpq	$257, %rcx                      ## imm = 0x101
	movl	$256, %edx                      ## imm = 0x100
	cmovaeq	%rcx, %rdx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdx, %rbx
	addq	%rdx, %rdx
	cmpq	%rax, %rbx
	jb	LBB0_4
## %bb.5:
	movq	24(%r15), %rdi
	cmpq	32(%r15), %rdi
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_evbuffer_align
	movq	32(%r15), %rdi
LBB0_7:
	movq	%rbx, %rsi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, 32(%r15)
	movq	%rax, 24(%r15)
	movq	%rbx, 16(%r15)
	jmp	LBB0_10
LBB0_2:
	movq	%r15, %rdi
	callq	_evbuffer_align
	jmp	LBB0_10
LBB0_8:
	movl	$-1, %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	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_expand                ; -- Begin function evbuffer_expand
	.p2align	2
_evbuffer_expand:                       ; @evbuffer_expand
	.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
	ldp	x10, x8, [x0]
	add	x9, x10, x1
	add	x8, x9, x8
	ldr	x9, [x0, #16]
	cmp	x9, x8
	b.hs	LBB0_8
; %bb.1:
	mov	x19, x0
	cmp	x10, x1
	b.hs	LBB0_9
; %bb.2:
	mov	w10, #256
	cmp	x9, #256
	csel	x9, x9, x10, hi
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x9
	lsl	x9, x9, #1
	cmp	x20, x8
	b.lo	LBB0_3
; %bb.4:
	ldp	x0, x8, [x19, #24]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_evbuffer_align
	ldr	x0, [x19, #32]
LBB0_6:
	mov	x1, x20
	bl	_realloc
	cbz	x0, LBB0_10
; %bb.7:
	mov	x8, x0
	mov	w0, #0
	stp	x8, x8, [x19, #24]
	str	x20, [x19, #16]
	b	LBB0_11
LBB0_8:
	mov	w0, #0
	b	LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_evbuffer_align
	mov	w0, #0
	b	LBB0_11
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
