	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function next_fn
_next_fn:                               ## @next_fn
	.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
	movl	%edx, %r14d
	movq	%rsi, %r15
	movl	$0, -28(%rbp)
	callq	_pci_ari_enabled
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	testq	%r15, %r15
	je	LBB0_8
## %bb.2:
	movq	_PCI_EXT_CAP_ID_ARI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_pci_find_ext_capability
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	movslq	%eax, %rsi
	movq	_PCI_ARI_CAP@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_word
	movl	-28(%rbp), %edi
	callq	_PCI_ARI_CAP_NFN
	xorl	%ebx, %ebx
	cmpl	%r14d, %eax
	cmoval	%eax, %ebx
	jmp	LBB0_8
LBB0_4:
	testq	%r15, %r15
	je	LBB0_7
## %bb.5:
	cmpq	$0, (%r15)
	je	LBB0_6
LBB0_7:
	incl	%r14d
	andl	$7, %r14d
	movl	%r14d, %ebx
	jmp	LBB0_8
LBB0_6:
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_EXT_CAP_ID_ARI,4,2         ## @PCI_EXT_CAP_ID_ARI
	.comm	_PCI_ARI_CAP,8,3                ## @PCI_ARI_CAP
	.no_dead_strip	_next_fn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function next_fn
_next_fn:                               ; @next_fn
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x1
	str	wzr, [sp, #12]
	bl	_pci_ari_enabled
	cbz	x0, LBB0_4
; %bb.1:
	cbz	x20, LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _PCI_EXT_CAP_ID_ARI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_EXT_CAP_ID_ARI@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pci_find_ext_capability
	cbz	w0, LBB0_8
; %bb.3:
Lloh3:
	adrp	x8, _PCI_ARI_CAP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_ARI_CAP@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, w0, sxtw
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_word
	ldr	w0, [sp, #12]
	bl	_PCI_ARI_CAP_NFN
	cmp	w0, w19
	csel	w0, w0, wzr, hi
	b	LBB0_8
LBB0_4:
	cbz	x20, LBB0_6
; %bb.5:
	ldr	x8, [x20]
	cbz	x8, LBB0_7
LBB0_6:
	add	w8, w19, #1
	and	w0, w8, #0x7
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_EXT_CAP_ID_ARI,4,2         ; @PCI_EXT_CAP_ID_ARI
	.comm	_PCI_ARI_CAP,8,3                ; @PCI_ARI_CAP
	.no_dead_strip	_next_fn
.subsections_via_symbols
