	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_hdmi_set_n_cts
_vc4_hdmi_set_n_cts:                    ## @vc4_hdmi_set_n_cts
	.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, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %rdi
	movq	8(%rax), %r14
	callq	_to_vc4_dev
	movq	(%r14), %rax
	movl	(%rbx), %ecx
	shll	$7, %ecx
	movslq	%ecx, %rsi
	imulq	$274877907, %rsi, %rbx          ## imm = 0x10624DD3
	movq	%rbx, %rcx
	shrq	$63, %rcx
	sarq	$38, %rbx
	addl	%ecx, %ebx
	movl	(%rax), %eax
	imull	%ebx, %eax
	imull	$1000, %eax, %r14d              ## imm = 0x3E8
	movl	%r14d, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_do_div
	movq	_VC4_HDMI_CRP_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_VC4_HDMI_CRP_CFG_EXTERNAL_CTS_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_VC4_HDMI_CRP_CFG_N@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_VC4_SET_FIELD
	orl	%eax, %r12d
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_HDMI_WRITE
	movq	_VC4_HDMI_CTS_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_HDMI_WRITE
	movq	_VC4_HDMI_CTS_1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HDMI_WRITE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VC4_HDMI_CRP_CFG,4,2           ## @VC4_HDMI_CRP_CFG
	.comm	_VC4_HDMI_CRP_CFG_EXTERNAL_CTS_EN,4,2 ## @VC4_HDMI_CRP_CFG_EXTERNAL_CTS_EN
	.comm	_VC4_HDMI_CRP_CFG_N,4,2         ## @VC4_HDMI_CRP_CFG_N
	.comm	_VC4_HDMI_CTS_0,4,2             ## @VC4_HDMI_CTS_0
	.comm	_VC4_HDMI_CTS_1,4,2             ## @VC4_HDMI_CTS_1
	.no_dead_strip	_vc4_hdmi_set_n_cts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_hdmi_set_n_cts
_vc4_hdmi_set_n_cts:                    ; @vc4_hdmi_set_n_cts
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0, #8]
	ldp	x0, x20, [x8]
	bl	_to_vc4_dev
	ldr	x8, [x20]
	ldr	w9, [x19]
	lsl	w1, w9, #7
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x9, w1, w9
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w19, w9, w10
	ldr	w8, [x8]
	mul	w8, w8, w19
	mov	w9, #1000
	mul	w20, w8, w9
	mov	x0, x20
	bl	_do_div
Lloh0:
	adrp	x8, _VC4_HDMI_CRP_CFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VC4_HDMI_CRP_CFG@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _VC4_HDMI_CRP_CFG_EXTERNAL_CTS_EN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VC4_HDMI_CRP_CFG_EXTERNAL_CTS_EN@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
Lloh6:
	adrp	x8, _VC4_HDMI_CRP_CFG_N@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VC4_HDMI_CRP_CFG_N@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_VC4_SET_FIELD
	orr	w1, w0, w22
	mov	x0, x21
	bl	_HDMI_WRITE
Lloh9:
	adrp	x8, _VC4_HDMI_CTS_0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VC4_HDMI_CTS_0@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_HDMI_WRITE
Lloh12:
	adrp	x8, _VC4_HDMI_CTS_1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VC4_HDMI_CTS_1@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_HDMI_WRITE
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VC4_HDMI_CRP_CFG,4,2           ; @VC4_HDMI_CRP_CFG
	.comm	_VC4_HDMI_CRP_CFG_EXTERNAL_CTS_EN,4,2 ; @VC4_HDMI_CRP_CFG_EXTERNAL_CTS_EN
	.comm	_VC4_HDMI_CRP_CFG_N,4,2         ; @VC4_HDMI_CRP_CFG_N
	.comm	_VC4_HDMI_CTS_0,4,2             ; @VC4_HDMI_CTS_0
	.comm	_VC4_HDMI_CTS_1,4,2             ; @VC4_HDMI_CTS_1
	.no_dead_strip	_vc4_hdmi_set_n_cts
.subsections_via_symbols
