	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ixgbe_reset_hw_X540            ## -- Begin function ixgbe_reset_hw_X540
	.p2align	4, 0x90
_ixgbe_reset_hw_X540:                   ## @ixgbe_reset_hw_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movl	112(%rdi), %r14d
	callq	*80(%rdi)
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_29
## %bb.1:
	movq	%r13, %rdi
	callq	_ixgbe_clear_tx_pending
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	*72(%r13)
	testq	%rax, %rax
	jne	LBB0_28
## %bb.2:
	movq	_IXGBE_CTRL@GOTPCREL(%rip), %r15
	movq	_IXGBE_CTRL_RST_MASK@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_IXGBE_CTRL_RST@GOTPCREL(%rip), %rax
	movq	%rbx, %r12
	movl	(%rax), %ebx
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_IXGBE_READ_REG
	orl	%eax, %ebx
	movl	(%r15), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	movq	%r12, %rbx
	callq	_IXGBE_WRITE_REG
	movq	%r13, %rdi
	callq	_IXGBE_WRITE_FLUSH
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	*64(%r13)
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$1200, %esi                     ## imm = 0x4B0
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_IXGBE_READ_REG
	testl	%eax, (%r12)
	je	LBB0_25
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_IXGBE_READ_REG
	testl	%eax, (%rbx)
	je	LBB0_25
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_IXGBE_READ_REG
	testl	%eax, (%rbx)
	je	LBB0_25
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_IXGBE_READ_REG
	testl	%eax, (%rbx)
	je	LBB0_25
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_IXGBE_READ_REG
	testl	%eax, (%rbx)
	je	LBB0_25
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_IXGBE_READ_REG
	testl	%eax, (%rbx)
	je	LBB0_25
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_IXGBE_READ_REG
	testl	%eax, (%rbx)
	je	LBB0_25
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_IXGBE_READ_REG
	testl	%eax, (%rbx)
	je	LBB0_25
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_IXGBE_READ_REG
	testl	%eax, (%rbx)
	je	LBB0_25
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_IXGBE_READ_REG
	testl	%eax, (%rbx)
	je	LBB0_25
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r12d
	movl	$1, %edi
	callq	_udelay
	testl	%r12d, (%rbx)
	je	LBB0_25
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_IXGBE_ERR_RESET_FAILED@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%r13, %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_hw_dbg
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r12d, %r12d
LBB0_26:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	$100, %edi
	callq	_msleep
	movl	(%r13), %eax
	movq	_IXGBE_FLAGS_DOUBLE_RESET_REQUIRED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_30
## %bb.27:                              ##   in Loop: Header=BB0_3 Depth=1
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%r13)
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	*72(%r13)
	testq	%rax, %rax
	je	LBB0_3
LBB0_28:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_hw_dbg
	movq	_IXGBE_ERR_SWFW_SYNC@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
LBB0_29:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	xorl	%edi, %edi
	callq	_IXGBE_RXPBSIZE
	movq	_IXGBE_RXPBSIZE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$384, %edx                      ## imm = 0x180
	shll	%cl, %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_IXGBE_WRITE_REG
	movl	108(%r13), %esi
	movq	%r13, %rdi
	callq	*56(%r13)
	movq	_IXGBE_X540_MAX_TX_QUEUES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 88(%r13)
	movq	%r13, %rdi
	callq	*48(%r13)
	movl	104(%r13), %esi
	movq	%r13, %rdi
	callq	*40(%r13)
	movl	104(%r13), %edi
	callq	_is_valid_ether_addr
	testq	%rax, %rax
	je	LBB0_32
## %bb.31:
	movq	88(%r13), %rsi
	decq	%rsi
	movq	%rsi, 96(%r13)
	movl	104(%r13), %edx
	movq	_IXGBE_RAH_AV@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	callq	*32(%r13)
	movq	96(%r13), %rsi
	movq	_IXGBE_CLEAR_VMDQ_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	*24(%r13)
	decq	88(%r13)
