	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rockchip_pcie_parse_ep_dt
_rockchip_pcie_parse_ep_dt:             ## @rockchip_pcie_parse_ep_dt
	.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	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	callq	_rockchip_pcie_parse_dt
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movq	%rbx, %rdi
	callq	_rockchip_pcie_get_phys
	testl	%eax, %eax
	jne	LBB0_8
## %bb.2:
	movl	(%r12), %edi
	leaq	8(%r15), %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_MAX_REGION_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, (%r14)
	jg	LBB0_5
	jmp	LBB0_6
LBB0_3:
	movq	_MAX_REGION_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	movl	%eax, (%r14)
LBB0_6:
	movl	(%r12), %edi
	movq	(%r15), %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_of_property_read_u8
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jns	LBB0_8
## %bb.7:
	movq	(%r15), %rcx
	movl	$1, (%rcx)
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rockchip,max-outbound-regions"

	.comm	_MAX_REGION_LIMIT,4,2           ## @MAX_REGION_LIMIT
L_.str.1:                               ## @.str.1
	.asciz	"max-functions"

	.no_dead_strip	_rockchip_pcie_parse_ep_dt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rockchip_pcie_parse_ep_dt
_rockchip_pcie_parse_ep_dt:             ; @rockchip_pcie_parse_ep_dt
	.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	x20, x0
	ldr	x21, [x0]
	bl	_rockchip_pcie_parse_dt
	cbnz	w0, LBB0_9
; %bb.1:
	mov	x0, x20
	bl	_rockchip_pcie_get_phys
	cbnz	w0, LBB0_9
; %bb.2:
	ldr	w0, [x21]
	add	x20, x19, #8
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_of_property_read_u32
	tbnz	w0, #31, LBB0_4
; %bb.3:
	ldr	w9, [x20]
Lloh2:
	adrp	x8, _MAX_REGION_LIMIT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_REGION_LIMIT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w9, w8
	b.gt	LBB0_5
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x8, _MAX_REGION_LIMIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX_REGION_LIMIT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
LBB0_5:
	str	w8, [x20]
LBB0_6:
	ldr	w0, [x21]
	ldr	x2, [x19]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_of_property_read_u8
	tbnz	w0, #31, LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	mov	w0, #0
	ldr	x8, [x19]
	mov	w9, #1
	str	w9, [x8]
LBB0_9:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rockchip,max-outbound-regions"

	.comm	_MAX_REGION_LIMIT,4,2           ; @MAX_REGION_LIMIT
l_.str.1:                               ; @.str.1
	.asciz	"max-functions"

	.no_dead_strip	_rockchip_pcie_parse_ep_dt
.subsections_via_symbols
