	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_e1000_write_sfp_data_byte      ## -- Begin function e1000_write_sfp_data_byte
	.p2align	4, 0x90
_e1000_write_sfp_data_byte:             ## @e1000_write_sfp_data_byte
	.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	%rdx, %r14
	movq	%rsi, %r15
	movl	$255, %edi
	callq	_E1000_I2CCMD_SFP_DIAG_ADDR
	cmpq	%r15, %rax
	jge	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_12
LBB0_2:
	movq	_E1000_I2CCMD_REG_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	%r15, %rbx
	shlq	%cl, %rbx
	movq	_E1000_I2CCMD_OPCODE_READ@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_E1000_I2CCMD@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_wr32
	movq	_E1000_I2CCMD_PHY_TIMEOUT@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_8
## %bb.3:
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	andl	$65280, %ebx                    ## imm = 0xFF00
	movq	_E1000_I2CCMD_REG_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	movq	%r15, %rax
	shlq	%cl, %rax
	orq	%r14, %rbx
	movq	_E1000_I2CCMD_OPCODE_WRITE@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rbx
	orq	%rax, %rbx
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_wr32
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	movq	_E1000_I2CCMD_PHY_TIMEOUT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jge	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$50, %edi
	callq	_udelay
	movl	(%r12), %edi
	callq	_rd32
	movq	%rax, %rbx
	movq	_E1000_I2CCMD_READY@GOTPCREL(%rip), %rax
	testq	%rbx, (%rax)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rax
	notq	%rax
	movq	_E1000_I2CCMD_OPCODE_READ@GOTPCREL(%rip), %rcx
	testq	%rax, (%rcx)
	je	LBB0_6
LBB0_8:
	movq	_E1000_I2CCMD_READY@GOTPCREL(%rip), %rax
	testq	%rbx, (%rax)
	je	LBB0_9
## %bb.10:
	movq	_E1000_I2CCMD_ERROR@GOTPCREL(%rip), %rax
	testq	%rbx, (%rax)
	je	LBB0_14
## %bb.11:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
LBB0_12:
	callq	_hw_dbg
	movq	_E1000_ERR_PHY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2CCMD command address exceeds upper limit\n"

	.comm	_E1000_ERR_PHY,4,2              ## @E1000_ERR_PHY
	.comm	_E1000_I2CCMD_REG_ADDR_SHIFT,8,3 ## @E1000_I2CCMD_REG_ADDR_SHIFT
	.comm	_E1000_I2CCMD_OPCODE_READ,8,3   ## @E1000_I2CCMD_OPCODE_READ
	.comm	_E1000_I2CCMD,4,2               ## @E1000_I2CCMD
	.comm	_E1000_I2CCMD_PHY_TIMEOUT,8,3   ## @E1000_I2CCMD_PHY_TIMEOUT
	.comm	_E1000_I2CCMD_READY,8,3         ## @E1000_I2CCMD_READY
	.comm	_E1000_I2CCMD_OPCODE_WRITE,8,3  ## @E1000_I2CCMD_OPCODE_WRITE
L_.str.1:                               ## @.str.1
	.asciz	"I2CCMD Write did not complete\n"

	.comm	_E1000_I2CCMD_ERROR,8,3         ## @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	_e1000_write_sfp_data_byte      ; -- Begin function e1000_write_sfp_data_byte
	.p2align	2
_e1000_write_sfp_data_byte:             ; @e1000_write_sfp_data_byte
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	w0, #255
	bl	_E1000_I2CCMD_SFP_DIAG_ADDR
	cmp	x0, x20
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_2:
Lloh2:
	adrp	x22, _E1000_I2CCMD_REG_ADDR_SHIFT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _E1000_I2CCMD_REG_ADDR_SHIFT@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh4:
	adrp	x23, _E1000_I2CCMD_OPCODE_READ@GOTPAGE
Lloh5:
	ldr	x23, [x23, _E1000_I2CCMD_OPCODE_READ@GOTPAGEOFF]
	lsl	x8, x20, x8
	ldr	x9, [x23]
	orr	x21, x8, x9
Lloh6:
	adrp	x24, _E1000_I2CCMD@GOTPAGE
Lloh7:
	ldr	x24, [x24, _E1000_I2CCMD@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	x1, x21
	bl	_wr32
Lloh8:
	adrp	x26, _E1000_I2CCMD_PHY_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x26, [x26, _E1000_I2CCMD_PHY_TIMEOUT@GOTPAGEOFF]
	ldr	x8, [x26]
Lloh10:
	adrp	x25, _E1000_I2CCMD_READY@GOTPAGE
Lloh11:
	ldr	x25, [x25, _E1000_I2CCMD_READY@GOTPAGEOFF]
	cmp	x8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x27, #0
Lloh12:
	adrp	x28, _E1000_I2CCMD_OPCODE_WRITE@GOTPAGE
Lloh13:
	ldr	x28, [x28, _E1000_I2CCMD_OPCODE_WRITE@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	and	x8, x21, #0xff00
	ldr	x9, [x22]
	lsl	x9, x20, x9
	ldr	x10, [x28]
	orr	x8, x8, x19
	orr	x8, x8, x10
	orr	x21, x8, x9
	ldr	w0, [x24]
	mov	x1, x21
	bl	_wr32
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x27, x27, #1
	ldr	x8, [x26]
	cmp	x27, x8
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #50
	bl	_udelay
	ldr	w0, [x24]
	bl	_rd32
	mov	x21, x0
	ldr	x8, [x25]
	tst	x8, x0
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x23]
	bics	xzr, x8, x21
	b.eq	LBB0_4
LBB0_8:
	ldr	x8, [x25]
	tst	x8, x21
	b.eq	LBB0_11
; %bb.9:
Lloh14:
	adrp	x8, _E1000_I2CCMD_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _E1000_I2CCMD_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	tst	x8, x21
	b.eq	LBB0_14
; %bb.10:
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_12:
	bl	_hw_dbg
Lloh21:
	adrp	x8, _E1000_ERR_PHY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _E1000_ERR_PHY@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	w0, #0
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2CCMD command address exceeds upper limit\n"

	.comm	_E1000_ERR_PHY,4,2              ; @E1000_ERR_PHY
	.comm	_E1000_I2CCMD_REG_ADDR_SHIFT,8,3 ; @E1000_I2CCMD_REG_ADDR_SHIFT
	.comm	_E1000_I2CCMD_OPCODE_READ,8,3   ; @E1000_I2CCMD_OPCODE_READ
	.comm	_E1000_I2CCMD,4,2               ; @E1000_I2CCMD
	.comm	_E1000_I2CCMD_PHY_TIMEOUT,8,3   ; @E1000_I2CCMD_PHY_TIMEOUT
	.comm	_E1000_I2CCMD_READY,8,3         ; @E1000_I2CCMD_READY
	.comm	_E1000_I2CCMD_OPCODE_WRITE,8,3  ; @E1000_I2CCMD_OPCODE_WRITE
l_.str.1:                               ; @.str.1
	.asciz	"I2CCMD Write did not complete\n"

	.comm	_E1000_I2CCMD_ERROR,8,3         ; @E1000_I2CCMD_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"I2CCMD Error bit set\n"

.subsections_via_symbols
