	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function video_thread_loop
_video_thread_loop:                     ## @video_thread_loop
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	32(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_CMD_VIDEO_NONE@GOTPCREL(%rip), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_1:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r15d, %r15d
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	20(%rbx), %edi
	callq	_slock_lock
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%rbx)
	movl	%r15d, 12(%rbx)
	movl	%r14d, 16(%rbx)
	movl	$0, 80(%rbx)
	movaps	-112(%rbp), %xmm0
	movaps	-96(%rbp), %xmm1
	movaps	-80(%rbp), %xmm2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movups	%xmm0, (%rax)
	movups	%xmm1, 16(%rax)
	movups	%xmm2, 32(%rax)
	movl	24(%rbx), %edi
	callq	_scond_signal
	movl	20(%rbx), %edi
	callq	_slock_unlock
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	20(%rbx), %edi
	callq	_slock_lock
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx), %rax
	cmpq	(%r12), %rax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	cmpl	$0, 80(%rbx)
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	20(%rbx), %esi
	movl	140(%rbx), %edi
	callq	_scond_wait
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	80(%rbx), %r14d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %r14d
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	136(%rbx), %eax
	movl	%eax, -48(%rbp)
	movl	20(%rbx), %edi
	callq	_slock_unlock
	movq	%rbx, %rdi
	leaq	-48(%rbp), %rsi
	callq	_video_thread_handle_packet
	testq	%rax, %rax
	jne	LBB0_38
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movl	84(%rbx), %edi
	callq	_slock_lock
	movq	%rbx, %rdi
	callq	_thread_update_driver_state
	movq	128(%rbx), %rax
	movl	$0, %r13d
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, (%rax)
	movl	$0, %r13d
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	-60(%rbp), %r14
	movq	%r14, %rdi
	callq	_video_driver_build_info
	movq	128(%rbx), %r10
	movl	120(%rbx), %edi
	movl	112(%rbx), %esi
	movl	108(%rbx), %edx
	movl	104(%rbx), %ecx
	movl	100(%rbx), %r8d
	movl	96(%rbx), %r9d
	movq	88(%rbx), %rax
	movq	(%rax), %r11
	testq	%r11, %r11
	cmoveq	%r11, %rax
	pushq	%r14
	pushq	%rax
	callq	*(%r10)
	addq	$16, %rsp
	movl	%eax, %r13d
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	84(%rbx), %edi
	callq	_slock_unlock
	movq	128(%rbx), %rax
	movl	$1, %r14d
	testq	%rax, %rax
	je	LBB0_1
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	32(%rax), %rcx
	xorl	%r15d, %r15d
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	testl	%r13d, %r13d
	je	LBB0_27
