	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_evbuffer_reference2
_test_evbuffer_reference2:              ## @test_evbuffer_reference2
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MIN_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_EVBUFFER_CHAIN_SIZE@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	leal	-10(%r12), %r14d
	leaq	_test_evbuffer_reference2.data(%rip), %r15
	movq	%r15, %rdi
	movl	$80, %esi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_memset
	xorl	%eax, %eax
	callq	_evbuffer_new
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_evbuffer_add
	movq	%rbx, %rdi
	callq	_evbuffer_validate
	movq	%rbx, %rdi
	movl	$100, %esi
	callq	_evbuffer_expand
	movq	%rbx, %rdi
	callq	_evbuffer_validate
	movq	_no_cleanup@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	xorl	%r8d, %r8d
	callq	_evbuffer_add_reference
	movq	%rbx, %rdi
	callq	_evbuffer_validate
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_evbuffer_add_printf
	movq	%rbx, %rdi
	callq	_evbuffer_validate
	movq	%rbx, %rdi
	callq	_evbuffer_get_length
	movl	%eax, %r14d
	addl	$-8, %r12d
	xorl	%edi, %edi
	cmpl	%r12d, %eax
	sete	%dil
	callq	_tt_assert
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_evbuffer_pullup
	movq	%rax, %r15
	movslq	%r14d, %r14
	xorl	%edi, %edi
	cmpb	$80, -3(%r14,%rax)
	sete	%dil
	callq	_tt_assert
	xorl	%edi, %edi
	cmpb	$50, -2(%r14,%r15)
	sete	%dil
	callq	_tt_assert
	xorl	%edi, %edi
	cmpb	$51, -1(%r14,%r15)
	sete	%dil
	callq	_tt_assert
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_evbuffer_free                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_test_evbuffer_reference2.data,4096,4 ## @test_evbuffer_reference2.data
	.comm	_MIN_BUFFER_SIZE,4,2            ## @MIN_BUFFER_SIZE
	.comm	_EVBUFFER_CHAIN_SIZE,4,2        ## @EVBUFFER_CHAIN_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"2"

	.comm	_no_cleanup,4,2                 ## @no_cleanup
L_.str.1:                               ## @.str.1
	.asciz	"3"

	.no_dead_strip	_test_evbuffer_reference2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_evbuffer_reference2
_test_evbuffer_reference2:              ; @test_evbuffer_reference2
	.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
Lloh0:
	adrp	x8, _MIN_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MIN_BUFFER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _EVBUFFER_CHAIN_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EVBUFFER_CHAIN_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sub	w22, w8, w9
	sub	w20, w22, #10
Lloh6:
	adrp	x21, _test_evbuffer_reference2.data@PAGE
Lloh7:
	add	x21, x21, _test_evbuffer_reference2.data@PAGEOFF
	mov	x0, x21
	mov	w1, #80
	mov	w2, #4096
	bl	_memset
	bl	_evbuffer_new
	mov	x19, x0
	mov	x1, x21
	mov	x2, x20
	bl	_evbuffer_add
	mov	x0, x19
	bl	_evbuffer_validate
	mov	x0, x19
	mov	w1, #100
	bl	_evbuffer_expand
	mov	x0, x19
	bl	_evbuffer_validate
Lloh8:
	adrp	x8, _no_cleanup@GOTPAGE
Lloh9:
	ldr	x8, [x8, _no_cleanup@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #1
	mov	x4, #0
	bl	_evbuffer_add_reference
	mov	x0, x19
	bl	_evbuffer_validate
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_evbuffer_add_printf
	mov	x0, x19
	bl	_evbuffer_validate
	mov	x0, x19
	bl	_evbuffer_get_length
	mov	x20, x0
	sub	w8, w22, #8
	cmp	w0, w8
	cset	w0, eq
	bl	_tt_assert
	mov	x0, x19
	mov	w1, #-1
	bl	_evbuffer_pullup
	add	x20, x0, w20, sxtw
	ldurb	w8, [x20, #-3]
	cmp	w8, #80
	cset	w0, eq
	bl	_tt_assert
	ldurb	w8, [x20, #-2]
	cmp	w8, #50
	cset	w0, eq
	bl	_tt_assert
	ldurb	w8, [x20, #-1]
	cmp	w8, #51
	cset	w0, eq
	bl	_tt_assert
	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_free
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_test_evbuffer_reference2.data,4096,0 ; @test_evbuffer_reference2.data
	.comm	_MIN_BUFFER_SIZE,4,2            ; @MIN_BUFFER_SIZE
	.comm	_EVBUFFER_CHAIN_SIZE,4,2        ; @EVBUFFER_CHAIN_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"2"

	.comm	_no_cleanup,4,2                 ; @no_cleanup
l_.str.1:                               ; @.str.1
	.asciz	"3"

	.no_dead_strip	_test_evbuffer_reference2
.subsections_via_symbols
