	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ok_read
_ok_read:                               ## @ok_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r15d, %r15d
	testq	%rsi, %rsi
	je	LBB0_25
## %bb.1:
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %r14
	callq	_BIO_get_data
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_BIO_next
	testq	%rbx, %rbx
	je	LBB0_25
## %bb.2:
	testq	%rax, %rax
	je	LBB0_25
## %bb.3:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_BIO_get_init
	testq	%rax, %rax
	je	LBB0_25
## %bb.4:
	xorl	%r15d, %r15d
	testl	%r13d, %r13d
	jle	LBB0_24
## %bb.5:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 48(%rbx)
	je	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rbx), %r14d
	movslq	4(%rbx), %rsi
	subl	%esi, %r14d
	cmpl	%r13d, %r14d
	cmovgel	%r13d, %r14d
	shlq	$2, %rsi
	addq	40(%rbx), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_memcpy
	subl	%r14d, %r13d
	movl	4(%rbx), %eax
	addl	%r14d, %eax
	movl	%eax, 4(%rbx)
	cmpl	%eax, (%rbx)
	jne	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$0, 4(%rbx)
	movslq	8(%rbx), %rdx
	movq	16(%rbx), %rax
	cmpq	%rdx, %rax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	$0, (%rbx)
	jmp	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	subl	%eax, %edx
	movl	%edx, (%rbx)
	movq	40(%rbx), %rdi
	leaq	(%rdi,%rax,4), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memmove
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	$0, 48(%rbx)
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	addl	%r14d, %r15d
	testl	%r13d, %r13d
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movslq	%r14d, %rax
	addq	%rax, %r12
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_IOBS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movslq	(%rbx), %rsi
	subl	%esi, %edx
	shlq	$2, %rsi
	addq	40(%rbx), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_BIO_read
	testl	%eax, %eax
	jle	LBB0_24
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=1
	addl	%eax, (%rbx)
	movl	24(%rbx), %eax
	cmpl	$1, %eax
	jne	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	callq	_sig_in
	testl	%eax, %eax
	je	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	24(%rbx), %eax
LBB0_20:                                ##   in Loop: Header=BB0_6 Depth=1
	testl	%eax, %eax
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	callq	_block_in
	testl	%eax, %eax
	je	LBB0_18
LBB0_22:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, 32(%rbx)
	jle	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_6 Depth=1
	testl	%r13d, %r13d
	jg	LBB0_6
	jmp	LBB0_24
LBB0_18:
	movq	%r14, %rdi
	callq	_BIO_clear_retry_flags
	xorl	%r15d, %r15d
	jmp	LBB0_25
LBB0_13:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_24:
	movq	%r14, %rdi
	callq	_BIO_clear_retry_flags
	movq	%r14, %rdi
	callq	_BIO_copy_next_retry
LBB0_25:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IOBS,4,2                       ## @IOBS
	.no_dead_strip	_ok_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ok_read
_ok_read:                               ; @ok_read
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x1, LBB0_22
; %bb.1:
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_BIO_get_data
	mov	x23, x0
	mov	x0, x19
	bl	_BIO_next
	mov	w20, #0
	cbz	x23, LBB0_25
; %bb.2:
	mov	x24, x0
	cbz	x0, LBB0_25
; %bb.3:
	mov	x0, x19
	bl	_BIO_get_init
	cbz	x0, LBB0_22
; %bb.4:
	cmp	w21, #1
	b.lt	LBB0_23
; %bb.5:
	mov	w20, #0
Lloh0:
	adrp	x26, _IOBS@GOTPAGE
Lloh1:
	ldr	x26, [x26, _IOBS@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #48]
	cbz	x8, LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldp	w8, w9, [x23]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	sub	w8, w8, w9
	cmp	w8, w21
	csel	w25, w8, w21, lt
	ldr	x8, [x23, #40]
	add	x1, x8, x9, lsl #2
	mov	x0, x22
	mov	x2, x25
	bl	_memcpy
	sub	w21, w21, w25
	ldp	w9, w8, [x23]
	add	w8, w8, w25
	cmp	w9, w8
	str	w8, [x23, #4]
	b.ne	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	str	wzr, [x23, #4]
	ldrsw	x9, [x23, #8]
	ldr	x8, [x23, #16]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	str	wzr, [x23]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	w2, w9, w8
	str	w2, [x23]
	ldr	x0, [x23, #40]
	add	x1, x0, x8, lsl #2
	bl	_memmove
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	str	xzr, [x23, #48]
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w20, w25, w20
	cbz	w21, LBB0_24
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, w25, sxtw
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x26]
	ldrsw	x9, [x23]
	sub	w2, w8, w9
	ldr	x8, [x23, #40]
	add	x1, x8, x9, lsl #2
	mov	x0, x24
	bl	_BIO_read
	cmp	w0, #1
	b.lt	LBB0_24
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x23]
	add	w8, w8, w0
	str	w8, [x23]
	ldr	w8, [x23, #24]
	cmp	w8, #1
	b.ne	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_sig_in
	cbz	w0, LBB0_26
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x23, #24]
LBB0_18:                                ;   in Loop: Header=BB0_6 Depth=1
	cbnz	w8, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_block_in
	cbz	w0, LBB0_26
LBB0_20:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x23, #32]
	cmp	x8, #1
	b.lt	LBB0_24
; %bb.21:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	w21, #0
	b.gt	LBB0_6
	b	LBB0_24
LBB0_22:
	mov	w20, #0
	b	LBB0_25
LBB0_23:
	mov	w20, #0
LBB0_24:
	mov	x0, x19
	bl	_BIO_clear_retry_flags
	mov	x0, x19
	bl	_BIO_copy_next_retry
LBB0_25:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_26:
	mov	x0, x19
	bl	_BIO_clear_retry_flags
	mov	w20, #0
	b	LBB0_25
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_IOBS,4,2                       ; @IOBS
	.no_dead_strip	_ok_read
.subsections_via_symbols
