	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dce_v10_0_encoder_prepare
_dce_v10_0_encoder_prepare:             ## @dce_v10_0_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	%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
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r15
	callq	_to_amdgpu_encoder
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_amdgpu_get_connector_for_encoder
	movq	%rax, %r14
	movq	_ATOM_DEVICE_DFP_SUPPORT@GOTPCREL(%rip), %rcx
	movq	_ATOM_DEVICE_LCD_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	testl	%eax, (%r12)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_amdgpu_encoder_get_dp_bridge_encoder_id
	movq	_ENCODER_OBJECT_ID_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
LBB0_2:
	movq	8(%r12), %r13
	testq	%r13, %r13
	je	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	callq	_dce_v10_0_pick_dig_encoder
	movq	%rax, (%r13)
	movq	_ATOM_DEVICE_DFP_SUPPORT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r12)
	je	LBB0_5
## %bb.4:
	movq	(%r15), %rcx
	movl	(%rcx,%rax,4), %eax
	movl	%eax, 8(%r13)
LBB0_5:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_amdgpu_atombios_scratch_regs_lock
	testq	%r14, %r14
	je	LBB0_10
## %bb.6:
	movq	%r14, %rdi
	callq	_to_amdgpu_connector
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	movq	%rax, %rdi
	callq	_amdgpu_i2c_router_select_cd_port
LBB0_8:
	movq	(%r14), %rax
	movq	_DRM_MODE_CONNECTOR_eDP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	_ATOM_TRANSMITTER_ACTION_POWER_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_amdgpu_atombios_encoder_set_edp_panel_power
LBB0_10:
	movq	%rbx, %rdi
	callq	_amdgpu_atombios_encoder_set_crtc_source
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dce_v10_0_program_fmt          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATOM_DEVICE_DFP_SUPPORT,4,2    ## @ATOM_DEVICE_DFP_SUPPORT
	.comm	_ATOM_DEVICE_LCD_SUPPORT,4,2    ## @ATOM_DEVICE_LCD_SUPPORT
	.comm	_ENCODER_OBJECT_ID_NONE,8,3     ## @ENCODER_OBJECT_ID_NONE
	.comm	_DRM_MODE_CONNECTOR_eDP,8,3     ## @DRM_MODE_CONNECTOR_eDP
	.comm	_ATOM_TRANSMITTER_ACTION_POWER_ON,4,2 ## @ATOM_TRANSMITTER_ACTION_POWER_ON
	.no_dead_strip	_dce_v10_0_encoder_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dce_v10_0_encoder_prepare
_dce_v10_0_encoder_prepare:             ; @dce_v10_0_encoder_prepare
	.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	x19, x0
	ldr	x8, [x0]
	ldr	x21, [x8]
	bl	_to_amdgpu_encoder
	mov	x22, x0
	mov	x0, x19
	bl	_amdgpu_get_connector_for_encoder
	mov	x20, x0
	ldr	w8, [x22]
Lloh0:
	adrp	x23, _ATOM_DEVICE_DFP_SUPPORT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ATOM_DEVICE_DFP_SUPPORT@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh2:
	adrp	x10, _ATOM_DEVICE_LCD_SUPPORT@GOTPAGE
Lloh3:
	ldr	x10, [x10, _ATOM_DEVICE_LCD_SUPPORT@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_amdgpu_encoder_get_dp_bridge_encoder_id
Lloh5:
	adrp	x8, _ENCODER_OBJECT_ID_NONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENCODER_OBJECT_ID_NONE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_5
LBB0_2:
	ldr	x24, [x22, #8]
	cbz	x24, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_dce_v10_0_pick_dig_encoder
	str	x0, [x24]
	ldr	w8, [x22]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x21]
	ldr	w8, [x8, x0, lsl #2]
	str	w8, [x24, #8]
LBB0_5:
	mov	x0, x21
	mov	w1, #1
	bl	_amdgpu_atombios_scratch_regs_lock
	cbz	x20, LBB0_10
; %bb.6:
	mov	x0, x20
	bl	_to_amdgpu_connector
	ldr	x8, [x0]
	cbz	x8, LBB0_8
; %bb.7:
	bl	_amdgpu_i2c_router_select_cd_port
LBB0_8:
	ldr	x8, [x20]
Lloh8:
	adrp	x9, _DRM_MODE_CONNECTOR_eDP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DRM_MODE_CONNECTOR_eDP@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
Lloh11:
	adrp	x8, _ATOM_TRANSMITTER_ACTION_POWER_ON@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATOM_TRANSMITTER_ACTION_POWER_ON@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_amdgpu_atombios_encoder_set_edp_panel_power
LBB0_10:
	mov	x0, x19
	bl	_amdgpu_atombios_encoder_set_crtc_source
	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	_dce_v10_0_program_fmt
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ATOM_DEVICE_DFP_SUPPORT,4,2    ; @ATOM_DEVICE_DFP_SUPPORT
	.comm	_ATOM_DEVICE_LCD_SUPPORT,4,2    ; @ATOM_DEVICE_LCD_SUPPORT
	.comm	_ENCODER_OBJECT_ID_NONE,8,3     ; @ENCODER_OBJECT_ID_NONE
	.comm	_DRM_MODE_CONNECTOR_eDP,8,3     ; @DRM_MODE_CONNECTOR_eDP
	.comm	_ATOM_TRANSMITTER_ACTION_POWER_ON,4,2 ; @ATOM_TRANSMITTER_ACTION_POWER_ON
	.no_dead_strip	_dce_v10_0_encoder_prepare
.subsections_via_symbols
