	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vorbis_staticbook_pack         ## -- Begin function vorbis_staticbook_pack
	.p2align	4, 0x90
_vorbis_staticbook_pack:                ## @vorbis_staticbook_pack
	.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, %r15
	movq	%rsi, %rdi
	movl	$5653314, %esi                  ## imm = 0x564342
	movl	$24, %edx
	callq	_oggpack_write
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	$16, %edx
	callq	_oggpack_write
	movl	4(%r15), %esi
	movq	%r12, %rdi
	movl	$24, %edx
	callq	_oggpack_write
	movslq	4(%r15), %rax
	movl	$1, %ecx
	cmpq	$2, %rax
	jl	LBB0_5
## %bb.1:
	movq	8(%r15), %rdx
	movl	(%rdx), %esi
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testl	%esi, %esi
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rdx,%rcx,4), %edi
	cmpl	%esi, %edi
	jl	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rcx
	movl	%edi, %esi
	cmpq	%rcx, %rax
	jne	LBB0_2
	jmp	LBB0_6
LBB0_5:
	cmpq	%rax, %rcx
	jne	LBB0_16
LBB0_6:
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_oggpack_write
	movq	8(%r15), %rax
	movl	(%rax), %esi
	decl	%esi
	movq	%r12, %rdi
	movl	$5, %edx
	callq	_oggpack_write
	movslq	4(%r15), %rdi
	movl	$1, %r13d
	xorl	%eax, %eax
	cmpq	$2, %rdi
	jl	LBB0_15
## %bb.7:
	movl	%edi, %ecx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	4(%r15), %ecx
	movq	%r13, %rax
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r13
	movslq	%ecx, %rdi
	cmpq	%rdi, %r13
	jge	LBB0_15
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movq	8(%r15), %rdx
	movl	-4(%rdx,%r13,4), %esi
	movl	(%rdx,%r13,4), %edx
	movl	%edx, %edi
	shll	$24, %edi
	movl	%esi, %ebx
	shll	$24, %ebx
	cmpl	%ebx, %edi
	jle	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movsbq	%sil, %rbx
	movsbq	%dl, %r14
	cmpq	%r14, %rbx
	jge	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%r13d, %r12d
	subl	%eax, %r12d
	movslq	%ecx, %rdi
	subq	%rax, %rdi
	callq	__ilog
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_oggpack_write
	leaq	1(%rbx), %rax
	cmpq	%r14, %rax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	notq	%rbx
	addq	%r14, %rbx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	4(%r15), %rdi
	subq	%r13, %rdi
	callq	__ilog
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_oggpack_write
	decq	%rbx
	jne	LBB0_12
	jmp	LBB0_13
LBB0_15:
	subl	%eax, %r13d
	subq	%rax, %rdi
	callq	__ilog
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_oggpack_write
	jmp	LBB0_30
LBB0_16:
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_oggpack_write
	movslq	4(%r15), %rax
	testq	%rax, %rax
	jle	LBB0_20
## %bb.17:
	movq	8(%r15), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rcx,%rbx,4)
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	incq	%rbx
	cmpq	%rbx, %rax
	jne	LBB0_18
	jmp	LBB0_21
LBB0_20:
	cmpq	%rax, %rbx
	jne	LBB0_24
LBB0_21:
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_oggpack_write
	cmpl	$0, 4(%r15)
	jle	LBB0_30
