	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnxt_fw_reset                  ## -- Begin function bnxt_fw_reset
	.p2align	4, 0x90
_bnxt_fw_reset:                         ## @bnxt_fw_reset
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_bnxt_rtnl_lock_sp
	movq	_BNXT_STATE_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%r14), %rbx
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	_BNXT_STATE_IN_FW_RESET@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_15
## %bb.2:
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	cmpq	$0, 32(%r14)
	je	LBB0_10
## %bb.3:
	movq	_BNXT_STATE_FW_FATAL_COND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_4
LBB0_10:
	movq	%r14, %rdi
	callq	_bnxt_fw_reset_close
	movq	_BNXT_FW_CAP_ERR_RECOVER_RELOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_12
## %bb.11:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_BNXT_FW_RESET_STATE_POLL_FW_DOWN@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_12:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	12(%r14), %eax
	movq	_BNXT_FW_RESET_STATE_ENABLE_DEV@GOTPCREL(%rip), %rcx
LBB0_13:
	movl	(%rcx), %ecx
	movl	%ecx, 16(%r14)
	cltq
LBB0_14:
	imulq	$1717986919, %rax, %rsi         ## imm = 0x66666667
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$34, %rsi
	addl	%eax, %esi
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_bnxt_queue_fw_reset_work
LBB0_15:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bnxt_rtnl_unlock_sp            ## TAILCALL
LBB0_4:
	movq	%r14, %rdi
	callq	_bnxt_get_registered_vfs
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	je	LBB0_10
## %bb.7:
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	cltq
	cmpq	%rax, (%r14)
	jge	LBB0_9
## %bb.8:
	movq	%rax, (%r14)
LBB0_9:
	movq	_BNXT_FW_RESET_STATE_POLL_VF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	jmp	LBB0_14
LBB0_5:
	movl	20(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_netdev_err
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	movl	20(%r14), %edi
	callq	_dev_close
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_BNXT_STATE_OPEN,4,2            ## @BNXT_STATE_OPEN
	.comm	_BNXT_STATE_IN_FW_RESET,4,2     ## @BNXT_STATE_IN_FW_RESET
	.comm	_BNXT_STATE_FW_FATAL_COND,4,2   ## @BNXT_STATE_FW_FATAL_COND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Firmware reset aborted, rc = %d\n"

	.comm	_BNXT_FW_RESET_STATE_POLL_VF,4,2 ## @BNXT_FW_RESET_STATE_POLL_VF
	.comm	_HZ,4,2                         ## @HZ
	.comm	_BNXT_FW_CAP_ERR_RECOVER_RELOAD,4,2 ## @BNXT_FW_CAP_ERR_RECOVER_RELOAD
	.comm	_BNXT_FW_RESET_STATE_POLL_FW_DOWN,4,2 ## @BNXT_FW_RESET_STATE_POLL_FW_DOWN
	.comm	_BNXT_FW_RESET_STATE_ENABLE_DEV,4,2 ## @BNXT_FW_RESET_STATE_ENABLE_DEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnxt_fw_reset                  ; -- Begin function bnxt_fw_reset
	.p2align	2
_bnxt_fw_reset:                         ; @bnxt_fw_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_bnxt_rtnl_lock_sp
Lloh0:
	adrp	x8, _BNXT_STATE_OPEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BNXT_STATE_OPEN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x20, x19, #24
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_9
; %bb.1:
Lloh3:
	adrp	x21, _BNXT_STATE_IN_FW_RESET@GOTPAGE
Lloh4:
	ldr	x21, [x21, _BNXT_STATE_IN_FW_RESET@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x20
	bl	_test_bit
	cbnz	x0, LBB0_9
; %bb.2:
	ldr	w0, [x21]
	mov	x1, x20
	bl	_set_bit
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _BNXT_STATE_FW_FATAL_COND@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BNXT_STATE_FW_FATAL_COND@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_10
LBB0_4:
	mov	x0, x19
	bl	_bnxt_fw_reset_close
	ldr	w8, [x19, #8]
Lloh8:
	adrp	x9, _BNXT_FW_CAP_ERR_RECOVER_RELOAD@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BNXT_FW_CAP_ERR_RECOVER_RELOAD@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh11:
	adrp	x8, _HZ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _BNXT_FW_RESET_STATE_POLL_FW_DOWN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BNXT_FW_RESET_STATE_POLL_FW_DOWN@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	ldr	w8, [x19, #12]
Lloh16:
	adrp	x9, _HZ@GOTPAGE
Lloh17:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	mul	w8, w9, w8
Lloh19:
	adrp	x9, _BNXT_FW_RESET_STATE_ENABLE_DEV@GOTPAGE
Lloh20:
	ldr	x9, [x9, _BNXT_FW_RESET_STATE_ENABLE_DEV@GOTPAGEOFF]
LBB0_7:
	ldr	w9, [x9]
	str	w9, [x19, #16]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
LBB0_8:
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w1, w8, w9
	mov	x0, x19
	bl	_bnxt_queue_fw_reset_work
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_bnxt_rtnl_unlock_sp
LBB0_10:
	mov	x0, x19
	bl	_bnxt_get_registered_vfs
	mov	x2, x0
	tbnz	w0, #31, LBB0_15
; %bb.11:
	cbz	w2, LBB0_4
; %bb.12:
	add	w8, w2, w2, lsl #2
	lsl	w8, w8, #1
	sxtw	x8, w8
	ldr	x9, [x19]
	cmp	x9, x8
	b.ge	LBB0_14
; %bb.13:
	str	x8, [x19]
LBB0_14:
Lloh21:
	adrp	x8, _BNXT_FW_RESET_STATE_POLL_VF@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BNXT_FW_RESET_STATE_POLL_VF@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [x19, #16]
Lloh24:
	adrp	x8, _HZ@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh26:
	ldrsw	x8, [x8]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	b	LBB0_8
LBB0_15:
	ldr	w0, [x19, #20]
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	ldr	w0, [x21]
	mov	x1, x20
	bl	_clear_bit
	ldr	w0, [x19, #20]
	bl	_dev_close
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_BNXT_STATE_OPEN,4,2            ; @BNXT_STATE_OPEN
	.comm	_BNXT_STATE_IN_FW_RESET,4,2     ; @BNXT_STATE_IN_FW_RESET
	.comm	_BNXT_STATE_FW_FATAL_COND,4,2   ; @BNXT_STATE_FW_FATAL_COND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Firmware reset aborted, rc = %d\n"

	.comm	_BNXT_FW_RESET_STATE_POLL_VF,4,2 ; @BNXT_FW_RESET_STATE_POLL_VF
	.comm	_HZ,4,2                         ; @HZ
	.comm	_BNXT_FW_CAP_ERR_RECOVER_RELOAD,4,2 ; @BNXT_FW_CAP_ERR_RECOVER_RELOAD
	.comm	_BNXT_FW_RESET_STATE_POLL_FW_DOWN,4,2 ; @BNXT_FW_RESET_STATE_POLL_FW_DOWN
	.comm	_BNXT_FW_RESET_STATE_ENABLE_DEV,4,2 ; @BNXT_FW_RESET_STATE_ENABLE_DEV
.subsections_via_symbols
