	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_chunk
_read_chunk:                            ## @read_chunk
	.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	8(%rdi), %r13
	movl	(%rdi), %edi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_4
LBB0_1:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r12), %edi
	callq	_avio_rl32
	movq	%rax, %r14
	movl	$68, %edi
	movl	$72, %esi
	movl	$65, %edx
	movl	$86, %ecx
	callq	_MKTAG
	cmpq	%rax, %r14
	je	LBB0_9
## %bb.5:
	movl	$32768, %esi                    ## imm = 0x8000
	addl	(%r13), %esi
	movl	%esi, (%r13)
	movl	(%r12), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_avio_seek
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_avio_rl32
	movq	%rax, %rbx
	movl	$68, %edi
	movl	$72, %esi
	movl	$65, %edx
	movl	$86, %ecx
	callq	_MKTAG
	cmpq	%rax, %rbx
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r12), %edi
	callq	_avio_feof
	testq	%rax, %rax
	jne	LBB0_1
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	addl	$32768, (%r13)                  ## imm = 0x8000
	movl	(%r12), %edi
	movl	$32764, %esi                    ## imm = 0x7FFC
	callq	_avio_skip
	testl	%eax, %eax
	jns	LBB0_6
	jmp	LBB0_3
LBB0_9:
	movl	(%r12), %edi
	callq	_avio_tell
	movl	%eax, %r14d
	leal	-4(%r14), %eax
	movl	%eax, (%r13)
	movl	(%r12), %edi
	callq	_avio_r8
	movl	%eax, 4(%r13)
	movl	(%r12), %edi
	callq	_avio_r8
	movq	%rax, 48(%r13)
	movl	(%r12), %edi
	callq	_avio_r8
	movq	%rax, 40(%r13)
	movl	(%r12), %edi
	callq	_avio_r8
	movq	%rax, 32(%r13)
	movl	(%r12), %edi
	callq	_avio_rl32
	movq	%rax, 24(%r13)
	movl	(%r12), %edi
	callq	_avio_rl32
	movq	%rax, %r15
	cmpl	$23, %r15d
	jg	LBB0_11
## %bb.10:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_11:
	cmpl	$241, 4(%r13)
	movl	(%r12), %edi
	jne	LBB0_13
## %bb.12:
	addl	$-16, %r15d
	movl	%r15d, %esi
	callq	_avio_skip
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
	jmp	LBB0_3
LBB0_13:
	callq	_avio_rl32
	movq	%rax, 16(%r13)
	movl	(%r12), %edi
	callq	_avio_rl16
	movl	%eax, 8(%r13)
	movl	(%r12), %edi
	callq	_avio_r8
	movq	%rax, %rbx
	movl	(%r12), %edi
	movl	$1, %esi
	callq	_avio_skip
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_parse_ext
	testl	%eax, %eax
	js	LBB0_3
## %bb.14:
	movl	(%r12), %edi
	callq	_avio_tell
	addl	%r15d, %r14d
	subl	%eax, %r14d
	addl	$-12, %r14d
	movl	%r14d, %eax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_read_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_chunk
_read_chunk:                            ; @read_chunk
	.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
	ldr	x22, [x0, #8]
	ldr	w0, [x0]
	bl	_avio_feof
	cbz	x0, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
LBB0_2:
	ldr	w0, [x8]
LBB0_3:
	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_4:
	ldr	w0, [x19]
	bl	_avio_rl32
	mov	x20, x0
	mov	w0, #68
	mov	w1, #72
	mov	w2, #65
	mov	w3, #86
	bl	_MKTAG
	cmp	x20, x0
	b.eq	LBB0_9
; %bb.5:
	ldr	w8, [x22]
	add	w1, w8, #8, lsl #12             ; =32768
	str	w1, [x22]
	ldr	w0, [x19]
Lloh2:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_avio_seek
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_avio_rl32
	mov	x20, x0
	mov	w0, #68
	mov	w1, #72
	mov	w2, #65
	mov	w3, #86
	bl	_MKTAG
	cmp	x20, x0
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x19]
	bl	_avio_feof
	cbnz	x0, LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x22]
	add	w8, w8, #8, lsl #12             ; =32768
	str	w8, [x22]
	ldr	w0, [x19]
	mov	w1, #32764
	bl	_avio_skip
	tbz	w0, #31, LBB0_6
	b	LBB0_3
LBB0_9:
	ldr	w0, [x19]
	bl	_avio_tell
	mov	x20, x0
	sub	w8, w0, #4
	str	w8, [x22]
	ldr	w0, [x19]
	bl	_avio_r8
	str	w0, [x22, #4]
	ldr	w0, [x19]
	bl	_avio_r8
	str	x0, [x22, #48]
	ldr	w0, [x19]
	bl	_avio_r8
	str	x0, [x22, #40]
	ldr	w0, [x19]
	bl	_avio_r8
	str	x0, [x22, #32]
	ldr	w0, [x19]
	bl	_avio_rl32
	str	x0, [x22, #24]
	ldr	w0, [x19]
	bl	_avio_rl32
	mov	x21, x0
	cmp	w21, #23
	b.gt	LBB0_11
; %bb.10:
Lloh5:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
	b	LBB0_2
LBB0_11:
	ldr	w8, [x22, #4]
	ldr	w0, [x19]
	cmp	w8, #241
	b.ne	LBB0_13
; %bb.12:
	sub	w1, w21, #16
	bl	_avio_skip
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	b	LBB0_3
LBB0_13:
	bl	_avio_rl32
	str	x0, [x22, #16]
	ldr	w0, [x19]
	bl	_avio_rl16
	str	w0, [x22, #8]
	ldr	w0, [x19]
	bl	_avio_r8
	mov	x22, x0
	ldr	w0, [x19]
	mov	w1, #1
	bl	_avio_skip
	mov	x0, x19
	mov	x1, x22
	bl	_parse_ext
	tbnz	w0, #31, LBB0_3
; %bb.14:
	ldr	w0, [x19]
	bl	_avio_tell
	add	w8, w20, w21
	sub	w8, w8, w0
	sub	w0, w8, #12
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_read_chunk
.subsections_via_symbols
