	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dispc_ovl_calc_scaling_34xx
_dispc_ovl_calc_scaling_34xx:           ## @dispc_ovl_calc_scaling_34xx
	.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
	movl	%r9d, -92(%rbp)                 ## 4-byte Spill
	movl	%r8d, -88(%rbp)                 ## 4-byte Spill
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movq	%rsi, %r8
	movq	72(%rbp), %rdx
	movq	64(%rbp), %rbx
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movq	(%rdi), %rax
	movl	(%rax), %eax
	movq	40(%rbp), %r12
	movl	24(%rbp), %r13d
	movl	16(%rbp), %r10d
	leal	(%r13,%r13), %esi
	movl	%esi, -84(%rbp)                 ## 4-byte Spill
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	addl	%eax, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	(%rdx), %esi
	movl	(%rbx), %edi
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movl	-92(%rbp), %eax                 ## 4-byte Reload
	cltd
	idivl	%esi
	movl	%eax, %r11d
	movl	-88(%rbp), %eax                 ## 4-byte Reload
	cltd
	idivl	%edi
	movl	%eax, %r9d
	cmpl	%r13d, %r11d
	setg	%sil
	setle	%cl
	cmpl	-64(%rbp), %eax                 ## 4-byte Folded Reload
	setle	%dl
	cmpl	-84(%rbp), %r11d                ## 4-byte Folded Reload
	setge	%al
	orb	%cl, %dl
	orb	%al, %dl
	andb	%sil, %dl
	movzbl	%dl, %eax
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, (%r12)
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	subq	$8, %rsp
	movq	%r8, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r9d, %edx
	movl	%r11d, %ecx
	movq	%r8, %r14
	movl	%r10d, %r8d
	movq	%r13, %r12
	movq	%r9, %r15
	movl	%r12d, %r9d
	movl	32(%rbp), %eax
	pushq	%rax
	movq	%r11, %r13
	callq	_calc_core_clk_five_taps
	movq	%rbx, %rdx
	addq	$16, %rsp
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rax
	movq	%r8, %rdi
	movl	%r9d, %esi
	movl	%r11d, %edx
	movl	%r10d, %ecx
	movq	%r8, %r14
	movq	%r13, %r12
	movl	%r12d, %r8d
	movq	%r9, %r15
	movl	96(%rbp), %r9d
	movq	%r11, %r13
	callq	*8(%rax)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	88(%rbp), %rcx
	movq	%rax, (%rcx)
	movq	40(%rbp), %rbx
	movl	(%rbx), %eax
	subq	$8, %rsp
	movq	%r14, %rdi
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	movl	80(%rbp), %ecx
	movl	%r15d, %r8d
	movq	%r13, %r14
	movl	%r13d, %r9d
	pushq	%rax
	pushq	%r12
	movl	16(%rbp), %eax
	movq	%rax, %r15
	pushq	%rax
	callq	_check_horiz_timing_omap3
	addq	$32, %rsp
	testl	%eax, %eax
	movq	%r12, %r13
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=2
	xorl	%eax, %eax
	cmpl	$0, (%rbx)
	movq	%r15, %r10
	movq	%rbx, %r12
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	movq	%r14, %r11
	jne	LBB0_2
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	cmpl	-52(%rbp), %r9d                 ## 4-byte Folded Reload
	movq	%r15, %r10
	movq	%rbx, %r12
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movq	%r14, %r11
	jg	LBB0_7
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	-64(%rbp), %r9d                 ## 4-byte Folded Reload
	jle	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, (%r12)
	jne	LBB0_7
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	88(%rbp), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.16:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_dispc_core_clk_rate
	movq	%r14, %r11
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movq	%r15, %r10
	cmpq	%rax, %rbx
	jbe	LBB0_17
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	72(%rbp), %rdx
	incl	(%rdx)
	movb	$1, %al
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	64(%rbp), %rsi
	movl	(%rsi), %edi
	movq	48(%rbp), %rsi
	cmpl	(%rsi), %edi
	jg	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rdx), %esi
	movq	56(%rbp), %rdx
	cmpl	(%rdx), %esi
	setle	%dl
	testb	%dl, %al
	jne	LBB0_1
	jmp	LBB0_10
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	leal	3(%r9), %eax
	testl	%r9d, %r9d
	cmovnsl	%r9d, %eax
	sarl	$2, %eax
	cmpl	$0, (%r12)
	je	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_1 Depth=1
	leal	3(%r11), %ecx
	testl	%r11d, %r11d
	cmovnsl	%r11d, %ecx
	sarl	$2, %ecx
	cmpl	%r13d, %ecx
	jle	LBB0_20
	jmp	LBB0_7
