	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __VIRetraceHandler
___VIRetraceHandler:                    ## @__VIRetraceHandler
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	__viReg@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	96(%rcx), %edx
	xorl	%eax, %eax
	testl	$32768, %edx                    ## imm = 0x8000
	je	LBB0_2
## %bb.1:
	andl	$-32769, %edx                   ## imm = 0xFFFF7FFF
	movl	%edx, 96(%rcx)
	movl	$1, %eax
LBB0_2:
	movl	104(%rcx), %edx
	testl	$32768, %edx                    ## imm = 0x8000
	je	LBB0_4
## %bb.3:
	andl	$-32769, %edx                   ## imm = 0xFFFF7FFF
	movl	%edx, 104(%rcx)
	orl	$2, %eax
LBB0_4:
	movl	112(%rcx), %edx
	testl	$32768, %edx                    ## imm = 0x8000
	je	LBB0_6
## %bb.5:
	andl	$-32769, %edx                   ## imm = 0xFFFF7FFF
	movl	%edx, 112(%rcx)
	orl	$4, %eax
LBB0_6:
	movl	120(%rcx), %edx
	testl	$32768, %edx                    ## imm = 0x8000
	je	LBB0_8
## %bb.7:
	andl	$-32769, %edx                   ## imm = 0xFFFF7FFF
	movl	%edx, 120(%rcx)
	orl	$8, %eax
LBB0_8:
	testb	$12, %al
	je	LBB0_10
## %bb.9:
	leaq	-24(%rbp), %rdi
	leaq	-20(%rbp), %rsi
	callq	___VIGetCurrentPosition
	movl	-24(%rbp), %edi
	movl	-20(%rbp), %esi
	callq	_positionCB
LBB0_10:
	movq	_retraceCount@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	incl	%edi
	movl	%edi, (%rbx)
	callq	_preRetraceCB
	movq	_flushFlag@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_13
## %bb.11:
	xorl	%eax, %eax
	callq	___VISetRegs
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	$0, (%r14)
	xorl	%eax, %eax
	callq	_SI_RefreshSamplingRate
LBB0_13:
	movl	(%rbx), %edi
	callq	_postRetraceCB
	movq	_video_queue@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWP_ThreadBroadcast
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__viReg,8,3                     ## @_viReg
	.comm	_retraceCount,4,2               ## @retraceCount
	.comm	_flushFlag,8,3                  ## @flushFlag
	.comm	_video_queue,4,2                ## @video_queue
	.comm	_VI_EURGB60,8,3                 ## @VI_EURGB60
	.comm	_oldDtvStatus,8,3               ## @oldDtvStatus
	.comm	_oldTvStatus,8,3                ## @oldTvStatus
	.no_dead_strip	___VIRetraceHandler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __VIRetraceHandler
___VIRetraceHandler:                    ; @__VIRetraceHandler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, __viReg@GOTPAGE
Lloh1:
	ldr	x8, [x8, __viReg@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w9, [x8, #96]
	tbnz	w9, #15, LBB0_2
; %bb.1:
	mov	w9, #0
	ldr	w10, [x8, #104]
	tbnz	w10, #15, LBB0_3
	b	LBB0_4
LBB0_2:
	and	w9, w9, #0xffff7fff
	str	w9, [x8, #96]
	mov	w9, #1
	ldr	w10, [x8, #104]
	tbz	w10, #15, LBB0_4
LBB0_3:
	and	w10, w10, #0xffff7fff
	str	w10, [x8, #104]
	orr	w9, w9, #0x2
LBB0_4:
	ldr	w10, [x8, #112]
	tbnz	w10, #15, LBB0_12
; %bb.5:
	ldr	w10, [x8, #120]
	tbnz	w10, #15, LBB0_13
LBB0_6:
	tst	w9, #0xc
	b.eq	LBB0_8
LBB0_7:
	add	x0, sp, #12
	add	x1, sp, #8
	bl	___VIGetCurrentPosition
	ldp	w1, w0, [sp, #8]
	bl	_positionCB
LBB0_8:
Lloh3:
	adrp	x19, _retraceCount@GOTPAGE
Lloh4:
	ldr	x19, [x19, _retraceCount@GOTPAGEOFF]
	ldr	w8, [x19]
	add	w0, w8, #1
	str	w0, [x19]
	bl	_preRetraceCB
Lloh5:
	adrp	x20, _flushFlag@GOTPAGE
Lloh6:
	ldr	x20, [x20, _flushFlag@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_11
; %bb.9:
	bl	___VISetRegs
	cbz	x0, LBB0_11
; %bb.10:
	str	xzr, [x20]
	bl	_SI_RefreshSamplingRate
LBB0_11:
	ldr	w0, [x19]
	bl	_postRetraceCB
Lloh7:
	adrp	x8, _video_queue@GOTPAGE
Lloh8:
	ldr	x8, [x8, _video_queue@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_LWP_ThreadBroadcast
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_12:
	and	w10, w10, #0xffff7fff
	str	w10, [x8, #112]
	orr	w9, w9, #0x4
	ldr	w10, [x8, #120]
	tbz	w10, #15, LBB0_6
LBB0_13:
	and	w10, w10, #0xffff7fff
	str	w10, [x8, #120]
	orr	w9, w9, #0x8
	tst	w9, #0xc
	b.ne	LBB0_7
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	__viReg,8,3                     ; @_viReg
	.comm	_retraceCount,4,2               ; @retraceCount
	.comm	_flushFlag,8,3                  ; @flushFlag
	.comm	_video_queue,4,2                ; @video_queue
	.comm	_VI_EURGB60,8,3                 ; @VI_EURGB60
	.comm	_oldDtvStatus,8,3               ; @oldDtvStatus
	.comm	_oldTvStatus,8,3                ; @oldTvStatus
	.no_dead_strip	___VIRetraceHandler
.subsections_via_symbols
