	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_std_update_resource
_pci_std_update_resource:               ## @pci_std_update_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
	cmpq	$0, 16(%rdi)
	je	LBB0_2
LBB0_1:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	%esi, %r14d
	movq	%rdi, %r15
	movslq	%esi, %rbx
	shlq	$2, %rbx
	addq	24(%rdi), %rbx
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	_IORESOURCE_UNSET@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_1
## %bb.4:
	movq	_IORESOURCE_PCI_FIXED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_1
## %bb.5:
	movl	8(%r15), %edi
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_pcibios_resource_to_bus
	movl	-56(%rbp), %ecx
	movl	(%rbx), %eax
	movq	_IORESOURCE_IO@GOTPCREL(%rip), %rsi
	movq	_PCI_ROM_RESOURCE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%eax, (%rsi)
	je	LBB0_7
## %bb.6:
	movq	_PCI_BASE_ADDRESS_IO_MASK@GOTPCREL(%rip), %rsi
	jmp	LBB0_10
LBB0_7:
	cmpl	%r14d, %edx
	jne	LBB0_9
## %bb.8:
	movq	_PCI_ROM_ADDRESS_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	%ecx, %r12d
	jmp	LBB0_13
LBB0_9:
	movq	_PCI_BASE_ADDRESS_MEM_MASK@GOTPCREL(%rip), %rsi
LBB0_10:
	movl	(%rsi), %esi
	movl	%esi, %r12d
	notl	%r12d
	andl	%eax, %r12d
	orl	%ecx, %r12d
	cmpl	%r14d, %edx
	jle	LBB0_12
## %bb.11:
	movq	_PCI_BASE_ADDRESS_0@GOTPCREL(%rip), %rcx
	leal	(,%r14,4), %r13d
	addl	(%rcx), %r13d
	jmp	LBB0_15
LBB0_12:
	jne	LBB0_1
LBB0_13:
	movq	_IORESOURCE_ROM_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.14:
	movl	(%r15), %r13d
	movq	_PCI_ROM_ADDRESS_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r12d
LBB0_15:
	movq	_IORESOURCE_MEM_64@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	je	LBB0_18
## %bb.16:
	cmpl	$0, 4(%r15)
	je	LBB0_19