LBB0_22:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%r11d, %ecx
	shrl	$31, %ecx
	addl	%r11d, %ecx
	sarl	%ecx
	cmpl	%r13d, %ecx
	jg	LBB0_7
LBB0_20:                                ##   in Loop: Header=BB0_1 Depth=1
	cmpl	%r10d, %eax
	jg	LBB0_7
## %bb.21:                              ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	72(%rbp), %rdx
	jmp	LBB0_8
LBB0_10:
	testb	%al, %al
	je	LBB0_23
## %bb.11:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_30
LBB0_23:
	movl	(%r12), %eax
	subq	$8, %rsp
	movq	%r8, %rdi
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	movq	%rcx, %rdx
	movl	80(%rbp), %ecx
	movl	%r9d, %r8d
	movq	%r9, %rbx
	movl	%r11d, %r9d
	pushq	%rax
	pushq	%r13
	pushq	%r10
	callq	_check_horiz_timing_omap3
	addq	$32, %rsp
	testl	%eax, %eax
	je	LBB0_25
## %bb.24:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_30
LBB0_25:
	cmpl	-52(%rbp), %ebx                 ## 4-byte Folded Reload
	jle	LBB0_27
## %bb.26:
	leaq	L_.str.2(%rip), %rdi
	callq	_DSSERR
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_30
LBB0_27:
	xorl	%eax, %eax
	cmpl	-64(%rbp), %ebx                 ## 4-byte Folded Reload
	jle	LBB0_31
## %bb.28:
	cmpl	$0, (%r12)
	je	LBB0_31
## %bb.29:
	leaq	L_.str.4(%rip), %rdi
LBB0_30:
	callq	_DSSERR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_31:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to find scaling settings\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"horizontal timing too tight\n"

L_.str.2:                               ## @.str.2
	.asciz	"Cannot setup scaling\n"

L_.str.3:                               ## @.str.3
	.asciz	"width exceeds maximum width possible\n"

L_.str.4:                               ## @.str.4
	.asciz	"cannot setup scaling with five taps\n"

	.no_dead_strip	_dispc_ovl_calc_scaling_34xx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dispc_ovl_calc_scaling_34xx
