	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vid_cap_buf_finish
_vid_cap_buf_finish:                    ## @vid_cap_buf_finish
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_vb2_v4l2_buffer
	movq	%rax, %r15
	movl	(%rbx), %edi
	callq	_vb2_get_drv_priv
	movq	%rax, %rbx
	movl	(%r15), %r14d
	movq	%rax, %rdi
	callq	_vivid_is_sdtv_cap
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	_V4L2_BUF_FLAG_TIMECODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r15)
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movq	_V4L2_STD_525_60@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%esi, %esi
	andl	(%rax,%rcx,4), %edx
	setne	%sil
	leal	25(%rsi,%rsi,4), %ecx
	jne	LBB0_2
## %bb.3:
	movq	_V4L2_TC_TYPE_25FPS@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_V4L2_TC_TYPE_30FPS@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, 32(%r15)
	movq	$0, 24(%r15)
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	movl	%edx, 8(%r15)
	movl	$2290649225, %esi               ## imm = 0x88888889
	movq	%rax, %rdx
	imulq	%rsi, %rdx
	shrq	$37, %rdx
	imull	$60, %edx, %edx
	subl	%edx, %eax
	movl	%eax, 12(%r15)
	imull	$60, %ecx, %edi
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $eax killed $eax def $rax
	imulq	%rax, %rsi
	shrq	$37, %rsi
	imull	$60, %esi, %edx
	subl	%edx, %eax
	movl	%eax, 16(%r15)
	imull	$3600, %ecx, %ecx               ## imm = 0xE10
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movzwl	%ax, %ecx
	imull	$43691, %ecx, %ecx              ## imm = 0xAAAB
	shrl	$17, %ecx
	andl	$-8, %ecx
	leal	(%rcx,%rcx,2), %ecx
	subl	%ecx, %eax
	movzwl	%ax, %eax
	movl	%eax, 20(%r15)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_FLAG_TIMECODE,4,2     ## @V4L2_BUF_FLAG_TIMECODE
	.comm	_V4L2_STD_525_60,4,2            ## @V4L2_STD_525_60
	.comm	_V4L2_TC_TYPE_30FPS,4,2         ## @V4L2_TC_TYPE_30FPS
	.comm	_V4L2_TC_TYPE_25FPS,4,2         ## @V4L2_TC_TYPE_25FPS
	.no_dead_strip	_vid_cap_buf_finish
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vid_cap_buf_finish
_vid_cap_buf_finish:                    ; @vid_cap_buf_finish
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x0
	bl	_to_vb2_v4l2_buffer
	mov	x19, x0
	ldr	w0, [x20]
	bl	_vb2_get_drv_priv
	mov	x20, x0
	ldr	w21, [x19]
	bl	_vivid_is_sdtv_cap
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _V4L2_BUF_FLAG_TIMECODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_BUF_FLAG_TIMECODE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	ldp	x8, x9, [x20]
	ldr	w8, [x8, x9, lsl #2]
Lloh3:
	adrp	x9, _V4L2_STD_525_60@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_STD_525_60@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #30
	mov	w9, #25
	csel	w8, w9, w8, eq
Lloh6:
	adrp	x9, _V4L2_TC_TYPE_30FPS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_TC_TYPE_30FPS@GOTPAGEOFF]
Lloh8:
	adrp	x10, _V4L2_TC_TYPE_25FPS@GOTPAGE
Lloh9:
	ldr	x10, [x10, _V4L2_TC_TYPE_25FPS@GOTPAGEOFF]
	csel	x9, x10, x9, eq
	ldr	w9, [x9]
	str	w9, [x19, #32]
	str	xzr, [x19, #24]
	udiv	w9, w21, w8
	mov	w10, #34953
	movk	w10, #34952, lsl #16
	umull	x11, w9, w10
	lsr	x11, x11, #37
	mov	w12, #60
	msub	w11, w11, w12, w9
	msub	w9, w9, w8, w21
	stp	w9, w11, [x19, #8]
	mul	w9, w8, w12
	udiv	w9, w21, w9
	umull	x10, w9, w10
	lsr	x10, x10, #37
	msub	w9, w10, w12, w9
	mov	w10, #3600
	mul	w8, w8, w10
	udiv	w8, w21, w8
	and	w10, w8, #0xffff
	mov	w11, #43691
	mul	w10, w10, w11
	lsr	w10, w10, #20
	mov	w11, #24
	msub	w8, w10, w11, w8
	and	w8, w8, #0xffff
	stp	w9, w8, [x19, #16]
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_FLAG_TIMECODE,4,2     ; @V4L2_BUF_FLAG_TIMECODE
	.comm	_V4L2_STD_525_60,4,2            ; @V4L2_STD_525_60
	.comm	_V4L2_TC_TYPE_30FPS,4,2         ; @V4L2_TC_TYPE_30FPS
	.comm	_V4L2_TC_TYPE_25FPS,4,2         ; @V4L2_TC_TYPE_25FPS
	.no_dead_strip	_vid_cap_buf_finish
.subsections_via_symbols
