	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ish_fw_reset_handler
_ish_fw_reset_handler:                  ## @ish_fw_reset_handler
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_IPC_REG_ISH2HOST_MSG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ish_reg_read
	movzwl	%ax, %eax
	movl	%eax, -20(%rbp)
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	leaq	12(%rbx), %rdi
	leaq	8(%rbx), %rsi
	callq	_list_splice_init
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_ishtp_reset_handler
	movq	%rbx, %rdi
	callq	_ish_is_input_ready
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_WAIT_FOR_INPUT_RDY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TIME_SLICE_FOR_INPUT_RDY_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_TIMEOUT_FOR_INPUT_RDY_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_timed_wait_for_timeout
LBB0_2:
	movq	%rbx, %rdi
	callq	_ish_is_input_ready
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_ish_set_host_rdy
	movq	_MNG_RESET_NOTIFY_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$4, %ecx
	callq	_ipc_send_mng_msg
	movq	_WAIT_FOR_FW_RDY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TIME_SLICE_FOR_FW_RDY_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_TIMEOUT_FOR_FW_RDY_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_timed_wait_for_timeout
	movq	%rbx, %rdi
	callq	_ishtp_fw_is_ready
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	callq	__ish_read_fw_sts_reg
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_3:
	movq	_EPIPE@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPC_REG_ISH2HOST_MSG,4,2       ## @IPC_REG_ISH2HOST_MSG
	.comm	_WAIT_FOR_INPUT_RDY,4,2         ## @WAIT_FOR_INPUT_RDY
	.comm	_TIME_SLICE_FOR_INPUT_RDY_MS,4,2 ## @TIME_SLICE_FOR_INPUT_RDY_MS
	.comm	_TIMEOUT_FOR_INPUT_RDY_MS,4,2   ## @TIMEOUT_FOR_INPUT_RDY_MS
	.comm	_EPIPE,4,2                      ## @EPIPE
	.comm	_MNG_RESET_NOTIFY_ACK,4,2       ## @MNG_RESET_NOTIFY_ACK
	.comm	_WAIT_FOR_FW_RDY,4,2            ## @WAIT_FOR_FW_RDY
	.comm	_TIME_SLICE_FOR_FW_RDY_MS,4,2   ## @TIME_SLICE_FOR_FW_RDY_MS
	.comm	_TIMEOUT_FOR_FW_RDY_MS,4,2      ## @TIMEOUT_FOR_FW_RDY_MS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[ishtp-ish]: completed reset, ISH is dead (FWSTS = %08X)\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ish_fw_reset_handler
_ish_fw_reset_handler:                  ; @ish_fw_reset_handler
	.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
Lloh0:
	adrp	x8, _IPC_REG_ISH2HOST_MSG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPC_REG_ISH2HOST_MSG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ish_reg_read
	and	w8, w0, #0xffff
	str	w8, [sp, #12]
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
	add	x0, x19, #12
	add	x1, x19, #8
	bl	_list_splice_init
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_ishtp_reset_handler
	mov	x0, x19
	bl	_ish_is_input_ready
	cbnz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _WAIT_FOR_INPUT_RDY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WAIT_FOR_INPUT_RDY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _TIME_SLICE_FOR_INPUT_RDY_MS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TIME_SLICE_FOR_INPUT_RDY_MS@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _TIMEOUT_FOR_INPUT_RDY_MS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TIMEOUT_FOR_INPUT_RDY_MS@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_timed_wait_for_timeout
LBB0_2:
	mov	x0, x19
	bl	_ish_is_input_ready
	cbz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_ish_set_host_rdy
Lloh12:
	adrp	x8, _MNG_RESET_NOTIFY_ACK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MNG_RESET_NOTIFY_ACK@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #4
	bl	_ipc_send_mng_msg
Lloh15:
	adrp	x8, _WAIT_FOR_FW_RDY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WAIT_FOR_FW_RDY@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _TIME_SLICE_FOR_FW_RDY_MS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TIME_SLICE_FOR_FW_RDY_MS@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	adrp	x8, _TIMEOUT_FOR_FW_RDY_MS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TIMEOUT_FOR_FW_RDY_MS@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_timed_wait_for_timeout
	mov	x0, x19
	bl	_ishtp_fw_is_ready
	cbz	w0, LBB0_6
; %bb.4:
	mov	w0, #0
	b	LBB0_8
LBB0_5:
Lloh24:
	adrp	x8, _EPIPE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EPIPE@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	__ish_read_fw_sts_reg
	mov	x2, x0
	ldr	w0, [x19]
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh28:
	adrp	x8, _ENODEV@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_IPC_REG_ISH2HOST_MSG,4,2       ; @IPC_REG_ISH2HOST_MSG
	.comm	_WAIT_FOR_INPUT_RDY,4,2         ; @WAIT_FOR_INPUT_RDY
	.comm	_TIME_SLICE_FOR_INPUT_RDY_MS,4,2 ; @TIME_SLICE_FOR_INPUT_RDY_MS
	.comm	_TIMEOUT_FOR_INPUT_RDY_MS,4,2   ; @TIMEOUT_FOR_INPUT_RDY_MS
	.comm	_EPIPE,4,2                      ; @EPIPE
	.comm	_MNG_RESET_NOTIFY_ACK,4,2       ; @MNG_RESET_NOTIFY_ACK
	.comm	_WAIT_FOR_FW_RDY,4,2            ; @WAIT_FOR_FW_RDY
	.comm	_TIME_SLICE_FOR_FW_RDY_MS,4,2   ; @TIME_SLICE_FOR_FW_RDY_MS
	.comm	_TIMEOUT_FOR_FW_RDY_MS,4,2      ; @TIMEOUT_FOR_FW_RDY_MS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[ishtp-ish]: completed reset, ISH is dead (FWSTS = %08X)\n"

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