	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mjpeg_decode_scan_progressive_ac
_mjpeg_decode_scan_progressive_ac:      ## @mjpeg_decode_scan_progressive_ac
	.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
                                        ## kill: def $r8d killed $r8d def $r8
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movl	$0, -48(%rbp)
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	movslq	(%rax), %r15
	movq	96(%rdi), %rax
	movq	(%rdx), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%r8d, %eax
	notl	%eax
	shrl	$31, %eax
	xorl	%edi, %edi
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	orl	%esi, %ecx
	cmovnsl	%eax, %edi
	callq	_av_assert0
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	cmpl	%r12d, %r14d
	jl	LBB0_2
## %bb.1:
	cmpl	$64, %r14d
	jge	LBB0_2
## %bb.5:
	movl	$2, %eax
	movl	%r14d, %ecx
	shlq	%cl, %rax
	movq	$-1, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shlq	%cl, %rdx
	addq	%rax, %rdx
	movq	16(%rbx), %rax
	orq	%rdx, (%rax,%r15,8)
	movq	$0, 64(%rbx)
	cmpl	$0, 24(%rbx)
	jle	LBB0_6
## %bb.7:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	leaq	72(%rbx), %r12
	xorl	%edx, %edx
	movq	_block@GOTPCREL(%rip), %rsi
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	incl	%edx
	xorl	%eax, %eax
	cmpl	24(%rbx), %edx
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	jge	LBB0_23
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movq	32(%rbx), %rax
	movq	88(%rbx), %rcx
	movslq	(%rax,%r15,4), %rax
	movq	%r15, %r14
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movslq	%edx, %r15
	imulq	%rax, %r15
	leaq	(,%r15,4), %r13
	addq	(%rcx,%r14,8), %r13
	movq	(%rsi), %rax
	movl	(%rax), %edi
	callq	_int16_t
	movq	%r13, 512(%rax)
	movq	80(%rbx), %rax
	movq	(%rax,%r14,8), %r13
	movq	%r12, %rdi
	callq	_get_bits_left
	testq	%rax, %rax
	jle	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$0, 40(%rbx)
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	_block@GOTPCREL(%rip), %rsi
	jle	LBB0_22
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	leaq	(%r13,%r15,4), %r13
	xorl	%r15d, %r15d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_12 Depth=2
	movq	_block@GOTPCREL(%rip), %rsi
	addq	$4, (%rsi)
	incl	%r15d
	addq	$4, %r13
	cmpl	40(%rbx), %r15d
	jge	LBB0_22
