	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generic_mii_ioctl              ## -- Begin function generic_mii_ioctl
	.p2align	4, 0x90
_generic_mii_ioctl:                     ## @generic_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %eax
	movq	%rsi, %rbx
	movq	%rdi, %r8
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	movl	$0, (%r15)
LBB0_2:
	movl	(%rbx), %edx
	movl	8(%rbx), %esi
	andl	48(%r8), %esi
	movl	%esi, 8(%rbx)
	andl	(%r8), %edx
	movl	%edx, (%rbx)
	cmpl	$128, %eax
	je	LBB0_7
## %bb.3:
	cmpl	$129, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$130, %eax
	jne	LBB0_12
## %bb.5:
	movl	32(%r8), %esi
	movl	%esi, 8(%rbx)
LBB0_6:
	movl	16(%r8), %edi
	callq	*40(%r8)
	movl	%eax, 12(%rbx)
	xorl	%r14d, %r14d
	jmp	LBB0_19
LBB0_7:
	movl	4(%rbx), %ecx
	xorl	%r14d, %r14d
	movl	$0, %ebx
	cmpl	32(%r8), %esi
	jne	LBB0_16
## %bb.8:
	cmpl	$132, %edx
	je	LBB0_13
## %bb.9:
	cmpl	$131, %edx
	jne	LBB0_14
## %bb.10:
	movq	_BMCR_RESET@GOTPCREL(%rip), %rax
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	orl	(%rax), %edi
	xorl	%eax, %eax
	testl	%ecx, %edi
	sete	%al
	movl	%eax, 4(%r8)
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rdi
	testl	%ecx, (%rdi)
	setne	%bl
	andb	%bl, %al
	movzbl	%al, %eax
	cmpl	%eax, 8(%r8)
	je	LBB0_14
## %bb.15:
	movl	%eax, 8(%r8)
	movb	$1, %bl
	jmp	LBB0_16
LBB0_12:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_19
LBB0_13:
	movl	%ecx, 12(%r8)
LBB0_14:
	xorl	%ebx, %ebx
LBB0_16:
	movl	16(%r8), %edi
	callq	*24(%r8)
	testq	%r15, %r15
	je	LBB0_19
## %bb.17:
	testb	%bl, %bl
	je	LBB0_19
## %bb.18:
	movl	$1, (%r15)
LBB0_19:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	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	_BMCR_FULLDPLX,4,2              ## @BMCR_FULLDPLX
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generic_mii_ioctl              ; -- Begin function generic_mii_ioctl
	.p2align	2
_generic_mii_ioctl:                     ; @generic_mii_ioctl
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x3
	mov	x8, x2
	mov	x20, x1
	cbz	x3, LBB0_2
; %bb.1:
	str	wzr, [x19]
LBB0_2:
	ldr	w9, [x0, #48]
	ldr	w10, [x20, #8]
	and	w1, w10, w9
	str	w1, [x20, #8]
	ldr	w9, [x0]
	ldr	w10, [x20]
	and	w2, w10, w9
	str	w2, [x20]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.3:
	cmp	w8, #129
	b.eq	LBB0_6
; %bb.4:
	cmp	w8, #130
	b.ne	LBB0_15
; %bb.5:
	ldr	w1, [x0, #32]
	str	w1, [x20, #8]
LBB0_6:
	ldr	x8, [x0, #40]
	ldr	w0, [x0, #16]
	blr	x8
	mov	x8, x0
	mov	w0, #0
	str	w8, [x20, #12]
	b	LBB0_16
LBB0_7:
	ldr	w3, [x20, #4]
	ldr	w8, [x0, #32]
	cmp	w1, w8
	b.ne	LBB0_11
; %bb.8:
	cmp	w2, #132
	b.eq	LBB0_17
; %bb.9:
	cmp	w2, #131
	b.ne	LBB0_11
; %bb.10:
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
	tst	w8, w3
	cset	w8, eq
	str	w8, [x0, #4]
Lloh6:
	adrp	x9, _BMCR_FULLDPLX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w3
	cset	w9, ne
	and	w8, w8, w9
	ldr	w9, [x0, #8]
	cmp	w9, w8
	b.ne	LBB0_18
LBB0_11:
	mov	w20, #0
LBB0_12:
	ldr	x8, [x0, #24]
	ldr	w0, [x0, #16]
	blr	x8
	mov	w0, #0
	cbz	x19, LBB0_16
; %bb.13:
	cbz	w20, LBB0_16
; %bb.14:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_16
LBB0_15:
Lloh9:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_17:
	mov	w20, #0
	str	w3, [x0, #12]
	b	LBB0_12
LBB0_18:
	str	w8, [x0, #8]
	mov	w20, #1
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_BMCR_RESET,4,2                 ; @BMCR_RESET
	.comm	_BMCR_ANENABLE,4,2              ; @BMCR_ANENABLE
	.comm	_BMCR_FULLDPLX,4,2              ; @BMCR_FULLDPLX
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
.subsections_via_symbols
