	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function addfile_test_readcb
_addfile_test_readcb:                   ## @addfile_test_readcb
	.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	%rdx, %r15
	movl	%edi, %r14d
	movq	%rdx, %rdi
	movl	%r14d, %esi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_evbuffer_read
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	movq	_addfile_test_total_read@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %edi
	addq	(%rbx), %rdi
	movq	%rdi, (%rbx)
	callq	_TT_BLATHER
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_evbuffer_read
	testl	%eax, %eax
	jg	LBB0_2
LBB0_3:
	testl	%eax, %eax
	jns	LBB0_6
## %bb.4:
	movl	%r14d, %edi
	callq	_evutil_socket_geterror
	movl	%eax, %edi
	callq	_EVUTIL_ERR_RW_RETRIABLE
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_tt_fail_perror
	movq	_addfile_test_event_base@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_event_base_loopexit
LBB0_6:
	movq	_addfile_test_done_writing@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_addfile_test_total_read@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_addfile_test_total_written@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_9
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_addfile_test_event_base@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_event_base_loopexit            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_addfile_test_total_read,8,3    ## @addfile_test_total_read
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"read"

	.comm	_addfile_test_event_base,4,2    ## @addfile_test_event_base
	.comm	_addfile_test_done_writing,8,3  ## @addfile_test_done_writing
	.comm	_addfile_test_total_written,8,3 ## @addfile_test_total_written
	.no_dead_strip	_addfile_test_readcb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function addfile_test_readcb
_addfile_test_readcb:                   ; @addfile_test_readcb
	.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
	mov	x20, x2
	mov	x19, x0
	mov	x0, x2
	mov	x1, x19
	mov	w2, #1024
	bl	_evbuffer_read
Lloh0:
	adrp	x21, _addfile_test_total_read@GOTPAGE
Lloh1:
	ldr	x21, [x21, _addfile_test_total_read@GOTPAGEOFF]
	cmp	w0, #1
	b.lt	LBB0_2
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	add	x0, x8, w0, uxtw
	str	x0, [x21]
	bl	_TT_BLATHER
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1024
	bl	_evbuffer_read
	cmp	w0, #0
	b.gt	LBB0_1
LBB0_2:
	tbz	w0, #31, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_evutil_socket_geterror
	bl	_EVUTIL_ERR_RW_RETRIABLE
	cbnz	w0, LBB0_5
; %bb.4:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_tt_fail_perror
Lloh4:
	adrp	x8, _addfile_test_event_base@GOTPAGE
Lloh5:
	ldr	x8, [x8, _addfile_test_event_base@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_event_base_loopexit
LBB0_5:
Lloh7:
	adrp	x8, _addfile_test_done_writing@GOTPAGE
Lloh8:
	ldr	x8, [x8, _addfile_test_done_writing@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	x8, [x21]
Lloh10:
	adrp	x9, _addfile_test_total_written@GOTPAGE
Lloh11:
	ldr	x9, [x9, _addfile_test_total_written@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_8
LBB0_7:
	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
	ret
LBB0_8:
Lloh13:
	adrp	x8, _addfile_test_event_base@GOTPAGE
Lloh14:
	ldr	x8, [x8, _addfile_test_event_base@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	mov	x1, #0
	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	_event_base_loopexit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_addfile_test_total_read,8,3    ; @addfile_test_total_read
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"read"

	.comm	_addfile_test_event_base,4,2    ; @addfile_test_event_base
	.comm	_addfile_test_done_writing,8,3  ; @addfile_test_done_writing
	.comm	_addfile_test_total_written,8,3 ; @addfile_test_total_written
	.no_dead_strip	_addfile_test_readcb
.subsections_via_symbols
