	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kempf_decode_tile
_kempf_decode_tile:                     ## @kempf_decode_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	$3224, %rsp                     ## imm = 0xC98
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movl	%edx, %r12d
                                        ## kill: def $esi killed $esi def $rsi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %eax
	movl	4(%rdi), %ecx
	leal	1(%rax), %edx
	imull	%ecx, %edx
	movl	%edx, -3156(%rbp)
	cmpl	$1, %r8d
	jg	LBB0_2
LBB0_1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_25
LBB0_2:
	movl	%r8d, %r14d
	movq	%rdi, %rbx
	imull	%eax, %esi
	leal	(%rsi,%rsi,2), %edx
	movslq	%edx, %rdx
	shlq	$2, %rdx
	addq	8(%rdi), %rdx
	imull	%r12d, %ecx
	movslq	16(%rdi), %rdi
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	leaq	(%rdx,%rcx,4), %rcx
	movq	%rcx, -3168(%rbp)               ## 8-byte Spill
	movl	20(%rbx), %edi
	subl	%esi, %edi
	movl	%eax, %esi
	callq	_FFMIN
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -3152(%rbp)               ## 8-byte Spill
	movl	4(%rbx), %esi
	movl	24(%rbx), %edi
	imull	%esi, %r12d
	subl	%r12d, %edi
	callq	_FFMIN
	movl	%eax, %r15d
	leaq	4(%r13), %r12
	movl	(%r13), %ecx
	cmpl	$31, %ecx
	ja	LBB0_9
## %bb.3:
	leaq	-3132(%rbp), %rdi
	movq	%r12, %rsi
	movl	$3, %edx
	callq	_memcpy
	testl	%r15d, %r15d
	jle	LBB0_21
## %bb.4:
	movl	-3152(%rbp), %eax               ## 4-byte Reload
	movq	%rax, -3144(%rbp)               ## 8-byte Spill
	xorl	%r13d, %r13d
	leaq	-3132(%rbp), %r14
	movq	%r15, -3256(%rbp)               ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%r13d
	movq	%r15, %rbx
	movslq	16(%r15), %rax
	movq	-3168(%rbp), %rcx               ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rcx
	movq	%rcx, -3168(%rbp)               ## 8-byte Spill
	movq	-3256(%rbp), %r15               ## 8-byte Reload
	cmpl	%r15d, %r13d
	je	LBB0_21
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	%rbx, %r15
	cmpl	$0, -3152(%rbp)                 ## 4-byte Folded Reload
	jle	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-3144(%rbp), %r12               ## 8-byte Reload
	movq	-3168(%rbp), %rbx               ## 8-byte Reload
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$3, %edx
	callq	_memcpy
	addq	$12, %rbx
	decq	%r12
	jne	LBB0_8
	jmp	LBB0_5
LBB0_9:
	sarl	$5, %ecx
	cmpl	$1, %ecx
	jne	LBB0_12
## %bb.10:
	decl	%r14d
	movl	16(%rbx), %eax
	addq	$56, %rbx
	subq	$8, %rsp
	movq	%rbx, %rdi
	movq	-3152(%rbp), %rsi               ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%r15d, %edx
	movq	%r12, %rcx
	movl	%r14d, %r8d
	movq	-3168(%rbp), %r9                ## 8-byte Reload
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_jpg_decode_data
	addq	$48, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	je	LBB0_27
	jmp	LBB0_44
LBB0_21:
	xorl	%r13d, %r13d
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_44
## %bb.26:
	movl	%r13d, %eax
LBB0_27:
	addq	$3224, %rsp                     ## imm = 0xC98
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movslq	%r14d, %rax
	leaq	(,%rax,4), %r14
	addq	%r13, %r14
	cmpl	$2, %ecx
	movq	%rbx, -3208(%rbp)               ## 8-byte Spill
	movl	%ecx, -3144(%rbp)               ## 4-byte Spill
	je	LBB0_14
