	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_get_leakage_id_from_vbios ## -- Begin function amdgpu_atombios_get_leakage_id_from_vbios
	.p2align	4, 0x90
_amdgpu_atombios_get_leakage_id_from_vbios: ## @amdgpu_atombios_get_leakage_id_from_vbios
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SetVoltage@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetIndexIntoMasterTable
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	-32(%rbp), %rdx
	leaq	-28(%rbp), %rcx
	movl	%eax, %esi
	callq	_amdgpu_atom_parse_cmd_header
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	-28(%rbp), %edx
	leal	-3(%rdx), %eax
	cmpl	$1, %eax
	ja	LBB0_3
## %bb.2:
	movl	$0, -40(%rbp)
	movq	_ATOM_GET_LEAKAGE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	$0, -48(%rbp)
	movl	(%r15), %edi
	leaq	-48(%rbp), %rdx
	movl	%ebx, %esi
	callq	_amdgpu_atom_execute_table
	movl	-48(%rbp), %edi
	callq	_le16_to_cpu
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movl	-32(%rbp), %esi
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_DRM_ERROR
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COMMAND,4,2                    ## @COMMAND
	.comm	_SetVoltage,4,2                 ## @SetVoltage
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ATOM_GET_LEAKAGE_ID,4,2        ## @ATOM_GET_LEAKAGE_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown table version %d, %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_get_leakage_id_from_vbios ; -- Begin function amdgpu_atombios_get_leakage_id_from_vbios
	.p2align	2
_amdgpu_atombios_get_leakage_id_from_vbios: ; @amdgpu_atombios_get_leakage_id_from_vbios
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _COMMAND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COMMAND@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SetVoltage@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SetVoltage@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_GetIndexIntoMasterTable
	mov	x21, x0
	ldr	w0, [x20]
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x1, x21
	bl	_amdgpu_atom_parse_cmd_header
	cbz	w0, LBB0_4
; %bb.1:
	ldr	w2, [sp, #8]
	sub	w8, w2, #3
	cmp	w8, #1
	b.hi	LBB0_3
; %bb.2:
	str	wzr, [sp, #24]
Lloh6:
	adrp	x8, _ATOM_GET_LEAKAGE_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATOM_GET_LEAKAGE_ID@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stp	wzr, w8, [sp, #16]
	ldr	w0, [x20]
	add	x2, sp, #16
	mov	x1, x21
	bl	_amdgpu_atom_execute_table
	ldr	w0, [sp, #16]
	bl	_le16_to_cpu
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_5
LBB0_3:
	ldr	w1, [sp, #12]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_4:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_COMMAND,4,2                    ; @COMMAND
	.comm	_SetVoltage,4,2                 ; @SetVoltage
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ATOM_GET_LEAKAGE_ID,4,2        ; @ATOM_GET_LEAKAGE_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown table version %d, %d\n"

.subsections_via_symbols
