	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdio_mii_ioctl                 ## -- Begin function mdio_mii_ioctl
	.p2align	4, 0x90
_mdio_mii_ioctl:                        ## @mdio_mii_ioctl
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %r15d
	leal	-128(%r12), %eax
	cmpl	$2, %eax
	jae	LBB0_1
LBB0_6:
	movl	4(%r14), %eax
	movq	_MDIO_SUPPORTS_C45@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.7:
	movl	4(%rbx), %edi
	callq	_mdio_phy_id_is_c45
	testq	%rax, %rax
	je	LBB0_8
## %bb.23:
	movl	4(%rbx), %edi
	callq	_mdio_phy_id_prtad
	movl	%eax, %r13d
	movl	4(%rbx), %edi
	callq	_mdio_phy_id_devad
LBB0_24:
	movl	%eax, %edx
	jmp	LBB0_25
LBB0_1:
	cmpl	$130, %r12d
	jne	LBB0_3
## %bb.2:
	movl	(%r14), %eax
	movq	_MDIO_PRTAD_NONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
LBB0_3:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_8:
	movl	4(%r14), %eax
LBB0_9:
	movq	_MDIO_SUPPORTS_C22@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.10:
	movl	4(%rbx), %r13d
	cmpl	$31, %r13d
	jg	LBB0_12
## %bb.11:
	movq	_MDIO_DEVAD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	$31, %r15d
LBB0_25:
	cmpl	$129, %r12d
	jne	LBB0_29
## %bb.26:
	movl	32(%r14), %edi
	movl	%r13d, %esi
	movl	%r15d, %ecx
	callq	*16(%r14)
	testl	%eax, %eax
	js	LBB0_28
## %bb.27:
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_28
LBB0_12:
	movq	_MDIO_EMULATE_C22@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_19
## %bb.13:
	movl	(%r14), %r13d
	movq	_MDIO_PRTAD_NONE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	je	LBB0_19
## %bb.14:
	cmpl	%r13d, 4(%rbx)
	jne	LBB0_19
## %bb.15:
	leal	-131(%r15), %eax
	cmpl	$5, %eax
	ja	LBB0_19
## %bb.16:
	movl	$27, %ecx
	btl	%eax, %ecx
	jae	LBB0_18
## %bb.17:
	movl	8(%r14), %edi
	callq	___ffs
	jmp	LBB0_24
LBB0_29:
	movq	24(%r14), %rax
	movl	32(%r14), %edi
	movl	12(%rbx), %r8d
	movl	%r13d, %esi
	movl	%r15d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_5:
	movl	%eax, 4(%rbx)
	movl	$129, %r12d
	jmp	LBB0_6
LBB0_18:
	movq	_MDIO_DEVS_AN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_19
## %bb.20:
	movq	_MDIO_MMD_AN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	$136, %r15d
	jne	LBB0_22
## %bb.21:
	movq	_MDIO_AN_ADVERTISE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_25
LBB0_19:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_28:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	_MDIO_AN_LPA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_PRTAD_NONE,4,2            ## @MDIO_PRTAD_NONE
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_MDIO_SUPPORTS_C45,4,2          ## @MDIO_SUPPORTS_C45
	.comm	_MDIO_SUPPORTS_C22,4,2          ## @MDIO_SUPPORTS_C22
	.comm	_MDIO_DEVAD_NONE,4,2            ## @MDIO_DEVAD_NONE
	.comm	_MDIO_EMULATE_C22,4,2           ## @MDIO_EMULATE_C22
	.comm	_MDIO_DEVS_AN,4,2               ## @MDIO_DEVS_AN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MDIO_MMD_AN,4,2                ## @MDIO_MMD_AN
	.comm	_MDIO_AN_ADVERTISE,4,2          ## @MDIO_AN_ADVERTISE
	.comm	_MDIO_AN_LPA,4,2                ## @MDIO_AN_LPA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdio_mii_ioctl                 ; -- Begin function mdio_mii_ioctl
	.p2align	2
_mdio_mii_ioctl:                        ; @mdio_mii_ioctl
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w20, [x1]
	sub	w8, w2, #128
	cmp	w8, #2
	b.hs	LBB0_5
