	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Xref_New                  ## -- Begin function HPDF_Xref_New
	.p2align	4, 0x90
_HPDF_Xref_New:                         ## @HPDF_Xref_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_HPDF_GetMem
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_HPDF_MemSet
	movq	%r14, 32(%rbx)
	movl	(%r14), %eax
	movl	%eax, 24(%rbx)
	movq	%r15, (%rbx)
	movq	_HPDF_DEFALUT_XREF_ENTRY_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_HPDF_List_New
	movl	%eax, 12(%rbx)
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	movq	$0, 16(%rbx)
	cmpq	$0, (%rbx)
	je	LBB0_3
LBB0_7:
	movq	%r14, %rdi
	callq	_HPDF_Dict_New
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_8
LBB0_3:
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_HPDF_GetMem
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	%rax, %r15
	movl	12(%rbx), %edi
	movq	%rax, %rsi
	callq	_HPDF_List_Add
	movq	_HPDF_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.6:
	movq	_HPDF_FREE_ENTRY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r15)
	movq	$0, 16(%r15)
	movq	_HPDF_MAX_GENERATION_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	$0, (%r15)
	jmp	LBB0_7
LBB0_5:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_HPDF_FreeMem
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	callq	_HPDF_PTRACE
	movq	%rbx, %rdi
	callq	_HPDF_Xref_Free
LBB0_9:
	xorl	%ebx, %ebx
LBB0_10:
	movq	%rbx, %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	" HPDF_Xref_New\n"

	.comm	_HPDF_DEFALUT_XREF_ENTRY_NUM,4,2 ## @HPDF_DEFALUT_XREF_ENTRY_NUM
	.comm	_HPDF_OK,8,3                    ## @HPDF_OK
	.comm	_HPDF_FREE_ENTRY,4,2            ## @HPDF_FREE_ENTRY
	.comm	_HPDF_MAX_GENERATION_NUM,4,2    ## @HPDF_MAX_GENERATION_NUM
L_.str.1:                               ## @.str.1
	.asciz	" HPDF_Xref_New failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Xref_New                  ; -- Begin function HPDF_Xref_New
	.p2align	2
_HPDF_Xref_New:                         ; @HPDF_Xref_New
	.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	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
	mov	x0, x20
	mov	w1, #4
	bl	_HPDF_GetMem
	mov	x19, x0
	cbz	x0, LBB0_9
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4
	bl	_HPDF_MemSet
	str	x20, [x19, #32]
	ldr	w8, [x20]
	str	w8, [x19, #24]
	str	x21, [x19]
Lloh2:
	adrp	x8, _HPDF_DEFALUT_XREF_ENTRY_NUM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HPDF_DEFALUT_XREF_ENTRY_NUM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_HPDF_List_New
	str	w0, [x19, #12]
	cbz	w0, LBB0_8
; %bb.2:
	str	xzr, [x19, #16]
	ldr	x8, [x19]
	cbz	x8, LBB0_4
LBB0_3:
	mov	x0, x20
	bl	_HPDF_Dict_New
	str	w0, [x19, #8]
	cbnz	w0, LBB0_9
	b	LBB0_8
LBB0_4:
	mov	x0, x20
	mov	w1, #4
	bl	_HPDF_GetMem
	cbz	x0, LBB0_8
; %bb.5:
	mov	x21, x0
	ldr	w0, [x19, #12]
	mov	x1, x21
	bl	_HPDF_List_Add
Lloh5:
	adrp	x8, _HPDF_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HPDF_OK@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.6:
Lloh8:
	adrp	x8, _HPDF_FREE_ENTRY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HPDF_FREE_ENTRY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x21, #24]
	str	xzr, [x21, #16]
Lloh11:
	adrp	x8, _HPDF_MAX_GENERATION_NUM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HPDF_MAX_GENERATION_NUM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x21, #8]
	str	xzr, [x21]
	b	LBB0_3
LBB0_7:
	mov	x0, x20
	mov	x1, x21
	bl	_HPDF_FreeMem
LBB0_8:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_HPDF_PTRACE
	mov	x0, x19
	bl	_HPDF_Xref_Free
	mov	x19, #0
LBB0_9:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_Xref_New\n"

	.comm	_HPDF_DEFALUT_XREF_ENTRY_NUM,4,2 ; @HPDF_DEFALUT_XREF_ENTRY_NUM
	.comm	_HPDF_OK,8,3                    ; @HPDF_OK
	.comm	_HPDF_FREE_ENTRY,4,2            ; @HPDF_FREE_ENTRY
	.comm	_HPDF_MAX_GENERATION_NUM,4,2    ; @HPDF_MAX_GENERATION_NUM
l_.str.1:                               ; @.str.1
	.asciz	" HPDF_Xref_New failed\n"

.subsections_via_symbols