## %bb.13:
	leaq	-3132(%rbp), %rdi
	movq	%r12, %rsi
	movl	$3, %edx
	callq	_memcpy
	addq	$16, %r13
	movq	%r13, %r12
LBB0_14:
	movl	(%r12), %ebx
	addq	$4, %r12
	leal	1(%rbx), %edx
	movq	%r14, %rax
	subq	%r12, %rax
	sarq	$2, %rax
	leal	(%rdx,%rdx,2), %ecx
	movslq	%ecx, %r13
	cmpq	%r13, %rax
	jl	LBB0_1
## %bb.15:
	movq	%r14, -3200(%rbp)               ## 8-byte Spill
	movq	%rdx, -3192(%rbp)               ## 8-byte Spill
	leaq	-3120(%rbp), %r14
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	leaq	(%r12,%r13,4), %rdx
	movl	$-1, %r12d
	movl	-3144(%rbp), %esi               ## 4-byte Reload
	cmpl	$2, %esi
	je	LBB0_24
## %bb.16:
	testl	%ebx, %ebx
	js	LBB0_24
## %bb.17:
	movq	%rdx, -3176(%rbp)               ## 8-byte Spill
	movl	-3192(%rbp), %r12d              ## 4-byte Reload
	xorl	%ebx, %ebx
	leaq	-3132(%rbp), %r13
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$3, %edx
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	incq	%rbx
	addq	$12, %r14
	cmpq	%rbx, %r12
	jne	LBB0_18
## %bb.20:
	movl	$-1, %r12d
	jmp	LBB0_23
LBB0_22:
	movl	%ebx, %r12d
LBB0_23:
	movl	-3144(%rbp), %esi               ## 4-byte Reload
	movq	-3176(%rbp), %rdx               ## 8-byte Reload
LBB0_24:
	movq	-3200(%rbp), %rcx               ## 8-byte Reload
	movq	%rcx, %rax
	subq	%rdx, %rax
	xorl	%r13d, %r13d
	cmpq	$8, %rax
	movq	-3208(%rbp), %rbx               ## 8-byte Reload
	jl	LBB0_25
## %bb.28:
	xorl	%eax, %eax
	cmpl	$2, %esi
	setne	%al
	movl	(%rdx), %r14d
	shll	$8, %r14d
	orl	4(%rdx), %r14d
	addq	$8, %rdx
	subq	%rdx, %rcx
	sarq	$2, %rcx
	addl	%r14d, %eax
	cltq
	cmpq	%rax, %rcx
	jl	LBB0_1
## %bb.29:
	movl	52(%rbx), %edi
	leaq	-3156(%rbp), %rsi
	movl	%r14d, %ecx
	movq	%rdx, %r13
	callq	_uncompress
	testl	%eax, %eax
	jne	LBB0_1
