	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reader_init
_reader_init:                           ## @reader_init
	.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	%rsi, %r12
	movq	%rdi, %rbx
	movl	$96, %edi
	movl	$1, %esi
	callq	_calloc
	movq	%rax, %r14
	movq	%rax, (%rbx)
	movl	52(%r12), %eax
	movl	%eax, 88(%r14)
	movq	%r12, 80(%r14)
	movq	40(%r12), %rax
	movq	%rax, 40(%r14)
	movl	48(%r12), %eax
	movl	%eax, 72(%r14)
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 64(%r14)
	movq	%rax, 56(%r14)
	movl	(%r12), %eax
	movl	%eax, (%r14)
	movq	8(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	addq	$-1000000, %rsi                 ## imm = 0xFFF0BDC0
	xorl	%edi, %edi
	callq	_MAX
	movl	%eax, 48(%r14)
	jmp	LBB0_3
LBB0_1:
	movl	$1, 4(%r14)
LBB0_3:
	movq	16(%r12), %rax
	testq	%rax, %rax
	jle	LBB0_5
## %bb.4:
	addq	8(%r12), %rax
	jmp	LBB0_12
LBB0_5:
	movl	24(%r12), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	addl	28(%r12), %eax
	movq	40(%r12), %rcx
	imull	12(%rcx), %eax
	imull	$90000, %eax, %eax              ## imm = 0x15F90
	cltd
	idivl	16(%rcx)
LBB0_11:
	cltq
	jmp	LBB0_12
LBB0_7:
	movq	40(%r12), %rax
	movl	8(%rax), %edi
	callq	_hb_list_count
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	(%r12), %esi
	cmpl	%esi, %eax
	jle	LBB0_9
## %bb.10:
	movq	40(%r12), %rdi
	callq	_chapter_end_pts
	jmp	LBB0_11
LBB0_9:
	movq	40(%r12), %rax
	movslq	(%rax), %rax
LBB0_12:
	movq	%rax, 8(%r14)
	movl	36(%r12), %edi
	callq	_hb_list_count
	movl	%eax, %ebx
	movl	32(%r12), %edi
	callq	_hb_list_count
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rbx,%rax), %r15d
	incl	%r15d
	movl	%r15d, 16(%r14)
	movl	%r15d, %edi
	movl	$4, %esi
	callq	_calloc
	movq	%rax, 32(%r14)
	movq	40(%r14), %rcx
	movl	4(%rcx), %ecx
	movl	%ecx, (%rax)
	movl	36(%r12), %edi
	callq	_hb_list_count
	movl	$1, %r13d
	testl	%eax, %eax
	jle	LBB0_13
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	leal	-1(%r13), %esi
	movl	36(%r12), %edi
	callq	_hb_list_item
	movl	(%rax), %eax
	movq	32(%r14), %rcx
	movl	%eax, (%rcx,%r13,4)
	incq	%r13
	movl	36(%r12), %edi
	callq	_hb_list_count
	leal	-1(%r13), %ecx
	cmpl	%eax, %ecx
	jl	LBB0_17
LBB0_13:
	movl	32(%r12), %edi
	callq	_hb_list_count
	testl	%eax, %eax
	jle	LBB0_16
## %bb.14:
	shlq	$2, %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	32(%r12), %edi
	movl	%ebx, %esi
	callq	_hb_list_item
	movl	(%rax), %eax
	movq	32(%r14), %rcx
	addq	%r13, %rcx
	movl	%eax, (%rcx,%rbx,4)
	movl	32(%r12), %edi
	callq	_hb_list_count
	incq	%rbx
	cmpl	%eax, %ebx
	jl	LBB0_15
