	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rs780_dpm_init                 ## -- Begin function rs780_dpm_init
	.p2align	4, 0x90
_rs780_dpm_init:                        ## @rs780_dpm_init
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IntegratedSystemInfo@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetIndexIntoMasterTable
	movl	%eax, %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r14
	movq	%rax, 8(%r15)
	movq	%r15, %rdi
	callq	_r600_get_platform_caps
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.2:
	movq	%r15, %rdi
	callq	_rs780_parse_power_table
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, (%r14)
	movq	(%r15), %rdi
	xorl	%ebx, %ebx
	leaq	-52(%rbp), %rcx
	leaq	-36(%rbp), %r8
	leaq	-48(%rbp), %r9
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_atom_parse_data_header
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movq	(%r15), %rax
	movq	(%rax), %r15
	movq	-48(%rbp), %rbx
	movl	-36(%rbp), %eax
	cmpl	$2, %eax
	je	LBB0_12
## %bb.5:
	cmpl	$1, %eax
	jne	LBB0_18
## %bb.6:
	movl	(%r15,%rbx), %eax
	movl	%eax, 8(%r14)
	movl	4(%r15,%rbx), %ecx
	shll	$8, %ecx
	orl	%eax, %ecx
	movl	%ecx, 8(%r14)
	shrl	$15, %ecx
	andl	$1, %ecx
	movl	%ecx, 12(%r14)
	movq	40(%r15,%rbx), %rax
	movq	%rax, 40(%r14)
	movl	8(%r15,%rbx), %eax
	movl	%eax, 16(%r14)
	movl	12(%r15,%rbx), %ecx
	shll	$8, %ecx
	orl	%eax, %ecx
	movl	%ecx, 16(%r14)
	movl	16(%r15,%rbx), %eax
	movl	%eax, 20(%r14)
	movl	20(%r15,%rbx), %ecx
	shll	$8, %ecx
	orl	%eax, %ecx
	movl	%ecx, 20(%r14)
	movl	32(%r15,%rbx), %edi
	callq	_le16_to_cpu
	movq	%rax, 56(%r14)
	movl	28(%r15,%rbx), %edi
	callq	_le16_to_cpu
	movq	%rax, 48(%r14)
	movl	$1, (%r14)
	imull	$100, 24(%r15,%rbx), %eax
	jmp	LBB0_13
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r15, %rdi
	callq	_radeon_dpm_fini
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_12:
	movl	20(%r15,%rbx), %edi
	callq	_le16_to_cpu
	movl	%eax, 8(%r14)
	shrl	$15, %eax
	andl	$1, %eax
	movl	%eax, 12(%r14)
	movl	16(%r15,%rbx), %edi
	callq	_le16_to_cpu
	movq	%rax, 40(%r14)
	movl	12(%r15,%rbx), %edi
	callq	_le16_to_cpu
	movl	%eax, 16(%r14)
	movl	8(%r15,%rbx), %edi
	callq	_le16_to_cpu
	movl	%eax, 20(%r14)
	movl	4(%r15,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 28(%r14)
	shrl	$2, %eax
	andl	$1, %eax
	movl	%eax, 32(%r14)
	movl	$1, (%r14)
	movl	(%r15,%rbx), %edi
	callq	_le32_to_cpu
LBB0_13:
	movl	%eax, 24(%r14)
	movl	16(%r14), %ecx
	movl	20(%r14), %eax
	cmpl	%ecx, %eax
	jle	LBB0_15
## %bb.14:
	movl	$0, (%r14)
LBB0_15:
	cmpl	$0, 8(%r14)
	sete	%dl
	testl	%ecx, %ecx
	sete	%cl
	orb	%dl, %cl
	cmpl	$0, 32(%r14)
	je	LBB0_19
## %bb.16:
	testl	%eax, %eax
	sete	%al
	orb	%al, %cl
	xorl	%ebx, %ebx
	cmpb	$1, %cl
	jne	LBB0_10
	jmp	LBB0_17
LBB0_18:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_19:
	xorl	%ebx, %ebx
	testb	%cl, %cl
	je	LBB0_10
LBB0_17:
	movl	$0, (%r14)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_DATA,4,2                       ## @DATA
	.comm	_IntegratedSystemInfo,4,2       ## @IntegratedSystemInfo
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No integrated system info for your GPU\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.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 rs780_dpm_init
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_rs780_dpm_init
	.p2align	2
_rs780_dpm_init:                        ; @rs780_dpm_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
Lloh0:
	adrp	x8, _DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _IntegratedSystemInfo@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IntegratedSystemInfo@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_GetIndexIntoMasterTable
	mov	x21, x0
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w0, #64
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	str	x0, [x20, #8]
	mov	x0, x20
	bl	_r600_get_platform_caps
	cbnz	w0, LBB0_9
; %bb.2:
	mov	x0, x20
	bl	_rs780_parse_power_table
	cbnz	w0, LBB0_9
; %bb.3:
Lloh9:
	adrp	x8, lCPI0_0@PAGE
Lloh10:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	ldr	x0, [x20]
	add	x3, sp, #4
	mov	x4, sp
	add	x5, sp, #8
	mov	x1, x21
	mov	x2, #0
	bl	_atom_parse_data_header
	cbz	x0, LBB0_10
; %bb.4:
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	add	x20, x9, x8
	ldr	w8, [sp]
	cmp	w8, #2
	b.eq	LBB0_11
; %bb.5:
	cmp	w8, #1
	b.ne	LBB0_17
; %bb.6:
	ldr	w8, [x20]
	str	w8, [x19, #8]
	ldr	w9, [x20, #4]
	orr	w8, w8, w9, lsl #8
	ubfx	w9, w8, #15, #1
	stp	w8, w9, [x19, #8]
	ldr	x8, [x20, #40]
	str	x8, [x19, #40]
	ldr	w8, [x20, #8]
	str	w8, [x19, #16]
	ldr	w9, [x20, #12]
	orr	w8, w8, w9, lsl #8
	str	w8, [x19, #16]
	ldr	w8, [x20, #16]
	str	w8, [x19, #20]
	ldr	w9, [x20, #20]
	orr	w8, w8, w9, lsl #8
	str	w8, [x19, #20]
	ldr	w0, [x20, #32]
	bl	_le16_to_cpu
	str	x0, [x19, #56]
	ldr	w0, [x20, #28]
	bl	_le16_to_cpu
	str	x0, [x19, #48]
	mov	w8, #1
	str	w8, [x19]
	ldr	w8, [x20, #24]
	mov	w9, #100
	mul	w0, w8, w9
	b	LBB0_12
LBB0_7:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	mov	x0, x20
	bl	_radeon_dpm_fini
	b	LBB0_18
LBB0_11:
	ldr	w0, [x20, #20]
	bl	_le16_to_cpu
	ubfx	w8, w0, #15, #1
	stp	w0, w8, [x19, #8]
	ldr	w0, [x20, #16]
	bl	_le16_to_cpu
	str	x0, [x19, #40]
	ldr	w0, [x20, #12]
	bl	_le16_to_cpu
	str	w0, [x19, #16]
	ldr	w0, [x20, #8]
	bl	_le16_to_cpu
	str	w0, [x19, #20]
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
	ubfx	w8, w0, #2, #1
	stp	w0, w8, [x19, #28]
	mov	w8, #1
	str	w8, [x19]
	ldr	w0, [x20]
	bl	_le32_to_cpu
LBB0_12:
	str	w0, [x19, #24]
	ldp	w9, w8, [x19, #16]
	cmp	w8, w9
	b.le	LBB0_14
; %bb.13:
	str	wzr, [x19]
LBB0_14:
	ldr	w10, [x19, #32]
	ldr	w11, [x19, #8]
	cmp	w11, #0
	ccmp	w9, #0, #4, ne
	cset	w9, eq
	cbz	w10, LBB0_19
; %bb.15:
	cmp	w8, #0
	cset	w8, eq
	orr	w8, w9, w8
	cmp	w8, #1
	b.ne	LBB0_20
LBB0_16:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_9
LBB0_17:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_18:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_19:
	cbnz	w9, LBB0_16
LBB0_20:
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DATA,4,2                       ; @DATA
	.comm	_IntegratedSystemInfo,4,2       ; @IntegratedSystemInfo
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No integrated system info for your GPU\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