LBB0_32:
	leaq	8(%r13), %rsi
	leaq	4(%r13), %rdx
	movq	%r13, %rdi
	callq	*16(%r13)
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"semaphore failed with %d"

	.comm	_IXGBE_ERR_SWFW_SYNC,8,3        ## @IXGBE_ERR_SWFW_SYNC
	.comm	_IXGBE_CTRL_RST,4,2             ## @IXGBE_CTRL_RST
	.comm	_IXGBE_CTRL,4,2                 ## @IXGBE_CTRL
	.comm	_IXGBE_CTRL_RST_MASK,4,2        ## @IXGBE_CTRL_RST_MASK
	.comm	_IXGBE_ERR_RESET_FAILED,8,3     ## @IXGBE_ERR_RESET_FAILED
L_.str.1:                               ## @.str.1
	.asciz	"Reset polling failed to complete.\n"

	.comm	_IXGBE_FLAGS_DOUBLE_RESET_REQUIRED,4,2 ## @IXGBE_FLAGS_DOUBLE_RESET_REQUIRED
	.comm	_IXGBE_RXPBSIZE_SHIFT,4,2       ## @IXGBE_RXPBSIZE_SHIFT
	.comm	_IXGBE_X540_MAX_TX_QUEUES,8,3   ## @IXGBE_X540_MAX_TX_QUEUES
	.comm	_IXGBE_RAH_AV,4,2               ## @IXGBE_RAH_AV
	.comm	_IXGBE_CLEAR_VMDQ_ALL,4,2       ## @IXGBE_CLEAR_VMDQ_ALL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ixgbe_reset_hw_X540            ; -- Begin function ixgbe_reset_hw_X540
	.p2align	2
