	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Catalog_GetRoot           ## -- Begin function HPDF_Catalog_GetRoot
	.p2align	4, 0x90
_HPDF_Catalog_GetRoot:                  ## @HPDF_Catalog_GetRoot
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	_HPDF_OCLASS_DICT@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rsi
	callq	_HPDF_Dict_GetItem
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_HPDF_OSUBCLASS_PAGES@GOTPCREL(%rip), %rax
	movl	(%r15), %ecx
	orl	(%rax), %ecx
	cmpl	%ecx, (%r14)
	je	LBB0_5
LBB0_4:
	movl	(%rbx), %edi
	movq	_HPDF_PAGE_CANNOT_GET_ROOT_PAGES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_HPDF_SetError
	jmp	LBB0_5
LBB0_1:
	xorl	%r14d, %r14d
LBB0_5:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Pages"

	.comm	_HPDF_OCLASS_DICT,4,2           ## @HPDF_OCLASS_DICT
	.comm	_HPDF_OSUBCLASS_PAGES,4,2       ## @HPDF_OSUBCLASS_PAGES
	.comm	_HPDF_PAGE_CANNOT_GET_ROOT_PAGES,4,2 ## @HPDF_PAGE_CANNOT_GET_ROOT_PAGES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Catalog_GetRoot           ; -- Begin function HPDF_Catalog_GetRoot
	.p2align	2
_HPDF_Catalog_GetRoot:                  ; @HPDF_Catalog_GetRoot
	.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
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x21, _HPDF_OCLASS_DICT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _HPDF_OCLASS_DICT@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_HPDF_Dict_GetItem
	mov	x19, x0
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w8, [x19]
Lloh4:
	adrp	x9, _HPDF_OSUBCLASS_PAGES@GOTPAGE
Lloh5:
	ldr	x9, [x9, _HPDF_OSUBCLASS_PAGES@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	ldr	w10, [x21]
	orr	w9, w10, w9
	cmp	w8, w9
	b.eq	LBB0_5
LBB0_3:
	ldr	w0, [x20]
Lloh7:
	adrp	x8, _HPDF_PAGE_CANNOT_GET_ROOT_PAGES@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HPDF_PAGE_CANNOT_GET_ROOT_PAGES@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_HPDF_SetError
	b	LBB0_5
LBB0_4:
	mov	x19, #0
LBB0_5:
	mov	x0, 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
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Pages"

	.comm	_HPDF_OCLASS_DICT,4,2           ; @HPDF_OCLASS_DICT
	.comm	_HPDF_OSUBCLASS_PAGES,4,2       ; @HPDF_OSUBCLASS_PAGES
	.comm	_HPDF_PAGE_CANNOT_GET_ROOT_PAGES,4,2 ; @HPDF_PAGE_CANNOT_GET_ROOT_PAGES
.subsections_via_symbols