## %bb.30:
	cmpl	$2, -3144(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_32
## %bb.31:
	movl	16(%rbx), %ecx
	movl	52(%rbx), %edi
	movl	-3156(%rbp), %esi
	subq	$8, %rsp
	leaq	-3120(%rbp), %rax
	xorl	%r13d, %r13d
	movq	-3168(%rbp), %rdx               ## 8-byte Reload
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r12
	pushq	-3192(%rbp)                     ## 8-byte Folded Reload
	pushq	%rax
	pushq	%r15
	pushq	-3152(%rbp)                     ## 8-byte Folded Reload
	jmp	LBB0_43
LBB0_32:
	movq	%r12, -3232(%rbp)               ## 8-byte Spill
	movslq	%r14d, %rax
	leaq	4(,%rax,4), %rcx
	addq	%r13, %rcx
	movq	%rcx, -3184(%rbp)               ## 8-byte Spill
	movl	(%r13,%rax,4), %eax
	incl	%eax
	movq	%rax, -3144(%rbp)               ## 8-byte Spill
	movq	-3152(%rbp), %rdi               ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$16, %esi
	callq	_FFALIGN
	movl	%eax, %ebx
	sarl	$3, %ebx
	movl	%r15d, %edi
	movl	$16, %esi
	callq	_FFALIGN
	cmpl	$16, %eax
	movq	%rbx, -3224(%rbp)               ## 8-byte Spill
	jl	LBB0_42
## %bb.33:
	movslq	%ebx, %rax
	leaq	4(,%rax,4), %rcx
	movq	%rcx, -3176(%rbp)               ## 8-byte Spill
	shlq	$3, %rax
	movq	%rax, -3240(%rbp)               ## 8-byte Spill
	xorl	%r13d, %r13d
	movl	$4, %eax
	movq	%rax, -3216(%rbp)               ## 8-byte Spill
                                        ## implicit-def: $r12d
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_35
LBB0_34:                                ##   in Loop: Header=BB0_35 Depth=1
	movq	-3248(%rbp), %r13               ## 8-byte Reload
	incq	%r13
	movl	%r15d, %edi
	movl	$16, %esi
	callq	_FFALIGN
	sarl	$4, %eax
	cltq
	movq	-3240(%rbp), %rcx               ## 8-byte Reload
	addq	%rcx, -3176(%rbp)               ## 8-byte Folded Spill
	addq	%rcx, -3216(%rbp)               ## 8-byte Folded Spill
	cmpq	%rax, %r13
	jge	LBB0_42
LBB0_35:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_37 Depth 2
	movq	%r13, -3248(%rbp)               ## 8-byte Spill
	movq	-3152(%rbp), %rdi               ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$16, %esi
	callq	_FFALIGN
	cmpl	$16, %eax
	jl	LBB0_34
## %bb.36:                              ##   in Loop: Header=BB0_35 Depth=1
	xorl	%r13d, %r13d
LBB0_37:                                ##   Parent Loop BB0_35 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%ebx, %ebx
	jne	LBB0_40
## %bb.38:                              ##   in Loop: Header=BB0_37 Depth=2
	movq	-3184(%rbp), %rax               ## 8-byte Reload
	cmpq	-3200(%rbp), %rax               ## 8-byte Folded Reload
	jae	LBB0_1
## %bb.39:                              ##   in Loop: Header=BB0_37 Depth=2
	movl	(%rax), %r12d
	addq	$4, %rax
	movq	%rax, -3184(%rbp)               ## 8-byte Spill
	movl	$8, %ebx
LBB0_40:                                ##   in Loop: Header=BB0_37 Depth=2
	movl	%r12d, %eax
	andl	$1, %eax
	addl	%eax, %r14d
	cmpl	-3144(%rbp), %r14d              ## 4-byte Folded Reload
	jg	LBB0_1
## %bb.41:                              ##   in Loop: Header=BB0_37 Depth=2
	sarl	%r12d
	decl	%ebx
	movq	-3208(%rbp), %rcx               ## 8-byte Reload
	movq	32(%rcx), %rcx
	movq	-3176(%rbp), %rdx               ## 8-byte Reload
	addq	%rcx, %rdx
	movl	%eax, (%rdx,%r13,8)
	movl	%eax, -4(%rdx,%r13,8)
	addq	-3216(%rbp), %rcx               ## 8-byte Folded Reload
	movl	%eax, (%rcx,%r13,8)
	movl	%eax, -4(%rcx,%r13,8)
	incq	%r13
	movq	-3152(%rbp), %rdi               ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$16, %esi
	callq	_FFALIGN
	sarl	$4, %eax
	cltq
	cmpq	%rax, %r13
	jl	LBB0_37
	jmp	LBB0_34
LBB0_42:
	movq	-3208(%rbp), %rbx               ## 8-byte Reload
	movq	40(%rbx), %rdi
	movl	48(%rbx), %edx
	imull	%r15d, %edx
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	_memset
	leaq	56(%rbx), %rdi
	movq	-3200(%rbp), %r8                ## 8-byte Reload
	movq	-3184(%rbp), %rcx               ## 8-byte Reload
	subq	%rcx, %r8
	shrq	$2, %r8
	movq	40(%rbx), %r9
	movl	48(%rbx), %r10d
	movq	-3144(%rbp), %rax               ## 8-byte Reload
	shll	$2, %eax
	subq	$8, %rsp
	movq	-3152(%rbp), %r14               ## 8-byte Reload
	movl	%r14d, %esi
	movl	%r15d, %edx
                                        ## kill: def $r8d killed $r8d killed $r8
	pushq	$0
	pushq	%rax
	pushq	-3224(%rbp)                     ## 8-byte Folded Reload
	pushq	32(%rbx)
	pushq	%r10
	callq	_jpg_decode_data
	addq	$48, %rsp
	movl	52(%rbx), %edi
	movl	-3156(%rbp), %esi
	movl	16(%rbx), %ecx
	movq	40(%rbx), %r8
	movl	48(%rbx), %r9d
	subq	$8, %rsp
	leaq	-3120(%rbp), %rax
	movq	-3168(%rbp), %rdx               ## 8-byte Reload
	pushq	-3232(%rbp)                     ## 8-byte Folded Reload
	pushq	-3192(%rbp)                     ## 8-byte Folded Reload
	pushq	%rax
	pushq	%r15
	pushq	%r14
LBB0_43:
	callq	_kempf_restore_buf
	addq	$48, %rsp
	jmp	LBB0_25
LBB0_44:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_kempf_decode_tile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kempf_decode_tile
_kempf_decode_tile:                     ; @kempf_decode_tile
	.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, #3184
	mov	x8, x1
Lloh0:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	stur	x9, [x29, #-96]
	ldp	w1, w9, [x0]
	madd	w10, w9, w1, w9
	str	w10, [sp, #80]
	subs	w25, w4, #1
	b.gt	LBB0_2
LBB0_1:
Lloh3:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_22
LBB0_2:
	mov	x26, x4
	mov	x24, x3
	mov	x21, x2
	mov	x22, x0
	ldr	x10, [x0, #8]
	mul	w8, w1, w8
	add	w11, w8, w8, lsl #1
	add	x10, x10, w11, sxtw #2
	mul	w9, w9, w2
	ldp	w11, w12, [x0, #16]
	mul	w9, w9, w11
	add	x19, x10, w9, sxtw #2
	sub	w0, w12, w8
	bl	_FFMIN
	mov	x20, x0
	ldr	w8, [x22, #24]
	ldr	w1, [x22, #4]
	msub	w0, w1, w21, w8
	bl	_FFMIN
	mov	x21, x0
	mov	x23, x24
	ldr	w8, [x23], #4
	cmp	w8, #31
	b.hi	LBB0_9
; %bb.3:
	add	x0, sp, #84
	mov	x1, x23
	mov	w2, #3
	bl	_memcpy
	cmp	w21, #1
	b.lt	LBB0_21
; %bb.4:
	mov	w24, #0
	mov	w25, w20
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w24, w24, #1
	ldrsw	x8, [x22, #16]
	add	x19, x19, x8, lsl #2
	cmp	w24, w21
	b.eq	LBB0_21
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	cmp	w20, #1
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x26, x25
	mov	x23, x19
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x1, sp, #84
	mov	x0, x23
	mov	w2, #3
	bl	_memcpy
	add	x23, x23, #12
	subs	x26, x26, #1
	b.ne	LBB0_8
	b	LBB0_5
LBB0_9:
	asr	w28, w8, #5
	cmp	w28, #1
	b.ne	LBB0_11
; %bb.10:
	add	x0, x22, #56
	ldr	w6, [x22, #16]
	str	wzr, [sp, #8]
	str	xzr, [sp]
	mov	x1, x20
	mov	x2, x21
	mov	x3, x23
	mov	x4, x25
	mov	x5, x19
	mov	x7, #0
	bl	_jpg_decode_data
	b	LBB0_22
LBB0_11:
	add	x27, x24, w26, sxtw #2
	cmp	w28, #2
	b.eq	LBB0_13
; %bb.12:
	add	x0, sp, #84
	mov	x1, x23
	mov	w2, #3
	bl	_memcpy
	add	x23, x24, #16
LBB0_13:
	ldr	w26, [x23], #4
	add	w25, w26, #1
	sub	x8, x27, x23
	add	w9, w25, w25, lsl #1
	sxtw	x24, w9
	cmp	x24, x8, asr #2
	b.gt	LBB0_1
; %bb.14:
	str	x27, [sp, #72]                  ; 8-byte Folded Spill
	add	x0, sp, #96
	mov	x1, x23
	mov	x2, x24
	bl	_memcpy
	add	x24, x23, x24, lsl #2
	mov	w27, #-1
	cmp	w28, #2
	b.eq	LBB0_20
; %bb.15:
	tbnz	w26, #31, LBB0_20
; %bb.16:
	mov	x27, #0
	add	x23, sp, #96
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #84
	mov	x0, x23
	mov	w2, #3
	bl	_memcmp
	cbz	w0, LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	add	x27, x27, #1
	add	x23, x23, #12
	cmp	x25, x27
	b.ne	LBB0_17
; %bb.19:
	mov	w27, #-1
LBB0_20:
	ldr	x9, [sp, #72]                   ; 8-byte Folded Reload
	sub	x8, x9, x24
	cmp	x8, #8
	b.ge	LBB0_24
LBB0_21:
	mov	w0, #0
LBB0_22:
	ldur	x8, [x29, #-96]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_41
; %bb.23:
	add	sp, sp, #3184
	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_24:
	add	x23, x24, #8
	sub	x8, x9, x23
	cmp	w28, #2
	ldp	w9, w10, [x24]
	orr	w24, w10, w9, lsl #8
	cinc	w9, w24, ne
	sxtw	x9, w9
	cmp	x9, x8, asr #2
	b.gt	LBB0_1
; %bb.25:
	ldr	w0, [x22, #52]
	add	x1, sp, #80
	mov	x2, x23
	mov	x3, x24
	bl	_uncompress
	cbnz	w0, LBB0_1
; %bb.26:
	cmp	w28, #2
	b.ne	LBB0_28
; %bb.27:
	ldr	w0, [x22, #52]
	ldr	w1, [sp, #80]
	ldr	w3, [x22, #16]
	stp	w25, w27, [sp, #8]
	add	x8, sp, #96
	str	x8, [sp]
	mov	x2, x19
	mov	x4, #0
	mov	w5, #0
	b	LBB0_40
LBB0_28:
	add	x9, x23, w24, sxtw #2
	ldr	w8, [x9], #4
	str	x9, [sp, #48]                   ; 8-byte Folded Spill
	add	w8, w8, #1
	str	w8, [sp, #64]                   ; 4-byte Folded Spill
	mov	x0, x20
	mov	w1, #16
	bl	_FFALIGN
	asr	w26, w0, #3
	mov	x0, x21
	mov	w1, #16
	bl	_FFALIGN
	cmp	w0, #16
	b.lt	LBB0_39
; %bb.29:
	mov	x28, #0
	str	xzr, [sp, #40]                  ; 8-byte Folded Spill
	mov	w24, #0
	str	wzr, [sp, #68]                  ; 4-byte Folded Spill
                                        ; implicit-def: $w23
	sbfiz	x8, x26, #2, #32
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
	sbfiz	x8, x26, #3, #32
	stp	x8, x26, [sp, #16]              ; 16-byte Folded Spill
	b	LBB0_31
LBB0_30:                                ;   in Loop: Header=BB0_31 Depth=1
	ldr	x26, [sp, #40]                  ; 8-byte Folded Reload
	add	x26, x26, #1
	mov	x0, x21
	mov	w1, #16
	bl	_FFALIGN
	asr	w8, w0, #4
	ldr	x28, [sp, #32]                  ; 8-byte Folded Reload
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	add	x28, x28, x9
	str	x26, [sp, #40]                  ; 8-byte Folded Spill
	cmp	x26, w8, sxtw
	ldr	x26, [sp, #24]                  ; 8-byte Folded Reload
	b.ge	LBB0_39
LBB0_31:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_33 Depth 2
	mov	x0, x20
	mov	w1, #16
	bl	_FFALIGN
	cmp	w0, #16
	str	x28, [sp, #32]                  ; 8-byte Folded Spill
	b.lt	LBB0_30
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=1
	mov	x26, #0
LBB0_33:                                ;   Parent Loop BB0_31 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbz	w24, LBB0_35
; %bb.34:                               ;   in Loop: Header=BB0_33 Depth=2
	ldr	w10, [sp, #68]                  ; 4-byte Folded Reload
	b	LBB0_37
LBB0_35:                                ;   in Loop: Header=BB0_33 Depth=2
	ldr	x8, [sp, #72]                   ; 8-byte Folded Reload
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	cmp	x9, x8
	ldr	w10, [sp, #68]                  ; 4-byte Folded Reload
	b.hs	LBB0_1
; %bb.36:                               ;   in Loop: Header=BB0_33 Depth=2
	mov	x8, x9
	ldr	w23, [x8], #4
	str	x8, [sp, #48]                   ; 8-byte Folded Spill
	mov	w24, #8
LBB0_37:                                ;   in Loop: Header=BB0_33 Depth=2
	and	w8, w23, #0x1
	add	w10, w8, w10
	ldr	w9, [sp, #64]                   ; 4-byte Folded Reload
	cmp	w10, w9
	b.gt	LBB0_1
; %bb.38:                               ;   in Loop: Header=BB0_33 Depth=2
	str	w10, [sp, #68]                  ; 4-byte Folded Spill
	ldr	x9, [x22, #32]
	asr	w23, w23, #1
	sub	w24, w24, #1
	ldr	x10, [sp, #56]                  ; 8-byte Folded Reload
	add	x10, x9, x10
	add	x10, x10, x28
	stp	w8, w8, [x10]
	add	x9, x9, x28
	stp	w8, w8, [x9]
	add	x26, x26, #1
	mov	x0, x20
	mov	w1, #16
	bl	_FFALIGN
	asr	w8, w0, #4
	add	x28, x28, #8
	cmp	x26, w8, sxtw
	b.lt	LBB0_33
	b	LBB0_30
LBB0_39:
	ldr	x0, [x22, #40]
	ldr	w8, [x22, #48]
	mul	w2, w8, w21
	mov	w1, #0
	bl	_memset
	add	x0, x22, #56
	ldr	x8, [sp, #72]                   ; 8-byte Folded Reload
	ldr	x3, [sp, #48]                   ; 8-byte Folded Reload
	sub	x8, x8, x3
	lsr	x4, x8, #2
	ldr	w6, [x22, #48]
	ldp	x7, x5, [x22, #32]
	ldr	w8, [sp, #64]                   ; 4-byte Folded Reload
	lsl	w8, w8, #2
	stp	w8, wzr, [sp, #4]
	str	w26, [sp]
	mov	x1, x20
	mov	x2, x21
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_jpg_decode_data
	ldr	w1, [sp, #80]
	ldr	w3, [x22, #16]
	ldr	x4, [x22, #40]
	ldp	w5, w0, [x22, #48]
	stp	w25, w27, [sp, #8]
	add	x8, sp, #96
	str	x8, [sp]
	mov	x2, x19
LBB0_40:
	mov	x6, x20
	mov	x7, x21
	bl	_kempf_restore_buf
	b	LBB0_21
LBB0_41:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_kempf_decode_tile
.subsections_via_symbols
