	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ff_mjpeg_escape_FF
LCPI0_0:
	.space	16,15
LCPI0_1:
	.space	16,1
LCPI0_2:
	.space	16,16
LCPI0_3:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ff_mjpeg_escape_FF
	.p2align	4, 0x90
_ff_mjpeg_escape_FF:                    ## @ff_mjpeg_escape_FF
	.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	%rdi, %r14
	movq	(%rdi), %r15
	movslq	%esi, %rbx
	callq	_put_bits_count
	negl	%eax
	andl	$7, %eax
	je	LBB0_2
## %bb.1:
	movl	$-1, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	notl	%edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_put_bits
LBB0_2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%rbx,4), %r12
	movq	%r14, %rdi
	callq	_flush_put_bits
	movq	%r14, %rdi
	callq	_put_bits_count
	movl	%eax, %r15d
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leal	(,%rbx,8), %eax
	subl	%eax, %r15d
	xorl	%edi, %edi
	testb	$7, %r15b
	sete	%dil
	callq	_av_assert1
	movl	%r15d, %r13d
	sarl	$3, %r13d
	xorl	%ebx, %ebx
	cmpl	$8, %r15d
	jl	LBB0_3
## %bb.4:
	movl	%r12d, %ecx
	negl	%ecx
	movl	$0, %eax
	andl	$3, %ecx
	je	LBB0_5
## %bb.11:
	xorl	%ebx, %ebx
	cmpl	$255, (%r12)
	sete	%bl
	movl	$1, %eax
	cmpl	$16, %r15d
	jl	LBB0_5
## %bb.12:
	cmpl	$2, %ecx
	jb	LBB0_5
## %bb.13:
	xorl	%eax, %eax
	cmpl	$255, 4(%r12)
	sete	%al
	addl	%eax, %ebx
	movl	$2, %eax
	cmpl	$24, %r15d
	jl	LBB0_5
## %bb.14:
	cmpl	$3, %ecx
	jne	LBB0_5
## %bb.15:
	xorl	%eax, %eax
	cmpl	$255, 8(%r12)
	sete	%al
	addl	%eax, %ebx
	movl	$3, %eax
	jmp	LBB0_5
LBB0_3:
	xorl	%eax, %eax
LBB0_5:
	leal	-15(%r13), %ecx
	cmpl	%ecx, %eax
	jge	LBB0_6
## %bb.29:
	movl	%eax, %eax
	movslq	%ecx, %rcx
	movq	-56(%rbp), %r10                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%r10,%rdx,4), %rdx
	addq	$48, %rdx
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [252645135,252645135,252645135,252645135]
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [16843009,16843009,16843009,16843009]
	movdqa	LCPI0_2(%rip), %xmm2            ## xmm2 = [269488144,269488144,269488144,269488144]
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movd	-32(%rdx,%rax,4), %xmm3         ## xmm3 = mem[0],zero,zero,zero
	pinsrd	$1, -48(%rdx,%rax,4), %xmm3
	pinsrd	$2, -16(%rdx,%rax,4), %xmm3
	pinsrd	$3, (%rdx,%rax,4), %xmm3
	movdqa	%xmm3, %xmm4
	psrld	$4, %xmm4
	pand	%xmm3, %xmm4
	pand	%xmm0, %xmm4
	paddd	%xmm1, %xmm4
	pand	%xmm2, %xmm4
	pshufd	$238, %xmm4, %xmm3              ## xmm3 = xmm4[2,3,2,3]
	paddd	%xmm4, %xmm3
	pshufd	$85, %xmm3, %xmm4               ## xmm4 = xmm3[1,1,1,1]
	paddd	%xmm3, %xmm4
	movd	%xmm4, %esi
	movl	%esi, %edi
	shrl	$4, %edi
	shrl	$20, %esi
	addl	%edi, %esi
	movl	%esi, %edi
	shrl	$8, %edi
	addl	%esi, %edi
	movzbl	%dil, %esi
	addl	%esi, %ebx
	addq	$16, %rax
	cmpq	%rcx, %rax
	jl	LBB0_30
## %bb.7:
	cmpl	%r13d, %eax
	jl	LBB0_8
	jmp	LBB0_23
LBB0_6:
	movq	-56(%rbp), %r10                 ## 8-byte Reload
	cmpl	%r13d, %eax
	jge	LBB0_23
