	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_do_flr
_bnx2x_do_flr:                          ## @bnx2x_do_flr
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	callq	_CHIP_IS_E1x
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_BNX2X_DEV_INFO
	jmp	LBB0_2
LBB0_3:
	movq	(%r15), %rsi
	movq	_REQ_BC_VER_4_INITIATE_FLR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jge	LBB0_9
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_BNX2X_ERR
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_PCI_EXP_DEVSTA@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pcie_capability_read_word
	movq	_PCI_EXP_DEVSTA_TRPND@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_10
## %bb.5:
	movl	$100, %edi
	callq	_msleep
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pcie_capability_read_word
	movl	(%rbx), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_10
## %bb.6:
	movl	$200, %edi
	callq	_msleep
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pcie_capability_read_word
	movl	(%rbx), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_10
## %bb.7:
	movl	$400, %edi                      ## imm = 0x190
	callq	_msleep
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pcie_capability_read_word
	movl	(%rbx), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_10
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
	callq	_BNX2X_DEV_INFO
	movq	_DRV_MSG_CODE_INITIATE_FLR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_bnx2x_fw_command
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FLR not supported in E1/E1H\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_REQ_BC_VER_4_INITIATE_FLR,8,3  ## @REQ_BC_VER_4_INITIATE_FLR
L_.str.1:                               ## @.str.1
	.asciz	"FLR not supported by BC_VER: 0x%x\n"

	.comm	_PCI_EXP_DEVSTA,4,2             ## @PCI_EXP_DEVSTA
	.comm	_PCI_EXP_DEVSTA_TRPND,4,2       ## @PCI_EXP_DEVSTA_TRPND
L_.str.2:                               ## @.str.2
	.asciz	"transaction is not cleared; proceeding with reset anyway\n"

L_.str.3:                               ## @.str.3
	.asciz	"Initiating FLR\n"

	.comm	_DRV_MSG_CODE_INITIATE_FLR,4,2  ## @DRV_MSG_CODE_INITIATE_FLR
	.no_dead_strip	_bnx2x_do_flr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_do_flr
_bnx2x_do_flr:                          ; @bnx2x_do_flr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x20, [x0, #8]
	bl	_CHIP_IS_E1x
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BNX2X_DEV_INFO
	b	LBB0_4
LBB0_2:
	ldr	x1, [x19]
Lloh2:
	adrp	x8, _REQ_BC_VER_4_INITIATE_FLR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REQ_BC_VER_4_INITIATE_FLR@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ge	LBB0_6
; %bb.3:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_BNX2X_ERR
LBB0_4:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	add	sp, sp, #64
	ret
LBB0_6:
Lloh10:
	adrp	x21, _PCI_EXP_DEVSTA@GOTPAGE
Lloh11:
	ldr	x21, [x21, _PCI_EXP_DEVSTA@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pcie_capability_read_word
	ldr	w8, [sp, #12]
Lloh12:
	adrp	x22, _PCI_EXP_DEVSTA_TRPND@GOTPAGE
Lloh13:
	ldr	x22, [x22, _PCI_EXP_DEVSTA_TRPND@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.7:
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pcie_capability_read_word
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:
	mov	w0, #200
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pcie_capability_read_word
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.9:
	mov	w0, #400
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pcie_capability_read_word
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_11:
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_BNX2X_DEV_INFO
Lloh18:
	adrp	x8, _DRV_MSG_CODE_INITIATE_FLR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DRV_MSG_CODE_INITIATE_FLR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_bnx2x_fw_command
	mov	w0, #0
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FLR not supported in E1/E1H\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_REQ_BC_VER_4_INITIATE_FLR,8,3  ; @REQ_BC_VER_4_INITIATE_FLR
l_.str.1:                               ; @.str.1
	.asciz	"FLR not supported by BC_VER: 0x%x\n"

	.comm	_PCI_EXP_DEVSTA,4,2             ; @PCI_EXP_DEVSTA
	.comm	_PCI_EXP_DEVSTA_TRPND,4,2       ; @PCI_EXP_DEVSTA_TRPND
l_.str.2:                               ; @.str.2
	.asciz	"transaction is not cleared; proceeding with reset anyway\n"

l_.str.3:                               ; @.str.3
	.asciz	"Initiating FLR\n"

	.comm	_DRV_MSG_CODE_INITIATE_FLR,4,2  ; @DRV_MSG_CODE_INITIATE_FLR
	.no_dead_strip	_bnx2x_do_flr
.subsections_via_symbols
