	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function phy_find_valid
_phy_find_valid:                        ## @phy_find_valid
	.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 $edi killed $edi def $rdi
	movq	_MAX_NUM_SETTINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%edi, %eax
	jle	LBB0_1
## %bb.2:
	movq	_settings@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movslq	%edi, %r9
	movb	$1, %cl
	testl	%esi, (%rdx,%r9,4)
	jne	LBB0_8
## %bb.3:
	movslq	%eax, %r8
	leaq	(%rdx,%r9,4), %rdx
	addq	$4, %rdx
	subl	%eax, %edi
	incl	%edi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%ecx, %edi
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	decq	%rcx
	leaq	4(%rdx), %r10
	testl	%esi, (%rdx)
	movq	%r10, %rdx
	je	LBB0_5
## %bb.7:
	subq	%rcx, %r9
	cmpq	%r8, %r9
	setl	%cl
	jmp	LBB0_8
LBB0_1:
	decl	%eax
	popq	%rbp
	retq
LBB0_6:
	subq	%rcx, %r9
	incq	%r9
	cmpq	%r8, %r9
	setl	%cl
	movl	%eax, %r9d
LBB0_8:
	decl	%eax
	testb	%cl, %cl
	cmovnel	%r9d, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_NUM_SETTINGS,4,2           ## @MAX_NUM_SETTINGS
	.comm	_settings,8,3                   ## @settings
	.no_dead_strip	_phy_find_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function phy_find_valid
_phy_find_valid:                        ; @phy_find_valid
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _MAX_NUM_SETTINGS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_NUM_SETTINGS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_3
; %bb.1:
Lloh3:
	adrp	x9, _settings@GOTPAGE
Lloh4:
	ldr	x9, [x9, _settings@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x9]
	sxtw	x9, w0
	ldr	w11, [x10, w0, sxtw #2]
	tst	w11, w1
	b.eq	LBB0_4
; %bb.2:
	mov	w10, #1
	b	LBB0_9
LBB0_3:
	sub	w0, w8, #1
	ret
LBB0_4:
	sxtw	x11, w8
	add	x9, x9, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w8, w9
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w12, [x10, x9, lsl #2]
	add	x9, x9, #1
	tst	w12, w1
	b.eq	LBB0_5
; %bb.7:
	sub	x9, x9, #1
	cmp	x9, x11
	cset	w10, lt
	b	LBB0_9
LBB0_8:
	cmp	x9, x11
	cset	w10, lt
	mov	x9, x8
LBB0_9:
	sub	w8, w8, #1
	cmp	w10, #0
	csel	w0, w9, w8, ne
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_NUM_SETTINGS,4,2           ; @MAX_NUM_SETTINGS
	.comm	_settings,8,3                   ; @settings
	.no_dead_strip	_phy_find_valid
.subsections_via_symbols
