	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function navi10_store_powerplay_table
_navi10_store_powerplay_table:          ## @navi10_store_powerplay_table
	.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
	movq	16(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	movl	12(%rdi), %edi
	leaq	8(%rbx), %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	4(%rbx), %eax
	movl	%eax, 8(%r15)
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	movq	_SMU_11_0_PP_PLATFORM_CAP_BACO@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.3:
	movq	_SMU_11_0_PP_PLATFORM_CAP_MACO@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
LBB0_4:
	movl	$1, (%r15)
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SMU_11_0_PP_PLATFORM_CAP_BACO,4,2 ## @SMU_11_0_PP_PLATFORM_CAP_BACO
	.comm	_SMU_11_0_PP_PLATFORM_CAP_MACO,4,2 ## @SMU_11_0_PP_PLATFORM_CAP_MACO
	.no_dead_strip	_navi10_store_powerplay_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function navi10_store_powerplay_table
_navi10_store_powerplay_table:          ; @navi10_store_powerplay_table
	.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
	ldr	x21, [x0, #16]
	cbz	x21, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #12]
	add	x1, x21, #8
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [x21, #4]
	str	w8, [x19, #8]
	add	x20, x19, #4
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _SMU_11_0_PP_PLATFORM_CAP_BACO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SMU_11_0_PP_PLATFORM_CAP_BACO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x9, _SMU_11_0_PP_PLATFORM_CAP_MACO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SMU_11_0_PP_PLATFORM_CAP_MACO@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_3:
	mov	w8, #1
	str	w8, [x19]
LBB0_4:
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SMU_11_0_PP_PLATFORM_CAP_BACO,4,2 ; @SMU_11_0_PP_PLATFORM_CAP_BACO
	.comm	_SMU_11_0_PP_PLATFORM_CAP_MACO,4,2 ; @SMU_11_0_PP_PLATFORM_CAP_MACO
	.no_dead_strip	_navi10_store_powerplay_table
.subsections_via_symbols