_dispc_ovl_calc_scaling_34xx:           ; @dispc_ovl_calc_scaling_34xx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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, x7
	mov	x20, x6
	stp	w4, w5, [sp, #68]               ; 8-byte Folded Spill
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	ldr	w8, [x29, #80]
	str	w8, [sp, #92]                   ; 4-byte Folded Spill
	ldr	x26, [x29, #72]
	ldr	w24, [x29, #64]
	ldp	x11, x9, [x29, #48]
	ldr	x8, [x29, #40]
	str	x8, [sp, #32]                   ; 8-byte Folded Spill
	ldr	x8, [x29, #32]
	str	x8, [sp, #48]                   ; 8-byte Folded Spill
	ldr	x27, [x29, #24]
	ldr	w8, [x29, #16]
	stur	w8, [x29, #-84]                 ; 4-byte Folded Spill
	str	x0, [sp, #96]                   ; 8-byte Folded Spill
	ldr	x8, [x0]
	ldr	w8, [x8]
	lsl	w10, w7, #1
	str	w10, [sp, #44]                  ; 4-byte Folded Spill
	str	w8, [sp, #76]                   ; 4-byte Folded Spill
	lsl	w8, w8, #1
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	str	x9, [sp, #80]                   ; 8-byte Folded Spill
	ldr	w10, [x9]
	str	x11, [sp, #56]                  ; 8-byte Folded Spill
	ldr	w8, [x11]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
	ldp	w11, w9, [sp, #68]              ; 8-byte Folded Reload
	sdiv	w28, w9, w10
	cmp	w28, w19
	cset	w9, gt
	cset	w10, le
	sdiv	w25, w11, w8
	ldr	w8, [sp, #76]                   ; 4-byte Folded Reload
	cmp	w25, w8
	cset	w8, le
	ldr	w11, [sp, #44]                  ; 4-byte Folded Reload
	cmp	w28, w11
	cset	w11, ge
	orr	w8, w8, w10
	orr	w8, w8, w11
	and	w8, w8, w9
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	str	w8, [x27]
	cbz	w8, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=2
	mov	x0, x23
	mov	x1, x21
	mov	x2, x25
	mov	x3, x28
	mov	x4, x20
	mov	x5, x19
	ldur	w6, [x29, #-84]                 ; 4-byte Folded Reload
	bl	_calc_core_clk_five_taps
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=2
	ldr	x8, [sp, #96]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	mov	x0, x23
	mov	x1, x25
	mov	x2, x28
	mov	x3, x20
	mov	x4, x19
	ldr	w5, [sp, #92]                   ; 4-byte Folded Reload
	blr	x8
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=2
	str	x0, [x26]
	ldr	w8, [x27]
	str	w8, [sp]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x24
	mov	x4, x25
	mov	x5, x28
	mov	x6, x20
	mov	x7, x19
	bl	_check_horiz_timing_omap3
	cbz	w0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=2
	mov	w8, #0
	ldr	w9, [x27]
	cbnz	w9, LBB0_2
	b	LBB0_12
LBB0_7:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cmp	w25, w8
	b.gt	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #76]                   ; 4-byte Folded Reload
	cmp	w25, w8
	b.le	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x27]
	cbnz	w8, LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x26]
	cbz	x8, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [sp, #96]                   ; 8-byte Folded Reload
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	bl	_dispc_core_clk_rate
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	cmp	x8, x0
	b.ls	LBB0_15
LBB0_12:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x9, [sp, #80]                   ; 8-byte Folded Reload
	ldr	w8, [x9]
	add	w8, w8, #1
	str	w8, [x9]
	mov	w9, #1
LBB0_13:                                ;   in Loop: Header=BB0_1 Depth=1
	ldp	x10, x8, [sp, #48]              ; 16-byte Folded Reload
	ldr	w8, [x8]
	ldr	w10, [x10]
	cmp	w8, w10
	b.gt	LBB0_20
; %bb.14:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	x10, [sp, #80]                  ; 8-byte Folded Reload
	ldr	w10, [x10]
	ldr	x11, [sp, #32]                  ; 8-byte Folded Reload
	ldr	w11, [x11]
	cmp	w10, w11
	cset	w11, le
	and	w11, w9, w11
	tbnz	w11, #0, LBB0_1
	b	LBB0_20
LBB0_15:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w8, w25, #3
	cmp	w25, #0
	csel	w8, w8, w25, lt
	asr	w8, w8, #2
	ldr	w9, [x27]
	cbz	w9, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_1 Depth=1
	add	w9, w28, #3
	cmp	w28, #0
	csel	w9, w9, w28, lt
	cmp	w19, w9, asr #2
	b.ge	LBB0_18
	b	LBB0_12
LBB0_17:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w28, #0
	cinc	w9, w28, lt
	cmp	w19, w9, asr #1
	b.lt	LBB0_12
LBB0_18:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w8, w20
	b.gt	LBB0_12
; %bb.19:                               ;   in Loop: Header=BB0_1 Depth=1
	mov	w9, #0
	b	LBB0_13
LBB0_20:
	tbz	w9, #0, LBB0_22
; %bb.21:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_29
LBB0_22:
	ldr	w8, [x27]
	str	w8, [sp]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x24
	mov	x4, x25
	mov	x5, x28
	mov	x6, x20
	mov	x7, x19
	bl	_check_horiz_timing_omap3
	cbz	w0, LBB0_24
; %bb.23:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_29
LBB0_24:
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cmp	w25, w8
	b.le	LBB0_26
; %bb.25:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DSSERR
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_29
LBB0_26:
	ldr	w8, [sp, #76]                   ; 4-byte Folded Reload
	cmp	w25, w8
	b.le	LBB0_31
; %bb.27:
	ldr	w8, [x27]
	cbz	w8, LBB0_31
; %bb.28:
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_29:
	bl	_DSSERR
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_30:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_31:
	mov	w0, #0
	b	LBB0_30
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to find scaling settings\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"horizontal timing too tight\n"

l_.str.2:                               ; @.str.2
	.asciz	"Cannot setup scaling\n"

l_.str.3:                               ; @.str.3
	.asciz	"width exceeds maximum width possible\n"

l_.str.4:                               ; @.str.4
	.asciz	"cannot setup scaling with five taps\n"

	.no_dead_strip	_dispc_ovl_calc_scaling_34xx
.subsections_via_symbols
