	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smacker_decode_bigtree
_smacker_decode_bigtree:                ## @smacker_decode_bigtree
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SMKTREE_DECODE_BIG_MAX_RECURSION@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jge	LBB0_3
## %bb.1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_2
LBB0_3:
	movq	%rsi, %r12
	movq	(%rsi), %rax
	incq	%rax
	cmpq	8(%rsi), %rax
	jge	LBB0_4
## %bb.5:
	movl	%ecx, %r13d
	movq	%rdx, %r14
	movq	%rdi, %r15
	callq	_get_bits1
	testl	%eax, %eax
	je	LBB0_6
## %bb.21:
	movq	(%r12), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leaq	1(%rcx), %rax
	movq	%rax, (%r12)
	incl	%r13d
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	movl	%r13d, %ecx
	callq	_smacker_decode_bigtree
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_25
## %bb.22:
	movq	_SMK_NODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%ebx, %eax
	movq	16(%r12), %rcx
	movslq	-48(%rbp), %rdx                 ## 4-byte Folded Reload
	movl	%eax, (%rcx,%rdx,4)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	movl	%r13d, %ecx
	callq	_smacker_decode_bigtree
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_23
## %bb.24:
	addl	%eax, %ebx
	incl	%ebx
	jmp	LBB0_25
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_2:
	xorl	%edi, %edi
	callq	_av_log
LBB0_12:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_25:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	40(%r14), %rax
	movq	(%rax), %rsi
	xorl	%r13d, %r13d
	movl	$0, %ebx
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.7:
	movq	_SMKTREE_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$3, %ecx
	callq	_get_vlc2
	movl	%eax, %ebx
LBB0_8:
	movq	32(%r14), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.9:
	movq	_SMKTREE_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$3, %ecx
	callq	_get_vlc2
	movl	%eax, %r13d
LBB0_10:
	testl	%ebx, %ebx
	js	LBB0_12
## %bb.11:
	testl	%r13d, %r13d
	js	LBB0_12
## %bb.13:
	movl	%ebx, %ecx
	movq	(%r14), %rdx
	movq	8(%r14), %rax
	movl	%r13d, %esi
	movl	(%rax,%rsi,4), %eax
	shll	$8, %eax
	orl	(%rdx,%rcx,4), %eax
	movq	16(%r14), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_15
## %bb.14:
	movq	(%r12), %rax
	movq	24(%r14), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_19
LBB0_23:
	movl	%eax, %ebx
	jmp	LBB0_25
LBB0_15:
	cmpl	4(%rcx), %eax
	jne	LBB0_17
## %bb.16:
	movq	(%r12), %rax
	movq	24(%r14), %rcx
	movq	%rax, 8(%rcx)
	jmp	LBB0_19
LBB0_17:
	cmpl	8(%rcx), %eax
	jne	LBB0_20
## %bb.18:
	movq	(%r12), %rax
	movq	24(%r14), %rcx
	movq	%rax, 16(%rcx)
LBB0_19:
	xorl	%eax, %eax
LBB0_20:
	movq	(%r12), %rcx
	movq	16(%r12), %rdx
	leaq	1(%rcx), %rsi
	movq	%rsi, (%r12)
	movl	%eax, (%rdx,%rcx,4)
	movl	$1, %ebx
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_SMKTREE_DECODE_BIG_MAX_RECURSION,4,2 ## @SMKTREE_DECODE_BIG_MAX_RECURSION
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Maximum bigtree recursion level exceeded.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Tree size exceeded!\n"

	.comm	_SMKTREE_BITS,4,2               ## @SMKTREE_BITS
	.comm	_SMK_NODE,4,2                   ## @SMK_NODE
	.no_dead_strip	_smacker_decode_bigtree
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smacker_decode_bigtree
_smacker_decode_bigtree:                ; @smacker_decode_bigtree
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _SMKTREE_DECODE_BIG_MAX_RECURSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMKTREE_DECODE_BIG_MAX_RECURSION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w3
	b.ge	LBB0_2
; %bb.1:
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
	b	LBB0_7
