	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _ish_ipc_reset
__ish_ipc_reset:                        ## @_ish_ipc_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$1, -40(%rbp)
	movq	$0, -32(%rbp)
	callq	_set_host_ready
	movq	_IPC_REG_ISH2HOST_DRBL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_ish_reg_write
	movq	_IPC_REG_ISH_HOST_FWSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ish_reg_read
	movq	$0, 8(%rbx)
	movq	_MNG_RESET_NOTIFY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$16, %ecx
	callq	_ipc_send_mng_msg
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	%r15d, %r14d
	jmp	LBB0_4
LBB0_2:
	movl	16(%rbx), %edi
	movq	8(%rbx), %rsi
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addl	%edx, %edx
	callq	_wait_event_interruptible_timeout
	cmpq	$0, 8(%rbx)
	jne	LBB0_4
## %bb.3:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_4:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPC_REG_ISH2HOST_DRBL,4,2      ## @IPC_REG_ISH2HOST_DRBL
	.comm	_IPC_REG_ISH_HOST_FWSTS,4,2     ## @IPC_REG_ISH_HOST_FWSTS
	.comm	_MNG_RESET_NOTIFY,4,2           ## @MNG_RESET_NOTIFY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to send IPC MNG_RESET_NOTIFY\n"

	.comm	_HZ,4,2                         ## @HZ
L_.str.1:                               ## @.str.1
	.asciz	"Timed out waiting for HW ready\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	__ish_ipc_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _ish_ipc_reset
__ish_ipc_reset:                        ; @_ish_ipc_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	mov	w8, #1
	str	w8, [sp]
	str	xzr, [sp, #8]
	bl	_set_host_ready
Lloh0:
	adrp	x8, _IPC_REG_ISH2HOST_DRBL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPC_REG_ISH2HOST_DRBL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_ish_reg_write
Lloh3:
	adrp	x8, _IPC_REG_ISH_HOST_FWSTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IPC_REG_ISH_HOST_FWSTS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ish_reg_read
	str	xzr, [x19, #8]
Lloh6:
	adrp	x8, _MNG_RESET_NOTIFY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MNG_RESET_NOTIFY@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #16
	bl	_ipc_send_mng_msg
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_5
LBB0_2:
	ldr	w0, [x19, #16]
	ldr	x1, [x19, #8]
Lloh11:
	adrp	x8, _HZ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	lsl	w2, w8, #1
	bl	_wait_event_interruptible_timeout
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w20, #0
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_IPC_REG_ISH2HOST_DRBL,4,2      ; @IPC_REG_ISH2HOST_DRBL
	.comm	_IPC_REG_ISH_HOST_FWSTS,4,2     ; @IPC_REG_ISH_HOST_FWSTS
	.comm	_MNG_RESET_NOTIFY,4,2           ; @MNG_RESET_NOTIFY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to send IPC MNG_RESET_NOTIFY\n"

	.comm	_HZ,4,2                         ; @HZ
l_.str.1:                               ; @.str.1
	.asciz	"Timed out waiting for HW ready\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	__ish_ipc_reset
.subsections_via_symbols
