	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_pcie_ep_inbound_atu
_dw_pcie_ep_inbound_atu:                ## @dw_pcie_ep_inbound_atu
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_to_dw_pcie_from_ep
	movq	%rax, %r15
	movl	8(%rbx), %edi
	movq	(%rbx), %rsi
	callq	_find_first_zero_bit
	cmpq	(%rbx), %rax
	jge	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%r15, %rdi
	movq	%rax, %rsi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_dw_pcie_prog_inbound_atu
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	16(%rbx), %rax
	movl	%r14d, %ecx
	movq	%r12, (%rax,%rcx,8)
	movl	8(%rbx), %esi
	movq	%r12, %rdi
	callq	_set_bit
	xorl	%r13d, %r13d
	jmp	LBB0_5
LBB0_1:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %r13d
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_5:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No free inbound window\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Failed to program IB window\n"

	.no_dead_strip	_dw_pcie_ep_inbound_atu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_pcie_ep_inbound_atu
_dw_pcie_ep_inbound_atu:                ; @dw_pcie_ep_inbound_atu
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
	bl	_to_dw_pcie_from_ep
	mov	x21, x0
	ldr	w0, [x19, #8]
	ldr	x1, [x19]
	bl	_find_first_zero_bit
	ldr	x8, [x19]
	cmp	x0, x8
	b.ge	LBB0_3
; %bb.1:
	mov	x24, x0
	mov	x0, x21
	mov	x1, x24
	mov	x2, x20
	mov	x3, x23
	mov	x4, x22
	bl	_dw_pcie_prog_inbound_atu
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	x8, [x19, #16]
	str	x24, [x8, w20, uxtw #3]
	ldr	w1, [x19, #8]
	mov	x0, x24
	bl	_set_bit
	mov	w22, #0
	b	LBB0_5
LBB0_3:
	ldr	w0, [x21]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_5
LBB0_4:
	mov	x22, x0
	ldr	w0, [x21]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No free inbound window\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Failed to program IB window\n"

	.no_dead_strip	_dw_pcie_ep_inbound_atu
.subsections_via_symbols
