	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dispc_div_calc                 ## -- Begin function dispc_div_calc
	.p2align	4, 0x90
_dispc_div_calc:                        ## @dispc_div_calc
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -112(%rbp)                 ## 8-byte Spill
	movq	%r8, -104(%rbp)                 ## 8-byte Spill
	movq	%rcx, %r13
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %edi
	callq	_dss_get_max_fck_rate
	testq	%r14, %r14
	movl	$1, %ecx
	cmoveq	%rcx, %r14
	testq	%r13, %r13
	jne	LBB0_2
## %bb.1:
	movq	_ULONG_MAX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
LBB0_2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_DIV_ROUND_UP
	movl	$1, %esi
	movl	%eax, %edi
	callq	_max
	movl	%eax, %r15d
	movq	%rbx, %rax
	orq	%r14, %rax
	shrq	$32, %rax
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%r14
	movq	%rax, %rdi
	jmp	LBB0_5
LBB0_3:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r14d
	movl	%eax, %edi
LBB0_5:
	movl	$255, %esi
	callq	_min
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%ecx, %r15d
	jg	LBB0_25
## %bb.6:
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movslq	%r15d, %r12
	incl	%ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r12
	cmpl	%r12d, -44(%rbp)                ## 4-byte Folded Reload
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_24
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_16 Depth 2
	movq	%rbx, %rax
	orq	%r12, %rax
	shrq	$32, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%r12
	movq	%rax, %r15
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r12d
	movl	%eax, %r15d
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_DIV_ROUND_UP
	movl	%eax, %edi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_max
	movl	%eax, %r13d
	movq	%r15, %rax
	orq	%r14, %rax
	shrq	$32, %rax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%r14
	movq	%rax, %rdi
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%r14d
	movl	%eax, %edi
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	$255, %esi
	callq	_min
	cmpl	%eax, %r13d
	jg	LBB0_23
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %r14d
	movslq	%r13d, %rbx
	incl	%r14d
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rax
	orq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rbx
	movq	%rax, %r13
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_16 Depth=2
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ebx
	movl	%eax, %r13d
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=2
	movq	_FEAT_CORE_CLK_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_dispc_has_feature
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	%r12, %rdi
	callq	_dispc_core_clk_rate
LBB0_21:                                ##   in Loop: Header=BB0_16 Depth=2
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movl	%r12d, %edi
	movl	%ebx, %esi
	movq	%r15, %rdx
	movq	%r13, %rcx
	movq	-112(%rbp), %r8                 ## 8-byte Reload
	callq	*-104(%rbp)                     ## 8-byte Folded Reload
	testq	%rax, %rax
	jne	LBB0_22
## %bb.15:                              ##   in Loop: Header=BB0_16 Depth=2
	incq	%rbx
	cmpl	%ebx, %r14d
	jne	LBB0_16
	jmp	LBB0_23
LBB0_22:
	movl	$1, %eax
LBB0_25:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	xorl	%eax, %eax
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_ULONG_MAX,8,3                  ## @ULONG_MAX
	.comm	_FEAT_CORE_CLK_DIV,4,2          ## @FEAT_CORE_CLK_DIV
	.comm	_CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK,4,2 ## @CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dispc_div_calc                 ; -- Begin function dispc_div_calc
	.p2align	2
_dispc_div_calc:                        ; @dispc_div_calc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x5
	mov	x20, x4
	mov	x24, x3
	mov	x25, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	ldr	w0, [x0]
	bl	_dss_get_max_fck_rate
	mov	x1, x0
	cmp	x25, #0
	csinc	x28, x25, xzr, ne
Lloh0:
	adrp	x8, _ULONG_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ULONG_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x24, #0
	csel	x8, x8, x24, eq
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	mov	x0, x21
	bl	_DIV_ROUND_UP
	mov	w1, #1
	bl	_max
	mov	x25, x0
	udiv	x0, x21, x28
	mov	w1, #255
	bl	_min
	cmp	w25, w0
	b.le	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_11
LBB0_2:
	sxtw	x25, w25
	add	w8, w0, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh3:
	adrp	x23, _FEAT_CORE_CLK_DIV@GOTPAGE
Lloh4:
	ldr	x23, [x23, _FEAT_CORE_CLK_DIV@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x25, x25, #1
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w8, w25
	b.eq	LBB0_1
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	udiv	x26, x21, x25
	mov	x0, x26
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	bl	_DIV_ROUND_UP
	ldr	x1, [sp, #24]                   ; 8-byte Folded Reload
	bl	_max
	mov	x27, x0
	udiv	x0, x26, x28
	mov	w1, #255
	bl	_min
	cmp	w27, w0
	b.gt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x27, w27
	add	w24, w0, #1
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x23]
	mov	x0, x22
	bl	_dispc_has_feature
	cbz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x22
	bl	_dispc_core_clk_rate
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=2
	udiv	x3, x26, x27
	mov	x0, x25
	mov	x1, x27
	mov	x2, x26
	mov	x4, x19
	blr	x20
	cbnz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x27, x27, #1
	cmp	w24, w27
	b.ne	LBB0_6
	b	LBB0_3
LBB0_10:
	mov	w0, #1
LBB0_11:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ULONG_MAX,8,3                  ; @ULONG_MAX
	.comm	_FEAT_CORE_CLK_DIV,4,2          ; @FEAT_CORE_CLK_DIV
	.comm	_CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK,4,2 ; @CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK
.subsections_via_symbols
