	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __pci_find_next_cap_ttl
___pci_find_next_cap_ttl:               ## @__pci_find_next_cap_ttl
	.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
	movq	%r8, %r12
	movl	%ecx, %r15d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movl	%edx, -44(%rbp)
	leaq	-44(%rbp), %rcx
	callq	_pci_bus_read_config_byte
	xorl	%eax, %eax
	subl	$1, (%r12)
	jb	LBB0_9
## %bb.1:
	movl	-44(%rbp), %edx
	cmpl	$64, %edx
	jl	LBB0_9
## %bb.2:
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	andl	$-4, %edx
	movl	%edx, -44(%rbp)
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movq	%r14, %rcx
	callq	_pci_bus_read_config_word
	movl	-48(%rbp), %eax
	movzbl	%al, %ecx
	cmpl	$255, %ecx
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%r15d, %ecx
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %edx
	sarl	$8, %edx
	movl	%edx, -44(%rbp)
	subl	$1, (%r12)
	jb	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$16383, %eax                    ## imm = 0x3FFF
	jg	LBB0_3
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_5:
	movl	-44(%rbp), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	___pci_find_next_cap_ttl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __pci_find_next_cap_ttl
___pci_find_next_cap_ttl:               ; @__pci_find_next_cap_ttl
	.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, x4
	mov	x20, x3
	mov	x21, x1
	mov	x22, x0
	str	w2, [sp, #12]
	add	x3, sp, #12
	bl	_pci_bus_read_config_byte
	mov	w0, #0
	ldr	w8, [x19]
	sub	w9, w8, #1
	str	w9, [x19]
	cbz	w8, LBB0_8
; %bb.1:
	ldr	w8, [sp, #12]
	cmp	w8, #64
	b.lt	LBB0_8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	and	w2, w8, #0xfffffffc
	str	w2, [sp, #12]
	add	x3, sp, #8
	mov	x0, x22
	mov	x1, x21
	bl	_pci_bus_read_config_word
	ldr	w9, [sp, #8]
	and	w8, w9, #0xff
	cmp	w8, #255
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, w20
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #0
	asr	w8, w9, #8
	str	w8, [sp, #12]
	ldr	w10, [x19]
	sub	w11, w10, #1
	str	w11, [x19]
	cbz	w10, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w9, #4, lsl #12                 ; =16384
	b.ge	LBB0_2
	b	LBB0_8
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	ldr	w0, [sp, #12]
LBB0_8:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	___pci_find_next_cap_ttl
.subsections_via_symbols
