	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_MemStream_WriteFunc       ## -- Begin function HPDF_MemStream_WriteFunc
	.p2align	4, 0x90
_HPDF_MemStream_WriteFunc:              ## @HPDF_MemStream_WriteFunc
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	%rsi, -48(%rbp)
	movq	%rdx, -40(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	movl	(%rbx), %edi
	callq	_HPDF_Error_GetCode
	testq	%rax, %rax
	je	LBB0_1
## %bb.8:
	movq	_HPDF_THIS_FUNC_WAS_SKIPPED@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_1:
	testq	%r14, %r14
	jle	LBB0_5
## %bb.2:
	leaq	-48(%rbp), %r14
	leaq	-40(%rbp), %r15
	movq	_HPDF_OK@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_HPDF_MemStream_InWrite
	cmpq	(%r12), %rax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, -40(%rbp)
	jg	LBB0_3
LBB0_5:
	movq	_HPDF_OK@GOTPCREL(%rip), %rax
LBB0_6:
	movq	(%rax), %rax
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" HPDF_MemStream_WriteFunc\n"

	.comm	_HPDF_THIS_FUNC_WAS_SKIPPED,8,3 ## @HPDF_THIS_FUNC_WAS_SKIPPED
	.comm	_HPDF_OK,8,3                    ## @HPDF_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_MemStream_WriteFunc       ; -- Begin function HPDF_MemStream_WriteFunc
	.p2align	2
_HPDF_MemStream_WriteFunc:              ; @HPDF_MemStream_WriteFunc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x2
	mov	x19, x0
	stp	x2, x1, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
	ldr	w0, [x19]
	bl	_HPDF_Error_GetCode
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _HPDF_THIS_FUNC_WAS_SKIPPED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HPDF_THIS_FUNC_WAS_SKIPPED@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	cmp	x20, #1
	b.lt	LBB0_6
; %bb.3:
Lloh4:
	adrp	x20, _HPDF_OK@GOTPAGE
Lloh5:
	ldr	x20, [x20, _HPDF_OK@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x19
	bl	_HPDF_MemStream_InWrite
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp]
	cmp	x8, #0
	b.gt	LBB0_4
LBB0_6:
Lloh6:
	adrp	x8, _HPDF_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HPDF_OK@GOTPAGEOFF]
LBB0_7:
	ldr	x0, [x8]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_MemStream_WriteFunc\n"

	.comm	_HPDF_THIS_FUNC_WAS_SKIPPED,8,3 ; @HPDF_THIS_FUNC_WAS_SKIPPED
	.comm	_HPDF_OK,8,3                    ; @HPDF_OK
.subsections_via_symbols
