	.file	"extr_dce_v11_0.c_dce_v11_0_encoder_prepare.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	dce_v11_0_encoder_prepare, @function
dce_v11_0_encoder_prepare:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rax, QWORD PTR [rdi]
	mov	r13, QWORD PTR [rax]
	call	to_amdgpu_encoder@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	amdgpu_get_connector_for_encoder@PLT
	mov	r12, rax
	mov	eax, DWORD PTR ATOM_DEVICE_DFP_SUPPORT[rip]
	or	eax, DWORD PTR ATOM_DEVICE_LCD_SUPPORT[rip]
	test	DWORD PTR [rbx], eax
	je	.L2
.L5:
	mov	r14, QWORD PTR 8[rbx]
	test	r14, r14
	je	.L6
	mov	rdi, rbp
	call	dce_v11_0_pick_dig_encoder@PLT
	mov	edx, DWORD PTR [rbx]
	mov	QWORD PTR [r14], rax
	test	DWORD PTR ATOM_DEVICE_DFP_SUPPORT[rip], edx
	je	.L6
	mov	rdx, QWORD PTR 0[r13]
	mov	eax, DWORD PTR [rdx+rax*4]
	mov	DWORD PTR 8[r14], eax
.L6:
	mov	esi, 1
	mov	rdi, r13
	call	amdgpu_atombios_scratch_regs_lock@PLT
	test	r12, r12
	je	.L8
	mov	rdi, r12
	call	to_amdgpu_connector@PLT
	cmp	QWORD PTR [rax], 0
	jne	.L16
	mov	rax, QWORD PTR DRM_MODE_CONNECTOR_eDP[rip]
	cmp	QWORD PTR [r12], rax
	je	.L17
.L8:
	mov	rdi, rbp
	call	amdgpu_atombios_encoder_set_crtc_source@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	dce_v11_0_program_fmt@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	call	amdgpu_encoder_get_dp_bridge_encoder_id@PLT
	cmp	rax, QWORD PTR ENCODER_OBJECT_ID_NONE[rip]
	jne	.L5
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdi, rax
	call	amdgpu_i2c_router_select_cd_port@PLT
	mov	rax, QWORD PTR DRM_MODE_CONNECTOR_eDP[rip]
	cmp	QWORD PTR [r12], rax
	jne	.L8
.L17:
	mov	esi, DWORD PTR ATOM_TRANSMITTER_ACTION_POWER_ON[rip]
	mov	rdi, r12
	call	amdgpu_atombios_encoder_set_edp_panel_power@PLT
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	dce_v11_0_encoder_prepare, .-dce_v11_0_encoder_prepare
	.comm	ENCODER_OBJECT_ID_NONE,8,8
	.comm	DRM_MODE_CONNECTOR_eDP,8,8
	.comm	ATOM_TRANSMITTER_ACTION_POWER_ON,4,4
	.comm	ATOM_DEVICE_LCD_SUPPORT,4,4
	.comm	ATOM_DEVICE_DFP_SUPPORT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_dce_v11_0.c_dce_v11_0_encoder_prepare.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dce_v11_0_encoder_prepare, %function
dce_v11_0_encoder_prepare:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r9, [r3]
	mov	r4, r0
	bl	to_amdgpu_encoder
	mov	r5, r0
	mov	r0, r4
	bl	amdgpu_get_connector_for_encoder
	ldr	r8, .L21
	ldr	r2, .L21+4
	ldr	r3, [r8]
	ldr	r1, [r2]
	ldr	r2, [r5]
	orr	r3, r3, r1
	tst	r3, r2
	mov	r6, r0
	beq	.L2
.L5:
	ldr	r7, [r5, #4]
	cmp	r7, #0
	beq	.L6
	mov	r0, r4
	bl	dce_v11_0_pick_dig_encoder
	ldr	r3, [r8]
	ldr	r2, [r5]
	str	r0, [r7]
	tst	r2, r3
	ldrne	r3, [r9]
	ldrne	r3, [r3, r0, lsl #2]
	strne	r3, [r7, #4]
.L6:
	mov	r0, r9
	mov	r1, #1
	bl	amdgpu_atombios_scratch_regs_lock
	cmp	r6, #0
	beq	.L8
	mov	r0, r6
	bl	to_amdgpu_connector
	ldr	r3, [r0]
	cmp	r3, #0
	bne	.L19
.L9:
	ldr	r3, .L21+8
	ldr	r2, [r6]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L20
.L8:
	mov	r0, r4
	bl	amdgpu_atombios_encoder_set_crtc_source
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	dce_v11_0_program_fmt
.L2:
	mov	r0, r4
	bl	amdgpu_encoder_get_dp_bridge_encoder_id
	ldr	r3, .L21+12
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L5
	b	.L6
.L19:
	bl	amdgpu_i2c_router_select_cd_port
	b	.L9
.L20:
	ldr	r3, .L21+16
	mov	r0, r6
	ldr	r1, [r3]
	bl	amdgpu_atombios_encoder_set_edp_panel_power
	b	.L8
.L22:
	.align	2
.L21:
	.word	ATOM_DEVICE_DFP_SUPPORT
	.word	ATOM_DEVICE_LCD_SUPPORT
	.word	DRM_MODE_CONNECTOR_eDP
	.word	ENCODER_OBJECT_ID_NONE
	.word	ATOM_TRANSMITTER_ACTION_POWER_ON
	.size	dce_v11_0_encoder_prepare, .-dce_v11_0_encoder_prepare
	.comm	ENCODER_OBJECT_ID_NONE,4,4
	.comm	DRM_MODE_CONNECTOR_eDP,4,4
	.comm	ATOM_TRANSMITTER_ACTION_POWER_ON,4,4
	.comm	ATOM_DEVICE_LCD_SUPPORT,4,4
	.comm	ATOM_DEVICE_DFP_SUPPORT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
