	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mov_write_packet
_mov_write_packet:                      ## @mov_write_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	%rsi, -48(%rbp)
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r12
	movq	(%r15), %r14
	movq	8(%r14), %r13
	movq	(%rsi), %rax
	leaq	(%rax,%rax,8), %rbx
	movq	64(%r13,%rbx,8), %rdi
	callq	_is_cover_image
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	leaq	64(,%rbx,8), %rax
	addq	%r13, %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	jne	LBB0_40
## %bb.5:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rcx
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_av_log
	jmp	LBB0_40
LBB0_1:
	movl	$1, %ebx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_mov_flush_fragment
	jmp	LBB0_40
LBB0_7:
	cmpl	$0, 8(%r12)
	je	LBB0_42
## %bb.8:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.9:
	movl	$32, %r13d
	xorl	%ebx, %ebx
	movq	_AV_CODEC_ID_MOV_TEXT@GOTPCREL(%rip), %rsi
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	addq	$72, %r13
	cmpq	%rcx, %rbx
	jge	LBB0_17
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %r15
	movq	(%r15,%r13), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rsi), %rcx
	jne	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-32(%r15,%r13), %rdx
	cmpq	16(%r12), %rdx
	jge	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	$0, -24(%r15,%r13)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$0, -16(%r15,%r13)
	jne	LBB0_16
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%rsi, %r12
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_mov_write_subtitle_end_packet
	testl	%eax, %eax
	js	LBB0_39
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	$1, -16(%r15,%r13)
	movl	(%r14), %eax
	movq	%r12, %rsi
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_6:
	leaq	56(,%rbx,8), %rdi
	addq	%r13, %rdi
	movq	%r12, %rsi
	callq	_av_packet_ref
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
	jmp	LBB0_41
LBB0_17:
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	24(%r12,%r13,8), %rax
	movq	_MODE_MOV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_38
## %bb.18:
	movq	32(%r12,%r13,8), %rdx
	movq	8(%rdx), %rax
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_38
## %bb.19:
	movq	-48(%rbp), %r14
	cmpq	$0, 48(%r12,%r13,8)
	je	LBB0_20
## %bb.21:
	movl	16(%rdx), %eax
	cmpl	$15, %eax
	movl	$16, %ecx
	cmovnel	%eax, %ecx
	imull	20(%rdx), %ecx
	addl	$15, %ecx
	sarl	$3, %ecx
	andl	$-2, %ecx
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ff_reshuffle_raw_rgb
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_40
## %bb.22:
	leaq	(%r12,%r13,8), %rax
	addq	$32, %rax
	movq	(%rax), %rdx
	jmp	LBB0_23
LBB0_42:
	movq	%r15, %rdi
	movq	%r12, %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mov_write_single_packet        ## TAILCALL
LBB0_20:
	xorl	%ebx, %ebx
LBB0_23:
	movq	24(%rdx), %rax
	movq	_AV_PIX_FMT_PAL8@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_28
## %bb.24:
	cmpl	$0, 40(%r12,%r13,8)
	je	LBB0_25
LBB0_28:
	movq	(%rdx), %rcx
	movq	_AV_CODEC_ID_RAWVIDEO@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_34
## %bb.29:
	movq	_AV_PIX_FMT_GRAY8@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_31
## %bb.30:
	movq	_AV_PIX_FMT_MONOBLACK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_34
LBB0_31:
	movq	-48(%rbp), %rax
	cmpl	$0, 8(%rax)
	jle	LBB0_34
## %bb.32:
	movq	24(%rax), %rcx
	xorl	%edx, %edx
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	notl	(%rcx,%rdx,4)
	incq	%rdx
	movslq	8(%rax), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_33
	jmp	LBB0_34
LBB0_25:
	movl	44(%r12,%r13,8), %ecx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_ff_get_packet_palette
	testl	%eax, %eax
	js	LBB0_36
## %bb.26:
	je	LBB0_34
## %bb.27:
	leaq	(%r12,%r13,8), %rax
	addq	$40, %rax
	incl	(%rax)
LBB0_34:
	testl	%ebx, %ebx
	je	LBB0_38
