	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_verify_mbstr_len            ## -- Begin function pg_verify_mbstr_len
	.p2align	4, 0x90
_pg_verify_mbstr_len:                   ## @pg_verify_mbstr_len
	.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	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movq	%rsi, %r13
	movl	%edi, %ebx
	callq	_PG_VALID_ENCODING
	movl	%eax, %edi
	callq	_Assert
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_pg_encoding_max_length
	cmpl	$1, %eax
	jg	LBB0_4
## %bb.1:
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_memchr
	testq	%rax, %rax
	je	LBB0_17
## %bb.2:
	movl	$-1, %ebx
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_20
## %bb.3:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rax, %rsi
	movl	$1, %edx
	callq	_report_invalid_encoding
LBB0_4:
	testl	%r15d, %r15d
	jle	LBB0_16
## %bb.5:
	movq	_pg_wchar_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	-44(%rbp), %rcx                 ## 4-byte Folded Reload
	movq	(%rax,%rcx,8), %r12
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_9 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_report_invalid_encoding
LBB0_7:                                 ##   in Loop: Header=BB0_9 Depth=1
	movslq	%r14d, %rax
	addq	%rax, %r13
	subl	%eax, %r15d
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	incl	%ebx
	testl	%r15d, %r15d
	jle	LBB0_20
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	(%r13), %edi
	callq	_IS_HIGHBIT_SET
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	*%r12
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_6
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpb	$0, (%r13)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%r13
	decl	%r15d
	jmp	LBB0_8
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_report_invalid_encoding
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	*%r12
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_7
	jmp	LBB0_6
LBB0_16:
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_17:
	movl	%r15d, %ebx
	jmp	LBB0_20
LBB0_19:
	movl	$-1, %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pg_wchar_table,8,3             ## @pg_wchar_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_verify_mbstr_len            ; -- Begin function pg_verify_mbstr_len
	.p2align	2
_pg_verify_mbstr_len:                   ; @pg_verify_mbstr_len
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	bl	_PG_VALID_ENCODING
	bl	_Assert
	mov	x0, x22
	bl	_pg_encoding_max_length
	cmp	w0, #1
	b.gt	LBB0_6
; %bb.1:
	mov	x0, x21
	mov	w1, #0
	mov	x2, x19
	bl	_memchr
	cbz	x0, LBB0_4
; %bb.2:
	cbz	w20, LBB0_5
LBB0_3:
	mov	w23, #-1
	b	LBB0_19
LBB0_4:
	mov	x23, x19
	b	LBB0_19
LBB0_5:
	mov	x1, x0
	mov	x0, x22
	mov	w2, #1
	bl	_report_invalid_encoding
LBB0_6:
	cmp	w19, #1
	b.lt	LBB0_18
; %bb.7:
	mov	w23, #0
Lloh0:
	adrp	x8, _pg_wchar_table@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pg_wchar_table@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x25, [x8, w22, sxtw #3]
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	bl	_report_invalid_encoding
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	add	x21, x21, w24, sxtw
	sub	w19, w19, w24
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w23, w23, #1
	cmp	w19, #0
	b.le	LBB0_19
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x21]
	bl	_IS_HIGHBIT_SET
	cbz	w0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x21
	mov	x1, x19
	blr	x25
	mov	x24, x0
	tbz	w0, #31, LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	cbz	w20, LBB0_8
	b	LBB0_3
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	ldrb	w8, [x21]
	cbz	w8, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x21, x21, #1
	sub	w19, w19, #1
	b	LBB0_10
LBB0_16:                                ;   in Loop: Header=BB0_11 Depth=1
	cbnz	w20, LBB0_3
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	bl	_report_invalid_encoding
	mov	x0, x21
	mov	x1, x19
	blr	x25
	mov	x24, x0
	tbz	w0, #31, LBB0_9
	b	LBB0_8
LBB0_18:
	mov	w23, #0
LBB0_19:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_pg_wchar_table,8,3             ; @pg_wchar_table
.subsections_via_symbols
