	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dv_assemble_frame
_dv_assemble_frame:                     ## @dv_assemble_frame
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movl	%r8d, %r13d
	movq	%rcx, %rbx
	movq	%rsi, %r15
	movq	48(%rsi), %rax
	movq	%rax, (%r9)
	movq	(%rdx), %rax
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_15
## %bb.2:
	movq	%rdx, %r12
	movl	4(%r15), %ecx
	testl	%ecx, %ecx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	jle	LBB0_3
## %bb.8:
	movq	40(%r15), %rdx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r12, (%rdx,%rax,8)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%rax
	cmpq	%rax, %rcx
	jne	LBB0_9
## %bb.11:
	movl	%ecx, %eax
	jmp	LBB0_12
LBB0_4:
	cmpl	$0, (%r15)
	je	LBB0_6
## %bb.5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%r15), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	_av_log
	movq	%r12, %rdi
LBB0_6:
	movq	16(%r15), %rax
	movl	(%rax), %r8d
	cmpl	%r13d, %r8d
	jne	LBB0_22
## %bb.7:
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movl	$1, (%r15)
	jmp	LBB0_15
LBB0_22:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_3:
	xorl	%eax, %eax
LBB0_12:
	movq	32(%r15), %rcx
	movl	%eax, %r13d
	movl	(%rcx,%r13,4), %edi
	callq	_av_fifo_size
	addl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movq	_MAX_AUDIO_FRAME_SIZE@GOTPCREL(%rip), %rcx
	imull	$100, (%rcx), %ecx
	cmpl	%ecx, %eax
	jl	LBB0_14
