	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_oggpack_read                   ## -- Begin function oggpack_read
	.p2align	4, 0x90
_oggpack_read:                          ## @oggpack_read
	.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	%rdi, %r12
	movq	_mask@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%esi, %rbx
	movq	(%rax,%rbx,8), %r15
	movl	(%rdi), %eax
	movl	4(%rdi), %edx
	addl	%eax, %ebx
	leal	(,%rdx,8), %ecx
	cmpl	%ecx, %ebx
	jge	LBB0_1
## %bb.19:
	movq	8(%r12), %rsi
	movl	(%rsi), %r13d
	movl	%eax, %ecx
	sarl	%cl, %r13d
	cmpl	$9, %ebx
	jl	LBB0_25
## %bb.20:
	movl	4(%rsi), %edi
	movb	$8, %cl
	subb	%al, %cl
	shll	%cl, %edi
	orl	%edi, %r13d
	cmpl	$17, %ebx
	jb	LBB0_25
## %bb.21:
	movl	8(%rsi), %edi
	movb	$16, %cl
	subb	%al, %cl
	shll	%cl, %edi
	orl	%edi, %r13d
	cmpl	$25, %ebx
	jb	LBB0_25
## %bb.22:
	movl	12(%rsi), %edi
	movb	$24, %cl
	subb	%al, %cl
	shll	%cl, %edi
	orl	%edi, %r13d
	testl	%eax, %eax
	je	LBB0_25
## %bb.23:
	cmpl	$33, %ebx
	jb	LBB0_25
## %bb.24:
	movl	16(%rsi), %edi
	negb	%al
	movl	%eax, %ecx
	shll	%cl, %edi
	orl	%edi, %r13d
LBB0_25:
	leal	7(%rbx), %eax
	testl	%ebx, %ebx
	cmovnsl	%ebx, %eax
	sarl	$3, %eax
	cltq
	leaq	(%rsi,%rax,4), %rcx
	movq	%rcx, 8(%r12)
	subl	%eax, %edx
	movl	%edx, 4(%r12)
LBB0_26:
	andl	%r13d, %r15d
	andl	$7, %ebx
	movl	%ebx, (%r12)
	movslq	%r15d, %r14
	jmp	LBB0_27
LBB0_1:
	movq	$-1, %r14
	testl	%edx, %edx
	js	LBB0_27
## %bb.2:
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.4:
	movq	%r12, %rdi
	callq	__halt_one
	testq	%rax, %rax
	je	LBB0_5
LBB0_27:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$-1, %r13d
	jmp	LBB0_26
LBB0_5:
	movq	8(%r12), %rax
	movl	(%rax), %r13d
	movb	(%r12), %cl
	sarl	%cl, %r13d
	cmpl	$8, %ebx
	jl	LBB0_26
## %bb.6:
	addq	$4, %rax
	movq	%rax, 8(%r12)
	decl	4(%r12)
	movq	%r12, %rdi
	callq	__span_one
	cmpl	$8, %ebx
	je	LBB0_26
## %bb.7:
	movq	%r12, %rdi
	callq	__halt_one
	testq	%rax, %rax
	jne	LBB0_27
## %bb.8:
	movq	8(%r12), %rax
	movb	$8, %cl
	subb	(%r12), %cl
	movl	(%rax), %edx
	shll	%cl, %edx
	orl	%edx, %r13d
	cmpl	$16, %ebx
	jb	LBB0_26
## %bb.9:
	addq	$4, %rax
	movq	%rax, 8(%r12)
	decl	4(%r12)
	movq	%r12, %rdi
	callq	__span_one
	cmpl	$16, %ebx
	je	LBB0_26
## %bb.10:
	movq	%r12, %rdi
	callq	__halt_one
	testq	%rax, %rax
	jne	LBB0_27
## %bb.11:
	movq	8(%r12), %rax
	movb	$16, %cl
	subb	(%r12), %cl
	movl	(%rax), %edx
	shll	%cl, %edx
	orl	%edx, %r13d
	cmpl	$24, %ebx
	jb	LBB0_26
## %bb.12:
	addq	$4, %rax
	movq	%rax, 8(%r12)
	decl	4(%r12)
	movq	%r12, %rdi
	callq	__span_one
	cmpl	$24, %ebx
	je	LBB0_26
## %bb.13:
	movq	%r12, %rdi
	callq	__halt_one
	testq	%rax, %rax
	jne	LBB0_27
## %bb.14:
	movq	8(%r12), %rax
	movb	$24, %cl
	subb	(%r12), %cl
	movl	(%rax), %edx
	shll	%cl, %edx
	orl	%edx, %r13d
	cmpl	$32, %ebx
	jb	LBB0_26
## %bb.15:
	addq	$4, %rax
	movq	%rax, 8(%r12)
	decl	4(%r12)
	movq	%r12, %rdi
	callq	__span_one
	cmpl	$32, %ebx
	je	LBB0_26
## %bb.16:
	movq	%r12, %rdi
	callq	__halt_one
	testq	%rax, %rax
	jne	LBB0_27
## %bb.17:
	movl	(%r12), %ecx
	testl	%ecx, %ecx
	je	LBB0_26
