	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cosm_hw_reset
_cosm_hw_reset:                         ## @cosm_hw_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rcx
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	16(%rcx), %rax
	testq	%rax, %rax
	jne	LBB0_3
LBB0_2:
	movq	8(%rcx), %rax
LBB0_3:
	movq	%r15, %rdi
	callq	*%rax
	movl	$45, %ebx
	movq	_MIC_READY@GOTPCREL(%rip), %r14
	movq	_MIC_RESET_FAILED@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msleep
	decl	%ebx
	jne	LBB0_4
## %bb.6:
	movq	%r12, %r14
LBB0_7:
	movl	(%r14), %esi
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cosm_set_state                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MIC_READY,4,2                  ## @MIC_READY
	.comm	_MIC_RESET_FAILED,4,2           ## @MIC_RESET_FAILED
	.comm	_MIC_RESET_TO,4,2               ## @MIC_RESET_TO
	.no_dead_strip	_cosm_hw_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cosm_hw_reset
_cosm_hw_reset:                         ; @cosm_hw_reset
	.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
	ldr	x9, [x0]
	cbz	w1, LBB0_2
; %bb.1:
	ldr	x8, [x9, #16]
	cbnz	x8, LBB0_3
LBB0_2:
	ldr	x8, [x9, #8]
LBB0_3:
	mov	x0, x19
	blr	x8
	mov	w21, #45
Lloh0:
	adrp	x20, _MIC_READY@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MIC_READY@GOTPAGEOFF]
Lloh2:
	adrp	x22, _MIC_RESET_FAILED@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MIC_RESET_FAILED@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cbnz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1000
	bl	_msleep
	subs	w21, w21, #1
	b.ne	LBB0_4
; %bb.6:
	mov	x20, x22
LBB0_7:
	ldr	w1, [x20]
	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	_cosm_set_state
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MIC_READY,4,2                  ; @MIC_READY
	.comm	_MIC_RESET_FAILED,4,2           ; @MIC_RESET_FAILED
	.comm	_MIC_RESET_TO,4,2               ; @MIC_RESET_TO
	.no_dead_strip	_cosm_hw_reset
.subsections_via_symbols
