	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdns_pcie_set_outbound_region  ## -- Begin function cdns_pcie_set_outbound_region
	.p2align	4, 0x90
_cdns_pcie_set_outbound_region:         ## @cdns_pcie_set_outbound_region
	.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
	movq	%r9, %r13
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	movq	16(%rbp), %rdi
	decq	%rdi
	callq	_fls64
	movl	$1, %edi
	movl	%eax, %ecx
	shlq	%cl, %rdi
	callq	_ilog2
	movl	%eax, %edi
	cmpl	$9, %eax
	movl	$8, %eax
	cmovll	%eax, %edi
	movl	%edi, -52(%rbp)                 ## 4-byte Spill
	callq	_CDNS_PCIE_AT_OB_REGION_PCI_ADDR0_NBITS
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_lower_32_bits
	movl	%eax, %ebx
	movl	$31, %edi
	movl	$8, %esi
	callq	_GENMASK
	andl	%eax, %ebx
	orl	%r15d, %ebx
	movq	%r13, %rdi
	callq	_upper_32_bits
	movl	%eax, %r15d
	movl	%r12d, %edi
	callq	_CDNS_PCIE_AT_OB_REGION_PCI_ADDR0
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_cdns_pcie_writel
	movl	%r12d, -56(%rbp)                ## 4-byte Spill
	movl	%r12d, %edi
	callq	_CDNS_PCIE_AT_OB_REGION_PCI_ADDR1
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_cdns_pcie_writel
	movq	_CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	cmpq	$0, 16(%r14)
	je	LBB0_2
## %bb.1:
	movq	_CDNS_PCIE_AT_OB_REGION_DESC0_HARDCODED_RID@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%edi, %edi
	callq	_CDNS_PCIE_AT_OB_REGION_DESC0_DEVFN
	movl	%eax, %r15d
	orl	%ebx, %r15d
	movl	8(%r14), %edi
	callq	_CDNS_PCIE_AT_OB_REGION_DESC1_BUS
	movl	%eax, %ebx
	jmp	LBB0_3
LBB0_2:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_CDNS_PCIE_AT_OB_REGION_DESC0_DEVFN
	movl	%eax, %r15d
	xorl	%ebx, %ebx
LBB0_3:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	cmovel	%r12d, %r13d
	orl	%r15d, %r13d
	movl	-56(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edi
	callq	_CDNS_PCIE_AT_OB_REGION_DESC0
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%r13d, %edx
	callq	_cdns_pcie_writel
	movl	%r12d, %edi
	callq	_CDNS_PCIE_AT_OB_REGION_DESC1
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_cdns_pcie_writel
	movq	(%r14), %rax
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	subq	(%rax), %r13
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_CDNS_PCIE_AT_OB_REGION_CPU_ADDR0_NBITS
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_lower_32_bits
	movl	%eax, %ebx
	movl	$31, %edi
	movl	$8, %esi
	callq	_GENMASK
	andl	%eax, %ebx
	orl	%r15d, %ebx
	movq	%r13, %rdi
	callq	_upper_32_bits
	movl	%eax, %r15d
	movl	%r12d, %edi
	callq	_CDNS_PCIE_AT_OB_REGION_CPU_ADDR0
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_cdns_pcie_writel
	movl	%r12d, %edi
	callq	_CDNS_PCIE_AT_OB_REGION_CPU_ADDR1
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cdns_pcie_writel               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_IO,4,2 ## @CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_IO
	.comm	_CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_MEM,4,2 ## @CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_MEM
	.comm	_CDNS_PCIE_AT_OB_REGION_DESC0_HARDCODED_RID,4,2 ## @CDNS_PCIE_AT_OB_REGION_DESC0_HARDCODED_RID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdns_pcie_set_outbound_region  ; -- Begin function cdns_pcie_set_outbound_region
	.p2align	2
_cdns_pcie_set_outbound_region:         ; @cdns_pcie_set_outbound_region
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x5
	mov	x21, x4
	mov	x23, x3
	mov	x20, x2
	mov	x24, x1
	mov	x19, x0
	sub	x0, x6, #1
	bl	_fls64
	mov	w8, #1
	lsl	x0, x8, x0
	bl	_ilog2
	mov	w8, #8
	cmp	w0, #8
	csel	w22, w0, w8, gt
	mov	x0, x22
	bl	_CDNS_PCIE_AT_OB_REGION_PCI_ADDR0_NBITS
	mov	x26, x0
	mov	x0, x25
	bl	_lower_32_bits
	mov	x27, x0
	mov	w0, #31
	mov	w1, #8
	bl	_GENMASK
	and	w8, w0, w27
	orr	w26, w8, w26
	mov	x0, x25
	bl	_upper_32_bits
	mov	x25, x0
	mov	x0, x20
	bl	_CDNS_PCIE_AT_OB_REGION_PCI_ADDR0
	mov	x1, x0
	mov	x0, x19
	mov	x2, x26
	bl	_cdns_pcie_writel
	mov	x0, x20
	bl	_CDNS_PCIE_AT_OB_REGION_PCI_ADDR1
	mov	x1, x0
	mov	x0, x19
	mov	x2, x25
	bl	_cdns_pcie_writel
Lloh0:
	adrp	x8, _CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
Lloh3:
	adrp	x8, _CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_IO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_IO@GOTPAGEOFF]
