	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mjpeg_decode_scan
_mjpeg_decode_scan:                     ## @mjpeg_decode_scan
	.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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movq	%r8, %r15
	movl	%ecx, -96(%rbp)                 ## 4-byte Spill
	movl	%edx, -124(%rbp)                ## 4-byte Spill
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	%rsp, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_COMPONENTS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -184(%rbp)                ## 8-byte Spill
	movl	(%rbx), %ebx
	leaq	(,%rbx,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -176(%rbp)                ## 8-byte Spill
	shlq	$2, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -168(%rbp)                ## 8-byte Spill
	movl	$0, -88(%rbp)
	cmpl	$9, (%r13)
	setge	%bl
	movq	%r15, -160(%rbp)                ## 8-byte Spill
	testq	%r15, %r15
	je	LBB0_3
## %bb.1:
	movl	8(%r13), %edx
	imull	4(%r13), %edx
	leal	7(%rdx), %eax
	sarl	$3, %eax
	cmpl	%r14d, %eax
	jne	LBB0_52
## %bb.2:
	leaq	-88(%rbp), %rdi
	movq	-160(%rbp), %rsi                ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_init_get_bits
LBB0_3:
	movb	%bl, -72(%rbp)                  ## 1-byte Spill
	movq	$0, 184(%r13)
	movq	112(%r13), %rax
	movl	4(%rax), %edi
	leaq	-152(%rbp), %rsi
	leaq	-148(%rbp), %rdx
	callq	_av_pix_fmt_get_chroma_sub_sample
	movl	12(%r13), %edi
	movl	-152(%rbp), %esi
	callq	_AV_CEIL_RSHIFT
	movl	%eax, -120(%rbp)                ## 4-byte Spill
	movl	16(%r13), %edi
	movl	-148(%rbp), %esi
	callq	_AV_CEIL_RSHIFT
	movl	%eax, -116(%rbp)                ## 4-byte Spill
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r15d
	testl	%eax, %eax
	movq	-184(%rbp), %r10                ## 8-byte Reload
	movq	-176(%rbp), %r11                ## 8-byte Reload
	movq	-168(%rbp), %r14                ## 8-byte Reload
	jle	LBB0_9
## %bb.4:
	movq	16(%rbp), %r8
	movq	24(%r13), %r9
	movq	32(%r13), %rdx
	movq	192(%r13), %rax
	movq	(%rax), %rsi
	movq	40(%r13), %rdi
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r8), %rcx
	movq	(%rcx,%rax,8), %rcx
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%rcx, (%r11,%rax,8)
	movl	(%rdx,%rax,4), %ecx
	movl	%ecx, (%r14,%rax,4)
	orb	$1, (%rdi,%rax,4)
	incq	%rbx
	cmpq	%rbx, %r15
	je	LBB0_9
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r9,%rbx,4), %rax
	movq	(%rsi,%rax,8), %rcx
	movq	%rcx, (%r10,%rax,8)
	testq	%r8, %r8
	jne	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_6
LBB0_9:
	movl	8(%r13), %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	LBB0_54
