	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dispc_init_fifos
_dispc_init_fifos:                      ## @dispc_init_fifos
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movl	24(%rax), %r15d
	movq	_FEAT_REG_FIFOSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	callq	_dispc_get_reg_field
	movq	8(%r14), %rax
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_DISPC_OVL_FIFO_SIZE_STATUS
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_REG_GET
	imull	%r15d, %eax
	movq	16(%r14), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movq	(%r14), %rax
	movl	%ebx, (%rax,%rbx,4)
	incq	%rbx
	movq	8(%r14), %rax
	movslq	(%rax), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_2
LBB0_3:
	cmpq	$0, 16(%rax)
	je	LBB0_5
## %bb.4:
	movq	_DISPC_GLOBAL_BUFFER@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_dispc_read_reg
	movl	%eax, %edi
	movl	$4, %esi
	movl	$2, %edx
	xorl	%ecx, %ecx
	callq	_FLD_MOD
	movl	%eax, %edi
	movl	$4, %esi
	movl	$5, %edx
	movl	$3, %ecx
	callq	_FLD_MOD
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$26, %edx
	movl	$24, %ecx
	callq	_FLD_MOD
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$29, %edx
	movl	$27, %ecx
	callq	_FLD_MOD
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dispc_write_reg
	movq	_OMAP_DSS_WB@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movq	_OMAP_DSS_GFX@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	%edx, (%rcx,%rax,4)
LBB0_5:
	movq	%r14, %rdi
	callq	_dispc_get_num_ovls
	testl	%eax, %eax
	jle	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	leaq	-40(%rbp), %r15
	leaq	-36(%rbp), %r12
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_dispc_ovl_compute_fifo_thresholds
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_dispc_ovl_set_fifo_threshold
	incq	%rbx
	movq	%r14, %rdi
	callq	_dispc_get_num_ovls
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	movq	8(%r14), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_10
## %bb.9:
	movq	_OMAP_DSS_WB@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	leaq	-40(%rbp), %rdx
	leaq	-36(%rbp), %rcx
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_dispc_ovl_compute_fifo_thresholds
	movq	(%rbx), %rsi
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %ecx
	movq	%r14, %rdi
	callq	_dispc_ovl_set_fifo_threshold
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FEAT_REG_FIFOSIZE,4,2          ## @FEAT_REG_FIFOSIZE
	.comm	_DISPC_GLOBAL_BUFFER,4,2        ## @DISPC_GLOBAL_BUFFER
	.comm	_OMAP_DSS_WB,8,3                ## @OMAP_DSS_WB
	.comm	_OMAP_DSS_GFX,8,3               ## @OMAP_DSS_GFX
	.no_dead_strip	_dispc_init_fifos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dispc_init_fifos
_dispc_init_fifos:                      ; @dispc_init_fifos
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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]
	ldr	w21, [x8, #24]
Lloh0:
	adrp	x8, _FEAT_REG_FIFOSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FEAT_REG_FIFOSIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	add	x3, sp, #8
	bl	_dispc_get_reg_field
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_DISPC_OVL_FIFO_SIZE_STATUS
	mov	x1, x0
	ldp	w3, w2, [sp, #8]
	mov	x0, x19
	bl	_REG_GET
	mul	w8, w0, w21
	ldr	x9, [x19, #16]
	lsl	x10, x20, #2
	str	w8, [x9, x10]
	ldr	x8, [x19]
	str	w20, [x8, x10]
	add	x20, x20, #1
	ldr	x8, [x19, #8]
	ldrsw	x9, [x8]
	cmp	x20, x9
	b.lt	LBB0_2
LBB0_3:
	ldr	x8, [x8, #16]
Lloh3:
	adrp	x21, _OMAP_DSS_WB@GOTPAGE
Lloh4:
	ldr	x21, [x21, _OMAP_DSS_WB@GOTPAGEOFF]
	cbz	x8, LBB0_5
; %bb.4:
Lloh5:
	adrp	x20, _DISPC_GLOBAL_BUFFER@GOTPAGE
Lloh6:
	ldr	x20, [x20, _DISPC_GLOBAL_BUFFER@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_dispc_read_reg
	mov	w1, #4
	mov	w2, #2
	mov	w3, #0
	bl	_FLD_MOD
	mov	w1, #4
	mov	w2, #5
	mov	w3, #3
	bl	_FLD_MOD
	mov	w1, #0
	mov	w2, #26
	mov	w3, #24
	bl	_FLD_MOD
	mov	w1, #0
	mov	w2, #29
	mov	w3, #27
	bl	_FLD_MOD
	mov	x2, x0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_dispc_write_reg
	ldr	x8, [x21]
Lloh7:
	adrp	x9, _OMAP_DSS_GFX@GOTPAGE
Lloh8:
	ldr	x9, [x9, _OMAP_DSS_GFX@GOTPAGEOFF]
	ldr	x10, [x19]
Lloh9:
	ldr	x9, [x9]
	str	w8, [x10, x9, lsl #2]
	str	w9, [x10, x8, lsl #2]
LBB0_5:
	mov	x0, x19
	bl	_dispc_get_num_ovls
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x20, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #4
	mov	x3, sp
	mov	x0, x19
	mov	x1, x20
	mov	w4, #0
	mov	w5, #0
	bl	_dispc_ovl_compute_fifo_thresholds
	ldp	w3, w2, [sp]
	mov	x0, x19
	mov	x1, x20
	bl	_dispc_ovl_set_fifo_threshold
	add	x20, x20, #1
	mov	x0, x19
	bl	_dispc_get_num_ovls
	cmp	x20, w0, sxtw
	b.lt	LBB0_7
LBB0_8:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	x1, [x21]
	add	x2, sp, #4
	mov	x3, sp
	mov	x0, x19
	mov	w4, #0
	mov	w5, #0
	bl	_dispc_ovl_compute_fifo_thresholds
	ldr	x1, [x21]
	ldp	w3, w2, [sp]
	mov	x0, x19
	bl	_dispc_ovl_set_fifo_threshold
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_FEAT_REG_FIFOSIZE,4,2          ; @FEAT_REG_FIFOSIZE
	.comm	_DISPC_GLOBAL_BUFFER,4,2        ; @DISPC_GLOBAL_BUFFER
	.comm	_OMAP_DSS_WB,8,3                ; @OMAP_DSS_WB
	.comm	_OMAP_DSS_GFX,8,3               ; @OMAP_DSS_GFX
	.no_dead_strip	_dispc_init_fifos
.subsections_via_symbols
