	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_read                       ## -- Begin function pci_read
	.p2align	4, 0x90
_pci_read:                              ## @pci_read
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %ebx
	movl	%ecx, %r12d
	movl	%edx, %r13d
	movl	%esi, %r15d
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_sync
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	callq	_pci_cfg_addr
	andl	$3, %ebx
	movq	%rax, %rdi
	callq	_rev32
	movq	(%r14), %rcx
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	callq	_sync
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	$1, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$2, %eax
	je	LBB0_5
## %bb.2:
	cmpl	$4, %eax
	jne	LBB0_3
## %bb.4:
	movq	(%r14), %rax
	movq	8(%rax), %rbx
	jmp	LBB0_7
LBB0_6:
	movq	(%r14), %rax
	movq	8(%rax), %rdx
	shll	$3, %ebx
	movl	%ebx, %ecx
	shrq	%cl, %rdx
	movzbl	%dl, %ebx
	jmp	LBB0_7
LBB0_5:
	movq	(%r14), %rax
	movq	8(%rax), %rdx
	shll	$3, %ebx
	movl	%ebx, %ecx
	shrq	%cl, %rdx
	movzwl	%dx, %ebx
	jmp	LBB0_7
LBB0_3:
	movq	(%r14), %rax
	xorl	%ebx, %ebx
LBB0_7:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	xorl	%eax, %eax
	callq	_sync
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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	_pci_read                       ; -- Begin function pci_read
	.p2align	2
_pci_read:                              ; @pci_read
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	bl	_sync
	ldr	x8, [x19]
	ldr	x25, [x8]
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	bl	_pci_cfg_addr
	and	w21, w21, #0x3
	bl	_rev32
	ldr	x8, [x19]
	str	x0, [x8]
	bl	_sync
	cmp	w20, #1
	b.eq	LBB0_4
; %bb.1:
	cmp	w20, #2
	b.eq	LBB0_5
; %bb.2:
	cmp	w20, #4
	b.ne	LBB0_6
; %bb.3:
	ldr	x8, [x19]
	ldr	x20, [x8, #8]
	b	LBB0_7
LBB0_4:
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	lsl	x10, x21, #3
	lsr	x9, x9, x10
	and	x20, x9, #0xff
	b	LBB0_7
LBB0_5:
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	lsl	x10, x21, #3
	lsr	x9, x9, x10
	and	x20, x9, #0xffff
	b	LBB0_7
LBB0_6:
	mov	x20, #0
	ldr	x8, [x19]
LBB0_7:
	str	x25, [x8]
	bl	_sync
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