## %bb.10:
	movb	-72(%rbp), %dl                  ## 1-byte Reload
	movb	%dl, %al
	incl	%eax
	movl	%eax, -132(%rbp)                ## 4-byte Spill
	leaq	128(%r13), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movl	4(%r13), %edx
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movq	%r15, -192(%rbp)                ## 8-byte Spill
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
                                        ##       Child Loop BB0_23 Depth 3
                                        ##         Child Loop BB0_27 Depth 4
	testl	%edx, %edx
	jle	LBB0_50
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
LBB0_13:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_23 Depth 3
                                        ##         Child Loop BB0_27 Depth 4
	cmpq	$0, -160(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	leaq	-88(%rbp), %rdi
	callq	_get_bits1
	testl	%eax, %eax
	sete	%al
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=2
	movl	$0, -92(%rbp)                   ## 4-byte Folded Spill
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=2
	movq	176(%r13), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=2
	cmpq	$0, 184(%r13)
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%rax, 184(%r13)
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=2
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	callq	_get_bits_left
	testl	%eax, %eax
	js	LBB0_56
## %bb.20:                              ##   in Loop: Header=BB0_13 Depth=2
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_48
## %bb.21:                              ##   in Loop: Header=BB0_13 Depth=2
	xorl	%ecx, %ecx
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_23 Depth=3
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movq	-192(%rbp), %r15                ## 8-byte Reload
	cmpq	%r15, %rcx
	je	LBB0_48
LBB0_23:                                ##   Parent Loop BB0_11 Depth=1
                                        ##     Parent Loop BB0_13 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_27 Depth 4
	movq	48(%r13), %rax
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	(%rax,%rcx,4), %ebx
	testl	%ebx, %ebx
	jle	LBB0_22
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=3
	movq	24(%r13), %rax
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movslq	(%rax,%rdx,4), %rsi
	movq	56(%r13), %rax
	movl	(%rax,%rdx,4), %edi
	movq	64(%r13), %rax
	movq	-168(%rbp), %rcx                ## 8-byte Reload
	movl	(%rcx,%rsi,4), %ecx
	movl	(%rax,%rdx,4), %eax
	imull	-52(%rbp), %eax                 ## 4-byte Folded Reload
	movq	%rax, -208(%rbp)                ## 8-byte Spill
	movl	%edi, -136(%rbp)                ## 4-byte Spill
	movl	%edi, %eax
	imull	-56(%rbp), %eax                 ## 4-byte Folded Reload
	movq	%rax, -200(%rbp)                ## 8-byte Spill
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	sarl	%ecx
	movl	%ecx, -128(%rbp)                ## 4-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	leal	-1(%rsi), %eax
	movl	%eax, -140(%rbp)                ## 4-byte Spill
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_27 Depth=4
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	callq	_get_bits1
	movq	72(%r13), %rcx
	movq	80(%r13), %rdx
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rdx,%rsi,8), %rdx
	movq	(%rcx,%rdx,8), %rcx
	imull	(%rcx), %eax
	movl	-96(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	addl	%eax, (%rbx)
LBB0_26:                                ##   in Loop: Header=BB0_27 Depth=4
	movq	112(%r13), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edx
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_ff_dlog
	movq	112(%r13), %rdi
	movl	104(%r13), %r10d
	leaq	L_.str.4(%rip), %rsi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	movl	%r14d, %r8d
	movl	%r15d, %r9d
	xorl	%eax, %eax
	pushq	-216(%rbp)                      ## 8-byte Folded Reload
	pushq	-224(%rbp)                      ## 8-byte Folded Reload
	pushq	%r10
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	callq	_ff_dlog
	addq	$32, %rsp
	incl	%r14d
	xorl	%eax, %eax
	cmpl	-136(%rbp), %r14d               ## 4-byte Folded Reload
	sete	%al
	movl	$0, %ecx
	cmovel	%ecx, %r14d
	addl	%eax, %r15d
	movl	-144(%rbp), %ebx                ## 4-byte Reload
	decl	%ebx
	je	LBB0_22
LBB0_27:                                ##   Parent Loop BB0_11 Depth=1
                                        ##     Parent Loop BB0_13 Depth=2
                                        ##       Parent Loop BB0_23 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movq	-208(%rbp), %rax                ## 8-byte Reload
	addl	%r15d, %eax
	leal	(,%rax,8), %r10d
	movl	%r10d, %ecx
	imull	-60(%rbp), %ecx                 ## 4-byte Folded Reload
	movq	-200(%rbp), %rdx                ## 8-byte Reload
	leal	(%r14,%rdx), %r9d
	leal	(,%r9,8), %esi
	movl	%esi, %edx
	imull	-132(%rbp), %edx                ## 4-byte Folded Reload
	addl	%ecx, %edx
	movq	112(%r13), %rcx
	movl	(%rcx), %r8d
	movl	%r8d, %ecx
	sarl	%cl, %edx
	cmpq	$0, 168(%r13)
	je	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_27 Depth=4
	movl	104(%r13), %ecx
	testl	%ecx, %ecx
	cmovnel	-128(%rbp), %ecx                ## 4-byte Folded Reload
	addl	%ecx, %edx
LBB0_29:                                ##   in Loop: Header=BB0_27 Depth=4
	cmpl	$1, -140(%rbp)                  ## 4-byte Folded Reload
	ja	LBB0_32
## %bb.30:                              ##   in Loop: Header=BB0_27 Depth=4
	movl	-116(%rbp), %ecx                ## 4-byte Reload
	cmpl	-120(%rbp), %esi                ## 4-byte Folded Reload
	jge	LBB0_37
## %bb.34:                              ##   in Loop: Header=BB0_27 Depth=4
	cmpl	%ecx, %r10d
	jge	LBB0_37
	jmp	LBB0_35
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_27 Depth=4
	cmpl	12(%r13), %esi
	jge	LBB0_37
## %bb.33:                              ##   in Loop: Header=BB0_27 Depth=4
	movl	16(%r13), %ecx
	cmpl	%ecx, %r10d
	jge	LBB0_37
LBB0_35:                                ##   in Loop: Header=BB0_27 Depth=4
	movslq	%edx, %r12
	shlq	$2, %r12
	movq	-184(%rbp), %rcx                ## 8-byte Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	addq	(%rcx,%rdi,8), %r12
	jmp	LBB0_38
	.p2align	4, 0x90
LBB0_37:                                ##   in Loop: Header=BB0_27 Depth=4
	xorl	%r12d, %r12d
LBB0_38:                                ##   in Loop: Header=BB0_27 Depth=4
	cmpl	$0, 160(%r13)
	movl	%ebx, -144(%rbp)                ## 4-byte Spill
	movq	%r10, -224(%rbp)                ## 8-byte Spill
	movq	%rsi, -216(%rbp)                ## 8-byte Spill
	je	LBB0_41
## %bb.39:                              ##   in Loop: Header=BB0_27 Depth=4
	movq	88(%r13), %rcx
	movq	96(%r13), %rdx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	imull	(%rcx,%rdi,4), %eax
	addl	%r9d, %eax
	movq	(%rdx,%rdi,8), %rcx
	cltq
	movq	(%rcx,%rax,8), %rbx
	cmpl	$0, -124(%rbp)                  ## 4-byte Folded Reload
	jne	LBB0_25
## %bb.40:                              ##   in Loop: Header=BB0_27 Depth=4
	movq	120(%r13), %rax
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rax,%rdx,4), %ecx
	movq	72(%r13), %rax
	movq	80(%r13), %rsi
	movq	(%rsi,%rdx,8), %rsi
	movq	(%rax,%rsi,8), %r8
	movq	%r13, %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	-96(%rbp), %r9d                 ## 4-byte Reload
	callq	_decode_dc_progressive
	testq	%rax, %rax
	jns	LBB0_26
	jmp	LBB0_51
	.p2align	4, 0x90
