	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function basic_read_cb
_basic_read_cb:                         ## @basic_read_cb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$264, %rsp                      ## imm = 0x108
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	leaq	-272(%rbp), %rsi
	movl	$256, %edx                      ## imm = 0x100
	callq	_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	8(%rbx), %ecx
	leal	1(%rcx), %edx
	movl	%edx, 8(%rbx)
	cmpl	$1, %ecx
	je	LBB0_6
## %bb.3:
	testl	%ecx, %ecx
	jne	LBB0_8
## %bb.4:
	testl	%eax, %eax
	je	LBB0_5
## %bb.12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-16(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	addq	$264, %rsp                      ## imm = 0x108
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_tt_fail_perror
	jmp	LBB0_10
LBB0_6:
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
LBB0_9:
	callq	_tt_fail_msg
LBB0_10:
	movl	4(%rbx), %edi
	callq	_event_del
	movl	(%rbx), %edi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-16(%rbp), %rax
	jne	LBB0_14
## %bb.11:
	xorl	%esi, %esi
	addq	$264, %rsp                      ## imm = 0x108
	popq	%rbx
	popq	%rbp
	jmp	_event_base_loopexit            ## TAILCALL
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read (callback)"

L_.str.1:                               ## @.str.1
	.asciz	"EOF before data read"

L_.str.2:                               ## @.str.2
	.asciz	"not all data read on first cycle"

L_.str.3:                               ## @.str.3
	.asciz	"too many cycles"

	.no_dead_strip	_basic_read_cb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function basic_read_cb
_basic_read_cb:                         ; @basic_read_cb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #304
	.cfi_def_cfa_offset 304
	stp	x20, x19, [sp, #272]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #288]            ; 16-byte Folded Spill
	add	x29, sp, #288
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	add	x1, sp, #8
	mov	w2, #256
	bl	_read
	tbnz	w0, #31, LBB0_6
; %bb.1:
	ldr	w8, [x19, #8]
	add	w9, w8, #1
	str	w9, [x19, #8]
	cmp	w8, #1
	b.eq	LBB0_7
; %bb.2:
	cbnz	w8, LBB0_9
; %bb.3:
	cbz	w0, LBB0_10
; %bb.4:
	ldur	x8, [x29, #-24]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.5:
	ldp	x29, x30, [sp, #288]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #304
	ret
LBB0_6:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_tt_fail_perror
	b	LBB0_12
LBB0_7:
	cbz	w0, LBB0_12
; %bb.8:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_9:
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_11:
	bl	_tt_fail_msg
LBB0_12:
	ldr	w0, [x19, #4]
	bl	_event_del
	ldr	w0, [x19]
	ldur	x8, [x29, #-24]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x1, #0
	ldp	x29, x30, [sp, #288]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #304
	b	_event_base_loopexit
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read (callback)"

l_.str.1:                               ; @.str.1
	.asciz	"EOF before data read"

l_.str.2:                               ; @.str.2
	.asciz	"not all data read on first cycle"

l_.str.3:                               ; @.str.3
	.asciz	"too many cycles"

	.no_dead_strip	_basic_read_cb
.subsections_via_symbols