LBB0_16:
	incl	%r15d
	movl	%r15d, %edi
	movl	$8, %esi
	callq	_calloc
	movq	%rax, 24(%r14)
	movq	%r14, %rdi
	callq	_hb_reader_open
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.no_dead_strip	_reader_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reader_init
_reader_init:                           ; @reader_init
	.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	x20, x1
	mov	x21, x0
	mov	w22, #1
	mov	w0, #96
	mov	w1, #1
	bl	_calloc
	mov	x19, x0
	str	x0, [x21]
	ldp	w9, w8, [x20, #48]
	str	w8, [x0, #88]
	ldr	x8, [x20, #40]
	str	x8, [x0, #40]
	str	x20, [x0, #80]
	str	w9, [x0, #72]
Lloh0:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stp	x8, x8, [x0, #56]
	ldr	w8, [x20]
	str	w8, [x0]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_2
; %bb.1:
	sub	x8, x8, #244, lsl #12           ; =999424
	sub	x1, x8, #576
	mov	w0, #0
	bl	_MAX
	str	w0, [x19, #48]
	b	LBB0_3
LBB0_2:
	str	w22, [x19, #4]
LBB0_3:
	ldr	x8, [x20, #16]
	cmp	x8, #1
	b.lt	LBB0_5
; %bb.4:
	ldr	x9, [x20, #8]
	add	x8, x9, x8
	b	LBB0_11
LBB0_5:
	ldr	w8, [x20, #24]
	cbz	w8, LBB0_7
; %bb.6:
	ldr	w9, [x20, #28]
	add	w8, w9, w8
	ldr	x9, [x20, #40]
	ldp	w10, w9, [x9, #12]
	mul	w8, w8, w10
	mov	w10, #24464
	movk	w10, #1, lsl #16
	mul	w8, w8, w10
	sdiv	w8, w8, w9
	sxtw	x8, w8
	b	LBB0_11
LBB0_7:
	ldr	x8, [x20, #40]
	ldr	w0, [x8, #8]
	bl	_hb_list_count
	cbz	w0, LBB0_10
; %bb.8:
	ldr	w1, [x20]
	cmp	w0, w1
	b.le	LBB0_10
; %bb.9:
	ldr	x0, [x20, #40]
	bl	_chapter_end_pts
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	b	LBB0_11
LBB0_10:
	ldr	x8, [x20, #40]
	ldrsw	x8, [x8]
LBB0_11:
	str	x8, [x19, #8]
	ldr	w0, [x20, #36]
	bl	_hb_list_count
	mov	x21, x0
	ldr	w0, [x20, #32]
	bl	_hb_list_count
	add	w8, w21, w0
	add	w21, w8, #1
	str	w21, [x19, #16]
	mov	x0, x21
	mov	w1, #4
	bl	_calloc
	str	x0, [x19, #32]
	ldr	x8, [x19, #40]
	ldr	w8, [x8, #4]
	str	w8, [x0]
	ldr	w0, [x20, #36]
	bl	_hb_list_count
	cmp	w0, #1
	b.lt	LBB0_14
; %bb.12:
	mov	w22, #1
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sub	w1, w22, #1
	ldr	w0, [x20, #36]
	bl	_hb_list_item
	ldr	w8, [x0]
	ldr	x9, [x19, #32]
	add	x23, x22, #1
	str	w8, [x9, x22, lsl #2]
	ldr	w0, [x20, #36]
	bl	_hb_list_count
	sub	w8, w23, #1
	mov	x22, x23
	cmp	w8, w0
	b.lt	LBB0_13
	b	LBB0_15
LBB0_14:
	mov	w23, #1
LBB0_15:
	ldr	w0, [x20, #32]
	bl	_hb_list_count
	cmp	w0, #1
	b.lt	LBB0_18
; %bb.16:
	mov	x22, #0
	lsl	x23, x23, #2
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #32]
	mov	x1, x22
	bl	_hb_list_item
	ldr	w8, [x0]
	ldr	x9, [x19, #32]
	add	x9, x9, x23
	str	w8, [x9, x22, lsl #2]
	ldr	w0, [x20, #32]
	bl	_hb_list_count
	add	x22, x22, #1
	cmp	w22, w0
	b.lt	LBB0_17
LBB0_18:
	add	w0, w21, #1
	mov	w1, #8
	bl	_calloc
	str	x0, [x19, #24]
	mov	x0, x19
	bl	_hb_reader_open
	cmp	x0, #0
	cset	w0, ne
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.no_dead_strip	_reader_init
.subsections_via_symbols
