	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvebu_pcie_handle_iobase_change
_mvebu_pcie_handle_iobase_change:       ## @mvebu_pcie_handle_iobase_change
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -32(%rbp)
	movl	24(%rdi), %eax
	cmpl	28(%rdi), %eax
	jl	LBB0_5
## %bb.1:
	movl	32(%rbx), %eax
	cmpl	36(%rbx), %eax
	jl	LBB0_5
## %bb.2:
	movq	_PCI_COMMAND_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 40(%rbx)
	je	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	callq	_mvebu_has_ioport
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	28(%rbx), %eax
	movl	36(%rbx), %ecx
	shll	$8, %eax
	andl	$61440, %eax                    ## imm = 0xF000
	shll	$16, %ecx
	movslq	%ecx, %rcx
	orq	%rax, %rcx
	movl	%ecx, -32(%rbp)
	movq	16(%rbx), %rax
	movq	%rcx, %rdx
	addq	(%rax), %rdx
	movq	%rdx, -24(%rbp)
	movl	24(%rbx), %eax
	movl	32(%rbx), %edx
	shll	$8, %eax
	andl	$61440, %eax                    ## imm = 0xF000
	shll	$16, %edx
	subl	%ecx, %edx
	addl	%edx, %eax
	addl	$4096, %eax                     ## imm = 0x1000
	movl	%eax, -28(%rbp)
LBB0_5:
	movl	4(%rbx), %edx
	movl	8(%rbx), %esi
	leaq	-32(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%rbx, %r8
	callq	_mvebu_pcie_set_window
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	movq	16(%rbx), %rax
	movq	8(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_dev_WARN                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_COMMAND_IO,4,2             ## @PCI_COMMAND_IO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempt to set IO when IO is disabled\n"

	.no_dead_strip	_mvebu_pcie_handle_iobase_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvebu_pcie_handle_iobase_change
_mvebu_pcie_handle_iobase_change:       ; @mvebu_pcie_handle_iobase_change
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	stp	xzr, xzr, [sp]
	ldp	w8, w9, [x0, #24]
	cmp	w8, w9
	b.lt	LBB0_5
; %bb.1:
	ldp	w8, w9, [x19, #32]
	cmp	w8, w9
	b.lt	LBB0_5
; %bb.2:
	ldr	w8, [x19, #40]
Lloh0:
	adrp	x9, _PCI_COMMAND_IO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCI_COMMAND_IO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_mvebu_has_ioport
	cbz	w0, LBB0_6
; %bb.4:
	ldp	w9, w8, [x19, #24]
	lsl	w8, w8, #8
	and	x8, x8, #0xf000
	ldp	w11, w10, [x19, #32]
	lsl	w10, w10, #16
	sxtw	x10, w10
	orr	x8, x8, x10
	str	w8, [sp]
	ldr	x10, [x19, #16]
	ldr	x10, [x10]
	add	x10, x10, x8
	str	x10, [sp, #8]
	lsl	w9, w9, #8
	and	w9, w9, #0xf000
	lsl	w10, w11, #16
	sub	w8, w10, w8
	add	w8, w8, w9
	add	w8, w8, #1, lsl #12             ; =4096
	str	w8, [sp, #4]
LBB0_5:
	ldp	w2, w1, [x19, #4]
	mov	x3, sp
	mov	x0, x19
	mov	x4, x19
	bl	_mvebu_pcie_set_window
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
	ldr	x8, [x19, #16]
	ldr	x0, [x8, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_dev_WARN
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_COMMAND_IO,4,2             ; @PCI_COMMAND_IO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempt to set IO when IO is disabled\n"

	.no_dead_strip	_mvebu_pcie_handle_iobase_change
.subsections_via_symbols