## %bb.35:
	movq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_mov_write_single_packet
	movl	%eax, %r14d
LBB0_37:
	leaq	-48(%rbp), %rdi
	callq	_av_packet_free
	movl	%r14d, %ebx
	jmp	LBB0_40
LBB0_38:
	movq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_mov_write_single_packet
LBB0_39:
	movl	%eax, %ebx
LBB0_40:
	movl	%ebx, %eax
LBB0_41:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_36:
	movl	%eax, %r14d
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jne	LBB0_37
	jmp	LBB0_40
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Got more than one picture in stream %d, ignoring.\n"

	.comm	_AV_CODEC_ID_MOV_TEXT,8,3       ## @AV_CODEC_ID_MOV_TEXT
	.comm	_MODE_MOV,8,3                   ## @MODE_MOV
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AV_PIX_FMT_PAL8,8,3            ## @AV_PIX_FMT_PAL8
	.comm	_AV_CODEC_ID_RAWVIDEO,8,3       ## @AV_CODEC_ID_RAWVIDEO
	.comm	_AV_PIX_FMT_GRAY8,8,3           ## @AV_PIX_FMT_GRAY8
	.comm	_AV_PIX_FMT_MONOBLACK,8,3       ## @AV_PIX_FMT_MONOBLACK
	.no_dead_strip	_mov_write_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mov_write_packet
