	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dispc_ovl_set_fifo_threshold   ## -- Begin function dispc_ovl_set_fifo_threshold
	.p2align	4, 0x90
_dispc_ovl_set_fifo_threshold:          ## @dispc_ovl_set_fifo_threshold
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %eax
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	(%rdi), %rcx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	(%rcx), %ebx
	cltd
	idivl	%ebx
	movl	%eax, %r13d
	xorl	%edi, %edi
	testl	%edx, %edx
	setne	%dil
	callq	_WARN_ON
	movl	%r15d, %eax
	cltd
	idivl	%ebx
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%edi, %edi
	testl	%edx, %edx
	setne	%dil
	callq	_WARN_ON
	movq	_FEAT_REG_FIFOHIGHTHRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	movq	%r12, %rdi
	callq	_dispc_get_reg_field
	movq	_FEAT_REG_FIFOLOWTHRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	leaq	-52(%rbp), %rcx
	movq	%r12, %rdi
	callq	_dispc_get_reg_field
	movl	%r14d, %edi
	callq	_DISPC_OVL_FIFO_THRESHOLD
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %ecx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_REG_GET
	movl	%eax, %r15d
	imull	%ebx, %r15d
	movl	%r14d, %edi
	callq	_DISPC_OVL_FIFO_THRESHOLD
	movl	-64(%rbp), %edx
	movl	-60(%rbp), %ecx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_REG_GET
	imull	%ebx, %eax
	movl	%r13d, %r12d
	movl	%r13d, %r8d
	imull	%ebx, %r8d
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	imull	%r13d, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	movl	%ebx, %r9d
	callq	_DSSDBG
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, %edi
	callq	_DISPC_OVL_FIFO_THRESHOLD
	movl	%eax, %r15d
	movl	-64(%rbp), %esi
	movl	-60(%rbp), %edx
	movl	%r13d, %edi
	callq	_FLD_VAL
	movl	%eax, %ebx
	movl	-56(%rbp), %esi
	movl	-52(%rbp), %edx
	movl	%r12d, %edi
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	callq	_FLD_VAL
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_dispc_write_reg
	movq	_FEAT_PRELOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_dispc_has_feature
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	(%r12), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_4
## %bb.2:
	movq	_OMAP_DSS_WB@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	je	LBB0_4
## %bb.3:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_DISPC_OVL_PRELOAD
	movl	%eax, %ebx
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	$4095, %esi                     ## imm = 0xFFF
	callq	_min
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_dispc_write_reg
LBB0_4:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FEAT_REG_FIFOHIGHTHRESHOLD,4,2 ## @FEAT_REG_FIFOHIGHTHRESHOLD
	.comm	_FEAT_REG_FIFOLOWTHRESHOLD,4,2  ## @FEAT_REG_FIFOLOWTHRESHOLD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fifo(%d) threshold (bytes), old %u/%u, new %u/%u\n"

	.comm	_FEAT_PRELOAD,4,2               ## @FEAT_PRELOAD
	.comm	_OMAP_DSS_WB,4,2                ## @OMAP_DSS_WB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dispc_ovl_set_fifo_threshold   ; -- Begin function dispc_ovl_set_fifo_threshold
	.p2align	2
_dispc_ovl_set_fifo_threshold:          ; @dispc_ovl_set_fifo_threshold
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x3
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w24, [x8]
	sdiv	w22, w2, w24
	msub	w8, w22, w24, w2
	cmp	w8, #0
	cset	w0, ne
	bl	_WARN_ON
	sdiv	w21, w23, w24
	msub	w8, w21, w24, w23
	cmp	w8, #0
	cset	w0, ne
	bl	_WARN_ON
Lloh0:
	adrp	x8, _FEAT_REG_FIFOHIGHTHRESHOLD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FEAT_REG_FIFOHIGHTHRESHOLD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x19
	bl	_dispc_get_reg_field
Lloh3:
	adrp	x8, _FEAT_REG_FIFOLOWTHRESHOLD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FEAT_REG_FIFOLOWTHRESHOLD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #4
	mov	x3, sp
	mov	x0, x19
	bl	_dispc_get_reg_field
	mov	x0, x20
	bl	_DISPC_OVL_FIFO_THRESHOLD
	mov	x1, x0
	ldp	w3, w2, [sp]
	mov	x0, x19
	bl	_REG_GET
	mul	w23, w0, w24
	mov	x0, x20
	bl	_DISPC_OVL_FIFO_THRESHOLD
	mov	x1, x0
	ldp	w3, w2, [sp, #8]
	mov	x0, x19
	bl	_REG_GET
	mul	w3, w0, w24
	mul	w4, w22, w24
	mul	w5, w21, w24
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x23
	bl	_DSSDBG
	mov	x0, x20
	bl	_DISPC_OVL_FIFO_THRESHOLD
	mov	x23, x0
	ldp	w2, w1, [sp, #8]
	mov	x0, x21
	bl	_FLD_VAL
	mov	x24, x0
	ldp	w2, w1, [sp]
	mov	x0, x22
	bl	_FLD_VAL
	orr	w2, w0, w24
	mov	x0, x19
	mov	x1, x23
	bl	_dispc_write_reg
Lloh8:
	adrp	x8, _FEAT_PRELOAD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FEAT_PRELOAD@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dispc_has_feature
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_4
; %bb.2:
Lloh11:
	adrp	x8, _OMAP_DSS_WB@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OMAP_DSS_WB@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w20
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_DISPC_OVL_PRELOAD
	mov	x20, x0
	mov	x0, x21
	mov	w1, #4095
	bl	_min
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_dispc_write_reg
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_FEAT_REG_FIFOHIGHTHRESHOLD,4,2 ; @FEAT_REG_FIFOHIGHTHRESHOLD
	.comm	_FEAT_REG_FIFOLOWTHRESHOLD,4,2  ; @FEAT_REG_FIFOLOWTHRESHOLD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fifo(%d) threshold (bytes), old %u/%u, new %u/%u\n"

	.comm	_FEAT_PRELOAD,4,2               ; @FEAT_PRELOAD
	.comm	_OMAP_DSS_WB,4,2                ; @OMAP_DSS_WB
.subsections_via_symbols
