	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_mii_ioctl
_e1000_mii_ioctl:                       ## @e1000_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, %r14d
	movq	%rsi, %rbx
	callq	_netdev_priv
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_if_mii
	movq	%rax, %r13
	movq	8(%r15), %rax
	movq	_e1000_media_type_copper@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_1
## %bb.3:
	leaq	8(%r15), %r12
	cmpl	$128, %r14d
	je	LBB0_9
## %bb.4:
	cmpl	$129, %r14d
	je	LBB0_7
## %bb.5:
	cmpl	$130, %r14d
	jne	LBB0_1
## %bb.6:
	movl	24(%r15), %eax
	movl	%eax, 12(%r13)
	jmp	LBB0_33
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_34:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	cmpl	$32, (%r13)
	jae	LBB0_10
## %bb.11:
	movl	4(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %r14
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_e1000_write_phy_reg
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_8
## %bb.12:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	(%r12), %rcx
	movl	(%r13), %eax
	cmpq	(%rbx), %rcx
	jne	LBB0_30
## %bb.13:
	leal	-132(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_14
## %bb.29:
	movq	%r12, %rdi
	callq	_e1000_phy_reset
	testl	%eax, %eax
	jne	LBB0_8
	jmp	LBB0_33
LBB0_7:
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movl	(%r13), %esi
	andl	$31, %esi
	addq	$8, %r13
	movq	%r12, %rdi
	movq	%r13, %rdx
	callq	_e1000_read_phy_reg
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	testl	%ebx, %ebx
	je	LBB0_33
LBB0_8:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_10:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_30:
	cmpl	$131, %eax
	jne	LBB0_33
## %bb.31:
	movq	_MII_CR_POWER_DOWN@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	jne	LBB0_33
	jmp	LBB0_27
LBB0_14:
	cmpl	$131, %eax
	jne	LBB0_33
## %bb.15:
	movq	_MII_CR_POWER_DOWN@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	jne	LBB0_33
## %bb.16:
	movq	_MII_CR_AUTO_NEG_EN@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_18
## %bb.17:
	movabsq	$201863462913, %rax             ## imm = 0x2F00000001
	movq	%rax, 16(%r15)
LBB0_27:
	movl	(%r15), %edi
	callq	_netif_running
	movq	%r15, %rdi
	testl	%eax, %eax
	je	LBB0_32
## %bb.28:
	callq	_e1000_reinit_locked
	jmp	LBB0_33
LBB0_32:
	callq	_e1000_reset
LBB0_33:
	movq	_E1000_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_34
LBB0_18:
	testl	$8192, %edx                     ## imm = 0x2000
	jne	LBB0_19
## %bb.20:
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_19:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
LBB0_21:
	testb	$64, %dl
	je	LBB0_23
## %bb.22:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
LBB0_23:
	movl	(%rax), %esi
	testl	$256, %edx                      ## imm = 0x100
	jne	LBB0_24
## %bb.25:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_24:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
LBB0_26:
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_e1000_set_spd_dplx
	testl	%eax, %eax
	jne	LBB0_34
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_e1000_media_type_copper,8,3    ## @e1000_media_type_copper
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_MII_CR_POWER_DOWN,4,2          ## @MII_CR_POWER_DOWN
	.comm	_MII_CR_AUTO_NEG_EN,4,2         ## @MII_CR_AUTO_NEG_EN
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_E1000_SUCCESS,4,2              ## @E1000_SUCCESS
	.no_dead_strip	_e1000_mii_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function e1000_mii_ioctl
lCPI0_0:
	.long	1                               ; 0x1
	.long	47                              ; 0x2f
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_e1000_mii_ioctl:                       ; @e1000_mii_ioctl
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x20, x1
	bl	_netdev_priv
	mov	x19, x0
	mov	x0, x20
	bl	_if_mii
	mov	x20, x19
	ldr	x8, [x20, #8]!
Lloh0:
	adrp	x25, _e1000_media_type_copper@GOTPAGE
Lloh1:
	ldr	x25, [x25, _e1000_media_type_copper@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	mov	x22, x0
	cmp	w21, #128
	b.eq	LBB0_8
; %bb.2:
	cmp	w21, #129
	b.eq	LBB0_13
; %bb.3:
	cmp	w21, #130
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x19, #24]
	str	w8, [x22, #12]
	b	LBB0_25
LBB0_5:
Lloh2:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	w8, [x22]
	cmp	w8, #32
	b.hs	LBB0_15
; %bb.9:
	ldr	w21, [x22, #4]
	add	x23, x19, #4
	mov	x0, x23
	bl	_spin_lock_irqsave
	ldr	w1, [x22]
	mov	x0, x20
	mov	x2, x21
	bl	_e1000_write_phy_reg
	mov	x24, x0
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	cbnz	w24, LBB0_14
; %bb.10:
	ldr	x9, [x20]
	ldr	x10, [x25]
	ldr	w8, [x22]
	cmp	x9, x10
	b.ne	LBB0_16
; %bb.11:
	sub	w9, w8, #132
	cmp	w9, #2
	b.hs	LBB0_18
; %bb.12:
	mov	x0, x20
	bl	_e1000_phy_reset
	cbnz	w0, LBB0_14
	b	LBB0_25
LBB0_13:
	add	x19, x19, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x22], #8
	and	w1, w8, #0x1f
	mov	x0, x20
	mov	x2, x22
	bl	_e1000_read_phy_reg
	mov	x20, x0
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	cbz	w20, LBB0_25
LBB0_14:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_6
LBB0_15:
Lloh6:
	adrp	x8, _EFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_6
LBB0_16:
	cmp	w8, #131
	b.ne	LBB0_25
; %bb.17:
Lloh8:
	adrp	x8, _MII_CR_POWER_DOWN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MII_CR_POWER_DOWN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w21
	b.ne	LBB0_25
	b	LBB0_22
LBB0_18:
	cmp	w8, #131
	b.ne	LBB0_25
; %bb.19:
Lloh11:
	adrp	x8, _MII_CR_POWER_DOWN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MII_CR_POWER_DOWN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w21
	b.ne	LBB0_25
; %bb.20:
Lloh14:
	adrp	x8, _MII_CR_AUTO_NEG_EN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MII_CR_AUTO_NEG_EN@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_26
; %bb.21:
Lloh17:
	adrp	x8, lCPI0_0@PAGE
Lloh18:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #16]
LBB0_22:
	ldr	w0, [x19]
	bl	_netif_running
	cbz	w0, LBB0_24
; %bb.23:
	mov	x0, x19
	bl	_e1000_reinit_locked
	b	LBB0_25
LBB0_24:
	mov	x0, x19
	bl	_e1000_reset
LBB0_25:
Lloh19:
	adrp	x8, _E1000_SUCCESS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _E1000_SUCCESS@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_26:
Lloh22:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
Lloh24:
	adrp	x9, _SPEED_100@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SPEED_100@GOTPAGEOFF]
	tst	w21, #0x2000
	csel	x8, x8, x9, eq
Lloh26:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh27:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
	tst	w21, #0x40
	csel	x8, x8, x9, eq
Lloh28:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh29:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _DUPLEX_HALF@GOTPAGE
Lloh31:
	ldr	x8, [x8, _DUPLEX_HALF@GOTPAGEOFF]
	tst	w21, #0x100
	csel	x8, x8, x9, eq
	ldr	w2, [x8]
	mov	x0, x19
	bl	_e1000_set_spd_dplx
	cbnz	w0, LBB0_7
	b	LBB0_22
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdr	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_e1000_media_type_copper,8,3    ; @e1000_media_type_copper
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_MII_CR_POWER_DOWN,4,2          ; @MII_CR_POWER_DOWN
	.comm	_MII_CR_AUTO_NEG_EN,4,2         ; @MII_CR_AUTO_NEG_EN
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_E1000_SUCCESS,4,2              ; @E1000_SUCCESS
	.no_dead_strip	_e1000_mii_ioctl
.subsections_via_symbols
