	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_pcie_read_conf
_rcar_pcie_read_conf:                   ## @rcar_pcie_read_conf
	.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	%r8, %r14
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, %ecx
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	movq	_RCAR_PCI_ACCESS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%r12d, %r8d
	movq	%r14, %r9
	callq	_rcar_pcie_config_access
	movl	%eax, %r13d
	movq	_PCIBIOS_SUCCESSFUL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_1
## %bb.2:
	cmpl	$1, %r15d
	je	LBB0_5
## %bb.3:
	cmpl	$2, %r15d
	jne	LBB0_4
## %bb.6:
	movq	_BITS_PER_BYTE@GOTPCREL(%rip), %rax
	movl	%r12d, %ecx
	andl	$2, %ecx
	imull	(%rax), %ecx
	movl	(%r14), %eax
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
	movzwl	%ax, %eax
	jmp	LBB0_7
LBB0_1:
	movl	$-1, (%r14)
	jmp	LBB0_9
LBB0_5:
	movq	_BITS_PER_BYTE@GOTPCREL(%rip), %rax
	movl	%r12d, %ecx
	andl	$3, %ecx
	imull	(%rax), %ecx
	movl	(%r14), %eax
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
	movzbl	%al, %eax
LBB0_7:
	movl	%eax, (%r14)
	jmp	LBB0_8
LBB0_4:
	movl	(%r14), %eax
LBB0_8:
	movl	(%rbx), %edx
	addq	$4, %rbx
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r12d, %r8d
	movl	%r15d, %r9d
	callq	_dev_dbg
LBB0_9:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RCAR_PCI_ACCESS_READ,4,2       ## @RCAR_PCI_ACCESS_READ
	.comm	_PCIBIOS_SUCCESSFUL,4,2         ## @PCIBIOS_SUCCESSFUL
	.comm	_BITS_PER_BYTE,4,2              ## @BITS_PER_BYTE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pcie-config-read: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08x\n"

	.no_dead_strip	_rcar_pcie_read_conf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_pcie_read_conf
_rcar_pcie_read_conf:                   ; @rcar_pcie_read_conf
	.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	x24, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
	ldr	x0, [x0, #8]
Lloh0:
	adrp	x8, _RCAR_PCI_ACCESS_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RCAR_PCI_ACCESS_READ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x23
	mov	x3, x21
	mov	x4, x20
	mov	x5, x24
	bl	_rcar_pcie_config_access
	mov	x22, x0
Lloh3:
	adrp	x8, _PCIBIOS_SUCCESSFUL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCIBIOS_SUCCESSFUL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.1:
	cmp	w19, #1
	b.eq	LBB0_5
; %bb.2:
	cmp	w19, #2
	b.ne	LBB0_7
; %bb.3:
	ldr	w8, [x24]
Lloh6:
	adrp	x9, _BITS_PER_BYTE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BITS_PER_BYTE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w10, w20, #0x2
	mul	w9, w9, w10
	asr	w8, w8, w9
	and	w6, w8, #0xffff
	b	LBB0_6
LBB0_4:
	mov	w8, #-1
	str	w8, [x24]
	b	LBB0_9
LBB0_5:
	ldr	w8, [x24]
Lloh9:
	adrp	x9, _BITS_PER_BYTE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BITS_PER_BYTE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w10, w20, #0x3
	mul	w9, w9, w10
	asr	w8, w8, w9
	and	w6, w8, #0xff
LBB0_6:
	str	w6, [x24]
	b	LBB0_8
LBB0_7:
	ldr	w6, [x24]
LBB0_8:
	ldr	w2, [x23], #4
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_dev_dbg
LBB0_9:
	mov	x0, x22
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RCAR_PCI_ACCESS_READ,4,2       ; @RCAR_PCI_ACCESS_READ
	.comm	_PCIBIOS_SUCCESSFUL,4,2         ; @PCIBIOS_SUCCESSFUL
	.comm	_BITS_PER_BYTE,4,2              ; @BITS_PER_BYTE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pcie-config-read: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08x\n"

	.no_dead_strip	_rcar_pcie_read_conf
.subsections_via_symbols
