	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function roq_dpcm_encode_frame
_roq_dpcm_encode_frame:                 ## @roq_dpcm_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	%rdi, %r13
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	8(%rdx), %rax
	movq	(%rax), %rbx
	movq	8(%r13), %r12
	movslq	(%r13), %r14
	cmpq	$2, %r14
	sete	%r8b
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.6:
	cmpl	$8, (%r12)
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	jge	LBB0_7
## %bb.10:
	movq	%rsi, %r15
	movq	8(%r12), %rdi
	imulq	%r14, %rdi
	shlq	$2, %rdi
	addq	32(%r12), %rdi
	movl	4(%r13), %edx
	imull	%r14d, %edx
	shll	$2, %edx
	movq	%rbx, %rsi
	callq	_memcpy
	movslq	4(%r13), %rax
	addq	%rax, 8(%r12)
	movl	(%r12), %eax
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	cmpl	$6, %eax
	jle	LBB0_13
## %bb.14:
	cmpl	$7, %eax
	jne	LBB0_17
## %bb.15:
	movq	32(%r12), %rbx
	cmpl	$2, %r14d
	movq	%r15, %rsi
	je	LBB0_18
## %bb.16:
	xorl	%r15d, %r15d
	movl	$7, %edi
	jmp	LBB0_19
LBB0_1:
	movq	8(%r13), %r12
	cmpl	$2, (%r13)
	sete	%r8b
LBB0_3:
	movl	(%r12), %edi
	xorl	%eax, %eax
	cmpl	$7, %edi
	jg	LBB0_32
## %bb.4:
	movq	32(%r12), %rbx
	testb	%r8b, %r8b
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_18
## %bb.5:
	xorl	%r15d, %r15d
	jmp	LBB0_19
LBB0_7:
	cmpl	$2, %r14d
	jne	LBB0_8
LBB0_18:
	movq	16(%r12), %rax
	movzbl	1(%rax), %ecx
	shll	$8, %ecx
	movl	%ecx, (%rax)
	movzbl	5(%rax), %ecx
	shll	$8, %ecx
	movl	%ecx, 4(%rax)
	movl	(%r12), %edi
	movb	$1, %r15b
LBB0_19:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	cmpl	$7, %edi
	jne	LBB0_9
## %bb.20:
	movl	(%r13), %r14d
	imull	8(%r12), %r14d
	jmp	LBB0_21
LBB0_11:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	movl	%ecx, 24(%r12)
LBB0_13:
	incl	%eax
	movl	%eax, (%r12)
	jmp	LBB0_31
LBB0_17:
	cmpl	$2, %r14d
	movq	%r15, %rsi
	je	LBB0_18
LBB0_8:
	xorl	%r15d, %r15d
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
LBB0_9:
	movl	4(%r13), %r14d
	imull	(%r13), %r14d
LBB0_21:
	movq	_ROQ_HEADER_SIZE@GOTPCREL(%rip), %rax
	movslq	%r14d, %rdx
	addq	(%rax), %rdx
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%rsi, %r13
	xorl	%ecx, %ecx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_32
## %bb.22:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %rax
	movq	%rax, -56(%rbp)
	movzbl	%r15b, %r13d
	leal	32(%r13), %esi
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	callq	_bytestream_put_byte
	movq	%r15, %rdi
	movl	$16, %esi
	callq	_bytestream_put_byte
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_bytestream_put_le32
	movq	16(%r12), %rax
	testb	%r13b, %r13b
	je	LBB0_24
## %bb.23:
	movl	4(%rax), %esi
	sarl	$8, %esi
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	callq	_bytestream_put_byte
	movq	16(%r12), %rax
	movl	(%rax), %esi
	sarl	$8, %esi
	movq	%r15, %rdi
	callq	_bytestream_put_byte
	testl	%r14d, %r14d
	jg	LBB0_26
	jmp	LBB0_28
LBB0_24:
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdi
	callq	_bytestream_put_le16
	testl	%r14d, %r14d
	jle	LBB0_28
LBB0_26:
	movl	%r14d, %r15d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	andl	$1, %edi
	shlq	$2, %rdi
	addq	16(%r12), %rdi
	movl	(%rbx), %esi
	addq	$4, %rbx
	callq	_dpcm_predict
	movq	-56(%rbp), %rcx
	leaq	4(%rcx), %rdx
	movq	%rdx, -56(%rbp)
	movl	%eax, (%rcx)
	incq	%r13
	cmpl	%r13d, %r15d
	jne	LBB0_27
LBB0_28:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %edi
	addq	$24, %r12
	cmpl	$8, %edi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmovlq	%r12, %rax
	movl	(%rax), %eax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx)
	movl	%r14d, %eax
	cltd
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	idivl	(%rsi)
	movl	%eax, (%rcx)
	incl	%edi
	movl	%edi, (%r15)
	testq	%rbx, %rbx
	jne	LBB0_30
## %bb.29:
	movl	$8, %esi
	callq	_FFMAX
	movl	%eax, (%r15)
LBB0_30:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
LBB0_31:
	xorl	%eax, %eax
LBB0_32:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ROQ_HEADER_SIZE,8,3            ## @ROQ_HEADER_SIZE
	.no_dead_strip	_roq_dpcm_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function roq_dpcm_encode_frame
