	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cio2_pci_config_setup
_cio2_pci_config_setup:                 ## @cio2_pci_config_setup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_pci_enable_msi
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_dev_err
	jmp	LBB0_3
LBB0_2:
	movq	_PCI_COMMAND@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movq	_PCI_COMMAND_MEMORY@GOTPCREL(%rip), %rax
	movq	_PCI_COMMAND_MASTER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_PCI_COMMAND_INTX_DISABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	orl	-28(%rbp), %edx
	movl	%edx, -28(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_pci_write_config_word
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable MSI (%d)\n"

	.comm	_PCI_COMMAND,4,2                ## @PCI_COMMAND
	.comm	_PCI_COMMAND_MEMORY,4,2         ## @PCI_COMMAND_MEMORY
	.comm	_PCI_COMMAND_MASTER,4,2         ## @PCI_COMMAND_MASTER
	.comm	_PCI_COMMAND_INTX_DISABLE,4,2   ## @PCI_COMMAND_INTX_DISABLE
	.no_dead_strip	_cio2_pci_config_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cio2_pci_config_setup
_cio2_pci_config_setup:                 ; @cio2_pci_config_setup
	.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, x0
	bl	_pci_enable_msi
	mov	x19, x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_dev_err
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x21, _PCI_COMMAND@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PCI_COMMAND@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_word
Lloh4:
	adrp	x8, _PCI_COMMAND_MEMORY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PCI_COMMAND_MEMORY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _PCI_COMMAND_MASTER@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PCI_COMMAND_MASTER@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh10:
	adrp	x9, _PCI_COMMAND_INTX_DISABLE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PCI_COMMAND_INTX_DISABLE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [sp, #12]
	orr	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_pci_write_config_word
LBB0_3:
	mov	x0, x19
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable MSI (%d)\n"

	.comm	_PCI_COMMAND,4,2                ; @PCI_COMMAND
	.comm	_PCI_COMMAND_MEMORY,4,2         ; @PCI_COMMAND_MEMORY
	.comm	_PCI_COMMAND_MASTER,4,2         ; @PCI_COMMAND_MASTER
	.comm	_PCI_COMMAND_INTX_DISABLE,4,2   ; @PCI_COMMAND_INTX_DISABLE
	.no_dead_strip	_cio2_pci_config_setup
.subsections_via_symbols
