	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ixgbe_acquire_swfw_sync_X540   ## -- Begin function ixgbe_acquire_swfw_sync_X540
	.p2align	4, 0x90
_ixgbe_acquire_swfw_sync_X540:          ## @ixgbe_acquire_swfw_sync_X540
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_IXGBE_GSSR_NVM_PHY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	andl	%esi, %r13d
	movq	_IXGBE_GSSR_I2C_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	%esi, %edi
	movl	%r13d, %eax
	shll	$5, %eax
	movq	_IXGBE_GSSR_EEP_SM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%r13d, %ecx
	je	LBB0_2
## %bb.1:
	movq	_IXGBE_GSSR_FLASH_SM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_2:
	movq	_IXGBE_GSSR_SW_MNG_SM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%edx, %esi
	cmovnel	%edx, %esi
	orl	%edi, %r13d
	orl	%esi, %r13d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	leal	(,%rdi,4), %r14d
	orl	%eax, %r14d
	orl	%ecx, %r14d
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	orl	%r13d, %r14d
	movl	$200, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_ixgbe_get_swfw_sync_semaphore
	testq	%rax, %rax
	jne	LBB0_15
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_IXGBE_SWFW_SYNC
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_IXGBE_READ_REG
	testl	%r14d, %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_ixgbe_release_swfw_sync_semaphore
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$10000, %esi                    ## imm = 0x2710
	callq	_usleep_range
	decl	%r12d
	jne	LBB0_3
## %bb.7:
	movq	%r15, %rdi
	callq	_ixgbe_get_swfw_sync_semaphore
	testq	%rax, %rax
	je	LBB0_8
LBB0_15:
	movq	_IXGBE_ERR_SWFW_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_5:
	movl	%eax, %ebx
LBB0_9:
	orl	%r13d, %ebx
	movq	%r15, %rdi
	callq	_IXGBE_SWFW_SYNC
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_IXGBE_WRITE_REG
	movq	%r15, %rdi
	callq	_ixgbe_release_swfw_sync_semaphore
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$6000, %esi                     ## imm = 0x1770
	callq	_usleep_range
	xorl	%eax, %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r15, %rdi
	callq	_IXGBE_SWFW_SYNC
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_IXGBE_READ_REG
	movl	%eax, %ebx
	testl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_9
## %bb.10:
	testl	%r13d, %ebx
	je	LBB0_14
## %bb.11:
	movq	_IXGBE_GSSR_PHY0_SM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IXGBE_GSSR_EEP_SM@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_IXGBE_GSSR_PHY1_SM@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_IXGBE_GSSR_MAC_CSR_SM@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_IXGBE_GSSR_SW_MNG_SM@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movq	_IXGBE_GSSR_I2C_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:
	orl	%eax, %esi
	movq	%r15, %rdi
	callq	_ixgbe_release_swfw_sync_X540
LBB0_14:
	movq	%r15, %rdi
	callq	_ixgbe_release_swfw_sync_semaphore
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_IXGBE_GSSR_NVM_PHY_MASK,4,2    ## @IXGBE_GSSR_NVM_PHY_MASK
	.comm	_IXGBE_GSSR_I2C_MASK,4,2        ## @IXGBE_GSSR_I2C_MASK
	.comm	_IXGBE_GSSR_EEP_SM,4,2          ## @IXGBE_GSSR_EEP_SM
	.comm	_IXGBE_GSSR_FLASH_SM,4,2        ## @IXGBE_GSSR_FLASH_SM
	.comm	_IXGBE_GSSR_SW_MNG_SM,4,2       ## @IXGBE_GSSR_SW_MNG_SM
	.comm	_IXGBE_ERR_SWFW_SYNC,4,2        ## @IXGBE_ERR_SWFW_SYNC
	.comm	_IXGBE_GSSR_PHY0_SM,4,2         ## @IXGBE_GSSR_PHY0_SM
	.comm	_IXGBE_GSSR_PHY1_SM,4,2         ## @IXGBE_GSSR_PHY1_SM
	.comm	_IXGBE_GSSR_MAC_CSR_SM,4,2      ## @IXGBE_GSSR_MAC_CSR_SM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ixgbe_acquire_swfw_sync_X540   ; -- Begin function ixgbe_acquire_swfw_sync_X540
	.p2align	2
_ixgbe_acquire_swfw_sync_X540:          ; @ixgbe_acquire_swfw_sync_X540
	.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, x0
Lloh0:
	adrp	x8, _IXGBE_GSSR_NVM_PHY_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IXGBE_GSSR_NVM_PHY_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w1
Lloh3:
	adrp	x20, _IXGBE_GSSR_I2C_MASK@GOTPAGE
