	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_cmd_set_features            ## -- Begin function be_cmd_set_features
	.p2align	4, 0x90
_be_cmd_set_features:                   ## @be_cmd_set_features
	.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, %r15
	callq	_mutex_lock_interruptible
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	movq	%r15, %rdi
	callq	_wrb_from_mccq
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_embedded_payload
	movq	%rax, %rbx
	leaq	24(%rax), %rdi
	movq	_CMD_SUBSYSTEM_COMMON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OPCODE_COMMON_SET_FEATURES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$32, %ecx
	movq	%r14, %r8
	xorl	%r9d, %r9d
	callq	_be_wrb_cmd_hdr_prepare
	movq	_BE_FEATURE_UE_RECOVERY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, 16(%rbx)
	movl	$4, %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%rbx)
	movq	_BE_UE_RECOVERY_UER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, (%rbx)
	movq	%r15, %rdi
	callq	_be_mcc_notify_wait
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_embedded_payload
	movq	%rax, %rbx
	movl	4(%rax), %edi
	callq	_le16_to_cpu
	movq	%rax, 32(%r15)
	movl	(%rbx), %edi
	callq	_le16_to_cpu
	movq	%rax, 24(%r15)
	movl	$1, 16(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_2:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %edi
	callq	_base_status
	movq	_MCC_STATUS_ILLEGAL_REQUEST@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movl	%ebx, %edi
	callq	_base_status
	movq	_MCC_STATUS_INVALID_LENGTH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_7:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
LBB0_8:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CMD_SUBSYSTEM_COMMON,4,2       ## @CMD_SUBSYSTEM_COMMON
	.comm	_OPCODE_COMMON_SET_FEATURES,4,2 ## @OPCODE_COMMON_SET_FEATURES
	.comm	_BE_FEATURE_UE_RECOVERY,4,2     ## @BE_FEATURE_UE_RECOVERY
	.comm	_BE_UE_RECOVERY_UER_MASK,4,2    ## @BE_UE_RECOVERY_UER_MASK
	.comm	_MCC_STATUS_ILLEGAL_REQUEST,8,3 ## @MCC_STATUS_ILLEGAL_REQUEST
	.comm	_MCC_STATUS_INVALID_LENGTH,8,3  ## @MCC_STATUS_INVALID_LENGTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Adapter does not support HW error recovery\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_cmd_set_features            ; -- Begin function be_cmd_set_features
	.p2align	2
_be_cmd_set_features:                   ; @be_cmd_set_features
	.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	_mutex_lock_interruptible
	cbz	x0, LBB0_2
; %bb.1:
	mov	w21, #-1
	b	LBB0_10
LBB0_2:
	mov	x0, x19
	bl	_wrb_from_mccq
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	bl	_embedded_payload
	mov	x21, x0
	add	x0, x0, #24
Lloh0:
	adrp	x8, _CMD_SUBSYSTEM_COMMON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_SUBSYSTEM_COMMON@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _OPCODE_COMMON_SET_FEATURES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OPCODE_COMMON_SET_FEATURES@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w3, #32
	mov	x4, x20
	mov	x5, #0
	bl	_be_wrb_cmd_hdr_prepare
Lloh6:
	adrp	x8, _BE_FEATURE_UE_RECOVERY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BE_FEATURE_UE_RECOVERY@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [x21, #16]
	mov	w0, #4
	bl	_cpu_to_le32
	str	x0, [x21, #8]
Lloh9:
	adrp	x8, _BE_UE_RECOVERY_UER_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BE_UE_RECOVERY_UER_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [x21]
	mov	x0, x19
	bl	_be_mcc_notify_wait
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_embedded_payload
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_le16_to_cpu
	str	x0, [x19, #32]
	ldr	w0, [x20]
	bl	_le16_to_cpu
	str	x0, [x19, #24]
	mov	w8, #1
	str	w8, [x19, #16]
	b	LBB0_6
LBB0_5:
Lloh12:
	adrp	x8, _EBUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x21
	bl	_base_status
Lloh15:
	adrp	x8, _MCC_STATUS_ILLEGAL_REQUEST@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MCC_STATUS_ILLEGAL_REQUEST@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_base_status
Lloh18:
	adrp	x8, _MCC_STATUS_INVALID_LENGTH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MCC_STATUS_INVALID_LENGTH@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
LBB0_8:
	ldr	x0, [x19, #8]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_10:
	mov	x0, x21
	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
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CMD_SUBSYSTEM_COMMON,4,2       ; @CMD_SUBSYSTEM_COMMON
	.comm	_OPCODE_COMMON_SET_FEATURES,4,2 ; @OPCODE_COMMON_SET_FEATURES
	.comm	_BE_FEATURE_UE_RECOVERY,4,2     ; @BE_FEATURE_UE_RECOVERY
	.comm	_BE_UE_RECOVERY_UER_MASK,4,2    ; @BE_UE_RECOVERY_UER_MASK
	.comm	_MCC_STATUS_ILLEGAL_REQUEST,8,3 ; @MCC_STATUS_ILLEGAL_REQUEST
	.comm	_MCC_STATUS_INVALID_LENGTH,8,3  ; @MCC_STATUS_INVALID_LENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Adapter does not support HW error recovery\n"

.subsections_via_symbols
