	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vorbis_staticbook_unpack       ## -- Begin function vorbis_staticbook_unpack
	.p2align	4, 0x90
_vorbis_staticbook_unpack:              ## @vorbis_staticbook_unpack
	.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	%rsi, %r12
	movq	%rdi, %r14
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	%r14, %rdi
	movl	$24, %esi
	callq	_oggpack_read
	cmpl	$5653314, %eax                  ## imm = 0x564342
	jne	LBB0_37
## %bb.1:
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_oggpack_read
	movl	%eax, (%r12)
	movq	%r14, %rdi
	movl	$24, %esi
	callq	_oggpack_read
	movl	%eax, 4(%r12)
	cmpl	$-1, %eax
	je	LBB0_37
## %bb.2:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_oggpack_read
	cmpl	$1, %eax
	je	LBB0_16
## %bb.3:
	movl	%eax, %ecx
	movl	$-1, %eax
	testl	%ecx, %ecx
	jne	LBB0_38
## %bb.4:
	movl	4(%r12), %edi
	shll	$3, %edi
	callq	__ogg_malloc
	movq	%rax, 8(%r12)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_oggpack_read
	movl	4(%r12), %ecx
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	testl	%ecx, %ecx
	jle	LBB0_25
## %bb.6:
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r12), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	movslq	4(%r12), %rax
	cmpq	%rax, %rbx
	jge	LBB0_25
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_oggpack_read
	testl	%eax, %eax
	je	LBB0_8
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_oggpack_read
	cmpl	$-1, %eax
	je	LBB0_37
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	cltq
	incq	%rax
	jmp	LBB0_15
LBB0_16:
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_oggpack_read
	movl	%eax, %r15d
	movl	4(%r12), %edi
	shll	$3, %edi
	callq	__ogg_malloc
	movq	%rax, 8(%r12)
	movslq	4(%r12), %rdi
	testq	%rdi, %rdi
	jle	LBB0_25
## %bb.17:
	incl	%r15d
	movslq	%r15d, %r15
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_18 Depth=1
	incq	%r15
	movslq	4(%r12), %rdi
	cmpq	%rdi, %rbx
	jge	LBB0_25
LBB0_18:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_21 Depth 2
	subq	%rbx, %rdi
	callq	__ilog
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_oggpack_read
	cmpl	$-1, %eax
	je	LBB0_37
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	testl	%eax, %eax
	jle	LBB0_24
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	cltq
	movslq	4(%r12), %rdx
	leaq	(%rbx,%rax), %rcx
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_18 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rdx, %rbx
	jge	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=2
	movq	8(%r12), %rsi
	movq	%r15, (%rsi,%rbx,8)
	incq	%rbx
	decq	%rax
	jne	LBB0_21
## %bb.23:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%rcx, %rbx
	jmp	LBB0_24
LBB0_9:
	testl	%ecx, %ecx
	jle	LBB0_25
