	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phy_mii_ioctl                  ## -- Begin function phy_mii_ioctl
	.p2align	4, 0x90
_phy_mii_ioctl:                         ## @phy_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	cmpl	$128, %edx
	je	LBB0_5
## %bb.1:
	cmpl	$129, %edx
	je	LBB0_4
## %bb.2:
	cmpl	$130, %edx
	jne	LBB0_26
## %bb.3:
	movl	28(%r14), %eax
	movl	%eax, 8(%r12)
LBB0_4:
	movl	4(%r12), %esi
	movq	%r14, %rdi
	callq	_phy_read
	movl	%eax, 12(%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_5:
	movl	(%r12), %r15d
	movl	8(%r12), %eax
	cmpl	28(%r14), %eax
	jne	LBB0_22
## %bb.6:
	movl	4(%r12), %eax
	cmpl	$132, %eax
	je	LBB0_21
## %bb.7:
	cmpl	$131, %eax
	jne	LBB0_22
## %bb.8:
	movq	_BMCR_RESET@GOTPCREL(%rip), %rax
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%r15d, %ecx
	jne	LBB0_9
## %bb.10:
	movq	_AUTONEG_DISABLE@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_26:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_27
LBB0_21:
	movl	%r15d, (%r14)
	jmp	LBB0_22
LBB0_9:
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	testl	%eax, %eax
	je	LBB0_12
## %bb.18:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	jmp	LBB0_22
LBB0_12:
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r15d, %eax
	jne	LBB0_13
## %bb.14:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	_BMCR_SPEED1000@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_19
## %bb.16:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_19:
	movq	_BMCR_SPEED100@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_22
## %bb.20:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
LBB0_22:
	movl	4(%r12), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_phy_write
	xorl	%ebx, %ebx
	cmpl	$131, 4(%r12)
	jne	LBB0_27
## %bb.23:
	movq	_BMCR_RESET@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_27
## %bb.24:
	movq	8(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_27
## %bb.25:
	movq	%r14, %rdi
	callq	_phy_scan_fixups
	movq	8(%r14), %rax
	movq	%r14, %rdi
	callq	*(%rax)
LBB0_27:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BMCR_RESET,4,2                 ## @BMCR_RESET
	.comm	_BMCR_ANENABLE,4,2              ## @BMCR_ANENABLE
	.comm	_AUTONEG_DISABLE,4,2            ## @AUTONEG_DISABLE
	.comm	_AUTONEG_ENABLE,4,2             ## @AUTONEG_ENABLE
	.comm	_BMCR_FULLDPLX,4,2              ## @BMCR_FULLDPLX
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_BMCR_SPEED1000,4,2             ## @BMCR_SPEED1000
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_BMCR_SPEED100,4,2              ## @BMCR_SPEED100
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phy_mii_ioctl                  ; -- Begin function phy_mii_ioctl
	.p2align	2
_phy_mii_ioctl:                         ; @phy_mii_ioctl
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cmp	w2, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	w2, #129
	b.eq	LBB0_4
; %bb.2:
	cmp	w2, #130
	b.ne	LBB0_10
; %bb.3:
	ldr	w8, [x19, #28]
	str	w8, [x20, #8]
LBB0_4:
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_phy_read
	mov	x8, x0
	mov	w0, #0
	str	w8, [x20, #12]
	b	LBB0_22
LBB0_5:
	ldr	w21, [x20]
	ldr	w8, [x20, #8]
	ldr	w9, [x19, #28]
	cmp	w8, w9
	b.ne	LBB0_17
; %bb.6:
	ldr	w8, [x20, #4]
	cmp	w8, #132
	b.eq	LBB0_11
; %bb.7:
	cmp	w8, #131
	b.ne	LBB0_17
; %bb.8:
Lloh0:
	adrp	x8, _BMCR_RESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BMCR_RESET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _BMCR_ANENABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _AUTONEG_DISABLE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AUTONEG_DISABLE@GOTPAGEOFF]
Lloh8:
	adrp	x10, _AUTONEG_ENABLE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _AUTONEG_ENABLE@GOTPAGEOFF]
	tst	w8, w21
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	str	w8, [x19, #20]
	cbz	w8, LBB0_12
; %bb.9:
Lloh10:
	adrp	x8, _DUPLEX_HALF@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DUPLEX_HALF@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	b	LBB0_17
LBB0_10:
Lloh13:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_22
LBB0_11:
	str	w21, [x19]
	b	LBB0_17
LBB0_12:
Lloh16:
	adrp	x8, _BMCR_FULLDPLX@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
Lloh21:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh22:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
	tst	w8, w21
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh23:
	adrp	x8, _BMCR_SPEED1000@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BMCR_SPEED1000@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_14
; %bb.13:
Lloh26:
	adrp	x8, _SPEED_1000@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SPEED_1000@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
Lloh28:
	adrp	x8, _BMCR_SPEED100@GOTPAGE
Lloh29:
	ldr	x8, [x8, _BMCR_SPEED100@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_17
; %bb.15:
Lloh31:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	str	w8, [x19, #16]
LBB0_17:
	ldr	w1, [x20, #4]
	mov	x0, x19
	mov	x2, x21
	bl	_phy_write
	ldr	w8, [x20, #4]
	cmp	w8, #131
	b.ne	LBB0_21
; %bb.18:
Lloh33:
	adrp	x8, _BMCR_RESET@GOTPAGE
Lloh34:
	ldr	x8, [x8, _BMCR_RESET@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_21
; %bb.19:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_21
; %bb.20:
	mov	x0, x19
	bl	_phy_scan_fixups
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
LBB0_21:
	mov	w0, #0
LBB0_22:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_BMCR_RESET,4,2                 ; @BMCR_RESET
	.comm	_BMCR_ANENABLE,4,2              ; @BMCR_ANENABLE
	.comm	_AUTONEG_DISABLE,4,2            ; @AUTONEG_DISABLE
	.comm	_AUTONEG_ENABLE,4,2             ; @AUTONEG_ENABLE
	.comm	_BMCR_FULLDPLX,4,2              ; @BMCR_FULLDPLX
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_BMCR_SPEED1000,4,2             ; @BMCR_SPEED1000
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_BMCR_SPEED100,4,2              ; @BMCR_SPEED100
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
.subsections_via_symbols