_mov_write_packet:                      ; @mov_write_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	str	x1, [sp, #8]
	cbz	x1, LBB0_5
; %bb.1:
	mov	x20, x1
	ldr	x25, [x19]
	ldr	x23, [x25, #8]
	ldr	x24, [x1]
	mov	w8, #72
	madd	x21, x24, x8, x23
	ldr	x0, [x21, #64]!
	bl	_is_cover_image
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x8, [x21]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.3:
	b.ne	LBB0_22
; %bb.4:
Lloh0:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x3, [x20]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w22, #0
	b	LBB0_41
LBB0_5:
	mov	w22, #1
	mov	x0, x19
	mov	w1, #1
	bl	_mov_flush_fragment
	b	LBB0_41
LBB0_6:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_23
; %bb.7:
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.8:
	mov	x26, #0
	mov	x21, #0
Lloh5:
	adrp	x27, _AV_CODEC_ID_MOV_TEXT@GOTPAGE
Lloh6:
	ldr	x27, [x27, _AV_CODEC_ID_MOV_TEXT@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x21, x21, #1
	add	x26, x26, #72
	cmp	x21, w8, sxtw
	b.ge	LBB0_17
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x28, [x25, #8]
	add	x9, x28, x26
	ldr	x9, [x9, #32]
	ldr	x9, [x9]
	ldr	x10, [x27]
	cmp	x9, x10
	b.ne	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x2, [x28, x26]
	ldr	x9, [x20, #16]
	cmp	x2, x9
	b.ge	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x9, x28, x26
	ldr	x10, [x9, #8]
	cbz	x10, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w9, [x9, #16]
	cbnz	w9, LBB0_9
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_mov_write_subtitle_end_packet
	tbnz	w0, #31, LBB0_40
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x8, x28, x26
	mov	w9, #1
	str	w9, [x8, #16]
	ldr	w8, [x25]
	b	LBB0_9
LBB0_16:
	mov	w8, #72
	madd	x8, x24, x8, x23
	add	x0, x8, #56
	mov	x1, x20
	bl	_av_packet_ref
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	b	LBB0_42
LBB0_17:
	mov	w8, #72
	mul	x8, x24, x8
	add	x8, x23, x8
	ldr	x8, [x8, #24]
Lloh7:
	adrp	x9, _MODE_MOV@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MODE_MOV@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_39
; %bb.18:
	mov	w8, #72
	mul	x8, x24, x8
	add	x22, x23, x8
	ldr	x2, [x22, #32]!
	ldr	x8, [x2, #8]
Lloh10:
	adrp	x9, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_39
; %bb.19:
	ldr	x21, [sp, #8]
	mov	w8, #72
	madd	x8, x24, x8, x23
	ldr	x8, [x8, #48]
	cbz	x8, LBB0_24
; %bb.20:
	mov	w8, #16
	ldp	w9, w10, [x2, #16]
	cmp	w9, #15
	csel	w8, w8, w9, eq
	orr	w9, wzr, #0xf
	madd	w8, w8, w10, w9
	asr	w8, w8, #3
	and	w3, w8, #0xfffffffe
	add	x1, sp, #8
	mov	x0, x19
	bl	_ff_reshuffle_raw_rgb
	mov	x20, x0
	tbnz	w0, #31, LBB0_32
; %bb.21:
	ldr	x2, [x22]
	b	LBB0_25
LBB0_22:
	mov	w22, #0
	b	LBB0_41
LBB0_23:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_mov_write_single_packet
LBB0_24:
	mov	w20, #0
LBB0_25:
	ldr	x8, [x2, #24]
Lloh13:
	adrp	x9, _AV_PIX_FMT_PAL8@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AV_PIX_FMT_PAL8@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_27
; %bb.26:
	mov	w9, #72
	mul	x9, x24, x9
	add	x25, x23, x9
	ldr	w9, [x25, #40]!
	cbz	w9, LBB0_33
LBB0_27:
	ldr	x9, [x2]
Lloh16:
	adrp	x10, _AV_CODEC_ID_RAWVIDEO@GOTPAGE
Lloh17:
	ldr	x10, [x10, _AV_CODEC_ID_RAWVIDEO@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_36
; %bb.28:
Lloh19:
	adrp	x9, _AV_PIX_FMT_GRAY8@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AV_PIX_FMT_GRAY8@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
Lloh22:
	adrp	x10, _AV_PIX_FMT_MONOBLACK@GOTPAGE
Lloh23:
	ldr	x10, [x10, _AV_PIX_FMT_MONOBLACK@GOTPAGEOFF]
Lloh24:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_36
; %bb.29:
	ldr	x8, [sp, #8]
	ldr	w9, [x8, #8]
	cmp	w9, #1
	b.lt	LBB0_36
; %bb.30:
	mov	x9, #0
	ldr	x10, [x8, #24]
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	lsl	x11, x9, #2
	ldr	w12, [x10, x11]
	mvn	w12, w12
	str	w12, [x10, x11]
	add	x9, x9, #1
	ldrsw	x11, [x8, #8]
	cmp	x9, x11
	b.lt	LBB0_31
	b	LBB0_36
LBB0_32:
	mov	x22, x20
	b	LBB0_41
LBB0_33:
	mov	w8, #72
	mul	x8, x24, x8
	add	x8, x23, x8
	ldr	w3, [x8, #44]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_ff_get_packet_palette
	mov	x22, x0
	tbnz	w0, #31, LBB0_43
; %bb.34:
	cbz	w22, LBB0_36
; %bb.35:
	ldr	w8, [x25]
	add	w8, w8, #1
	str	w8, [x25]
LBB0_36:
	cbz	w20, LBB0_39
; %bb.37:
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_mov_write_single_packet
	mov	x22, x0
LBB0_38:
	add	x0, sp, #8
	bl	_av_packet_free
	b	LBB0_41
LBB0_39:
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_mov_write_single_packet
LBB0_40:
	mov	x22, x0
LBB0_41:
	mov	x0, x22
LBB0_42:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_43:
	cbnz	w20, LBB0_38
	b	LBB0_41
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Got more than one picture in stream %d, ignoring.\n"

	.comm	_AV_CODEC_ID_MOV_TEXT,8,3       ; @AV_CODEC_ID_MOV_TEXT
	.comm	_MODE_MOV,8,3                   ; @MODE_MOV
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AV_PIX_FMT_PAL8,8,3            ; @AV_PIX_FMT_PAL8
	.comm	_AV_CODEC_ID_RAWVIDEO,8,3       ; @AV_CODEC_ID_RAWVIDEO
	.comm	_AV_PIX_FMT_GRAY8,8,3           ; @AV_PIX_FMT_GRAY8
	.comm	_AV_PIX_FMT_MONOBLACK,8,3       ; @AV_PIX_FMT_MONOBLACK
	.no_dead_strip	_mov_write_packet
.subsections_via_symbols
