	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function video_thread_init
LCPI0_0:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_video_thread_init:                     ## @video_thread_init
	.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	%r8, %r13
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_CMD_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	$0, -44(%rbp)
	xorl	%eax, %eax
	callq	_slock_new
	movq	%rax, 104(%rbx)
	xorl	%eax, %eax
	callq	_slock_new
	movq	%rax, 96(%rbx)
	xorl	%eax, %eax
	callq	_slock_new
	movq	%rax, 48(%rbx)
	xorl	%eax, %eax
	callq	_scond_new
	movq	%rax, 88(%rbx)
	xorl	%eax, %eax
	callq	_scond_new
	movq	%rax, 80(%rbx)
	movq	%r14, 72(%rbx)
	xorl	%r14d, %r14d
	movq	%r13, (%rbx)
	movq	%r15, 56(%rbx)
	movq	%r12, 64(%rbx)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [1,1,1,1]
	movups	%xmm0, 8(%rbx)
	movq	_RARCH_SCALE_BASE@GOTPCREL(%rip), %rax
	imulq	(%rax), %r15
	imulq	%r15, %r15
	shlq	$2, %r15
	movq	%r15, %rdi
	callq	_malloc
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	callq	_memset
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_cpu_features_get_time_usec
	movl	%eax, 36(%rbx)
	movq	_video_thread_loop@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_sthread_create
	movl	%eax, 32(%rbx)
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_video_thread_send_and_wait_user_to_thread
	movq	_video_thread_send_and_wait_user_to_thread@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rbx)
	movl	-48(%rbp), %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_INIT,4,2                   ## @CMD_INIT
	.comm	_RARCH_SCALE_BASE,8,3           ## @RARCH_SCALE_BASE
	.comm	_video_thread_loop,4,2          ## @video_thread_loop
	.no_dead_strip	_video_thread_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function video_thread_init
_video_thread_init:                     ; @video_thread_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _CMD_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	bl	_slock_new
	str	x0, [x19, #104]
	bl	_slock_new
	str	x0, [x19, #96]
	bl	_slock_new
	str	x0, [x19, #48]
	bl	_scond_new
	str	x0, [x19, #88]
	bl	_scond_new
	stp	x21, x0, [x19, #72]
	str	x20, [x19]
	stp	x23, x22, [x19, #56]
	movi.4s	v0, #1
	stur	q0, [x19, #8]
Lloh3:
	adrp	x8, _RARCH_SCALE_BASE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RARCH_SCALE_BASE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	mul	x8, x8, x23
	mul	x8, x8, x8
	lsl	x20, x8, #2
	mov	x0, x20
	bl	_malloc
	str	x0, [x19, #40]
	cbz	x0, LBB0_3
; %bb.1:
	mov	w1, #128
	mov	x2, x20
	bl	_memset
	bl	_cpu_features_get_time_usec
	str	w0, [x19, #36]
Lloh6:
	adrp	x8, _video_thread_loop@GOTPAGE
Lloh7:
	ldr	x8, [x8, _video_thread_loop@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_sthread_create
	str	w0, [x19, #32]
	cbz	w0, LBB0_3
; %bb.2:
	add	x1, sp, #8
	mov	x0, x19
	bl	_video_thread_send_and_wait_user_to_thread
Lloh9:
	adrp	x8, _video_thread_send_and_wait_user_to_thread@GOTPAGE
Lloh10:
	ldr	x8, [x8, _video_thread_send_and_wait_user_to_thread@GOTPAGEOFF]
	str	x8, [x19, #24]
	ldr	w0, [sp, #8]
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_INIT,4,2                   ; @CMD_INIT
	.comm	_RARCH_SCALE_BASE,8,3           ; @RARCH_SCALE_BASE
	.comm	_video_thread_loop,4,2          ; @video_thread_loop
	.no_dead_strip	_video_thread_init
.subsections_via_symbols
