	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function frm_read_packet
_frm_read_packet:                       ## @frm_read_packet
	.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
	movq	16(%rdi), %r15
	cmpq	$0, (%r15)
	je	LBB0_4
## %bb.1:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	movq	(%r12), %rdi
	movl	12(%r12), %esi
	movl	8(%r12), %edx
	movl	$1, %ecx
	callq	_av_image_get_buffer_size
	testl	%eax, %eax
	js	LBB0_11
## %bb.5:
	movl	(%rbx), %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_av_get_packet
	testl	%eax, %eax
	js	LBB0_3
## %bb.6:
	movq	(%r12), %rax
	movq	_AV_PIX_FMT_BGRA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.7:
	movl	(%r14), %eax
	cmpl	$4, %eax
	jl	LBB0_10
## %bb.8:
	movq	16(%r14), %rcx
	movl	$3, %edx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	$255, %esi
	subq	(%rcx,%rdx,8), %rsi
	movq	%rsi, (%rcx,%rdx,8)
	addq	$4, %rdx
	cmpq	%rax, %rdx
	jb	LBB0_9
LBB0_10:
	movq	$0, 8(%r14)
	incq	(%r15)
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_11:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_PIX_FMT_BGRA,8,3            ## @AV_PIX_FMT_BGRA
	.no_dead_strip	_frm_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function frm_read_packet
_frm_read_packet:                       ; @frm_read_packet
	.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
	ldr	x21, [x0, #16]
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
LBB0_2:
	ldr	w0, [x8]
LBB0_3:
	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
LBB0_4:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x22, [x8]
	ldr	x0, [x22]
	ldp	w2, w1, [x22, #8]
	mov	w3, #1
	bl	_av_image_get_buffer_size
	tbnz	w0, #31, LBB0_10
; %bb.5:
	mov	x2, x0
	ldr	w0, [x20]
	mov	x1, x19
	bl	_av_get_packet
	tbnz	w0, #31, LBB0_3
; %bb.6:
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _AV_PIX_FMT_BGRA@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AV_PIX_FMT_BGRA@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.7:
	ldr	w8, [x19]
	cmp	w8, #4
	b.lt	LBB0_16
; %bb.8:
	ldr	x9, [x19, #16]
	mov	w10, #7
	cmp	x8, #7
	csel	x10, x8, x10, hi
	sub	x10, x10, #4
	cmp	x10, #12
	b.hs	LBB0_11
; %bb.9:
	mov	w10, #3
	b	LBB0_14
LBB0_10:
Lloh5:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
	b	LBB0_2
LBB0_11:
	lsr	x10, x10, #2
	add	x11, x10, #1
	and	x12, x11, #0x7ffffffffffffffc
	lsr	x13, x12, #2
	mov	w10, #3
	bfi	x10, x13, #4, #60
	add	x13, x9, #88
	mov	w14, #255
	mov	x15, x12
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldur	x16, [x13, #-64]
	ldur	x17, [x13, #-32]
	ldr	x0, [x13]
	ldr	x1, [x13, #32]
	sub	x16, x14, x16
	sub	x17, x14, x17
	sub	x0, x14, x0
	sub	x1, x14, x1
	stur	x16, [x13, #-64]
	stur	x17, [x13, #-32]
	str	x0, [x13]
	str	x1, [x13, #32]
	add	x13, x13, #128
	subs	x15, x15, #4
	b.ne	LBB0_12
; %bb.13:
	cmp	x11, x12
	b.eq	LBB0_16
LBB0_14:
	mov	w11, #255
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	lsl	x12, x10, #3
	ldr	x13, [x9, x12]
	sub	x13, x11, x13
	str	x13, [x9, x12]
	add	x10, x10, #4
	cmp	x10, x8
	b.lo	LBB0_15
LBB0_16:
	mov	w0, #0
	str	xzr, [x19, #8]
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x21]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_PIX_FMT_BGRA,8,3            ; @AV_PIX_FMT_BGRA
	.no_dead_strip	_frm_read_packet
.subsections_via_symbols
