	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function addfile_test_writecb
_addfile_test_writecb:                  ## @addfile_test_writecb
	.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
	movq	%rdx, %rbx
	movl	%edi, %r14d
	movq	%rdx, %rdi
	callq	_evbuffer_validate
	movq	%rbx, %rdi
	callq	_evbuffer_get_length
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	_addfile_test_total_written@GOTPCREL(%rip), %r12
	leaq	L_.str.1(%rip), %r15
	movq	_addfile_test_event_base@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r12), %rcx
	movslq	%eax, %rdi
	addq	%rcx, %rdi
	movl	%edi, (%r12)
	callq	_TT_BLATHER
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_evbuffer_validate
	movq	%rbx, %rdi
	callq	_evbuffer_get_length
	testq	%rax, %rax
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_evbuffer_write
	testl	%eax, %eax
	jg	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %edi
	callq	_evutil_socket_geterror
	movl	%eax, %edi
	callq	_EVUTIL_ERR_RW_RETRIABLE
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_tt_fail_perror
	movl	(%r13), %edi
	xorl	%esi, %esi
	callq	_event_base_loopexit
	jmp	LBB0_6
LBB0_7:
	movq	_addfile_test_done_writing@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_addfile_test_total_written,4,2 ## @addfile_test_total_written
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"write"

	.comm	_addfile_test_event_base,4,2    ## @addfile_test_event_base
	.comm	_addfile_test_done_writing,4,2  ## @addfile_test_done_writing
	.no_dead_strip	_addfile_test_writecb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function addfile_test_writecb
_addfile_test_writecb:                  ; @addfile_test_writecb
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x0
	mov	x0, x2
	bl	_evbuffer_validate
	mov	x0, x19
	bl	_evbuffer_get_length
	cbz	x0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x22, _addfile_test_total_written@GOTPAGE
Lloh1:
	ldr	x22, [x22, _addfile_test_total_written@GOTPAGEOFF]
Lloh2:
	adrp	x21, l_.str.1@PAGE
Lloh3:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh4:
	adrp	x23, _addfile_test_event_base@GOTPAGE
Lloh5:
	ldr	x23, [x23, _addfile_test_event_base@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldrsw	x8, [x22]
	add	x0, x8, w0, sxtw
	str	w0, [x22]
	bl	_TT_BLATHER
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_evbuffer_validate
	mov	x0, x19
	bl	_evbuffer_get_length
	cbz	x0, LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_evbuffer_write
	cmp	w0, #1
	b.ge	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_evutil_socket_geterror
	bl	_EVUTIL_ERR_RW_RETRIABLE
	cbnz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_tt_fail_perror
	ldr	w0, [x23]
	mov	x1, #0
	bl	_event_base_loopexit
	b	LBB0_3
LBB0_7:
Lloh6:
	adrp	x8, _addfile_test_done_writing@GOTPAGE
Lloh7:
	ldr	x8, [x8, _addfile_test_done_writing@GOTPAGEOFF]
	mov	w9, #1
Lloh8:
	str	w9, [x8]
LBB0_8:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_addfile_test_total_written,4,2 ; @addfile_test_total_written
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"write"

	.comm	_addfile_test_event_base,4,2    ; @addfile_test_event_base
	.comm	_addfile_test_done_writing,4,2  ; @addfile_test_done_writing
	.no_dead_strip	_addfile_test_writecb
.subsections_via_symbols
