	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function MeasureText
_MeasureText:                           ## @MeasureText
	.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
	movl	%r9d, -76(%rbp)                 ## 4-byte Spill
	movl	%r8d, -84(%rbp)                 ## 4-byte Spill
	movl	%ecx, -80(%rbp)                 ## 4-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movslq	(%rdi), %rbx
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movq	16(%rbx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	movq	8(%rbx), %rax
	movq	(%rax), %rcx
	movq	_HPDF_FONTDEF_TYPE_CID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.1:
	movslq	24(%rax), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
LBB0_2:
	movq	16(%rax), %rcx
	subq	8(%rax), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
LBB0_3:
	movq	32(%rbp), %r13
	leaq	-88(%rbp), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_HPDF_Encoder_SetParseText
	testq	%rbx, %rbx
	jle	LBB0_4
## %bb.5:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	negl	%eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r14,4), %r12d
	movl	%r12d, %r15d
	shll	$8, %r15d
	addl	4(%rax,%r14,4), %r15d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	leaq	-88(%rbp), %rsi
	callq	_HPDF_Encoder_ByteType
	movq	%rax, %rcx
	movq	_HPDF_BYTE_TYPE_LEAD@GOTPCREL(%rip), %rax
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	cmpq	(%rax), %rcx
	cmovnel	%r12d, %r15d
	movl	%r12d, %edi
	callq	_HPDF_IS_WHITE_SPACE
	cmpl	$0, 24(%rbp)
	je	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	testq	%rax, %rax
	jne	LBB0_11
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	testq	%rax, %rax
	je	LBB0_8
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	leaq	1(%r14), %rax
	movq	%rax, %rcx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%r13, %r13
	je	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, (%r13)
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %edi
	callq	_HPDF_IS_WHITE_SPACE
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	movl	16(%rbp), %r13d
	cmovel	%eax, %r13d
	addl	%ebx, %r13d
	movq	_HPDF_BYTE_TYPE_TRIAL@GOTPCREL(%rip), %rcx
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	cmpq	(%rcx), %rdx
	je	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movq	(%rbx), %rcx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	movq	_HPDF_WMODE_HORIZONTAL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	_HPDF_FONTDEF_TYPE_CID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_HPDF_CMapEncoder_ToCID
	movq	8(%rbx), %rdi
	movl	%eax, %esi
	callq	_HPDF_CIDFontDef_GetCIDWidth
	jmp	LBB0_19
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_HPDF_BYTE_TYPE_SINGLE@GOTPCREL(%rip), %rax
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	cmpq	(%rax), %rdx
	setne	%al
	movq	_HPDF_BYTE_TYPE_LEAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	setne	%cl
	testb	%cl, %al
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmoveq	%r14, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rax
	testq	%r13, %r13
	jne	LBB0_13
	jmp	LBB0_14
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	*(%rdi)
	movq	8(%rbx), %rdi
	movl	%eax, %esi
	callq	_HPDF_TTFontDef_GetCharWidth
LBB0_19:                                ##   in Loop: Header=BB0_6 Depth=1
	testq	%r14, %r14
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	movl	$0, %edx
	cmovel	%edx, %ecx
	addl	%ecx, %r13d
LBB0_20:                                ##   in Loop: Header=BB0_6 Depth=1
	imull	-84(%rbp), %eax                 ## 4-byte Folded Reload
	cltq
	imulq	$274877907, %rax, %rbx          ## imm = 0x10624DD3
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$38, %rbx
	addl	%eax, %ebx
	addl	%r13d, %ebx
	cmpl	-80(%rbp), %ebx                 ## 4-byte Folded Reload
	jg	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$10, %r12d
	je	LBB0_21
## %bb.23:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %edi
	callq	_HPDF_IS_WHITE_SPACE
	incq	%r14
	cmpq	%r14, -56(%rbp)                 ## 8-byte Folded Reload
	movq	32(%rbp), %r13
	jne	LBB0_6
## %bb.24:
	testq	%r13, %r13
	jne	LBB0_25
	jmp	LBB0_26
LBB0_4:
	xorl	%ebx, %ebx
	testq	%r13, %r13
	je	LBB0_26
LBB0_25:
	movl	%ebx, (%r13)
	jmp	LBB0_26
LBB0_21:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_26:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HPDF_BYTE_TYPE_TRIAL,8,3       ## @HPDF_BYTE_TYPE_TRIAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" HPDF_Type0Font_MeasureText\n"

	.comm	_HPDF_FONTDEF_TYPE_CID,8,3      ## @HPDF_FONTDEF_TYPE_CID
	.comm	_HPDF_BYTE_TYPE_LEAD,8,3        ## @HPDF_BYTE_TYPE_LEAD
	.comm	_HPDF_BYTE_TYPE_SINGLE,8,3      ## @HPDF_BYTE_TYPE_SINGLE
	.comm	_HPDF_WMODE_HORIZONTAL,8,3      ## @HPDF_WMODE_HORIZONTAL
	.no_dead_strip	_MeasureText
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function MeasureText
_MeasureText:                           ; @MeasureText
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	stp	w6, w7, [sp, #24]               ; 8-byte Folded Spill
	stp	w5, w3, [sp, #12]               ; 8-byte Folded Spill
	str	w4, [sp, #20]                   ; 4-byte Folded Spill
	mov	x24, x2
	str	x1, [sp, #32]                   ; 8-byte Folded Spill
	ldr	x20, [x29, #16]
	ldrsw	x21, [x0]
	ldr	x26, [x21, #16]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
	ldr	x8, [x21, #8]
	ldr	x9, [x8]
Lloh2:
	adrp	x10, _HPDF_FONTDEF_TYPE_CID@GOTPAGE
Lloh3:
	ldr	x10, [x10, _HPDF_FONTDEF_TYPE_CID@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
	ldrsw	x8, [x8, #24]
	ldr	x8, [x8]
	ldr	x22, [x8, #8]
	b	LBB0_3
LBB0_2:
	ldp	x8, x9, [x8, #8]
	sub	x22, x9, x8
LBB0_3:
	add	x1, sp, #44
	mov	x0, x26
	ldr	x2, [sp, #32]                   ; 8-byte Folded Reload
	mov	x3, x24
	bl	_HPDF_Encoder_SetParseText
	cmp	x24, #1
	b.lt	LBB0_24
; %bb.4:
	mov	w25, #0
	mov	x19, #0
	mov	x23, #0
	neg	w8, w22
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	add	x8, x8, x23, lsl #2
	ldp	w27, w28, [x8]
	add	x1, sp, #44
	mov	x0, x26
	bl	_HPDF_Encoder_ByteType
	mov	x22, x0
Lloh5:
	adrp	x8, _HPDF_BYTE_TYPE_LEAD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HPDF_BYTE_TYPE_LEAD@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	add	w9, w28, w27, lsl #8
	cmp	x0, x8
	csel	w28, w9, w27, eq
	mov	x0, x27
	bl	_HPDF_IS_WHITE_SPACE
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	x0, LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x23, #1
	mov	x19, x8
	cbnz	x20, LBB0_12
	b	LBB0_14
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x23, #1
	cbnz	x20, LBB0_12
	b	LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh8:
	adrp	x8, _HPDF_BYTE_TYPE_SINGLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HPDF_BYTE_TYPE_SINGLE@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x22, x8
	cset	w8, ne
Lloh11:
	adrp	x9, _HPDF_BYTE_TYPE_LEAD@GOTPAGE
Lloh12:
	ldr	x9, [x9, _HPDF_BYTE_TYPE_LEAD@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x22, x9
	cset	w9, ne
	ands	w8, w8, w9
	csel	x19, x19, x23, ne
	tbnz	w8, #0, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, x23
	cbz	x20, LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w25, [x20]
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x19, x8
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x27
	bl	_HPDF_IS_WHITE_SPACE
	cmp	x0, #0
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	csel	w8, wzr, w8, eq
	add	w25, w8, w25
Lloh14:
	adrp	x8, _HPDF_BYTE_TYPE_TRIAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HPDF_BYTE_TYPE_TRIAL@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x22, x8
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #0
	b	LBB0_21
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21]
Lloh17:
	adrp	x9, _HPDF_WMODE_HORIZONTAL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _HPDF_WMODE_HORIZONTAL@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	w0, [sp, #8]                    ; 4-byte Folded Reload
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
Lloh20:
	adrp	x9, _HPDF_FONTDEF_TYPE_CID@GOTPAGE
Lloh21:
	ldr	x9, [x9, _HPDF_FONTDEF_TYPE_CID@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x26
	mov	x1, x28
	bl	_HPDF_CMapEncoder_ToCID
	mov	x1, x0
	ldr	x0, [x21, #8]
	bl	_HPDF_CIDFontDef_GetCIDWidth
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x26]
	mov	x0, x26
	mov	x1, x28
	blr	x8
	mov	x1, x0
	ldr	x0, [x21, #8]
	bl	_HPDF_TTFontDef_GetCharWidth
LBB0_20:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x23, #0
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	csel	w8, wzr, w8, eq
	add	w25, w25, w8
LBB0_21:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	mul	w8, w0, w8
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	add	w25, w8, w25
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	cmp	w25, w8
	ccmp	w27, #10, #4, le
	b.eq	LBB0_26
; %bb.22:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x27
	bl	_HPDF_IS_WHITE_SPACE
	add	x23, x23, #1
	cmp	x24, x23
	b.ne	LBB0_5
; %bb.23:
	cbnz	x20, LBB0_25
	b	LBB0_27
LBB0_24:
	mov	w25, #0
	cbz	x20, LBB0_27
LBB0_25:
	str	w25, [x20]
	b	LBB0_27
LBB0_26:
	mov	x24, x19
LBB0_27:
	mov	x0, x24
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_HPDF_BYTE_TYPE_TRIAL,8,3       ; @HPDF_BYTE_TYPE_TRIAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_Type0Font_MeasureText\n"

	.comm	_HPDF_FONTDEF_TYPE_CID,8,3      ; @HPDF_FONTDEF_TYPE_CID
	.comm	_HPDF_BYTE_TYPE_LEAD,8,3        ; @HPDF_BYTE_TYPE_LEAD
	.comm	_HPDF_BYTE_TYPE_SINGLE,8,3      ; @HPDF_BYTE_TYPE_SINGLE
	.comm	_HPDF_WMODE_HORIZONTAL,8,3      ; @HPDF_WMODE_HORIZONTAL
	.no_dead_strip	_MeasureText
.subsections_via_symbols
