	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_mst_encoder_prepare
_radeon_mst_encoder_prepare:            ## @radeon_mst_encoder_prepare
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_radeon_mst_find_connector
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_to_radeon_encoder
	movq	%rax, %r15
	movq	_DRM_MODE_DPMS_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_radeon_mst_encoder_dpms
	movq	8(%r15), %rax
	movq	8(%rax), %r15
	movq	8(%r15), %r12
	movl	(%rbx), %ecx
	movl	%ecx, 4(%rax)
	movl	(%r12), %esi
	cmpl	$-1, %esi
	jne	LBB0_3
## %bb.2:
	leaq	4(%r15), %rdi
	movl	$-1, %esi
	callq	_radeon_atom_pick_dig_encoder
	movl	%eax, (%r12)
	movl	%eax, %edi
	callq	_radeon_atom_set_enc_offset
	movl	%eax, (%r15)
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_atombios_set_mst_encoder_crtc_source
	movl	(%r12), %esi
LBB0_3:
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
LBB0_4:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to find connector %p\n"

	.comm	_DRM_MODE_DPMS_OFF,4,2          ## @DRM_MODE_DPMS_OFF
L_.str.1:                               ## @.str.1
	.asciz	"%d %d\n"

	.no_dead_strip	_radeon_mst_encoder_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_mst_encoder_prepare
_radeon_mst_encoder_prepare:            ; @radeon_mst_encoder_prepare
	.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	x19, x0
	bl	_radeon_mst_find_connector
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_to_radeon_encoder
	mov	x21, x0
Lloh0:
	adrp	x8, _DRM_MODE_DPMS_OFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MODE_DPMS_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_radeon_mst_encoder_dpms
	ldr	x8, [x21, #8]
	ldr	x21, [x8, #8]
	ldr	x22, [x21, #8]
	ldr	w9, [x20]
	str	w9, [x8, #4]
	ldr	w1, [x22]
	cmn	w1, #1
	b.ne	LBB0_3
; %bb.2:
	add	x0, x21, #4
	bl	_radeon_atom_pick_dig_encoder
	str	w0, [x22]
	bl	_radeon_atom_set_enc_offset
	str	w0, [x21]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_atombios_set_mst_encoder_crtc_source
	ldr	w1, [x22]
LBB0_3:
	ldr	w8, [x21]
	str	x8, [sp]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	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_4:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, 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
	add	sp, sp, #64
	b	_DRM_DEBUG_KMS
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to find connector %p\n"

	.comm	_DRM_MODE_DPMS_OFF,4,2          ; @DRM_MODE_DPMS_OFF
l_.str.1:                               ; @.str.1
	.asciz	"%d %d\n"

	.no_dead_strip	_radeon_mst_encoder_prepare
.subsections_via_symbols
