	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_xgmi_set_pstate         ## -- Begin function amdgpu_xgmi_set_pstate
	.p2align	4, 0x90
_amdgpu_xgmi_set_pstate:                ## @amdgpu_xgmi_set_pstate
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_amdgpu_get_xgmi_hive
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	cmpl	%r15d, (%rax)
	je	LBB0_5
## %bb.2:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_is_support_sw_smu_xgmi
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	leaq	12(%rbx), %rdi
	movl	%r15d, %esi
	callq	_smu_set_xgmi_pstate
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r15d
	movl	8(%rbx), %edi
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %r8d
	callq	_dev_err
	movl	%r15d, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set xgmi pstate %d.\n"

L_.str.1:                               ## @.str.1
	.asciz	"XGMI: Set pstate failure on device %llx, hive %llx, ret %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_xgmi_set_pstate         ; -- Begin function amdgpu_xgmi_set_pstate
	.p2align	2
_amdgpu_xgmi_set_pstate:                ; @amdgpu_xgmi_set_pstate
	.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
	mov	x20, x1
	mov	x19, x0
	mov	w1, #0
	bl	_amdgpu_get_xgmi_hive
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [x0]
	cmp	w8, w20
	b.eq	LBB0_5
; %bb.2:
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
	mov	x0, x19
	bl	_is_support_sw_smu_xgmi
	cbz	x0, LBB0_5
; %bb.3:
	add	x0, x19, #12
	mov	x1, x20
	bl	_smu_set_xgmi_pstate
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.4:
	ldp	w2, w0, [x19, #4]
	ldr	w3, [x19]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x4, x20
	bl	_dev_err
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set xgmi pstate %d.\n"

l_.str.1:                               ; @.str.1
	.asciz	"XGMI: Set pstate failure on device %llx, hive %llx, ret %d"

.subsections_via_symbols