_roq_dpcm_encode_frame:                 ; @roq_dpcm_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	x21, x2
	mov	x20, x1
	mov	x22, x0
	cbz	x2, LBB0_8
; %bb.1:
	ldr	x8, [x21, #8]
	ldr	x23, [x8]
	ldr	x25, [x22, #8]
	ldrsw	x24, [x22]
	cmp	x24, #2
	cset	w9, eq
	cbz	x23, LBB0_9
; %bb.2:
	ldr	w8, [x25]
	cmp	w8, #8
	b.ge	LBB0_13
; %bb.3:
	ldr	x8, [x25, #32]
	ldr	x9, [x25, #8]
	mul	x9, x9, x24
	add	x0, x8, x9, lsl #2
	ldr	w8, [x22, #4]
	mul	w8, w24, w8
	lsl	w2, w8, #2
	mov	x1, x23
	bl	_memcpy
	ldrsw	x8, [x22, #4]
	ldr	x9, [x25, #8]
	add	x8, x9, x8
	str	x8, [x25, #8]
	ldr	w8, [x25]
	cbz	w8, LBB0_27
; %bb.4:
	cmp	w8, #6
	b.le	LBB0_28
; %bb.5:
	cmp	w8, #7
	b.ne	LBB0_13
; %bb.6:
	ldr	x23, [x25, #32]
	cmp	w24, #2
	b.eq	LBB0_14
; %bb.7:
	mov	w26, #0
	mov	w8, #7
	cmp	w8, #7
	b.eq	LBB0_15
	b	LBB0_17
LBB0_8:
	ldr	x25, [x22, #8]
	ldr	w8, [x22]
	cmp	w8, #2
	cset	w9, eq
LBB0_9:
	ldr	w8, [x25]
	cmp	w8, #7
	b.le	LBB0_11
; %bb.10:
	mov	w0, #0
	b	LBB0_29
LBB0_11:
	ldr	x23, [x25, #32]
	tbnz	w9, #0, LBB0_14
; %bb.12:
	mov	w26, #0
	cmp	w8, #7
	b.eq	LBB0_15
	b	LBB0_17
LBB0_13:
	cmp	w24, #2
	b.ne	LBB0_16
LBB0_14:
	ldr	x8, [x25, #16]
	ldr	d0, [x8]
	movi	d1, #0x00ff000000ff00
	and.8b	v0, v0, v1
	str	d0, [x8]
	ldr	w8, [x25]
	mov	w26, #1
	cmp	w8, #7
	b.ne	LBB0_17
LBB0_15:
	ldr	w8, [x22]
	ldr	w9, [x25, #8]
	mul	w24, w8, w9
	b	LBB0_18
LBB0_16:
	mov	w26, #0
LBB0_17:
	ldp	w8, w9, [x22]
	mul	w24, w9, w8
LBB0_18:
Lloh0:
	adrp	x8, _ROQ_HEADER_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ROQ_HEADER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x2, x8, w24, sxtw
	mov	x0, x22
	mov	x1, x20
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_29
; %bb.19:
	ldr	x8, [x20, #8]
	str	x8, [sp, #8]
	cmp	w26, #0
	mov	w8, #32
	cinc	w1, w8, ne
	add	x0, sp, #8
	bl	_bytestream_put_byte
	add	x0, sp, #8
	mov	w1, #16
	bl	_bytestream_put_byte
	add	x0, sp, #8
	mov	x1, x24
	bl	_bytestream_put_le32
	ldr	x8, [x25, #16]
	cbz	w26, LBB0_21
; %bb.20:
	ldr	w8, [x8, #4]
	asr	w1, w8, #8
	add	x0, sp, #8
	bl	_bytestream_put_byte
	ldr	x8, [x25, #16]
	ldr	w8, [x8]
	asr	w1, w8, #8
	add	x0, sp, #8
	bl	_bytestream_put_byte
	cmp	w24, #1
	b.ge	LBB0_22
	b	LBB0_24
LBB0_21:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_bytestream_put_le16
	cmp	w24, #1
	b.lt	LBB0_24
LBB0_22:
	mov	x26, #0
	mov	w27, w24
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25, #16]
	and	w9, w26, #0x1
	add	x0, x8, w9, uxtw #2
	ldr	w1, [x23], #4
	bl	_dpcm_predict
	ldr	x8, [sp, #8]
	str	w0, [x8], #4
	str	x8, [sp, #8]
	add	x26, x26, #1
	cmp	w27, w26
	b.ne	LBB0_23
LBB0_24:
	ldr	w8, [x25]
	add	x9, x25, #24
	cmp	w8, #8
	csel	x9, x9, x21, lt
	ldr	w9, [x9]
	ldr	w10, [x22]
	sdiv	w10, w24, w10
	stp	w10, w9, [x20]
	add	w0, w8, #1
	str	w0, [x25]
	cbnz	x23, LBB0_26
; %bb.25:
	mov	w1, #8
	bl	_FFMAX
	str	w0, [x25]
LBB0_26:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_29
LBB0_27:
	ldr	w9, [x21]
	str	w9, [x25, #24]
LBB0_28:
	mov	w0, #0
	add	w8, w8, #1
	str	w8, [x25]
LBB0_29:
	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	_ROQ_HEADER_SIZE,8,3            ; @ROQ_HEADER_SIZE
	.no_dead_strip	_roq_dpcm_encode_frame
.subsections_via_symbols
