	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_mjpeg_encode_mb             ## -- Begin function ff_mjpeg_encode_mb
	.p2align	4, 0x90
_ff_mjpeg_encode_mb:                    ## @ff_mjpeg_encode_mb
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	_HUFFMAN_TABLE_OPTIMAL@GOTPCREL(%rip), %rax
	movq	(%rdi), %rcx
	movq	8(%rdi), %r15
	movq	_CHROMA_444@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rbx
	cmpq	(%rax), %rcx
	jne	LBB0_8
## %bb.1:
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_record_block
	cmpq	%rbx, %r15
	jne	LBB0_2
## %bb.4:
	leaq	512(%r14), %rsi
	movq	%r12, %rdi
	movl	$2, %edx
	callq	_record_block
	leaq	1024(%r14), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_record_block
	leaq	2048(%r14), %rsi
	movq	%r12, %rdi
	movl	$8, %edx
	callq	_record_block
	leaq	1280(%r14), %rsi
	movq	%r12, %rdi
	movl	$5, %edx
	callq	_record_block
	leaq	2304(%r14), %rsi
	movq	%r12, %rdi
	movl	$9, %edx
	callq	_record_block
	movl	16(%r12), %eax
	shll	$4, %eax
	orl	$8, %eax
	cmpl	20(%r12), %eax
	jge	LBB0_16
## %bb.5:
	leaq	256(%r14), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_record_block
	leaq	768(%r14), %rsi
	movq	%r12, %rdi
	movl	$3, %edx
	callq	_record_block
	leaq	1536(%r14), %rsi
	movq	%r12, %rdi
	movl	$6, %edx
	callq	_record_block
	leaq	2560(%r14), %rsi
	movq	%r12, %rdi
	movl	$10, %edx
	callq	_record_block
	leaq	1792(%r14), %rsi
	movq	%r12, %rdi
	movl	$7, %edx
	callq	_record_block
	addq	$2816, %r14                     ## imm = 0xB00
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$11, %edx
	jmp	LBB0_6
LBB0_8:
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_encode_block
	cmpq	%rbx, %r15
	jne	LBB0_9
## %bb.11:
	leaq	512(%r14), %rsi
	movq	%r12, %rdi
	movl	$2, %edx
	callq	_encode_block
	leaq	1024(%r14), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_encode_block
	leaq	2048(%r14), %rsi
	movq	%r12, %rdi
	movl	$8, %edx
	callq	_encode_block
	leaq	1280(%r14), %rsi
	movq	%r12, %rdi
	movl	$5, %edx
	callq	_encode_block
	leaq	2304(%r14), %rsi
	movq	%r12, %rdi
	movl	$9, %edx
	callq	_encode_block
	movl	16(%r12), %eax
	shll	$4, %eax
	orl	$8, %eax
	cmpl	20(%r12), %eax
	jge	LBB0_15
## %bb.12:
	leaq	256(%r14), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_encode_block
	leaq	768(%r14), %rsi
	movq	%r12, %rdi
	movl	$3, %edx
	callq	_encode_block
	leaq	1536(%r14), %rsi
	movq	%r12, %rdi
	movl	$6, %edx
	callq	_encode_block
	movl	$11, -44(%rbp)                  ## 4-byte Folded Spill
	movl	$11, %r13d
	movl	$7, %r15d
	movl	$7, %ebx
	movl	$10, %edx
	movl	$10, %esi
	jmp	LBB0_13
LBB0_2:
	leaq	256(%r14), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_record_block
	leaq	512(%r14), %rsi
	movq	%r12, %rdi
	movl	$2, %edx
	callq	_record_block
	leaq	768(%r14), %rsi
	movq	%r12, %rdi
	movl	$3, %edx
	callq	_record_block
	leaq	1024(%r14), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_record_block
	movq	8(%r12), %rax
	movq	_CHROMA_420@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.3:
	addq	$1280, %r14                     ## imm = 0x500
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$5, %edx
	jmp	LBB0_6
LBB0_9:
	leaq	256(%r14), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_encode_block
	leaq	512(%r14), %rsi
	movq	%r12, %rdi
	movl	$2, %edx
	callq	_encode_block
	leaq	768(%r14), %rsi
	movq	%r12, %rdi
	movl	$3, %edx
	callq	_encode_block
	leaq	1024(%r14), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_encode_block
	movq	8(%r12), %rax
	movq	_CHROMA_420@GOTPCREL(%rip), %rcx
	movl	$5, %r15d
	movl	$5, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.10:
	movl	$7, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$7, %r13d
	movl	$6, %edx
	movl	$6, %esi
LBB0_13:
	shlq	$8, %rsi
	addq	%r14, %rsi
	movq	%r12, %rdi
	callq	_encode_block
	shlq	$8, %rbx
	addq	%r14, %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_encode_block
	movq	%r13, %rbx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
LBB0_14:
	shlq	$8, %rbx
	addq	%rbx, %r14
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_encode_block
LBB0_15:
	movq	%r12, %rdi
	callq	_get_bits_diff
	addl	%eax, 24(%r12)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	1536(%r14), %rsi
	movq	%r12, %rdi
	movl	$6, %edx
	callq	_record_block
	leaq	1280(%r14), %rsi
	movq	%r12, %rdi
	movl	$5, %edx
	callq	_record_block
	addq	$1792, %r14                     ## imm = 0x700
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$7, %edx
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_record_block                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HUFFMAN_TABLE_OPTIMAL,8,3      ## @HUFFMAN_TABLE_OPTIMAL
	.comm	_CHROMA_444,8,3                 ## @CHROMA_444
	.comm	_CHROMA_420,8,3                 ## @CHROMA_420
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_mjpeg_encode_mb             ; -- Begin function ff_mjpeg_encode_mb
	.p2align	2
