	.file	"extr_dce_v11_0.c_dce_v11_0_crtc_disable.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"failed to reserve abo before unpin\n"
	.text
	.p2align 4
	.type	dce_v11_0_crtc_disable, @function
dce_v11_0_crtc_disable:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	to_amdgpu_crtc@PLT
	mov	esi, DWORD PTR DRM_MODE_DPMS_OFF[rip]
	mov	rdi, rbp
	mov	rbx, rax
	mov	rax, QWORD PTR 8[rbp]
	mov	r12, QWORD PTR [rax]
	call	dce_v11_0_crtc_dpms@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L2
	mov	rax, QWORD PTR [rax]
	mov	edi, DWORD PTR [rax]
	call	gem_to_amdgpu_bo@PLT
	mov	esi, 1
	mov	rdi, rax
	mov	r13, rax
	call	amdgpu_bo_reserve@PLT
	mov	edi, eax
	call	unlikely@PLT
	test	rax, rax
	je	.L3
	lea	rdi, .LC0[rip]
	call	DRM_ERROR@PLT
.L2:
	xor	esi, esi
	mov	rdi, rbp
	call	dce_v11_0_grph_enable@PLT
	mov	esi, DWORD PTR ATOM_ENABLE[rip]
	mov	rdi, rbp
	call	amdgpu_atombios_crtc_powergate@PLT
	mov	eax, DWORD PTR [r12]
	test	eax, eax
	jle	.L4
	lea	esi, -1[rax]
	mov	rcx, QWORD PTR 8[r12]
	mov	r10d, DWORD PTR 4[rbx]
	xor	eax, eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rax, rdx
.L7:
	mov	rdx, QWORD PTR [rcx+rax*8]
	test	rdx, rdx
	je	.L5
	cmp	QWORD PTR 8[rdx], 0
	je	.L5
	cmp	DWORD PTR [rbx], eax
	je	.L5
	cmp	DWORD PTR [rdx], r10d
	je	.L6
.L5:
	lea	rdx, 1[rax]
	cmp	rsi, rax
	jne	.L13
.L8:
	cmp	r10d, 130
	jle	.L23
	lea	eax, -131[r10]
	cmp	eax, 5
	ja	.L6
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	r9d, DWORD PTR ATOM_DISABLE[rip]
	xor	r8d, r8d
	xor	ecx, ecx
	lea	rax, 12[rsp]
	mov	esi, DWORD PTR ATOM_CRTC_INVALID[rip]
	mov	edx, r10d
	mov	rdi, rbp
	push	rax
	.cfi_def_cfa_offset 80
	push	0
	.cfi_def_cfa_offset 88
	push	0
	.cfi_def_cfa_offset 96
	push	0
	.cfi_def_cfa_offset 104
	push	0
	.cfi_def_cfa_offset 112
	push	0
	.cfi_def_cfa_offset 120
	push	0
	.cfi_def_cfa_offset 128
	call	amdgpu_atombios_crtc_program_pll@PLT
	add	rsp, 64
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR ATOM_PPLL_INVALID[rip]
	mov	QWORD PTR 24[rbx], 0
	mov	QWORD PTR 16[rbx], 0
	mov	DWORD PTR 4[rbx], eax
	mov	QWORD PTR 8[rbx], 0
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	cmp	r10d, 127
	jle	.L6
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	r9d, DWORD PTR ATOM_DISABLE[rip]
	xor	r8d, r8d
	xor	ecx, ecx
	lea	rax, 12[rsp]
	mov	edx, r10d
	mov	rdi, rbp
	push	rax
	.cfi_def_cfa_offset 80
	push	0
	.cfi_def_cfa_offset 88
	push	0
	.cfi_def_cfa_offset 96
	push	0
	.cfi_def_cfa_offset 104
	push	0
	.cfi_def_cfa_offset 112
	push	0
	.cfi_def_cfa_offset 120
	push	0
	.cfi_def_cfa_offset 128
	mov	esi, DWORD PTR [rbx]
	call	amdgpu_atombios_crtc_program_pll@PLT
	add	rsp, 64
	.cfi_def_cfa_offset 64
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, r13
	call	amdgpu_bo_unpin@PLT
	mov	rdi, r13
	call	amdgpu_bo_unreserve@PLT
	jmp	.L2
