	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v9_0_ring_set_pipe_percent
_gfx_v9_0_ring_set_pipe_percent:        ## @gfx_v9_0_ring_set_pipe_percent
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	8(%rdi), %rax
	movl	(%rdi), %ecx
	movl	4(%rdi), %edx
	movl	(%rax), %eax
	imull	%ecx, %eax
	leal	(%rax,%rdx), %edi
	testl	%ecx, %ecx
	leal	-2(%rax,%rdx), %ebx
	cmovlel	%edi, %ebx
	movl	$1, %r14d
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_SPI_WCL_PIPE_PERCENT_GFX__VALUE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_2:
	movq	_GC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmSPI_WCL_PIPE_PERCENT_GFX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	addl	%eax, %ebx
	movl	%ebx, %edi
	callq	_RREG32
	movq	_SPI_WCL_PIPE_PERCENT_GFX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_VALUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	%r14d, %ecx
	callq	_REG_SET_FIELD
	movl	%ebx, %edi
	movl	%eax, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_WCL_PIPE_PERCENT_GFX__VALUE_MASK,4,2 ## @SPI_WCL_PIPE_PERCENT_GFX__VALUE_MASK
	.comm	_GC,4,2                         ## @GC
	.comm	_mmSPI_WCL_PIPE_PERCENT_GFX,4,2 ## @mmSPI_WCL_PIPE_PERCENT_GFX
	.comm	_SPI_WCL_PIPE_PERCENT_GFX,4,2   ## @SPI_WCL_PIPE_PERCENT_GFX
	.comm	_VALUE,4,2                      ## @VALUE
	.no_dead_strip	_gfx_v9_0_ring_set_pipe_percent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v9_0_ring_set_pipe_percent
_gfx_v9_0_ring_set_pipe_percent:        ; @gfx_v9_0_ring_set_pipe_percent
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _SPI_WCL_PIPE_PERCENT_GFX__VALUE_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SPI_WCL_PIPE_PERCENT_GFX__VALUE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldr	w8, [x8]
	ldp	w10, w11, [x0]
	madd	w8, w8, w10, w11
	sub	w11, w8, #2
	cmp	w10, #0
	csel	w20, w11, w8, gt
	cmp	w1, #0
	csinc	w19, w9, wzr, ne
Lloh3:
	adrp	x8, _GC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GC@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _mmSPI_WCL_PIPE_PERCENT_GFX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mmSPI_WCL_PIPE_PERCENT_GFX@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	add	w20, w0, w20
	mov	x0, x20
	bl	_RREG32
Lloh9:
	adrp	x8, _SPI_WCL_PIPE_PERCENT_GFX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SPI_WCL_PIPE_PERCENT_GFX@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _VALUE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VALUE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x3, x19
	bl	_REG_SET_FIELD
	mov	x1, x0
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WREG32
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_WCL_PIPE_PERCENT_GFX__VALUE_MASK,4,2 ; @SPI_WCL_PIPE_PERCENT_GFX__VALUE_MASK
	.comm	_GC,4,2                         ; @GC
	.comm	_mmSPI_WCL_PIPE_PERCENT_GFX,4,2 ; @mmSPI_WCL_PIPE_PERCENT_GFX
	.comm	_SPI_WCL_PIPE_PERCENT_GFX,4,2   ; @SPI_WCL_PIPE_PERCENT_GFX
	.comm	_VALUE,4,2                      ; @VALUE
	.no_dead_strip	_gfx_v9_0_ring_set_pipe_percent
.subsections_via_symbols
