	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function video_refresh_thread
LCPI0_0:
	.quad	0x412e848000000000              ## double 1.0E+6
LCPI0_1:
	.quad	0x0000000000000000              ## double 0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_video_refresh_thread:                  ## @video_refresh_thread
	.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	(%rdi), %rbx
	movq	$0, -48(%rbp)
	cmpl	$0, 20(%rbx)
	je	LBB0_1
LBB0_10:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r15
	movq	_REFRESH_RATE@GOTPCREL(%rip), %r12
	movq	_SHOW_MODE_NONE@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %r14
	xorpd	%xmm0, %xmm0
	ucomisd	LCPI0_1(%rip), %xmm0
	jbe	LBB0_4
	.p2align	4, 0x90
LBB0_3:
	mulsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_av_usleep
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movsd	(%r12), %xmm0                   ## xmm0 = mem[0],zero
	movsd	%xmm0, -48(%rbp)
	movq	(%rbx), %rax
	cmpq	(%r13), %rax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, 16(%rbx)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 8(%rbx)
	je	LBB0_8
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_video_refresh
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, 20(%rbx)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movsd	-48(%rbp), %xmm0                ## xmm0 = mem[0],zero
	ucomisd	LCPI0_1(%rip), %xmm0
	ja	LBB0_3
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_REFRESH_RATE,8,3               ## @REFRESH_RATE
	.comm	_SHOW_MODE_NONE,8,3             ## @SHOW_MODE_NONE
	.no_dead_strip	_video_refresh_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function video_refresh_thread
_video_refresh_thread:                  ; @video_refresh_thread
	.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
	ldr	x20, [x0]
	str	xzr, [sp, #8]
	ldr	w8, [x20, #20]
	cbz	w8, LBB0_2
LBB0_1:
	mov	w0, #0
	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
LBB0_2:
	mov	x19, x0
	movi	d0, #0000000000000000
	mov	x21, #145685290680320
	movk	x21, #16686, lsl #48
Lloh0:
	adrp	x22, _REFRESH_RATE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REFRESH_RATE@GOTPAGEOFF]
Lloh2:
	adrp	x23, _SHOW_MODE_NONE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SHOW_MODE_NONE@GOTPAGEOFF]
	fcmp	d0, #0.0
	b.le	LBB0_4
LBB0_3:
	fmov	d1, x21
	fmul	d0, d0, d1
	fcvtzs	x0, d0
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_av_usleep
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x22]
	str	d0, [sp, #8]
	ldr	x8, [x20]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	bl	_video_refresh
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20, #20]
	cbnz	w8, LBB0_1
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	d0, [sp, #8]
	fcmp	d0, #0.0
	b.gt	LBB0_3
	b	LBB0_4
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_REFRESH_RATE,8,3               ; @REFRESH_RATE
	.comm	_SHOW_MODE_NONE,8,3             ; @SHOW_MODE_NONE
	.no_dead_strip	_video_refresh_thread
.subsections_via_symbols
