	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avpriv_dv_produce_packet       ## -- Begin function avpriv_dv_produce_packet
	.p2align	4, 0x90
_avpriv_dv_produce_packet:              ## @avpriv_dv_produce_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movq	$0, -64(%rbp)
	movq	_DV_PROFILE_BYTES@GOTPCREL(%rip), %rax
	movl	$-1, %r12d
	cmpl	%ecx, (%rax)
	jg	LBB0_14
## %bb.1:
	movq	%r8, %r13
	movl	%ecx, %r14d
	movq	%rdx, %rbx
	movq	%rdi, %r15
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	40(%rdi), %rdi
	movq	%rdx, %rsi
	movl	%ecx, %edx
	callq	_av_dv_frame_profile
	movq	%rax, 40(%r15)
	testq	%rax, %rax
	je	LBB0_14
## %bb.2:
	cmpl	%r14d, (%rax)
	jg	LBB0_14
## %bb.3:
	movq	%r15, %rdi
	movq	%rbx, %r12
	movq	%rbx, %rsi
	callq	_dv_extract_audio_info
	movl	%eax, %r14d
	movl	(%r15), %r8d
	testl	%r8d, %r8d
	jle	LBB0_6
## %bb.4:
	movq	8(%r15), %r9
	imull	$240000, 4(%r15), %r10d         ## imm = 0x3A980
	movq	32(%r15), %rsi
	movq	48(%r15), %r11
	leaq	(,%r8,8), %rdi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, 8(%rsi,%rcx,2)
	movl	%r14d, (%rsi,%rcx,2)
	movq	(%r11,%rcx), %rax
	movq	(%rax), %rbx
	movl	%r10d, %eax
	cltd
	idivl	(%rbx)
	movl	%eax, 4(%rsi,%rcx,2)
	movq	(%r9,%rcx), %rax
	movq	%rax, -96(%rbp,%rcx)
	addq	$8, %rcx
	cmpq	%rcx, %rdi
	jne	LBB0_5
LBB0_6:
	testq	%r8, %r8
	movq	%r12, %rbx
	je	LBB0_8
## %bb.7:
	movq	40(%r15), %rdx
	leaq	-96(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_dv_extract_audio
LBB0_8:
	movq	40(%r15), %rax
	cmpl	$720, 4(%rax)                   ## imm = 0x2D0
	jne	LBB0_12
## %bb.9:
	testb	$12, 4(%rbx)
	movq	32(%r15), %rax
	je	LBB0_11
## %bb.10:
	movl	$0, 48(%rax)
	movl	$0, 32(%rax)
	jmp	LBB0_13
LBB0_11:
	movl	$0, 16(%rax)
	movl	$0, (%rax)
LBB0_12:
	addl	%r14d, 4(%r15)
LBB0_13:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_dv_extract_video_info
	movl	%eax, %r12d
	movq	%rbx, %r14
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_av_init_packet
	movq	%r14, (%rbx)
	movq	%r13, 24(%rbx)
	movl	%r12d, 8(%rbx)
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%rbx)
	movq	24(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	16(%r15), %eax
	movl	%eax, 12(%rbx)
	incl	%eax
	movl	%eax, 16(%r15)
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DV_PROFILE_BYTES,4,2           ## @DV_PROFILE_BYTES
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avpriv_dv_produce_packet       ; -- Begin function avpriv_dv_produce_packet
	.p2align	2
_avpriv_dv_produce_packet:              ; @avpriv_dv_produce_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	str	xzr, [sp, #32]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
Lloh3:
	adrp	x8, _DV_PROFILE_BYTES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DV_PROFILE_BYTES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w3
	b.gt	LBB0_3
; %bb.1:
	mov	x21, x4
	mov	x23, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x0, [x0, #40]
	mov	x1, x2
	mov	x2, x3
	bl	_av_dv_frame_profile
	str	x0, [x19, #40]
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w8, [x0]
	cmp	w8, w23
	b.le	LBB0_6
LBB0_3:
	mov	w23, #-1
LBB0_4:
	ldr	x8, [sp, #40]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.5:
	mov	x0, x23
	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
	add	sp, sp, #112
	ret
LBB0_6:
	mov	x0, x19
	mov	x1, x22
	bl	_dv_extract_audio_info
	mov	x23, x0
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	ldr	x12, [x19, #32]
	ldr	w9, [x19, #4]
	mov	w10, #43392
	movk	w10, #3, lsl #16
	mul	w9, w9, w10
	ldr	x10, [x19, #48]
	ldr	x11, [x19, #8]
	add	x12, x12, #8
	mov	x13, sp
	mov	x14, x8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	str	x21, [x12]
	stur	w23, [x12, #-8]
	ldr	x15, [x10], #8
	ldr	x15, [x15]
	ldr	w15, [x15]
	sdiv	w15, w9, w15
	stur	w15, [x12, #-4]
	ldr	x15, [x11], #8
	str	x15, [x13], #8
	add	x12, x12, #16
	subs	x14, x14, #1
	b.ne	LBB0_8
LBB0_9:
	cbz	w8, LBB0_11
; %bb.10:
	ldr	x2, [x19, #40]
	mov	x1, sp
	mov	x0, x22
	bl	_dv_extract_audio
LBB0_11:
	ldr	x8, [x19, #40]
	ldr	w8, [x8, #4]
	cmp	w8, #720
	b.ne	LBB0_15
; %bb.12:
	ldr	x8, [x19, #32]
	ldrb	w9, [x22, #4]
	tst	w9, #0xc
	b.eq	LBB0_14
; %bb.13:
	str	wzr, [x8, #48]
	str	wzr, [x8, #32]
	b	LBB0_16
LBB0_14:
	str	wzr, [x8, #16]
	str	wzr, [x8]
LBB0_15:
	ldr	w8, [x19, #4]
	add	w8, w8, w23
	str	w8, [x19, #4]
LBB0_16:
	mov	x0, x19
	mov	x1, x22
	bl	_dv_extract_video_info
	mov	x23, x0
	mov	x0, x20
	bl	_av_init_packet
	str	x22, [x20]
	str	x21, [x20, #24]
Lloh9:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
	str	w23, [x20, #8]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x20, #20]
	orr	w8, w9, w8
	str	w8, [x20, #20]
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	str	w8, [x20, #16]
	ldr	w8, [x19, #16]
	str	w8, [x20, #12]
	add	w8, w8, #1
	str	w8, [x19, #16]
	b	LBB0_4
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DV_PROFILE_BYTES,4,2           ; @DV_PROFILE_BYTES
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
.subsections_via_symbols
