	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Page_New                  ## -- Begin function HPDF_Page_New
	.p2align	4, 0x90
_HPDF_Page_New:                         ## @HPDF_Page_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	%esi, %r12d
	movl	%edi, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	movl	%ebx, %edi
	callq	_HPDF_Dict_New
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movq	_HPDF_OSUBCLASS_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%rbx)
	movq	_Page_OnFree@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_Page_BeforeWrite@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	(%rbx), %edi
	movl	$4, %esi
	callq	_HPDF_GetMem
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %r15
	movq	%rax, 8(%rbx)
	xorl	%r14d, %r14d
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_HPDF_MemSet
	movq	_HPDF_GMODE_PAGE_DESCRIPTION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r15)
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_HPDF_ToPoint
	movq	%rax, 32(%r15)
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_HPDF_ToPoint
	movq	%rax, 24(%r15)
	movl	%r12d, %edi
	movq	%rbx, %rsi
	callq	_HPDF_Xref_Add
	movq	%rax, %r13
	movq	_HPDF_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_9
## %bb.3:
	movl	(%rbx), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_HPDF_GState_New
	movl	%eax, 16(%r15)
	movl	(%rbx), %edi
	movl	%r12d, %esi
	callq	_HPDF_DictStream_New
	movq	%rax, (%r15)
	cmpl	$0, 16(%r15)
	je	LBB0_9
## %bb.4:
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movl	%r12d, 8(%r15)
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	callq	_HPDF_Dict_AddName
	movq	%rax, %r12
	addq	%r13, %r12
	movl	(%rbx), %r13d
	movq	_HPDF_DEF_PAGE_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_HPDF_DEF_PAGE_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_HPDF_ToBox
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_HPDF_Box_Array_New
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	callq	_HPDF_Dict_Add
	movq	%rax, %r13
	addq	%r12, %r13
	movq	(%r15), %rdx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_HPDF_Dict_Add
	movq	%rax, %r15
	addq	%r13, %r15
	movq	%rbx, %rdi
	callq	_AddResource
	addq	%r15, %rax
	movq	_HPDF_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	cmoveq	%rbx, %r14
	jmp	LBB0_9
LBB0_7:
	movq	%rbx, %rdi
	callq	_HPDF_Dict_Free
LBB0_8:
	xorl	%r14d, %r14d
LBB0_9:
	movq	%r14, %rax
	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	" HPDF_Page_New\n"

	.comm	_HPDF_OSUBCLASS_PAGE,4,2        ## @HPDF_OSUBCLASS_PAGE
	.comm	_Page_OnFree,4,2                ## @Page_OnFree
	.comm	_Page_BeforeWrite,4,2           ## @Page_BeforeWrite
	.comm	_HPDF_GMODE_PAGE_DESCRIPTION,4,2 ## @HPDF_GMODE_PAGE_DESCRIPTION
	.comm	_HPDF_OK,8,3                    ## @HPDF_OK
L_.str.1:                               ## @.str.1
	.asciz	"Type"

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

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

	.comm	_HPDF_DEF_PAGE_WIDTH,8,3        ## @HPDF_DEF_PAGE_WIDTH
	.comm	_HPDF_DEF_PAGE_HEIGHT,8,3       ## @HPDF_DEF_PAGE_HEIGHT
L_.str.4:                               ## @.str.4
	.asciz	"Contents"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Page_New                  ; -- Begin function HPDF_Page_New
	.p2align	2
_HPDF_Page_New:                         ; @HPDF_Page_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, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
	mov	x0, x19
	bl	_HPDF_Dict_New
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x8, _HPDF_OSUBCLASS_PAGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HPDF_OSUBCLASS_PAGE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x0, #24]
	orr	w8, w9, w8
	str	w8, [x0, #24]
Lloh5:
	adrp	x8, _Page_OnFree@GOTPAGE
Lloh6:
	ldr	x8, [x8, _Page_OnFree@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _Page_BeforeWrite@GOTPAGE
Lloh9:
	ldr	x9, [x9, _Page_BeforeWrite@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #16]
	ldr	w0, [x0]
	mov	w1, #4
	bl	_HPDF_GetMem
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	str	x0, [x19, #8]
	mov	w1, #0
	mov	w2, #4
	bl	_HPDF_MemSet
Lloh11:
	adrp	x8, _HPDF_GMODE_PAGE_DESCRIPTION@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HPDF_GMODE_PAGE_DESCRIPTION@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x20, #40]
	mov	w0, #0
	mov	w1, #0
	bl	_HPDF_ToPoint
	str	x0, [x20, #32]
	mov	w0, #0
	mov	w1, #0
	bl	_HPDF_ToPoint
	str	x0, [x20, #24]
	mov	x0, x21
	mov	x1, x19
	bl	_HPDF_Xref_Add
Lloh14:
	adrp	x23, _HPDF_OK@GOTPAGE
Lloh15:
	ldr	x23, [x23, _HPDF_OK@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.3:
	mov	x22, x0
	ldr	w0, [x19]
	mov	x1, #0
	bl	_HPDF_GState_New
	str	w0, [x20, #16]
	ldr	w0, [x19]
	mov	x1, x21
	bl	_HPDF_DictStream_New
	mov	x8, x0
	mov	x0, #0
	str	x8, [x20]
	ldr	w9, [x20, #16]
	cbz	w9, LBB0_8
; %bb.4:
	cbz	x8, LBB0_8
; %bb.5:
	ldr	w8, [x8]
	stp	w21, w8, [x20, #8]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh18:
	adrp	x2, l_.str.2@PAGE
Lloh19:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_HPDF_Dict_AddName
	add	x22, x0, x22
	ldr	w21, [x19]
Lloh20:
	adrp	x8, _HPDF_DEF_PAGE_WIDTH@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HPDF_DEF_PAGE_WIDTH@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
Lloh23:
	adrp	x8, _HPDF_DEF_PAGE_HEIGHT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HPDF_DEF_PAGE_HEIGHT@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x8]
	mov	w0, #0
	mov	w1, #0
	bl	_HPDF_ToBox
	mov	x1, x0
	mov	x0, x21
	bl	_HPDF_Box_Array_New
	mov	x2, x0
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_HPDF_Dict_Add
	add	x21, x22, x0
	ldr	x2, [x20]
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_HPDF_Dict_Add
	add	x20, x21, x0
	mov	x0, x19
	bl	_AddResource
	ldr	x8, [x23]
	add	x9, x20, x0
	cmp	x9, x8
	csel	x0, x19, xzr, eq
	b	LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_HPDF_Dict_Free
LBB0_7:
	mov	x0, #0
LBB0_8:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_Page_New\n"

	.comm	_HPDF_OSUBCLASS_PAGE,4,2        ; @HPDF_OSUBCLASS_PAGE
	.comm	_Page_OnFree,4,2                ; @Page_OnFree
	.comm	_Page_BeforeWrite,4,2           ; @Page_BeforeWrite
	.comm	_HPDF_GMODE_PAGE_DESCRIPTION,4,2 ; @HPDF_GMODE_PAGE_DESCRIPTION
	.comm	_HPDF_OK,8,3                    ; @HPDF_OK
l_.str.1:                               ; @.str.1
	.asciz	"Type"

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

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

	.comm	_HPDF_DEF_PAGE_WIDTH,8,3        ; @HPDF_DEF_PAGE_WIDTH
	.comm	_HPDF_DEF_PAGE_HEIGHT,8,3       ; @HPDF_DEF_PAGE_HEIGHT
l_.str.4:                               ; @.str.4
	.asciz	"Contents"

.subsections_via_symbols
