	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vivid_thread_vid_cap
_vivid_thread_vid_cap:                  ## @vivid_thread_vid_cap
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	xorl	%eax, %eax
	callq	_set_freezable
	movq	$0, (%r12)
	movl	$0, 8(%r12)
	movq	_jiffies@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	%rax, 16(%r12)
	xorl	%eax, %eax
	callq	_ktime_get_ns
	movl	%eax, 24(%r12)
	movq	%r12, %rdi
	callq	_vivid_cap_update_frame_period
	xorl	%eax, %eax
	callq	_try_to_freeze
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testq	%rax, %rax
	je	LBB0_1
LBB0_8:
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_dprintk
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	40(%r12), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, 16(%r12)
	movl	%r13d, (%r12)
	movl	%r13d, %eax
	xorl	%r13d, %r13d
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_jiffies@GOTPCREL(%rip), %r14
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	addl	%r13d, %eax
	movl	%eax, %esi
	subl	4(%r12), %esi
	movl	%eax, 4(%r12)
	movq	%rax, %rcx
	subq	64(%r12), %rcx
	movq	%rcx, 72(%r12)
	subq	48(%r12), %rax
	movq	%rax, 56(%r12)
	movq	%r12, %rdi
	callq	_vivid_thread_vid_cap_tick
	incl	%r13d
	imull	%ebx, %r13d
	movq	(%r14), %r14
	subq	16(%r12), %r14
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	_HZ@GOTPCREL(%rip), %rax
	imull	(%rax), %r13d
	movl	%r15d, %ebx
	shrl	%ebx
	addl	%r13d, %ebx
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_do_div
	cmpq	%r14, %rbx
	cmovbl	%r14d, %ebx
	subl	%r14d, %ebx
	movl	$1, %eax
	cmovel	%eax, %ebx
	movl	%ebx, %edi
	movq	_jiffies@GOTPCREL(%rip), %rbx
	callq	_schedule_timeout_interruptible
	xorl	%eax, %eax
	callq	_try_to_freeze
	xorl	%eax, %eax
	callq	_kthread_should_stop
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rax, %rax
	jne	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	callq	_mutex_lock
	movq	(%rbx), %rbx
	cmpl	$0, 8(%r12)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, 16(%r12)
	movl	4(%r12), %eax
	incl	%eax
	movl	%eax, (%r12)
	movl	$0, 4(%r12)
	imull	28(%r12), %eax
	addl	%eax, 24(%r12)
	movq	%r12, %rdi
	callq	_vivid_cap_update_frame_period
	movl	$0, 8(%r12)
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	84(%r12), %r15d
	movq	32(%r12), %rax
	movq	_V4L2_FIELD_ALTERNATE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	shll	%cl, %r15d
	movl	80(%r12), %edx
	movq	%rbx, %r14
	subq	16(%r12), %r14
	movl	%r14d, %eax
	imull	%r15d, %eax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	imull	%edx, %esi
	movl	%esi, %r13d
	shrl	%r13d
	addl	%eax, %r13d
	movl	%r13d, %edi
	callq	_do_div
	movq	_JIFFIES_RESYNC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	ja	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Video Capture Thread Start\n"

	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_V4L2_FIELD_ALTERNATE,8,3       ## @V4L2_FIELD_ALTERNATE
	.comm	_HZ,4,2                         ## @HZ
	.comm	_JIFFIES_RESYNC,8,3             ## @JIFFIES_RESYNC
L_.str.1:                               ## @.str.1
	.asciz	"Video Capture Thread End\n"

	.no_dead_strip	_vivid_thread_vid_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vivid_thread_vid_cap
_vivid_thread_vid_cap:                  ; @vivid_thread_vid_cap
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x0
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	bl	_set_freezable
	str	xzr, [x19]
	str	wzr, [x19, #8]
Lloh2:
	adrp	x23, _jiffies@GOTPAGE
Lloh3:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [x19, #16]
	bl	_ktime_get_ns
	str	w0, [x19, #24]
	mov	x0, x19
	bl	_vivid_cap_update_frame_period
	bl	_try_to_freeze
	bl	_kthread_should_stop
	cbz	x0, LBB0_2
LBB0_1:
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w1, #1
	bl	_dprintk
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_2:
	add	x20, x19, #40
Lloh6:
	adrp	x25, _HZ@GOTPAGE
Lloh7:
	ldr	x25, [x25, _HZ@GOTPAGEOFF]
Lloh8:
	adrp	x26, _JIFFIES_RESYNC@GOTPAGE
Lloh9:
	ldr	x26, [x26, _JIFFIES_RESYNC@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	x28, [x19, #16]
	str	w22, [x19]
	mov	x8, x22
	mov	w22, #0
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x19, #4]
	add	w8, w8, w22
	sub	w1, w8, w9
	str	w8, [x19, #4]
	ldr	x9, [x19, #64]
	sub	x9, x8, x9
	str	x9, [x19, #72]
	ldr	x9, [x19, #48]
	sub	x8, x8, x9
	str	x8, [x19, #56]
	mov	x0, x19
	bl	_vivid_thread_vid_cap_tick
	madd	w22, w27, w22, w27
	ldr	x8, [x23]
	ldr	x9, [x19, #16]
	sub	x24, x8, x9
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w8, [x25]
	mul	w8, w22, w8
	add	w22, w8, w21, lsr #1
	mov	x0, x22
	mov	x1, x21
	bl	_do_div
	cmp	x22, x24
	csel	w8, w24, w22, lo
	subs	w8, w8, w24
	csinc	w0, w8, wzr, ne
	bl	_schedule_timeout_interruptible
	bl	_try_to_freeze
	bl	_kthread_should_stop
	cbnz	x0, LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_mutex_lock
	ldr	x28, [x23]
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	x28, [x19, #16]
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	stp	w8, wzr, [x19]
	ldp	w10, w9, [x19, #24]
	madd	w8, w9, w8, w10
	str	w8, [x19, #24]
	mov	x0, x19
	bl	_vivid_cap_update_frame_period
	str	wzr, [x19, #8]
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldp	w27, w8, [x19, #80]
	ldr	x9, [x19, #32]
Lloh10:
	adrp	x10, _V4L2_FIELD_ALTERNATE@GOTPAGE
Lloh11:
	ldr	x10, [x10, _V4L2_FIELD_ALTERNATE@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x9, x10
	cset	w9, eq
	lsl	w21, w8, w9
	ldr	x8, [x19, #16]
	sub	x24, x28, x8
	mul	w8, w21, w24
	ldr	w9, [x25]
	mul	w1, w9, w27
	add	w22, w8, w1, lsr #1
	mov	x0, x22
	bl	_do_div
	ldr	x8, [x26]
	cmp	x24, x8
	b.hi	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Video Capture Thread Start\n"

	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_V4L2_FIELD_ALTERNATE,8,3       ; @V4L2_FIELD_ALTERNATE
	.comm	_HZ,4,2                         ; @HZ
	.comm	_JIFFIES_RESYNC,8,3             ; @JIFFIES_RESYNC
l_.str.1:                               ; @.str.1
	.asciz	"Video Capture Thread End\n"

	.no_dead_strip	_vivid_thread_vid_cap
.subsections_via_symbols
