	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flashsv_decode_block
_flashsv_decode_block:                  ## @flashsv_decode_block
	.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
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r13d
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	(%rdi), %r12
	movq	48(%r12), %rbx
	leaq	24(%r12), %r14
	movq	%r14, %rdi
	callq	_inflateReset
	movq	_Z_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.2:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	cmpq	$0, 104(%r12)
	movslq	32(%rbp), %r15
	jne	LBB0_4
## %bb.3:
	cmpq	$0, 96(%r12)
	je	LBB0_6
LBB0_4:
	movq	72(%r12), %rax
	movq	%r15, %rcx
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %rsi
	movl	(%rax,%rcx), %edx
	movq	%r12, %rdi
	callq	_flashsv2_prime
	testl	%eax, %eax
	js	LBB0_5
LBB0_6:
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r15
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_bits_count
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rax
	addq	%r15, %rax
	movq	%rax, 40(%r12)
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, 24(%r12)
	movq	48(%r12), %rax
	movq	%rax, 32(%r12)
	movl	(%r12), %eax
	leal	(%rax,%rax,2), %eax
	movl	%eax, 28(%r12)
	movq	_Z_FINISH@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_inflate
	movq	_Z_DATA_ERROR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	movq	%r14, %rdi
	callq	_inflateSync
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_inflate
LBB0_8:
	movl	24(%rbp), %r14d
	cmpq	$0, 88(%r12)
	je	LBB0_10
## %bb.9:
	movq	80(%r12), %r15
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_bits_count
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rax
	addq	%r15, %rax
	movq	72(%r12), %rcx
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	shlq	$4, %rdx
	movq	%rax, 8(%rcx,%rdx)
	movl	%r13d, (%rcx,%rdx)
LBB0_10:
	movl	16(%rbp), %r8d
	addl	64(%r12), %r14d
	cmpl	$0, 56(%r12)
	je	LBB0_11
## %bb.15:
	movq	48(%r12), %rdi
	movq	32(%r12), %rsi
	movq	16(%r12), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	(%rax), %rdx
	notl	%r14d
	addl	8(%r12), %r14d
	movl	4(%r12), %r9d
	movl	12(%r12), %eax
	subl	%r9d, %r14d
	movl	(%rcx), %ebx
	subq	$8, %rsp
	movl	%r14d, %ecx
                                        ## kill: def $r8d killed $r8d killed $r8
	pushq	%rax
	pushq	%rbx
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	_decode_hybrid
	addq	$32, %rsp
	testl	%eax, %eax
	jns	LBB0_14
## %bb.16:
	movl	%eax, %r13d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_17
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_17
LBB0_5:
	movl	%eax, %r13d
	jmp	LBB0_17
LBB0_11:
	cmpl	$0, 4(%r12)
	jle	LBB0_14
## %bb.12:
	leal	(%r8,%r8,2), %eax
	cltq
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%rax,2), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movslq	%eax, %r15
	notl	%r14d
	shlq	$2, %r15
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	(%rax), %rax
	addq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	movl	8(%r12), %edx
	addl	%r14d, %edx
	movslq	(%rcx), %rcx
	movslq	%edx, %rdi
	imulq	%rcx, %rdi
	addq	%rax, %rdi
	movq	%rbx, %rsi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
	incl	%r13d
	decl	%r14d
	addq	%r15, %rbx
	cmpl	4(%r12), %r13d
	jl	LBB0_13
LBB0_14:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	shll	$3, %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_skip_bits_long
	xorl	%r13d, %r13d
LBB0_17:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Z_OK,4,2                       ## @Z_OK
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Inflate reset error: %d\n"

	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.comm	_Z_FINISH,4,2                   ## @Z_FINISH
	.comm	_Z_DATA_ERROR,4,2               ## @Z_DATA_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Zlib resync occurred\n"

	.comm	_Z_STREAM_END,4,2               ## @Z_STREAM_END
L_.str.2:                               ## @.str.2
	.asciz	"decode_hybrid failed\n"

	.no_dead_strip	_flashsv_decode_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flashsv_decode_block
