	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amd_powerplay_create
_amd_powerplay_create:                  ## @amd_powerplay_create
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.3:
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	%r14, 40(%rax)
	movq	%r14, %rdi
	callq	_amdgpu_sriov_vf
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	movl	%ecx, (%rbx)
	movq	_amdgpu_dpm@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	cmpq	$0, (%rax)
	cmovel	%r15d, %ecx
	movl	%ecx, 4(%rbx)
	movq	%r14, %rdi
	callq	_amdgpu_cgs_create_device
	movl	%eax, 32(%rbx)
	movq	%rbx, %rdi
	addq	$28, %rdi
	callq	_mutex_init
	movl	28(%r14), %eax
	movl	%eax, 24(%rbx)
	movl	24(%r14), %eax
	movl	%eax, 20(%rbx)
	leaq	16(%r14), %rax
	movl	20(%r14), %ecx
	movl	%ecx, 16(%rbx)
	movq	%rax, 8(%rbx)
	movq	%rbx, 8(%r14)
	movq	_pp_dpm_funcs@GOTPCREL(%rip), %rax
	movq	%rax, (%r14)
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_amdgpu_dpm,8,3                 ## @amdgpu_dpm
	.comm	_pp_dpm_funcs,4,2               ## @pp_dpm_funcs
	.no_dead_strip	_amd_powerplay_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amd_powerplay_create
_amd_powerplay_create:                  ; @amd_powerplay_create
	.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
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.2:
	mov	x20, x0
	str	x19, [x0, #40]
	mov	x0, x19
	bl	_amdgpu_sriov_vf
	cmp	w0, #0
Lloh3:
	adrp	x8, _amdgpu_dpm@GOTPAGE
Lloh4:
	ldr	x8, [x8, _amdgpu_dpm@GOTPAGEOFF]
	cset	w9, eq
Lloh5:
	ldr	x8, [x8]
	cmp	x8, #0
	csel	w8, wzr, w9, eq
	stp	w9, w8, [x20]
	mov	x0, x19
	bl	_amdgpu_cgs_create_device
	str	w0, [x20, #32]
	add	x0, x20, #28
	bl	_mutex_init
	mov	w0, #0
	ldr	w8, [x19, #28]
	str	w8, [x20, #24]
	add	x8, x19, #16
	ldur	d0, [x19, #20]
	str	d0, [x20, #16]
	str	x8, [x20, #8]
Lloh6:
	adrp	x8, _pp_dpm_funcs@GOTPAGE
Lloh7:
	ldr	x8, [x8, _pp_dpm_funcs@GOTPAGEOFF]
	stp	x8, x20, [x19]
	b	LBB0_6
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_amdgpu_dpm,8,3                 ; @amdgpu_dpm
	.comm	_pp_dpm_funcs,4,2               ; @pp_dpm_funcs
	.no_dead_strip	_amd_powerplay_create
.subsections_via_symbols
