	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpci_check_ext                 ## -- Begin function cpci_check_ext
	.p2align	4, 0x90
_cpci_check_ext:                        ## @cpci_check_ext
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rdi), %esi
	movl	4(%rdi), %edi
	movq	_PCI_CAP_ID_CHSWP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_pci_bus_find_capability
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	addl	$2, %eax
	leaq	-20(%rbp), %rcx
	movl	%eax, %edx
	callq	_pci_bus_read_config_word
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	_HS_CSR_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	testl	%eax, -20(%rbp)
	setne	%r14b
LBB0_3:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_CAP_ID_CHSWP,4,2           ## @PCI_CAP_ID_CHSWP
	.comm	_HS_CSR_EXT,4,2                 ## @HS_CSR_EXT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpci_check_ext                 ; -- Begin function cpci_check_ext
	.p2align	2
_cpci_check_ext:                        ; @cpci_check_ext
	.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, x0
	ldr	w0, [x0, #4]
	ldr	w1, [x19]
Lloh0:
	adrp	x8, _PCI_CAP_ID_CHSWP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_CAP_ID_CHSWP@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_pci_bus_find_capability
	cbz	w0, LBB0_4
; %bb.1:
	ldp	w1, w8, [x19]
	add	w2, w0, #2
	add	x3, sp, #12
	mov	x0, x8
	bl	_pci_bus_read_config_word
	cbz	x0, LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _HS_CSR_EXT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HS_CSR_EXT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, ne
LBB0_4:
	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_CAP_ID_CHSWP,4,2           ; @PCI_CAP_ID_CHSWP
	.comm	_HS_CSR_EXT,4,2                 ; @HS_CSR_EXT
.subsections_via_symbols
