	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dispc_ovl_compute_fifo_thresholds ## -- Begin function dispc_ovl_compute_fifo_thresholds
	.p2align	4, 0x90
_dispc_ovl_compute_fifo_thresholds:     ## @dispc_ovl_compute_fifo_thresholds
	.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	%r9d, -72(%rbp)                 ## 4-byte Spill
	movl	%r8d, %ebx
	movq	%rcx, %r12
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	callq	_dispc_ovl_get_burst_size
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_dispc_ovl_get_fifo_size
	movl	%eax, %r13d
	testl	%ebx, %ebx
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_dispc_get_num_ovls
	testl	%eax, %eax
	jle	LBB0_3
## %bb.4:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_dispc_ovl_get_fifo_size
	addl	%eax, %ebx
	incl	%r12d
	movq	%r14, %rdi
	callq	_dispc_get_num_ovls
	cmpl	%eax, %r12d
	jl	LBB0_5
	jmp	LBB0_6
LBB0_1:
	movl	%r13d, %ebx
LBB0_6:
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_9
LBB0_7:
	movq	_FEAT_OMAP3_DSI_FIFO_BUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dispc_has_feature
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	subl	%ecx, %r13d
	subl	%ecx, %r13d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	subl	%ecx, %ebx
	jmp	LBB0_12
LBB0_3:
	xorl	%ebx, %ebx
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_7
LBB0_9:
	movq	_OMAP_DSS_WB@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_11
## %bb.10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_11:
	subl	-48(%rbp), %r13d                ## 4-byte Folded Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	subl	-68(%rbp), %ebx                 ## 4-byte Folded Reload
LBB0_12:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FEAT_OMAP3_DSI_FIFO_BUG,4,2    ## @FEAT_OMAP3_DSI_FIFO_BUG
	.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_compute_fifo_thresholds ; -- Begin function dispc_ovl_compute_fifo_thresholds
	.p2align	2
_dispc_ovl_compute_fifo_thresholds:     ; @dispc_ovl_compute_fifo_thresholds
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x5
	mov	x26, x4
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x24, x0
	ldr	x8, [x0]
	ldr	w27, [x8]
	bl	_dispc_ovl_get_burst_size
	mov	x20, x0
	mov	x0, x24
	mov	x1, x22
	bl	_dispc_ovl_get_fifo_size
	mov	x23, x0
	cbz	w26, LBB0_4
; %bb.1:
	mov	x0, x24
	bl	_dispc_get_num_ovls
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.2:
	mov	w26, #0
	mov	w28, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	mov	x1, x26
	bl	_dispc_ovl_get_fifo_size
	add	w28, w0, w28
	add	w26, w26, #1
	mov	x0, x24
	bl	_dispc_get_num_ovls
	cmp	w26, w0
	b.lt	LBB0_3
	b	LBB0_5
LBB0_4:
	mov	x28, x23
LBB0_5:
	cbz	w25, LBB0_9
LBB0_6:
Lloh0:
	adrp	x8, _FEAT_OMAP3_DSI_FIFO_BUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FEAT_OMAP3_DSI_FIFO_BUG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_dispc_has_feature
	cbz	x0, LBB0_9
; %bb.7:
	sub	w8, w23, w20, lsl #1
	str	w8, [x21]
	sub	w20, w28, w20
	b	LBB0_12
LBB0_8:
	mov	w28, #0
	cbnz	w25, LBB0_6
LBB0_9:
Lloh3:
	adrp	x8, _OMAP_DSS_WB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OMAP_DSS_WB@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_11
; %bb.10:
	str	wzr, [x21]
	b	LBB0_12
LBB0_11:
	sub	w8, w23, w20
	str	w8, [x21]
	sub	w20, w28, w27
LBB0_12:
	str	w20, [x19]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FEAT_OMAP3_DSI_FIFO_BUG,4,2    ; @FEAT_OMAP3_DSI_FIFO_BUG
	.comm	_OMAP_DSS_WB,4,2                ; @OMAP_DSS_WB
.subsections_via_symbols
