	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_write_smbus_addr
_e1000_write_smbus_addr:                ## @e1000_write_smbus_addr
	.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	%rdi, %r14
	movq	_STRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er32
	movl	%eax, %r15d
	movq	_E1000_STRAP_SMT_FREQ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	andl	%r15d, %r13d
	movq	_E1000_STRAP_SMT_FREQ_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r13d
	movq	_E1000_STRAP_SMBUS_ADDRESS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_HV_SMB_ADDR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_e1000_read_phy_reg_hv_locked
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	andl	%r15d, %ebx
	movq	_HV_SMB_ADDR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	-44(%rbp), %eax
	movq	_E1000_STRAP_SMBUS_ADDRESS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %ebx
	orl	%eax, %ebx
	movq	_HV_SMB_ADDR_PEC_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_HV_SMB_ADDR_VALID@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, -44(%rbp)
	movq	(%r14), %rax
	movq	_e1000_phy_i217@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.2:
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.3:
	decl	%r13d
	movq	_HV_SMB_ADDR_FREQ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	movl	%ebx, -44(%rbp)
	xorl	%edi, %edi
	callq	_BIT
	andl	%r13d, %eax
	movq	_HV_SMB_ADDR_FREQ_LOW_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, -44(%rbp)
	movl	$1, %edi
	callq	_BIT
	movl	%eax, %ebx
	andl	%r13d, %ebx
	movq	_HV_SMB_ADDR_FREQ_HIGH_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	decb	%cl
	shll	%cl, %ebx
	orl	-44(%rbp), %ebx
	movl	%ebx, -44(%rbp)
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_e_dbg
	movl	-44(%rbp), %ebx
LBB0_5:
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_e1000_write_phy_reg_hv_locked
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STRAP,4,2                      ## @STRAP
	.comm	_E1000_STRAP_SMT_FREQ_MASK,4,2  ## @E1000_STRAP_SMT_FREQ_MASK
	.comm	_E1000_STRAP_SMT_FREQ_SHIFT,4,2 ## @E1000_STRAP_SMT_FREQ_SHIFT
	.comm	_E1000_STRAP_SMBUS_ADDRESS_MASK,4,2 ## @E1000_STRAP_SMBUS_ADDRESS_MASK
	.comm	_HV_SMB_ADDR,4,2                ## @HV_SMB_ADDR
	.comm	_HV_SMB_ADDR_MASK,4,2           ## @HV_SMB_ADDR_MASK
	.comm	_E1000_STRAP_SMBUS_ADDRESS_SHIFT,4,2 ## @E1000_STRAP_SMBUS_ADDRESS_SHIFT
	.comm	_HV_SMB_ADDR_PEC_EN,4,2         ## @HV_SMB_ADDR_PEC_EN
	.comm	_HV_SMB_ADDR_VALID,4,2          ## @HV_SMB_ADDR_VALID
	.comm	_e1000_phy_i217,8,3             ## @e1000_phy_i217
	.comm	_HV_SMB_ADDR_FREQ_MASK,4,2      ## @HV_SMB_ADDR_FREQ_MASK
	.comm	_HV_SMB_ADDR_FREQ_LOW_SHIFT,4,2 ## @HV_SMB_ADDR_FREQ_LOW_SHIFT
	.comm	_HV_SMB_ADDR_FREQ_HIGH_SHIFT,4,2 ## @HV_SMB_ADDR_FREQ_HIGH_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported SMB frequency in PHY\n"

	.no_dead_strip	_e1000_write_smbus_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_write_smbus_addr
_e1000_write_smbus_addr:                ; @e1000_write_smbus_addr
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _STRAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRAP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_er32
	mov	x20, x0
Lloh3:
	adrp	x8, _E1000_STRAP_SMT_FREQ_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _E1000_STRAP_SMT_FREQ_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
Lloh6:
	adrp	x8, _E1000_STRAP_SMT_FREQ_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _E1000_STRAP_SMT_FREQ_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
Lloh9:
	adrp	x8, _E1000_STRAP_SMBUS_ADDRESS_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _E1000_STRAP_SMBUS_ADDRESS_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w24, [x8]
Lloh12:
	adrp	x21, _HV_SMB_ADDR@GOTPAGE
Lloh13:
	ldr	x21, [x21, _HV_SMB_ADDR@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1000_read_phy_reg_hv_locked
	cbnz	x0, LBB0_6
; %bb.1:
Lloh14:
	adrp	x8, _HV_SMB_ADDR_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HV_SMB_ADDR_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
Lloh17:
	adrp	x9, _E1000_STRAP_SMBUS_ADDRESS_SHIFT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _E1000_STRAP_SMBUS_ADDRESS_SHIFT@GOTPAGEOFF]
	and	w10, w24, w20
