	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function faraday_pci_setup_cascaded_irq
_faraday_pci_setup_cascaded_irq:        ## @faraday_pci_setup_cascaded_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_of_get_next_child
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	xorl	%r14d, %r14d
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_of_irq_get
	movl	%eax, %r15d
	testl	%eax, %eax
	jle	LBB0_5
## %bb.2:
	movq	_PCI_NUM_INTX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_faraday_pci_irqdomain_ops@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	movq	%r12, %rcx
	callq	_irq_domain_add_linear
	movl	%eax, (%r12)
	movq	%rbx, %rdi
	callq	_of_node_put
	cmpl	$0, (%r12)
	je	LBB0_6
## %bb.3:
	movq	_faraday_pci_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	movq	%r12, %rdx
	callq	_irq_set_chained_handler_and_data
	movl	(%r12), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_irq_create_mapping
	movl	(%r12), %edi
	movl	$1, %esi
	callq	_irq_create_mapping
	movl	(%r12), %edi
	movl	$2, %esi
	callq	_irq_create_mapping
	movl	(%r12), %edi
	movl	$3, %esi
	callq	_irq_create_mapping
	jmp	LBB0_8
LBB0_4:
	movq	8(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	8(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_of_node_put
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	testl	%r15d, %r15d
	cmovnel	%r15d, %r14d
	jmp	LBB0_8
LBB0_6:
	movq	8(%r12), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
LBB0_7:
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"missing child interrupt-controller node\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"failed to get parent IRQ\n"

	.comm	_PCI_NUM_INTX,4,2               ## @PCI_NUM_INTX
	.comm	_faraday_pci_irqdomain_ops,4,2  ## @faraday_pci_irqdomain_ops
L_.str.2:                               ## @.str.2
	.asciz	"failed to create Gemini PCI IRQ domain\n"

	.comm	_faraday_pci_irq_handler,4,2    ## @faraday_pci_irq_handler
	.no_dead_strip	_faraday_pci_setup_cascaded_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function faraday_pci_setup_cascaded_irq
_faraday_pci_setup_cascaded_irq:        ; @faraday_pci_setup_cascaded_irq
	.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, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	mov	x1, #0
	bl	_of_get_next_child
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	mov	w1, #0
	bl	_of_irq_get
	mov	x20, x0
	cmp	w0, #0
	b.le	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _PCI_NUM_INTX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_NUM_INTX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, _faraday_pci_irqdomain_ops@GOTPAGE
Lloh4:
	ldr	x2, [x2, _faraday_pci_irqdomain_ops@GOTPAGEOFF]
	mov	x0, x21
	mov	x3, x19
	bl	_irq_domain_add_linear
	str	w0, [x19]
	mov	x0, x21
	bl	_of_node_put
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _faraday_pci_irq_handler@GOTPAGE
Lloh6:
	ldr	x8, [x8, _faraday_pci_irq_handler@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x19
	bl	_irq_set_chained_handler_and_data
	ldr	w0, [x19]
	mov	w1, #0
	bl	_irq_create_mapping
	ldr	w0, [x19]
	mov	w1, #1
	bl	_irq_create_mapping
	ldr	w0, [x19]
	mov	w1, #2
	bl	_irq_create_mapping
	ldr	w0, [x19]
	mov	w1, #3
	bl	_irq_create_mapping
	mov	w0, #0
	b	LBB0_8
LBB0_4:
	ldr	x0, [x19, #8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldr	x0, [x19, #8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	x0, x21
	bl	_of_node_put
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w20, #0
	csneg	w0, w20, w8, ne
	b	LBB0_8
LBB0_6:
	ldr	x0, [x19, #8]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	bl	_dev_err
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	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
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"missing child interrupt-controller node\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"failed to get parent IRQ\n"

	.comm	_PCI_NUM_INTX,4,2               ; @PCI_NUM_INTX
	.comm	_faraday_pci_irqdomain_ops,4,2  ; @faraday_pci_irqdomain_ops
l_.str.2:                               ; @.str.2
	.asciz	"failed to create Gemini PCI IRQ domain\n"

	.comm	_faraday_pci_irq_handler,4,2    ; @faraday_pci_irq_handler
	.no_dead_strip	_faraday_pci_setup_cascaded_irq
.subsections_via_symbols
