	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_atombios_get_power_modes ## -- Begin function radeon_atombios_get_power_modes
	.p2align	4, 0x90
_radeon_atombios_get_power_modes:       ## @radeon_atombios_get_power_modes
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PowerPlayInfo@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetIndexIntoMasterTable
	movl	$-1, (%rbx)
	movl	48(%rbx), %edi
	leaq	-20(%rbp), %rcx
	leaq	-24(%rbp), %r8
	leaq	-28(%rbp), %r9
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_atom_parse_data_header
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movl	-20(%rbp), %eax
	leal	-1(%rax), %ecx
	cmpl	$3, %ecx
	jb	LBB0_5
## %bb.2:
	leal	-4(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_3
## %bb.6:
	movq	%rbx, %rdi
	callq	_radeon_atombios_parse_power_table_4_5
	jmp	LBB0_7
LBB0_5:
	movq	%rbx, %rdi
	callq	_radeon_atombios_parse_power_table_1_3
	jmp	LBB0_7
LBB0_3:
	cmpl	$6, %eax
	jne	LBB0_8
## %bb.4:
	movq	%rbx, %rdi
	callq	_radeon_atombios_parse_power_table_6
LBB0_7:
	movl	%eax, %ecx
	testl	%eax, %eax
	jne	LBB0_10
LBB0_8:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.12:
	movl	(%r14), %edx
	movl	$1, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	24(%rbx), %rdx
	movq	%rax, 8(%rdx)
	movl	$0, %ecx
	testq	%rax, %rax
	je	LBB0_10
## %bb.13:
	movq	_POWER_STATE_TYPE_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%rdx)
	movl	$1, (%rdx)
	movl	44(%rbx), %ecx
	movl	%ecx, 20(%rax)
	movl	40(%rbx), %ecx
	movl	%ecx, 16(%rax)
	movq	%rax, 24(%rdx)
	movq	_VOLTAGE_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movl	$16, 4(%rdx)
	movl	$0, (%rbx)
	movq	$0, 16(%rdx)
	movq	$1, 4(%rbx)
	movq	$0, 32(%rbx)
	jmp	LBB0_15
LBB0_9:
	xorl	%ecx, %ecx
LBB0_10:
	movl	(%rbx), %eax
	movl	%ecx, 4(%rbx)
	movl	%eax, 8(%rbx)
	movq	$0, 32(%rbx)
	testl	%eax, %eax
	js	LBB0_11
## %bb.14:
	movq	24(%rbx), %rcx
	leaq	(%rax,%rax,4), %rax
	movq	8(%rcx,%rax,8), %rax
LBB0_15:
	movq	(%rax), %rax
	jmp	LBB0_16
LBB0_11:
	xorl	%eax, %eax
LBB0_16:
	movq	%rax, 16(%rbx)
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DATA,4,2                       ## @DATA
	.comm	_PowerPlayInfo,4,2              ## @PowerPlayInfo
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_POWER_STATE_TYPE_DEFAULT,4,2   ## @POWER_STATE_TYPE_DEFAULT
	.comm	_VOLTAGE_NONE,4,2               ## @VOLTAGE_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function radeon_atombios_get_power_modes
lCPI0_0:
	.long	1                               ; 0x1
	.long	16                              ; 0x10
lCPI0_1:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_radeon_atombios_get_power_modes
	.p2align	2
_radeon_atombios_get_power_modes:       ; @radeon_atombios_get_power_modes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _PowerPlayInfo@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PowerPlayInfo@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_GetIndexIntoMasterTable
	mov	x1, x0
	mov	w8, #-1
	str	w8, [x19]
	ldr	w0, [x19, #48]
	add	x3, sp, #8
	add	x4, sp, #4
	add	x5, sp, #12
	mov	x2, #0
	bl	_atom_parse_data_header
	cbz	x0, LBB0_7
; %bb.1:
	ldr	w8, [sp, #8]
	sub	w9, w8, #1
	cmp	w9, #3
	b.lo	LBB0_4
; %bb.2:
	sub	w9, w8, #4
	cmp	w9, #2
	b.hs	LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_radeon_atombios_parse_power_table_4_5
	cbnz	w0, LBB0_10
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_radeon_atombios_parse_power_table_1_3
	cbnz	w0, LBB0_10
	b	LBB0_7
LBB0_5:
	cmp	w8, #6
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_radeon_atombios_parse_power_table_6
	cbnz	w0, LBB0_10
LBB0_7:
Lloh6:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w0, #4
	bl	_kzalloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_10
; %bb.8:
	ldr	w2, [x20]
	mov	w0, #1
	mov	w1, #4
	bl	_kcalloc
	ldr	x8, [x19, #24]
	str	x0, [x8, #8]
	cbz	x0, LBB0_10
; %bb.9:
Lloh8:
	adrp	x9, _POWER_STATE_TYPE_DEFAULT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _POWER_STATE_TYPE_DEFAULT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	str	w9, [x8, #32]
	ldr	d0, [x19, #40]
	str	d0, [x0, #16]
Lloh11:
	adrp	x9, lCPI0_0@PAGE
Lloh12:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [x8]
Lloh13:
	adrp	x9, _VOLTAGE_NONE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _VOLTAGE_NONE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	str	w9, [x0, #8]
	stp	xzr, x0, [x8, #16]
Lloh16:
	adrp	x8, lCPI0_1@PAGE
Lloh17:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [x19]
	str	wzr, [x19, #8]
	str	xzr, [x19, #32]
	b	LBB0_12
LBB0_10:
	ldr	w8, [x19]
	stp	w0, w8, [x19, #4]
	str	xzr, [x19, #32]
	tbnz	w8, #31, LBB0_13
; %bb.11:
	ldr	x9, [x19, #24]
	mov	w10, #40
	madd	x8, x8, x10, x9
	ldr	x0, [x8, #8]
LBB0_12:
	ldr	x8, [x0]
	b	LBB0_14
LBB0_13:
	mov	x8, #0
LBB0_14:
	str	x8, [x19, #16]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdr	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdrp	Lloh11, Lloh13
	.loh AdrpLdr	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DATA,4,2                       ; @DATA
	.comm	_PowerPlayInfo,4,2              ; @PowerPlayInfo
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_POWER_STATE_TYPE_DEFAULT,4,2   ; @POWER_STATE_TYPE_DEFAULT
	.comm	_VOLTAGE_NONE,4,2               ; @VOLTAGE_NONE
.subsections_via_symbols
