	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dv_write_pack
_dv_write_pack:                         ## @dv_write_pack
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movl	%edi, %r15d
	movq	(%rsi), %rdi
	movq	(%rdi), %rax
	movq	_AV_PIX_FMT_YUV420P@GOTPCREL(%rip), %rcx
	xorl	%r13d, %r13d
	cmpq	(%rcx), %rax
	movq	8(%rsi), %rax
	setne	-41(%rbp)                       ## 1-byte Folded Spill
	cmpl	$720, (%rax)                    ## imm = 0x2D0
	jl	LBB0_3
## %bb.1:
	movl	$64, %ebx
	je	LBB0_5
## %bb.2:
	movq	16(%r12), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	setne	%bl
	jmp	LBB0_4
LBB0_3:
	movq	16(%r12), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	sete	%bl
LBB0_4:
	shll	$6, %ebx
LBB0_5:
	callq	_DV_PROFILE_IS_HD
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	8(%r12), %rax
	movl	8(%rax), %edi
	callq	_av_q2d
	movq	8(%r12), %rcx
	imull	4(%rcx), %eax
	cltd
	idivl	(%rcx)
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %ecx
	movl	$200, %eax
	cmpl	$17, %ecx
	jl	LBB0_8
LBB0_7:
	movl	$202, %eax
LBB0_8:
	movl	%r15d, (%r14)
	leal	-130(%r15), %ecx
	cmpl	$2, %ecx
	jb	LBB0_12
## %bb.9:
	cmpl	$128, %r15d
	je	LBB0_13
## %bb.10:
	cmpl	$129, %r15d
	jne	LBB0_14
## %bb.11:
	movl	$63, 4(%r14)
	movl	%eax, 8(%r14)
	orl	$188, %ebx
	movl	$255, %edx
	movl	$4, %eax
	movl	$3, %ecx
	movl	%ebx, %r13d
	jmp	LBB0_15
LBB0_12:
	movb	-41(%rbp), %al                  ## 1-byte Reload
	movb	%al, %r13b
	leal	248(%r13), %eax
	movl	%eax, 4(%r14)
	orl	$120, %r13d
	movl	%r13d, 8(%r14)
	movl	$4, %eax
	movl	$3, %ecx
	movl	%r13d, %edx
	jmp	LBB0_15
LBB0_13:
	movabsq	$1095216660735, %rax            ## imm = 0xFF000000FF
	movq	%rax, 4(%r14)
	movq	(%r12), %rax
	movl	8(%rax), %r13d
	shll	$5, %r13d
	orl	12(%rax), %r13d
	orl	$192, %r13d
	movl	$255, %edx
	movl	$4, %eax
	movl	$3, %ecx
	jmp	LBB0_15
LBB0_14:
	movabsq	$1095216660735, %rax            ## imm = 0xFF000000FF
	movq	%rax, 12(%r14)
	movl	$1, %eax
	movl	$255, %r13d
	movl	$2, %ecx
	movl	$255, %edx
LBB0_15:
	movl	%r13d, (%r14,%rcx,4)
	movl	%edx, (%r14,%rax,4)
	movl	$5, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PIX_FMT_YUV420P,8,3         ## @AV_PIX_FMT_YUV420P
	.no_dead_strip	_dv_write_pack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dv_write_pack
_dv_write_pack:                         ; @dv_write_pack
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _AV_PIX_FMT_YUV420P@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_PIX_FMT_YUV420P@GOTPAGEOFF]
	ldp	x0, x9, [x1]
	ldr	x10, [x0]
Lloh2:
	ldr	x8, [x8]
	cmp	x10, x8
	cset	w22, ne
	ldr	w8, [x9]
	cmp	w8, #720
	b.lt	LBB0_3
; %bb.1:
	b.ne	LBB0_4
; %bb.2:
	mov	w23, #64
	bl	_DV_PROFILE_IS_HD
	cbnz	x0, LBB0_7
	b	LBB0_6
LBB0_3:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w8, eq
	b	LBB0_5
LBB0_4:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w8, ne
LBB0_5:
	lsl	w23, w8, #6
	bl	_DV_PROFILE_IS_HD
	cbnz	x0, LBB0_7
LBB0_6:
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #8]
	bl	_av_q2d
	ldr	x8, [x20, #8]
	ldp	w8, w9, [x8]
	mul	w9, w9, w0
	sdiv	w8, w9, w8
	add	w8, w8, w8, lsl #2
	lsl	w8, w8, #1
	cmp	w8, #17
	b.lt	LBB0_8
LBB0_7:
	mov	w8, #202
	b	LBB0_9
LBB0_8:
	mov	w8, #200
LBB0_9:
	str	w21, [x19]
	sub	w9, w21, #130
	cmp	w9, #2
	b.lo	LBB0_13
; %bb.10:
	cmp	w21, #128
	b.eq	LBB0_14
; %bb.11:
	cmp	w21, #129
	b.ne	LBB0_16
; %bb.12:
	mov	w9, #63
	mov	w10, #188
	stp	w9, w8, [x19, #4]
	orr	w8, w23, w10
	b	LBB0_15
LBB0_13:
	orr	w9, w22, #0xf8
	orr	w8, w22, #0x78
	stp	w9, w8, [x19, #4]
	mov	w9, #4
	mov	w10, #3
	mov	x11, x8
	b	LBB0_17
LBB0_14:
	movi	d0, #0x0000ff000000ff
	stur	d0, [x19, #4]
	ldr	x8, [x20]
	ldp	w9, w8, [x8, #8]
	orr	w8, w8, w9, lsl #5
	orr	w8, w8, #0xc0
LBB0_15:
	mov	w11, #255
	mov	w9, #4
	mov	w10, #3
	b	LBB0_17
LBB0_16:
	movi	d0, #0x0000ff000000ff
	stur	d0, [x19, #12]
	mov	w8, #255
	mov	w9, #1
	mov	w10, #2
	mov	w11, #255
LBB0_17:
	str	w8, [x19, x10, lsl #2]
	str	w11, [x19, x9, lsl #2]
	mov	w0, #5
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PIX_FMT_YUV420P,8,3         ; @AV_PIX_FMT_YUV420P
	.no_dead_strip	_dv_write_pack
.subsections_via_symbols
