	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PCIread                        ## -- Begin function PCIread
	.p2align	4, 0x90
_PCIread:                               ## @PCIread
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movl	%edx, %r15d
	cmpl	$4, %r8d
	je	LBB0_5
## %bb.1:
	movl	%r8d, %ebx
	cmpl	$2, %r8d
	je	LBB0_4
## %bb.2:
	cmpl	$1, %ebx
	jne	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rcx, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pci_read_config_byte           ## TAILCALL
LBB0_5:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rcx, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pci_read_config_dword          ## TAILCALL
LBB0_4:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rcx, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pci_read_config_word           ## TAILCALL
LBB0_6:
	testb	$3, %bl
	je	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	leaq	4(%rcx), %r12
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rcx, %rdx
	callq	_pci_read_config_byte
	movq	%r12, %rcx
	decl	%ebx
	jne	LBB0_10
	jmp	LBB0_11
LBB0_7:
	cmpl	$4, %ebx
	jb	LBB0_11
## %bb.8:
	leal	3(%rbx), %r12d
	testl	%ebx, %ebx
	cmovnsl	%ebx, %r12d
	sarl	$2, %r12d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leaq	4(%rcx), %rbx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rcx, %rdx
	callq	_pci_read_config_dword
	movq	%rbx, %rcx
	decl	%r12d
	jne	LBB0_9
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PCIread                        ; -- Begin function PCIread
	.p2align	2
_PCIread:                               ; @PCIread
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x5
	mov	x19, x2
	cmp	w4, #4
	b.eq	LBB0_4
; %bb.1:
	mov	x21, x4
	cmp	w4, #2
	b.eq	LBB0_5
; %bb.2:
	cmp	w21, #1
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x3
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_pci_read_config_byte
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x3
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_pci_read_config_dword
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x3
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_pci_read_config_word
LBB0_6:
	tst	w21, #0x3
	b.eq	LBB0_8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	sub	w21, w21, #1
	add	x22, x3, #4
	mov	x0, x20
	mov	x1, x19
	mov	x2, x3
	bl	_pci_read_config_byte
	mov	x3, x22
	cbnz	w21, LBB0_7
	b	LBB0_11
LBB0_8:
	cmp	w21, #4
	b.lo	LBB0_11
; %bb.9:
	add	w8, w21, #3
	cmp	w21, #0
	csel	w8, w8, w21, lt
	asr	w21, w8, #2
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	sub	w21, w21, #1
	add	x22, x3, #4
	mov	x0, x20
	mov	x1, x19
	mov	x2, x3
	bl	_pci_read_config_dword
	mov	x3, x22
	cbnz	w21, LBB0_10
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
