	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_calc_capp_routing          ## -- Begin function cxl_calc_capp_routing
	.p2align	4, 0x90
_cxl_calc_capp_routing:                 ## @cxl_calc_capp_routing
	.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	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	callq	_pnv_pci_get_phb_node
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_of_get_next_parent
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
LBB0_9:
	subl	(%rax), %r12d
	jmp	LBB0_10
LBB0_5:
	movq	%rax, %rdi
	callq	_be32_to_cpup
	movl	%eax, (%r12)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_get_phb_index
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_10
LBB0_7:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_get_capp_unit_id
	movl	%eax, (%r14)
	movq	%rbx, %rdi
	callq	_of_node_put
	xorl	%r12d, %r12d
	cmpl	$0, (%r14)
	je	LBB0_8
LBB0_10:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	(%r15), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_pr_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ibm,chip-id"

L_.str.1:                               ## @.str.1
	.asciz	"cxl: invalid phb index\n"

L_.str.2:                               ## @.str.2
	.asciz	"cxl: invalid capp unit id (phb_index: %d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_calc_capp_routing          ; -- Begin function cxl_calc_capp_routing
	.p2align	2
_cxl_calc_capp_routing:                 ; @cxl_calc_capp_routing
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x3
	mov	x19, x2
	mov	x22, x1
	bl	_pnv_pci_get_phb_node
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x23, l_.str@PAGE
Lloh1:
	add	x23, x23, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x23
	mov	x2, #0
	bl	_of_get_property
	cbnz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_of_get_next_parent
	mov	x21, x0
	cbnz	x0, LBB0_2
LBB0_4:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_9
LBB0_5:
	bl	_be32_to_cpup
	str	w0, [x22]
	mov	x0, x21
	mov	x1, x19
	bl	_get_phb_index
	cbz	w0, LBB0_7
; %bb.6:
	mov	x22, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	b	LBB0_9
LBB0_7:
	ldr	w1, [x19]
	mov	x0, x21
	bl	_get_capp_unit_id
	str	w0, [x20]
	mov	x0, x21
	bl	_of_node_put
	ldr	w8, [x20]
	cbz	w8, LBB0_10
; %bb.8:
	mov	w22, #0
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ibm,chip-id"

l_.str.1:                               ; @.str.1
	.asciz	"cxl: invalid phb index\n"

l_.str.2:                               ; @.str.2
	.asciz	"cxl: invalid capp unit id (phb_index: %d)\n"

.subsections_via_symbols
