	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function refill
_refill:                                ## @refill
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rdi), %r14d
	testl	%r14d, %r14d
	js	LBB0_5
## %bb.1:
	leaq	8(%rbx), %rdi
	callq	_bytestream_get_be16
	movq	8(%rbx), %rsi
	movq	16(%rbx), %rcx
	movl	%eax, %edx
	cmpq	%rcx, %rsi
	jle	LBB0_4
## %bb.2:
	leaq	1(%rcx), %rdx
	cmpq	%rdx, %rsi
	movl	$65535, %esi                    ## imm = 0xFFFF
	movl	$255, %edx
	cmovgl	%esi, %edx
	orl	%eax, %edx
	movq	%rcx, 8(%rbx)
	movl	24(%rbx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, 24(%rbx)
	cmpl	$4, %eax
	jl	LBB0_4
## %bb.3:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
LBB0_4:
	movl	%r14d, %ecx
	shll	%cl, %edx
	addl	%edx, 28(%rbx)
	addl	$-16, %r14d
LBB0_5:
	movl	%r14d, (%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_refill
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function refill
_refill:                                ; @refill
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w20, [x0]
	tbnz	w20, #31, LBB0_5
; %bb.1:
	add	x0, x19, #8
	bl	_bytestream_get_be16
	ldp	x9, x8, [x19, #8]
	cmp	x9, x8
	b.le	LBB0_4
; %bb.2:
	add	x10, x8, #1
	cmp	x9, x10
	mov	w9, #255
	mov	w10, #65535
	csel	w9, w10, w9, gt
	orr	w0, w9, w0
	str	x8, [x19, #8]
	ldr	w8, [x19, #24]
	add	w9, w8, #1
	str	w9, [x19, #24]
	cmp	w8, #4
	b.lt	LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #32]
LBB0_4:
	lsl	w8, w0, w20
	ldr	w9, [x19, #28]
	add	w8, w9, w8
	str	w8, [x19, #28]
	sub	w20, w20, #16
LBB0_5:
	str	w20, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_refill
.subsections_via_symbols
