	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_chapter
_add_chapter:                           ## @add_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	movslq	(%rax), %r14
	movq	8(%rax), %rdi
	leal	8(,%r14,8), %esi
	callq	_av_realloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movl	$32, %edi
	callq	_av_mallocz
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	leal	1(%r14), %ecx
	movq	8(%r13), %rdx
	movq	%rbx, 8(%rdx)
	movq	%rax, (%rbx,%r14,8)
	movq	8(%r13), %rdx
	movl	%ecx, (%rdx)
	movl	%ecx, (%rax)
	movl	(%r13), %ecx
	movl	%ecx, 24(%rax)
	movq	%r12, 16(%rax)
	movq	%r15, 8(%rax)
	addq	$4, %rax
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	callq	_av_dict_set
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_hb_error
	movl	$-1, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chapter array: malloc failure"

L_.str.1:                               ## @.str.1
	.asciz	"chapter: malloc failure"

L_.str.2:                               ## @.str.2
	.asciz	"title"

	.no_dead_strip	_add_chapter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_chapter
_add_chapter:                           ; @add_chapter
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x8, [x0, #8]
	ldrsw	x25, [x8]
	add	w24, w25, #1
	ldr	x0, [x8, #8]
	lsl	w1, w24, #3
	bl	_av_realloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x23, x0
	mov	w0, #32
	bl	_av_mallocz
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x22, #8]
	str	x23, [x8, #8]
	str	x0, [x23, x25, lsl #3]
	ldr	x8, [x22, #8]
	str	w24, [x8]
	str	w24, [x0]
	ldr	w8, [x22]
	str	w8, [x0, #24]
	stp	x20, x21, [x0, #8]
	add	x0, x0, #4
Lloh0:
	adrp	x1, l_.str.2@PAGE
Lloh1:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	mov	w3, #0
	bl	_av_dict_set
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	bl	_hb_error
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chapter array: malloc failure"

l_.str.1:                               ; @.str.1
	.asciz	"chapter: malloc failure"

l_.str.2:                               ; @.str.2
	.asciz	"title"

	.no_dead_strip	_add_chapter
.subsections_via_symbols
