	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nbio_stdio_iterate
_nbio_stdio_iterate:                    ## @nbio_stdio_iterate
	.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
	xorl	%r15d, %r15d
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	movq	8(%rdi), %rax
	movq	%r14, %rcx
	subq	%rax, %rcx
	cmpq	$65536, %rcx                    ## imm = 0x10000
	movl	$65536, %r12d                   ## imm = 0x10000
	cmovbq	%rcx, %r12
	movl	16(%rdi), %ecx
	cmpl	$128, %ecx
	je	LBB0_6
## %bb.2:
	cmpl	$129, %ecx
	jne	LBB0_9
## %bb.3:
	movl	32(%rbx), %ecx
	movq	_BIO_READ@GOTPCREL(%rip), %rdx
	movq	24(%rbx), %rdi
	cmpl	(%rdx), %ecx
	jne	LBB0_5
## %bb.4:
	movl	20(%rbx), %ecx
	movl	$1, %esi
	movq	%r14, %rdx
	callq	_fread
	jmp	LBB0_10
LBB0_6:
	movl	32(%rbx), %ecx
	movq	_BIO_WRITE@GOTPCREL(%rip), %rdx
	movq	24(%rbx), %rdi
	cmpl	(%rdx), %ecx
	jne	LBB0_8
## %bb.7:
	movl	20(%rbx), %ecx
	movl	$1, %esi
	movq	%r14, %rdx
	callq	_fwrite
	cmpq	%r14, %rax
	je	LBB0_10
	jmp	LBB0_13
LBB0_5:
	addq	%rax, %rdi
	movl	20(%rbx), %ecx
	movl	$1, %esi
	movq	%r12, %rdx
	callq	_fread
	jmp	LBB0_9
LBB0_8:
	addq	%rax, %rdi
	movl	20(%rbx), %ecx
	movl	$1, %esi
	movq	%r12, %rdx
	callq	_fwrite
LBB0_9:
	movq	%r12, %r14
LBB0_10:
	addq	8(%rbx), %r14
	movq	%r14, 8(%rbx)
	cmpq	(%rbx), %r14
	jne	LBB0_11
## %bb.12:
	movl	$-1, 16(%rbx)
	movl	$1, %r15d
	jmp	LBB0_13
LBB0_11:
	movl	16(%rbx), %r15d
	shrl	$31, %r15d
LBB0_13:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BIO_READ,4,2                   ## @BIO_READ
	.comm	_BIO_WRITE,4,2                  ## @BIO_WRITE
	.no_dead_strip	_nbio_stdio_iterate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nbio_stdio_iterate
_nbio_stdio_iterate:                    ; @nbio_stdio_iterate
	.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
	cbz	x0, LBB0_14
; %bb.1:
	mov	x19, x0
	ldp	x20, x8, [x0]
	sub	x9, x20, x8
	mov	w10, #65536
	cmp	x9, #16, lsl #12                ; =65536
	csel	x21, x9, x10, lo
	ldr	w9, [x0, #16]
	cmp	w9, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w9, #129
	b.ne	LBB0_10
; %bb.3:
	ldr	w9, [x19, #32]
Lloh0:
	adrp	x10, _BIO_READ@GOTPAGE
Lloh1:
	ldr	x10, [x10, _BIO_READ@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	ldr	x0, [x19, #24]
	cmp	w9, w10
	b.ne	LBB0_8
; %bb.4:
	ldr	w3, [x19, #20]
	mov	w1, #1
	mov	x2, x20
	bl	_fread
	b	LBB0_11
LBB0_5:
	ldr	w9, [x19, #32]
Lloh3:
	adrp	x10, _BIO_WRITE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _BIO_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	ldr	x0, [x19, #24]
	cmp	w9, w10
	b.ne	LBB0_9
; %bb.6:
	ldr	w3, [x19, #20]
	mov	w1, #1
	mov	x2, x20
	bl	_fwrite
	cmp	x0, x20
	b.eq	LBB0_11
; %bb.7:
	mov	w0, #0
	b	LBB0_14
LBB0_8:
	add	x0, x0, x8
	ldr	w3, [x19, #20]
	mov	w1, #1
	mov	x2, x21
	bl	_fread
	b	LBB0_10
LBB0_9:
	add	x0, x0, x8
	ldr	w3, [x19, #20]
	mov	w1, #1
	mov	x2, x21
	bl	_fwrite
LBB0_10:
	mov	x20, x21
LBB0_11:
	ldp	x9, x8, [x19]
	add	x8, x8, x20
	cmp	x8, x9
	str	x8, [x19, #8]
	b.ne	LBB0_13
; %bb.12:
	mov	w8, #-1
	str	w8, [x19, #16]
	mov	w0, #1
	b	LBB0_14
LBB0_13:
	ldr	w8, [x19, #16]
	lsr	w0, w8, #31
LBB0_14:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_BIO_READ,4,2                   ; @BIO_READ
	.comm	_BIO_WRITE,4,2                  ; @BIO_WRITE
	.no_dead_strip	_nbio_stdio_iterate
.subsections_via_symbols
