	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_get_hw_semaphore_82573
_e1000_get_hw_semaphore_82573:          ## @e1000_get_hw_semaphore_82573
	.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, -48(%rbp)                 ## 8-byte Spill
	movq	_EXTCNF_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_er32
	movl	%eax, %ebx
	xorl	%r15d, %r15d
	movq	_E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP@GOTPCREL(%rip), %r13
	movq	_MDIO_OWNERSHIP_TIMEOUT@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	orl	(%r13), %ebx
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_ew32
	movl	(%r12), %edi
	callq	_er32
	testl	%eax, (%r13)
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ebx
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_usleep_range
	incq	%r15
	movq	(%r14), %rax
	cmpq	%rax, %r15
	jl	LBB0_1
## %bb.4:
	cmpq	%rax, %r15
	jne	LBB0_5
LBB0_6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_e1000_put_hw_semaphore_82573
	leaq	L_.str(%rip), %rdi
	callq	_e_dbg
	movq	_E1000_ERR_PHY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
	jmp	LBB0_7
LBB0_2:
	movq	(%r14), %rax
	cmpq	%rax, %r15
	je	LBB0_6
LBB0_5:
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXTCNF_CTRL,4,2                ## @EXTCNF_CTRL
	.comm	_E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP,4,2 ## @E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP
	.comm	_MDIO_OWNERSHIP_TIMEOUT,8,3     ## @MDIO_OWNERSHIP_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Driver can't access the PHY\n"

	.comm	_E1000_ERR_PHY,8,3              ## @E1000_ERR_PHY
	.no_dead_strip	_e1000_get_hw_semaphore_82573
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_get_hw_semaphore_82573
_e1000_get_hw_semaphore_82573:          ; @e1000_get_hw_semaphore_82573
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, _EXTCNF_CTRL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EXTCNF_CTRL@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_er32
	mov	x20, x0
	mov	x21, #0
Lloh2:
	adrp	x23, _E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP@GOTPAGE
Lloh3:
	ldr	x23, [x23, _E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP@GOTPAGEOFF]
Lloh4:
	adrp	x24, _MDIO_OWNERSHIP_TIMEOUT@GOTPAGE
Lloh5:
	ldr	x24, [x24, _MDIO_OWNERSHIP_TIMEOUT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	orr	w1, w8, w20
	ldr	w0, [x22]
	bl	_ew32
	ldr	w0, [x22]
	bl	_er32
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x20, x0
	mov	w0, #2000
	mov	w1, #4000
	bl	_usleep_range
	add	x21, x21, #1
	ldr	x8, [x24]
	cmp	x21, x8
	b.lt	LBB0_1
; %bb.3:
	cmp	x21, x8
	b.ne	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_e1000_put_hw_semaphore_82573
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
Lloh8:
	adrp	x8, _E1000_ERR_PHY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _E1000_ERR_PHY@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	neg	x0, x8
	b	LBB0_7
LBB0_5:
	ldr	x8, [x24]
	cmp	x21, x8
	b.eq	LBB0_4
LBB0_6:
	mov	x0, #0
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EXTCNF_CTRL,4,2                ; @EXTCNF_CTRL
	.comm	_E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP,4,2 ; @E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP
	.comm	_MDIO_OWNERSHIP_TIMEOUT,8,3     ; @MDIO_OWNERSHIP_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Driver can't access the PHY\n"

	.comm	_E1000_ERR_PHY,8,3              ; @E1000_ERR_PHY
	.no_dead_strip	_e1000_get_hw_semaphore_82573
.subsections_via_symbols
