	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Pages_AddKids             ## -- Begin function HPDF_Pages_AddKids
	.p2align	4, 0x90
_HPDF_Pages_AddKids:                    ## @HPDF_Pages_AddKids
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	movq	_HPDF_OCLASS_DICT@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_HPDF_Dict_GetItem
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	8(%r14), %edi
	movq	_HPDF_PAGE_CANNOT_SET_PARENT@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %esi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HPDF_SetError                  ## TAILCALL
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_HPDF_Dict_Add
	movq	_HPDF_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.4:
	movq	_HPDF_OCLASS_ARRAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_HPDF_Dict_GetItem
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	_HPDF_OSUBCLASS_PAGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%r15), %ecx
	cmpl	%ecx, 4(%rbx)
	jne	LBB0_8
## %bb.7:
	movslq	(%rbx), %rcx
	movq	%r14, (%rcx)
LBB0_8:
	movq	%rax, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HPDF_Array_Add                 ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	8(%r14), %edi
	movq	_HPDF_PAGES_MISSING_KIDS_ENTRY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" HPDF_Pages_AddKids\n"

L_.str.1:                               ## @.str.1
	.asciz	"Parent"

	.comm	_HPDF_OCLASS_DICT,4,2           ## @HPDF_OCLASS_DICT
	.comm	_HPDF_PAGE_CANNOT_SET_PARENT,4,2 ## @HPDF_PAGE_CANNOT_SET_PARENT
	.comm	_HPDF_OK,4,2                    ## @HPDF_OK
L_.str.2:                               ## @.str.2
	.asciz	"Kids"

	.comm	_HPDF_OCLASS_ARRAY,4,2          ## @HPDF_OCLASS_ARRAY
	.comm	_HPDF_PAGES_MISSING_KIDS_ENTRY,4,2 ## @HPDF_PAGES_MISSING_KIDS_ENTRY
	.comm	_HPDF_OSUBCLASS_PAGE,4,2        ## @HPDF_OSUBCLASS_PAGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Pages_AddKids             ; -- Begin function HPDF_Pages_AddKids
	.p2align	2
_HPDF_Pages_AddKids:                    ; @HPDF_Pages_AddKids
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
Lloh2:
	adrp	x21, _HPDF_OCLASS_DICT@GOTPAGE
Lloh3:
	ldr	x21, [x21, _HPDF_OCLASS_DICT@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_HPDF_Dict_GetItem
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x20, #8]
Lloh6:
	adrp	x8, _HPDF_PAGE_CANNOT_SET_PARENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HPDF_PAGE_CANNOT_SET_PARENT@GOTPAGEOFF]
LBB0_2:
	ldr	w1, [x8]
	mov	w2, #0
	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
	b	_HPDF_SetError
LBB0_3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_HPDF_Dict_Add
Lloh10:
	adrp	x8, _HPDF_OK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HPDF_OK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.4:
Lloh13:
	adrp	x8, _HPDF_OCLASS_ARRAY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HPDF_OCLASS_ARRAY@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_HPDF_Dict_GetItem
	cbz	x0, LBB0_9
; %bb.5:
	ldr	w8, [x19, #4]
	ldr	w9, [x21]
Lloh18:
	adrp	x10, _HPDF_OSUBCLASS_PAGE@GOTPAGE
Lloh19:
	ldr	x10, [x10, _HPDF_OSUBCLASS_PAGE@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	orr	w9, w10, w9
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.6:
	ldrsw	x8, [x19]
	str	x20, [x8]
LBB0_7:
	mov	x1, x19
	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
	b	_HPDF_Array_Add
LBB0_8:
	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_9:
	ldr	w0, [x20, #8]
Lloh21:
	adrp	x8, _HPDF_PAGES_MISSING_KIDS_ENTRY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HPDF_PAGES_MISSING_KIDS_ENTRY@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_Pages_AddKids\n"

l_.str.1:                               ; @.str.1
	.asciz	"Parent"

	.comm	_HPDF_OCLASS_DICT,4,2           ; @HPDF_OCLASS_DICT
	.comm	_HPDF_PAGE_CANNOT_SET_PARENT,4,2 ; @HPDF_PAGE_CANNOT_SET_PARENT
	.comm	_HPDF_OK,4,2                    ; @HPDF_OK
l_.str.2:                               ; @.str.2
	.asciz	"Kids"

	.comm	_HPDF_OCLASS_ARRAY,4,2          ; @HPDF_OCLASS_ARRAY
	.comm	_HPDF_PAGES_MISSING_KIDS_ENTRY,4,2 ; @HPDF_PAGES_MISSING_KIDS_ENTRY
	.comm	_HPDF_OSUBCLASS_PAGE,4,2        ; @HPDF_OSUBCLASS_PAGE
.subsections_via_symbols
