	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_emul_msix_twrite           ## -- Begin function pci_emul_msix_twrite
	.p2align	4, 0x90
_pci_emul_msix_twrite:                  ## @pci_emul_msix_twrite
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edx, %r8d
	movl	$-1, %r10d
	cmpl	$8, %edx
	je	LBB0_2
## %bb.1:
	cmpl	$4, %r8d
	jne	LBB0_5
LBB0_2:
	movq	_MSIX_TABLE_ENTRY_SIZE@GOTPCREL(%rip), %r9
	movl	%esi, %eax
	cltd
	idivl	(%r9)
	cmpl	(%rdi), %eax
	jge	LBB0_5
## %bb.3:
	movl	%edx, %r9d
	movl	%eax, %esi
	movl	%edx, %eax
	cltd
	idivl	%r8d
	testl	%edx, %edx
	jne	LBB0_5
## %bb.4:
	movslq	%esi, %rax
	addq	8(%rdi), %rax
	movslq	%r9d, %rdx
	movl	%ecx, (%rdx,%rax)
	xorl	%r10d, %r10d
LBB0_5:
	movl	%r10d, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSIX_TABLE_ENTRY_SIZE,4,2      ## @MSIX_TABLE_ENTRY_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_emul_msix_twrite           ; -- Begin function pci_emul_msix_twrite
	.p2align	2
_pci_emul_msix_twrite:                  ; @pci_emul_msix_twrite
	.cfi_startproc
; %bb.0:
	mov	x8, x0
	cmp	w2, #8
	b.eq	LBB0_2
; %bb.1:
	cmp	w2, #4
	b.ne	LBB0_4
LBB0_2:
Lloh0:
	adrp	x9, _MSIX_TABLE_ENTRY_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MSIX_TABLE_ENTRY_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x9]
	sdiv	w9, w1, w10
	ldr	w11, [x8]
	cmp	w9, w11
	b.ge	LBB0_4
; %bb.3:
	msub	w10, w9, w10, w1
	sdiv	w11, w10, w2
	msub	w11, w11, w2, w10
	cbz	w11, LBB0_5
LBB0_4:
	mov	w0, #-1
	ret
LBB0_5:
	mov	w0, #0
	ldr	x8, [x8, #8]
	add	x8, x8, w9, sxtw
	str	w3, [x8, w10, sxtw]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MSIX_TABLE_ENTRY_SIZE,4,2      ; @MSIX_TABLE_ENTRY_SIZE
.subsections_via_symbols
