	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tdsc_decode_tiles
_tdsc_decode_tiles:                     ## @tdsc_decode_tiles
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	testl	%esi, %esi
	jle	LBB0_16
## %bb.1:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	leaq	24(%rax), %r12
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	addq	$8, %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r13d, %r8d
	movl	%r12d, %r9d
	callq	_tdsc_decode_jpeg_tile
	testl	%eax, %eax
	js	LBB0_21
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	leaq	L_.str.4(%rip), %rdx
	movl	-72(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %ecx
	movl	%r13d, %r8d
	movl	%r12d, %r9d
	xorl	%eax, %eax
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	%r14
	callq	_av_log
	addq	$16, %rsp
	incl	%ebx
	cmpl	%ebx, -60(%rbp)                 ## 4-byte Folded Reload
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_24
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, -72(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$4, %eax
	jl	LBB0_17
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_le32
	movl	%eax, %ebx
	movl	$84, %edi
	movl	$68, %esi
	movl	$83, %edx
	movl	$66, %ecx
	callq	_MKTAG
	cmpl	%eax, %ebx
	jne	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	movq	_TDSB_HEADER_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	$-4, %ecx
	cmpl	%ecx, %eax
	jl	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_le32
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	%ebx, %eax
	jl	LBB0_23
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_bytestream2_get_le32
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movl	$4, %esi
	callq	_bytestream2_skip
	movq	%r12, %rdi
	callq	_bytestream2_get_le32
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_bytestream2_get_le32
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_bytestream2_get_le32
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_bytestream2_get_le32
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %r9d
	movl	4(%rcx), %r10d
	cmpl	%r9d, %r15d
	jge	LBB0_18
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%r10d, %r14d
	jge	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %r13d
	subl	%r15d, %r13d
	movl	%eax, %r12d
	subl	%r14d, %r12d
	cmpl	%r9d, %ebx
	jg	LBB0_19
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%r10d, %eax
	jg	LBB0_19
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_av_reallocp
	movl	(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_21
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_bytestream2_get_buffer
	movl	$71, %edi
	movl	$69, %esi
	movl	$80, %edx
	movl	$74, %ecx
	callq	_MKTAG
	movl	-64(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%eax, %ebx
	je	LBB0_2
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$32, %edi
	movl	$87, %esi
	movl	$65, %edx
	movl	$82, %ecx
	callq	_MKTAG
	cmpl	%eax, %ebx
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_22
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	leal	(%r14,%r14,2), %edx
	movslq	%edx, %rdx
	addq	(%rax), %rdx
	movl	(%rcx), %esi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	imull	%esi, %eax
	movslq	%eax, %rdi
	addq	%rdx, %rdi
	movl	8(%rbx), %edx
	leal	(%r13,%r13,2), %ecx
	movl	%ecx, %r8d
	movl	%r12d, %r9d
	callq	_av_image_copy_plane
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_3
LBB0_16:
	xorl	%r15d, %r15d
	jmp	LBB0_24
LBB0_17:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_23
LBB0_21:
	movl	%eax, %r15d
	jmp	LBB0_24
LBB0_18:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	pushq	%r10
	callq	_av_log
	addq	$16, %rsp
	jmp	LBB0_23
LBB0_19:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %ecx
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_23
LBB0_22:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_av_log
LBB0_23:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_24:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TDSB_HEADER_SIZE,4,2           ## @TDSB_HEADER_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TDSB tag is too small.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Invalid tile position (%d.%d outside %dx%d).\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid tile size %dx%d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Unknown tile type %08x.\n"

	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.4:                               ## @.str.4
	.asciz	"Tile %d, %dx%d (%d.%d)\n"

	.no_dead_strip	_tdsc_decode_tiles
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tdsc_decode_tiles
_tdsc_decode_tiles:                     ; @tdsc_decode_tiles
	.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
	str	w1, [sp, #52]                   ; 4-byte Folded Spill
	cmp	w1, #1
	b.lt	LBB0_16
; %bb.1:
	mov	x22, x0
	mov	w19, #0
	ldr	x8, [x0]
	add	x21, x8, #24
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
	add	x8, x8, #8
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	x1, x28
	mov	x2, x24
	mov	x3, x25
	mov	x4, x26
	mov	x5, x27
	bl	_tdsc_decode_jpeg_tile
	tbnz	w0, #31, LBB0_23
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh0:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	stp	x24, x25, [sp, #24]
	stp	x26, x27, [sp, #8]
	str	x19, [sp]
	mov	x0, x22
Lloh3:
	adrp	x2, l_.str.4@PAGE
Lloh4:
	add	x2, x2, l_.str.4@PAGEOFF
	bl	_av_log
	add	w19, w19, #1
	ldr	w8, [sp, #52]                   ; 4-byte Folded Reload
	cmp	w8, w19
	b.eq	LBB0_16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_bytestream2_get_bytes_left
	cmp	w0, #4
	b.lt	LBB0_17
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_bytestream2_get_le32
	mov	x20, x0
	mov	w0, #84
	mov	w1, #68
	mov	w2, #83
	mov	w3, #66
	bl	_MKTAG
	cmp	w20, w0
	b.ne	LBB0_17
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_bytestream2_get_bytes_left
Lloh5:
	adrp	x8, _TDSB_HEADER_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TDSB_HEADER_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	sub	w8, w8, #4
	cmp	w0, w8
	b.lt	LBB0_17
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_bytestream2_get_le32
	mov	x28, x0
	mov	x0, x21
	bl	_bytestream2_get_bytes_left
	cmp	w0, w28
	b.lt	LBB0_22
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_bytestream2_get_le32
	mov	x23, x0
	mov	x0, x21
	mov	w1, #4
	bl	_bytestream2_skip
	mov	x0, x21
	bl	_bytestream2_get_le32
	mov	x24, x0
	mov	x0, x21
	bl	_bytestream2_get_le32
	mov	x25, x0
	mov	x0, x21
	bl	_bytestream2_get_le32
	mov	x20, x0
	mov	x0, x21
	bl	_bytestream2_get_le32
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	ldp	w9, w8, [x8]
	cmp	w24, w9
	b.ge	LBB0_18
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w25, w8
	b.ge	LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	w26, w20, w24
	sub	w27, w0, w25
	cmp	w20, w9
	b.gt	LBB0_19
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w0, w8
	b.gt	LBB0_19
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x20, [sp, #40]                  ; 8-byte Folded Reload
	mov	x0, x20
	mov	x1, x28
	bl	_av_reallocp
	ldr	w1, [x20]
	cbz	w1, LBB0_23
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x2, x28
	bl	_bytestream2_get_buffer
	mov	w0, #71
	mov	w1, #69
	mov	w2, #80
	mov	w3, #74
	bl	_MKTAG
	cmp	w23, w0
	b.eq	LBB0_2
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #32
	mov	w1, #87
	mov	w2, #65
	mov	w3, #82
	bl	_MKTAG
	cmp	w23, w0
	b.ne	LBB0_20
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x11, [sp, #56]                  ; 8-byte Folded Reload
	ldr	x8, [x11, #16]
	ldp	x8, x9, [x8]
	ldr	x9, [x9]
	add	w10, w24, w24, lsl #1
	add	x9, x9, w10, sxtw
	ldr	w1, [x8]
	mul	w8, w1, w25
	add	x0, x9, w8, sxtw
	ldr	w2, [x11, #8]
	add	w3, w26, w26, lsl #1
	mov	x4, x3
	mov	x5, x27
	bl	_av_image_copy_plane
	b	LBB0_3
LBB0_16:
	mov	w0, #0
	b	LBB0_23
LBB0_17:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_21
LBB0_18:
Lloh13:
	adrp	x10, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x10, [x10, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x10]
	stp	x9, x8, [sp, #16]
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	stp	x24, x25, [sp]
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_21
LBB0_19:
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
                                        ; kill: def $w27 killed $w27 killed $x27 def $x27
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	stp	x26, x27, [sp]
Lloh21:
	adrp	x2, l_.str.2@PAGE
Lloh22:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_21
LBB0_20:
Lloh23:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	str	x23, [sp]
Lloh26:
	adrp	x2, l_.str.3@PAGE
Lloh27:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_21:
	mov	x0, x22
	bl	_av_log
LBB0_22:
Lloh28:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
LBB0_23:
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_TDSB_HEADER_SIZE,4,2           ; @TDSB_HEADER_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TDSB tag is too small.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Invalid tile position (%d.%d outside %dx%d).\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid tile size %dx%d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Unknown tile type %08x.\n"

	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.4:                               ; @.str.4
	.asciz	"Tile %d, %dx%d (%d.%d)\n"

	.no_dead_strip	_tdsc_decode_tiles
.subsections_via_symbols
