	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tdsc_decode_jpeg_tile
_tdsc_decode_jpeg_tile:                 ## @tdsc_decode_jpeg_tile
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r9d killed $r9d def $r9
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r12d
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	callq	_av_init_packet
	movl	20(%r13), %eax
	movl	%eax, -44(%rbp)
	movl	%ebx, -48(%rbp)
	movl	16(%r13), %edi
	movq	%r14, %rsi
	callq	_avcodec_send_packet
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	16(%r13), %edi
	movq	(%r13), %rsi
	callq	_avcodec_receive_frame
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	movq	(%r13), %rcx
	movq	(%rcx), %rdx
	movq	_AV_PIX_FMT_YUVJ420P@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_4
## %bb.6:
	movq	8(%r13), %rax
	movq	8(%rax), %rdx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	leal	(%rsi,%rsi,2), %esi
	movslq	%esi, %rbx
	addq	(%rdx), %rbx
	movq	(%rax), %rax
	movl	(%rax), %esi
	imull	%esi, %r12d
	movslq	%r12d, %rdi
	addq	%rbx, %rdi
	movq	8(%rcx), %rax
	movq	16(%rcx), %rcx
	movl	(%rcx), %edx
	movl	4(%rcx), %r8d
	movl	8(%rcx), %r9d
	movl	(%rax), %ecx
	movl	4(%rax), %eax
	subq	$8, %rsp
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	pushq	%rax
	callq	_tdsc_blit
	addq	$32, %rsp
	movq	(%r13), %rdi
	callq	_av_frame_unref
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	_AV_EF_EXPLODE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	andl	(%r15), %r14d
	je	LBB0_7
## %bb.5:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %r14d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_7:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error submitting a packet for decoding\n"

	.comm	_AV_PIX_FMT_YUVJ420P,8,3        ## @AV_PIX_FMT_YUVJ420P
L_.str.1:                               ## @.str.1
	.asciz	"JPEG decoding error (%d).\n"

	.comm	_AV_EF_EXPLODE,4,2              ## @AV_EF_EXPLODE
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_tdsc_decode_jpeg_tile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tdsc_decode_jpeg_tile
_tdsc_decode_jpeg_tile:                 ; @tdsc_decode_jpeg_tile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x5
	mov	x19, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x21, x0
	ldr	x25, [x0, #8]
	add	x0, sp, #8
	bl	_av_init_packet
	ldp	w0, w8, [x25, #16]
	stp	w24, w8, [sp, #8]
	add	x1, sp, #8
	bl	_avcodec_send_packet
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w0, [x25, #16]
	ldr	x1, [x25]
	bl	_avcodec_receive_frame
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	x8, [x25]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _AV_PIX_FMT_YUVJ420P@GOTPAGE
Lloh1:
	ldr	x10, [x10, _AV_PIX_FMT_YUVJ420P@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.3:
	ldr	x9, [x25, #8]
	ldp	x9, x10, [x9]
	ldr	x10, [x10]
	add	w11, w23, w23, lsl #1
	add	x10, x10, w11, sxtw
	ldr	w1, [x9]
	mul	w9, w1, w22
	add	x0, x10, w9, sxtw
	ldp	x8, x9, [x8, #8]
	ldp	w2, w4, [x9]
	ldr	w5, [x9, #8]
	ldp	w3, w6, [x8]
	str	w20, [sp]
	mov	x7, x19
	bl	_tdsc_blit
	ldr	x0, [x25]
	bl	_av_frame_unref
	mov	w24, #0
	b	LBB0_6
LBB0_4:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_av_log
	ldr	w8, [x21]
Lloh8:
	adrp	x9, _AV_EF_EXPLODE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AV_EF_EXPLODE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _AVERROR_INVALIDDATA@GOTPAGE
Lloh12:
	ldr	x10, [x10, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w24, wzr, w10, eq
	b	LBB0_6
LBB0_5:
	mov	x24, x0
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
LBB0_6:
	mov	x0, x24
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error submitting a packet for decoding\n"

	.comm	_AV_PIX_FMT_YUVJ420P,8,3        ; @AV_PIX_FMT_YUVJ420P
l_.str.1:                               ; @.str.1
	.asciz	"JPEG decoding error (%d).\n"

	.comm	_AV_EF_EXPLODE,4,2              ; @AV_EF_EXPLODE
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_tdsc_decode_jpeg_tile
.subsections_via_symbols
