	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_error_sw_reset            ## -- Begin function mlx5_error_sw_reset
	.p2align	4, 0x90
_mlx5_error_sw_reset:                   ## @mlx5_error_sw_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	%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, %r13
	movq	_MLX5_FW_RESET_WAIT_MS@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_EBUSY@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%r13), %rax
	movq	_MLX5_DEVICE_STATE_INTERNAL_ERROR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_mlx5_core_err
	movq	%r13, %rdi
	callq	_check_fatal_sensors
	movq	_MLX5_SENSOR_FW_SYND_RFR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_lock_sem_sw_reset
	movl	%eax, %ecx
	addl	(%r15), %ecx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_5
## %bb.4:
	movq	_MLX5_CRDUMP_WAIT_MS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
LBB0_2:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	negl	%ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_6
LBB0_5:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_reset_fw_if_needed
LBB0_6:
	movq	_jiffies@GOTPCREL(%rip), %r15
	movq	(%r15), %r12
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	addq	%r12, %rbx
	movq	_MLX5_NIC_IFC_DISABLED@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_mlx5_get_nic_state
	cmpq	(%r12), %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	callq	_cond_resched
	movq	(%r15), %rdi
	movq	%rbx, %rsi
	callq	_time_after
	testl	%eax, %eax
	je	LBB0_7
LBB0_9:
	movq	%r13, %rdi
	callq	_mlx5_get_nic_state
	cmpq	(%r12), %rax
	je	LBB0_11
## %bb.10:
	movq	16(%r13), %rbx
	movq	%r13, %rdi
	callq	_mlx5_get_nic_state
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_dev_err
LBB0_11:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_13
## %bb.12:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_lock_sem_sw_reset
LBB0_13:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_mlx5_core_err
LBB0_14:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_FW_RESET_WAIT_MS,8,3      ## @MLX5_FW_RESET_WAIT_MS
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MLX5_DEVICE_STATE_INTERNAL_ERROR,8,3 ## @MLX5_DEVICE_STATE_INTERNAL_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"start\n"

	.comm	_MLX5_SENSOR_FW_SYND_RFR,8,3    ## @MLX5_SENSOR_FW_SYND_RFR
	.comm	_MLX5_CRDUMP_WAIT_MS,8,3        ## @MLX5_CRDUMP_WAIT_MS
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_MLX5_NIC_IFC_DISABLED,8,3      ## @MLX5_NIC_IFC_DISABLED
L_.str.1:                               ## @.str.1
	.asciz	"NIC IFC still %d after %lums.\n"

L_.str.2:                               ## @.str.2
	.asciz	"end\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_error_sw_reset            ; -- Begin function mlx5_error_sw_reset
	.p2align	2
_mlx5_error_sw_reset:                   ; @mlx5_error_sw_reset
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _MLX5_FW_RESET_WAIT_MS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_FW_RESET_WAIT_MS@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
Lloh3:
	adrp	x23, _EBUSY@GOTPAGE
Lloh4:
	ldr	x23, [x23, _EBUSY@GOTPAGEOFF]
	ldr	w22, [x23]
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _MLX5_DEVICE_STATE_INTERNAL_ERROR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MLX5_DEVICE_STATE_INTERNAL_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.1:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mlx5_core_err
	mov	x0, x20
	bl	_check_fatal_sensors
Lloh10:
	adrp	x8, _MLX5_SENSOR_FW_SYND_RFR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MLX5_SENSOR_FW_SYND_RFR@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x20
	mov	w1, #1
	bl	_lock_sem_sw_reset
	mov	x22, x0
	ldr	w8, [x23]
	cmn	w0, w8
	b.ne	LBB0_5
; %bb.3:
Lloh13:
	adrp	x8, _MLX5_CRDUMP_WAIT_MS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MLX5_CRDUMP_WAIT_MS@GOTPAGEOFF]
Lloh15:
	ldr	x21, [x8]
	b	LBB0_6
LBB0_4:
	neg	w22, w22
	b	LBB0_6
LBB0_5:
	mov	x0, x20
	bl	_reset_fw_if_needed
LBB0_6:
Lloh16:
	adrp	x24, _jiffies@GOTPAGE
Lloh17:
	ldr	x24, [x24, _jiffies@GOTPAGEOFF]
	ldr	x23, [x24]
	mov	x0, x21
	bl	_msecs_to_jiffies
	add	x23, x0, x23
Lloh18:
	adrp	x25, _MLX5_NIC_IFC_DISABLED@GOTPAGE
Lloh19:
	ldr	x25, [x25, _MLX5_NIC_IFC_DISABLED@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_mlx5_get_nic_state
	ldr	x8, [x25]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_cond_resched
	ldr	x0, [x24]
	mov	x1, x23
	bl	_time_after
	cbz	w0, LBB0_7
LBB0_9:
	mov	x0, x20
	bl	_mlx5_get_nic_state
	ldr	x8, [x25]
	cmp	x0, x8
	b.eq	LBB0_11
; %bb.10:
	ldr	x23, [x20, #16]
	mov	x0, x20
	bl	_mlx5_get_nic_state
	mov	x2, x0
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	mov	x3, x21
	bl	_dev_err
LBB0_11:
	cbnz	w22, LBB0_13
; %bb.12:
	mov	x0, x20
	mov	w1, #0
	bl	_lock_sem_sw_reset
LBB0_13:
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_mlx5_core_err
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_FW_RESET_WAIT_MS,8,3      ; @MLX5_FW_RESET_WAIT_MS
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MLX5_DEVICE_STATE_INTERNAL_ERROR,8,3 ; @MLX5_DEVICE_STATE_INTERNAL_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"start\n"

	.comm	_MLX5_SENSOR_FW_SYND_RFR,8,3    ; @MLX5_SENSOR_FW_SYND_RFR
	.comm	_MLX5_CRDUMP_WAIT_MS,8,3        ; @MLX5_CRDUMP_WAIT_MS
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_MLX5_NIC_IFC_DISABLED,8,3      ; @MLX5_NIC_IFC_DISABLED
l_.str.1:                               ; @.str.1
	.asciz	"NIC IFC still %d after %lums.\n"

l_.str.2:                               ; @.str.2
	.asciz	"end\n"

.subsections_via_symbols
