	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpeg1_encode_block
_mpeg1_encode_block:                    ## @mpeg1_encode_block
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ff_rl_mpeg1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movslq	%edx, %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	cmpq	$0, 48(%rdi)
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.1:
	movl	%edx, %ebx
	andl	$1, %ebx
	incl	%ebx
	xorl	%r15d, %r15d
	cmpl	$4, %edx
	cmovll	%r15d, %ebx
	movq	%rsi, %r12
	movl	(%rsi), %r14d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	%r14d, %esi
	subl	(%rax,%rbx,4), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_encode_dc
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	%r14d, (%rax,%rbx,4)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, 40(%rbx)
	je	LBB0_3
## %bb.2:
	movq	_ff_rl_mpeg2@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
LBB0_3:
	movl	$1, %r13d
                                        ## implicit-def: $edi
	movq	%r12, %rsi
	jmp	LBB0_7
LBB0_4:
	movq	%rdi, %rbx
	movl	(%rsi), %r12d
	movl	%r12d, %eax
	negl	%eax
	cmovsl	%r12d, %eax
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.6:
	sarl	$31, %r12d
	leaq	24(%rbx), %rdi
	orl	$2, %r12d
	movq	%rsi, %r14
	movl	$2, %esi
	movl	%r12d, %edx
	callq	_put_bits
	movq	%r14, %rsi
	xorl	%r15d, %r15d
	movl	$1, %r13d
                                        ## implicit-def: $edi
	jmp	LBB0_7
LBB0_5:
	movl	$-1, %r15d
	xorl	%r13d, %r13d
                                        ## implicit-def: $edi
	testl	%r12d, %r12d
	jne	LBB0_10
	jmp	LBB0_18
LBB0_7:
	cmpl	-76(%rbp), %r13d                ## 4-byte Folded Reload
	jg	LBB0_19
## %bb.8:
	movq	32(%rbx), %rax
	movslq	%r13d, %rcx
	movslq	(%rax,%rcx,4), %rax
	movl	(%rsi,%rax,4), %r12d
	testl	%r12d, %r12d
	je	LBB0_18
LBB0_10:
	movq	%rbx, %r14
	notl	%r15d
	addl	%r13d, %r15d
	movl	%r12d, %esi
	movq	%rdi, %rbx
	callq	_MASK_ABS
	andl	$1, %ebx
	movq	_mpeg1_max_level@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rcx
	movslq	%r15d, %rax
	cmpl	(%rcx,%rax,4), %r12d
	jle	LBB0_11
## %bb.12:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	leaq	24(%r14), %rbx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	888(%rax), %edx
	movl	892(%rax), %esi
	movq	%rbx, %rdi
	callq	_put_bits
	movq	%rbx, %rdi
	movl	$6, %esi
	movl	%r15d, %edx
	callq	_put_bits
	movq	16(%r14), %rax
	movq	_AV_CODEC_ID_MPEG1VIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.13:
	movq	%rbx, %rdi
	cmpl	$127, %r12d
	jg	LBB0_15
## %bb.14:
	movl	$8, %esi
	jmp	LBB0_17
LBB0_11:
	movq	_mpeg1_index_run@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %eax
	addl	%r12d, %eax
	decl	%eax
	leaq	24(%r14), %rdi
	cltq
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx,%rax,8), %ecx
	movl	4(%rdx,%rax,8), %esi
	incl	%esi
	leal	(%rbx,%rcx,2), %edx
	callq	_put_bits
	movq	%rbx, %rdi
	movl	%r13d, %r15d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rbx
	incl	%r13d
	jmp	LBB0_7
LBB0_16:
	movq	%rbx, %rdi
	movl	$12, %esi
	jmp	LBB0_17
LBB0_15:
	movl	$16, %esi
LBB0_17:
	movl	%r12d, %edx
	callq	_put_sbits
	movl	%r13d, %r15d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
LBB0_18:
	incl	%r13d
	jmp	LBB0_7
LBB0_19:
	addq	$24, %rbx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	896(%rax), %edx
	movl	900(%rax), %esi
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_bits                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_rl_mpeg1,8,3                ## @ff_rl_mpeg1
	.comm	_ff_rl_mpeg2,8,3                ## @ff_rl_mpeg2
	.comm	_mpeg1_max_level,8,3            ## @mpeg1_max_level
	.comm	_mpeg1_index_run,8,3            ## @mpeg1_index_run
	.comm	_AV_CODEC_ID_MPEG1VIDEO,8,3     ## @AV_CODEC_ID_MPEG1VIDEO
	.no_dead_strip	_mpeg1_encode_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpeg1_encode_block
