	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hexagon_encode_mask            ## -- Begin function hexagon_encode_mask
	.p2align	4, 0x90
_hexagon_encode_mask:                   ## @hexagon_encode_mask
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movb	(%rdi), %al
	testb	%al, %al
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movsbl	%al, %edi
	callq	_ISSPACE
	leaq	1(%r14), %rbx
	testq	%rax, %rax
	je	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsbl	(%rbx), %edi
	callq	_ISSPACE
	incq	%rbx
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	-1(%rbx), %rax
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rax
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %r14
	movb	(%rax), %al
	testb	%al, %al
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	andb	$-2, %al
	xorl	%ecx, %ecx
	cmpb	$48, %al
	sete	%cl
	leal	(%rcx,%r15,2), %r15d
	incl	%r12d
	movb	(%r14), %al
	testb	%al, %al
	jne	LBB0_3
	jmp	LBB0_9
LBB0_1:
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
LBB0_9:
	movq	_HEXAGON_INSN_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$3, %eax
	xorl	%edi, %edi
	cmpl	%eax, %r12d
	sete	%dil
	callq	_assert
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HEXAGON_INSN_LEN,4,2           ## @HEXAGON_INSN_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hexagon_encode_mask            ; -- Begin function hexagon_encode_mask
	.p2align	2
_hexagon_encode_mask:                   ; @hexagon_encode_mask
	.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
	ldrb	w8, [x0]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x19, x0
	mov	w21, #0
	mov	w22, #0
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	sxtb	w0, w8
	bl	_ISSPACE
	add	x20, x19, #1
	cbz	x0, LBB0_5
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsb	w0, [x20], #1
	bl	_ISSPACE
	cbnz	x0, LBB0_3
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x8, x20, #1
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x8, x19
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x19, x20
	ldrb	w8, [x8]
	cbz	w8, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	and	w8, w8, #0xfe
	cmp	w8, #48
	cset	w20, eq
	bfi	w20, w22, #1, #31
	add	w21, w21, #1
	ldrb	w8, [x19]
	mov	x22, x20
	cbnz	w8, LBB0_2
	b	LBB0_10
LBB0_8:
	mov	w20, #0
	mov	w21, #0
	b	LBB0_10
LBB0_9:
	mov	x20, x22
LBB0_10:
Lloh0:
	adrp	x8, _HEXAGON_INSN_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HEXAGON_INSN_LEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w21, w8, lsl #3
	cset	w0, eq
	bl	_assert
	mov	x0, x20
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HEXAGON_INSN_LEN,4,2           ; @HEXAGON_INSN_LEN
.subsections_via_symbols
