	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsb_read_packet
_fsb_read_packet:                       ## @fsb_read_packet
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movl	(%rdi), %edi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_26
LBB0_2:
	movl	(%r14), %edi
	callq	_avio_tell
	movl	%eax, %r13d
	movq	(%rbx), %rax
	movq	_AV_CODEC_ID_ADPCM_THP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.3:
	cmpl	$2, 8(%rbx)
	jl	LBB0_21
## %bb.4:
	movl	12(%rbx), %esi
	movq	%r15, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	cmpl	$0, 8(%rbx)
	jle	LBB0_7
## %bb.8:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, %r13
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_avio_r8
	movq	(%r15), %rcx
	movl	%ebx, %edx
	movl	%eax, (%rcx,%rdx,4)
	movl	(%r14), %edi
	callq	_avio_r8
	movq	(%r15), %rcx
	leal	1(%rbx), %edx
	movl	%eax, (%rcx,%rdx,4)
	incq	%r12
	movslq	8(%r13), %rax
	addl	$8, %ebx
	cmpq	%rax, %r12
	jl	LBB0_9
## %bb.10:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jle	LBB0_11
## %bb.12:
	movl	$3, %ebx
	xorl	%r12d, %r12d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_avio_r8
	movq	(%r15), %rcx
	leal	-1(%rbx), %edx
	movl	%eax, (%rcx,%rdx,4)
	movl	(%r14), %edi
	callq	_avio_r8
	movq	(%r15), %rcx
	movl	%ebx, %edx
	movl	%eax, (%rcx,%rdx,4)
	incq	%r12
	movslq	8(%r13), %rax
	addl	$8, %ebx
	cmpq	%rax, %r12
	jl	LBB0_13
## %bb.14:
	testl	%eax, %eax
	jle	LBB0_11
## %bb.15:
	movl	$5, %ebx
	xorl	%r12d, %r12d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_avio_r8
	movq	(%r15), %rcx
	leal	-1(%rbx), %edx
	movl	%eax, (%rcx,%rdx,4)
	movl	(%r14), %edi
	callq	_avio_r8
	movq	(%r15), %rcx
	movl	%ebx, %edx
	movl	%eax, (%rcx,%rdx,4)
	incq	%r12
	movslq	8(%r13), %rax
	addl	$8, %ebx
	cmpq	%rax, %r12
	jl	LBB0_16
## %bb.17:
	testl	%eax, %eax
	jle	LBB0_11
## %bb.18:
	movl	$7, %ebx
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_avio_r8
	movq	(%r15), %rcx
	leal	-1(%rbx), %edx
	movl	%eax, (%rcx,%rdx,4)
	movl	(%r14), %edi
	callq	_avio_r8
	movq	(%r15), %rcx
	movl	%ebx, %edx
	movl	%eax, (%rcx,%rdx,4)
	incq	%r13
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movslq	8(%rax), %rax
	addl	$8, %ebx
	cmpq	%rax, %r13
	jl	LBB0_19
## %bb.20:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_22
LBB0_21:
	movl	(%r14), %edi
	movl	12(%rbx), %edx
	movq	%r15, %rsi
	callq	_av_get_packet
	movl	%eax, %r12d
LBB0_22:
	movq	(%rbx), %rax
	movq	_AV_CODEC_ID_XMA2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
## %bb.23:
	cmpl	$0, 8(%r15)
	jle	LBB0_25
## %bb.24:
	movq	(%r15), %rax
	movl	(%rax), %eax
	andl	$-4, %eax
	shll	$7, %eax
	movl	%eax, 12(%r15)
LBB0_25:
	movl	%r13d, 24(%r15)
	movq	$0, 16(%r15)
LBB0_26:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	%eax, %r12d
	jmp	LBB0_26
LBB0_11:
	xorl	%r12d, %r12d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_22
LBB0_7:
	xorl	%r12d, %r12d
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_AV_CODEC_ID_ADPCM_THP,8,3      ## @AV_CODEC_ID_ADPCM_THP
	.comm	_AV_CODEC_ID_XMA2,8,3           ## @AV_CODEC_ID_XMA2
	.no_dead_strip	_fsb_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsb_read_packet