_ff_mjpeg_encode_mb:                    ; @ff_mjpeg_encode_mb
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _HUFFMAN_TABLE_OPTIMAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HUFFMAN_TABLE_OPTIMAL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldp	x9, x21, [x0]
Lloh3:
	adrp	x10, _CHROMA_444@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CHROMA_444@GOTPAGEOFF]
Lloh5:
	ldr	x22, [x10]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.1:
	mov	w2, #0
	bl	_record_block
	cmp	x21, x22
	b.ne	LBB0_7
; %bb.2:
	add	x1, x20, #512
	mov	x0, x19
	mov	w2, #2
	bl	_record_block
	add	x1, x20, #1024
	mov	x0, x19
	mov	w2, #4
	bl	_record_block
	add	x1, x20, #2048
	mov	w21, #8
	mov	x0, x19
	mov	w2, #8
	bl	_record_block
	add	x1, x20, #1280
	mov	x0, x19
	mov	w2, #5
	bl	_record_block
	add	x1, x20, #2304
	mov	x0, x19
	mov	w2, #9
	bl	_record_block
	ldp	w8, w9, [x19, #16]
	bfi	w21, w8, #4, #28
	cmp	w21, w9
	b.ge	LBB0_14
; %bb.3:
	add	x1, x20, #256
	mov	x0, x19
	mov	w2, #1
	bl	_record_block
	add	x1, x20, #768
	mov	x0, x19
	mov	w2, #3
	bl	_record_block
	add	x1, x20, #1536
	mov	x0, x19
	mov	w2, #6
	bl	_record_block
	add	x1, x20, #2560
	mov	x0, x19
	mov	w2, #10
	bl	_record_block
	add	x1, x20, #1792
	mov	x0, x19
	mov	w2, #7
	bl	_record_block
	add	x1, x20, #2816
	mov	x0, x19
	mov	w2, #11
	b	LBB0_16
LBB0_4:
	mov	w2, #0
	bl	_encode_block
	cmp	x21, x22
	b.ne	LBB0_9
; %bb.5:
	add	x1, x20, #512
	mov	x0, x19
	mov	w2, #2
	bl	_encode_block
	add	x1, x20, #1024
	mov	x0, x19
	mov	w2, #4
	bl	_encode_block
	add	x1, x20, #2048
	mov	w21, #8
	mov	x0, x19
	mov	w2, #8
	bl	_encode_block
	add	x1, x20, #1280
	mov	x0, x19
	mov	w2, #5
	bl	_encode_block
	add	x1, x20, #2304
	mov	x0, x19
	mov	w2, #9
	bl	_encode_block
	ldp	w8, w9, [x19, #16]
	bfi	w21, w8, #4, #28
	cmp	w21, w9
	b.ge	LBB0_13
; %bb.6:
	add	x1, x20, #256
	mov	x0, x19
	mov	w2, #1
	bl	_encode_block
	add	x1, x20, #768
	mov	x0, x19
	mov	w2, #3
	bl	_encode_block
	add	x1, x20, #1536
	mov	x0, x19
	mov	w2, #6
	bl	_encode_block
	mov	w23, #11
	mov	w22, #7
	mov	w8, #10
	mov	w2, #10
	mov	w21, #7
	mov	w24, #11
	b	LBB0_11
LBB0_7:
	add	x1, x20, #256
	mov	x0, x19
	mov	w2, #1
	bl	_record_block
	add	x1, x20, #512
	mov	x0, x19
	mov	w2, #2
	bl	_record_block
	add	x1, x20, #768
	mov	x0, x19
	mov	w2, #3
	bl	_record_block
	add	x1, x20, #1024
	mov	x0, x19
	mov	w2, #4
	bl	_record_block
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _CHROMA_420@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CHROMA_420@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.8:
	add	x1, x20, #1280
	mov	x0, x19
	mov	w2, #5
	b	LBB0_16
LBB0_9:
	add	x1, x20, #256
	mov	x0, x19
	mov	w2, #1
	bl	_encode_block
	add	x1, x20, #512
	mov	x0, x19
	mov	w2, #2
	bl	_encode_block
	add	x1, x20, #768
	mov	x0, x19
	mov	w2, #3
	bl	_encode_block
	add	x1, x20, #1024
	mov	x0, x19
	mov	w2, #4
	bl	_encode_block
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _CHROMA_420@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CHROMA_420@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	mov	w22, #5
	mov	w21, #5
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.10:
	mov	w23, #7
	mov	w8, #6
	mov	w2, #6
	mov	w24, #7
LBB0_11:
	add	x1, x20, x8, lsl #8
	mov	x0, x19
	bl	_encode_block
	add	x1, x20, x22, lsl #8
	mov	x0, x19
	mov	x2, x21
	bl	_encode_block
	mov	x22, x23
	mov	x21, x24
LBB0_12:
	add	x1, x20, x22, lsl #8
	mov	x0, x19
	mov	x2, x21
	bl	_encode_block
LBB0_13:
	mov	x0, x19
	bl	_get_bits_diff
	ldr	w8, [x19, #24]
	add	w8, w8, w0
	str	w8, [x19, #24]
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
	add	x1, x20, #1536
	mov	x0, x19
	mov	w2, #6
	bl	_record_block
	add	x1, x20, #1280
	mov	x0, x19
	mov	w2, #5
	bl	_record_block
	add	x1, x20, #1792
	mov	x0, x19
	mov	w2, #7
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_record_block
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HUFFMAN_TABLE_OPTIMAL,8,3      ; @HUFFMAN_TABLE_OPTIMAL
	.comm	_CHROMA_444,8,3                 ; @CHROMA_444
	.comm	_CHROMA_420,8,3                 ; @CHROMA_420
.subsections_via_symbols