Lloh5:
	ldr	w27, [x8]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _CDNS_PCIE_AT_OB_REGION_DESC0_HARDCODED_RID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CDNS_PCIE_AT_OB_REGION_DESC0_HARDCODED_RID@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
	mov	w0, #0
	bl	_CDNS_PCIE_AT_OB_REGION_DESC0_DEVFN
	orr	w25, w0, w24
	ldr	w0, [x19, #8]
	bl	_CDNS_PCIE_AT_OB_REGION_DESC1_BUS
	mov	x24, x0
	b	LBB0_3
LBB0_2:
	mov	x0, x24
	bl	_CDNS_PCIE_AT_OB_REGION_DESC0_DEVFN
	mov	x25, x0
	mov	w24, #0
LBB0_3:
	cmp	w23, #0
	csel	w8, w26, w27, eq
	orr	w23, w25, w8
	mov	x0, x20
	bl	_CDNS_PCIE_AT_OB_REGION_DESC0
	mov	x1, x0
	mov	x0, x19
	mov	x2, x23
	bl	_cdns_pcie_writel
	mov	x0, x20
	bl	_CDNS_PCIE_AT_OB_REGION_DESC1
	mov	x1, x0
	mov	x0, x19
	mov	x2, x24
	bl	_cdns_pcie_writel
	ldr	x8, [x19]
	ldr	x8, [x8]
	sub	x21, x21, x8
	mov	x0, x22
	bl	_CDNS_PCIE_AT_OB_REGION_CPU_ADDR0_NBITS
	mov	x22, x0
	mov	x0, x21
	bl	_lower_32_bits
	mov	x23, x0
	mov	w0, #31
	mov	w1, #8
	bl	_GENMASK
	and	w8, w0, w23
	orr	w22, w8, w22
	mov	x0, x21
	bl	_upper_32_bits
	mov	x21, x0
	mov	x0, x20
	bl	_CDNS_PCIE_AT_OB_REGION_CPU_ADDR0
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	bl	_cdns_pcie_writel
	mov	x0, x20
	bl	_CDNS_PCIE_AT_OB_REGION_CPU_ADDR1
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_cdns_pcie_writel
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_IO,4,2 ; @CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_IO
	.comm	_CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_MEM,4,2 ; @CDNS_PCIE_AT_OB_REGION_DESC0_TYPE_MEM
	.comm	_CDNS_PCIE_AT_OB_REGION_DESC0_HARDCODED_RID,4,2 ; @CDNS_PCIE_AT_OB_REGION_DESC0_HARDCODED_RID
.subsections_via_symbols
