	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcm_dvd_encode_frame
_pcm_dvd_encode_frame:                  ## @pcm_dvd_encode_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	movl	(%rdx), %eax
	movl	(%rbx), %r14d
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	cltd
	idivl	(%rdi)
	movl	%eax, %r15d
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	4(%rdi), %edx
	imull	%eax, %edx
	addl	$3, %edx
	movq	%rbx, %rdi
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	xorl	%ecx, %ecx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_12
## %bb.1:
	movq	16(%r12), %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	12(%rax), %esi
	movl	$3, %edx
	callq	_memcpy
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %rax
	movq	(%rax), %r13
	movq	16(%r12), %rsi
	addq	$3, %rsi
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	(%r12), %edx
	addl	$-3, %edx
	leaq	-44(%rbp), %rdi
	callq	_bytestream2_init_writer
	movl	4(%rbx), %eax
	cmpl	$128, %eax
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_11
## %bb.3:
	imull	-48(%rbp), %r14d                ## 4-byte Folded Reload
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%rbx,4), %esi
	movq	%r15, %rdi
	callq	_bytestream2_put_be16
	incq	%rbx
	cmpl	%ebx, %r14d
	jne	LBB0_4
	jmp	LBB0_11
LBB0_5:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	cmpl	$1, (%rbx)
	jne	LBB0_8
## %bb.6:
	leaq	-44(%rbp), %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movswl	2(%r13), %esi
	movq	%rbx, %rdi
	callq	_bytestream2_put_be16
	movswl	6(%r13), %esi
	movq	%rbx, %rdi
	callq	_bytestream2_put_be16
	movsbl	3(%r13), %esi
	movq	%rbx, %rdi
	callq	_bytestream2_put_byte
	movsbl	7(%r13), %esi
	movq	%rbx, %rdi
	callq	_bytestream2_put_byte
	movswl	10(%r13), %esi
	movq	%rbx, %rdi
	callq	_bytestream2_put_be16
	movswl	14(%r13), %esi
	movq	%rbx, %rdi
	callq	_bytestream2_put_be16
	movsbl	11(%r13), %esi
	movq	%rbx, %rdi
	callq	_bytestream2_put_byte
	movsbl	15(%r13), %esi
	movq	%rbx, %rdi
	callq	_bytestream2_put_byte
	addq	$16, %r13
	decl	%r15d
	jne	LBB0_7
LBB0_11:
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %eax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 8(%rbx)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movl	(%rcx), %esi
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_ff_samples_to_time_base
	movl	%eax, 4(%rbx)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%eax, %eax
LBB0_12:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	-44(%rbp), %r14
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=1
	decl	%r15d
	je	LBB0_11
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movl	8(%r12), %ebx
	testl	%ebx, %ebx
	je	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movswl	2(%r13), %esi
	movq	%r14, %rdi
	callq	_bytestream2_put_be16
	movswl	6(%r13), %esi
	movq	%r14, %rdi
	callq	_bytestream2_put_be16
	movswl	10(%r13), %esi
	movq	%r14, %rdi
	callq	_bytestream2_put_be16
	movswl	14(%r13), %esi
	movq	%r14, %rdi
	callq	_bytestream2_put_be16
	movsbl	3(%r13), %esi
	movq	%r14, %rdi
	callq	_bytestream2_put_byte
	movsbl	7(%r13), %esi
	movq	%r14, %rdi
	callq	_bytestream2_put_byte
	movsbl	11(%r13), %esi
	movq	%r14, %rdi
	callq	_bytestream2_put_byte
	movsbl	15(%r13), %esi
	addq	$16, %r13
	movq	%r14, %rdi
	callq	_bytestream2_put_byte
	decl	%ebx
	jne	LBB0_13
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_pcm_dvd_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcm_dvd_encode_frame
_pcm_dvd_encode_frame:                  ; @pcm_dvd_encode_frame
	.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, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x26, [x0, #8]
	ldr	w27, [x2]
	ldr	w28, [x0]
	ldp	w8, w9, [x26]
	sdiv	w24, w27, w8
	orr	w8, wzr, #0x3
	madd	w23, w9, w24, w8
	mov	x2, x23
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_8
; %bb.1:
	ldr	x0, [x20, #16]
	ldr	w1, [x26, #12]
	mov	w2, #3
	bl	_memcpy
	ldr	x8, [x22, #8]
	ldr	x25, [x8]
	ldr	x8, [x20, #16]
	add	x1, x8, #3
	ldr	w8, [x20]
	sub	w2, w8, #3
	add	x0, sp, #12
	bl	_bytestream2_init_writer
	ldr	w8, [x21, #4]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_7
; %bb.3:
	mul	w24, w28, w27
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25], #4
	add	x0, sp, #12
	bl	_bytestream2_put_be16
	subs	w24, w24, #1
	b.ne	LBB0_4
	b	LBB0_7
LBB0_5:
	ldr	w8, [x21]
	cmp	w8, #1
	b.ne	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrsh	w1, [x25, #2]
	add	x0, sp, #12
	bl	_bytestream2_put_be16
	ldrsh	w1, [x25, #6]
	add	x0, sp, #12
	bl	_bytestream2_put_be16
	ldrsb	w1, [x25, #3]
	add	x0, sp, #12
	bl	_bytestream2_put_byte
	ldrsb	w1, [x25, #7]
	add	x0, sp, #12
	bl	_bytestream2_put_byte
	ldrsh	w1, [x25, #10]
	add	x0, sp, #12
	bl	_bytestream2_put_be16
	ldrsh	w1, [x25, #14]
	add	x0, sp, #12
	bl	_bytestream2_put_be16
	ldrsb	w1, [x25, #11]
	add	x0, sp, #12
	bl	_bytestream2_put_byte
	ldrsb	w1, [x25, #15]
	add	x0, sp, #12
	bl	_bytestream2_put_byte
	add	x25, x25, #16
	subs	w24, w24, #1
	b.ne	LBB0_6
LBB0_7:
	ldp	w1, w8, [x22]
	str	w8, [x20, #8]
	str	w23, [x20]
	mov	x0, x21
	bl	_ff_samples_to_time_base
	mov	x8, x0
	mov	w0, #0
	str	w8, [x20, #4]
	mov	w8, #1
	str	w8, [x19]
LBB0_8:
	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_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	subs	w24, w24, #1
	b.eq	LBB0_7
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	ldr	w27, [x26, #8]
	cbz	w27, LBB0_9
LBB0_11:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsh	w1, [x25, #2]
	add	x0, sp, #12
	bl	_bytestream2_put_be16
	ldrsh	w1, [x25, #6]
	add	x0, sp, #12
	bl	_bytestream2_put_be16
	ldrsh	w1, [x25, #10]
	add	x0, sp, #12
	bl	_bytestream2_put_be16
	ldrsh	w1, [x25, #14]
	add	x0, sp, #12
	bl	_bytestream2_put_be16
	ldrsb	w1, [x25, #3]
	add	x0, sp, #12
	bl	_bytestream2_put_byte
	ldrsb	w1, [x25, #7]
	add	x0, sp, #12
	bl	_bytestream2_put_byte
	ldrsb	w1, [x25, #11]
	add	x0, sp, #12
	bl	_bytestream2_put_byte
	add	x28, x25, #16
	ldrsb	w1, [x25, #15]
	add	x0, sp, #12
	bl	_bytestream2_put_byte
	mov	x25, x28
	subs	w27, w27, #1
	b.ne	LBB0_11
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x25, x28
	b	LBB0_9
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_pcm_dvd_encode_frame
.subsections_via_symbols
