	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl2_mii_ioctl
_atl2_mii_ioctl:                        ## @atl2_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
	movl	%edx, %ebx
	movq	%rsi, %r15
	callq	_netdev_priv
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_if_mii
	movq	%rax, %r15
	cmpl	$128, %ebx
	je	LBB0_4
## %bb.1:
	cmpl	$129, %ebx
	je	LBB0_8
## %bb.2:
	cmpl	$130, %ebx
	jne	LBB0_10
## %bb.3:
	movl	$0, 12(%r15)
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_4:
	cmpl	$32, (%r15)
	jae	LBB0_11
## %bb.5:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	addq	$4, %rdi
	movl	(%r15), %esi
	movl	4(%r15), %edx
	callq	_atl2_write_phy_reg
	jmp	LBB0_6
LBB0_8:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	addq	$4, %rdi
	movl	(%r15), %esi
	andl	$31, %esi
	addq	$8, %r15
	movq	%r15, %rdx
	callq	_atl2_read_phy_reg
LBB0_6:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.9:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_10:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_11:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
LBB0_12:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_atl2_mii_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl2_mii_ioctl
_atl2_mii_ioctl:                        ; @atl2_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	x21, x2
	mov	x20, x1
	bl	_netdev_priv
	mov	x19, x0
	mov	x0, x20
	bl	_if_mii
	mov	x20, x0
	cmp	w21, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w21, #129
	b.eq	LBB0_6
; %bb.2:
	cmp	w21, #130
	b.ne	LBB0_9
; %bb.3:
	mov	w0, #0
	str	wzr, [x20, #12]
	b	LBB0_13
LBB0_4:
	ldr	w8, [x20]
	cmp	w8, #32
	b.hs	LBB0_11
; %bb.5:
	mov	x0, x19
	bl	_spin_lock_irqsave
	add	x0, x19, #4
	ldp	w1, w2, [x20]
	bl	_atl2_write_phy_reg
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_spin_lock_irqsave
	add	x0, x19, #4
	ldr	w8, [x20], #8
	and	w1, w8, #0x1f
	mov	x2, x20
	bl	_atl2_read_phy_reg
LBB0_7:
	mov	x20, x0
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	cbz	w20, LBB0_10
; %bb.8:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
Lloh2:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	mov	w0, #0
	b	LBB0_13
LBB0_11:
Lloh4:
	adrp	x8, _EFAULT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_atl2_mii_ioctl
.subsections_via_symbols
