	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_rebar_set_size             ## -- Begin function pci_rebar_set_size
	.p2align	4, 0x90
_pci_rebar_set_size:                    ## @pci_rebar_set_size
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rdi, %r14
	callq	_pci_rebar_find_pos
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	movq	_PCI_REBAR_CTRL@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	%r15, %rsi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_dword
	movq	_PCI_REBAR_CTRL_BAR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	-36(%rbp), %eax
	movq	_PCI_REBAR_CTRL_BAR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	orl	%eax, %ebx
	movl	%ebx, -36(%rbp)
	addq	(%r12), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_pci_write_config_dword
	xorl	%eax, %eax
LBB0_2:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_REBAR_CTRL,8,3             ## @PCI_REBAR_CTRL
	.comm	_PCI_REBAR_CTRL_BAR_SIZE,4,2    ## @PCI_REBAR_CTRL_BAR_SIZE
	.comm	_PCI_REBAR_CTRL_BAR_SHIFT,4,2   ## @PCI_REBAR_CTRL_BAR_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_rebar_set_size             ; -- Begin function pci_rebar_set_size
	.p2align	2
_pci_rebar_set_size:                    ; @pci_rebar_set_size
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x19, x0
	bl	_pci_rebar_find_pos
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	w21, w0
Lloh0:
	adrp	x22, _PCI_REBAR_CTRL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PCI_REBAR_CTRL@GOTPAGEOFF]
	ldr	x8, [x22]
	add	x1, x8, x21
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_dword
Lloh2:
	adrp	x8, _PCI_REBAR_CTRL_BAR_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCI_REBAR_CTRL_BAR_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
Lloh5:
	adrp	x9, _PCI_REBAR_CTRL_BAR_SHIFT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PCI_REBAR_CTRL_BAR_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	lsl	w9, w20, w9
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	x8, [x22]
	add	x1, x8, x21
	mov	x0, x19
	bl	_pci_write_config_dword
	mov	w0, #0
LBB0_2:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_REBAR_CTRL,8,3             ; @PCI_REBAR_CTRL
	.comm	_PCI_REBAR_CTRL_BAR_SIZE,4,2    ; @PCI_REBAR_CTRL_BAR_SIZE
	.comm	_PCI_REBAR_CTRL_BAR_SHIFT,4,2   ; @PCI_REBAR_CTRL_BAR_SHIFT
.subsections_via_symbols
