	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_String_Write              ## -- Begin function HPDF_String_Write
	.p2align	4, 0x90
_HPDF_String_Write:                     ## @HPDF_String_Write
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	testq	%r12, %r12
	je	LBB0_1
## %bb.12:
	movq	%r12, %rdi
	callq	_HPDF_Encrypt_Reset
	cmpq	$0, 8(%rbx)
	jne	LBB0_2
## %bb.13:
	movl	%r15d, %edi
	movl	$60, %esi
	callq	_HPDF_Stream_WriteChar
	movq	_HPDF_OK@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	jne	LBB0_27
## %bb.14:
	movq	16(%rbx), %rbx
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_HPDF_StrLen
	movl	%r15d, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	movq	%r12, %rcx
	callq	_HPDF_Stream_WriteBinary
	cmpl	(%r14), %eax
	jne	LBB0_27
## %bb.15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.16:
	movl	%r15d, %edi
	movl	$62, %esi
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HPDF_Stream_WriteChar          ## TAILCALL
LBB0_1:
	cmpq	$0, 8(%rbx)
	je	LBB0_17
LBB0_2:
	leaq	8(%rbx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rsp, -104(%rbp)                ## 8-byte Spill
	movq	16(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_HPDF_TEXT_DEFAULT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movl	%r15d, %edi
	movl	$60, %esi
	callq	_HPDF_Stream_WriteChar
	movq	_HPDF_OK@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jne	LBB0_24
## %bb.3:
	movq	_UNICODE_HEADER@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	$2, %edx
	movl	%r15d, %edi
	movq	%r12, %rcx
	callq	_HPDF_Stream_WriteBinary
	cmpl	(%rbx), %eax
	jne	LBB0_24
## %bb.4:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	leaq	-88(%rbp), %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-112(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rcx
	callq	_HPDF_Encoder_SetParseText
	testq	%r14, %r14
	jle	LBB0_25
## %bb.5:
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %r13
	shlq	$8, %r15
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addq	8(%rax,%r12,8), %r15
LBB0_20:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	%r15, %rsi
	callq	_HPDF_Encoder_ToUnicode
	movl	%eax, -84(%rbp)
	leaq	-84(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_HPDF_UInt16Swap
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rbx
	movl	$2, %edx
	callq	_HPDF_MemCpy
	addq	$16, %rbx
	incq	%r14
LBB0_21:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	cmpq	%r12, -112(%rbp)                ## 8-byte Folded Reload
	je	LBB0_22
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r12,8), %r15
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	leaq	-88(%rbp), %rsi
	callq	_HPDF_Encoder_ByteType
	movq	%rax, %r13
	movq	_HPDF_TEXT_DEFAULT_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	decq	%rax
	cmpq	%rax, %r14
	jb	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	addq	%r14, %r14
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	callq	_HPDF_Stream_WriteBinary
	movq	_HPDF_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_24
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%r14d, %r14d
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_HPDF_BYTE_TYPE_TRIAL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_21
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_HPDF_BYTE_TYPE_LEAD@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_19
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %r13
	jmp	LBB0_20
LBB0_17:
	movq	16(%rbx), %rsi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.18:
	movl	%r15d, %edi
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HPDF_Stream_WriteEscapeText    ## TAILCALL
LBB0_22:
	testq	%r14, %r14
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	_HPDF_OK@GOTPCREL(%rip), %rbx
	je	LBB0_25
## %bb.23:
	addq	%r14, %r14
	movl	%r15d, %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_HPDF_Stream_WriteBinary
	cmpl	(%rbx), %eax
	jne	LBB0_24
LBB0_25:
	movl	%r15d, %edi
	movl	$62, %esi
	callq	_HPDF_Stream_WriteChar
	cmpl	(%rbx), %eax
	movq	-104(%rbp), %rsp                ## 8-byte Reload
	jne	LBB0_27
## %bb.26:
	movl	(%rbx), %eax
	jmp	LBB0_27
LBB0_24:
	movq	-104(%rbp), %rsp                ## 8-byte Reload
LBB0_27:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_29
## %bb.28:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" HPDF_String_Write\n"

	.comm	_HPDF_OK,4,2                    ## @HPDF_OK
	.comm	_HPDF_TEXT_DEFAULT_LEN,4,2      ## @HPDF_TEXT_DEFAULT_LEN
	.comm	_UNICODE_HEADER,8,3             ## @UNICODE_HEADER
	.comm	_HPDF_BYTE_TYPE_TRIAL,8,3       ## @HPDF_BYTE_TYPE_TRIAL
	.comm	_HPDF_BYTE_TYPE_LEAD,8,3        ## @HPDF_BYTE_TYPE_LEAD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_String_Write              ; -- Begin function HPDF_String_Write
	.p2align	2
_HPDF_String_Write:                     ; @HPDF_String_Write
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
	cbz	x20, LBB0_6
; %bb.1:
	mov	x0, x20
	bl	_HPDF_Encrypt_Reset
	mov	x27, x22
	ldr	x8, [x27, #8]!
	cbnz	x8, LBB0_7
; %bb.2:
	mov	x0, x19
	mov	w1, #60
	bl	_HPDF_Stream_WriteChar
Lloh5:
	adrp	x23, _HPDF_OK@GOTPAGE
Lloh6:
	ldr	x23, [x23, _HPDF_OK@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_26
; %bb.3:
	ldr	x21, [x22, #16]
	mov	x0, x21
	mov	w1, #-1
	bl	_HPDF_StrLen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	bl	_HPDF_Stream_WriteBinary
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_26
; %bb.4:
	ldur	x8, [x29, #-88]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.5:
	mov	x0, x19
	mov	w1, #62
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_HPDF_Stream_WriteChar
LBB0_6:
	mov	x27, x22
	ldr	x8, [x27, #8]!
	cbz	x8, LBB0_19
LBB0_7:
	mov	x24, sp
	ldr	x23, [x22, #16]
Lloh10:
	adrp	x8, _HPDF_TEXT_DEFAULT_LEN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HPDF_TEXT_DEFAULT_LEN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	lsl	w8, w8, #1
	lsl	x8, x8, #3
	mov	x9, x8
Lloh13:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh14:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x21, x9, x8
	mov	sp, x21
	ldr	x22, [x22]
	mov	x0, x19
	mov	w1, #60
	bl	_HPDF_Stream_WriteChar
Lloh15:
	adrp	x25, _HPDF_OK@GOTPAGE
Lloh16:
	ldr	x25, [x25, _HPDF_OK@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_25
; %bb.8:
Lloh17:
	adrp	x8, _UNICODE_HEADER@GOTPAGE
Lloh18:
	ldr	x8, [x8, _UNICODE_HEADER@GOTPAGEOFF]
Lloh19:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #2
	mov	x3, x20
	bl	_HPDF_Stream_WriteBinary
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_25
; %bb.9:
	ldr	x0, [x27]
	sub	x1, x29, #92
	mov	x2, x23
	mov	x3, x22
	bl	_HPDF_Encoder_SetParseText
	cmp	x22, #1
	b.lt	LBB0_23
; %bb.10:
	stur	x24, [x29, #-104]               ; 8-byte Folded Spill
	mov	x26, #0
	add	x28, x23, #8
	mov	x23, x21
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	x0, [x27]
	mov	x1, x24
	bl	_HPDF_Encoder_ToUnicode
	stur	w0, [x29, #-96]
	sub	x0, x29, #96
	bl	_HPDF_UInt16Swap
	sub	x1, x29, #96
	mov	x0, x23
	mov	w2, #2
	bl	_HPDF_MemCpy
	add	x23, x23, #16
	add	x26, x26, #1
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x28, x28, #8
	subs	x22, x22, #1
	b.eq	LBB0_21
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldur	x24, [x28, #-8]
	ldr	x0, [x27]
	sub	x1, x29, #92
	bl	_HPDF_Encoder_ByteType
	mov	x25, x0
Lloh20:
	adrp	x8, _HPDF_TEXT_DEFAULT_LEN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HPDF_TEXT_DEFAULT_LEN@GOTPAGEOFF]
Lloh22:
	ldrsw	x8, [x8]
	sub	x8, x8, #1
	cmp	x26, x8
	b.lo	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	lsl	x2, x26, #1
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	bl	_HPDF_Stream_WriteBinary
Lloh23:
	adrp	x8, _HPDF_OK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HPDF_OK@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_24
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x26, #0
	mov	x23, x21
LBB0_16:                                ;   in Loop: Header=BB0_13 Depth=1
Lloh26:
	adrp	x8, _HPDF_BYTE_TYPE_TRIAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _HPDF_BYTE_TYPE_TRIAL@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	cmp	x25, x8
	b.eq	LBB0_12
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
Lloh29:
	adrp	x8, _HPDF_BYTE_TYPE_LEAD@GOTPAGE
Lloh30:
	ldr	x8, [x8, _HPDF_BYTE_TYPE_LEAD@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	cmp	x25, x8
	b.ne	LBB0_11
; %bb.18:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x28]
	add	x24, x8, x24, lsl #8
	b	LBB0_11
LBB0_19:
	ldr	x1, [x22, #16]
	ldur	x8, [x29, #-88]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.20:
	mov	x0, x19
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_HPDF_Stream_WriteEscapeText
LBB0_21:
	ldur	x24, [x29, #-104]               ; 8-byte Folded Reload
Lloh35:
	adrp	x25, _HPDF_OK@GOTPAGE
Lloh36:
	ldr	x25, [x25, _HPDF_OK@GOTPAGEOFF]
	cbz	x26, LBB0_23
; %bb.22:
	lsl	x2, x26, #1
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	bl	_HPDF_Stream_WriteBinary
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_25
LBB0_23:
	mov	x0, x19
	mov	w1, #62
	bl	_HPDF_Stream_WriteChar
	ldr	w8, [x25]
	mov	sp, x24
	ldr	w9, [x25]
	cmp	w0, w8
	csel	w0, w9, w0, eq
	b	LBB0_26
LBB0_24:
	ldur	x24, [x29, #-104]               ; 8-byte Folded Reload
LBB0_25:
	mov	sp, x24
LBB0_26:
	ldur	x8, [x29, #-88]
Lloh37:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh38:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.27:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_String_Write\n"

	.comm	_HPDF_OK,4,2                    ; @HPDF_OK
	.comm	_HPDF_TEXT_DEFAULT_LEN,4,2      ; @HPDF_TEXT_DEFAULT_LEN
	.comm	_UNICODE_HEADER,8,3             ; @UNICODE_HEADER
	.comm	_HPDF_BYTE_TYPE_TRIAL,8,3       ; @HPDF_BYTE_TYPE_TRIAL
	.comm	_HPDF_BYTE_TYPE_LEAD,8,3        ; @HPDF_BYTE_TYPE_LEAD
.subsections_via_symbols