## %bb.18:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	120(%rbx), %edi
	callq	*%rcx
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	128(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_21
	jmp	LBB0_2
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	24(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=1
	testl	%r13d, %r13d
	je	LBB0_29
## %bb.23:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	120(%rbx), %edi
	callq	*%rcx
	xorl	%r15d, %r15d
	testq	%rax, %rax
	setne	%r15b
	movq	128(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_3
LBB0_24:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_32
## %bb.25:                              ##   in Loop: Header=BB0_4 Depth=1
	testl	%r13d, %r13d
	je	LBB0_30
## %bb.26:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	120(%rbx), %edi
	callq	*%rcx
	xorl	%r14d, %r14d
	testq	%rax, %rax
	setne	%r14b
	movq	128(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_36
	jmp	LBB0_3
LBB0_27:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 24(%rax)
	je	LBB0_33
## %bb.28:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_29:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r15d, %r15d
	cmpq	$0, 16(%rax)
	je	LBB0_32
LBB0_30:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_36
LBB0_32:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %r14d
LBB0_36:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.37:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	120(%rbx), %edi
	leaq	-112(%rbp), %rsi
	callq	*%rcx
	jmp	LBB0_3
LBB0_33:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r15d, %r15d
	cmpq	$0, 16(%rax)
	je	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r14d, %r14d
	jmp	LBB0_36
LBB0_35:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %r14d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_36
LBB0_38:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_VIDEO_NONE,8,3             ## @CMD_VIDEO_NONE
	.no_dead_strip	_video_thread_loop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function video_thread_loop
_video_thread_loop:                     ; @video_thread_loop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	add	x21, x0, #32
Lloh0:
	adrp	x22, _CMD_VIDEO_NONE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CMD_VIDEO_NONE@GOTPAGEOFF]
	b	LBB0_5
LBB0_1:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w23, #0
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w24, #0
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w20, #1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #20]
	bl	_slock_lock
	stp	w23, w24, [x19, #8]
	str	w20, [x19, #16]
	str	wzr, [x19, #80]
	ldp	q0, q1, [sp, #16]
	stp	q0, q1, [x21]
	ldr	q0, [sp, #48]
	str	q0, [x21, #32]
	ldr	w0, [x19, #24]
	bl	_scond_signal
	ldr	w0, [x19, #20]
	bl	_slock_unlock
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w0, [x19, #20]
	bl	_slock_lock
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x19, #80]
	cbnz	w8, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w0, [x19, #140]
	ldr	w1, [x19, #20]
	bl	_scond_wait
	b	LBB0_6
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w20, [x19, #80]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w20, #1
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #136]
	stur	w8, [x29, #-52]
	ldr	w0, [x19, #20]
	bl	_slock_unlock
	sub	x1, x29, #52
	mov	x0, x19
	bl	_video_thread_handle_packet
	cbnz	x0, LBB0_39
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	cbz	w20, LBB0_5
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #32]
	str	q0, [sp, #16]
	ldr	w0, [x19, #84]
	bl	_slock_lock
	mov	x0, x19
	bl	_thread_update_driver_state
	ldr	x8, [x19, #128]
	cbz	x8, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #12
	bl	_video_driver_build_info
	ldr	x8, [x19, #128]
	ldr	x8, [x8]
	ldr	w0, [x19, #120]
	ldp	w2, w1, [x19, #108]
	ldp	w4, w3, [x19, #100]
	ldr	w5, [x19, #96]
	ldr	x9, [x19, #88]
	ldr	x10, [x9]
	cmp	x10, #0
	csel	x6, xzr, x9, eq
	add	x7, sp, #12
	blr	x8
	mov	x20, x0
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w20, #0
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #84]
	bl	_slock_unlock
	ldr	x8, [x19, #128]
	cbz	x8, LBB0_1
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x8, #32]
	cbz	x9, LBB0_25
; %bb.19:                               ;   in Loop: Header=BB0_5 Depth=1
	cbz	w20, LBB0_30
; %bb.20:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #120]
	blr	x9
	cmp	x0, #0
	cset	w23, ne
	ldr	x8, [x19, #128]
	cbz	x8, LBB0_2
; %bb.21:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_26
LBB0_22:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	w20, LBB0_32
; %bb.23:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #120]
	blr	x9
	cmp	x0, #0
	cset	w24, ne
	ldr	x8, [x19, #128]
	cbz	x8, LBB0_3
; %bb.24:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x8, #16]
	cbnz	x9, LBB0_27
	b	LBB0_34
LBB0_25:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w23, #0
	ldr	x9, [x8, #24]
	cbnz	x9, LBB0_22
LBB0_26:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w24, #0
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_34
LBB0_27:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	w20, LBB0_33
; %bb.28:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #120]
	blr	x9
	cmp	x0, #0
	cset	w20, ne
	ldr	x8, [x19, #128]
	cbz	x8, LBB0_4
; %bb.29:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_35
	b	LBB0_4
LBB0_30:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_36
; %bb.31:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w23, #0
LBB0_32:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w24, #0
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_34
LBB0_33:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w20, #0
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_35
	b	LBB0_4
LBB0_34:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w20, #1
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_4
LBB0_35:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #120]
	add	x1, sp, #16
	blr	x8
	b	LBB0_4
LBB0_36:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w24, #0
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_38
; %bb.37:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x24
	mov	w20, #0
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_35
	b	LBB0_4
LBB0_38:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w20, #1
	mov	x23, x24
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_35
	b	LBB0_4
LBB0_39:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_VIDEO_NONE,8,3             ; @CMD_VIDEO_NONE
	.no_dead_strip	_video_thread_loop
.subsections_via_symbols
