	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmdreset
_cmdreset:                              ## @cmdreset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	$1, %esi
	callq	_disable_MAC
	movq	%rbx, %rdi
	callq	_waitbusy
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CMD_SOFTRESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_OUT4500
	movl	$1, %edi
	callq	_ssleep
	movq	%rbx, %rdi
	callq	_waitbusy
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rsi
LBB0_4:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_airo_print_info
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Waitbusy hang before RESET"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_COMMAND,4,2                    ## @COMMAND
	.comm	_CMD_SOFTRESET,4,2              ## @CMD_SOFTRESET
L_.str.1:                               ## @.str.1
	.asciz	"Waitbusy hang AFTER RESET"

	.no_dead_strip	_cmdreset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmdreset
_cmdreset:                              ; @cmdreset
	.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
	mov	w1, #1
	bl	_disable_MAC
	mov	x0, x19
	bl	_waitbusy
	cbz	w0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _COMMAND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COMMAND@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _CMD_SOFTRESET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMD_SOFTRESET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_OUT4500
	mov	w0, #1
	bl	_ssleep
	mov	x0, x19
	bl	_waitbusy
	cbz	w0, LBB0_4
; %bb.2:
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_airo_print_info
Lloh10:
	adrp	x8, _EBUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Waitbusy hang before RESET"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_COMMAND,4,2                    ; @COMMAND
	.comm	_CMD_SOFTRESET,4,2              ; @CMD_SOFTRESET
l_.str.1:                               ; @.str.1
	.asciz	"Waitbusy hang AFTER RESET"

	.no_dead_strip	_cmdreset
.subsections_via_symbols
