	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pnv_php_init_irq
_pnv_php_init_irq:                      ## @pnv_php_init_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	24(%rdi), %r15
	movq	$0, -56(%rbp)
	movl	8(%rdi), %ecx
	leaq	L_.str(%rip), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_alloc_workqueue
	movl	%eax, 16(%rbx)
	testl	%eax, %eax
	je	LBB0_14
## %bb.1:
	movl	12(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	leaq	-56(%rbp), %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	cmpq	$0, -56(%rbp)
	je	LBB0_4
## %bb.3:
	movq	_PNV_PHP_FLAG_BROKEN_PDC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_4:
	movq	_PCI_EXP_SLTSTA@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pcie_capability_read_word
	movq	_PNV_PHP_FLAG_BROKEN_PDC@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, (%rbx)
	je	LBB0_6
## %bb.5:
	movq	_PCI_EXP_SLTSTA_DLLSC@GOTPCREL(%rip), %rax
	movl	-48(%rbp), %edx
	orl	(%rax), %edx
	jmp	LBB0_7
LBB0_14:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_pci_warn
	movq	%rbx, %rdi
	movl	$1, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pnv_php_disable_irq            ## TAILCALL
LBB0_6:
	movq	_PCI_EXP_SLTSTA_PDC@GOTPCREL(%rip), %rax
	movq	_PCI_EXP_SLTSTA_DLLSC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	orl	-48(%rbp), %edx
LBB0_7:
	movl	%edx, -48(%rbp)
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_pcie_capability_write_word
	movq	_pnv_php_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%rbx), %ecx
	movl	%r14d, %edi
	movq	%rbx, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_pnv_php_disable_irq
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_pci_warn
	jmp	LBB0_13
LBB0_9:
	movq	_PCI_EXP_SLTCTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pcie_capability_read_word
	movl	(%r13), %eax
	testl	%eax, (%rbx)
	je	LBB0_11
## %bb.10:
	movq	_PCI_EXP_SLTCTL_PDCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movq	_PCI_EXP_SLTCTL_HPIE@GOTPCREL(%rip), %rax
	movq	_PCI_EXP_SLTCTL_DLLSCE@GOTPCREL(%rip), %rcx
	orl	(%rax), %edx
	orl	(%rcx), %edx
	jmp	LBB0_12
LBB0_11:
	movq	_PCI_EXP_SLTCTL_HPIE@GOTPCREL(%rip), %rax
	movq	_PCI_EXP_SLTCTL_PDCE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_PCI_EXP_SLTCTL_DLLSCE@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	orl	-44(%rbp), %edx
LBB0_12:
	movl	%edx, -44(%rbp)
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_pcie_capability_write_word
	movl	%r14d, 4(%rbx)
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pciehp-%s"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot alloc workqueue\n"

L_.str.2:                               ## @.str.2
	.asciz	"ibm,slot-broken-pdc"

	.comm	_PNV_PHP_FLAG_BROKEN_PDC,4,2    ## @PNV_PHP_FLAG_BROKEN_PDC
	.comm	_PCI_EXP_SLTSTA,4,2             ## @PCI_EXP_SLTSTA
	.comm	_PCI_EXP_SLTSTA_DLLSC,4,2       ## @PCI_EXP_SLTSTA_DLLSC
	.comm	_PCI_EXP_SLTSTA_PDC,4,2         ## @PCI_EXP_SLTSTA_PDC
	.comm	_pnv_php_interrupt,4,2          ## @pnv_php_interrupt
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
L_.str.3:                               ## @.str.3
	.asciz	"Error %d enabling IRQ %d\n"

	.comm	_PCI_EXP_SLTCTL,4,2             ## @PCI_EXP_SLTCTL
	.comm	_PCI_EXP_SLTCTL_PDCE,4,2        ## @PCI_EXP_SLTCTL_PDCE
	.comm	_PCI_EXP_SLTCTL_HPIE,4,2        ## @PCI_EXP_SLTCTL_HPIE
	.comm	_PCI_EXP_SLTCTL_DLLSCE,4,2      ## @PCI_EXP_SLTCTL_DLLSCE
	.no_dead_strip	_pnv_php_init_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pnv_php_init_irq