LBB0_41:                                ##   in Loop: Header=BB0_27 Depth=4
	cmpb	$0, -92(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_44
## %bb.42:                              ##   in Loop: Header=BB0_27 Depth=4
	testq	%r12, %r12
	je	LBB0_26
## %bb.43:                              ##   in Loop: Header=BB0_27 Depth=4
	movslq	%edx, %rdx
	shlq	$2, %rdx
	movq	-176(%rbp), %rax                ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addq	(%rax,%rcx,8), %rdx
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	callq	_mjpeg_copy_block
	jmp	LBB0_26
LBB0_44:                                ##   in Loop: Header=BB0_27 Depth=4
	movl	132(%r13), %edi
	callq	*152(%r13)
	movl	132(%r13), %esi
	movq	120(%r13), %rax
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rax,%rdx,4), %ecx
	movq	144(%r13), %rax
	movl	(%rax,%rdx,4), %r8d
	movq	72(%r13), %rax
	movq	80(%r13), %rdi
	movq	(%rdi,%rdx,8), %rdi
	movq	(%rax,%rdi,8), %r9
	movq	%r13, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_decode_block
	testq	%rax, %rax
	js	LBB0_51
## %bb.45:                              ##   in Loop: Header=BB0_27 Depth=4
	testq	%r12, %r12
	je	LBB0_26
