	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_chapter
_read_chapter:                          ## @read_chapter
	.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
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movl	%edx, -44(%rbp)
	movl	$24, %edi
	callq	_av_mallocz
	movq	%rax, %r15
	movq	%rax, -64(%rbp)
	movl	$32, %edi
	callq	_av_mallocz
	movq	%rax, %r12
	testq	%r15, %r15
	je	LBB0_13
## %bb.1:
	testq	%r12, %r12
	je	LBB0_13
## %bb.2:
	leaq	24(%r12), %rcx
	leaq	-44(%rbp), %r8
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_decode_str
	testq	%rax, %rax
	js	LBB0_13
## %bb.3:
	cmpl	$16, -44(%rbp)
	jl	LBB0_13
## %bb.4:
	movq	%rbx, %rdi
	callq	_avio_rb32
	movq	%rax, 16(%r12)
	movq	%rbx, %rdi
	callq	_avio_rb32
	movq	%rax, 8(%r12)
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_avio_skip
	movl	-44(%rbp), %eax
	leal	-16(%rax), %ecx
	movl	%ecx, -44(%rbp)
	cmpl	$27, %eax
	jge	LBB0_5
LBB0_12:
	movq	_ff_id3v2_34_metadata_conv@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_ff_metadata_conv
	movq	_ff_id3v2_4_metadata_conv@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_ff_metadata_conv
	leaq	L_.str(%rip), %rax
	movq	%rax, (%r15)
	movq	-64(%rbp), %rax
	movq	%r12, 16(%rax)
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rcx
	movq	%rcx, 8(%rax)
	movq	%rax, (%rdx)
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_avio_skip
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	-44(%rbp), %eax
	subl	%r14d, %eax
	movl	%eax, -44(%rbp)
	cmpl	$10, %eax
	jle	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	leaq	-49(%rbp), %rsi
	movl	$4, %edx
	callq	_avio_read
	cmpl	$4, %eax
	jl	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movb	$0, -45(%rbp)
	movq	%rbx, %rdi
	callq	_avio_rb32
	movq	%rax, %r14
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_avio_skip
	movl	-44(%rbp), %eax
	addl	$-10, %eax
	movl	%eax, -44(%rbp)
	testl	%r14d, %r14d
	js	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%r14d, %eax
	jl	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$84, -49(%rbp)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movq	%r12, %rcx
	leaq	-49(%rbp), %r8
	callq	_read_ttag
	jmp	LBB0_11
LBB0_13:
	testq	%r12, %r12
	je	LBB0_15
## %bb.14:
	movq	%r12, %rdi
	callq	_free_chapter
LBB0_15:
	leaq	-64(%rbp), %rdi
	callq	_av_freep
LBB0_16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_id3v2_34_metadata_conv,4,2  ## @ff_id3v2_34_metadata_conv
	.comm	_ff_id3v2_4_metadata_conv,4,2   ## @ff_id3v2_4_metadata_conv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CHAP"

	.no_dead_strip	_read_chapter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_chapter
_read_chapter:                          ; @read_chapter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x4
	mov	x22, x1
	mov	x23, x0
	str	w2, [sp, #28]
	mov	w0, #24
	bl	_av_mallocz
	mov	x21, x0
	str	x0, [sp, #8]
	mov	w0, #32
	bl	_av_mallocz
	mov	x20, x0
	cbz	x21, LBB0_13
; %bb.1:
	cbz	x20, LBB0_13
; %bb.2:
	add	x3, x20, #24
	add	x4, sp, #28
	mov	x0, x23
	mov	x1, x22
	mov	w2, #0
	bl	_decode_str
	tbnz	x0, #63, LBB0_13
; %bb.3:
	ldr	w8, [sp, #28]
	cmp	w8, #16
	b.lt	LBB0_13
; %bb.4:
	mov	x0, x22
	bl	_avio_rb32
	str	x0, [x20, #16]
	mov	x0, x22
	bl	_avio_rb32
	str	x0, [x20, #8]
	mov	x0, x22
	mov	w1, #8
	bl	_avio_skip
	ldr	w8, [sp, #28]
	sub	w9, w8, #16
	str	w9, [sp, #28]
	cmp	w8, #27
	b.ge	LBB0_8
LBB0_5:
Lloh0:
	adrp	x8, _ff_id3v2_34_metadata_conv@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ff_id3v2_34_metadata_conv@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, #0
	bl	_ff_metadata_conv
Lloh3:
	adrp	x8, _ff_id3v2_4_metadata_conv@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ff_id3v2_4_metadata_conv@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, #0
	bl	_ff_metadata_conv
Lloh6:
	adrp	x8, l_.str@PAGE
Lloh7:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x21]
	ldr	x8, [sp, #8]
	str	x20, [x8, #16]
	ldr	x9, [x19]
	str	x9, [x8, #8]
	str	x8, [x19]
	b	LBB0_16
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x22
	mov	x1, x24
	bl	_avio_skip
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [sp, #28]
	sub	w8, w8, w24
	str	w8, [sp, #28]
	cmp	w8, #10
	b.le	LBB0_5
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #23
	mov	x0, x22
	mov	w2, #4
	bl	_avio_read
	cmp	w0, #4
	b.lt	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	strb	wzr, [sp, #27]
	mov	x0, x22
	bl	_avio_rb32
	mov	x24, x0
	mov	x0, x22
	mov	w1, #2
	bl	_avio_skip
	ldr	w8, [sp, #28]
	sub	w8, w8, #10
	str	w8, [sp, #28]
	tbnz	w24, #31, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	w8, w24
	b.lt	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldrb	w8, [sp, #23]
	cmp	w8, #84
	b.ne	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x4, sp, #23
	mov	x0, x23
	mov	x1, x22
	mov	x2, x24
	mov	x3, x20
	bl	_read_ttag
	b	LBB0_7
LBB0_13:
	cbz	x20, LBB0_15
; %bb.14:
	mov	x0, x20
	bl	_free_chapter
LBB0_15:
	add	x0, sp, #8
	bl	_av_freep
LBB0_16:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_id3v2_34_metadata_conv,4,2  ; @ff_id3v2_34_metadata_conv
	.comm	_ff_id3v2_4_metadata_conv,4,2   ; @ff_id3v2_4_metadata_conv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CHAP"

	.no_dead_strip	_read_chapter
.subsections_via_symbols