LBB0_8:
	movl	%eax, %eax
	movl	%r13d, %ecx
	movq	%rcx, %rdx
	subq	%rax, %rdx
	cmpq	$8, %rdx
	jb	LBB0_22
## %bb.9:
	movq	%rdx, %r8
	andq	$-8, %r8
	movd	%ebx, %xmm0
	leaq	-8(%r8), %rsi
	movq	%rsi, %r9
	shrq	$3, %r9
	incq	%r9
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.16:
	movq	%r9, %rdi
	andq	$-2, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	addq	%rax, %rsi
	leaq	(%r10,%rsi,4), %rsi
	addq	$48, %rsi
	pxor	%xmm1, %xmm1
	xorl	%ebx, %ebx
	movdqa	LCPI0_3(%rip), %xmm2            ## xmm2 = [255,255,255,255]
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-48(%rsi,%rbx,4), %xmm3
	movdqu	-32(%rsi,%rbx,4), %xmm4
	movdqu	-16(%rsi,%rbx,4), %xmm5
	movdqu	(%rsi,%rbx,4), %xmm6
	pcmpeqd	%xmm2, %xmm3
	psubd	%xmm3, %xmm0
	pcmpeqd	%xmm2, %xmm4
	psubd	%xmm4, %xmm1
	pcmpeqd	%xmm2, %xmm5
	psubd	%xmm5, %xmm0
	pcmpeqd	%xmm2, %xmm6
	psubd	%xmm6, %xmm1
	addq	$16, %rbx
	addq	$-2, %rdi
	jne	LBB0_17
## %bb.18:
	testb	$1, %r9b
	je	LBB0_20
LBB0_19:
	addq	%rax, %rbx
	movdqu	(%r12,%rbx,4), %xmm2
	movdqu	16(%r12,%rbx,4), %xmm3
	movdqa	LCPI0_3(%rip), %xmm4            ## xmm4 = [255,255,255,255]
	pcmpeqd	%xmm4, %xmm2
	psubd	%xmm2, %xmm0
	pcmpeqd	%xmm4, %xmm3
	psubd	%xmm3, %xmm1
LBB0_20:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ebx
	cmpq	%r8, %rdx
	je	LBB0_23
## %bb.21:
	addq	%r8, %rax
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	xorl	%edx, %edx
	cmpl	$255, (%r12,%rax,4)
	sete	%dl
	addl	%edx, %ebx
	incq	%rax
	cmpq	%rax, %rcx
	jne	LBB0_22
LBB0_23:
	testl	%ebx, %ebx
	je	LBB0_28
## %bb.24:
	movq	%r14, %rdi
	callq	_flush_put_bits
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_skip_put_bytes
	movslq	%r13d, %rax
	decq	%rax
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_25 Depth=1
	movslq	%ebx, %rdx
	leaq	(%rax,%rdx), %rsi
	movl	%ecx, (%r12,%rsi,4)
	decq	%rax
	testl	%edx, %edx
	je	LBB0_28
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rax,4), %ecx
	cmpl	$255, %ecx
	jne	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=1
	movslq	%ebx, %rbx
	leaq	(%rax,%rbx), %rdx
	movl	$0, (%r12,%rdx,4)
	decl	%ebx
	jmp	LBB0_27
LBB0_28:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	pxor	%xmm1, %xmm1
	xorl	%ebx, %ebx
	testb	$1, %r9b
	jne	LBB0_19
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_mjpeg_escape_FF             ; -- Begin function ff_mjpeg_escape_FF
	.p2align	2
_ff_mjpeg_escape_FF:                    ; @ff_mjpeg_escape_FF
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x19, x0
	ldr	x24, [x0]
	add	x22, x24, w1, sxtw #2
	bl	_put_bits_count
	neg	w8, w0
	ands	w1, w8, #0x7
	b.eq	LBB0_2
; %bb.1:
	mov	w8, #-1
	lsl	w8, w8, w1
	mvn	w2, w8
	mov	x0, x19
	bl	_put_bits
LBB0_2:
	mov	x0, x19
	bl	_flush_put_bits
	mov	x0, x19
	bl	_put_bits_count
	sub	w25, w0, w21, lsl #3
	tst	w25, #0x7
	cset	w0, eq
	bl	_av_assert1
	mov	w20, #0
	asr	w23, w25, #3
	cmp	w25, #8
	b.lt	LBB0_9
; %bb.3:
	neg	w8, w22
	mov	x9, x20
	and	w8, w8, #0x3
	cbz	w8, LBB0_10
