	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_expand_fast_          ## -- Begin function evbuffer_expand_fast_
	.p2align	4, 0x90
_evbuffer_expand_fast_:                 ## @evbuffer_expand_fast_
	.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
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	callq	_ASSERT_EVBUFFER_LOCKED
	xorl	%edi, %edi
	cmpl	$2, %r12d
	setge	%dil
	callq	_EVUTIL_ASSERT
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	_EVBUFFER_IMMUTABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_7
LBB0_2:
	movq	%r13, %rdi
	callq	_evbuffer_chain_new
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_evbuffer_chain_insert
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_7:
	movq	8(%r15), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_16
## %bb.8:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 8(%rbx)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %rdi
	callq	_CHAIN_SPACE_LEN
	movq	%rax, %r13
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	xorl	%edi, %edi
	cmpq	(%rax), %rbx
	sete	%dil
	callq	_EVUTIL_ASSERT
	xorl	%eax, %eax
	testq	%r13, %r13
	setne	%al
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	$0, 32(%rbx)
	movq	24(%rbx), %r13
	movl	$1, %eax
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	addq	%r13, %r14
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	cmpq	%r13, %r14
	jae	LBB0_4
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	addl	%eax, %r15d
	cmpl	%r12d, %r15d
	je	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_9
## %bb.15:
	movl	%r15d, %eax
	jmp	LBB0_20
LBB0_16:
	xorl	%r14d, %r14d
	movl	$1, %edi
	xorl	%eax, %eax
	cmpl	%r12d, %eax
	jl	LBB0_21
LBB0_17:
	movq	8(%r15), %rax
	movq	(%rax), %rbx
	movq	8(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_23
## %bb.18:
	movq	%rbx, %rdi
	callq	_CHAIN_SPACE_LEN
	movq	%rax, %r12
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_24
	jmp	LBB0_27
LBB0_19:
	movl	%r12d, %eax
LBB0_20:
	xorl	%edi, %edi
	cmpl	%r12d, %r15d
	setne	%dil
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	cmpl	%r12d, %eax
	jge	LBB0_17
LBB0_21:
	callq	_EVUTIL_ASSERT
	subq	%r14, %r13
	movq	%r13, %rdi
	callq	_evbuffer_chain_new
	testq	%rax, %rax
	je	LBB0_5
## %bb.22:
	movq	(%r15), %rcx
	jmp	LBB0_30
LBB0_23:
	xorl	%edi, %edi
	cmpq	16(%r15), %rbx
	sete	%dil
	callq	_EVUTIL_ASSERT
	xorl	%r12d, %r12d
LBB0_24:
	movq	%r15, %r13
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %r15
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	sete	%dil
	callq	_EVUTIL_ASSERT
	movq	%rbx, %rdi
	callq	_evbuffer_chain_free
	movq	%r15, %rbx
	testq	%r15, %r15
	jne	LBB0_25
## %bb.26:
	movq	%r13, %r15
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_27:
	xorl	%edi, %edi
	subq	%r12, %r13
	setae	%dil
	callq	_EVUTIL_ASSERT
	movq	%r13, %rdi
	callq	_evbuffer_chain_new
	testq	%rax, %rax
	je	LBB0_32
## %bb.28:
	testq	%r14, %r14
	je	LBB0_34
## %bb.29:
	movq	8(%r15), %rcx
	movq	(%rcx), %rcx
LBB0_30:
	movq	%rax, 16(%rcx)
	movq	%rax, (%r15)
	jmp	LBB0_4
LBB0_32:
	testq	%r14, %r14
	je	LBB0_35
## %bb.33:
	movq	8(%r15), %rax
	movq	(%rax), %rcx
	movq	%rcx, (%r15)
	movq	(%rax), %rax
	movq	$0, 16(%rax)
	jmp	LBB0_5
LBB0_34:
	movq	%rax, (%r15)
	leaq	16(%r15), %rcx
	movq	%rax, 16(%r15)
	movq	%rcx, 8(%r15)
	jmp	LBB0_4
LBB0_35:
	movq	%r15, %rdi
	callq	_ZERO_CHAIN
LBB0_5:
	movl	$-1, %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EVBUFFER_IMMUTABLE,4,2         ## @EVBUFFER_IMMUTABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_expand_fast_          ; -- Begin function evbuffer_expand_fast_
	.p2align	2
_evbuffer_expand_fast_:                 ; @evbuffer_expand_fast_
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x0]
	bl	_ASSERT_EVBUFFER_LOCKED
	cmp	w21, #1
	cset	w0, gt
	bl	_EVUTIL_ASSERT
	cbz	x22, LBB0_2
