	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ish_irq_handler                ## -- Begin function ish_irq_handler
	.p2align	4, 0x90
_ish_irq_handler:                       ## @ish_irq_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rsi, %rdi
	callq	_check_generated_interrupt
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_IPC_REG_ISH2HOST_DRBL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_ish_reg_read
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_IPC_IS_BUSY
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %r12
	testl	%eax, %eax
	je	LBB0_11
## %bb.3:
	movq	(%rbx), %rax
	movq	_ISHTP_DEV_DISABLED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.4:
	movl	%r14d, %edi
	callq	_IPC_HEADER_GET_LENGTH
	movq	_IPC_PAYLOAD_SIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_6
## %bb.5:
	movl	16(%rbx), %r15d
	movl	%r14d, %edi
	callq	_IPC_HEADER_GET_LENGTH
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_10
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %r12
	jmp	LBB0_11
LBB0_6:
	movl	%r14d, %edi
	callq	_IPC_HEADER_GET_PROTOCOL
	cmpl	$129, %eax
	je	LBB0_9
## %bb.7:
	cmpl	$128, %eax
	jne	LBB0_10
## %bb.8:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_recv_ipc
	jmp	LBB0_10
LBB0_9:
	movq	%rbx, %rdi
	callq	_ishtp_recv
LBB0_10:
	incl	12(%rbx)
	movl	%r14d, %edi
	callq	_IPC_HEADER_GET_LENGTH
	addl	%eax, 8(%rbx)
	movl	(%r13), %esi
	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
LBB0_11:
	movl	(%r12), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_IPC_REG_ISH2HOST_DRBL,4,2      ## @IPC_REG_ISH2HOST_DRBL
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_ISHTP_DEV_DISABLED,8,3         ## @ISHTP_DEV_DISABLED
	.comm	_IPC_PAYLOAD_SIZE,8,3           ## @IPC_PAYLOAD_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IPC hdr - bad length: %u; dropped\n"

	.comm	_IPC_REG_ISH_HOST_FWSTS,4,2     ## @IPC_REG_ISH_HOST_FWSTS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ish_irq_handler                ; -- Begin function ish_irq_handler
	.p2align	2
_ish_irq_handler:                       ; @ish_irq_handler
	.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, x1
	mov	x0, x1
	bl	_check_generated_interrupt
	cbz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x22, _IPC_REG_ISH2HOST_DRBL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IPC_REG_ISH2HOST_DRBL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ish_reg_read
	mov	x20, x0
	bl	_IPC_IS_BUSY
	cbz	w0, LBB0_11
; %bb.2:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _ISHTP_DEV_DISABLED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ISHTP_DEV_DISABLED@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.3:
	mov	x0, x20
	bl	_IPC_HEADER_GET_LENGTH
Lloh5:
	adrp	x8, _IPC_PAYLOAD_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IPC_PAYLOAD_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_6
; %bb.4:
	ldr	w21, [x19, #16]
	mov	x0, x20
	bl	_IPC_HEADER_GET_LENGTH
	mov	x2, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_dev_err
	b	LBB0_10
LBB0_5:
Lloh10:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_12
LBB0_6:
	mov	x0, x20
	bl	_IPC_HEADER_GET_PROTOCOL
	cmp	w0, #129
	b.eq	LBB0_9
; %bb.7:
	cmp	w0, #128
	b.ne	LBB0_10
; %bb.8:
	mov	x0, x19
	mov	x1, x20
	bl	_recv_ipc
	b	LBB0_10
LBB0_9:
	mov	x0, x19
	bl	_ishtp_recv
LBB0_10:
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	mov	x0, x20
	bl	_IPC_HEADER_GET_LENGTH
	ldr	w8, [x19, #8]
	add	w8, w8, w0
	str	w8, [x19, #8]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_ish_reg_write
Lloh12:
	adrp	x8, _IPC_REG_ISH_HOST_FWSTS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IPC_REG_ISH_HOST_FWSTS@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ish_reg_read
LBB0_11:
Lloh15:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_IPC_REG_ISH2HOST_DRBL,4,2      ; @IPC_REG_ISH2HOST_DRBL
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_ISHTP_DEV_DISABLED,8,3         ; @ISHTP_DEV_DISABLED
	.comm	_IPC_PAYLOAD_SIZE,8,3           ; @IPC_PAYLOAD_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IPC hdr - bad length: %u; dropped\n"

	.comm	_IPC_REG_ISH_HOST_FWSTS,4,2     ; @IPC_REG_ISH_HOST_FWSTS
.subsections_via_symbols
