	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_acquire_swflag_ich8lan
_e1000_acquire_swflag_ich8lan:          ## @e1000_acquire_swflag_ich8lan
	.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	_PHY_CFG_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	___E1000_ACCESS_SHARED_RESOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_e_dbg
	movq	_E1000_ERR_PHY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_2:
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.3:
	movq	_EXTCNF_CTRL@GOTPCREL(%rip), %r12
	movq	_E1000_EXTCNF_CTRL_SWFLAG@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_er32
	movl	(%r13), %ebx
	testl	%eax, %ebx
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	callq	_mdelay
	decl	%r15d
	jne	LBB0_4
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_e_dbg
	jmp	LBB0_11
LBB0_7:
	movq	_SW_FLAG_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	orl	%eax, %ebx
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_ew32
	testl	%r15d, %r15d
	je	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_er32
	testl	%eax, (%r13)
	jne	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %ebx
	movl	$1, %edi
	callq	_mdelay
	decl	%r15d
	jne	LBB0_8
LBB0_10:
	movq	_FWSM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er32
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_e_dbg
	movl	(%r13), %esi
	notl	%esi
	andl	%ebx, %esi
	movl	(%r12), %edi
	callq	_ew32
LBB0_11:
	movq	_E1000_ERR_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.12:
	negl	%ebx
	movq	___E1000_ACCESS_SHARED_RESOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rsi
	callq	_clear_bit
	jmp	LBB0_15
LBB0_14:
	xorl	%ebx, %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_CFG_TIMEOUT,4,2            ## @PHY_CFG_TIMEOUT
	.comm	___E1000_ACCESS_SHARED_RESOURCE,4,2 ## @__E1000_ACCESS_SHARED_RESOURCE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"contention for Phy access\n"

	.comm	_E1000_ERR_PHY,4,2              ## @E1000_ERR_PHY
	.comm	_EXTCNF_CTRL,4,2                ## @EXTCNF_CTRL
	.comm	_E1000_EXTCNF_CTRL_SWFLAG,4,2   ## @E1000_EXTCNF_CTRL_SWFLAG
L_.str.1:                               ## @.str.1
	.asciz	"SW has already locked the resource.\n"

	.comm	_E1000_ERR_CONFIG,4,2           ## @E1000_ERR_CONFIG
	.comm	_SW_FLAG_TIMEOUT,4,2            ## @SW_FLAG_TIMEOUT
L_.str.2:                               ## @.str.2
	.asciz	"Failed to acquire the semaphore, FW or HW has it: FWSM=0x%8.8x EXTCNF_CTRL=0x%8.8x)\n"

	.comm	_FWSM,4,2                       ## @FWSM
	.no_dead_strip	_e1000_acquire_swflag_ich8lan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_acquire_swflag_ich8lan
_e1000_acquire_swflag_ich8lan:          ; @e1000_acquire_swflag_ich8lan
	.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, _PHY_CFG_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_CFG_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x21, ___E1000_ACCESS_SHARED_RESOURCE@GOTPAGE
Lloh4:
	ldr	x21, [x21, ___E1000_ACCESS_SHARED_RESOURCE@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	x1, [x19]
	bl	_test_and_set_bit
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
Lloh7:
	adrp	x8, _E1000_ERR_PHY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _E1000_ERR_PHY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_14
LBB0_2:
	cbz	w20, LBB0_6
; %bb.3:
Lloh10:
	adrp	x22, _EXTCNF_CTRL@GOTPAGE
Lloh11:
	ldr	x22, [x22, _EXTCNF_CTRL@GOTPAGEOFF]
Lloh12:
	adrp	x23, _E1000_EXTCNF_CTRL_SWFLAG@GOTPAGE
Lloh13:
	ldr	x23, [x23, _E1000_EXTCNF_CTRL_SWFLAG@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_er32
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
	bl	_mdelay
	subs	w20, w20, #1
	b.ne	LBB0_4
LBB0_6:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
	b	LBB0_11
LBB0_7:
Lloh16:
	adrp	x9, _SW_FLAG_TIMEOUT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SW_FLAG_TIMEOUT@GOTPAGEOFF]
Lloh18:
	ldr	w24, [x9]
	orr	w20, w8, w0
	ldr	w0, [x22]
	mov	x1, x20
	bl	_ew32
	cbz	w24, LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_er32
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x20, x0
	mov	w0, #1
	bl	_mdelay
	subs	w24, w24, #1
	b.ne	LBB0_8
LBB0_10:
Lloh19:
	adrp	x8, _FWSM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _FWSM@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_er32
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x0, x20, [sp]
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_e_dbg
	ldr	w8, [x23]
	bic	w1, w20, w8
	ldr	w0, [x22]
	bl	_ew32
LBB0_11:
Lloh24:
	adrp	x8, _E1000_ERR_CONFIG@GOTPAGE
Lloh25:
	ldr	x8, [x8, _E1000_ERR_CONFIG@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cbz	w8, LBB0_13
; %bb.12:
	neg	w20, w8
	ldr	w0, [x21]
	ldr	x1, [x19]
	bl	_clear_bit
	b	LBB0_14
LBB0_13:
	mov	w20, #0
LBB0_14:
	mov	x0, x20
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_CFG_TIMEOUT,4,2            ; @PHY_CFG_TIMEOUT
	.comm	___E1000_ACCESS_SHARED_RESOURCE,4,2 ; @__E1000_ACCESS_SHARED_RESOURCE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"contention for Phy access\n"

	.comm	_E1000_ERR_PHY,4,2              ; @E1000_ERR_PHY
	.comm	_EXTCNF_CTRL,4,2                ; @EXTCNF_CTRL
	.comm	_E1000_EXTCNF_CTRL_SWFLAG,4,2   ; @E1000_EXTCNF_CTRL_SWFLAG
l_.str.1:                               ; @.str.1
	.asciz	"SW has already locked the resource.\n"

	.comm	_E1000_ERR_CONFIG,4,2           ; @E1000_ERR_CONFIG
	.comm	_SW_FLAG_TIMEOUT,4,2            ; @SW_FLAG_TIMEOUT
l_.str.2:                               ; @.str.2
	.asciz	"Failed to acquire the semaphore, FW or HW has it: FWSM=0x%8.8x EXTCNF_CTRL=0x%8.8x)\n"

	.comm	_FWSM,4,2                       ; @FWSM
	.no_dead_strip	_e1000_acquire_swflag_ich8lan
.subsections_via_symbols