LBB0_1:
	ldr	w8, [x21, #4]
Lloh0:
	adrp	x9, _MDIO_SUPPORTS_C45@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MDIO_SUPPORTS_C45@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_mdio_phy_id_is_c45
	cbz	x0, LBB0_8
; %bb.3:
	ldr	w0, [x19, #4]
	bl	_mdio_phy_id_prtad
	mov	x23, x0
	ldr	w0, [x19, #4]
	bl	_mdio_phy_id_devad
LBB0_4:
	mov	x2, x0
	b	LBB0_12
LBB0_5:
	cmp	w22, #130
	b.ne	LBB0_7
; %bb.6:
	ldr	w8, [x21]
Lloh3:
	adrp	x9, _MDIO_PRTAD_NONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MDIO_PRTAD_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_22
LBB0_7:
Lloh6:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_27
LBB0_8:
	ldr	w8, [x21, #4]
LBB0_9:
Lloh8:
	adrp	x9, _MDIO_SUPPORTS_C22@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MDIO_SUPPORTS_C22@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.10:
	ldr	w23, [x19, #4]
	cmp	w23, #31
	b.gt	LBB0_15
; %bb.11:
Lloh11:
	adrp	x8, _MDIO_DEVAD_NONE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MDIO_DEVAD_NONE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	and	w20, w20, #0x1f
LBB0_12:
	cmp	w22, #129
	b.ne	LBB0_21
; %bb.13:
	ldr	x8, [x21, #16]
	ldr	w0, [x21, #32]
	mov	x1, x23
	mov	x3, x20
	blr	x8
	tbnz	w0, #31, LBB0_28
; %bb.14:
	str	w0, [x19, #8]
	mov	w0, #0
	b	LBB0_28
LBB0_15:
Lloh14:
	adrp	x9, _MDIO_EMULATE_C22@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MDIO_EMULATE_C22@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_26
; %bb.16:
	ldr	w23, [x21]
Lloh17:
	adrp	x8, _MDIO_PRTAD_NONE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MDIO_PRTAD_NONE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w23, w8
	b.eq	LBB0_26
; %bb.17:
	ldr	w8, [x19, #4]
	cmp	w8, w23
	b.ne	LBB0_26
; %bb.18:
	sub	w8, w20, #131
	cmp	w8, #5
	b.hi	LBB0_26
; %bb.19:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #27
	tst	w8, w9
	b.eq	LBB0_23
; %bb.20:
	ldr	w0, [x21, #8]
	bl	___ffs
	b	LBB0_4
LBB0_21:
	ldr	x5, [x21, #24]
	ldr	w0, [x21, #32]
	ldr	w4, [x19, #12]
	mov	x1, x23
	mov	x3, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	br	x5
LBB0_22:
	str	w8, [x19, #4]
	mov	w22, #129
	b	LBB0_1
LBB0_23:
	ldr	w8, [x21, #8]
Lloh20:
	adrp	x9, _MDIO_DEVS_AN@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MDIO_DEVS_AN@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_26
; %bb.24:
Lloh23:
	adrp	x8, _MDIO_MMD_AN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MDIO_MMD_AN@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	cmp	w20, #136
	b.ne	LBB0_29
; %bb.25:
Lloh26:
	adrp	x8, _MDIO_AN_ADVERTISE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MDIO_AN_ADVERTISE@GOTPAGEOFF]
Lloh28:
	ldr	w20, [x8]
	b	LBB0_12
LBB0_26:
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_27:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_28:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_29:
Lloh31:
	adrp	x8, _MDIO_AN_LPA@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MDIO_AN_LPA@GOTPAGEOFF]
Lloh33:
	ldr	w20, [x8]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_PRTAD_NONE,4,2            ; @MDIO_PRTAD_NONE
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_MDIO_SUPPORTS_C45,4,2          ; @MDIO_SUPPORTS_C45
	.comm	_MDIO_SUPPORTS_C22,4,2          ; @MDIO_SUPPORTS_C22
	.comm	_MDIO_DEVAD_NONE,4,2            ; @MDIO_DEVAD_NONE
	.comm	_MDIO_EMULATE_C22,4,2           ; @MDIO_EMULATE_C22
	.comm	_MDIO_DEVS_AN,4,2               ; @MDIO_DEVS_AN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MDIO_MMD_AN,4,2                ; @MDIO_MMD_AN
	.comm	_MDIO_AN_ADVERTISE,4,2          ; @MDIO_AN_ADVERTISE
	.comm	_MDIO_AN_LPA,4,2                ; @MDIO_AN_LPA
.subsections_via_symbols