## %bb.13:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%r15), %ecx
	leaq	L_.str.2(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
LBB0_14:
	movq	32(%r15), %rax
	movl	(%rax,%r13,4), %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	callq	_av_fifo_generic_write
	movq	16(%r15), %rdi
	movl	24(%r15), %esi
	movq	(%r12), %rax
	movl	4(%rax), %edx
	callq	_dv_audio_frame_size
	movl	%eax, %ebx
	shll	$2, %ebx
	movq	32(%r15), %rax
	movl	(%rax,%r13,4), %edi
	callq	_av_fifo_size
	xorl	%edx, %edx
	cmpl	%eax, %ebx
	setle	%dl
	movl	%r13d, %ecx
	shll	%cl, %edx
	orl	%edx, 8(%r15)
LBB0_15:
	xorl	%eax, %eax
	cmpl	$1, (%r15)
	jne	LBB0_21
## %bb.16:
	movl	8(%r15), %edx
	incl	%edx
	movb	4(%r15), %cl
	movl	$1, %esi
	shll	%cl, %esi
	cmpl	%esi, %edx
	jne	LBB0_21
## %bb.17:
	movq	(%r14), %rsi
	movq	%r15, %rdi
	callq	_dv_inject_metadata
	movl	$0, 8(%r15)
	cmpl	$0, 4(%r15)
	jle	LBB0_20
## %bb.18:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_dv_inject_audio
	movq	16(%r15), %rdi
	movl	24(%r15), %esi
	movq	40(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edx
	callq	_dv_audio_frame_size
	movl	%eax, %r12d
	shll	$2, %r12d
	movq	32(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	movl	%r12d, %esi
	callq	_av_fifo_drain
	movq	32(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_av_fifo_size
	xorl	%edx, %edx
	cmpl	%eax, %r12d
	setle	%dl
	movl	%ebx, %ecx
	shll	%cl, %edx
	orl	%edx, 8(%r15)
	incq	%rbx
	movslq	4(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_19
LBB0_20:
	movl	$0, (%r15)
	incl	24(%r15)
	movq	16(%r15), %rax
	movl	(%rax), %eax
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't process DV frame #%d. Insufficient audio data or severe sync problem.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unexpected frame size, %d != %d\n"

	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_MAX_AUDIO_FRAME_SIZE,4,2       ## @MAX_AUDIO_FRAME_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"Can't process DV frame #%d. Insufficient video data or severe sync problem.\n"

	.no_dead_strip	_dv_assemble_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dv_assemble_frame
_dv_assemble_frame:                     ; @dv_assemble_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x19, x1
	mov	x23, x0
	ldr	x8, [x1, #48]
	str	x8, [x5]
	ldr	x8, [x2]
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_16
; %bb.2:
	mov	x24, x2
	ldr	w9, [x19, #4]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.3:
	mov	x8, #0
	ldr	x10, [x19, #40]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x8, lsl #3]
	cmp	x11, x24
	b.eq	LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, #1
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.6:
	mov	x8, x9
	b	LBB0_13
LBB0_7:
	ldr	w8, [x19]
	cbz	w8, LBB0_9
; %bb.8:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w3, [x19, #24]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	bl	_av_log
LBB0_9:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_11
; %bb.10:
	ldr	x0, [x20]
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_16
LBB0_11:
Lloh5:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x23
	mov	x3, x21
	bl	_av_log
Lloh10:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_AVERROR
LBB0_12:
	mov	w8, #0
LBB0_13:
	ldr	x9, [x19, #32]
	mov	w25, w8
	ldr	w0, [x9, w8, uxtw #2]
	bl	_av_fifo_size
Lloh13:
	adrp	x8, _MAX_AUDIO_FRAME_SIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MAX_AUDIO_FRAME_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	mov	w9, #100
	mul	w8, w8, w9
	add	w9, w0, w21
	cmp	w9, w8
	b.lt	LBB0_15
; %bb.14:
Lloh16:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w3, [x19, #24]
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_av_log
LBB0_15:
	ldr	x8, [x19, #32]
	lsl	x23, x25, #2
	ldr	w0, [x8, x23]
	mov	x1, x22
	mov	x2, x21
	mov	x3, #0
	bl	_av_fifo_generic_write
	ldr	x0, [x19, #16]
	ldr	w1, [x19, #24]
	ldr	x8, [x24]
	ldr	w2, [x8, #4]
	bl	_dv_audio_frame_size
	mov	x21, x0
	ldr	x8, [x19, #32]
	ldr	w0, [x8, x23]
	bl	_av_fifo_size
	cmp	w0, w21, lsl #2
	cset	w8, ge
	lsl	w8, w8, w25
	ldr	w9, [x19, #8]
	orr	w8, w8, w9
	str	w8, [x19, #8]
LBB0_16:
	ldr	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_22
; %bb.17:
	ldp	w9, w8, [x19, #4]
	add	w8, w8, #1
	mov	w10, #1
	lsl	w9, w10, w9
	cmp	w8, w9
	b.ne	LBB0_22
; %bb.18:
	ldr	x1, [x20]
	mov	x0, x19
	bl	_dv_inject_metadata
	str	wzr, [x19, #8]
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.19:
	mov	x21, #0
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x2, [x20]
	mov	x0, x19
	mov	x1, x21
	bl	_dv_inject_audio
	ldr	x0, [x19, #16]
	ldr	w1, [x19, #24]
	ldr	x8, [x19, #40]
	ldr	x8, [x8, x21, lsl #3]
	ldr	x8, [x8]
	ldr	w2, [x8, #4]
	bl	_dv_audio_frame_size
	lsl	w22, w0, #2
	ldr	x8, [x19, #32]
	lsl	x23, x21, #2
	ldr	w0, [x8, x23]
	mov	x1, x22
	bl	_av_fifo_drain
	ldr	x8, [x19, #32]
	ldr	w0, [x8, x23]
	bl	_av_fifo_size
	cmp	w22, w0
	cset	w8, le
	lsl	w8, w8, w21
	ldp	w10, w9, [x19, #4]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	orr	w8, w8, w9
	str	w8, [x19, #8]
	add	x21, x21, #1
	cmp	x21, x10
	b.lt	LBB0_20
LBB0_21:
	str	wzr, [x19]
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	b	LBB0_23
LBB0_22:
	mov	w0, #0
LBB0_23:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't process DV frame #%d. Insufficient audio data or severe sync problem.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unexpected frame size, %d != %d\n"

	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_MAX_AUDIO_FRAME_SIZE,4,2       ; @MAX_AUDIO_FRAME_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"Can't process DV frame #%d. Insufficient video data or severe sync problem.\n"

	.no_dead_strip	_dv_assemble_frame
.subsections_via_symbols