## %bb.22:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	decl	%esi
	movq	%r12, %rdi
	movl	$5, %edx
	callq	_oggpack_write
	incq	%rbx
	movslq	4(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_23
	jmp	LBB0_30
LBB0_24:
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_oggpack_write
	cmpl	$0, 4(%r15)
	jle	LBB0_30
## %bb.25:
	xorl	%ebx, %ebx
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_26 Depth=1
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_oggpack_write
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	decl	%esi
	movq	%r12, %rdi
	movl	$5, %edx
LBB0_29:                                ##   in Loop: Header=BB0_26 Depth=1
	callq	_oggpack_write
	incq	%rbx
	movslq	4(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_30
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	cmpl	$0, (%rax,%rbx,4)
	jne	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	jmp	LBB0_29
LBB0_30:
	movl	16(%r15), %esi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_oggpack_write
	movl	16(%r15), %ecx
	movl	$-1, %eax
	leal	-1(%rcx), %edx
	cmpl	$2, %edx
	jae	LBB0_31
## %bb.32:
	cmpq	$0, 40(%r15)
	je	LBB0_41
## %bb.33:
	movl	20(%r15), %esi
	movq	%r12, %rdi
	movl	$32, %edx
	callq	_oggpack_write
	movl	24(%r15), %esi
	movq	%r12, %rdi
	movl	$32, %edx
	callq	_oggpack_write
	movl	28(%r15), %esi
	decl	%esi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_oggpack_write
	movl	32(%r15), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_oggpack_write
	movl	16(%r15), %eax
	cmpl	$2, %eax
	je	LBB0_36
## %bb.34:
	cmpl	$1, %eax
	jne	LBB0_40
## %bb.35:
	movq	%r15, %rdi
	callq	__book_maptype1_quantvals
	testl	%eax, %eax
	jg	LBB0_38
	jmp	LBB0_40
LBB0_31:
	testl	%ecx, %ecx
	je	LBB0_40
	jmp	LBB0_41
LBB0_36:
	movl	(%r15), %eax
	imull	4(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_40
LBB0_38:
	movslq	%eax, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_39:                                ## =>This Inner Loop Header: Depth=1
	movq	40(%r15), %rax
	movl	(%rax,%rbx,4), %eax
	movl	%eax, %esi
	negl	%esi
	cmovsl	%eax, %esi
	movl	28(%r15), %edx
	movq	%r12, %rdi
	callq	_oggpack_write
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_39
LBB0_40:
	xorl	%eax, %eax
LBB0_41:
	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_pack         ; -- Begin function vorbis_staticbook_pack
	.p2align	2
_vorbis_staticbook_pack:                ; @vorbis_staticbook_pack
	.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, #17218
	movk	w1, #86, lsl #16
	mov	w2, #24
	bl	_oggpack_write
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #16
	bl	_oggpack_write
	ldr	w1, [x20, #4]
	mov	x0, x19
	mov	w2, #24
	bl	_oggpack_write
	ldrsw	x8, [x20, #4]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.1:
	ldr	x10, [x20, #8]
	ldr	w11, [x10]
	mov	w9, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w11, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w12, [x10, x9, lsl #2]
	cmp	w12, w11
	b.lt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	mov	x11, x12
	cmp	x8, x9
	b.ne	LBB0_2
	b	LBB0_7
LBB0_5:
	mov	w9, #1
LBB0_6:
	cmp	x9, x8
	b.ne	LBB0_15
LBB0_7:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_oggpack_write
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	sub	w1, w8, #1
	mov	x0, x19
	mov	w2, #5
	bl	_oggpack_write
	ldr	w9, [x20, #4]
	cmp	w9, #2
	b.lt	LBB0_19
; %bb.8:
	mov	x8, #0
	mov	w22, #1
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w9, [x20, #4]
	mov	x8, x22
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x22, x22, #1
	sxtw	x10, w9
	cmp	x22, x10
	b.ge	LBB0_20
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	ldr	x10, [x20, #8]
	add	x10, x10, x22, lsl #2
	ldp	w10, w11, [x10, #-4]
	lsl	w12, w11, #24
	cmp	w12, w10, lsl #24
	sxtb	x23, w10
	sxtb	x24, w11
	ccmp	x23, x24, #0, gt
	b.ge	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	sub	w21, w22, w8
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	sxtw	x9, w9
	sub	x0, x9, x8
	bl	__ilog
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_oggpack_write
	add	x8, x23, #1
	cmp	x8, x24
	b.eq	LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mvn	x8, x23
	add	x21, x8, x24
LBB0_14:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsw	x8, [x20, #4]
	sub	x0, x8, x22
	bl	__ilog
	mov	x2, x0
	mov	x0, x19
	mov	w1, #0
	bl	_oggpack_write
	subs	x21, x21, #1
	b.ne	LBB0_14
	b	LBB0_9
LBB0_15:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	bl	_oggpack_write
	ldrsw	x8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.16:
	mov	x9, #0
	ldr	x10, [x20, #8]
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x9, lsl #2]
	cbz	w11, LBB0_22
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_17
	b	LBB0_23
LBB0_19:
	mov	x8, #0
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	sxtw	x10, w9
	mov	w22, #1
LBB0_20:
	sub	w21, w22, w8
	sub	x0, x10, x8
	bl	__ilog
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_oggpack_write
	b	LBB0_32
LBB0_21:
	mov	x9, #0
LBB0_22:
	cmp	x9, x8
	b.ne	LBB0_26
LBB0_23:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	bl	_oggpack_write
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_32
; %bb.24:
	mov	x21, #0
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w8, [x8, x21, lsl #2]
	sub	w1, w8, #1
	mov	x0, x19
	mov	w2, #5
	bl	_oggpack_write
	add	x21, x21, #1
	ldrsw	x8, [x20, #4]
	cmp	x21, x8
	b.lt	LBB0_25
	b	LBB0_32
LBB0_26:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_oggpack_write
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_32
; %bb.27:
	mov	x21, #0
	b	LBB0_30
LBB0_28:                                ;   in Loop: Header=BB0_30 Depth=1
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_oggpack_write
	ldr	x8, [x20, #8]
	ldr	w8, [x8, x21, lsl #2]
	sub	w1, w8, #1
	mov	x0, x19
	mov	w2, #5
LBB0_29:                                ;   in Loop: Header=BB0_30 Depth=1
	bl	_oggpack_write
	add	x21, x21, #1
	ldrsw	x8, [x20, #4]
	cmp	x21, x8
	b.ge	LBB0_32
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w8, [x8, x21, lsl #2]
	cbnz	w8, LBB0_28
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=1
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	b	LBB0_29
LBB0_32:
	ldr	w1, [x20, #16]
	mov	x0, x19
	mov	w2, #4
	bl	_oggpack_write
	ldr	w8, [x20, #16]
	sub	w9, w8, #1
	cmp	w9, #2
	b.hs	LBB0_37
; %bb.33:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_38
; %bb.34:
	ldr	w1, [x20, #20]
	mov	x0, x19
	mov	w2, #32
	bl	_oggpack_write
	ldr	w1, [x20, #24]
	mov	x0, x19
	mov	w2, #32
	bl	_oggpack_write
	ldr	w8, [x20, #28]
	sub	w1, w8, #1
	mov	x0, x19
	mov	w2, #4
	bl	_oggpack_write
	ldr	w1, [x20, #32]
	mov	x0, x19
	mov	w2, #1
	bl	_oggpack_write
	ldr	w8, [x20, #16]
	cmp	w8, #2
	b.eq	LBB0_39
; %bb.35:
	cmp	w8, #1
	b.ne	LBB0_42
; %bb.36:
	mov	x0, x20
	bl	__book_maptype1_quantvals
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, #1
	b.ge	LBB0_40
	b	LBB0_42
LBB0_37:
	cbz	w8, LBB0_42
LBB0_38:
	mov	w0, #-1
	b	LBB0_43
LBB0_39:
	ldp	w9, w8, [x20]
	mul	w0, w9, w8
	cmp	w0, #1
	b.lt	LBB0_42
LBB0_40:
	mov	x21, #0
	sxtw	x22, w0
LBB0_41:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #40]
	ldr	w8, [x8, x21, lsl #2]
	cmp	w8, #0
	cneg	w1, w8, mi
	ldr	w2, [x20, #28]
	mov	x0, x19
	bl	_oggpack_write
	add	x21, x21, #1
	cmp	x22, x21
	b.ne	LBB0_41
LBB0_42:
	mov	w0, #0
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
