	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omap_vout_calculate_vrfb_offset ## -- Begin function omap_vout_calculate_vrfb_offset
	.p2align	4, 0x90
_omap_vout_calculate_vrfb_offset:       ## @omap_vout_calculate_vrfb_offset
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %r13d
	callq	_calc_rotation
	movl	%eax, %r14d
	movq	_V4L2_PIX_FMT_YUYV@GOTPCREL(%rip), %rcx
	movq	32(%rbx), %rax
	cmpq	%rax, (%rcx)
	je	LBB0_4
## %bb.1:
	movq	_V4L2_PIX_FMT_UYVY@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_4
## %bb.2:
	movq	_V4L2_PIX_FMT_RGB32@GOTPCREL(%rip), %rcx
	movl	$4, %r15d
	movl	$1, %r12d
	cmpq	%rax, (%rcx)
	je	LBB0_5
## %bb.3:
	movq	_V4L2_PIX_FMT_RGB24@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	%rax, (%rcx)
	sete	%r15b
	orl	$2, %r15d
	jmp	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	callq	_is_rotation_enabled
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	testq	%rax, %rax
	setne	%cl
	sete	%dl
	movl	$2, %r12d
	subl	%edx, %r12d
	leal	(%rcx,%rcx), %r15d
	addl	$2, %r15d
LBB0_5:
	movl	%r15d, 8(%rbx)
	movl	%r12d, 12(%rbx)
	movq	%rbx, %rdi
	callq	_is_rotation_enabled
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	48(%rbx), %eax
	addl	52(%rbx), %eax
	movl	40(%rbx), %r8d
	subl	%eax, %r8d
	movl	44(%rbx), %edi
	movl	56(%rbx), %eax
	addl	60(%rbx), %eax
	subl	%eax, %edi
	movq	_MAX_PIXELS_PER_LINE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	leaq	44(%rbx), %rax
	xorl	%r8d, %r8d
	xorl	%edi, %edi
LBB0_8:
	movl	(%rax), %ecx
	movl	%ecx, 16(%rbx)
	addl	$-128, %r14d
	cmpl	$3, %r14d
	ja	LBB0_12
## %bb.9:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r14,4), %rdx
	addq	%rax, %rdx
	jmpq	*%rdx
LBB0_10:
	movq	24(%rbx), %rax
	movl	4(%rax), %r8d
	imull	(%rax), %r8d
	movzbl	%r15b, %eax
	divb	%r12b
	movzbl	%al, %r9d
	imull	%ecx, %edi
	movl	52(%rbx), %esi
	testl	%r13d, %r13d
	je	LBB0_19
## %bb.11:
	movl	56(%rbx), %eax
	cltd
	idivl	%r12d
	decl	%eax
	imull	%r15d, %ecx
	imull	%eax, %ecx
	addl	%edi, %esi
	imull	%r9d, %esi
	addl	%r8d, %esi
	addl	%ecx, %esi
	jmp	LBB0_25
LBB0_12:
	imull	%r15d, %ecx
	imull	52(%rbx), %ecx
	movl	%ecx, %eax
	cltd
	idivl	%r12d
	movl	%eax, %ecx
	movl	60(%rbx), %eax
	imull	%r15d, %eax
	cltd
	idivl	%r12d
	movl	%eax, %edi
	addl	%ecx, %edi
	movl	56(%rbx), %eax
	cltd
	idivl	%r12d
	movl	%eax, %esi
	decl	%esi
	imull	%r15d, %esi
	addl	%edi, %esi
	jmp	LBB0_25
LBB0_13:
	movq	_MAX_PIXELS_PER_LINE@GOTPCREL(%rip), %rax
	movq	24(%rbx), %rdx
	movl	8(%rdx), %esi
	imull	(%rax), %esi
	imull	4(%rdx), %esi
	movzbl	%r15b, %eax
	divb	%r12b
	movzbl	%al, %edi
	testl	%r13d, %r13d
	je	LBB0_20
## %bb.14:
	imull	60(%rbx), %edi
	imull	%r15d, %r8d
	movl	56(%rbx), %eax
	cltd
	idivl	%r12d
	decl	%eax
	imull	%r15d, %eax
	addl	%edi, %eax
	imull	%ecx, %eax
	addl	%r8d, %esi
	addl	%eax, %esi
	jmp	LBB0_25
LBB0_15:
	movq	_MAX_PIXELS_PER_LINE@GOTPCREL(%rip), %rax
	movq	24(%rbx), %rdx
	movl	(%rdx), %r9d
	imull	(%rax), %r9d
	addl	8(%rdx), %r9d
	imull	4(%rdx), %r9d
	testl	%r13d, %r13d
	je	LBB0_21