LBB0_18:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_20
LBB0_19:
	movq	_PCI_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_word
	movq	_PCI_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCI_COMMAND_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-60(%rbp), %edx
	movq	%r15, %rdi
	callq	_pci_write_config_word
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_20:
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_pci_write_config_dword
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_pci_read_config_dword
	movl	-48(%rbp), %r8d
	movl	%r8d, %eax
	xorl	%r12d, %eax
	testl	%eax, -64(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_22
## %bb.21:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	callq	_pci_err
LBB0_22:
	movq	_IORESOURCE_MEM_64@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_25
## %bb.23:
	movl	-56(%rbp), %ebx
	sarl	$31, %ebx
	addl	$4, %r13d
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	callq	_pci_write_config_dword
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_pci_read_config_dword
	movl	-48(%rbp), %r8d
	cmpl	%ebx, %r8d
	je	LBB0_25
## %bb.24:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	callq	_pci_err
LBB0_25:
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_1
## %bb.26:
	movq	_PCI_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %edx
	movq	%r15, %rdi
	callq	_pci_write_config_word
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_UNSET,4,2           ## @IORESOURCE_UNSET
	.comm	_IORESOURCE_PCI_FIXED,4,2       ## @IORESOURCE_PCI_FIXED
	.comm	_IORESOURCE_IO,4,2              ## @IORESOURCE_IO
	.comm	_PCI_BASE_ADDRESS_IO_MASK,4,2   ## @PCI_BASE_ADDRESS_IO_MASK
	.comm	_PCI_ROM_RESOURCE,4,2           ## @PCI_ROM_RESOURCE
	.comm	_PCI_ROM_ADDRESS_MASK,4,2       ## @PCI_ROM_ADDRESS_MASK
	.comm	_PCI_BASE_ADDRESS_MEM_MASK,4,2  ## @PCI_BASE_ADDRESS_MEM_MASK
	.comm	_PCI_BASE_ADDRESS_0,4,2         ## @PCI_BASE_ADDRESS_0
	.comm	_IORESOURCE_ROM_ENABLE,4,2      ## @IORESOURCE_ROM_ENABLE
	.comm	_PCI_ROM_ADDRESS_ENABLE,4,2     ## @PCI_ROM_ADDRESS_ENABLE
	.comm	_IORESOURCE_MEM_64,4,2          ## @IORESOURCE_MEM_64
	.comm	_PCI_COMMAND,4,2                ## @PCI_COMMAND
	.comm	_PCI_COMMAND_MEMORY,4,2         ## @PCI_COMMAND_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BAR %d: error updating (%#08x != %#08x)\n"

L_.str.1:                               ## @.str.1
	.asciz	"BAR %d: error updating (high %#08x != %#08x)\n"

	.no_dead_strip	_pci_std_update_resource
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_std_update_resource
_pci_std_update_resource:               ; @pci_std_update_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, #16]
	cbz	x8, LBB0_2
LBB0_1:
	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_2:
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #24]
	add	x21, x8, w1, sxtw #2
	ldr	w8, [x21]
	cbz	w8, LBB0_1
; %bb.3:
Lloh0:
	adrp	x9, _IORESOURCE_UNSET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IORESOURCE_UNSET@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_1
; %bb.4:
Lloh3:
	adrp	x9, _IORESOURCE_PCI_FIXED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IORESOURCE_PCI_FIXED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_1
; %bb.5:
	ldr	w0, [x19, #8]
	add	x1, sp, #8
	mov	x2, x21
	bl	_pcibios_resource_to_bus
	ldr	w22, [sp, #8]
Lloh6:
	adrp	x9, _IORESOURCE_IO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IORESOURCE_IO@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh8:
	ldr	w10, [x9]
Lloh9:
	adrp	x9, _PCI_ROM_RESOURCE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PCI_ROM_RESOURCE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w10, w8
	b.eq	LBB0_7
; %bb.6:
Lloh12:
	adrp	x10, _PCI_BASE_ADDRESS_IO_MASK@GOTPAGE
Lloh13:
	ldr	x10, [x10, _PCI_BASE_ADDRESS_IO_MASK@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	cmp	w9, w20
	b.ne	LBB0_9
; %bb.8:
Lloh14:
	adrp	x9, _PCI_ROM_ADDRESS_MASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PCI_ROM_ADDRESS_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w24, [x9]
	b	LBB0_13
LBB0_9:
Lloh17:
	adrp	x10, _PCI_BASE_ADDRESS_MEM_MASK@GOTPAGE
Lloh18:
	ldr	x10, [x10, _PCI_BASE_ADDRESS_MEM_MASK@GOTPAGEOFF]
LBB0_10:
	ldr	w24, [x10]
	bic	w10, w8, w24
	orr	w22, w10, w22
	cmp	w9, w20
	b.le	LBB0_12
; %bb.11:
Lloh19:
	adrp	x9, _PCI_BASE_ADDRESS_0@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PCI_BASE_ADDRESS_0@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	add	w23, w9, w20, lsl #2
	b	LBB0_15
LBB0_12:
	b.ne	LBB0_1
LBB0_13:
Lloh22:
	adrp	x9, _IORESOURCE_ROM_ENABLE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _IORESOURCE_ROM_ENABLE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.14:
	ldr	w23, [x19]
Lloh25:
	adrp	x9, _PCI_ROM_ADDRESS_ENABLE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _PCI_ROM_ADDRESS_ENABLE@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w22, w9, w22
LBB0_15:
Lloh28:
	adrp	x26, _IORESOURCE_MEM_64@GOTPAGE
Lloh29:
	ldr	x26, [x26, _IORESOURCE_MEM_64@GOTPAGEOFF]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.16:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_18
LBB0_17:
	mov	w25, #0
	b	LBB0_19
LBB0_18:
Lloh30:
	adrp	x25, _PCI_COMMAND@GOTPAGE
Lloh31:
	ldr	x25, [x25, _PCI_COMMAND@GOTPAGEOFF]
	ldr	w1, [x25]
	add	x2, sp, #4
	mov	x0, x19
	bl	_pci_read_config_word
	ldr	w1, [x25]
	ldr	w8, [sp, #4]
Lloh32:
	adrp	x9, _PCI_COMMAND_MEMORY@GOTPAGE
Lloh33:
	ldr	x9, [x9, _PCI_COMMAND_MEMORY@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	bic	w2, w8, w9
	mov	x0, x19
	bl	_pci_write_config_word
	mov	w25, #1
LBB0_19:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_pci_write_config_dword
	mov	x2, sp
	mov	x0, x19
	mov	x1, x23
	bl	_pci_read_config_dword
	ldr	w4, [sp]
	eor	w8, w4, w22
	tst	w8, w24
	b.eq	LBB0_21
; %bb.20:
Lloh35:
	adrp	x1, l_.str@PAGE
Lloh36:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	mov	x3, x22
	bl	_pci_err
LBB0_21:
	ldr	w8, [x21]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_24
; %bb.22:
	ldr	w8, [sp, #8]
	asr	w21, w8, #31
	add	w22, w23, #4
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_pci_write_config_dword
	mov	x2, sp
	mov	x0, x19
	mov	x1, x22
	bl	_pci_read_config_dword
	ldr	w4, [sp]
	cmp	w4, w21
	b.eq	LBB0_24
; %bb.23:
Lloh37:
	adrp	x1, l_.str.1@PAGE
Lloh38:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	bl	_pci_err
LBB0_24:
	cbz	w25, LBB0_1
; %bb.25:
Lloh39:
	adrp	x8, _PCI_COMMAND@GOTPAGE
Lloh40:
	ldr	x8, [x8, _PCI_COMMAND@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	ldr	w2, [sp, #4]
	mov	x0, x19
	bl	_pci_write_config_word
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_UNSET,4,2           ; @IORESOURCE_UNSET
	.comm	_IORESOURCE_PCI_FIXED,4,2       ; @IORESOURCE_PCI_FIXED
	.comm	_IORESOURCE_IO,4,2              ; @IORESOURCE_IO
	.comm	_PCI_BASE_ADDRESS_IO_MASK,4,2   ; @PCI_BASE_ADDRESS_IO_MASK
	.comm	_PCI_ROM_RESOURCE,4,2           ; @PCI_ROM_RESOURCE
	.comm	_PCI_ROM_ADDRESS_MASK,4,2       ; @PCI_ROM_ADDRESS_MASK
	.comm	_PCI_BASE_ADDRESS_MEM_MASK,4,2  ; @PCI_BASE_ADDRESS_MEM_MASK
	.comm	_PCI_BASE_ADDRESS_0,4,2         ; @PCI_BASE_ADDRESS_0
	.comm	_IORESOURCE_ROM_ENABLE,4,2      ; @IORESOURCE_ROM_ENABLE
	.comm	_PCI_ROM_ADDRESS_ENABLE,4,2     ; @PCI_ROM_ADDRESS_ENABLE
	.comm	_IORESOURCE_MEM_64,4,2          ; @IORESOURCE_MEM_64
	.comm	_PCI_COMMAND,4,2                ; @PCI_COMMAND
	.comm	_PCI_COMMAND_MEMORY,4,2         ; @PCI_COMMAND_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BAR %d: error updating (%#08x != %#08x)\n"

l_.str.1:                               ; @.str.1
	.asciz	"BAR %d: error updating (high %#08x != %#08x)\n"

	.no_dead_strip	_pci_std_update_resource
.subsections_via_symbols
