	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bttv_calc_geo_old
_bttv_calc_geo_old:                     ## @bttv_calc_geo_old
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movslq	4(%r9), %rbx
	movq	(%rdi), %rax
	shlq	$12, %rbx
	cmpq	8(%rdi), %rax
	movl	$720, %r12d                     ## imm = 0x2D0
	cmovnel	(%r9), %r12d
	movl	$858, %eax                      ## imm = 0x35A
	cmovnel	8(%r9), %eax
	movl	%ecx, %r10d
	movl	%edx, %r11d
	movl	12(%r9), %r14d
	movl	$3514368, %ecx                  ## imm = 0x35A000
	cmovneq	%rbx, %rcx
	imull	%edx, %eax
	cltd
	idivl	%r12d
	movl	%eax, %r15d
	movslq	%eax, %rbx
	movq	%rcx, %rax
	orq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rbx
	jmp	LBB0_3
LBB0_1:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%r15d
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	addl	$-4096, %eax                    ## imm = 0xF000
	movl	%eax, (%rsi)
	movl	16(%r9), %eax
	imull	%r11d, %eax
	cltd
	idivl	%r12d
	movl	%eax, %ecx
	andl	$1022, %ecx                     ## imm = 0x3FE
	movl	%ecx, 4(%rsi)
	movl	20(%r9), %r15d
	movl	%r11d, %ecx
	shrl	$8, %ecx
	andl	$3, %ecx
	shrl	$6, %eax
	andl	$12, %eax
	movl	%r15d, %edx
	shrl	$4, %edx
	andl	$48, %edx
	movl	%r14d, %ebx
	shrl	$2, %ebx
	andl	$192, %ebx
	orl	%ecx, %ebx
	orl	%eax, %ebx
	orl	%edx, %ebx
	movl	%ebx, 12(%rsi)
	movq	_BT848_VSCALE_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	shll	$8, %ebx
	testl	%r8d, %r8d
	cmovel	%r8d, %ebx
	sete	%cl
	movl	%r15d, %eax
	sarl	%cl, %eax
	shll	$9, %eax
	cltd
	idivl	%r10d
	movl	$512, %ecx                      ## imm = 0x200
	subl	%eax, %ecx
	andl	$8191, %ecx                     ## imm = 0x1FFF
	orl	%ebx, %ecx
	movl	%ecx, 8(%rsi)
	movl	%r14d, 16(%rsi)
	movl	%r11d, 20(%rsi)
	movl	%r15d, 24(%rsi)
	movl	24(%r9), %eax
	movl	%eax, 36(%rsi)
	cmpq	$0, 16(%rdi)
	je	LBB0_4
## %bb.5:
	xorl	%ecx, %ecx
	cmpl	$385, %r11d                     ## imm = 0x181
	setl	%cl
	cmpl	$193, %r11d
	movl	$2, %eax
	cmovgel	%ecx, %eax
	xorl	%ecx, %ecx
	cmpl	$769, %r11d                     ## imm = 0x301
	setl	%cl
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
LBB0_6:
	movl	%eax, 28(%rsi)
	movl	%ecx, 32(%rsi)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BT848_VSCALE_INT,4,2           ## @BT848_VSCALE_INT
	.no_dead_strip	_bttv_calc_geo_old
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bttv_calc_geo_old
_bttv_calc_geo_old:                     ; @bttv_calc_geo_old
	.cfi_startproc
; %bb.0:
	ldp	w8, w9, [x5]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	ldp	x10, x11, [x0]
	mov	w12, #720
	lsl	x9, x9, #12
	mov	w13, #40960
	movk	w13, #53, lsl #16
	cmp	x10, x11
	csel	x9, x13, x9, eq
	csel	w8, w12, w8, eq
	mov	w10, #858
	ldp	w11, w12, [x5, #8]
	csel	w10, w10, w11, eq
	mul	w10, w10, w2
	sdiv	w10, w10, w8
	sxtw	x10, w10
	udiv	x9, x9, x10
	sub	w9, w9, #1, lsl #12             ; =4096
	ldp	w10, w11, [x5, #16]
	mul	w10, w10, w2
	sdiv	w8, w10, w8
	and	w10, w8, #0x3fe
Lloh0:
	adrp	x13, _BT848_VSCALE_INT@GOTPAGE
Lloh1:
	ldr	x13, [x13, _BT848_VSCALE_INT@GOTPAGEOFF]
	stp	w9, w10, [x1]
Lloh2:
	ldr	w9, [x13]
	lsl	w9, w9, #8
	cmp	w4, #0
	csel	w9, wzr, w9, eq
	cset	w10, eq
	asr	w10, w11, w10
	lsl	w10, w10, #9
	sdiv	w10, w10, w3
	mov	w13, #512
	sub	w10, w13, w10
	and	w10, w10, #0x1fff
	lsr	w8, w8, #6
	and	w8, w8, #0xc
	lsr	w13, w11, #4
	and	w13, w13, #0x30
	lsr	w14, w12, #2
	and	w14, w14, #0xc0
	bfxil	w14, w2, #8, #2
	orr	w8, w14, w8
	orr	w8, w8, w13
	orr	w9, w9, w10
	stp	w9, w8, [x1, #8]
	stp	w12, w2, [x1, #16]
	str	w11, [x1, #24]
	ldr	w8, [x5, #24]
	str	w8, [x1, #36]
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	cmp	w2, #385
	cset	w8, lt
	mov	w9, #2
	cmp	w2, #193
	csel	w8, w9, w8, lt
	cmp	w2, #769
	cset	w9, lt
	stp	w8, w9, [x1, #28]
	ret
LBB0_2:
	mov	w9, #0
	stp	w8, w9, [x1, #28]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BT848_VSCALE_INT,4,2           ; @BT848_VSCALE_INT
	.no_dead_strip	_bttv_calc_geo_old
.subsections_via_symbols
