	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getsubstring
_getsubstring:                          ## @getsubstring
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpl	$2, %ecx
	jl	LBB0_6
## %bb.1:
	decl	%ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rdi), %eax
	cmpb	%sil, %al
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testb	%al, %al
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movb	%al, (%rdx)
	incq	%rdi
	incq	%rdx
	decl	%ecx
	jne	LBB0_2
LBB0_6:
	movb	$0, (%rdx)
	cmpb	$1, (%rdi)
	sbbq	$-1, %rdi
	movq	%rdi, (%r8)
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_getsubstring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getsubstring
_getsubstring:                          ; @getsubstring
	.cfi_startproc
; %bb.0:
	cmp	w3, #2
	b.lt	LBB0_5
; %bb.1:
	and	w8, w1, #0xff
	sub	w9, w3, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x0]
	cmp	w10, w8
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cbz	w10, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	strb	w10, [x2], #1
	add	x0, x0, #1
	subs	w9, w9, #1
	b.ne	LBB0_2
LBB0_5:
	mov	w8, #0
	strb	wzr, [x2]
	mov	x9, x0
	ldrb	w10, [x9], #1
	cmp	w10, #0
	csel	x9, x0, x9, eq
	str	x9, [x4]
	mov	x0, x8
	ret
LBB0_6:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_getsubstring
.subsections_via_symbols