_mpeg1_encode_block:                    ; @mpeg1_encode_block
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ff_rl_mpeg1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ff_rl_mpeg1@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
	ldr	x8, [x0]
	ldr	w26, [x8, w2, sxtw #2]
	ldr	x8, [x0, #48]
	cbz	x8, LBB0_2
; %bb.1:
	and	w8, w2, #0x1
	cmp	w2, #4
	csinc	w2, wzr, w8, lt
	ldr	w21, [x20]
	ldr	x8, [x19, #8]
	lsl	x22, x2, #2
	ldr	w8, [x8, x22]
	sub	w1, w21, w8
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_encode_dc
	mov	w8, #0
	ldr	x9, [x19, #8]
	str	w21, [x9, x22]
	ldr	x9, [x19, #40]
Lloh3:
	adrp	x10, _ff_rl_mpeg2@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ff_rl_mpeg2@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, #0
	csel	x25, x25, x10, eq
	b	LBB0_4
LBB0_2:
	ldr	w22, [x20]
	cmp	w22, #0
	cneg	w8, w22, mi
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.3:
	asr	w8, w22, #31
	add	x0, x19, #24
	orr	w2, w8, #0x2
	mov	w1, #2
	bl	_put_bits
	mov	w8, #0
LBB0_4:
	mov	w27, #1
                                        ; implicit-def: $w21
	cmp	w27, w26
	b.le	LBB0_7
LBB0_5:
	add	x0, x19, #24
	ldr	w1, [x25, #900]
	ldr	w2, [x25, #896]
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_put_bits
LBB0_6:
	mov	w27, #0
	mov	w8, #-1
                                        ; implicit-def: $w21
	b	LBB0_8
LBB0_7:
	ldr	x9, [x19, #32]
	ldrsw	x9, [x9, w27, sxtw #2]
	ldr	w22, [x20, x9, lsl #2]
LBB0_8:
	cbz	w22, LBB0_18
; %bb.9:
	mvn	w8, w8
	add	w23, w27, w8
	mov	x0, x21
	mov	x1, x22
	bl	_MASK_ABS
	and	w21, w21, #0x1
Lloh6:
	adrp	x8, _mpeg1_max_level@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mpeg1_max_level@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x8, [x8]
	sxtw	x24, w23
	ldr	w8, [x8, w23, sxtw #2]
	cmp	w22, w8
	b.le	LBB0_13
; %bb.10:
	add	x23, x19, #24
	ldr	w1, [x25, #892]
	ldr	w2, [x25, #888]
	mov	x0, x23
	bl	_put_bits
	mov	x0, x23
	mov	w1, #6
	mov	x2, x24
	bl	_put_bits
	ldr	x8, [x19, #16]
Lloh9:
	adrp	x9, _AV_CODEC_ID_MPEG1VIDEO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AV_CODEC_ID_MPEG1VIDEO@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	mov	x0, x23
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.11:
	cmp	w22, #127
	b.gt	LBB0_15
; %bb.12:
	mov	w1, #8
	b	LBB0_16
LBB0_13:
Lloh12:
	adrp	x8, _mpeg1_index_run@GOTPAGE
Lloh13:
	ldr	x8, [x8, _mpeg1_index_run@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w8, [x8, x24, lsl #2]
	add	w8, w22, w8
	sub	w8, w8, #1
	add	x0, x19, #24
	add	x8, x25, w8, sxtw #3
	ldp	w8, w9, [x8]
	add	w1, w9, #1
	mov	x2, x21
	bfi	w2, w8, #1, #31
	bl	_put_bits
	b	LBB0_17
LBB0_14:
	mov	w1, #12
	b	LBB0_16
LBB0_15:
	mov	w1, #16
LBB0_16:
	mov	x2, x22
	bl	_put_sbits
LBB0_17:
	mov	x8, x27
LBB0_18:
	add	w27, w27, #1
	cmp	w27, w26
	b.le	LBB0_7
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_rl_mpeg1,8,3                ; @ff_rl_mpeg1
	.comm	_ff_rl_mpeg2,8,3                ; @ff_rl_mpeg2
	.comm	_mpeg1_max_level,8,3            ; @mpeg1_max_level
	.comm	_mpeg1_index_run,8,3            ; @mpeg1_index_run
	.comm	_AV_CODEC_ID_MPEG1VIDEO,8,3     ; @AV_CODEC_ID_MPEG1VIDEO
	.no_dead_strip	_mpeg1_encode_block
.subsections_via_symbols
