	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smvjpeg_decode_frame
_smvjpeg_decode_frame:                  ## @smvjpeg_decode_frame
	.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
	movq	%rcx, %rbx
	movq	%rdx, %r8
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	40(%rdi), %r12
	movq	16(%r12), %rax
	movq	(%rax), %r14
	movl	(%rcx), %eax
	movl	(%r12), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %r15d
	sarl	$31, %r15d
	andl	%ecx, %r15d
	addl	%edx, %r15d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	je	LBB0_1
## %bb.3:
	movq	%r14, %r13
	cmpl	$0, 4(%r12)
	jne	LBB0_4
## %bb.17:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_1:
	movq	%r14, %rdi
	callq	_av_frame_unref
	movq	32(%r12), %rdi
	leaq	4(%r12), %rdx
	movq	%r14, %r13
	movq	%r14, %rsi
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rcx
	callq	_avcodec_decode_video2
	testl	%eax, %eax
	js	LBB0_2
LBB0_4:
	movq	32(%r12), %rax
	movl	(%rax), %edi
	callq	_av_pix_fmt_desc_get
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_av_assert0
	movl	(%r12), %esi
	movb	(%rbx), %cl
	shll	%cl, %esi
	movl	(%r13), %eax
	cltd
	idivl	%esi
	testl	%edx, %edx
	je	LBB0_6
## %bb.5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_16
LBB0_6:
	movl	4(%r12), %eax
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, (%rbx)
	movq	32(%r12), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, 28(%rdi)
	movl	(%r13), %eax
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movl	24(%r13), %esi
	cltd
	idivl	(%r12)
	movl	%eax, %edx
	callq	_ff_set_dimensions
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	cmpl	$0, (%rbx)
	je	LBB0_15
## %bb.9:
	movq	16(%r12), %rax
	movq	8(%rax), %rcx
	movq	$0, 32(%rcx)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	24(%rcx), %r8d
	movq	8(%rax), %rax
	movl	%r8d, 24(%rax)
	movl	8(%rcx), %r9d
	movl	%r9d, (%rax)
	movl	28(%rcx), %ecx
	movl	%ecx, 20(%rax)
	movl	16(%rax), %edi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	16(%rbx), %esi
	movq	8(%rbx), %rdx
	movl	%r15d, (%rsp)
	callq	_smv_img_pnt
	movq	_AV_NUM_DATA_POINTERS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_10
## %bb.11:
	movq	8(%rbx), %rcx
	movq	16(%r12), %rdx
	movq	8(%rdx), %rsi
	movq	8(%rsi), %rdx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rdi,4), %ebx
	movl	%ebx, (%rdx,%rdi,4)
	incq	%rdi
	movslq	(%rax), %rbx
	cmpq	%rbx, %rdi
	jl	LBB0_12
	jmp	LBB0_13
LBB0_2:
	movl	%eax, %r14d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	jmp	LBB0_16
LBB0_7:
	movl	%eax, %r14d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
	jmp	LBB0_16
LBB0_10:
	movq	16(%r12), %rax
	movq	8(%rax), %rsi
LBB0_13:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_frame_ref
	testl	%eax, %eax
	js	LBB0_14
LBB0_15:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %r14d
	jmp	LBB0_16
LBB0_14:
	movl	%eax, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid height\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Failed to set dimensions\n"

	.comm	_AV_NUM_DATA_POINTERS,4,2       ## @AV_NUM_DATA_POINTERS
	.no_dead_strip	_smvjpeg_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smvjpeg_decode_frame
_smvjpeg_decode_frame:                  ; @smvjpeg_decode_frame
	.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	x19, x3
	mov	x25, x2
	mov	x20, x1
	mov	x23, x0
	ldr	x21, [x0, #40]
	ldr	x8, [x21, #16]
	ldr	x22, [x8]
	ldr	w8, [x3]
	ldr	w9, [x21]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	and	w9, w9, w8, asr #31
	adds	w24, w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	w8, [x21, #4]
	cbnz	w8, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	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	_AVERROR
LBB0_3:
	mov	x0, x22
	bl	_av_frame_unref
	ldr	x0, [x21, #32]
	add	x27, x21, #4
	mov	x1, x22
	mov	x2, x27
	mov	x3, x19
	bl	_avcodec_decode_video2
	tbnz	w0, #31, LBB0_11
LBB0_4:
	ldr	x8, [x21, #32]
	ldr	w0, [x8]
	bl	_av_pix_fmt_desc_get
	mov	x26, x0
	bl	_av_assert0
	ldr	w8, [x22]
	ldr	w9, [x21]
	ldr	w10, [x26]
	lsl	w9, w9, w10
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cbz	w8, LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	bl	_av_log
Lloh8:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh10:
	ldr	w26, [x8]
	b	LBB0_17
LBB0_6:
	ldr	w8, [x21, #4]
	str	w8, [x25]
	ldr	x8, [x21, #32]
	ldr	w8, [x8]
	str	w8, [x23, #28]
	ldr	w1, [x22, #24]
	ldr	w8, [x22]
	ldr	w9, [x21]
	sdiv	w2, w8, w9
	mov	x0, x23
	bl	_ff_set_dimensions
	tbnz	w0, #31, LBB0_12
; %bb.7:
	ldr	w8, [x25]
	cbz	w8, LBB0_15
; %bb.8:
	ldr	x8, [x21, #16]
	ldr	x9, [x8, #8]
	str	xzr, [x9, #32]
	ldr	x8, [x8, #8]
	ldr	w5, [x23, #8]
	str	w5, [x8]
	ldp	w4, w3, [x23, #24]
	stp	w3, w4, [x8, #20]
	ldr	w0, [x8, #16]
	ldr	w1, [x22, #16]
	ldr	x2, [x22, #8]
	mov	x6, x24
	bl	_smv_img_pnt
Lloh11:
	adrp	x8, _AV_NUM_DATA_POINTERS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_NUM_DATA_POINTERS@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #0
	b.le	LBB0_13
; %bb.9:
	mov	x9, #0
	ldr	x10, [x22, #8]
	ldr	x11, [x21, #16]
	ldr	x1, [x11, #8]
	ldr	x11, [x1, #8]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	lsl	x12, x9, #2
	ldr	w13, [x10, x12]
	str	w13, [x11, x12]
	add	x9, x9, #1
	ldrsw	x12, [x8]
	cmp	x9, x12
	b.lt	LBB0_10
	b	LBB0_14
LBB0_11:
	mov	x26, x0
	str	wzr, [x27]
	b	LBB0_17
LBB0_12:
	mov	x26, x0
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_av_log
	b	LBB0_17
LBB0_13:
	ldr	x8, [x21, #16]
	ldr	x1, [x8, #8]
LBB0_14:
	mov	x0, x20
	bl	_av_frame_ref
	tbnz	w0, #31, LBB0_16
LBB0_15:
	ldr	w26, [x19, #4]
	b	LBB0_17
LBB0_16:
	mov	x26, x0
LBB0_17:
	mov	x0, x26
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid height\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Failed to set dimensions\n"

	.comm	_AV_NUM_DATA_POINTERS,4,2       ; @AV_NUM_DATA_POINTERS
	.no_dead_strip	_smvjpeg_decode_frame
.subsections_via_symbols
