	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_enter_error_state         ## -- Begin function mlx5_enter_error_state
	.p2align	4, 0x90
_mlx5_enter_error_state:                ## @mlx5_enter_error_state
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rcx
	movq	_MLX5_DEVICE_STATE_INTERNAL_ERROR@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	cmpq	%rax, %rcx
	je	LBB0_7
## %bb.1:
	movq	_MLX5_DEVICE_STATE_UNINITIALIZED@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.2:
	movq	%rax, (%rbx)
	jmp	LBB0_7
LBB0_3:
	movq	%rbx, %rdi
	callq	_check_fatal_sensors
	testl	%r15d, %r15d
	jne	LBB0_5
## %bb.4:
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	movq	(%r12), %rax
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	callq	_mlx5_cmd_flush
LBB0_6:
	movl	12(%rbx), %edi
	movq	_MLX5_DEV_EVENT_SYS_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_mlx5_notifier_call_chain
LBB0_7:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_DEVICE_STATE_INTERNAL_ERROR,8,3 ## @MLX5_DEVICE_STATE_INTERNAL_ERROR
	.comm	_MLX5_DEVICE_STATE_UNINITIALIZED,8,3 ## @MLX5_DEVICE_STATE_UNINITIALIZED
	.comm	_MLX5_DEV_EVENT_SYS_ERROR,4,2   ## @MLX5_DEV_EVENT_SYS_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_enter_error_state         ; -- Begin function mlx5_enter_error_state
	.p2align	2
_mlx5_enter_error_state:                ; @mlx5_enter_error_state
	.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	x21, x1
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x9, [x20]
Lloh0:
	adrp	x22, _MLX5_DEVICE_STATE_INTERNAL_ERROR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MLX5_DEVICE_STATE_INTERNAL_ERROR@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x9, x8
	b.eq	LBB0_7
; %bb.1:
Lloh2:
	adrp	x10, _MLX5_DEVICE_STATE_UNINITIALIZED@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MLX5_DEVICE_STATE_UNINITIALIZED@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.2:
	str	x8, [x20]
	b	LBB0_7
LBB0_3:
	mov	x0, x20
	bl	_check_fatal_sensors
	cbnz	w21, LBB0_5
; %bb.4:
	cbz	x0, LBB0_6
LBB0_5:
	ldr	x8, [x22]
	str	x8, [x20]
	mov	x0, x20
	bl	_mlx5_cmd_flush
LBB0_6:
	ldr	w0, [x20, #12]
Lloh5:
	adrp	x8, _MLX5_DEV_EVENT_SYS_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MLX5_DEV_EVENT_SYS_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_mlx5_notifier_call_chain
LBB0_7:
	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	_mutex_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_DEVICE_STATE_INTERNAL_ERROR,8,3 ; @MLX5_DEVICE_STATE_INTERNAL_ERROR
	.comm	_MLX5_DEVICE_STATE_UNINITIALIZED,8,3 ; @MLX5_DEVICE_STATE_UNINITIALIZED
	.comm	_MLX5_DEV_EVENT_SYS_ERROR,4,2   ; @MLX5_DEV_EVENT_SYS_ERROR
.subsections_via_symbols