## %bb.46:                              ##   in Loop: Header=BB0_27 Depth=4
	movl	132(%r13), %edx
	movq	%r12, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	*136(%r13)
	testb	$7, (%r13)
	je	LBB0_26
## %bb.47:                              ##   in Loop: Header=BB0_27 Depth=4
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_shift_output
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_48:                                ##   in Loop: Header=BB0_13 Depth=2
	movq	%r13, %rdi
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	callq	_handle_rstn
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	movl	4(%r13), %edx
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	cmpl	%edx, %eax
	movq	-104(%rbp), %r12                ## 8-byte Reload
	jl	LBB0_13
## %bb.49:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	8(%r13), %ecx
	.p2align	4, 0x90
LBB0_50:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	incl	%esi
	xorl	%eax, %eax
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	cmpl	%ecx, %esi
	jl	LBB0_11
	jmp	LBB0_54
LBB0_51:
	movq	112(%r13), %rdi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-104(%rbp), %r12                ## 8-byte Reload
	jmp	LBB0_54
LBB0_52:
	movq	112(%r13), %rdi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
LBB0_53:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_54:
	movq	%r12, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_57
## %bb.55:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_56:
	movq	112(%r13), %r14
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	callq	_get_bits_left
	negl	%eax
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_53
LBB0_57:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_COMPONENTS,4,2             ## @MAX_COMPONENTS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mb_bitmask_size mismatches\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"overread %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"error y=%d x=%d\n"

L_.str.3:                               ## @.str.3
	.asciz	"mb: %d %d processed\n"

L_.str.4:                               ## @.str.4
	.asciz	"%d %d %d %d %d %d %d %d \n"

	.no_dead_strip	_mjpeg_decode_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mjpeg_decode_scan