Lloh4:
	ldr	x20, [x20, _IXGBE_GSSR_I2C_MASK@GOTPAGEOFF]
	ldr	w9, [x20]
	and	w21, w9, w1
Lloh5:
	adrp	x23, _IXGBE_GSSR_EEP_SM@GOTPAGE
Lloh6:
	ldr	x23, [x23, _IXGBE_GSSR_EEP_SM@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh7:
	adrp	x10, _IXGBE_GSSR_FLASH_SM@GOTPAGE
Lloh8:
	ldr	x10, [x10, _IXGBE_GSSR_FLASH_SM@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w9, wzr, w10, eq
Lloh10:
	adrp	x22, _IXGBE_GSSR_SW_MNG_SM@GOTPAGE
Lloh11:
	ldr	x22, [x22, _IXGBE_GSSR_SW_MNG_SM@GOTPAGEOFF]
	ldr	w10, [x22]
	tst	w10, w1
	csel	w10, wzr, w10, eq
	orr	w11, w21, w8
	orr	w24, w11, w10
	lsl	w10, w21, #2
	orr	w8, w10, w8, lsl #5
	orr	w25, w9, w8
	orr	w26, w25, w24
	mov	w27, #200
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_ixgbe_get_swfw_sync_semaphore
	cbnz	x0, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_IXGBE_SWFW_SYNC
	mov	x1, x0
	mov	x0, x19
	bl	_IXGBE_READ_REG
	tst	w0, w26
	b.eq	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_ixgbe_release_swfw_sync_semaphore
	mov	w0, #5000
	mov	w1, #10000
	bl	_usleep_range
	subs	w27, w27, #1
	b.ne	LBB0_1
; %bb.4:
	mov	x0, x19
	bl	_ixgbe_get_swfw_sync_semaphore
	cbz	x0, LBB0_6
LBB0_5:
Lloh12:
	adrp	x8, _IXGBE_ERR_SWFW_SYNC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IXGBE_ERR_SWFW_SYNC@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_IXGBE_SWFW_SYNC
	mov	x1, x0
	mov	x0, x19
	bl	_IXGBE_READ_REG
	tst	w0, w25
	b.eq	LBB0_9
LBB0_7:
	orr	w20, w0, w24
	mov	x0, x19
	bl	_IXGBE_SWFW_SYNC
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_IXGBE_WRITE_REG
	mov	x0, x19
	bl	_ixgbe_release_swfw_sync_semaphore
	mov	w0, #5000
	mov	w1, #6000
	bl	_usleep_range
	mov	w0, #0
LBB0_8:
	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_9:
	tst	w0, w24
	b.eq	LBB0_11
; %bb.10:
	ldr	w8, [x23]
Lloh15:
	adrp	x9, _IXGBE_GSSR_PHY0_SM@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IXGBE_GSSR_PHY0_SM@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _IXGBE_GSSR_PHY1_SM@GOTPAGE
Lloh19:
	ldr	x9, [x9, _IXGBE_GSSR_PHY1_SM@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh21:
	adrp	x9, _IXGBE_GSSR_MAC_CSR_SM@GOTPAGE
Lloh22:
	ldr	x9, [x9, _IXGBE_GSSR_MAC_CSR_SM@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x22]
	orr	w8, w8, w9
	ldr	w9, [x20]
	cmp	w21, #0
	csel	w9, wzr, w9, eq
	orr	w1, w8, w9
	mov	x0, x19
	bl	_ixgbe_release_swfw_sync_X540
LBB0_11:
	mov	x0, x19
	bl	_ixgbe_release_swfw_sync_semaphore
	b	LBB0_5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IXGBE_GSSR_NVM_PHY_MASK,4,2    ; @IXGBE_GSSR_NVM_PHY_MASK
	.comm	_IXGBE_GSSR_I2C_MASK,4,2        ; @IXGBE_GSSR_I2C_MASK
	.comm	_IXGBE_GSSR_EEP_SM,4,2          ; @IXGBE_GSSR_EEP_SM
	.comm	_IXGBE_GSSR_FLASH_SM,4,2        ; @IXGBE_GSSR_FLASH_SM
	.comm	_IXGBE_GSSR_SW_MNG_SM,4,2       ; @IXGBE_GSSR_SW_MNG_SM
	.comm	_IXGBE_ERR_SWFW_SYNC,4,2        ; @IXGBE_ERR_SWFW_SYNC
	.comm	_IXGBE_GSSR_PHY0_SM,4,2         ; @IXGBE_GSSR_PHY0_SM
	.comm	_IXGBE_GSSR_PHY1_SM,4,2         ; @IXGBE_GSSR_PHY1_SM
	.comm	_IXGBE_GSSR_MAC_CSR_SM,4,2      ; @IXGBE_GSSR_MAC_CSR_SM
.subsections_via_symbols
