	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function quirk_extend_bar_to_page
_quirk_extend_bar_to_page:              ## @quirk_extend_bar_to_page
	.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
	movq	_PCI_STD_RESOURCE_END@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	js	LBB0_6
## %bb.1:
	movq	%rdi, %r15
	movq	$-1, %rbx
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_PCI_STD_RESOURCE_END@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	incq	%rbx
	addq	$24, %r14
	cmpq	%rax, %rbx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %r12
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12,%r14)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r12,%r14), %r13
	movq	%r13, %rdi
	callq	_resource_size
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	jge	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	decq	%rcx
	movq	%rcx, 16(%r12,%r14)
	movq	$0, 8(%r12,%r14)
	movq	_IORESOURCE_UNSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12,%r14)
	leal	1(%rbx), %edx
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rcx
	callq	_pci_info
	jmp	LBB0_5
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_STD_RESOURCE_END,4,2       ## @PCI_STD_RESOURCE_END
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_IORESOURCE_UNSET,4,2           ## @IORESOURCE_UNSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"expanded BAR %d to page size: %pR\n"

	.no_dead_strip	_quirk_extend_bar_to_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function quirk_extend_bar_to_page
_quirk_extend_bar_to_page:              ; @quirk_extend_bar_to_page
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x22, _PCI_STD_RESOURCE_END@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PCI_STD_RESOURCE_END@GOTPAGEOFF]
	ldr	w8, [x22]
	tbnz	w8, #31, LBB0_6
; %bb.1:
	mov	x19, x0
	mov	x23, #0
	mov	x24, #-1
Lloh2:
	adrp	x25, _IORESOURCE_MEM@GOTPAGE
Lloh3:
	ldr	x25, [x25, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh4:
	adrp	x26, _PAGE_SIZE@GOTPAGE
Lloh5:
	ldr	x26, [x26, _PAGE_SIZE@GOTPAGEOFF]
Lloh6:
	adrp	x27, _IORESOURCE_UNSET@GOTPAGE
Lloh7:
	ldr	x27, [x27, _IORESOURCE_UNSET@GOTPAGEOFF]
Lloh8:
	adrp	x20, l_.str@PAGE
Lloh9:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x8, [x22]
	add	x24, x24, #1
	add	x23, x23, #24
	cmp	x24, x8
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x28, [x19]
	add	x21, x28, x23
	ldr	w8, [x21]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_resource_size
	ldr	x8, [x26]
	cmp	x0, x8
	b.ge	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x8, x8, #1
	add	x9, x28, x23
	stp	xzr, x8, [x9, #8]
	ldr	w8, [x27]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	add	w2, w24, #1
	mov	x0, x19
	mov	x1, x20
	mov	x3, x21
	bl	_pci_info
	b	LBB0_2
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_STD_RESOURCE_END,4,2       ; @PCI_STD_RESOURCE_END
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_IORESOURCE_UNSET,4,2           ; @IORESOURCE_UNSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"expanded BAR %d to page size: %pR\n"

	.no_dead_strip	_quirk_extend_bar_to_page
.subsections_via_symbols
