	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_MemStream_GetBufPtr       ## -- Begin function HPDF_MemStream_GetBufPtr
	.p2align	4, 0x90
_HPDF_MemStream_GetBufPtr:              ## @HPDF_MemStream_GetBufPtr
	.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
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	movq	(%rbx), %rax
	movq	_HPDF_STREAM_MEMORY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	16(%rbx), %r13
	movq	8(%r13), %rdi
	movl	%r15d, %esi
	callq	_HPDF_List_ItemAt
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	8(%r13), %rax
	movl	(%rax), %eax
	decl	%eax
	xorl	%ecx, %ecx
	cmpl	%r15d, %eax
	setne	%cl
	movl	(%r13,%rcx,4), %eax
	movl	%eax, (%r14)
	jmp	LBB0_5
LBB0_1:
	movl	8(%rbx), %edi
	movq	_HPDF_INVALID_OBJECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	callq	_HPDF_SetError
	jmp	LBB0_5
LBB0_3:
	movl	8(%rbx), %edi
	movq	_HPDF_INVALID_PARAMETER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	callq	_HPDF_SetError
	movl	$0, (%r14)
LBB0_5:
	movq	%r12, %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_MemStream_GetBufPtr\n"

	.comm	_HPDF_STREAM_MEMORY,8,3         ## @HPDF_STREAM_MEMORY
	.comm	_HPDF_INVALID_OBJECT,4,2        ## @HPDF_INVALID_OBJECT
	.comm	_HPDF_INVALID_PARAMETER,4,2     ## @HPDF_INVALID_PARAMETER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_MemStream_GetBufPtr       ; -- Begin function HPDF_MemStream_GetBufPtr
	.p2align	2
_HPDF_MemStream_GetBufPtr:              ; @HPDF_MemStream_GetBufPtr
	.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, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _HPDF_STREAM_MEMORY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HPDF_STREAM_MEMORY@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x22, [x21, #16]
	ldr	x0, [x22, #8]
	mov	x1, x20
	bl	_HPDF_List_ItemAt
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x22, #8]
	ldr	w8, [x8]
	sub	w8, w8, #1
	cmp	w8, w20
	cset	w8, ne
	ldr	w8, [x22, w8, uxtw #2]
	str	w8, [x19]
	b	LBB0_5
LBB0_3:
	ldr	w0, [x21, #8]
Lloh5:
	adrp	x8, _HPDF_INVALID_OBJECT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HPDF_INVALID_OBJECT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_HPDF_SetError
	mov	x0, #0
	b	LBB0_5
LBB0_4:
	ldr	w0, [x21, #8]
Lloh8:
	adrp	x8, _HPDF_INVALID_PARAMETER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HPDF_INVALID_PARAMETER@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_HPDF_SetError
	mov	x0, #0
	str	wzr, [x19]
LBB0_5:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_MemStream_GetBufPtr\n"

	.comm	_HPDF_STREAM_MEMORY,8,3         ; @HPDF_STREAM_MEMORY
	.comm	_HPDF_INVALID_OBJECT,4,2        ; @HPDF_INVALID_OBJECT
	.comm	_HPDF_INVALID_PARAMETER,4,2     ; @HPDF_INVALID_PARAMETER
.subsections_via_symbols