_mjpeg_decode_scan:                     ; @mjpeg_decode_scan
	.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
	sub	sp, sp, #176
	mov	x20, x6
	mov	x22, x4
	stp	w2, w3, [x29, #-160]            ; 8-byte Folded Spill
	mov	x24, x1
	mov	x19, x0
	mov	x21, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh3:
	adrp	x12, _MAX_COMPONENTS@GOTPAGE
Lloh4:
	ldr	x12, [x12, _MAX_COMPONENTS@GOTPAGEOFF]
	ldr	w8, [x12]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x23, x9, x8
	mov	sp, x23
	ldr	w12, [x12]
	lsl	x8, x12, #3
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x25, x9, x8
	mov	sp, x25
	lsl	x8, x12, #2
	mov	x9, x8
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x26, x9, x8
	mov	sp, x26
	stur	wzr, [x29, #-112]
	ldr	w8, [x0]
	cmp	w8, #8
	mov	w8, #1
	cinc	w8, w8, gt
	stur	w8, [x29, #-144]                ; 4-byte Folded Spill
	cbz	x4, LBB0_3
; %bb.1:
	ldp	w8, w9, [x19, #4]
	mul	w2, w9, w8
	add	w8, w2, #7
	cmp	w5, w8, asr #3
	b.ne	LBB0_47
; %bb.2:
	sub	x0, x29, #112
	mov	x1, x22
	bl	_init_get_bits
LBB0_3:
	str	xzr, [x19, #184]
	ldr	x8, [x19, #112]
	ldr	w0, [x8, #4]
	sub	x1, x29, #100
	sub	x2, x29, #104
	bl	_av_pix_fmt_get_chroma_sub_sample
	ldr	w0, [x19, #12]
	ldur	w1, [x29, #-100]
	bl	_AV_CEIL_RSHIFT
	stur	w0, [x29, #-164]                ; 4-byte Folded Spill
	ldr	w0, [x19, #16]
	ldur	w1, [x29, #-104]
	bl	_AV_CEIL_RSHIFT
	stur	w0, [x29, #-168]                ; 4-byte Folded Spill
	cmp	w24, #1
	b.lt	LBB0_9
; %bb.4:
	ldr	x8, [x19, #192]
	ldr	x8, [x8]
	ldp	x9, x10, [x19, #24]
	ldr	x11, [x19, #40]
	mov	w12, w24
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x14, [x20]
	ldr	x14, [x14, x13, lsl #3]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	str	x14, [x25, x13, lsl #3]
	lsl	x13, x13, #2
	ldr	w14, [x10, x13]
	str	w14, [x26, x13]
	ldr	w14, [x11, x13]
	orr	w14, w14, #0x1
	str	w14, [x11, x13]
	add	x9, x9, #4
	subs	x12, x12, #1
	b.eq	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x13, [x9]
	lsl	x14, x13, #3
	ldr	x15, [x8, x14]
	str	x15, [x23, x14]
	cbnz	x20, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x14, #0
	b	LBB0_6
LBB0_9:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_48
; %bb.10:
	stur	xzr, [x29, #-128]               ; 8-byte Folded Spill
	add	x9, x19, #128
	stur	x9, [x29, #-176]                ; 8-byte Folded Spill
	ldr	w9, [x19, #4]
	mov	w10, w24
	stp	x10, x25, [x29, #-216]          ; 16-byte Folded Spill
	stp	x22, x21, [x29, #-240]          ; 16-byte Folded Spill
	stur	w24, [x29, #-244]               ; 4-byte Folded Spill
	stur	x23, [x29, #-200]               ; 8-byte Folded Spill
	stur	x26, [x29, #-224]               ; 8-byte Folded Spill
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
                                        ;       Child Loop BB0_22 Depth 3
                                        ;         Child Loop BB0_26 Depth 4
	cmp	w9, #1
	b.lt	LBB0_46
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	w23, #0
LBB0_13:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_22 Depth 3
                                        ;         Child Loop BB0_26 Depth 4
	cbz	x22, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	sub	x0, x29, #112
	bl	_get_bits1
	cmp	w0, #0
	cset	w8, eq
	stur	w8, [x29, #-180]                ; 4-byte Folded Spill
	ldr	x8, [x19, #176]
	cbnz	x8, LBB0_16
	b	LBB0_18
LBB0_15:                                ;   in Loop: Header=BB0_13 Depth=2
	stur	wzr, [x29, #-180]               ; 4-byte Folded Spill
	ldr	x8, [x19, #176]
	cbz	x8, LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_13 Depth=2
	ldr	x9, [x19, #184]
	cbnz	x9, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=2
	str	x8, [x19, #184]
LBB0_18:                                ;   in Loop: Header=BB0_13 Depth=2
	ldur	x0, [x29, #-176]                ; 8-byte Folded Reload
	bl	_get_bits_left
	tbnz	w0, #31, LBB0_55
; %bb.19:                               ;   in Loop: Header=BB0_13 Depth=2
	cmp	w24, #1
	b.lt	LBB0_44
; %bb.20:                               ;   in Loop: Header=BB0_13 Depth=2
	mov	x27, #0
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=3
	add	x27, x27, #1
	ldur	x8, [x29, #-216]                ; 8-byte Folded Reload
	cmp	x27, x8
	b.eq	LBB0_44
LBB0_22:                                ;   Parent Loop BB0_11 Depth=1
                                        ;     Parent Loop BB0_13 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_26 Depth 4
	ldr	x8, [x19, #48]
	lsl	x9, x27, #2
	stur	x9, [x29, #-192]                ; 8-byte Folded Spill
	ldr	w20, [x8, x9]
	cmp	w20, #1
	b.lt	LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=3
	mov	w21, #0
	mov	w22, #0
	ldr	x8, [x19, #24]
	ldur	x10, [x29, #-192]               ; 8-byte Folded Reload
	ldrsw	x28, [x8, x10]
	ldp	x8, x9, [x19, #56]
	ldr	w10, [x8, x10]
	ldr	w8, [x9, x27, lsl #2]
	ldur	x9, [x29, #-224]                ; 8-byte Folded Reload
	ldr	w11, [x9, x28, lsl #2]
	ldur	x9, [x29, #-128]                ; 8-byte Folded Reload
	mul	w8, w8, w9
	stur	w8, [x29, #-132]                ; 4-byte Folded Spill
	mul	w8, w10, w23
	stur	w8, [x29, #-136]                ; 4-byte Folded Spill
	stur	w11, [x29, #-116]               ; 4-byte Folded Spill
	asr	w8, w11, #1
	stp	w8, w10, [x29, #-152]           ; 8-byte Folded Spill
	sub	w8, w28, #1
	stur	w8, [x29, #-140]                ; 4-byte Folded Spill
	b	LBB0_26
LBB0_24:                                ;   in Loop: Header=BB0_26 Depth=4
	ldur	x0, [x29, #-176]                ; 8-byte Folded Reload
	bl	_get_bits1
	ldp	x8, x9, [x19, #72]
	ldr	x9, [x9, x27, lsl #3]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w8, [x8]
	mul	w8, w8, w0
	ldur	w9, [x29, #-156]                ; 4-byte Folded Reload
	lsl	w8, w8, w9
	ldr	w9, [x25]
	add	w8, w8, w9
	str	w8, [x25]
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=4
	ldr	x0, [x19, #112]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	ldur	x25, [x29, #-128]               ; 8-byte Folded Reload
	mov	x2, x25
	mov	x3, x23
	bl	_ff_dlog
	ldr	x0, [x19, #112]
	ldr	w8, [x19, #104]
	sub	sp, sp, #48
	stp	x26, x24, [sp, #32]
	stp	x28, x8, [sp, #16]
	stp	x22, x21, [sp]
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x23
	mov	x3, x25
	bl	_ff_dlog
	add	sp, sp, #48
	add	w8, w22, #1
	ldur	w9, [x29, #-148]                ; 4-byte Folded Reload
	cmp	w8, w9
	csinc	w22, wzr, w22, eq
	cinc	w21, w21, eq
	subs	w20, w20, #1
	b.eq	LBB0_21
LBB0_26:                                ;   Parent Loop BB0_11 Depth=1
                                        ;     Parent Loop BB0_13 Depth=2
                                        ;       Parent Loop BB0_22 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	ldp	w9, w8, [x29, #-136]            ; 8-byte Folded Reload
	add	w8, w21, w8
	lsl	w26, w8, #3
	add	w9, w22, w9
	lsl	w24, w9, #3
	ldur	w10, [x29, #-144]               ; 4-byte Folded Reload
	mul	w10, w24, w10
	ldur	w11, [x29, #-116]               ; 4-byte Folded Reload
	madd	w10, w26, w11, w10
	ldr	x11, [x19, #112]
	ldr	w4, [x11]
	asr	w10, w10, w4
	ldr	x11, [x19, #168]
	cbz	x11, LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=4
	ldr	w11, [x19, #104]
	cmp	w11, #0
	ldur	w11, [x29, #-152]               ; 4-byte Folded Reload
	csel	w11, wzr, w11, eq
	add	w10, w10, w11
LBB0_28:                                ;   in Loop: Header=BB0_26 Depth=4
	ldur	w11, [x29, #-140]               ; 4-byte Folded Reload
	cmp	w11, #1
	b.hi	LBB0_31
; %bb.29:                               ;   in Loop: Header=BB0_26 Depth=4
	ldp	w11, w12, [x29, #-168]          ; 8-byte Folded Reload
	cmp	w24, w12
	b.ge	LBB0_37
; %bb.30:                               ;   in Loop: Header=BB0_26 Depth=4
	cmp	w26, w11
	b.ge	LBB0_37
	b	LBB0_33
LBB0_31:                                ;   in Loop: Header=BB0_26 Depth=4
	ldr	w11, [x19, #12]
	cmp	w24, w11
	b.ge	LBB0_37
; %bb.32:                               ;   in Loop: Header=BB0_26 Depth=4
	ldr	w11, [x19, #16]
	cmp	w26, w11
	b.ge	LBB0_37
LBB0_33:                                ;   in Loop: Header=BB0_26 Depth=4
	ldur	x11, [x29, #-200]               ; 8-byte Folded Reload
	ldr	x11, [x11, x28, lsl #3]
	add	x25, x11, w10, sxtw #2
	ldr	w11, [x19, #160]
	cbnz	w11, LBB0_38
LBB0_34:                                ;   in Loop: Header=BB0_26 Depth=4
	ldur	w8, [x29, #-180]                ; 4-byte Folded Reload
	cbz	w8, LBB0_40
; %bb.35:                               ;   in Loop: Header=BB0_26 Depth=4
	cbz	x25, LBB0_25
; %bb.36:                               ;   in Loop: Header=BB0_26 Depth=4
	ldur	x8, [x29, #-208]                ; 8-byte Folded Reload
	ldr	x8, [x8, x28, lsl #3]
	add	x2, x8, w10, sxtw #2
	mov	x0, x19
	mov	x1, x25
	ldur	w3, [x29, #-116]                ; 4-byte Folded Reload
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_mjpeg_copy_block
	b	LBB0_25
LBB0_37:                                ;   in Loop: Header=BB0_26 Depth=4
	mov	x25, #0
	ldr	w11, [x19, #160]
	cbz	w11, LBB0_34
LBB0_38:                                ;   in Loop: Header=BB0_26 Depth=4
	ldp	x10, x11, [x19, #88]
	ldr	w10, [x10, x28, lsl #2]
	madd	w8, w10, w8, w9
	ldr	x9, [x11, x28, lsl #3]
	ldr	x25, [x9, w8, sxtw #3]
	ldur	w8, [x29, #-160]                ; 4-byte Folded Reload
	cbnz	w8, LBB0_24
; %bb.39:                               ;   in Loop: Header=BB0_26 Depth=4
	ldr	x8, [x19, #120]
	ldr	w3, [x8, x27, lsl #2]
	ldp	x8, x9, [x19, #72]
	ldr	x9, [x9, x27, lsl #3]
	ldr	x4, [x8, x9, lsl #3]
	mov	x0, x19
	mov	x1, x25
	mov	x2, x27
	ldur	w5, [x29, #-156]                ; 4-byte Folded Reload
	bl	_decode_dc_progressive
	tbz	x0, #63, LBB0_25
	b	LBB0_49
LBB0_40:                                ;   in Loop: Header=BB0_26 Depth=4
	ldr	x8, [x19, #152]
	ldr	w0, [x19, #132]
	blr	x8
	ldr	w1, [x19, #132]
	ldr	x8, [x19, #120]
	ldur	x9, [x29, #-192]                ; 8-byte Folded Reload
	ldr	w3, [x8, x9]
	ldr	x8, [x19, #144]
	ldr	w4, [x8, x9]
	ldp	x8, x9, [x19, #72]
	ldr	x9, [x9, x27, lsl #3]
	ldr	x5, [x8, x9, lsl #3]
	mov	x0, x19
	mov	x2, x27
	bl	_decode_block
	tbnz	x0, #63, LBB0_50
; %bb.41:                               ;   in Loop: Header=BB0_26 Depth=4
	cbz	x25, LBB0_25
; %bb.42:                               ;   in Loop: Header=BB0_26 Depth=4
	ldr	x8, [x19, #136]
	ldr	w2, [x19, #132]
	mov	x0, x25
	ldur	w1, [x29, #-116]                ; 4-byte Folded Reload
	blr	x8
	ldrb	w8, [x19]
	tst	w8, #0x7
	b.eq	LBB0_25
; %bb.43:                               ;   in Loop: Header=BB0_26 Depth=4
	mov	x0, x19
	mov	x1, x25
	ldur	w2, [x29, #-116]                ; 4-byte Folded Reload
	bl	_shift_output
	b	LBB0_25
LBB0_44:                                ;   in Loop: Header=BB0_13 Depth=2
	mov	x0, x19
	ldur	w24, [x29, #-244]               ; 4-byte Folded Reload
	mov	x1, x24
	bl	_handle_rstn
	add	w23, w23, #1
	ldr	w9, [x19, #4]
	cmp	w23, w9
	ldur	x22, [x29, #-240]               ; 8-byte Folded Reload
	b.lt	LBB0_13
; %bb.45:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x19, #8]
	ldur	x21, [x29, #-232]               ; 8-byte Folded Reload
LBB0_46:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	w0, #0
	ldur	x10, [x29, #-128]               ; 8-byte Folded Reload
	add	w10, w10, #1
	stur	x10, [x29, #-128]               ; 8-byte Folded Spill
	cmp	w10, w8
	b.lt	LBB0_11
	b	LBB0_53
LBB0_47:
	ldr	x0, [x19, #112]
Lloh15:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh20:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	b	LBB0_53
LBB0_48:
	mov	w0, #0
	b	LBB0_53
LBB0_49:
	ldr	x0, [x19, #112]
Lloh23:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	sub	sp, sp, #16
	ldur	x8, [x29, #-128]                ; 8-byte Folded Reload
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	str	x23, [sp, #8]
	b	LBB0_51
LBB0_50:
	ldr	x0, [x19, #112]
Lloh26:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	sub	sp, sp, #16
	str	x23, [sp, #8]
	ldur	x8, [x29, #-128]                ; 8-byte Folded Reload
LBB0_51:
	str	x8, [sp]
Lloh29:
	adrp	x2, l_.str.2@PAGE
Lloh30:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_52:
	bl	_av_log
	add	sp, sp, #16
Lloh31:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh32:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	ldur	x21, [x29, #-232]               ; 8-byte Folded Reload
LBB0_53:
	mov	sp, x21
	ldur	x8, [x29, #-96]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_56
; %bb.54:
	sub	sp, x29, #80
	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
	ret
LBB0_55:
	ldr	x19, [x19, #112]
Lloh37:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh39:
	ldr	w20, [x8]
	ldur	x0, [x29, #-176]                ; 8-byte Folded Reload
	bl	_get_bits_left
	neg	w8, w0
	str	x8, [sp, #-16]!
Lloh40:
	adrp	x2, l_.str.1@PAGE
Lloh41:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	b	LBB0_52
LBB0_56:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_COMPONENTS,4,2             ; @MAX_COMPONENTS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mb_bitmask_size mismatches\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"overread %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"error y=%d x=%d\n"

l_.str.3:                               ; @.str.3
	.asciz	"mb: %d %d processed\n"

l_.str.4:                               ; @.str.4
	.asciz	"%d %d %d %d %d %d %d %d \n"

	.no_dead_strip	_mjpeg_decode_scan
.subsections_via_symbols