_ixgbe_reset_hw_X540:                   ; @ixgbe_reset_hw_X540
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	w20, [x0, #112]
	ldr	x8, [x0, #80]
	blr	x8
	mov	x22, x0
	cbnz	x0, LBB0_19
; %bb.1:
	mov	x0, x19
	bl	_ixgbe_clear_tx_pending
	ldr	x8, [x19, #72]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	cbnz	x0, LBB0_18
; %bb.2:
Lloh0:
	adrp	x23, _IXGBE_CTRL_RST@GOTPAGE
Lloh1:
	ldr	x23, [x23, _IXGBE_CTRL_RST@GOTPAGEOFF]
Lloh2:
	adrp	x24, _IXGBE_CTRL@GOTPAGE
Lloh3:
	ldr	x24, [x24, _IXGBE_CTRL@GOTPAGEOFF]
Lloh4:
	adrp	x25, _IXGBE_CTRL_RST_MASK@GOTPAGE
Lloh5:
	ldr	x25, [x25, _IXGBE_CTRL_RST_MASK@GOTPAGEOFF]
Lloh6:
	adrp	x26, _IXGBE_FLAGS_DOUBLE_RESET_REQUIRED@GOTPAGE
Lloh7:
	ldr	x26, [x26, _IXGBE_FLAGS_DOUBLE_RESET_REQUIRED@GOTPAGEOFF]
Lloh8:
	adrp	x21, l_.str.1@PAGE
Lloh9:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh10:
	adrp	x27, _IXGBE_ERR_RESET_FAILED@GOTPAGE
Lloh11:
	ldr	x27, [x27, _IXGBE_ERR_RESET_FAILED@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w22, [x23]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IXGBE_READ_REG
	orr	w2, w0, w22
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IXGBE_WRITE_REG
	mov	x0, x19
	bl	_IXGBE_WRITE_FLUSH
	ldr	x8, [x19, #64]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	mov	w0, #1000
	mov	w1, #1200
	bl	_usleep_range
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IXGBE_READ_REG
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IXGBE_READ_REG
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IXGBE_READ_REG
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IXGBE_READ_REG
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IXGBE_READ_REG
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IXGBE_READ_REG
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IXGBE_READ_REG
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IXGBE_READ_REG
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IXGBE_READ_REG
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IXGBE_READ_REG
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	mov	w0, #1
	bl	_udelay
	ldr	w8, [x25]
	tst	w8, w22
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x22, [x27]
	mov	x0, x19
	mov	x1, x21
	bl	_hw_dbg
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, #0
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #100
	bl	_msleep
	ldr	w8, [x19]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_3 Depth=1
	bic	w8, w8, w9
	str	w8, [x19]
	ldr	x8, [x19, #72]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	cbz	x0, LBB0_3
LBB0_18:
	str	x0, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_hw_dbg
Lloh14:
	adrp	x8, _IXGBE_ERR_SWFW_SYNC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IXGBE_ERR_SWFW_SYNC@GOTPAGEOFF]
Lloh16:
	ldr	x22, [x8]
LBB0_19:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_20:
	mov	w0, #0
	bl	_IXGBE_RXPBSIZE
	mov	x1, x0
Lloh17:
	adrp	x8, _IXGBE_RXPBSIZE_SHIFT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IXGBE_RXPBSIZE_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	mov	w9, #384
	lsl	w2, w9, w8
	mov	x0, x19
	bl	_IXGBE_WRITE_REG
	ldr	x8, [x19, #56]
	ldr	w1, [x19, #108]
	mov	x0, x19
	blr	x8
Lloh20:
	adrp	x8, _IXGBE_X540_MAX_TX_QUEUES@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IXGBE_X540_MAX_TX_QUEUES@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	str	x8, [x19, #88]
	ldr	x8, [x19, #48]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #40]
	ldr	w1, [x19, #104]
	mov	x0, x19
	blr	x8
	ldr	w0, [x19, #104]
	bl	_is_valid_ether_addr
	cbz	x0, LBB0_22
; %bb.21:
	ldr	x8, [x19, #88]
	sub	x1, x8, #1
	str	x1, [x19, #96]
	ldr	x8, [x19, #32]
	ldr	w2, [x19, #104]
Lloh23:
	adrp	x9, _IXGBE_RAH_AV@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IXGBE_RAH_AV@GOTPAGEOFF]
Lloh25:
	ldr	w4, [x9]
	mov	x0, x19
	mov	w3, #0
	blr	x8
	ldr	x8, [x19, #24]
	ldr	x1, [x19, #96]
Lloh26:
	adrp	x9, _IXGBE_CLEAR_VMDQ_ALL@GOTPAGE
Lloh27:
	ldr	x9, [x9, _IXGBE_CLEAR_VMDQ_ALL@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x9]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #88]
	sub	x8, x8, #1
	str	x8, [x19, #88]
LBB0_22:
	ldr	x8, [x19, #16]
	add	x1, x19, #8
	add	x2, x19, #4
	mov	x0, x19
	blr	x8
	b	LBB0_19
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"semaphore failed with %d"

	.comm	_IXGBE_ERR_SWFW_SYNC,8,3        ; @IXGBE_ERR_SWFW_SYNC
	.comm	_IXGBE_CTRL_RST,4,2             ; @IXGBE_CTRL_RST
	.comm	_IXGBE_CTRL,4,2                 ; @IXGBE_CTRL
	.comm	_IXGBE_CTRL_RST_MASK,4,2        ; @IXGBE_CTRL_RST_MASK
	.comm	_IXGBE_ERR_RESET_FAILED,8,3     ; @IXGBE_ERR_RESET_FAILED
l_.str.1:                               ; @.str.1
	.asciz	"Reset polling failed to complete.\n"

	.comm	_IXGBE_FLAGS_DOUBLE_RESET_REQUIRED,4,2 ; @IXGBE_FLAGS_DOUBLE_RESET_REQUIRED
	.comm	_IXGBE_RXPBSIZE_SHIFT,4,2       ; @IXGBE_RXPBSIZE_SHIFT
	.comm	_IXGBE_X540_MAX_TX_QUEUES,8,3   ; @IXGBE_X540_MAX_TX_QUEUES
	.comm	_IXGBE_RAH_AV,4,2               ; @IXGBE_RAH_AV
	.comm	_IXGBE_CLEAR_VMDQ_ALL,4,2       ; @IXGBE_CLEAR_VMDQ_ALL
.subsections_via_symbols
