	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcc_parse_subspace_irq
_pcc_parse_subspace_irq:                ## @pcc_parse_subspace_irq
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movl	8(%rsi), %edi
	movl	16(%rsi), %esi
	callq	_pcc_map_interrupt
	movq	_pcc_doorbell_irq@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%r14d, %r14
	movq	%rax, (%rcx,%r14,8)
	testq	%rax, %rax
	jle	LBB0_1
## %bb.2:
	movq	(%rbx), %rax
	movq	_ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	movq	%rax, %rdi
	shrq	$32, %rdi
	leal	7(%rax), %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$3, %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_acpi_os_ioremap
	movq	_pcc_doorbell_ack_vaddr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx,%r14,4)
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movl	8(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pcc_doorbell_irq,8,3           ## @pcc_doorbell_irq
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PCC GSI %d not registered\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2,8,3 ## @ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2
	.comm	_pcc_doorbell_ack_vaddr,8,3     ## @pcc_doorbell_ack_vaddr
L_.str.1:                               ## @.str.1
	.asciz	"Failed to ioremap PCC ACK register\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_pcc_parse_subspace_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcc_parse_subspace_irq
_pcc_parse_subspace_irq:                ; @pcc_parse_subspace_irq
	.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	x20, x1
	mov	x19, x0
	ldr	w0, [x1, #8]
	ldr	w1, [x1, #16]
	bl	_pcc_map_interrupt
Lloh0:
	adrp	x8, _pcc_doorbell_irq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pcc_doorbell_irq@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x0, [x8, w19, sxtw #3]
	cmp	x0, #0
	b.le	LBB0_4
; %bb.1:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	sxtw	x19, w19
	lsr	x0, x8, #32
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w1, w8, #3
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_acpi_os_ioremap
Lloh6:
	adrp	x8, _pcc_doorbell_ack_vaddr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _pcc_doorbell_ack_vaddr@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	w0, [x8, x19, lsl #2]
	cbz	w0, LBB0_5
LBB0_3:
	mov	w0, #0
	b	LBB0_7
LBB0_4:
	ldr	w8, [x20, #8]
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_pcc_doorbell_irq,8,3           ; @pcc_doorbell_irq
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PCC GSI %d not registered\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2,8,3 ; @ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2
	.comm	_pcc_doorbell_ack_vaddr,8,3     ; @pcc_doorbell_ack_vaddr
l_.str.1:                               ; @.str.1
	.asciz	"Failed to ioremap PCC ACK register\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_pcc_parse_subspace_irq
.subsections_via_symbols