## %bb.10:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_oggpack_read
	cmpl	$-1, %eax
	je	LBB0_37
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cltq
	incq	%rax
	movq	8(%r12), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	movslq	4(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_11
LBB0_25:
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_oggpack_read
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, 16(%r12)
	leal	-1(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_26
## %bb.27:
	movq	%r14, %rdi
	movl	$32, %esi
	callq	_oggpack_read
	movl	%eax, 20(%r12)
	movq	%r14, %rdi
	movl	$32, %esi
	callq	_oggpack_read
	movl	%eax, 24(%r12)
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_oggpack_read
	incl	%eax
	movl	%eax, 28(%r12)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_oggpack_read
	movl	%eax, 32(%r12)
	movl	16(%r12), %eax
	cmpl	$2, %eax
	je	LBB0_30
## %bb.28:
	xorl	%r15d, %r15d
	cmpl	$1, %eax
	jne	LBB0_31
## %bb.29:
	movq	%r12, %rdi
	callq	__book_maptype1_quantvals
	movl	%eax, %r15d
	jmp	LBB0_31
LBB0_26:
	testl	%eax, %eax
	jne	LBB0_37
	jmp	LBB0_38
LBB0_30:
	movl	(%r12), %r15d
	imull	4(%r12), %r15d
LBB0_31:
	movslq	%r15d, %r13
	leal	(,%r13,8), %edi
	callq	__ogg_malloc
	movq	%rax, 40(%r12)
	testl	%r13d, %r13d
	jle	LBB0_32
## %bb.33:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_34:                                ## =>This Inner Loop Header: Depth=1
	movl	28(%r12), %esi
	movq	%r14, %rdi
	callq	_oggpack_read
	cltq
	movq	40(%r12), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_34
	jmp	LBB0_35
LBB0_32:
	movq	%rax, %rcx
LBB0_35:
	xorl	%eax, %eax
	testl	%r15d, %r15d
	je	LBB0_38
## %bb.36:
	cmpq	$-1, -8(%rcx,%r13,8)
	jne	LBB0_38
LBB0_37:
	movq	%r12, %rdi
	callq	_vorbis_staticbook_clear
	movl	$-1, %eax
LBB0_38:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vorbis_staticbook_unpack       ; -- Begin function vorbis_staticbook_unpack
	.p2align	2
_vorbis_staticbook_unpack:              ; @vorbis_staticbook_unpack
	.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
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	mov	x0, x20
	mov	w1, #24
	bl	_oggpack_read
	sub	w8, w0, #1380, lsl #12          ; =5652480
	cmp	w8, #834
	b.ne	LBB0_41
; %bb.1:
	mov	x0, x20
	mov	w1, #16
	bl	_oggpack_read
	str	w0, [x19]
	mov	x0, x20
	mov	w1, #24
	bl	_oggpack_read
	str	w0, [x19, #4]
	cmn	w0, #1
	b.eq	LBB0_41
; %bb.2:
	mov	x0, x20
	mov	w1, #1
	bl	_oggpack_read
	cmp	w0, #1
	b.eq	LBB0_12
; %bb.3:
	cbnz	w0, LBB0_42
; %bb.4:
	ldr	w8, [x19, #4]
	lsl	w0, w8, #3
	bl	__ogg_malloc
	str	x0, [x19, #8]
	mov	x0, x20
	mov	w1, #1
	bl	_oggpack_read
	ldr	w8, [x19, #4]
	cmp	w8, #1
	cbz	w0, LBB0_24
; %bb.5:
	b.lt	LBB0_28
; %bb.6:
	mov	x21, #0
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x8, #0
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x9, [x19, #8]
	str	x8, [x9, x21, lsl #3]
	add	x21, x21, #1
	ldrsw	x8, [x19, #4]
	cmp	x21, x8
	b.ge	LBB0_28
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #1
	bl	_oggpack_read
	cbz	w0, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x20
	mov	w1, #5
	bl	_oggpack_read
                                        ; kill: def $w0 killed $w0 def $x0
	cmn	w0, #1
	b.eq	LBB0_41
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	sxtw	x8, w0
	add	x8, x8, #1
	b	LBB0_8
LBB0_12:
	mov	x0, x20
	mov	w1, #5
	bl	_oggpack_read
	mov	x21, x0
	ldr	w8, [x19, #4]
	lsl	w0, w8, #3
	bl	__ogg_malloc
	str	x0, [x19, #8]
	ldrsw	x8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_28
; %bb.13:
	mov	x22, #0
	add	w9, w21, #1
	sxtw	x21, w9
	mov	w23, #4
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19, #4]
	cmp	x22, x8
	b.ge	LBB0_28
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
                                        ;     Child Loop BB0_22 Depth 2
	sub	x0, x8, x22
	bl	__ilog
	mov	x1, x0
	mov	x0, x20
	bl	_oggpack_read
                                        ; kill: def $w0 killed $w0 def $x0
	cmn	w0, #1
	b.eq	LBB0_41
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	sxtw	x8, w0
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldrsw	x9, [x19, #4]
	cmp	x22, x9
	csel	x9, x22, x9, gt
	sub	x10, x8, #1
	sub	x11, x9, x22
	cmp	x11, x10
	csel	x10, x11, x10, lo
	add	x10, x10, #1
	cmp	x10, #5
	b.hs	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x10, #0
	mov	x11, x22
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_15 Depth=1
	ands	x11, x10, #0x3
	csel	x11, x23, x11, eq
	sub	x10, x10, x11
	add	x11, x22, x10
	ldr	x12, [x19, #8]
	add	x12, x12, x22, lsl #3
	add	x12, x12, #16
	mov	x13, x10
LBB0_20:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	stp	x21, x21, [x12, #-16]
	stp	x21, x21, [x12], #32
	subs	x13, x13, #4
	b.ne	LBB0_20
LBB0_21:                                ;   in Loop: Header=BB0_15 Depth=1
	sub	x9, x9, x10
	sub	x9, x9, x22
	sub	x8, x8, x10
	mov	x22, x11
LBB0_22:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbz	x9, LBB0_14
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=2
	ldr	x10, [x19, #8]
	str	x21, [x10, x22, lsl #3]
	add	x22, x22, #1
	sub	x9, x9, #1
	subs	x8, x8, #1
	b.ne	LBB0_22
	b	LBB0_14
LBB0_24:
	b.lt	LBB0_28
; %bb.25:
	mov	x21, #0
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #5
	bl	_oggpack_read
                                        ; kill: def $w0 killed $w0 def $x0
	cmn	w0, #1
	b.eq	LBB0_41
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	sxtw	x8, w0
	add	x8, x8, #1
	ldr	x9, [x19, #8]
	str	x8, [x9, x21, lsl #3]
	add	x21, x21, #1
	ldrsw	x8, [x19, #4]
	cmp	x21, x8
	b.lt	LBB0_26
LBB0_28:
	mov	x0, x20
	mov	w1, #4
	bl	_oggpack_read
	str	w0, [x19, #16]
	sub	w8, w0, #1
	cmp	w8, #2
	b.hs	LBB0_32
; %bb.29:
	mov	x0, x20
	mov	w1, #32
	bl	_oggpack_read
	str	w0, [x19, #20]
	mov	x0, x20
	mov	w1, #32
	bl	_oggpack_read
	str	w0, [x19, #24]
	mov	x0, x20
	mov	w1, #4
	bl	_oggpack_read
	add	w8, w0, #1
	str	w8, [x19, #28]
	mov	x0, x20
	mov	w1, #1
	bl	_oggpack_read
	str	w0, [x19, #32]
	ldr	w8, [x19, #16]
	cmp	w8, #2
	b.eq	LBB0_33
; %bb.30:
	cmp	w8, #1
	b.ne	LBB0_34
; %bb.31:
	mov	x0, x19
	bl	__book_maptype1_quantvals
	mov	x21, x0
	b	LBB0_35
LBB0_32:
	cbnz	w0, LBB0_41
	b	LBB0_43
LBB0_33:
	ldp	w9, w8, [x19]
	mul	w21, w9, w8
	b	LBB0_35
LBB0_34:
	mov	w21, #0
LBB0_35:
	sxtw	x22, w21
	lsl	w0, w21, #3
	bl	__ogg_malloc
	str	x0, [x19, #40]
	cmp	w21, #1
	b.lt	LBB0_38
; %bb.36:
	mov	x21, #0
LBB0_37:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19, #28]
	mov	x0, x20
	bl	_oggpack_read
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	ldr	x0, [x19, #40]
	str	x8, [x0, x21, lsl #3]
	add	x21, x21, #1
	cmp	x22, x21
	b.ne	LBB0_37
LBB0_38:
	cbz	w22, LBB0_40
; %bb.39:
	sub	w8, w22, #1
	ldr	x8, [x0, w8, sxtw #3]
	cmn	x8, #1
	b.eq	LBB0_41
LBB0_40:
	mov	w0, #0
	b	LBB0_43
LBB0_41:
	mov	x0, x19
	bl	_vorbis_staticbook_clear
LBB0_42:
	mov	w0, #-1
LBB0_43:
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