_flashsv_decode_block:                  ; @flashsv_decode_block
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x26, x7
	mov	x25, x6
	mov	x24, x4
	mov	x20, x3
	mov	x19, x2
	mov	x28, x1
	mov	x23, x0
	ldr	x21, [x0]
	ldr	x22, [x21, #48]
	add	x27, x21, #24
	mov	x0, x27
	bl	_inflateReset
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _Z_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Z_OK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_11
; %bb.1:
	stp	w25, w24, [sp, #8]              ; 8-byte Folded Spill
	ldr	w25, [x29, #16]
	ldr	x8, [x21, #104]
	cbnz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x21, #96]
	cbz	x8, LBB0_4
LBB0_3:
	ldr	x8, [x21, #72]
	add	x8, x8, w25, sxtw #4
	ldr	x1, [x8, #8]
	ldr	w2, [x8]
	mov	x0, x21
	bl	_flashsv2_prime
	tbnz	w0, #31, LBB0_12
LBB0_4:
	ldr	x24, [x28]
	mov	x0, x19
	bl	_get_bits_count
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #3
	add	x8, x24, w8, sxtw
	ldr	x9, [x21, #48]
	stp	x9, x8, [x21, #32]
	ldr	w8, [x21]
	add	w8, w8, w8, lsl #1
	stp	w20, w8, [x21, #24]
Lloh3:
	adrp	x24, _Z_FINISH@GOTPAGE
Lloh4:
	ldr	x24, [x24, _Z_FINISH@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x27
	bl	_inflate
Lloh5:
	adrp	x8, _Z_DATA_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _Z_DATA_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.5:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_av_log
	mov	x0, x27
	bl	_inflateSync
	ldr	w1, [x24]
	mov	x0, x27
	bl	_inflate
LBB0_6:
	ldr	x8, [x21, #88]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	x24, [x21, #80]
	mov	x0, x19
	bl	_get_bits_count
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #3
	add	x8, x24, w8, sxtw
	ldr	x9, [x21, #72]
	add	x9, x9, w25, sxtw #4
	str	x8, [x9, #8]
	str	w20, [x9]
LBB0_8:
	ldr	w8, [x21, #64]
	ldr	w9, [x21, #56]
	cbz	w9, LBB0_13
; %bb.9:
	ldr	x0, [x21, #48]
	ldr	x1, [x21, #32]
	ldr	x9, [x21, #16]
	ldp	x9, x10, [x9]
	ldr	x2, [x10]
	ldp	w5, w10, [x21, #4]
	add	w8, w8, w26
	mvn	w8, w8
	add	w8, w10, w8
	sub	w3, w8, w5
	ldr	w7, [x9]
	ldr	w8, [x21, #12]
	str	w8, [sp]
	ldp	w4, w6, [sp, #8]                ; 8-byte Folded Reload
	bl	_decode_hybrid
	tbz	w0, #31, LBB0_16
; %bb.10:
	mov	x24, 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.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_av_log
	b	LBB0_17
LBB0_11:
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	bl	_av_log
Lloh23:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh25:
	ldr	w24, [x8]
	b	LBB0_17
LBB0_12:
	mov	x24, x0
	b	LBB0_17
LBB0_13:
	ldr	w9, [x21, #4]
	cmp	w9, #1
	b.lt	LBB0_16
; %bb.14:
	mov	w24, #0
	ldr	w9, [sp, #8]                    ; 4-byte Folded Reload
	add	w9, w9, w9, lsl #1
	sxtw	x25, w9
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	add	w23, w9, w9, lsl #1
	add	w8, w26, w8
	mvn	w26, w8
	sbfiz	x27, x23, #2, #32
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #16]
	ldp	x8, x9, [x8]
	ldr	x9, [x9]
	add	x9, x9, x25
	ldr	w10, [x21, #8]
	add	w10, w26, w10
	ldrsw	x8, [x8]
	sxtw	x10, w10
	madd	x0, x8, x10, x9
	mov	x1, x22
	mov	x2, x23
	bl	_memcpy
	ldr	w8, [x21, #4]
	add	w24, w24, #1
	sub	w26, w26, #1
	add	x22, x22, x27
	cmp	w24, w8
	b.lt	LBB0_15
LBB0_16:
	lsl	w1, w20, #3
	mov	x0, x19
	bl	_skip_bits_long
	mov	w24, #0
LBB0_17:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_Z_OK,4,2                       ; @Z_OK
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Inflate reset error: %d\n"

	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.comm	_Z_FINISH,4,2                   ; @Z_FINISH
	.comm	_Z_DATA_ERROR,4,2               ; @Z_DATA_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Zlib resync occurred\n"

	.comm	_Z_STREAM_END,4,2               ; @Z_STREAM_END
l_.str.2:                               ; @.str.2
	.asciz	"decode_hybrid failed\n"

	.no_dead_strip	_flashsv_decode_block
.subsections_via_symbols