; %bb.1:
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _EVBUFFER_IMMUTABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EVBUFFER_IMMUTABLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_2:
	mov	x0, x20
	bl	_evbuffer_chain_new
	cbz	x0, LBB0_30
; %bb.3:
	mov	x1, x0
	mov	x0, x19
	bl	_evbuffer_chain_insert
	mov	w0, #0
	b	LBB0_31
LBB0_4:
	ldr	x8, [x19, #8]
	ldr	x22, [x8]
	cbz	x22, LBB0_12
; %bb.5:
	mov	w25, #0
	mov	x24, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	bl	_CHAIN_SPACE_LEN
	mov	x23, x0
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cmp	x22, x8
	cset	w0, eq
	bl	_EVUTIL_ASSERT
	cmp	x23, #0
	cset	w8, ne
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	xzr, [x22, #32]
	ldr	x23, [x22, #24]
	mov	w8, #1
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x24, x23, x24
	cmp	x24, x20
	b.hs	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	add	w25, w8, w25
	cmp	w25, w21
	b.eq	LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x22, [x22, #16]
	mov	x8, x25
	cbnz	x22, LBB0_6
	b	LBB0_17
LBB0_12:
	mov	x24, #0
	mov	w8, #0
	mov	w0, #1
	cmp	w8, w21
	b.lt	LBB0_18
LBB0_13:
	ldr	x8, [x19, #8]
	ldr	x21, [x8]
	ldr	x23, [x21, #8]
	cbz	x23, LBB0_20
; %bb.14:
	mov	x0, x21
	bl	_CHAIN_SPACE_LEN
	mov	x22, x0
	ldr	x21, [x21, #16]
	cbnz	x21, LBB0_21
	b	LBB0_22
LBB0_15:
	mov	w0, #0
	b	LBB0_31
LBB0_16:
	mov	x8, x21
LBB0_17:
	cmp	w25, w21
	cset	w0, ne
	cmp	w8, w21
	b.ge	LBB0_13
LBB0_18:
	bl	_EVUTIL_ASSERT
	sub	x0, x20, x24
	bl	_evbuffer_chain_new
	cbz	x0, LBB0_30
; %bb.19:
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19]
	b	LBB0_25
LBB0_20:
	ldr	x8, [x19, #16]
	cmp	x21, x8
	cset	w0, eq
	bl	_EVUTIL_ASSERT
	mov	x22, #0
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldp	x8, x24, [x21, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_EVUTIL_ASSERT
	mov	x0, x21
	bl	_evbuffer_chain_free
	mov	x21, x24
	cbnz	x24, LBB0_21
LBB0_22:
	subs	x20, x20, x22
	cset	w0, hs
	bl	_EVUTIL_ASSERT
	mov	x0, x20
	bl	_evbuffer_chain_new
	cbz	x0, LBB0_26
; %bb.23:
	mov	x8, x0
	mov	w0, #0
	cbz	x23, LBB0_28
; %bb.24:
	ldr	x9, [x19, #8]
	ldr	x9, [x9]
LBB0_25:
	str	x8, [x9, #16]
	str	x8, [x19]
	b	LBB0_31
LBB0_26:
	cbz	x23, LBB0_29
; %bb.27:
	ldr	x8, [x19, #8]
	ldr	x9, [x8]
	str	x9, [x19]
	ldr	x8, [x8]
	str	xzr, [x8, #16]
	b	LBB0_30
LBB0_28:
	mov	x9, x19
	str	x8, [x9, #16]!
	stp	x8, x9, [x19]
	b	LBB0_31
LBB0_29:
	mov	x0, x19
	bl	_ZERO_CHAIN
LBB0_30:
	mov	w0, #-1
LBB0_31:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EVBUFFER_IMMUTABLE,4,2         ; @EVBUFFER_IMMUTABLE
.subsections_via_symbols
