	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function passthru_cfgwrite
_passthru_cfgwrite:                     ## @passthru_cfgwrite
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -64(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r14d
	movq	%rdx, %r13
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	40(%rdx), %r15
	movl	%ecx, %edi
	callq	_bar_access
	movl	$-1, %ecx
	testq	%rax, %rax
	jne	LBB0_18
## %bb.1:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	-64(%rbp), %r13d                ## 4-byte Reload
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_msicap_access
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	24(%r15), %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r13d, %r8d
	callq	_msicap_cfgwrite
	movl	8(%r15), %edx
	movl	(%r15), %r8d
	movl	4(%r15), %ecx
	movl	32(%rbx), %r9d
	movl	24(%rbx), %eax
	movl	28(%rbx), %ebx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	pushq	%rax
	pushq	%rbx
	callq	_vm_setup_pptdev_msi
	addq	$16, %rsp
	xorl	%ecx, %ecx
	testl	%eax, %eax
	je	LBB0_18
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_17:
	xorl	%ecx, %ecx
LBB0_18:
	movl	%ecx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_msixcap_access
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movl	32(%r15), %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r13d, %r8d
	callq	_msixcap_cfgwrite
	xorl	%ecx, %ecx
	cmpq	$0, 16(%rbx)
	je	LBB0_18
## %bb.6:
	movl	(%rbx), %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	jle	LBB0_18
## %bb.7:
	movq	%rbx, %rax
	movl	%r12d, %r14d
	movl	$8, %r13d
	xorl	%ebx, %ebx
	movq	%rax, %r12
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	addq	$12, %r13
	cmpq	%rbx, -64(%rbp)                 ## 8-byte Folded Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_17
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r15), %edx
	movl	(%r15), %r8d
	movl	4(%r15), %ecx
	movq	8(%r12), %rax
	movl	(%rax,%r13), %r10d
	movl	-8(%rax,%r13), %r11d
	movl	-4(%rax,%r13), %eax
	subq	$8, %rsp
	movl	%r14d, %esi
	movl	%ebx, %r9d
	pushq	%r11
	pushq	%rax
	pushq	%r10
	callq	_vm_setup_pptdev_msix
	addq	$32, %rsp
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	$1, %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_err
	jmp	LBB0_10
LBB0_11:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edx
	movl	%r13d, %ebx
	movl	%r13d, %ecx
	callq	_write_config
	movq	_PCIR_COMMAND@GOTPCREL(%rip), %r12
	xorl	%ecx, %ecx
	cmpl	%r14d, (%r12)
	jne	LBB0_18
## %bb.12:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_pci_get_cfgdata16
	movl	%eax, %r14d
	cmpl	$2, %r15d
	je	LBB0_15
## %bb.13:
	cmpl	$1, %r15d
	jne	LBB0_16
## %bb.14:
	movl	(%r12), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_pci_set_cfgdata8
	jmp	LBB0_16
LBB0_15:
	movl	(%r12), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_pci_set_cfgdata16
LBB0_16:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_pci_emul_cmd_changed
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vm_setup_pptdev_msi"

L_.str.1:                               ## @.str.1
	.asciz	"vm_setup_pptdev_msix"

	.comm	_PCIR_COMMAND,4,2               ## @PCIR_COMMAND
	.comm	_PCIM_CMD_INTxDIS,4,2           ## @PCIM_CMD_INTxDIS
	.no_dead_strip	_passthru_cfgwrite
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function passthru_cfgwrite
_passthru_cfgwrite:                     ; @passthru_cfgwrite
	.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
	mov	x23, x5
	mov	x24, x4
	mov	x25, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x2, #40]
	mov	x0, x3
	bl	_bar_access
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_6
LBB0_2:
	mov	x0, x22
	mov	x1, x25
	bl	_msicap_access
	cbz	x0, LBB0_7
; %bb.3:
	ldr	w1, [x22, #24]
	mov	x0, x19
	mov	x2, x25
	mov	x3, x24
	mov	x4, x23
	bl	_msicap_cfgwrite
	ldp	w3, w2, [x22, #4]
	ldr	w4, [x22]
	ldp	w6, w5, [x19, #28]
	ldr	w7, [x19, #24]
	mov	x0, x21
	mov	x1, x20
	bl	_vm_setup_pptdev_msi
	cbz	w0, LBB0_6
; %bb.4:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_5:
	mov	w0, #0
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
	add	sp, sp, #96
	ret
LBB0_7:
	mov	x0, x22
	mov	x1, x25
	bl	_msixcap_access
	cbz	x0, LBB0_14
; %bb.8:
	ldr	w1, [x22, #32]
	mov	x0, x19
	mov	x2, x25
	mov	x3, x24
	mov	x4, x23
	bl	_msixcap_cfgwrite
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_5
; %bb.9:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.10:
	mov	x25, #0
	mov	w23, #0
	add	x8, x8, x8, lsl #1
	lsl	x26, x8, #2
Lloh2:
	adrp	x24, l_.str.1@PAGE
Lloh3:
	add	x24, x24, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w23, w23, #1
	add	x25, x25, #12
	cmp	x26, x25
	b.eq	LBB0_5
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldp	w3, w2, [x22, #4]
	ldr	w4, [x22]
	ldr	x8, [x19, #8]
	add	x8, x8, x25
	ldp	w7, w6, [x8, #4]
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x21
	mov	x1, x20
	mov	x5, x23
	bl	_vm_setup_pptdev_msix
	cbz	w0, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	w0, #1
	mov	x1, x24
	bl	_err
	b	LBB0_11
LBB0_14:
	mov	x0, x22
	mov	x1, x25
	mov	x2, x24
	mov	x3, x23
	bl	_write_config
Lloh4:
	adrp	x21, _PCIR_COMMAND@GOTPAGE
Lloh5:
	ldr	x21, [x21, _PCIR_COMMAND@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, w25
	b.ne	LBB0_5
; %bb.15:
	mov	x0, x19
	mov	x1, x25
	bl	_pci_get_cfgdata16
	mov	x20, x0
	cmp	w24, #2
	b.eq	LBB0_18
; %bb.16:
	cmp	w24, #1
	b.ne	LBB0_19
; %bb.17:
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x23
	bl	_pci_set_cfgdata8
	b	LBB0_19
LBB0_18:
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x23
	bl	_pci_set_cfgdata16
LBB0_19:
	mov	x0, x19
	mov	x1, x20
	bl	_pci_emul_cmd_changed
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vm_setup_pptdev_msi"

l_.str.1:                               ; @.str.1
	.asciz	"vm_setup_pptdev_msix"

	.comm	_PCIR_COMMAND,4,2               ; @PCIR_COMMAND
	.comm	_PCIM_CMD_INTxDIS,4,2           ; @PCIM_CMD_INTxDIS
	.no_dead_strip	_passthru_cfgwrite
.subsections_via_symbols
