	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function faraday_raw_pci_read_config
_faraday_raw_pci_read_config:           ## @faraday_raw_pci_read_config
	.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
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r12d
	movl	%edx, %r14d
	movq	%rdi, %r13
	movl	%esi, %edi
	callq	_PCI_CONF_BUS
	movl	%eax, %r15d
	movl	%r14d, %edi
	callq	_PCI_SLOT
	movl	%eax, %edi
	callq	_PCI_CONF_DEVICE
	orl	%eax, %r15d
	movl	%r14d, %edi
	callq	_PCI_FUNC
	movl	%eax, %edi
	callq	_PCI_CONF_FUNCTION
	movl	%eax, %ebx
	movl	%r12d, %edi
	callq	_PCI_CONF_WHERE
	orl	%eax, %ebx
	orl	%r15d, %ebx
	movq	_PCI_CONF_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_PCI_CONFIG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r13), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	_PCI_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r13), %rdi
	callq	_readl
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, (%rsi)
	cmpl	$1, %ecx
	je	LBB0_1
## %bb.2:
	cmpl	$2, %ecx
	jne	LBB0_5
## %bb.3:
	movl	$65535, %edx                    ## imm = 0xFFFF
	jmp	LBB0_4
LBB0_1:
	movl	$255, %edx
LBB0_4:
	shll	$3, %r12d
	movl	%r12d, %ecx
	sarl	%cl, %eax
	andl	%edx, %eax
	movl	%eax, (%rsi)
LBB0_5:
	movq	_PCIBIOS_SUCCESSFUL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_CONF_ENABLE,4,2            ## @PCI_CONF_ENABLE
	.comm	_PCI_CONFIG,8,3                 ## @PCI_CONFIG
	.comm	_PCI_DATA,8,3                   ## @PCI_DATA
	.comm	_PCIBIOS_SUCCESSFUL,4,2         ## @PCIBIOS_SUCCESSFUL
	.no_dead_strip	_faraday_raw_pci_read_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function faraday_raw_pci_read_config
_faraday_raw_pci_read_config:           ; @faraday_raw_pci_read_config
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x5
	mov	x21, x4
	mov	x20, x3
	mov	x22, x2
	mov	x23, x0
	mov	x0, x1
	bl	_PCI_CONF_BUS
	mov	x24, x0
	mov	x0, x22
	bl	_PCI_SLOT
	bl	_PCI_CONF_DEVICE
	orr	w24, w0, w24
	mov	x0, x22
	bl	_PCI_FUNC
	bl	_PCI_CONF_FUNCTION
	orr	w22, w24, w0
	mov	x0, x20
	bl	_PCI_CONF_WHERE
	orr	w8, w22, w0
Lloh0:
	adrp	x9, _PCI_CONF_ENABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCI_CONF_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x23]
Lloh3:
	adrp	x9, _PCI_CONFIG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCI_CONFIG@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x23]
Lloh6:
	adrp	x9, _PCI_DATA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PCI_DATA@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	str	w0, [x19]
	cmp	w21, #1
	b.eq	LBB0_3
; %bb.1:
	cmp	w21, #2
	b.ne	LBB0_5
; %bb.2:
	mov	w8, #65535
	b	LBB0_4
LBB0_3:
	mov	w8, #255
LBB0_4:
	ubfiz	w9, w20, #3, #2
	asr	w9, w0, w9
	and	w8, w9, w8
	str	w8, [x19]
LBB0_5:
Lloh9:
	adrp	x8, _PCIBIOS_SUCCESSFUL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCIBIOS_SUCCESSFUL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_CONF_ENABLE,4,2            ; @PCI_CONF_ENABLE
	.comm	_PCI_CONFIG,8,3                 ; @PCI_CONFIG
	.comm	_PCI_DATA,8,3                   ; @PCI_DATA
	.comm	_PCIBIOS_SUCCESSFUL,4,2         ; @PCIBIOS_SUCCESSFUL
	.no_dead_strip	_faraday_raw_pci_read_config
.subsections_via_symbols
