	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nbio_read_test
_nbio_read_test:                        ## @nbio_read_test
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_NBIO_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_nbio_open
	movq	%rax, %rbx
	leaq	-24(%rbp), %rsi
	movq	%rax, %rdi
	callq	_nbio_get_ptr
	movq	%rax, %r14
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	cmpq	$1048576, -24(%rbp)             ## imm = 0x100000
	jne	LBB0_3
LBB0_4:
	testq	%r14, %r14
	je	LBB0_6
LBB0_5:
	leaq	L_.str.3(%rip), %rdi
	callq	_puts
LBB0_6:
	movq	%rbx, %rdi
	callq	_nbio_begin_read
	movq	%rbx, %rdi
	callq	_nbio_iterate
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movl	%eax, %r14d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_nbio_iterate
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	testl	%r14d, %r14d
	je	LBB0_11
LBB0_10:
	leaq	L_.str.4(%rip), %rdi
	callq	_puts
LBB0_11:
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nbio_get_ptr
	movq	%rax, %r14
	cmpq	$1048576, -24(%rbp)             ## imm = 0x100000
	je	LBB0_13
## %bb.12:
	leaq	L_.str.5(%rip), %rdi
	callq	_puts
LBB0_13:
	cmpb	$66, (%r14)
	jne	LBB0_15
## %bb.14:
	movq	%r14, %rsi
	incq	%rsi
	movq	%r14, %rdi
	movl	$1048575, %edx                  ## imm = 0xFFFFF
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_16
LBB0_15:
	leaq	L_.str.6(%rip), %rdi
	callq	_puts
LBB0_16:
	movq	%rbx, %rdi
	callq	_nbio_free
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_puts
	cmpq	$1048576, -24(%rbp)             ## imm = 0x100000
	je	LBB0_4
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	callq	_puts
	testq	%r14, %r14
	jne	LBB0_5
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test.bin"

	.comm	_NBIO_READ,4,2                  ## @NBIO_READ
L_.str.1:                               ## @.str.1
	.asciz	"[ERROR]: nbio_open failed (2)"

L_.str.2:                               ## @.str.2
	.asciz	"[ERROR]: wrong size (2)"

L_.str.3:                               ## @.str.3
	.asciz	"[SUCCESS]: Read pointer is available before iterating."

L_.str.4:                               ## @.str.4
	.asciz	"[SUCCESS]: Read finished immediately."

L_.str.5:                               ## @.str.5
	.asciz	"[ERROR]: wrong size (3)"

L_.str.6:                               ## @.str.6
	.asciz	"[ERROR]: wrong data"

	.no_dead_strip	_nbio_read_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nbio_read_test
_nbio_read_test:                        ; @nbio_read_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x8, _NBIO_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NBIO_READ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_nbio_open
	mov	x19, x0
	add	x1, sp, #8
	bl	_nbio_get_ptr
	mov	x20, x0
	cbnz	x19, LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_puts
LBB0_2:
	ldr	x8, [sp, #8]
	cmp	x8, #256, lsl #12               ; =1048576
	b.eq	LBB0_4
; %bb.3:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_puts
LBB0_4:
	cbz	x20, LBB0_6
; %bb.5:
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_puts
LBB0_6:
	mov	x0, x19
	bl	_nbio_begin_read
	mov	x0, x19
	bl	_nbio_iterate
	cbnz	w0, LBB0_10
; %bb.7:
	mov	x20, x0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_nbio_iterate
	cbz	w0, LBB0_8
; %bb.9:
	cbz	w20, LBB0_11
LBB0_10:
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_puts
LBB0_11:
	add	x1, sp, #8
	mov	x0, x19
	bl	_nbio_get_ptr
	mov	x20, x0
	ldr	x8, [sp, #8]
	cmp	x8, #256, lsl #12               ; =1048576
	b.eq	LBB0_13
; %bb.12:
Lloh13:
	adrp	x0, l_.str.5@PAGE
Lloh14:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_puts
LBB0_13:
	ldrb	w8, [x20]
	cmp	w8, #66
	b.ne	LBB0_15
; %bb.14:
	add	x1, x20, #1
	mov	x0, x20
	mov	w2, #1048575
	bl	_memcmp
	cbz	x0, LBB0_16
LBB0_15:
Lloh15:
	adrp	x0, l_.str.6@PAGE
Lloh16:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_puts
LBB0_16:
	mov	x0, x19
	bl	_nbio_free
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test.bin"

	.comm	_NBIO_READ,4,2                  ; @NBIO_READ
l_.str.1:                               ; @.str.1
	.asciz	"[ERROR]: nbio_open failed (2)"

l_.str.2:                               ; @.str.2
	.asciz	"[ERROR]: wrong size (2)"

l_.str.3:                               ; @.str.3
	.asciz	"[SUCCESS]: Read pointer is available before iterating."

l_.str.4:                               ; @.str.4
	.asciz	"[SUCCESS]: Read finished immediately."

l_.str.5:                               ; @.str.5
	.asciz	"[ERROR]: wrong size (3)"

l_.str.6:                               ; @.str.6
	.asciz	"[ERROR]: wrong data"

	.no_dead_strip	_nbio_read_test
.subsections_via_symbols