LBB0_2:
	mov	x19, x1
	ldp	x8, x9, [x1]
	add	x8, x8, #1
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.3:
	mov	x22, x3
	mov	x20, x2
	mov	x21, x0
	bl	_get_bits1
	cbz	w0, LBB0_10
; %bb.4:
	ldr	x24, [x19]
	add	x8, x24, #1
	str	x8, [x19]
	add	w23, w22, #1
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	mov	x3, x23
	bl	_smacker_decode_bigtree
	mov	x22, x0
	tbnz	w0, #31, LBB0_9
; %bb.5:
Lloh8:
	adrp	x8, _SMK_NODE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SMK_NODE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w8, w8, w22
	ldr	x9, [x19, #16]
	sbfiz	x10, x24, #2, #32
	str	w8, [x9, x10]
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	mov	x3, x23
	bl	_smacker_decode_bigtree
	add	w8, w22, w0
	tst	w0, #0x80000000
	csinc	w22, w0, w8, ne
	b	LBB0_9
LBB0_6:
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_7:
	mov	x0, #0
	bl	_av_log
LBB0_8:
Lloh16:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh18:
	ldr	w22, [x8]
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldr	x8, [x20, #40]
	ldr	x1, [x8]
Lloh19:
	adrp	x23, _SMKTREE_BITS@GOTPAGE
Lloh20:
	ldr	x23, [x23, _SMKTREE_BITS@GOTPAGEOFF]
	cbz	x1, LBB0_12
; %bb.11:
	ldr	w2, [x23]
	mov	x0, x21
	mov	w3, #3
	bl	_get_vlc2
	mov	x22, x0
	b	LBB0_13
LBB0_12:
	mov	w22, #0
LBB0_13:
	ldr	x8, [x20, #32]
	ldr	x1, [x8]
	cbz	x1, LBB0_15
; %bb.14:
	ldr	w2, [x23]
	mov	x0, x21
	mov	w3, #3
	bl	_get_vlc2
	tbz	w22, #31, LBB0_16
	b	LBB0_8
LBB0_15:
	mov	w0, #0
	tbnz	w22, #31, LBB0_8
LBB0_16:
	tbnz	w0, #31, LBB0_8
; %bb.17:
	ldp	x8, x9, [x20]
	ldr	w8, [x8, w22, uxtw #2]
	ldr	w9, [x9, w0, uxtw #2]
	orr	w8, w8, w9, lsl #8
	ldr	x9, [x20, #16]
	ldr	w10, [x9]
	cmp	w8, w10
	b.ne	LBB0_19
; %bb.18:
	mov	w8, #0
	ldr	x9, [x19]
	ldr	x10, [x20, #24]
	str	x9, [x10]
	b	LBB0_23
LBB0_19:
	ldr	w10, [x9, #4]
	cmp	w8, w10
	b.ne	LBB0_21
; %bb.20:
	mov	w8, #0
	ldr	x9, [x19]
	ldr	x10, [x20, #24]
	str	x9, [x10, #8]
	b	LBB0_23
LBB0_21:
	ldr	w9, [x9, #8]
	cmp	w8, w9
	b.ne	LBB0_23
; %bb.22:
	mov	w8, #0
	ldr	x9, [x19]
	ldr	x10, [x20, #24]
	str	x9, [x10, #16]
LBB0_23:
	ldr	x9, [x19, #16]
	ldr	x10, [x19]
	add	x11, x10, #1
	str	x11, [x19]
	str	w8, [x9, x10, lsl #2]
	mov	w22, #1
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SMKTREE_DECODE_BIG_MAX_RECURSION,4,2 ; @SMKTREE_DECODE_BIG_MAX_RECURSION
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Maximum bigtree recursion level exceeded.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Tree size exceeded!\n"

	.comm	_SMKTREE_BITS,4,2               ; @SMKTREE_BITS
	.comm	_SMK_NODE,4,2                   ; @SMK_NODE
	.no_dead_strip	_smacker_decode_bigtree
.subsections_via_symbols
