	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reset_fw_if_needed
_reset_fw_if_needed:                    ## @reset_fw_if_needed
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	callq	_ioread32be
	movq	_MLX5_FW_RESET_SUPPORTED_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r14d, %r14d
	btl	%ecx, %eax
	jae	LBB0_6
## %bb.1:
	movq	%rbx, %rdi
	callq	_check_fatal_sensors
	movq	_MLX5_SENSOR_PCI_COMM_ERR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.2:
	movq	_MLX5_SENSOR_NIC_DISABLED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	_MLX5_SENSOR_NIC_SW_RESET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_mlx5_core_warn
	movq	_MLX5_NIC_IFC_SW_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mlx5_set_nic_state
	movl	$1, %r14d
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_mlx5_core_warn
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_FW_RESET_SUPPORTED_OFFSET,4,2 ## @MLX5_FW_RESET_SUPPORTED_OFFSET
	.comm	_MLX5_SENSOR_PCI_COMM_ERR,8,3   ## @MLX5_SENSOR_PCI_COMM_ERR
	.comm	_MLX5_SENSOR_NIC_DISABLED,8,3   ## @MLX5_SENSOR_NIC_DISABLED
	.comm	_MLX5_SENSOR_NIC_SW_RESET,8,3   ## @MLX5_SENSOR_NIC_SW_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not issuing FW reset. Either it's already done or won't help."

L_.str.1:                               ## @.str.1
	.asciz	"Issuing FW Reset\n"

	.comm	_MLX5_NIC_IFC_SW_RESET,4,2      ## @MLX5_NIC_IFC_SW_RESET
	.no_dead_strip	_reset_fw_if_needed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_fw_if_needed
_reset_fw_if_needed:                    ; @reset_fw_if_needed
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x0, [x0]
	bl	_ioread32be
Lloh0:
	adrp	x8, _MLX5_FW_RESET_SUPPORTED_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_FW_RESET_SUPPORTED_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsr	w8, w0, w8
	tbz	w8, #0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_check_fatal_sensors
Lloh3:
	adrp	x8, _MLX5_SENSOR_PCI_COMM_ERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX5_SENSOR_PCI_COMM_ERR@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _MLX5_SENSOR_NIC_DISABLED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MLX5_SENSOR_NIC_DISABLED@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _MLX5_SENSOR_NIC_SW_RESET@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MLX5_SENSOR_NIC_SW_RESET@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x0, x8
	ccmp	x0, x9, #4, ne
	ccmp	x0, x10, #4, ne
	b.ne	LBB0_4
; %bb.2:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mlx5_core_warn
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mlx5_core_warn
Lloh16:
	adrp	x8, _MLX5_NIC_IFC_SW_RESET@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MLX5_NIC_IFC_SW_RESET@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mlx5_set_nic_state
	mov	w0, #1
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_FW_RESET_SUPPORTED_OFFSET,4,2 ; @MLX5_FW_RESET_SUPPORTED_OFFSET
	.comm	_MLX5_SENSOR_PCI_COMM_ERR,8,3   ; @MLX5_SENSOR_PCI_COMM_ERR
	.comm	_MLX5_SENSOR_NIC_DISABLED,8,3   ; @MLX5_SENSOR_NIC_DISABLED
	.comm	_MLX5_SENSOR_NIC_SW_RESET,8,3   ; @MLX5_SENSOR_NIC_SW_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not issuing FW reset. Either it's already done or won't help."

l_.str.1:                               ; @.str.1
	.asciz	"Issuing FW Reset\n"

	.comm	_MLX5_NIC_IFC_SW_RESET,4,2      ; @MLX5_NIC_IFC_SW_RESET
	.no_dead_strip	_reset_fw_if_needed
.subsections_via_symbols