## %bb.16:
	movl	%edi, %eax
	cltd
	idivl	%r12d
	movl	48(%rbx), %edx
	leal	(%r8,%rdx), %esi
	decl	%esi
	imull	%ecx, %esi
	addl	%eax, %esi
	jmp	LBB0_22
LBB0_17:
	movl	52(%rbx), %edi
	testl	%r13d, %r13d
	je	LBB0_23
## %bb.18:
	movl	48(%rbx), %esi
	movl	60(%rbx), %eax
	cltd
	idivl	%r12d
	addl	%edi, %esi
	decl	%esi
	imull	%ecx, %esi
	addl	%eax, %esi
	jmp	LBB0_24
LBB0_19:
	addl	%edi, %esi
	imull	%r9d, %esi
	addl	%r8d, %esi
	jmp	LBB0_25
LBB0_20:
	imull	%edi, %ecx
	imull	60(%rbx), %ecx
	imull	%r15d, %r8d
	addl	%r8d, %esi
	addl	%ecx, %esi
	jmp	LBB0_25
LBB0_21:
	imull	%r8d, %ecx
	movl	%edi, %eax
	cltd
	idivl	%r12d
	movl	%eax, %esi
	addl	%ecx, %esi
LBB0_22:
	imull	%r15d, %esi
	addl	%r9d, %esi
	jmp	LBB0_25
LBB0_23:
	imull	%ecx, %edi
	movl	60(%rbx), %eax
	cltd
	idivl	%r12d
	movl	%eax, %esi
	addl	%edi, %esi
LBB0_24:
	imull	%r15d, %esi
