	.file	"extr_vc4_hdmi.c_vc4_hdmi_set_n_cts.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vc4_hdmi_set_n_cts, @function
vc4_hdmi_set_n_cts:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR 8[rdi]
	mov	rdi, QWORD PTR [rax]
	mov	r12, QWORD PTR 8[rax]
	call	to_vc4_dev@PLT
	mov	esi, DWORD PTR 0[rbp]
	sal	esi, 7
	movsx	rbp, esi
	mov	eax, esi
	imul	rbp, rbp, 274877907
	sar	eax, 31
	sar	rbp, 38
	sub	ebp, eax
	mov	rax, QWORD PTR [r12]
	mov	r12d, DWORD PTR [rax]
	imul	r12d, ebp
	imul	r12d, r12d, 1000
	mov	edi, r12d
	call	do_div@PLT
	mov	esi, DWORD PTR VC4_HDMI_CRP_CFG_N[rip]
	mov	edi, ebp
	call	VC4_SET_FIELD@PLT
	mov	edi, DWORD PTR VC4_HDMI_CRP_CFG[rip]
	or	eax, DWORD PTR VC4_HDMI_CRP_CFG_EXTERNAL_CTS_EN[rip]
	mov	esi, eax
	call	HDMI_WRITE@PLT
	mov	edi, DWORD PTR VC4_HDMI_CTS_0[rip]
	mov	esi, r12d
	call	HDMI_WRITE@PLT
	mov	edi, DWORD PTR VC4_HDMI_CTS_1[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	esi, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	HDMI_WRITE@PLT
	.cfi_endproc
.LFE0:
	.size	vc4_hdmi_set_n_cts, .-vc4_hdmi_set_n_cts
	.comm	VC4_HDMI_CTS_1,4,4
	.comm	VC4_HDMI_CTS_0,4,4
	.comm	VC4_HDMI_CRP_CFG_N,4,4
	.comm	VC4_HDMI_CRP_CFG_EXTERNAL_CTS_EN,4,4
	.comm	VC4_HDMI_CRP_CFG,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_vc4_hdmi.c_vc4_hdmi_set_n_cts.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vc4_hdmi_set_n_cts, %function
vc4_hdmi_set_n_cts:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r3, [r0, #4]
	ldr	r5, .L4
	ldm	r3, {r0, r6}
	bl	to_vc4_dev
	ldr	r1, [r4]
	lsl	r1, r1, #7
	smull	r2, r3, r5, r1
	ldr	r2, [r6]
	asr	r5, r1, #31
	ldr	r4, [r2]
	rsb	r5, r5, r3, asr #6
	mul	r4, r5, r4
	rsb	r3, r4, r4, lsl #5
	add	r4, r4, r3, lsl #2
	lsl	r4, r4, #3
	mov	r0, r4
	bl	do_div
	ldr	r2, .L4+4
	ldr	r3, .L4+8
	ldr	r1, [r2]
	mov	r0, r5
	ldr	r5, [r3]
	bl	VC4_SET_FIELD
	mov	r1, r0
	ldr	r3, .L4+12
	mov	r0, r5
	ldr	r3, [r3]
	orr	r1, r1, r3
	bl	HDMI_WRITE
	ldr	r3, .L4+16
	mov	r1, r4
	ldr	r0, [r3]
	bl	HDMI_WRITE
	ldr	r3, .L4+20
	mov	r1, r4
	pop	{r4, r5, r6, lr}
	ldr	r0, [r3]
	b	HDMI_WRITE
.L5:
	.align	2
.L4:
	.word	274877907
	.word	VC4_HDMI_CRP_CFG_N
	.word	VC4_HDMI_CRP_CFG
	.word	VC4_HDMI_CRP_CFG_EXTERNAL_CTS_EN
	.word	VC4_HDMI_CTS_0
	.word	VC4_HDMI_CTS_1
	.size	vc4_hdmi_set_n_cts, .-vc4_hdmi_set_n_cts
	.comm	VC4_HDMI_CTS_1,4,4
	.comm	VC4_HDMI_CTS_0,4,4
	.comm	VC4_HDMI_CRP_CFG_N,4,4
	.comm	VC4_HDMI_CRP_CFG_EXTERNAL_CTS_EN,4,4
	.comm	VC4_HDMI_CRP_CFG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
