	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_bus_find_capability        ## -- Begin function pci_bus_find_capability
	.p2align	4, 0x90
_pci_bus_find_capability:               ## @pci_bus_find_capability
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_PCI_HEADER_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %rcx
	callq	_pci_bus_read_config_byte
	movl	-28(%rbp), %edx
	andl	$127, %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	___pci_bus_find_cap_start
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	___pci_find_next_cap
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_HEADER_TYPE,4,2            ## @PCI_HEADER_TYPE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_bus_find_capability        ; -- Begin function pci_bus_find_capability
	.p2align	2
_pci_bus_find_capability:               ; @pci_bus_find_capability
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _PCI_HEADER_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_HEADER_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x3, sp, #12
	bl	_pci_bus_read_config_byte
	ldr	w8, [sp, #12]
	and	w2, w8, #0x7f
	mov	x0, x21
	mov	x1, x20
	bl	___pci_bus_find_cap_start
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	bl	___pci_find_next_cap
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_HEADER_TYPE,4,2            ; @PCI_HEADER_TYPE
.subsections_via_symbols
