	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_igb_write_phy_reg_i2c          ## -- Begin function igb_write_phy_reg_i2c
	.p2align	4, 0x90
_igb_write_phy_reg_i2c:                 ## @igb_write_phy_reg_i2c
	.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	(%rdi), %r12d
	testl	%r12d, %r12d
	je	LBB0_2
## %bb.1:
	cmpl	$8, %r12d
	jge	LBB0_2
## %bb.3:
	rolw	$8, %dx
	movq	_E1000_I2CCMD_REG_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	movq	_E1000_I2CCMD_PHY_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
	movzwl	%dx, %eax
	orl	%eax, %esi
	orl	%esi, %r12d
	movq	_E1000_I2CCMD_OPCODE_WRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	_E1000_I2CCMD@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	%r12d, %esi
	callq	_wr32
	movq	_E1000_I2CCMD_PHY_TIMEOUT@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_5
## %bb.4:
	xorl	%ebx, %ebx
	movq	_E1000_I2CCMD_READY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_7:                                 ## =>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_8
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_7
LBB0_8:
	testl	%r12d, %eax
	je	LBB0_9
LBB0_10:
	movq	_E1000_I2CCMD_ERROR@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_11
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_13
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_hw_dbg
	movq	_E1000_ERR_CONFIG@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_5:
	movq	_E1000_I2CCMD_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r12d, %eax
	jne	LBB0_10
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
LBB0_13:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_hw_dbg
	movq	_E1000_ERR_PHY@GOTPCREL(%rip), %rax
LBB0_14:
	subl	(%rax), %r14d
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%r14d, %r14d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PHY I2C Address %d is out of range.\n"

	.comm	_E1000_ERR_CONFIG,4,2           ## @E1000_ERR_CONFIG
	.comm	_E1000_I2CCMD_REG_ADDR_SHIFT,4,2 ## @E1000_I2CCMD_REG_ADDR_SHIFT
	.comm	_E1000_I2CCMD_PHY_ADDR_SHIFT,4,2 ## @E1000_I2CCMD_PHY_ADDR_SHIFT
	.comm	_E1000_I2CCMD_OPCODE_WRITE,4,2  ## @E1000_I2CCMD_OPCODE_WRITE
	.comm	_E1000_I2CCMD,4,2               ## @E1000_I2CCMD
	.comm	_E1000_I2CCMD_PHY_TIMEOUT,4,2   ## @E1000_I2CCMD_PHY_TIMEOUT
	.comm	_E1000_I2CCMD_READY,4,2         ## @E1000_I2CCMD_READY
L_.str.1:                               ## @.str.1
	.asciz	"I2CCMD Write did not complete\n"

	.comm	_E1000_ERR_PHY,4,2              ## @E1000_ERR_PHY
	.comm	_E1000_I2CCMD_ERROR,4,2         ## @E1000_I2CCMD_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"I2CCMD Error bit set\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_igb_write_phy_reg_i2c          ; -- Begin function igb_write_phy_reg_i2c
	.p2align	2
_igb_write_phy_reg_i2c:                 ; @igb_write_phy_reg_i2c
	.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
	ldr	w8, [x0]
	cmp	w8, #0
	ccmp	w8, #8, #0, ne
	b.lt	LBB0_2
; %bb.1:
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hw_dbg
Lloh2:
	adrp	x8, _E1000_ERR_CONFIG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E1000_ERR_CONFIG@GOTPAGEOFF]
	b	LBB0_12
LBB0_2:
	rev	w9, w2
Lloh4:
	adrp	x10, _E1000_I2CCMD_REG_ADDR_SHIFT@GOTPAGE
Lloh5:
	ldr	x10, [x10, _E1000_I2CCMD_REG_ADDR_SHIFT@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
Lloh7:
	adrp	x11, _E1000_I2CCMD_PHY_ADDR_SHIFT@GOTPAGE
Lloh8:
	ldr	x11, [x11, _E1000_I2CCMD_PHY_ADDR_SHIFT@GOTPAGEOFF]
	lsl	w10, w1, w10
Lloh9:
	ldr	w11, [x11]
	lsl	w8, w8, w11
Lloh10:
	adrp	x11, _E1000_I2CCMD_OPCODE_WRITE@GOTPAGE
Lloh11:
	ldr	x11, [x11, _E1000_I2CCMD_OPCODE_WRITE@GOTPAGEOFF]
Lloh12:
	ldr	w11, [x11]
	orr	w9, w10, w9, lsr #16
	orr	w8, w9, w8
	orr	w19, w8, w11
Lloh13:
	adrp	x20, _E1000_I2CCMD@GOTPAGE
Lloh14:
	ldr	x20, [x20, _E1000_I2CCMD@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	x1, x19
	bl	_wr32
Lloh15:
	adrp	x21, _E1000_I2CCMD_PHY_TIMEOUT@GOTPAGE
Lloh16:
	ldr	x21, [x21, _E1000_I2CCMD_PHY_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	mov	w22, #0
Lloh17:
	adrp	x23, _E1000_I2CCMD_READY@GOTPAGE
Lloh18:
	ldr	x23, [x23, _E1000_I2CCMD_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]
	cmp	w22, w9
	b.lt	LBB0_4
LBB0_6:
	tst	w8, w19
	b.eq	LBB0_10
LBB0_7:
Lloh19:
	adrp	x8, _E1000_I2CCMD_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _E1000_I2CCMD_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_14
; %bb.8:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_9:
Lloh24:
	adrp	x8, _E1000_I2CCMD_READY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _E1000_I2CCMD_READY@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_7
LBB0_10:
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_11:
	bl	_hw_dbg
Lloh29:
	adrp	x8, _E1000_ERR_PHY@GOTPAGE
Lloh30:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PHY I2C Address %d is out of range.\n"

	.comm	_E1000_ERR_CONFIG,4,2           ; @E1000_ERR_CONFIG
	.comm	_E1000_I2CCMD_REG_ADDR_SHIFT,4,2 ; @E1000_I2CCMD_REG_ADDR_SHIFT
	.comm	_E1000_I2CCMD_PHY_ADDR_SHIFT,4,2 ; @E1000_I2CCMD_PHY_ADDR_SHIFT
	.comm	_E1000_I2CCMD_OPCODE_WRITE,4,2  ; @E1000_I2CCMD_OPCODE_WRITE
	.comm	_E1000_I2CCMD,4,2               ; @E1000_I2CCMD
	.comm	_E1000_I2CCMD_PHY_TIMEOUT,4,2   ; @E1000_I2CCMD_PHY_TIMEOUT
	.comm	_E1000_I2CCMD_READY,4,2         ; @E1000_I2CCMD_READY
l_.str.1:                               ; @.str.1
	.asciz	"I2CCMD Write did not complete\n"

	.comm	_E1000_ERR_PHY,4,2              ; @E1000_ERR_PHY
	.comm	_E1000_I2CCMD_ERROR,4,2         ; @E1000_I2CCMD_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"I2CCMD Error bit set\n"

.subsections_via_symbols
