	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_igb_write_phy_reg_mdic         ## -- Begin function igb_write_phy_reg_mdic
	.p2align	4, 0x90
_igb_write_phy_reg_mdic:                ## @igb_write_phy_reg_mdic
	.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
	movq	_MAX_PHY_REG_ADDRESS@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jge	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_hw_dbg
	movq	_E1000_ERR_PARAM@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_2:
	movq	_E1000_MDIC_REG_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	movl	(%rdi), %r12d
	movq	_E1000_MDIC_PHY_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
	orl	%edx, %esi
	orl	%esi, %r12d
	movq	_E1000_MDIC_OP_WRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	_E1000_MDIC@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	%r12d, %esi
	callq	_wr32
	movq	_E1000_GEN_POLL_TIMEOUT@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_4
## %bb.3:
	xorl	%ebx, %ebx
	movq	_E1000_MDIC_READY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$50, %edi
	callq	_udelay
	movl	(%r14), %edi
	callq	_rd32
	movl	%eax, %r12d
	movl	(%r13), %eax
	testl	%r12d, %eax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	movl	(%r15), %ecx
	leal	(%rcx,%rcx,2), %ecx
	cmpl	%ecx, %ebx
	jl	LBB0_6
LBB0_7:
	testl	%r12d, %eax
	je	LBB0_8
LBB0_9:
	movq	_E1000_MDIC_ERROR@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_10
## %bb.11:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_12
LBB0_4:
	movq	_E1000_MDIC_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r12d, %eax
	jne	LBB0_9
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
LBB0_12:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_hw_dbg
	movq	_E1000_ERR_PHY@GOTPCREL(%rip), %rax
LBB0_13:
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PHY_REG_ADDRESS,4,2        ## @MAX_PHY_REG_ADDRESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PHY Address %d is out of range\n"

	.comm	_E1000_ERR_PARAM,4,2            ## @E1000_ERR_PARAM
	.comm	_E1000_MDIC_REG_SHIFT,4,2       ## @E1000_MDIC_REG_SHIFT
	.comm	_E1000_MDIC_PHY_SHIFT,4,2       ## @E1000_MDIC_PHY_SHIFT
	.comm	_E1000_MDIC_OP_WRITE,4,2        ## @E1000_MDIC_OP_WRITE
	.comm	_E1000_MDIC,4,2                 ## @E1000_MDIC
	.comm	_E1000_GEN_POLL_TIMEOUT,4,2     ## @E1000_GEN_POLL_TIMEOUT
	.comm	_E1000_MDIC_READY,4,2           ## @E1000_MDIC_READY
L_.str.1:                               ## @.str.1
	.asciz	"MDI Write did not complete\n"

	.comm	_E1000_ERR_PHY,4,2              ## @E1000_ERR_PHY
	.comm	_E1000_MDIC_ERROR,4,2           ## @E1000_MDIC_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"MDI Error\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_igb_write_phy_reg_mdic         ; -- Begin function igb_write_phy_reg_mdic
	.p2align	2
_igb_write_phy_reg_mdic:                ; @igb_write_phy_reg_mdic
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
                                        ; kill: def $w1 killed $w1 def $x1
Lloh0:
	adrp	x8, _MAX_PHY_REG_ADDRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_PHY_REG_ADDRESS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ge	LBB0_2
; %bb.1:
	str	x1, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hw_dbg
Lloh5:
	adrp	x8, _E1000_ERR_PARAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _E1000_ERR_PARAM@GOTPAGEOFF]
	b	LBB0_12
LBB0_2:
Lloh7:
	adrp	x8, _E1000_MDIC_REG_SHIFT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _E1000_MDIC_REG_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	lsl	w8, w1, w8
	orr	w8, w8, w2
	ldr	w9, [x0]
Lloh10:
	adrp	x10, _E1000_MDIC_PHY_SHIFT@GOTPAGE
Lloh11:
	ldr	x10, [x10, _E1000_MDIC_PHY_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh13:
	adrp	x10, _E1000_MDIC_OP_WRITE@GOTPAGE
Lloh14:
	ldr	x10, [x10, _E1000_MDIC_OP_WRITE@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh15:
	ldr	w9, [x10]
	orr	w19, w8, w9
Lloh16:
	adrp	x20, _E1000_MDIC@GOTPAGE
Lloh17:
	ldr	x20, [x20, _E1000_MDIC@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	x1, x19
	bl	_wr32
Lloh18:
	adrp	x21, _E1000_GEN_POLL_TIMEOUT@GOTPAGE
Lloh19:
	ldr	x21, [x21, _E1000_GEN_POLL_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	mov	w22, #0
Lloh20:
	adrp	x23, _E1000_MDIC_READY@GOTPAGE
Lloh21:
	ldr	x23, [x23, _E1000_MDIC_READY@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #50
	bl	_udelay
	ldr	w0, [x20]
	bl	_rd32
	mov	x19, x0
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w22, #1
	ldr	w9, [x21]
	add	w9, w9, w9, lsl #1
	cmp	w22, w9
	b.lt	LBB0_4
LBB0_6:
	tst	w8, w19
	b.eq	LBB0_10
LBB0_7:
Lloh22:
	adrp	x8, _E1000_MDIC_ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _E1000_MDIC_ERROR@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_14
; %bb.8:
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_9:
Lloh27:
	adrp	x8, _E1000_MDIC_READY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _E1000_MDIC_READY@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_7
LBB0_10:
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_11:
	bl	_hw_dbg
Lloh32:
	adrp	x8, _E1000_ERR_PHY@GOTPAGE
Lloh33:
	ldr	x8, [x8, _E1000_ERR_PHY@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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
	add	sp, sp, #80
	ret
LBB0_14:
	mov	w0, #0
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PHY_REG_ADDRESS,4,2        ; @MAX_PHY_REG_ADDRESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PHY Address %d is out of range\n"

	.comm	_E1000_ERR_PARAM,4,2            ; @E1000_ERR_PARAM
	.comm	_E1000_MDIC_REG_SHIFT,4,2       ; @E1000_MDIC_REG_SHIFT
	.comm	_E1000_MDIC_PHY_SHIFT,4,2       ; @E1000_MDIC_PHY_SHIFT
	.comm	_E1000_MDIC_OP_WRITE,4,2        ; @E1000_MDIC_OP_WRITE
	.comm	_E1000_MDIC,4,2                 ; @E1000_MDIC
	.comm	_E1000_GEN_POLL_TIMEOUT,4,2     ; @E1000_GEN_POLL_TIMEOUT
	.comm	_E1000_MDIC_READY,4,2           ; @E1000_MDIC_READY
l_.str.1:                               ; @.str.1
	.asciz	"MDI Write did not complete\n"

	.comm	_E1000_ERR_PHY,4,2              ; @E1000_ERR_PHY
	.comm	_E1000_MDIC_ERROR,4,2           ; @E1000_MDIC_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"MDI Error\n"

.subsections_via_symbols
