	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msicap_cfgwrite                ## -- Begin function msicap_cfgwrite
	.p2align	4, 0x90
_msicap_cfgwrite:                       ## @msicap_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movl	%ecx, %ebx
	movq	%rdi, %r12
	movl	%edx, %eax
	subl	%esi, %eax
	cmpl	$2, %eax
	jne	LBB0_6
## %bb.1:
	cmpl	$2, %ebx
	jne	LBB0_6
## %bb.2:
	movl	%esi, %r13d
	movq	_PCIM_MSICTRL_MME_MASK@GOTPCREL(%rip), %rcx
	movq	_PCIM_MSICTRL_MSI_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	orl	(%rcx), %r14d
	movq	%r12, %rdi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %esi
	callq	_pci_get_cfgdata16
	xorl	%eax, %r15d
	andl	%r14d, %r15d
	xorl	%eax, %r15d
	leal	4(%r13), %esi
	movq	%r12, %rdi
	callq	_pci_get_cfgdata32
	movl	%eax, %r14d
	movq	_PCIM_MSICTRL_64BIT@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	(%rax), %eax
	andl	%r15d, %eax
	setne	%cl
	leal	8(%r13,%rcx,4), %esi
	movq	%r12, %rdi
	callq	_pci_get_cfgdata16
	movq	_PCIM_MSICTRL_MME_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	movq	_PCIM_MSICTRL_MSI_ENABLE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%r15d, %esi
	setne	%dl
	movl	%edx, (%r12)
	je	LBB0_3
## %bb.4:
	andl	%r15d, %ecx
	movl	%r14d, 4(%r12)
	movl	%eax, 8(%r12)
	shrl	$4, %ecx
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	jmp	LBB0_5
LBB0_3:
	xorl	%eax, %eax
LBB0_5:
	movl	%eax, 12(%r12)
	movq	%r12, %rdi
	callq	_pci_lintr_update
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_6:
	movq	%r12, %rdi
	movl	%edx, %esi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CFGWRITE                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIM_MSICTRL_MME_MASK,4,2      ## @PCIM_MSICTRL_MME_MASK
	.comm	_PCIM_MSICTRL_MSI_ENABLE,4,2    ## @PCIM_MSICTRL_MSI_ENABLE
	.comm	_PCIM_MSICTRL_64BIT,4,2         ## @PCIM_MSICTRL_64BIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msicap_cfgwrite                ; -- Begin function msicap_cfgwrite
	.p2align	2
_msicap_cfgwrite:                       ; @msicap_cfgwrite
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x4
	mov	x19, x3
	mov	x21, x2
	mov	x22, x0
	sub	w8, w2, w1
	cmp	w8, #2
	ccmp	w3, #2, #0, eq
	b.ne	LBB0_5
; %bb.1:
	mov	x23, x1
Lloh0:
	adrp	x25, _PCIM_MSICTRL_MME_MASK@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PCIM_MSICTRL_MME_MASK@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh2:
	adrp	x26, _PCIM_MSICTRL_MSI_ENABLE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _PCIM_MSICTRL_MSI_ENABLE@GOTPAGEOFF]
	ldr	w9, [x26]
	orr	w24, w9, w8
	mov	x0, x22
	mov	x1, x21
	bl	_pci_get_cfgdata16
	bic	w8, w0, w24
	and	w9, w24, w20
	orr	w20, w8, w9
	add	w1, w23, #4
	mov	x0, x22
	bl	_pci_get_cfgdata32
	mov	x24, x0
Lloh4:
	adrp	x8, _PCIM_MSICTRL_64BIT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PCIM_MSICTRL_64BIT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	tst	w20, w8
	mov	w8, #12
	mov	w9, #8
	csel	w8, w9, w8, eq
	add	w1, w8, w23
	mov	x0, x22
	bl	_pci_get_cfgdata16
	ldr	w8, [x25]
	ldr	w9, [x26]
	ands	w9, w9, w20
	cset	w10, ne
	str	w10, [x22]
	cbz	w9, LBB0_3
; %bb.2:
	and	w8, w8, w20
	stp	w24, w0, [x22, #4]
	asr	w8, w8, #4
	mov	w9, #1
	lsl	w8, w9, w8
	b	LBB0_4
LBB0_3:
	mov	w8, #0
LBB0_4:
	str	w8, [x22, #12]
	mov	x0, x22
	bl	_pci_lintr_update
LBB0_5:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_CFGWRITE
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIM_MSICTRL_MME_MASK,4,2      ; @PCIM_MSICTRL_MME_MASK
	.comm	_PCIM_MSICTRL_MSI_ENABLE,4,2    ; @PCIM_MSICTRL_MSI_ENABLE
	.comm	_PCIM_MSICTRL_64BIT,4,2         ; @PCIM_MSICTRL_64BIT
.subsections_via_symbols
