	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_reassign_resource          ## -- Begin function pci_reassign_resource
	.p2align	4, 0x90
_pci_reassign_resource:                 ## @pci_reassign_resource
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movl	%esi, %r14d
	movq	(%rdi), %rax
	movslq	%esi, %rcx
	movl	(%rax,%rcx,8), %r15d
	movq	_IORESOURCE_PCI_FIXED@GOTPCREL(%rip), %rsi
	xorl	%ebx, %ebx
	testl	%r15d, (%rsi)
	je	LBB0_1
LBB0_7:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r12
	leaq	(%rax,%rcx,8), %r8
	movq	_IORESOURCE_UNSET@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	%r15d, %esi
	movl	%esi, (%rax,%rcx,8)
	cmpl	$0, 4(%rax,%rcx,8)
	je	LBB0_2
## %bb.3:
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, %rdi
	movq	%rdx, %rbx
	callq	_resource_size
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rbx), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r13, %rcx
	callq	__pci_assign_resource
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%r15d, (%rcx)
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	xorl	%eax, %eax
	callq	_pci_info
	jmp	LBB0_7
LBB0_2:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	%r14d, %edx
	movq	%r8, %rcx
	xorl	%eax, %eax
	callq	_pci_info
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_5:
	movq	_IORESOURCE_UNSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IORESOURCE_STARTALIGN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	andl	%eax, (%rcx)
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	%r14d, %edx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	xorl	%eax, %eax
	callq	_pci_info
	movq	_PCI_BRIDGE_RESOURCES@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jle	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_pci_update_resource
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_PCI_FIXED,4,2       ## @IORESOURCE_PCI_FIXED
	.comm	_IORESOURCE_UNSET,8,3           ## @IORESOURCE_UNSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BAR %d: can't reassign an unassigned resource %pR\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"BAR %d: %pR (failed to expand by %#llx)\n"

	.comm	_IORESOURCE_STARTALIGN,8,3      ## @IORESOURCE_STARTALIGN
L_.str.2:                               ## @.str.2
	.asciz	"BAR %d: reassigned %pR (expanded by %#llx)\n"

	.comm	_PCI_BRIDGE_RESOURCES,4,2       ## @PCI_BRIDGE_RESOURCES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_reassign_resource          ; -- Begin function pci_reassign_resource
	.p2align	2
_pci_reassign_resource:                 ; @pci_reassign_resource
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	ldr	x8, [x0]
	add	x21, x8, w1, sxtw #3
	ldr	w24, [x21]
Lloh0:
	adrp	x9, _IORESOURCE_PCI_FIXED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IORESOURCE_PCI_FIXED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w24
	b.eq	LBB0_3
LBB0_1:
	mov	w23, #0
LBB0_2:
	mov	x0, x23
	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
	add	sp, sp, #96
	ret
LBB0_3:
	mov	x19, x1
	mov	x20, x0
Lloh3:
	adrp	x25, _IORESOURCE_UNSET@GOTPAGE
Lloh4:
	ldr	x25, [x25, _IORESOURCE_UNSET@GOTPAGEOFF]
	sxtw	x9, w19
	ldr	w10, [x25]
	orr	w10, w24, w10
	str	w10, [x21]
	add	x8, x8, x9, lsl #3
	ldr	w8, [x8, #4]
	cbz	w8, LBB0_6
; %bb.4:
	mov	x23, x3
	mov	x22, x2
	mov	x0, x21
	bl	_resource_size
	add	x2, x0, x22
	mov	x0, x20
	mov	x1, x19
	mov	x3, x23
	bl	__pci_assign_resource
	cbz	w0, LBB0_7
; %bb.5:
	mov	x23, x0
	str	w24, [x21]
	str	x22, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	bl	_pci_info
	b	LBB0_2
LBB0_6:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	bl	_pci_info
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_2
LBB0_7:
	ldr	w8, [x25]
	ldr	w9, [x21]
Lloh12:
	adrp	x10, _IORESOURCE_STARTALIGN@GOTPAGE
Lloh13:
	ldr	x10, [x10, _IORESOURCE_STARTALIGN@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w8, w8, w10
	bic	w8, w9, w8
	str	w8, [x21]
	str	x22, [sp]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	bl	_pci_info
Lloh17:
	adrp	x8, _PCI_BRIDGE_RESOURCES@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PCI_BRIDGE_RESOURCES@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, w19
	b.le	LBB0_1
; %bb.8:
	mov	x0, x20
	mov	x1, x19
	bl	_pci_update_resource
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_PCI_FIXED,4,2       ; @IORESOURCE_PCI_FIXED
	.comm	_IORESOURCE_UNSET,8,3           ; @IORESOURCE_UNSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BAR %d: can't reassign an unassigned resource %pR\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"BAR %d: %pR (failed to expand by %#llx)\n"

	.comm	_IORESOURCE_STARTALIGN,8,3      ; @IORESOURCE_STARTALIGN
l_.str.2:                               ; @.str.2
	.asciz	"BAR %d: reassigned %pR (expanded by %#llx)\n"

	.comm	_PCI_BRIDGE_RESOURCES,4,2       ; @PCI_BRIDGE_RESOURCES
.subsections_via_symbols