LBB0_12:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	56(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	cmpq	$0, 64(%rbx)
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	%rax, 64(%rbx)
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=2
	movq	(%rsi), %rax
	movl	(%rax), %esi
	movq	48(%rbx), %rax
	movl	(%rax), %ecx
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=2
	subq	$8, %rsp
	movq	%rbx, %rdi
	movq	%r13, %rdx
	movq	%r14, %r8
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	leaq	-48(%rbp), %rax
	pushq	%rax
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	callq	_decode_block_refinement
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=2
	subq	$8, %rsp
	movq	%rbx, %rdi
	movq	%r13, %rdx
	movq	%r14, %r8
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	leaq	-48(%rbp), %rax
	pushq	%rax
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	callq	_decode_block_progressive
LBB0_18:                                ##   in Loop: Header=BB0_12 Depth=2
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_24
## %bb.19:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_handle_rstn
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	$0, -48(%rbp)
	jmp	LBB0_21
LBB0_2:
	movl	44(%rbx), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r14d, %r8d
	jmp	LBB0_3
LBB0_24:
	movl	44(%rbx), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%r15d, %r8d
LBB0_3:
	xorl	%eax, %eax
	callq	_av_log
LBB0_4:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_23:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_23
LBB0_9:
	movl	44(%rbx), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SS/SE %d/%d is invalid\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_block,8,3                      ## @block
L_.str.1:                               ## @.str.1
	.asciz	"bitstream truncated in mjpeg_decode_scan_progressive_ac\n"

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

	.no_dead_strip	_mjpeg_decode_scan_progressive_ac
.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_progressive_ac
_mjpeg_decode_scan_progressive_ac:      ; @mjpeg_decode_scan_progressive_ac
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x21, x4
	mov	x23, x3
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	str	wzr, [sp, #60]
	ldr	x8, [x0, #96]
	ldp	x9, x10, [x0]
	ldr	x10, [x10]
	ldr	x24, [x8, x10, lsl #3]
	ldrsw	x25, [x9]
	orr	w8, w3, w1
	mvn	w9, w4
	lsr	w9, w9, #31
	cmp	w8, #0
	csel	w0, wzr, w9, lt
	bl	_av_assert0
	str	x19, [sp, #40]                  ; 8-byte Folded Spill
	cmp	w20, w19
	b.lt	LBB0_17
; %bb.1:
	cmp	w20, #64
	b.ge	LBB0_17
; %bb.2:
	mov	w8, #2
	lsl	x8, x8, x20
	mov	x9, #-1
	ldr	x10, [sp, #40]                  ; 8-byte Folded Reload
	lsl	x9, x9, x10
	ldr	x10, [x22, #16]
	lsl	x12, x25, #3
	ldr	x11, [x10, x12]
	add	x8, x8, x9
	orr	x8, x11, x8
	str	x12, [sp, #24]                  ; 8-byte Folded Spill
	str	x8, [x10, x12]
	str	xzr, [x22, #64]
	ldr	w8, [x22, #24]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.3:
	str	x20, [sp, #48]                  ; 8-byte Folded Spill
	mov	w9, #0
	add	x20, x22, #72
Lloh0:
	adrp	x27, _block@GOTPAGE
Lloh1:
	ldr	x27, [x27, _block@GOTPAGEOFF]
	str	x25, [sp, #16]                  ; 8-byte Folded Spill
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #0
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	add	w9, w9, #1
	ldr	w8, [x22, #24]
	cmp	w9, w8
	ldr	x25, [sp, #16]                  ; 8-byte Folded Reload
	b.ge	LBB0_20
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	mov	x28, x23
	mov	x23, x21
	mov	x21, x24
	ldr	x8, [x22, #32]
	ldr	w8, [x8, x25, lsl #2]
	str	x9, [sp, #32]                   ; 8-byte Folded Spill
	mul	w26, w8, w9
	ldr	x8, [x22, #88]
	ldr	x24, [sp, #24]                  ; 8-byte Folded Reload
	ldr	x8, [x8, x24]
	add	x19, x8, w26, sxtw #2
	ldr	x8, [x27]
	ldr	w0, [x8]
	bl	_int16_t
	str	x19, [x0, #512]
	ldr	x8, [x22, #80]
	ldr	x19, [x8, x24]
	mov	x0, x20
	bl	_get_bits_left
	cmp	x0, #0
	b.le	LBB0_22
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x22, #40]
	cmp	w8, #1
	mov	x24, x21
	mov	x21, x23
	mov	x23, x28
	ldr	x25, [sp, #40]                  ; 8-byte Folded Reload
	b.lt	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w28, #0
	sxtw	x8, w26
	add	x26, x19, x8, lsl #2
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	w28, w28, #1
	ldr	x8, [x27]
	add	x8, x8, #4
	str	x8, [x27]
	add	x26, x26, #4
	ldr	w8, [x22, #40]
	cmp	w28, w8
	b.ge	LBB0_4
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22, #56]
	cbz	x8, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x9, [x22, #64]
	cbnz	x9, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	str	x8, [x22, #64]
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x27]
	ldr	w1, [x8]
	ldr	x8, [x22, #48]
	ldr	w3, [x8]
	ldr	x6, [sp, #48]                   ; 8-byte Folded Reload
	add	x8, sp, #60
	cbz	w23, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=2
	str	x8, [sp]
	mov	x0, x22
	mov	x2, x26
	mov	x4, x24
	mov	x5, x25
                                        ; kill: def $w6 killed $w6 killed $x6
	mov	x7, x21
	bl	_decode_block_refinement
	tbz	w0, #31, LBB0_15
	b	LBB0_18
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=2
	str	x8, [sp]
	mov	x0, x22
	mov	x2, x26
	mov	x4, x24
	mov	x5, x25
                                        ; kill: def $w6 killed $w6 killed $x6
	mov	x7, x21
	bl	_decode_block_progressive
	tbnz	w0, #31, LBB0_18
LBB0_15:                                ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x22
	mov	w1, #0
	bl	_handle_rstn
	cbz	x0, LBB0_8
; %bb.16:                               ;   in Loop: Header=BB0_9 Depth=2
	str	wzr, [sp, #60]
	b	LBB0_8
LBB0_17:
	ldr	w0, [x22, #44]
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	ldr	x19, [sp, #40]                  ; 8-byte Folded Reload
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	stp	x19, x20, [sp]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_19
LBB0_18:
	ldr	w0, [x22, #44]
Lloh7:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	stp	x8, x28, [sp]
Lloh10:
	adrp	x2, l_.str.2@PAGE
Lloh11:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_19:
	bl	_av_log
Lloh12:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
LBB0_20:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_21:
	mov	w0, #0
	b	LBB0_20
LBB0_22:
	ldr	w0, [x22, #44]
Lloh15:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x2, l_.str.1@PAGE
Lloh19:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_19
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SS/SE %d/%d is invalid\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_block,8,3                      ; @block
l_.str.1:                               ; @.str.1
	.asciz	"bitstream truncated in mjpeg_decode_scan_progressive_ac\n"

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

	.no_dead_strip	_mjpeg_decode_scan_progressive_ac
.subsections_via_symbols
