	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cas_ioctl
_cas_ioctl:                             ## @cas_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, %r15d
	movq	%rsi, %rbx
	callq	_netdev_priv
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_if_mii
	movq	%rax, %r14
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movq	%r12, %rdi
	callq	_mutex_lock
	cmpl	$128, %r15d
	je	LBB0_5
## %bb.1:
	cmpl	$129, %r15d
	je	LBB0_4
## %bb.2:
	cmpl	$130, %r15d
	jne	LBB0_7
## %bb.3:
	movl	8(%r12), %eax
	movl	%eax, 12(%r14)
LBB0_4:
	movq	%r12, %r15
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_cas_mif_poll
	movl	(%r14), %esi
	andl	$31, %esi
	movq	%r12, %rdi
	callq	_cas_phy_read
	movl	%eax, 8(%r14)
	jmp	LBB0_6
LBB0_5:
	movq	%r12, %r15
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_cas_mif_poll
	movl	(%r14), %esi
	movl	4(%r14), %edx
	andl	$31, %esi
	movq	%r12, %rdi
	callq	_cas_phy_write
	movl	%eax, %r13d
LBB0_6:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_cas_mif_poll
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
LBB0_7:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_cas_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cas_ioctl
_cas_ioctl:                             ; @cas_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, x2
	mov	x21, x1
	bl	_netdev_priv
	mov	x19, x0
	mov	x0, x21
	bl	_if_mii
	mov	x21, x0
Lloh0:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_mutex_lock
	cmp	w20, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	w20, #129
	b.eq	LBB0_4
; %bb.2:
	cmp	w20, #130
	b.ne	LBB0_7
; %bb.3:
	ldr	w8, [x19, #8]
	str	w8, [x21, #12]
LBB0_4:
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	w1, #0
	bl	_cas_mif_poll
	ldr	w8, [x21]
	and	w1, w8, #0x1f
	mov	x0, x19
	bl	_cas_phy_read
	mov	w22, #0
	str	w0, [x21, #8]
	b	LBB0_6
LBB0_5:
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	w1, #0
	bl	_cas_mif_poll
	ldp	w8, w2, [x21]
	and	w1, w8, #0x1f
	mov	x0, x19
	bl	_cas_phy_write
	mov	x22, x0
LBB0_6:
	mov	x0, x19
	mov	w1, #1
	bl	_cas_mif_poll
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	b	LBB0_8
LBB0_7:
	neg	w22, w22
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_cas_ioctl
.subsections_via_symbols
