	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvebu_pcie_add_windows
_mvebu_pcie_add_windows:                ## @mvebu_pcie_add_windows
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	testq	%r8, %r8
	je	LBB0_5
## %bb.1:
	movq	%r9, %rbx
	movq	%r8, %r13
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_fls
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %ecx
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movslq	%eax, %r14
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movq	%r12, %rdx
	movq	%r14, %rcx
	movq	%rbx, %r8
	callq	_mvebu_mbus_add_window_remap_by_id
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	%r14, %r15
	addq	%r14, %r12
	movq	_MVEBU_MBUS_NO_REMAP@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	movl	$0, %eax
	cmovneq	%r14, %rax
	addq	%rax, %rbx
	subq	%r14, %r13
	jne	LBB0_2
LBB0_5:
	movq	%r12, -48(%rbp)
	jmp	LBB0_6
LBB0_3:
	movq	%r12, -48(%rbp)
	leaq	(%r14,%r12), %rcx
	decq	%rcx
	movq	%rcx, -72(%rbp)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rcx
	movq	(%rcx), %rdi
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-72(%rbp), %rcx
	movl	%eax, %r8d
	callq	_dev_err
	movq	-48(%rbp), %rsi
	subq	%r15, %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_mvebu_pcie_del_windows
LBB0_6:
	addq	$40, %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	"Could not create MBus window at [mem %pa-%pa]: %d\n"

	.comm	_MVEBU_MBUS_NO_REMAP,8,3        ## @MVEBU_MBUS_NO_REMAP
	.no_dead_strip	_mvebu_pcie_add_windows
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvebu_pcie_add_windows
_mvebu_pcie_add_windows:                ; @mvebu_pcie_add_windows
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x3
	cbz	x4, LBB0_4
; %bb.1:
	mov	x22, x5
	mov	x23, x4
	mov	x24, x2
	mov	x25, x1
	mov	x19, x0
	mov	x20, #0
	mov	w27, #1
Lloh0:
	adrp	x28, _MVEBU_MBUS_NO_REMAP@GOTPAGE
Lloh1:
	ldr	x28, [x28, _MVEBU_MBUS_NO_REMAP@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_fls
	sub	w8, w0, #1
	lsl	w8, w27, w8
	sxtw	x26, w8
	mov	x0, x25
	mov	x1, x24
	mov	x2, x21
	mov	x3, x26
	mov	x4, x22
	bl	_mvebu_mbus_add_window_remap_by_id
	cbnz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, x26
	add	x21, x21, x26
	ldr	x8, [x28]
	cmp	x22, x8
	csel	x8, xzr, x26, eq
	add	x22, x8, x22
	sub	x23, x23, x26
	cbnz	x23, LBB0_2
LBB0_4:
	str	x21, [sp, #8]
	b	LBB0_6
LBB0_5:
	mov	x4, x0
	add	x8, x26, x21
	sub	x8, x8, #1
	stp	x8, x21, [sp]
	ldr	x8, [x19]
	ldr	x0, [x8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	x3, sp
	bl	_dev_err
	ldr	x8, [sp, #8]
	sub	x1, x8, x20
	mov	x0, x19
	mov	x2, x20
	bl	_mvebu_pcie_del_windows
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not create MBus window at [mem %pa-%pa]: %d\n"

	.comm	_MVEBU_MBUS_NO_REMAP,8,3        ; @MVEBU_MBUS_NO_REMAP
	.no_dead_strip	_mvebu_pcie_add_windows
.subsections_via_symbols