_pnv_php_init_irq:                      ; @pnv_php_init_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #24]
	str	xzr, [sp, #24]
	ldr	w3, [x0, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #0
	mov	w2, #0
	bl	_alloc_workqueue
	str	w0, [x20, #16]
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x20, #12]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #24
	bl	_of_property_read_u32
	ldr	x8, [sp, #24]
	cmp	w0, #0
	ccmp	x8, #0, #4, eq
Lloh4:
	adrp	x23, _PNV_PHP_FLAG_BROKEN_PDC@GOTPAGE
Lloh5:
	ldr	x23, [x23, _PNV_PHP_FLAG_BROKEN_PDC@GOTPAGEOFF]
	b.eq	LBB0_3
; %bb.2:
	ldr	w8, [x23]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_3:
Lloh6:
	adrp	x22, _PCI_EXP_SLTSTA@GOTPAGE
Lloh7:
	ldr	x22, [x22, _PCI_EXP_SLTSTA@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #20
	mov	x0, x19
	bl	_pcie_capability_read_word
	ldr	w8, [x20]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
Lloh8:
	adrp	x8, _PCI_EXP_SLTSTA_DLLSC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PCI_EXP_SLTSTA_DLLSC@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [sp, #20]
	orr	w2, w9, w8
	b	LBB0_7
LBB0_5:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_pci_warn
	mov	x0, x20
	mov	w1, #1
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_pnv_php_disable_irq
LBB0_6:
Lloh13:
	adrp	x8, _PCI_EXP_SLTSTA_PDC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PCI_EXP_SLTSTA_PDC@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _PCI_EXP_SLTSTA_DLLSC@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PCI_EXP_SLTSTA_DLLSC@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [sp, #20]
	orr	w2, w8, w9
LBB0_7:
	str	w2, [sp, #20]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_pcie_capability_write_word
Lloh19:
	adrp	x8, _pnv_php_interrupt@GOTPAGE
Lloh20:
	ldr	x8, [x8, _pnv_php_interrupt@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	ldr	w3, [x20, #8]
	mov	x0, x21
	mov	x4, x20
	bl	_request_irq
	cbz	w0, LBB0_9
; %bb.8:
	mov	x22, x0
	mov	x0, x20
	mov	w1, #1
	bl	_pnv_php_disable_irq
	stp	x22, x21, [sp]
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_pci_warn
	b	LBB0_13
LBB0_9:
Lloh27:
	adrp	x22, _PCI_EXP_SLTCTL@GOTPAGE
Lloh28:
	ldr	x22, [x22, _PCI_EXP_SLTCTL@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #16
	mov	x0, x19
	bl	_pcie_capability_read_word
	ldr	w8, [x20]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
Lloh29:
	adrp	x8, _PCI_EXP_SLTCTL_PDCE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PCI_EXP_SLTCTL_PDCE@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	ldr	w9, [sp, #16]
	bic	w8, w9, w8
Lloh32:
	adrp	x9, _PCI_EXP_SLTCTL_HPIE@GOTPAGE
Lloh33:
	ldr	x9, [x9, _PCI_EXP_SLTCTL_HPIE@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
Lloh35:
	adrp	x10, _PCI_EXP_SLTCTL_DLLSCE@GOTPAGE
Lloh36:
	ldr	x10, [x10, _PCI_EXP_SLTCTL_DLLSCE@GOTPAGEOFF]
Lloh37:
	ldr	w10, [x10]
	orr	w8, w9, w8
	orr	w2, w8, w10
	b	LBB0_12
LBB0_11:
Lloh38:
	adrp	x8, _PCI_EXP_SLTCTL_HPIE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _PCI_EXP_SLTCTL_HPIE@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x9, _PCI_EXP_SLTCTL_PDCE@GOTPAGE
Lloh42:
	ldr	x9, [x9, _PCI_EXP_SLTCTL_PDCE@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh44:
	adrp	x9, _PCI_EXP_SLTCTL_DLLSCE@GOTPAGE
Lloh45:
	ldr	x9, [x9, _PCI_EXP_SLTCTL_DLLSCE@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [sp, #16]
	orr	w2, w8, w9
LBB0_12:
	str	w2, [sp, #16]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_pcie_capability_write_word
	str	w21, [x20, #4]
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pciehp-%s"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot alloc workqueue\n"

l_.str.2:                               ; @.str.2
	.asciz	"ibm,slot-broken-pdc"

	.comm	_PNV_PHP_FLAG_BROKEN_PDC,4,2    ; @PNV_PHP_FLAG_BROKEN_PDC
	.comm	_PCI_EXP_SLTSTA,4,2             ; @PCI_EXP_SLTSTA
	.comm	_PCI_EXP_SLTSTA_DLLSC,4,2       ; @PCI_EXP_SLTSTA_DLLSC
	.comm	_PCI_EXP_SLTSTA_PDC,4,2         ; @PCI_EXP_SLTSTA_PDC
	.comm	_pnv_php_interrupt,4,2          ; @pnv_php_interrupt
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
l_.str.3:                               ; @.str.3
	.asciz	"Error %d enabling IRQ %d\n"

	.comm	_PCI_EXP_SLTCTL,4,2             ; @PCI_EXP_SLTCTL
	.comm	_PCI_EXP_SLTCTL_PDCE,4,2        ; @PCI_EXP_SLTCTL_PDCE
	.comm	_PCI_EXP_SLTCTL_HPIE,4,2        ; @PCI_EXP_SLTCTL_HPIE
	.comm	_PCI_EXP_SLTCTL_DLLSCE,4,2      ; @PCI_EXP_SLTCTL_DLLSCE
	.no_dead_strip	_pnv_php_init_irq
.subsections_via_symbols
