	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_pcie_write_conf
_rcar_pcie_write_conf:                  ## @rcar_pcie_write_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
	movl	%r8d, %r12d
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	movq	_RCAR_PCI_ACCESS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %r9
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdx
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	callq	_rcar_pcie_config_access
	movq	_PCIBIOS_SUCCESSFUL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.1:
	leaq	4(%rbx), %rdi
	movl	(%rbx), %edx
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	%r12d, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	movl	%r13d, %r9d
	callq	_dev_dbg
	cmpl	$2, %r13d
	je	LBB0_5
## %bb.2:
	cmpl	$1, %r13d
	jne	LBB0_6
## %bb.3:
	movq	_BITS_PER_BYTE@GOTPCREL(%rip), %rax
	movl	%r15d, %ecx
	andl	$3, %ecx
	imull	(%rax), %ecx
	movl	$255, %eax
	shll	%cl, %eax
	notl	%eax
	movzbl	-48(%rbp), %edx                 ## 1-byte Folded Reload
	jmp	LBB0_4
LBB0_5:
	movq	_BITS_PER_BYTE@GOTPCREL(%rip), %rax
	movl	%r15d, %ecx
	andl	$2, %ecx
	imull	(%rax), %ecx
	movl	$65535, %eax                    ## imm = 0xFFFF
	shll	%cl, %eax
	notl	%eax
	movzwl	-48(%rbp), %edx                 ## 2-byte Folded Reload
LBB0_4:
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	andl	-44(%rbp), %eax
	orl	%eax, %edx
	movl	%edx, -44(%rbp)
	jmp	LBB0_7
LBB0_6:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -44(%rbp)
LBB0_7:
	movq	_RCAR_PCI_ACCESS_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %r9
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	callq	_rcar_pcie_config_access
LBB0_8:
	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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pcie-config-write: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08x\n"

	.comm	_BITS_PER_BYTE,4,2              ## @BITS_PER_BYTE
	.comm	_RCAR_PCI_ACCESS_WRITE,4,2      ## @RCAR_PCI_ACCESS_WRITE
	.no_dead_strip	_rcar_pcie_write_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_write_conf
_rcar_pcie_write_conf:                  ; @rcar_pcie_write_conf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x23, x4
	mov	x24, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0, #8]
Lloh0:
	adrp	x8, _RCAR_PCI_ACCESS_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RCAR_PCI_ACCESS_READ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x5, sp, #12
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_rcar_pcie_config_access
Lloh3:
	adrp	x8, _PCIBIOS_SUCCESSFUL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCIBIOS_SUCCESSFUL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.1:
	mov	x0, x21
	ldr	w2, [x0], #4
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	mov	x4, x19
	mov	x5, x24
	mov	x6, x23
	bl	_dev_dbg
	cmp	w24, #2
	b.eq	LBB0_4
; %bb.2:
	cmp	w24, #1
	b.ne	LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _BITS_PER_BYTE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BITS_PER_BYTE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w9, w19, #0x3
	mul	w8, w8, w9
	mov	w9, #255
	lsl	w9, w9, w8
	ldr	w10, [sp, #12]
	bic	w9, w10, w9
	and	w10, w23, #0xff
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _BITS_PER_BYTE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BITS_PER_BYTE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w9, w19, #0x2
	mul	w8, w8, w9
	mov	w9, #65535
	lsl	w9, w9, w8
	ldr	w10, [sp, #12]
	bic	w9, w10, w9
	and	w10, w23, #0xffff
LBB0_5:
	lsl	w8, w10, w8
	orr	w8, w9, w8
	str	w8, [sp, #12]
	b	LBB0_7
LBB0_6:
	str	w23, [sp, #12]
LBB0_7:
Lloh14:
	adrp	x8, _RCAR_PCI_ACCESS_WRITE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RCAR_PCI_ACCESS_WRITE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	x5, sp, #12
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_rcar_pcie_config_access
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_RCAR_PCI_ACCESS_READ,4,2       ; @RCAR_PCI_ACCESS_READ
	.comm	_PCIBIOS_SUCCESSFUL,4,2         ; @PCIBIOS_SUCCESSFUL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pcie-config-write: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08x\n"

	.comm	_BITS_PER_BYTE,4,2              ; @BITS_PER_BYTE
	.comm	_RCAR_PCI_ACCESS_WRITE,4,2      ; @RCAR_PCI_ACCESS_WRITE
	.no_dead_strip	_rcar_pcie_write_conf
.subsections_via_symbols
