	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dv_inject_audio
_dv_inject_audio:                       ## @dv_inject_audio
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %ecx
	movq	%rdi, %r13
	movl	24(%rdi), %esi
	movq	8(%rdi), %rdi
	movq	16(%r13), %rax
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movslq	%ecx, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	callq	_dv_audio_frame_size
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	8(%r13), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.1:
	shll	$2, -48(%rbp)                   ## 4-byte Folded Spill
	imull	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	imull	$12000, %ecx, %ecx              ## imm = 0x2EE0
	movslq	%ecx, %rcx
	leaq	(%rbx,%rcx,4), %rdx
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	movq	8(%r13), %rax
	movslq	(%rax), %rcx
	cmpq	%rcx, %r12
	jge	LBB0_10
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
                                        ##       Child Loop BB0_4 Depth 3
	leaq	1920(%rdx), %rcx
	addq	$1956, %rdx                     ## imm = 0x7A4
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	%rcx, %rdx
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_4 Depth 3
	movq	_dv_aaux_packs_dist@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%r12,8), %rcx
	movl	(%rcx,%r15,4), %edi
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	addq	$12, %rdx
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %rax
	xorl	%r8d, %r8d
	cmpq	%rax, %r12
	setge	%r8b
	movq	%r13, %rsi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_dv_write_pack
	xorl	%r14d, %r14d
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=3
	leaq	2(%r14), %rax
	addq	$8, %r14
	cmpq	$78, %r14
	movq	%rax, %r14
	jae	LBB0_7
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_3 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	8(%r13), %rax
	movq	8(%rax), %rcx
	movq	(%rcx,%r12,8), %rcx
	movl	%r14d, %edx
	shrb	$7, %dl
	addb	%r14b, %dl
	sarb	%dl
	movsbl	%dl, %ebx
	imull	16(%rax), %ebx
	addl	(%rcx,%r15,4), %ebx
	addl	%ebx, %ebx
	cmpl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=3
	movq	(%r13), %rax
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movl	(%rax,%r12,4), %edi
	movl	%ebx, %esi
	orl	$1, %esi
	callq	_av_fifo_peek2
	movl	(%rax), %eax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, -4(%r15,%r14,4)
	movq	(%r13), %rax
	movl	(%rax,%r12,4), %edi
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_av_fifo_peek2
	movl	(%rax), %eax
	movl	%eax, (%r15,%r14,4)
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=2
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	addq	$5120, %rdx                     ## imm = 0x1400
	incq	%r15
	cmpq	$9, %r15
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	8(%r13), %rax
	addq	$5120, -56(%rbp)                ## 8-byte Folded Spill
                                        ## imm = 0x1400
	jmp	LBB0_3
LBB0_10:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dv_aaux_packs_dist,8,3         ## @dv_aaux_packs_dist
	.no_dead_strip	_dv_inject_audio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dv_inject_audio
_dv_inject_audio:                       ; @dv_inject_audio
	.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	x21, x2
	mov	x9, x1
	mov	x20, x0
	ldr	w1, [x0, #24]
	ldr	x0, [x0, #8]
	ldr	x8, [x20, #16]
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x8, [x8, w9, sxtw #3]
	ldr	x8, [x8]
	ldr	w2, [x8]
	bl	_dv_audio_frame_size
	ldr	x8, [x20, #8]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x22, #0
	ldr	x11, [sp, #8]                   ; 8-byte Folded Reload
	sxtw	x10, w11
	lsl	w23, w0, #2
	mul	w9, w11, w9
	mov	w11, #12000
	mul	w9, w9, w11
	add	x25, x21, w9, sxtw #2
	lsl	x26, x10, #2
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	ldr	x8, [x20, #8]
	ldrsw	x9, [x8]
	cmp	x22, x9
	b.ge	LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
                                        ;       Child Loop BB0_6 Depth 3
	mov	x28, #0
	mov	x24, x25
	add	x25, x25, #1920
LBB0_4:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_6 Depth 3
Lloh0:
	adrp	x9, _dv_aaux_packs_dist@GOTPAGE
Lloh1:
	ldr	x9, [x9, _dv_aaux_packs_dist@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x9, [x9, x22, lsl #3]
	ldr	w0, [x9, x28, lsl #2]
	add	x2, x25, #12
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	cmp	x22, w8, sxtw
	cset	w4, ge
	mov	x1, x20
	ldr	x3, [sp, #8]                    ; 8-byte Folded Reload
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_dv_write_pack
	mov	x19, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=3
	add	x8, x19, #8
	add	x19, x19, #2
	cmp	x8, #78
	b.hs	LBB0_8
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x8, [x20, #8]
	ldr	x9, [x8, #8]
	ldr	x9, [x9, x22, lsl #3]
	ldr	w9, [x9, x28, lsl #2]
	and	w10, w19, #0x80
	add	w10, w19, w10, lsr #7
	sxtb	w10, w10
	lsr	w10, w10, #1
	ldr	w8, [x8, #16]
	madd	w8, w8, w10, w9
	lsl	w21, w8, #1
	cmp	w21, w23
	b.ge	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=3
	ldr	x8, [x20]
	ldr	w0, [x8, x26]
	orr	w1, w21, #0x1
	bl	_av_fifo_peek2
	ldr	w8, [x0]
	add	x27, x24, x19, lsl #2
	str	w8, [x27, #1952]
	ldr	x8, [x20]
	ldr	w0, [x8, x26]
	mov	x1, x21
	bl	_av_fifo_peek2
	ldr	w8, [x0]
	str	w8, [x27, #1956]
	b	LBB0_5
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=2
	mov	w9, #5120
	add	x25, x25, x9
	add	x28, x28, #1
	cmp	x28, #9
	b.eq	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=2
	ldr	x8, [x20, #8]
	add	x24, x24, x9
	b	LBB0_4
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_dv_aaux_packs_dist,8,3         ; @dv_aaux_packs_dist
	.no_dead_strip	_dv_inject_audio
.subsections_via_symbols