; %bb.4:
	ldr	w9, [x22]
	cmp	w9, #255
	cset	w20, eq
	mov	w9, #1
	cmp	w25, #16
	b.lt	LBB0_10
; %bb.5:
	cmp	w8, #2
	b.lo	LBB0_10
; %bb.6:
	ldr	w9, [x22, #4]
	cmp	w9, #255
	cinc	w20, w20, eq
	mov	w9, #2
	cmp	w25, #24
	b.lt	LBB0_10
; %bb.7:
	cmp	w8, #3
	b.ne	LBB0_10
; %bb.8:
	ldr	w8, [x22, #8]
	cmp	w8, #255
	cinc	w20, w20, eq
	mov	w9, #3
	b	LBB0_10
LBB0_9:
	mov	x9, x20
LBB0_10:
	sxtw	x8, w21
	sub	w10, w23, #15
	cmp	w9, w10
	b.ge	LBB0_13
; %bb.11:
	mov	w9, w9
	sxtw	x10, w10
	add	x11, x8, x9
	add	x11, x24, x11, lsl #2
	add	x11, x11, #32
	movi.16b	v0, #15
	movi.16b	v1, #1
	movi.16b	v2, #16
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	sub	x12, x11, #32
	add	x13, x11, #16
	ldur	w14, [x11, #-16]
	fmov	s3, w14
	ld1.s	{ v3 }[1], [x12]
	ld1.s	{ v3 }[2], [x11]
	ld1.s	{ v3 }[3], [x13]
	ushr.4s	v4, v3, #4
	and.16b	v3, v3, v4
	and.16b	v3, v3, v0
	add.4s	v3, v3, v1
	and.16b	v3, v3, v2
	addv.4s	s3, v3
	fmov	w12, s3
	lsr	w13, w12, #4
	add	w12, w13, w12, lsr #20
	add	w12, w12, w12, lsr #8
	add	w20, w20, w12, uxtb
	add	x9, x9, #16
	add	x11, x11, #64
	cmp	x9, x10
	b.lt	LBB0_12
LBB0_13:
	cmp	w9, w23
	b.ge	LBB0_21
; %bb.14:
	mov	w12, w9
	sub	x10, x23, x12
	cmp	x10, #16
	b.hs	LBB0_16
; %bb.15:
	mov	x9, x12
	b	LBB0_19
LBB0_16:
	and	x11, x10, #0xfffffffffffffff0
	add	x9, x11, x12
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	mov.s	v1[0], w20
	add	x12, x8, x12
	add	x12, x24, x12, lsl #2
	add	x12, x12, #32
	movi.2d	v2, #0x0000ff000000ff
	mov	x13, x11
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldp	q5, q6, [x12, #-32]
	ldp	q7, q16, [x12], #64
	cmeq.4s	v5, v5, v2
	cmeq.4s	v6, v6, v2
	cmeq.4s	v7, v7, v2
	cmeq.4s	v16, v16, v2
	sub.4s	v1, v1, v5
	sub.4s	v0, v0, v6
	sub.4s	v3, v3, v7
	sub.4s	v4, v4, v16
	subs	x13, x13, #16
	b.ne	LBB0_17
; %bb.18:
	add.4s	v0, v0, v1
	add.4s	v0, v3, v0
	add.4s	v0, v4, v0
	addv.4s	s0, v0
	fmov	w20, s0
	cmp	x10, x11
	b.eq	LBB0_21
LBB0_19:
	add	x8, x9, x8
	add	x8, x24, x8, lsl #2
	sub	x9, x23, x9
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x8], #4
	cmp	w10, #255
	cinc	w20, w20, eq
	subs	x9, x9, #1
	b.ne	LBB0_20
LBB0_21:
	cbz	w20, LBB0_26
; %bb.22:
	mov	x0, x19
	bl	_flush_put_bits
	mov	x0, x19
	mov	x1, x20
	bl	_skip_put_bytes
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	sxtw	x8, w23
	sub	x8, x8, #1
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	add	x10, x8, w20, sxtw
	str	w9, [x22, x10, lsl #2]
	sub	x8, x8, #1
	cbz	w20, LBB0_26
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x22, x8, lsl #2]
	cmp	w9, #255
	b.ne	LBB0_23
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	add	x10, x8, w20, sxtw
	str	wzr, [x22, x10, lsl #2]
	sub	w20, w20, #1
	b	LBB0_23
LBB0_26:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