_fsb_read_packet:                       ; @fsb_read_packet
	.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	x21, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x22, [x8]
	ldr	w0, [x0]
	bl	_avio_feof
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_22
LBB0_2:
	ldr	w0, [x21]
	bl	_avio_tell
	mov	x20, x0
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _AV_CODEC_ID_ADPCM_THP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_CODEC_ID_ADPCM_THP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.3:
	ldr	w8, [x22, #8]
	cmp	w8, #2
	b.lt	LBB0_17
; %bb.4:
	ldr	w1, [x22, #12]
	mov	x0, x19
	bl	_av_new_packet
	tbnz	w0, #31, LBB0_22
; %bb.5:
	ldr	w8, [x22, #8]
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.6:
	mov	w23, #0
	mov	x24, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_avio_r8
	ldr	x8, [x19]
	str	w0, [x8, w23, uxtw #2]
	ldr	w0, [x21]
	bl	_avio_r8
	ldr	x8, [x19]
	add	w9, w23, #1
	str	w0, [x8, w9, uxtw #2]
	add	x24, x24, #1
	ldrsw	x8, [x22, #8]
	add	w23, w23, #8
	cmp	x24, x8
	b.lt	LBB0_7
; %bb.8:
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.9:
	mov	x23, #0
	mov	w24, #3
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_avio_r8
	ldr	x8, [x19]
	sub	w9, w24, #1
	str	w0, [x8, w9, uxtw #2]
	ldr	w0, [x21]
	bl	_avio_r8
	ldr	x8, [x19]
	str	w0, [x8, w24, uxtw #2]
	add	x23, x23, #1
	ldrsw	x8, [x22, #8]
	add	w24, w24, #8
	cmp	x23, x8
	b.lt	LBB0_10
; %bb.11:
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.12:
	mov	x23, #0
	mov	w24, #5
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_avio_r8
	ldr	x8, [x19]
	sub	w9, w24, #1
	str	w0, [x8, w9, uxtw #2]
	ldr	w0, [x21]
	bl	_avio_r8
	ldr	x8, [x19]
	str	w0, [x8, w24, uxtw #2]
	add	x23, x23, #1
	ldrsw	x8, [x22, #8]
	add	w24, w24, #8
	cmp	x23, x8
	b.lt	LBB0_13
; %bb.14:
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.15:
	mov	x23, #0
	mov	w24, #7
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_avio_r8
	ldr	x8, [x19]
	sub	w9, w24, #1
	str	w0, [x8, w9, uxtw #2]
	ldr	w0, [x21]
	bl	_avio_r8
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19]
	str	w8, [x9, w24, uxtw #2]
	add	x23, x23, #1
	ldrsw	x8, [x22, #8]
	add	w24, w24, #8
	cmp	x23, x8
	b.lt	LBB0_16
	b	LBB0_18
LBB0_17:
	ldr	w0, [x21]
	ldr	w2, [x22, #12]
	mov	x1, x19
	bl	_av_get_packet
LBB0_18:
	ldr	x8, [x22]
Lloh6:
	adrp	x9, _AV_CODEC_ID_XMA2@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AV_CODEC_ID_XMA2@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.19:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.20:
	ldr	x8, [x19]
	ldr	w8, [x8]
	lsl	w8, w8, #7
	and	w8, w8, #0xfffffe00
	str	w8, [x19, #12]
LBB0_21:
	str	w20, [x19, #24]
	str	xzr, [x19, #16]
LBB0_22:
	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_23:
	mov	w0, #0
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_AV_CODEC_ID_ADPCM_THP,8,3      ; @AV_CODEC_ID_ADPCM_THP
	.comm	_AV_CODEC_ID_XMA2,8,3           ; @AV_CODEC_ID_XMA2
	.no_dead_strip	_fsb_read_packet
.subsections_via_symbols
