	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_atom_encoder_dpms
_radeon_atom_encoder_dpms:              ## @radeon_atom_encoder_dpms
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	(%rax), %r15
	callq	_to_radeon_encoder
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_atombios_get_encoder_mode
	movl	%eax, %r13d
	movl	8(%rbx), %ecx
	movl	(%rbx), %esi
	movl	4(%rbx), %r8d
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %edx
	callq	_DRM_DEBUG_KMS
	movq	_radeon_audio@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.1:
	movq	_ATOM_ENCODER_MODE_HDMI@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	je	LBB0_3
## %bb.2:
	movl	%r13d, %edi
	callq	_ENCODER_MODE_IS_DP
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_radeon_audio_dpms
LBB0_4:
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$15, %eax
	ja	LBB0_24
## %bb.5:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_22:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_radeon_atom_encoder_dpms_avivo
	jmp	LBB0_23
LBB0_15:
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE5
	testl	%eax, %eax
	je	LBB0_22
## %bb.16:
	leal	-144(%r14), %eax
	cmpl	$2, %eax
	jb	LBB0_21
## %bb.17:
	cmpl	$147, %r14d
	je	LBB0_21
## %bb.18:
	cmpl	$146, %r14d
	jne	LBB0_23
## %bb.19:
	movq	_ATOM_ENABLE@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE5
	testl	%eax, %eax
	je	LBB0_13
## %bb.7:
	leal	-144(%r14), %eax
	cmpl	$2, %eax
	jb	LBB0_12
## %bb.8:
	cmpl	$147, %r14d
	je	LBB0_12
## %bb.9:
	cmpl	$146, %r14d
	jne	LBB0_23
## %bb.10:
	movq	_ATOM_ENABLE@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_21:
	movq	_ATOM_DISABLE@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_atombios_dac_setup
	jmp	LBB0_23
LBB0_13:
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE3
	testl	%eax, %eax
	je	LBB0_22
LBB0_14:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_radeon_atom_encoder_dpms_dig
LBB0_23:
	xorl	%esi, %esi
	cmpl	$146, %r14d
	sete	%sil
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_radeon_atombios_encoder_dpms_scratch_regs ## TAILCALL
LBB0_12:
	movq	_ATOM_DISABLE@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_atombios_dvo_setup
	jmp	LBB0_23
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
LJTI0_0:
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_22
	.long	L0_0_set_22
	.long	L0_0_set_22
	.long	L0_0_set_22
	.long	L0_0_set_14
	.long	L0_0_set_6
	.long	L0_0_set_22
	.long	L0_0_set_15
	.long	L0_0_set_22
	.long	L0_0_set_22
	.long	L0_0_set_22
	.long	L0_0_set_15
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"encoder dpms %d to mode %d, devices %08x, active_devices %08x\n"

	.comm	_radeon_audio,8,3               ## @radeon_audio
	.comm	_ATOM_ENCODER_MODE_HDMI,4,2     ## @ATOM_ENCODER_MODE_HDMI
	.comm	_ATOM_ENABLE,4,2                ## @ATOM_ENABLE
	.comm	_ATOM_DISABLE,4,2               ## @ATOM_DISABLE
	.no_dead_strip	_radeon_atom_encoder_dpms
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_atom_encoder_dpms
_radeon_atom_encoder_dpms:              ; @radeon_atom_encoder_dpms
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x21, [x8]
	bl	_to_radeon_encoder
	mov	x22, x0
	mov	x0, x19
	bl	_atombios_get_encoder_mode
	mov	x23, x0
	ldp	w4, w3, [x22, #4]
	ldr	w1, [x22]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_DRM_DEBUG_KMS
Lloh2:
	adrp	x8, _radeon_audio@GOTPAGE
Lloh3:
	ldr	x8, [x8, _radeon_audio@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
Lloh5:
	adrp	x8, _ATOM_ENCODER_MODE_HDMI@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATOM_ENCODER_MODE_HDMI@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w23, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x23
	bl	_ENCODER_MODE_IS_DP
	cbz	x0, LBB0_4
LBB0_3:
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_audio_dpms
LBB0_4:
	ldr	w8, [x22]
	sub	w8, w8, #128
	cmp	w8, #15
	b.hi	LBB0_12
; %bb.5:
Lloh8:
	adrp	x9, lJTI0_0@PAGE
Lloh9:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_6
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_atom_encoder_dpms_avivo
	b	LBB0_22
LBB0_7:
	mov	x0, x21
	bl	_ASIC_IS_DCE5
	cbz	w0, LBB0_6
; %bb.8:
	sub	w8, w20, #144
	cmp	w8, #2
	b.lo	LBB0_18
; %bb.9:
	cmp	w20, #147
	b.eq	LBB0_18
; %bb.10:
	cmp	w20, #146
	b.ne	LBB0_22
; %bb.11:
Lloh10:
	adrp	x8, _ATOM_ENABLE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ATOM_ENABLE@GOTPAGEOFF]
	b	LBB0_19
LBB0_12:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x0, x21
	bl	_ASIC_IS_DCE5
	cbz	w0, LBB0_20
; %bb.14:
	sub	w8, w20, #144
	cmp	w8, #2
	b.lo	LBB0_23
; %bb.15:
	cmp	w20, #147
	b.eq	LBB0_23
; %bb.16:
	cmp	w20, #146
	b.ne	LBB0_22
; %bb.17:
Lloh12:
	adrp	x8, _ATOM_ENABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ATOM_ENABLE@GOTPAGEOFF]
	b	LBB0_24
LBB0_18:
Lloh14:
	adrp	x8, _ATOM_DISABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ATOM_DISABLE@GOTPAGEOFF]
LBB0_19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_atombios_dac_setup
	b	LBB0_22
LBB0_20:
	mov	x0, x21
	bl	_ASIC_IS_DCE3
	cbz	w0, LBB0_6
LBB0_21:
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_atom_encoder_dpms_dig
LBB0_22:
	cmp	w20, #146
	cset	w1, eq
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_radeon_atombios_encoder_dpms_scratch_regs
LBB0_23:
Lloh16:
	adrp	x8, _ATOM_DISABLE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ATOM_DISABLE@GOTPAGEOFF]
LBB0_24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_atombios_dvo_setup
	b	LBB0_22
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_21-LBB0_6)>>2
	.byte	(LBB0_21-LBB0_6)>>2
	.byte	(LBB0_21-LBB0_6)>>2
	.byte	(LBB0_21-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_21-LBB0_6)>>2
	.byte	(LBB0_13-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_7-LBB0_6)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"encoder dpms %d to mode %d, devices %08x, active_devices %08x\n"

	.comm	_radeon_audio,8,3               ; @radeon_audio
	.comm	_ATOM_ENCODER_MODE_HDMI,4,2     ; @ATOM_ENCODER_MODE_HDMI
	.comm	_ATOM_ENABLE,4,2                ; @ATOM_ENABLE
	.comm	_ATOM_DISABLE,4,2               ; @ATOM_DISABLE
	.no_dead_strip	_radeon_atom_encoder_dpms
.subsections_via_symbols
