	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xan_unpack
_xan_unpack:                            ## @xan_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	leaq	-44(%rbp), %rdi
	movq	%rdx, %rsi
	movl	%ecx, %edx
	callq	_bytestream2_init
	testl	%ebx, %ebx
	jle	LBB0_18
## %bb.1:
	movslq	%ebx, %rax
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	leaq	(%r12,%rax,4), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r12
	cmpq	-64(%rbp), %rax                 ## 8-byte Folded Reload
	jae	LBB0_18
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-44(%rbp), %rdi
	callq	_bytestream2_get_bytes_left
	testl	%eax, %eax
	je	LBB0_18
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	-44(%rbp), %rdi
	callq	_bytestream2_get_byte
	movl	%eax, %r13d
	cmpl	$223, %eax
	jg	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testb	$-128, %r13b
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %eax
	andl	$3, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, %ebx
	andl	$96, %ebx
	leaq	-44(%rbp), %rdi
	callq	_bytestream2_get_byte
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rbx,8), %r14d
	shrl	$2, %r13d
	andl	$7, %r13d
	addl	$3, %r13d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %eax
	andl	$3, %eax
	movl	%r13d, %ecx
	andl	$31, %ecx
	cmpl	$252, %r13d
	leal	4(,%rcx,4), %ebx
	cmovael	%eax, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	subq	%r12, %rax
	sarq	$2, %rax
	cmpq	%rbx, %rax
	jl	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	-44(%rbp), %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	%ebx, %eax
	jl	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	-44(%rbp), %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_bytestream2_get_buffer
	cmpl	$251, %r13d
	ja	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rax
	leaq	(%r12,%rbx,4), %rax
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	testb	$64, %r13b
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_bytestream2_peek_byte
                                        ## kill: def $eax killed $eax def $rax
	sarl	$6, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_bytestream2_get_be16
	movl	%eax, %r14d
	andl	$16383, %r14d                   ## imm = 0x3FFF
	andl	$63, %r13d
	addl	$4, %r13d
	jmp	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %eax
	andl	$3, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, %ebx
	andl	$16, %ebx
	shll	$12, %ebx
	leaq	-44(%rbp), %r15
	movq	%r15, %rdi
	callq	_bytestream2_get_be16
	movl	%eax, %r14d
	addl	%ebx, %r14d
	andl	$12, %r13d
	shll	$6, %r13d
	movq	%r15, %rdi
	callq	_bytestream2_get_byte
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %r13d
	addl	$5, %r13d
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	subq	%r12, %rax
	sarq	$2, %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leal	(%rbx,%r13), %ecx
	movslq	%ecx, %rcx
	cmpq	%rcx, %rax
	jl	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	incl	%r14d
	movslq	%ebx, %rax
	leaq	(%r12,%rax,4), %r15
	movq	%r15, %rax
	subq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	sarq	$2, %rax
	movslq	%r14d, %rcx
	cmpq	%rcx, %rax
	jl	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	-44(%rbp), %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	%ebx, %eax
	jl	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	-44(%rbp), %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_bytestream2_get_buffer
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	callq	_av_memcpy_backptr
	movslq	%r13d, %rax
	leaq	(%r15,%rax,4), %rax
	jmp	LBB0_17
LBB0_18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_xan_unpack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xan_unpack
_xan_unpack:                            ; @xan_unpack
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
	add	x0, sp, #12
	mov	x1, x2
	mov	x2, x3
	bl	_bytestream2_init
	cmp	w20, #1
	b.lt	LBB0_18
; %bb.1:
	add	x25, x19, w20, sxtw #2
	mov	x20, x19
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x20, x25
	b.hs	LBB0_18
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #12
	bl	_bytestream2_get_bytes_left
	cbz	w0, LBB0_18
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #12
	bl	_bytestream2_get_byte
	mov	x22, x0
	cmp	w0, #223
	b.gt	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	tbnz	w22, #7, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	and	w21, w22, #0x3
	lsl	w8, w22, #3
	and	w23, w8, #0x300
	add	x0, sp, #12
	bl	_bytestream2_get_byte
	add	w23, w0, w23
	ubfx	w8, w22, #2, #3
	add	w22, w8, #3
	b	LBB0_14
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	and	w8, w22, #0x3
	ubfiz	w9, w22, #2, #5
	add	w9, w9, #4
	cmp	w22, #251
	csel	w21, w8, w9, hi
	sub	x8, x25, x20
	cmp	x21, x8, asr #2
	b.gt	LBB0_18
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #12
	bl	_bytestream2_get_bytes_left
	cmp	w0, w21
	b.lt	LBB0_18
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #12
	mov	x1, x20
	mov	x2, x21
	bl	_bytestream2_get_buffer
	cmp	w22, #251
	b.hi	LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, x21, lsl #2
	b	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	tbnz	w22, #6, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #12
	bl	_bytestream2_peek_byte
	asr	w21, w0, #6
	add	x0, sp, #12
	bl	_bytestream2_get_be16
	and	w23, w0, #0x3fff
	and	w8, w22, #0x3f
	add	w22, w8, #4
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
	and	w21, w22, #0x3
	lsl	w8, w22, #12
	and	w23, w8, #0x10000
	add	x0, sp, #12
	bl	_bytestream2_get_be16
	add	w23, w0, w23
	lsl	w8, w22, #6
	and	w22, w8, #0x300
	add	x0, sp, #12
	bl	_bytestream2_get_byte
	add	w8, w0, w22
	add	w22, w8, #5
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x8, x25, x20
	add	w9, w22, w21
	sxtw	x9, w9
	cmp	x9, x8, asr #2
	b.gt	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	add	w24, w23, #1
	add	x23, x20, w21, sxtw #2
	sub	x8, x23, x19
	sxtw	x9, w24
	cmp	x9, x8, asr #2
	b.gt	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #12
	bl	_bytestream2_get_bytes_left
	cmp	w0, w21
	b.lt	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #12
	mov	x1, x20
	mov	x2, x21
	bl	_bytestream2_get_buffer
	mov	x0, x23
	mov	x1, x24
	mov	x2, x22
	bl	_av_memcpy_backptr
	add	x20, x23, w22, sxtw #2
	b	LBB0_2
LBB0_18:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_xan_unpack
.subsections_via_symbols