.L4:
	mov	r10d, DWORD PTR 4[rbx]
	jmp	.L8
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	dce_v11_0_crtc_disable, .-dce_v11_0_crtc_disable
	.comm	DRM_MODE_DPMS_OFF,4,4
	.comm	ATOM_PPLL_INVALID,4,4
	.comm	ATOM_ENABLE,4,4
	.comm	ATOM_DISABLE,4,4
	.comm	ATOM_CRTC_INVALID,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_crtc_disable.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to reserve abo before unpin\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dce_v11_0_crtc_disable, %function
dce_v11_0_crtc_disable:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L28
	mov	r6, r0
	sub	sp, sp, #52
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	bl	to_amdgpu_crtc
	ldr	r2, .L28+4
	ldr	r3, [r6, #4]
	mov	r5, r0
	ldr	r1, [r2]
	mov	r0, r6
	ldr	r7, [r3]
	bl	dce_v11_0_crtc_dpms
	ldr	r3, [r6]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [r3]
	ldr	r0, [r3]
	bl	gem_to_amdgpu_bo
	mov	r1, #1
	mov	r4, r0
	bl	amdgpu_bo_reserve
	bl	unlikely
	cmp	r0, #0
	beq	.L3
	ldr	r0, .L28+8
	bl	DRM_ERROR
.L2:
	mov	r1, #0
	mov	r0, r6
	bl	dce_v11_0_grph_enable
	ldr	r3, .L28+12
	mov	r0, r6
	ldr	r1, [r3]
	bl	amdgpu_atombios_crtc_powergate
	ldr	r4, [r7]
	cmp	r4, #0
	ble	.L4
	mov	r3, #0
	ldr	ip, [r7, #4]
	ldr	r2, [r5, #4]
	sub	ip, ip, #4
.L7:
	ldr	r1, [ip, #4]!
	cmp	r1, #0
	beq	.L5
	ldr	lr, [r1, #4]
	cmp	lr, #0
	beq	.L5
	ldr	lr, [r5]
	cmp	lr, r3
	beq	.L5
	ldr	r1, [r1]
	cmp	r1, r2
	beq	.L6
.L5:
	add	r3, r3, #1
	cmp	r3, r4
	bne	.L7
.L8:
	cmp	r2, #130
	ble	.L26
	sub	r3, r2, #131
	cmp	r3, #5
	bhi	.L6
	mov	r3, #0
	ldr	r0, .L28+16
	ldr	r1, .L28+20
	ldr	lr, [r0]
	add	ip, sp, #40
	str	lr, [sp, #4]
	str	r3, [sp, #28]
	str	r3, [sp, #24]
	str	r3, [sp, #20]
	str	r3, [sp, #16]
	str	r3, [sp, #12]
	str	r3, [sp, #8]
	str	r3, [sp]
	ldr	r1, [r1]
	mov	r0, r6
	str	ip, [sp, #32]
	bl	amdgpu_atombios_crtc_program_pll
.L6:
	mov	r3, #0
	ldr	r2, .L28+24
	str	r3, [r5, #16]
	ldr	r2, [r2]
	str	r3, [r5, #12]
	stmib	r5, {r2, r3}
	ldr	r3, .L28
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L26:
	cmp	r2, #127
	ble	.L6
	mov	r3, #0
	ldr	r0, .L28+16
	add	ip, sp, #40
	ldr	lr, [r0]
	ldr	r1, [r5]
	mov	r0, r6
	str	lr, [sp, #4]
	str	r3, [sp, #28]
	str	r3, [sp, #24]
	str	r3, [sp, #20]
	str	r3, [sp, #16]
	str	r3, [sp, #12]
	str	r3, [sp, #8]
	str	r3, [sp]
	str	ip, [sp, #32]
	bl	amdgpu_atombios_crtc_program_pll
	b	.L6
.L3:
	mov	r0, r4
	bl	amdgpu_bo_unpin
	mov	r0, r4
	bl	amdgpu_bo_unreserve
	b	.L2
.L4:
	ldr	r2, [r5, #4]
	b	.L8
.L27:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	.LC1
	.word	DRM_MODE_DPMS_OFF
	.word	.LC0
	.word	ATOM_ENABLE
	.word	ATOM_DISABLE
	.word	ATOM_CRTC_INVALID
	.word	ATOM_PPLL_INVALID
	.size	dce_v11_0_crtc_disable, .-dce_v11_0_crtc_disable
	.comm	DRM_MODE_DPMS_OFF,4,4
	.comm	ATOM_PPLL_INVALID,4,4
	.comm	ATOM_ENABLE,4,4
	.comm	ATOM_DISABLE,4,4
	.comm	ATOM_CRTC_INVALID,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