Lloh19:
	ldr	w9, [x9]
	asr	w9, w10, w9
	orr	w8, w9, w8
Lloh20:
	adrp	x9, _HV_SMB_ADDR_PEC_EN@GOTPAGE
Lloh21:
	ldr	x9, [x9, _HV_SMB_ADDR_PEC_EN@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
Lloh23:
	adrp	x10, _HV_SMB_ADDR_VALID@GOTPAGE
Lloh24:
	ldr	x10, [x10, _HV_SMB_ADDR_VALID@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	orr	w8, w8, w9
	orr	w2, w8, w10
	str	w2, [sp, #12]
	ldr	x8, [x19]
Lloh26:
	adrp	x9, _e1000_phy_i217@GOTPAGE
Lloh27:
	ldr	x9, [x9, _e1000_phy_i217@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	and	w8, w23, w20
	asr	w8, w8, w22
	cbz	w8, LBB0_4
; %bb.3:
	sub	w20, w8, #1
Lloh29:
	adrp	x8, _HV_SMB_ADDR_FREQ_MASK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _HV_SMB_ADDR_FREQ_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	bic	w8, w2, w8
	str	w8, [sp, #12]
	mov	w0, #0
	bl	_BIT
Lloh32:
	adrp	x8, _HV_SMB_ADDR_FREQ_LOW_SHIFT@GOTPAGE
Lloh33:
	ldr	x8, [x8, _HV_SMB_ADDR_FREQ_LOW_SHIFT@GOTPAGEOFF]
	and	w9, w0, w20
Lloh34:
	ldr	w8, [x8]
	lsl	w8, w9, w8
	ldr	w9, [sp, #12]
	orr	w8, w9, w8
	str	w8, [sp, #12]
	mov	w0, #1
	bl	_BIT
	and	w8, w0, w20
Lloh35:
	adrp	x9, _HV_SMB_ADDR_FREQ_HIGH_SHIFT@GOTPAGE
Lloh36:
	ldr	x9, [x9, _HV_SMB_ADDR_FREQ_HIGH_SHIFT@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	sub	w9, w9, #1
	lsl	w8, w8, w9
	ldr	w9, [sp, #12]
	orr	w2, w8, w9
	str	w2, [sp, #12]
	b	LBB0_5
LBB0_4:
Lloh38:
	adrp	x0, l_.str@PAGE
Lloh39:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
	ldr	w2, [sp, #12]
LBB0_5:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_e1000_write_phy_reg_hv_locked
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_STRAP,4,2                      ; @STRAP
	.comm	_E1000_STRAP_SMT_FREQ_MASK,4,2  ; @E1000_STRAP_SMT_FREQ_MASK
	.comm	_E1000_STRAP_SMT_FREQ_SHIFT,4,2 ; @E1000_STRAP_SMT_FREQ_SHIFT
	.comm	_E1000_STRAP_SMBUS_ADDRESS_MASK,4,2 ; @E1000_STRAP_SMBUS_ADDRESS_MASK
	.comm	_HV_SMB_ADDR,4,2                ; @HV_SMB_ADDR
	.comm	_HV_SMB_ADDR_MASK,4,2           ; @HV_SMB_ADDR_MASK
	.comm	_E1000_STRAP_SMBUS_ADDRESS_SHIFT,4,2 ; @E1000_STRAP_SMBUS_ADDRESS_SHIFT
	.comm	_HV_SMB_ADDR_PEC_EN,4,2         ; @HV_SMB_ADDR_PEC_EN
	.comm	_HV_SMB_ADDR_VALID,4,2          ; @HV_SMB_ADDR_VALID
	.comm	_e1000_phy_i217,8,3             ; @e1000_phy_i217
	.comm	_HV_SMB_ADDR_FREQ_MASK,4,2      ; @HV_SMB_ADDR_FREQ_MASK
	.comm	_HV_SMB_ADDR_FREQ_LOW_SHIFT,4,2 ; @HV_SMB_ADDR_FREQ_LOW_SHIFT
	.comm	_HV_SMB_ADDR_FREQ_HIGH_SHIFT,4,2 ; @HV_SMB_ADDR_FREQ_HIGH_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported SMB frequency in PHY\n"

	.no_dead_strip	_e1000_write_smbus_addr
.subsections_via_symbols
