	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nbiof_read
_nbiof_read:                            ## @nbiof_read
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	cmpq	$0, (%rdi)
	je	LBB0_7
## %bb.2:
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%r14, %rdi
	callq	_BIO_clear_retry_flags
	leaq	-33(%rbp), %rdi
	movl	$1, %esi
	callq	_RAND_priv_bytes
	movl	$-1, %ebx
	testq	%rax, %rax
	jle	LBB0_7
## %bb.3:
	movzbl	-33(%rbp), %eax
	andl	$7, %eax
	je	LBB0_4
## %bb.5:
	cmpl	%r15d, %eax
	cmovll	%eax, %r15d
	movq	(%r14), %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_BIO_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_BIO_copy_next_retry
	jmp	LBB0_7
LBB0_4:
	movq	%r14, %rdi
	callq	_BIO_set_retry_read
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nbiof_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nbiof_read
_nbiof_read:                            ; @nbiof_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	cbz	x1, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_6
; %bb.2:
	mov	x21, x2
	mov	x0, x19
	bl	_BIO_clear_retry_flags
	add	x0, sp, #15
	mov	w1, #1
	bl	_RAND_priv_bytes
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.3:
	ldrb	w8, [sp, #15]
	ands	w8, w8, #0x7
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, w21
	csel	w2, w8, w21, lt
	ldr	x0, [x19]
	mov	x1, x20
	bl	_BIO_read
	mov	x20, x0
	tbz	w0, #31, LBB0_9
; %bb.5:
	mov	x0, x19
	bl	_BIO_copy_next_retry
	b	LBB0_9
LBB0_6:
	mov	w20, #0
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_BIO_set_retry_read
LBB0_8:
	mov	w20, #-1
LBB0_9:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nbiof_read
.subsections_via_symbols