## %bb.18:
	movq	8(%r12), %rax
	movl	(%rax), %eax
	negb	%cl
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	orl	%eax, %r13d
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_mask,8,3                       ## @mask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_oggpack_read                   ; -- Begin function oggpack_read
	.p2align	2
_oggpack_read:                          ; @oggpack_read
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _mask@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mask@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x20, [x8, w1, sxtw #3]
	ldp	w10, w8, [x0]
	add	w21, w10, w1
	cmp	w21, w8, lsl #3
	b.ge	LBB0_9
; %bb.1:
	ldr	x9, [x19, #8]
	ldr	w11, [x9]
	asr	w22, w11, w10
	cmp	w21, #9
	b.lt	LBB0_7
; %bb.2:
	ldr	w11, [x9, #4]
	mov	w12, #8
	sub	w12, w12, w10
	lsl	w11, w11, w12
	orr	w22, w11, w22
	cmp	w21, #17
	b.lo	LBB0_7
; %bb.3:
	ldr	w11, [x9, #8]
	mov	w12, #16
	sub	w12, w12, w10
	lsl	w11, w11, w12
	orr	w22, w11, w22
	cmp	w21, #25
	b.lo	LBB0_7
; %bb.4:
	ldr	w11, [x9, #12]
	mov	w12, #24
	sub	w12, w12, w10
	lsl	w11, w11, w12
	orr	w22, w11, w22
	cbz	w10, LBB0_7
; %bb.5:
	cmp	w21, #33
	b.lo	LBB0_7
; %bb.6:
	ldr	w11, [x9, #16]
	neg	w10, w10
	lsl	w10, w11, w10
	orr	w22, w10, w22
LBB0_7:
	add	w10, w21, #7
	cmp	w21, #0
	csel	w10, w10, w21, lt
	asr	w10, w10, #3
	add	x9, x9, w10, sxtw #2
	str	x9, [x19, #8]
	sub	w8, w8, w10
	str	w8, [x19, #4]
LBB0_8:
	and	w8, w22, w20
	and	w9, w21, #0x7
	str	w9, [x19]
	sxtw	x0, w8
	b	LBB0_13
LBB0_9:
	tbnz	w8, #31, LBB0_12
; %bb.10:
	cbz	w21, LBB0_14
; %bb.11:
	mov	x0, x19
	bl	__halt_one
	cbz	x0, LBB0_15
LBB0_12:
	mov	x0, #-1
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	w22, #-1
	b	LBB0_8
LBB0_15:
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	ldr	w10, [x19]
	asr	w22, w9, w10
	cmp	w21, #8
	b.lt	LBB0_8
; %bb.16:
	add	x8, x8, #4
	str	x8, [x19, #8]
	ldr	w8, [x19, #4]
	sub	w8, w8, #1
	str	w8, [x19, #4]
	mov	x0, x19
	bl	__span_one
	cmp	w21, #8
	b.eq	LBB0_8
; %bb.17:
	mov	x0, x19
	bl	__halt_one
	cbnz	x0, LBB0_12
; %bb.18:
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	ldr	w10, [x19]
	mov	w11, #8
	sub	w10, w11, w10
	lsl	w9, w9, w10
	orr	w22, w9, w22
	cmp	w21, #16
	b.lo	LBB0_8
; %bb.19:
	add	x8, x8, #4
	str	x8, [x19, #8]
	ldr	w8, [x19, #4]
	sub	w8, w8, #1
	str	w8, [x19, #4]
	mov	x0, x19
	bl	__span_one
	cmp	w21, #16
	b.eq	LBB0_8
; %bb.20:
	mov	x0, x19
	bl	__halt_one
	cbnz	x0, LBB0_12
; %bb.21:
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	ldr	w10, [x19]
	mov	w11, #16
	sub	w10, w11, w10
	lsl	w9, w9, w10
	orr	w22, w9, w22
	cmp	w21, #24
	b.lo	LBB0_8
; %bb.22:
	add	x8, x8, #4
	str	x8, [x19, #8]
	ldr	w8, [x19, #4]
	sub	w8, w8, #1
	str	w8, [x19, #4]
	mov	x0, x19
	bl	__span_one
	cmp	w21, #24
	b.eq	LBB0_8
; %bb.23:
	mov	x0, x19
	bl	__halt_one
	cbnz	x0, LBB0_12
; %bb.24:
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	ldr	w10, [x19]
	mov	w11, #24
	sub	w10, w11, w10
	lsl	w9, w9, w10
	orr	w22, w9, w22
	cmp	w21, #32
	b.lo	LBB0_8
; %bb.25:
	add	x8, x8, #4
	str	x8, [x19, #8]
	ldr	w8, [x19, #4]
	sub	w8, w8, #1
	str	w8, [x19, #4]
	mov	x0, x19
	bl	__span_one
	cmp	w21, #32
	b.eq	LBB0_8
; %bb.26:
	mov	x0, x19
	bl	__halt_one
	cbnz	x0, LBB0_12
; %bb.27:
	ldr	w8, [x19]
	cbz	w8, LBB0_8
; %bb.28:
	ldr	x9, [x19, #8]
	ldr	w9, [x9]
	neg	w8, w8
	lsl	w8, w9, w8
	orr	w22, w8, w22
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_mask,8,3                       ; @mask
.subsections_via_symbols
