	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function video_thread_frame
_video_thread_frame:                    ## @video_thread_frame
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movl	%r8d, %r15d
	movl	%ecx, %r12d
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r13
	cmpq	$0, 64(%rdi)
	je	LBB0_4
## %bb.1:
	movq	%r13, %rdi
	callq	_thread_update_driver_state
	movq	104(%r13), %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.2:
	movq	(%rcx), %r11
	testq	%r11, %r11
	je	LBB0_20
## %bb.3:
	movl	96(%r13), %edi
	movq	%rbx, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	movl	%r14d, %r9d
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%r11                           ## TAILCALL
LBB0_4:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	movq	24(%rbp), %r12
	movq	16(%rbp), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	56(%r13), %r15
	movl	8(%r13), %edi
	callq	_slock_lock
	cmpl	$0, 84(%r13)
	je	LBB0_5
LBB0_9:
	cmpl	$0, 24(%r13)
	je	LBB0_10
## %bb.18:
	incl	12(%r13)
	jmp	LBB0_19
LBB0_5:
	movl	$1000000, %eax                  ## imm = 0xF4240
	xorl	%edx, %edx
	idivl	(%r12)
	movl	%eax, %edi
	callq	_roundf
	movslq	%eax, %r12
	addq	(%r13), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 24(%r13)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	callq	_cpu_features_get_time_usec
	movq	%r12, %rdx
	subq	%rax, %rdx
	testq	%rdx, %rdx
	jle	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	8(%r13), %esi
	movl	20(%r13), %edi
	callq	_scond_wait_timeout
	testl	%eax, %eax
	jne	LBB0_6
	jmp	LBB0_9
LBB0_10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	(,%rax,4), %r12d
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.11:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_14
## %bb.12:
	movl	%r14d, %eax
	movl	%r12d, %ecx
	shlq	$2, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	shlq	$2, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	addq	-88(%rbp), %rbx                 ## 8-byte Folded Reload
	addq	-80(%rbp), %r15                 ## 8-byte Folded Reload
	decl	%r14d
	jne	LBB0_13
LBB0_14:
	movl	$1, 24(%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 28(%r13)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 32(%r13)
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 48(%r13)
	movl	%r12d, 36(%r13)
	movq	40(%r13), %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_16
## %bb.15:
	movl	$8, %edx
	callq	_strlcpy
	jmp	LBB0_17
LBB0_16:
	movb	$0, (%rdi)
LBB0_17:
	movl	80(%r13), %edi
	callq	_scond_signal
	incl	16(%r13)
LBB0_19:
	movl	8(%r13), %edi
	callq	_slock_unlock
	xorl	%eax, %eax
	callq	_cpu_features_get_time_usec
	movq	%rax, (%r13)
	movl	$1, %eax
LBB0_20:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_video_thread_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function video_thread_frame
_video_thread_frame:                    ; @video_thread_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x27, x7
	mov	x22, x6
	mov	x25, x5
	mov	x21, x4
	mov	x20, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	ldr	x8, [x0, #64]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_thread_update_driver_state
	ldr	x8, [x19, #104]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w0, [x19, #96]
	mov	x1, x24
	mov	x2, x23
	mov	x3, x20
	mov	x4, x21
	mov	x5, x25
	mov	x6, x22
	mov	x7, x27
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	br	x8
LBB0_4:
	mov	w0, #0
	b	LBB0_21
LBB0_5:
	ldr	x26, [x19, #56]
	ldr	w0, [x19, #8]
	bl	_slock_lock
	ldr	w8, [x19, #84]
	cbz	w8, LBB0_8
LBB0_6:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_12
; %bb.7:
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	b	LBB0_20
LBB0_8:
	ldr	w8, [x27]
	mov	w9, #16960
	movk	w9, #15, lsl #16
	sdiv	w0, w9, w8
	bl	_roundf
	ldr	x8, [x19]
	add	x27, x8, w0, sxtw
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	bl	_cpu_features_get_time_usec
	sub	x2, x27, x0
	cmp	x2, #1
	b.lt	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [x19, #20]
	ldr	w1, [x19, #8]
	bl	_scond_wait_timeout
	cbnz	w0, LBB0_9
	b	LBB0_6
LBB0_12:
	str	x22, [sp, #8]                   ; 8-byte Folded Spill
	lsl	w27, w23, #2
	cbz	x24, LBB0_16
; %bb.13:
	cbz	w20, LBB0_16
; %bb.14:
	mov	w8, w25
	lsl	x25, x8, #2
	lsl	x28, x27, #2
	mov	x22, x20
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x26
	mov	x1, x24
	mov	x2, x27
	bl	_memcpy
	add	x24, x24, x25
	add	x26, x26, x28
	subs	w22, w22, #1
	b.ne	LBB0_15
LBB0_16:
	mov	w8, #1
	stp	w8, w23, [x19, #24]
	str	w21, [x19, #48]
	stp	w20, w27, [x19, #32]
	ldr	x0, [x19, #40]
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	cbz	x1, LBB0_18
; %bb.17:
	mov	w2, #8
	bl	_strlcpy
	b	LBB0_19
LBB0_18:
	strb	wzr, [x0]
LBB0_19:
	ldr	w0, [x19, #80]
	bl	_scond_signal
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
LBB0_20:
	ldr	w0, [x19, #8]
	bl	_slock_unlock
	bl	_cpu_features_get_time_usec
	str	x0, [x19]
	mov	w0, #1
LBB0_21:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_video_thread_frame
.subsections_via_symbols
