	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ctrl_stdenumcur_set
_ctrl_stdenumcur_set:                   ## @ctrl_stdenumcur_set
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $edx killed $edx def $rdx
	testl	%edx, %edx
	js	LBB0_1
## %bb.2:
	movq	(%rdi), %rcx
	cmpl	%edx, (%rcx)
	jge	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_3:
	movl	%edx, 4(%rcx)
	xorl	%eax, %eax
	testl	%edx, %edx
	je	LBB0_6
## %bb.4:
	decl	%edx
	movq	24(%rcx), %rsi
	movq	(%rsi,%rdx,8), %rdx
	cmpq	%rdx, 8(%rcx)
	je	LBB0_6
## %bb.5:
	movq	%rdx, 8(%rcx)
	movl	$1, 16(%rcx)
LBB0_6:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ctrl_stdenumcur_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ctrl_stdenumcur_set
_ctrl_stdenumcur_set:                   ; @ctrl_stdenumcur_set
	.cfi_startproc
; %bb.0:
	tbnz	w2, #31, LBB0_2
; %bb.1:
	ldr	x8, [x0]
	ldr	w9, [x8]
	cmp	w9, w2
	b.ge	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_3:
	str	w2, [x8, #4]
	cbz	w2, LBB0_5
; %bb.4:
	sub	w9, w2, #1
	ldr	x10, [x8, #8]
	ldr	x11, [x8, #24]
	ldr	x9, [x11, w9, uxtw #3]
	cmp	x10, x9
	b.ne	LBB0_6
LBB0_5:
	mov	w0, #0
	ret
LBB0_6:
	mov	w0, #0
	str	x9, [x8, #8]
	mov	w9, #1
	str	w9, [x8, #16]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ctrl_stdenumcur_set
.subsections_via_symbols
