	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rockchip_pcie_ep_map_addr
_rockchip_pcie_ep_map_addr:             ## @rockchip_pcie_ep_map_addr
	.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	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	callq	_epc_get_drvdata
	movq	%rax, %rbx
	leaq	16(%rax), %r12
	movq	_BITS_PER_LONG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$2, %esi
	movq	%r12, %rdi
	callq	_find_first_zero_bit
	movl	%eax, %r13d
	movl	(%rbx), %eax
	decl	%eax
	cmpl	%eax, %r13d
	jge	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	addq	$20, %rdi
	movq	_AXI_WRAPPER_MEM_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	movl	%r15d, %r8d
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	callq	_rockchip_pcie_prog_ep_ob_atu
	movl	%r13d, %edi
	movq	%r12, %rsi
	callq	_set_bit
	movq	8(%rbx), %rax
	movslq	%r13d, %rcx
	movl	%r15d, (%rax,%rcx,4)
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BITS_PER_LONG,4,2              ## @BITS_PER_LONG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no free outbound region\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AXI_WRAPPER_MEM_WRITE,4,2      ## @AXI_WRAPPER_MEM_WRITE
	.no_dead_strip	_rockchip_pcie_ep_map_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rockchip_pcie_ep_map_addr
_rockchip_pcie_ep_map_addr:             ; @rockchip_pcie_ep_map_addr
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x4
	mov	x22, x3
	mov	x19, x2
	mov	x24, x1
	mov	x26, x0
	bl	_epc_get_drvdata
	mov	x21, x0
	add	x23, x0, #16
Lloh0:
	adrp	x8, _BITS_PER_LONG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BITS_PER_LONG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w1, w8, #2
	mov	x0, x23
	bl	_find_first_zero_bit
	ldr	w8, [x21]
	sub	w8, w8, #1
	cmp	w0, w8
	b.ge	LBB0_2
; %bb.1:
	mov	x25, x0
	add	x0, x21, #20
Lloh3:
	adrp	x8, _AXI_WRAPPER_MEM_WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AXI_WRAPPER_MEM_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x1, x24
	mov	x2, x25
	mov	x4, x19
	mov	x5, x22
	mov	x6, x20
	bl	_rockchip_pcie_prog_ep_ob_atu
	mov	x0, x25
	mov	x1, x23
	bl	_set_bit
	mov	w0, #0
	ldr	x8, [x21, #8]
	str	w19, [x8, w25, sxtw #2]
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x26
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_BITS_PER_LONG,4,2              ; @BITS_PER_LONG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no free outbound region\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AXI_WRAPPER_MEM_WRITE,4,2      ; @AXI_WRAPPER_MEM_WRITE
	.no_dead_strip	_rockchip_pcie_ep_map_addr
.subsections_via_symbols
