	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ef4_mdio_check_mmds            ## -- Begin function ef4_mdio_check_mmds
	.p2align	4, 0x90
_ef4_mdio_check_mmds:                   ## @ef4_mdio_check_mmds
	.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
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	_MDIO_DEVS_PHYXS@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_MDIO_MMD_PHYXS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_3
LBB0_2:
	movl	%r12d, %edi
	callq	___ffs
	movl	%eax, %ebx
LBB0_3:
	movq	_MDIO_DEVS1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ef4_mdio_read
	movl	%eax, %r15d
	movq	_MDIO_DEVS2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ef4_mdio_read
	testl	%r15d, %r15d
	js	LBB0_5
## %bb.4:
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	shll	$16, %eax
	orl	%r15d, %eax
	movl	%eax, %ecx
	notl	%ecx
	movq	_hw@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	(%r14), %edx
	testl	%ecx, %r12d
	jne	LBB0_7
## %bb.8:
	leaq	L_.str.2(%rip), %rcx
	movq	%r14, %rdi
	movl	%eax, %r8d
	callq	_netif_vdbg
	testl	%r12d, %r12d
	je	LBB0_14
## %bb.9:
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%r12d, %eax
	shrl	%eax
	incl	%ebx
	cmpl	$1, %r12d
	movl	%eax, %r12d
	jbe	LBB0_14
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	testb	$1, %r12b
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ef4_mdio_check_mmd
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_15
LBB0_5:
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rcx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netif_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_15
LBB0_7:
	leaq	L_.str.1(%rip), %rcx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%eax, %r8d
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_netif_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_15
LBB0_14:
	xorl	%r15d, %r15d
LBB0_15:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_DEVS_PHYXS,4,2            ## @MDIO_DEVS_PHYXS
	.comm	_MDIO_MMD_PHYXS,4,2             ## @MDIO_MMD_PHYXS
	.comm	_MDIO_DEVS1,4,2                 ## @MDIO_DEVS1
	.comm	_MDIO_DEVS2,4,2                 ## @MDIO_DEVS2
	.comm	_hw,4,2                         ## @hw
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to read devices present\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"required MMDs not present: got %x, wanted %x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"Devices present: %x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ef4_mdio_check_mmds            ; -- Begin function ef4_mdio_check_mmds
	.p2align	2
_ef4_mdio_check_mmds:                   ; @ef4_mdio_check_mmds
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _MDIO_DEVS_PHYXS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MDIO_DEVS_PHYXS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MDIO_MMD_PHYXS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MDIO_MMD_PHYXS@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	bl	___ffs
	mov	x21, x0
LBB0_3:
Lloh6:
	adrp	x8, _MDIO_DEVS1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MDIO_DEVS1@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_ef4_mdio_read
	mov	x22, x0
Lloh9:
	adrp	x8, _MDIO_DEVS2@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MDIO_DEVS2@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_ef4_mdio_read
	tbnz	w22, #31, LBB0_11
; %bb.4:
	tbnz	w0, #31, LBB0_11
; %bb.5:
	orr	w4, w22, w0, lsl #16
Lloh12:
	adrp	x8, _hw@GOTPAGE
Lloh13:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w2, [x19]
	bics	wzr, w20, w4
	b.ne	LBB0_13
; %bb.6:
Lloh15:
	adrp	x3, l_.str.2@PAGE
Lloh16:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_netif_vdbg
	cbz	w20, LBB0_16
; %bb.7:
	mov	w21, #0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	lsr	w8, w20, #1
	add	w21, w21, #1
	cmp	w20, #1
	mov	x20, x8
	b.ls	LBB0_16
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	tbz	w20, #0, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_ef4_mdio_check_mmd
	cbz	x0, LBB0_8
	b	LBB0_12
LBB0_11:
Lloh17:
	adrp	x8, _hw@GOTPAGE
Lloh18:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh20:
	adrp	x3, l_.str@PAGE
Lloh21:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
LBB0_12:
Lloh22:
	adrp	x8, _EIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
	stp	x4, x20, [sp]
Lloh24:
	adrp	x3, l_.str.1@PAGE
Lloh25:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_err
Lloh26:
	adrp	x8, _ENODEV@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_16:
	mov	w0, #0
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_DEVS_PHYXS,4,2            ; @MDIO_DEVS_PHYXS
	.comm	_MDIO_MMD_PHYXS,4,2             ; @MDIO_MMD_PHYXS
	.comm	_MDIO_DEVS1,4,2                 ; @MDIO_DEVS1
	.comm	_MDIO_DEVS2,4,2                 ; @MDIO_DEVS2
	.comm	_hw,4,2                         ; @hw
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to read devices present\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"required MMDs not present: got %x, wanted %x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"Devices present: %x\n"

.subsections_via_symbols
