	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Pages_New                 ## -- Begin function HPDF_Pages_New
	.p2align	4, 0x90
_HPDF_Pages_New:                        ## @HPDF_Pages_New
	.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
	movl	%edx, %r15d
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	_HPDF_OK@GOTPCREL(%rip), %r13
	movq	(%r13), %r12
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	movl	%ebx, %edi
	callq	_HPDF_Dict_New
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movq	_HPDF_OSUBCLASS_PAGES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
	movq	_Pages_BeforeWrite@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_HPDF_Xref_Add
	cmpq	(%r13), %rax
	jne	LBB0_7
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	callq	_HPDF_Dict_AddName
	movq	%rax, %r15
	addq	%r12, %r15
	movl	(%rbx), %edi
	callq	_HPDF_Array_New
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_HPDF_Dict_Add
	movq	%rax, %r12
	addq	%r15, %r12
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_HPDF_Number_New
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_HPDF_Dict_Add
	movq	%rax, %r15
	addq	%r12, %r15
	movq	(%r13), %rcx
	testq	%r14, %r14
	je	LBB0_5
## %bb.3:
	cmpq	%rcx, %r15
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_HPDF_Pages_AddKids
	addq	%rax, %r15
	movq	(%r13), %rcx
LBB0_5:
	xorl	%eax, %eax
	cmpq	%rcx, %r15
	cmoveq	%rbx, %rax
	jmp	LBB0_8
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HPDF_OK,8,3                    ## @HPDF_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" HPDF_Pages_New\n"

	.comm	_HPDF_OSUBCLASS_PAGES,4,2       ## @HPDF_OSUBCLASS_PAGES
	.comm	_Pages_BeforeWrite,4,2          ## @Pages_BeforeWrite
L_.str.1:                               ## @.str.1
	.asciz	"Type"

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

L_.str.3:                               ## @.str.3
	.asciz	"Kids"

L_.str.4:                               ## @.str.4
	.asciz	"Count"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Pages_New                 ; -- Begin function HPDF_Pages_New
	.p2align	2
_HPDF_Pages_New:                        ; @HPDF_Pages_New
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _HPDF_OK@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HPDF_OK@GOTPAGEOFF]
	ldr	x23, [x22]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
	mov	x0, x19
	bl	_HPDF_Dict_New
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh4:
	adrp	x8, _HPDF_OSUBCLASS_PAGES@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HPDF_OSUBCLASS_PAGES@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x0, #8]
	orr	w8, w9, w8
Lloh7:
	adrp	x9, _Pages_BeforeWrite@GOTPAGE
Lloh8:
	ldr	x9, [x9, _Pages_BeforeWrite@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #4]
	mov	x0, x21
	mov	x1, x19
	bl	_HPDF_Xref_Add
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.2:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh12:
	adrp	x2, l_.str.2@PAGE
Lloh13:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_HPDF_Dict_AddName
	add	x21, x0, x23
	ldr	w0, [x19]
	bl	_HPDF_Array_New
	mov	x2, x0
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_HPDF_Dict_Add
	add	x21, x21, x0
	ldr	w0, [x19]
	mov	w1, #0
	bl	_HPDF_Number_New
	mov	x2, x0
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_HPDF_Dict_Add
	add	x21, x21, x0
	ldr	x8, [x22]
	cbz	x20, LBB0_5
; %bb.3:
	cmp	x21, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	bl	_HPDF_Pages_AddKids
	add	x21, x0, x21
	ldr	x8, [x22]
LBB0_5:
	cmp	x21, x8
	csel	x0, x19, xzr, eq
	b	LBB0_7
LBB0_6:
	mov	x0, #0
LBB0_7:
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HPDF_OK,8,3                    ; @HPDF_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_Pages_New\n"

	.comm	_HPDF_OSUBCLASS_PAGES,4,2       ; @HPDF_OSUBCLASS_PAGES
	.comm	_Pages_BeforeWrite,4,2          ; @Pages_BeforeWrite
l_.str.1:                               ; @.str.1
	.asciz	"Type"

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

l_.str.3:                               ; @.str.3
	.asciz	"Kids"

l_.str.4:                               ; @.str.4
	.asciz	"Count"

.subsections_via_symbols
