	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rd_skip                        ## -- Begin function rd_skip
	.p2align	4, 0x90
_rd_skip:                               ## @rd_skip
	.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
	movq	$0, -40(%rbp)
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.1:
	movq	%rdi, %rbx
	movq	_bufend@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movq	_bufpt@GOTPCREL(%rip), %r12
	subq	(%r12), %rdi
	movq	%rbx, %rsi
	callq	_MIN
	addq	%rax, (%r12)
	cmpq	%rbx, %rax
	je	LBB0_16
## %bb.2:
	subq	%rax, %rbx
	movq	_rdblksz@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rbx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	jmp	LBB0_5
LBB0_4:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_5:
	movq	%rbx, %rdi
	subq	%rdx, %rdi
	leaq	-40(%rbp), %rsi
	callq	_ar_fow
	testq	%rax, %rax
	js	LBB0_15
## %bb.6:
	movq	-40(%rbp), %rax
	subq	%rax, %rbx
	movq	_rdcnt@GOTPCREL(%rip), %rcx
	addq	%rax, (%rcx)
	testq	%rbx, %rbx
	jle	LBB0_16
## %bb.7:
	movq	(%r12), %rcx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_MIN
	movq	(%r12), %rcx
	addq	%rax, %rcx
	movq	%rcx, (%r12)
	subq	%rax, %rbx
	jle	LBB0_14
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	subq	%rcx, %rax
	jg	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%eax, %eax
	callq	_buf_fill
	testq	%rax, %rax
	js	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	jne	LBB0_8
## %bb.12:
	movl	$1, %r14d
	jmp	LBB0_16
LBB0_15:
	movl	$-1, %r14d
	jmp	LBB0_16
LBB0_14:
	xorl	%r14d, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bufend,8,3                     ## @bufend
	.comm	_bufpt,8,3                      ## @bufpt
	.comm	_rdblksz,8,3                    ## @rdblksz
	.comm	_rdcnt,8,3                      ## @rdcnt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rd_skip                        ; -- Begin function rd_skip
	.p2align	2
_rd_skip:                               ; @rd_skip
	.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
	str	xzr, [sp, #8]
	cbz	x0, LBB0_12
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x20, _bufend@GOTPAGE
Lloh1:
	ldr	x20, [x20, _bufend@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh2:
	adrp	x21, _bufpt@GOTPAGE
Lloh3:
	ldr	x21, [x21, _bufpt@GOTPAGEOFF]
	ldr	x9, [x21]
	sub	x0, x8, x9
	mov	x1, x19
	bl	_MIN
	ldr	x8, [x21]
	add	x8, x8, x0
	str	x8, [x21]
	cmp	x0, x19
	b.ne	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_12
LBB0_3:
	sub	x19, x19, x0
Lloh4:
	adrp	x8, _rdblksz@GOTPAGE
Lloh5:
	ldr	x8, [x8, _rdblksz@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	sdiv	x9, x19, x8
	mul	x0, x9, x8
	add	x1, sp, #8
	bl	_ar_fow
	tbnz	x0, #63, LBB0_11
; %bb.4:
	ldr	x8, [sp, #8]
	sub	x19, x19, x8
Lloh7:
	adrp	x9, _rdcnt@GOTPAGE
Lloh8:
	ldr	x9, [x9, _rdcnt@GOTPAGEOFF]
	ldr	x10, [x9]
	add	x8, x10, x8
	str	x8, [x9]
	cmp	x19, #1
	b.lt	LBB0_2
; %bb.5:
	ldr	x8, [x21]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x1, x19
	bl	_MIN
	ldr	x8, [x21]
	add	x8, x8, x0
	str	x8, [x21]
	sub	x19, x19, x0
	cmp	x19, #0
	b.le	LBB0_2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20]
	sub	x0, x9, x8
	cmp	x0, #0
	b.gt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_buf_fill
	tbnz	x0, #63, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	cbnz	x0, LBB0_6
; %bb.10:
	mov	w0, #1
	b	LBB0_12
LBB0_11:
	mov	w0, #-1
LBB0_12:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_bufend,8,3                     ; @bufend
	.comm	_bufpt,8,3                      ; @bufpt
	.comm	_rdblksz,8,3                    ; @rdblksz
	.comm	_rdcnt,8,3                      ; @rdcnt
.subsections_via_symbols
