	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_cmd_reset_function          ## -- Begin function be_cmd_reset_function
	.p2align	4, 0x90
_be_cmd_reset_function:                 ## @be_cmd_reset_function
	.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, %r14
	callq	_lancer_chip
	movq	%r14, %rdi
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	callq	_lancer_wait_ready
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movq	_SLI_PORT_CONTROL_IP_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SLIPORT_CONTROL_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r14), %rsi
	callq	_iowrite32
	movq	%r14, %rdi
	callq	_lancer_test_and_set_rdy_state
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_3
LBB0_4:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_7
LBB0_5:
	callq	_mutex_lock_interruptible
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_wrb_from_mbox
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_embedded_payload
	movq	_CMD_SUBSYSTEM_COMMON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_OPCODE_COMMON_FUNCTION_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movl	$4, %ecx
	movq	%rbx, %r8
	xorl	%r9d, %r9d
	callq	_be_wrb_cmd_hdr_prepare
	movq	%r14, %rdi
	callq	_be_mbox_notify_wait
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_7
LBB0_3:
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SLI_PORT_CONTROL_IP_MASK,4,2   ## @SLI_PORT_CONTROL_IP_MASK
	.comm	_SLIPORT_CONTROL_OFFSET,8,3     ## @SLIPORT_CONTROL_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Adapter in non recoverable error\n"

	.comm	_CMD_SUBSYSTEM_COMMON,4,2       ## @CMD_SUBSYSTEM_COMMON
	.comm	_OPCODE_COMMON_FUNCTION_RESET,4,2 ## @OPCODE_COMMON_FUNCTION_RESET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_cmd_reset_function          ; -- Begin function be_cmd_reset_function
	.p2align	2
_be_cmd_reset_function:                 ; @be_cmd_reset_function
	.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
	bl	_lancer_chip
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_lancer_wait_ready
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _SLI_PORT_CONTROL_IP_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SLI_PORT_CONTROL_IP_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x8, [x19, #16]
Lloh3:
	adrp	x9, _SLIPORT_CONTROL_OFFSET@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SLIPORT_CONTROL_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	mov	x0, x19
	bl	_lancer_test_and_set_rdy_state
	mov	x20, x0
	cbz	w0, LBB0_7
LBB0_3:
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_6
; %bb.5:
	mov	w20, #-1
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_wrb_from_mbox
	mov	x20, x0
	bl	_embedded_payload
Lloh8:
	adrp	x8, _CMD_SUBSYSTEM_COMMON@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CMD_SUBSYSTEM_COMMON@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _OPCODE_COMMON_FUNCTION_RESET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OPCODE_COMMON_FUNCTION_RESET@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	w3, #4
	mov	x4, x20
	mov	x5, #0
	bl	_be_wrb_cmd_hdr_prepare
	mov	x0, x19
	bl	_be_mbox_notify_wait
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SLI_PORT_CONTROL_IP_MASK,4,2   ; @SLI_PORT_CONTROL_IP_MASK
	.comm	_SLIPORT_CONTROL_OFFSET,8,3     ; @SLIPORT_CONTROL_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Adapter in non recoverable error\n"

	.comm	_CMD_SUBSYSTEM_COMMON,4,2       ; @CMD_SUBSYSTEM_COMMON
	.comm	_OPCODE_COMMON_FUNCTION_RESET,4,2 ; @OPCODE_COMMON_FUNCTION_RESET
.subsections_via_symbols