LBB0_25:
	movl	%esi, 4(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_13
	.long	L0_0_set_15
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_V4L2_PIX_FMT_YUYV,8,3          ## @V4L2_PIX_FMT_YUYV
	.comm	_V4L2_PIX_FMT_UYVY,8,3          ## @V4L2_PIX_FMT_UYVY
	.comm	_V4L2_PIX_FMT_RGB32,8,3         ## @V4L2_PIX_FMT_RGB32
	.comm	_V4L2_PIX_FMT_RGB24,8,3         ## @V4L2_PIX_FMT_RGB24
	.comm	_MAX_PIXELS_PER_LINE,4,2        ## @MAX_PIXELS_PER_LINE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omap_vout_calculate_vrfb_offset ; -- Begin function omap_vout_calculate_vrfb_offset
	.p2align	2
_omap_vout_calculate_vrfb_offset:       ; @omap_vout_calculate_vrfb_offset
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	w22, [x0]
	bl	_calc_rotation
	mov	x20, x0
Lloh0:
	adrp	x8, _V4L2_PIX_FMT_YUYV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_PIX_FMT_YUYV@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	ldr	x8, [x19, #32]
Lloh3:
	adrp	x10, _V4L2_PIX_FMT_UYVY@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_PIX_FMT_UYVY@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x8
	ccmp	x10, x8, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_is_rotation_enabled
	cmp	x0, #0
	mov	w8, #1
	cinc	w23, w8, ne
	mov	w8, #4
	mov	w9, #2
	csel	w21, w9, w8, eq
	b	LBB0_6
LBB0_2:
Lloh6:
	adrp	x9, _V4L2_PIX_FMT_RGB32@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_PIX_FMT_RGB32@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	mov	w21, #4
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x9, _V4L2_PIX_FMT_RGB24@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_PIX_FMT_RGB24@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	mov	w8, #2
	cinc	w21, w8, eq
LBB0_5:
	mov	w23, #1
LBB0_6:
	stp	w21, w23, [x19, #8]
	mov	x0, x19
	bl	_is_rotation_enabled
	cbz	x0, LBB0_8
; %bb.7:
	ldp	w8, w9, [x19, #48]
	ldp	w10, w11, [x19, #40]
	add	w8, w8, w9
	sub	w9, w10, w8
	ldp	w8, w10, [x19, #56]
	add	w8, w8, w10
	sub	w10, w11, w8
Lloh12:
	adrp	x8, _MAX_PIXELS_PER_LINE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MAX_PIXELS_PER_LINE@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
	mov	w9, #0
	mov	w10, #0
	add	x8, x19, #44
LBB0_9:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	sub	w11, w20, #128
	cmp	w11, #3
	b.hi	LBB0_13
; %bb.10:
Lloh14:
	adrp	x12, lJTI0_0@PAGE
Lloh15:
	add	x12, x12, lJTI0_0@PAGEOFF
	adr	x13, LBB0_11
	ldrb	w14, [x12, x11]
	add	x13, x13, x14, lsl #2
	br	x13
LBB0_11:
	ldr	x9, [x19, #24]
	ldp	w11, w9, [x9]
	mul	w9, w9, w11
	and	w13, w21, #0xff
	and	w14, w23, #0xff
	mul	w11, w8, w10
	ldr	w12, [x19, #52]
	udiv	w10, w13, w14
	cbz	w22, LBB0_20
; %bb.12:
	ldr	w13, [x19, #56]
	sdiv	w13, w13, w23
	sub	w13, w13, #1
	mul	w8, w8, w21
	add	w11, w12, w11
	madd	w9, w11, w10, w9
	madd	w8, w8, w13, w9
	b	LBB0_25
LBB0_13:
	mul	w8, w8, w21
	ldp	w9, w10, [x19, #52]
	mul	w8, w8, w9
	sdiv	w8, w8, w23
	ldr	w9, [x19, #60]
	mul	w9, w9, w21
	sdiv	w9, w9, w23
	add	w8, w9, w8
	sdiv	w9, w10, w23
	sub	w9, w9, #1
	madd	w8, w9, w21, w8
	b	LBB0_25
LBB0_14:
Lloh16:
	adrp	x10, _MAX_PIXELS_PER_LINE@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MAX_PIXELS_PER_LINE@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	ldr	x11, [x19, #24]
	ldp	w11, w12, [x11, #4]
	mul	w10, w12, w10
	mul	w10, w10, w11
	and	w11, w21, #0xff
	and	w12, w23, #0xff
	udiv	w11, w11, w12
	cbz	w22, LBB0_21
; %bb.15:
	ldp	w13, w12, [x19, #56]
	mul	w11, w12, w11
	sdiv	w12, w13, w23
	sub	w12, w12, #1
	madd	w11, w12, w21, w11
	madd	w9, w9, w21, w10
	madd	w8, w11, w8, w9
	b	LBB0_25
LBB0_16:
Lloh19:
	adrp	x11, _MAX_PIXELS_PER_LINE@GOTPAGE
Lloh20:
	ldr	x11, [x11, _MAX_PIXELS_PER_LINE@GOTPAGEOFF]
Lloh21:
	ldr	w11, [x11]
	ldr	x12, [x19, #24]
	ldp	w13, w14, [x12]
	ldr	w12, [x12, #8]
	madd	w11, w13, w11, w12
	mul	w11, w11, w14
	sdiv	w10, w10, w23
	cbz	w22, LBB0_22
; %bb.17:
	ldr	w12, [x19, #48]
	add	w9, w9, w12
	sub	w9, w9, #1
	madd	w8, w9, w8, w10
	madd	w8, w8, w21, w11
	b	LBB0_25
LBB0_18:
	ldr	w9, [x19, #52]
	cbz	w22, LBB0_23
; %bb.19:
	ldr	w10, [x19, #60]
	sdiv	w10, w10, w23
	ldr	w11, [x19, #48]
	add	w9, w9, w11
	sub	w9, w9, #1
	b	LBB0_24
LBB0_20:
	add	w8, w12, w11
	madd	w8, w8, w10, w9
	b	LBB0_25
LBB0_21:
	mul	w8, w8, w11
	ldr	w11, [x19, #60]
	madd	w9, w9, w21, w10
	madd	w8, w8, w11, w9
	b	LBB0_25
LBB0_22:
	madd	w8, w8, w9, w10
	madd	w8, w8, w21, w11
	b	LBB0_25
LBB0_23:
	ldr	w10, [x19, #60]
	sdiv	w10, w10, w23
LBB0_24:
	madd	w8, w9, w8, w10
	mul	w8, w8, w21
LBB0_25:
	str	w8, [x19, #4]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_14-LBB0_11)>>2
	.byte	(LBB0_16-LBB0_11)>>2
	.byte	(LBB0_18-LBB0_11)>>2
                                        ; -- End function
	.comm	_V4L2_PIX_FMT_YUYV,8,3          ; @V4L2_PIX_FMT_YUYV
	.comm	_V4L2_PIX_FMT_UYVY,8,3          ; @V4L2_PIX_FMT_UYVY
	.comm	_V4L2_PIX_FMT_RGB32,8,3         ; @V4L2_PIX_FMT_RGB32
	.comm	_V4L2_PIX_FMT_RGB24,8,3         ; @V4L2_PIX_FMT_RGB24
	.comm	_MAX_PIXELS_PER_LINE,4,2        ; @MAX_PIXELS_PER_LINE
.subsections_via_symbols
