	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_tcon_get_clk_delay
_sun4i_tcon_get_clk_delay:              ## @sun4i_tcon_get_clk_delay
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movl	(%rdi), %eax
	subl	4(%rdi), %eax
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%rdi)
	je	LBB0_2
## %bb.1:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, %eax
LBB0_2:
	leal	-2(%rax), %edi
	cmpl	$1, %r14d
	cmovnel	%eax, %edi
	movl	$30, %esi
	callq	_min
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_DRM_DEBUG_DRIVER
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TCON %d clock delay %u\n"

	.no_dead_strip	_sun4i_tcon_get_clk_delay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4i_tcon_get_clk_delay
_sun4i_tcon_get_clk_delay:              ; @sun4i_tcon_get_clk_delay
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldp	w8, w9, [x0]
	sub	w8, w8, w9
	ldr	w9, [x0, #8]
Lloh0:
	adrp	x10, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w8, #0
	cinc	w11, w8, lt
	asr	w11, w11, #1
	tst	w10, w9
	csel	w8, w8, w11, eq
	sub	w9, w8, #2
	cmp	w1, #1
	csel	w0, w9, w8, eq
	mov	w1, #30
	bl	_min
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_DRM_DEBUG_DRIVER
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TCON %d clock delay %u\n"

	.no_dead_strip	_sun4i_tcon_get_clk_delay
.subsections_via_symbols
