	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rv770_enable_bif_dynamic_pcie_gen2
_rv770_enable_bif_dynamic_pcie_gen2:    ## @rv770_enable_bif_dynamic_pcie_gen2
	.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
	movl	%esi, %r15d
	callq	_rv770_get_pi
	movq	%rax, %r14
	movq	_PCIE_LC_SPEED_CNTL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_RREG32_PCIE_PORT
	movl	%eax, %ebx
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.1:
	movq	_LC_HW_VOLTAGE_IF_CONTROL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	movl	$1, %edi
	callq	_LC_HW_VOLTAGE_IF_CONTROL
	orl	%ebx, %eax
	movq	_LC_GEN2_EN_STRAP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, %ebx
	jmp	LBB0_4
LBB0_2:
	cmpl	$0, (%r14)
	jne	LBB0_4
## %bb.3:
	movq	_LC_HW_VOLTAGE_IF_CONTROL_MASK@GOTPCREL(%rip), %rax
	movq	_LC_GEN2_EN_STRAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, %ebx
LBB0_4:
	movq	_LC_OTHER_SIDE_EVER_SENT_GEN2@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_7
## %bb.5:
	movq	_LC_OTHER_SIDE_SUPPORTS_GEN2@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
LBB0_7:
	movl	(%r12), %edi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32_PCIE_PORT               ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIE_LC_SPEED_CNTL,4,2         ## @PCIE_LC_SPEED_CNTL
	.comm	_LC_HW_VOLTAGE_IF_CONTROL_MASK,4,2 ## @LC_HW_VOLTAGE_IF_CONTROL_MASK
	.comm	_LC_GEN2_EN_STRAP,4,2           ## @LC_GEN2_EN_STRAP
	.comm	_LC_OTHER_SIDE_EVER_SENT_GEN2,4,2 ## @LC_OTHER_SIDE_EVER_SENT_GEN2
	.comm	_LC_OTHER_SIDE_SUPPORTS_GEN2,4,2 ## @LC_OTHER_SIDE_SUPPORTS_GEN2
	.no_dead_strip	_rv770_enable_bif_dynamic_pcie_gen2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rv770_enable_bif_dynamic_pcie_gen2
_rv770_enable_bif_dynamic_pcie_gen2:    ; @rv770_enable_bif_dynamic_pcie_gen2
	.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, x1
	bl	_rv770_get_pi
	mov	x19, x0
Lloh0:
	adrp	x21, _PCIE_LC_SPEED_CNTL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PCIE_LC_SPEED_CNTL@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_RREG32_PCIE_PORT
	mov	x1, x0
	cbz	w20, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _LC_HW_VOLTAGE_IF_CONTROL_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LC_HW_VOLTAGE_IF_CONTROL_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w19, w1, w8
	mov	w0, #1
	bl	_LC_HW_VOLTAGE_IF_CONTROL
	orr	w8, w19, w0
Lloh5:
	adrp	x9, _LC_GEN2_EN_STRAP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _LC_GEN2_EN_STRAP@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w1, w8, w9
	b	LBB0_4
LBB0_2:
	ldr	w8, [x19]
	cbnz	w8, LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _LC_HW_VOLTAGE_IF_CONTROL_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LC_HW_VOLTAGE_IF_CONTROL_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _LC_GEN2_EN_STRAP@GOTPAGE
Lloh12:
	ldr	x9, [x9, _LC_GEN2_EN_STRAP@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w1, w1, w8
LBB0_4:
Lloh14:
	adrp	x8, _LC_OTHER_SIDE_EVER_SENT_GEN2@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LC_OTHER_SIDE_EVER_SENT_GEN2@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w1
	b.ne	LBB0_6
; %bb.5:
Lloh17:
	adrp	x8, _LC_OTHER_SIDE_SUPPORTS_GEN2@GOTPAGE
Lloh18:
	ldr	x8, [x8, _LC_OTHER_SIDE_SUPPORTS_GEN2@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_7
LBB0_6:
	ldr	w0, [x21]
	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	_WREG32_PCIE_PORT
LBB0_7:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIE_LC_SPEED_CNTL,4,2         ; @PCIE_LC_SPEED_CNTL
	.comm	_LC_HW_VOLTAGE_IF_CONTROL_MASK,4,2 ; @LC_HW_VOLTAGE_IF_CONTROL_MASK
	.comm	_LC_GEN2_EN_STRAP,4,2           ; @LC_GEN2_EN_STRAP
	.comm	_LC_OTHER_SIDE_EVER_SENT_GEN2,4,2 ; @LC_OTHER_SIDE_EVER_SENT_GEN2
	.comm	_LC_OTHER_SIDE_SUPPORTS_GEN2,4,2 ; @LC_OTHER_SIDE_SUPPORTS_GEN2
	.no_dead_strip	_rv770_enable_bif_dynamic_pcie_gen2
.subsections_via_symbols
