	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidtex_play
_vidtex_play:                           ## @vidtex_play
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rcx
	xorl	%eax, %eax
	cmpb	$0, (%rcx)
	cmovneq	%rcx, %rax
	movq	%rdi, %rbx
	movl	12(%rsi), %ecx
	movl	%ecx, 28(%rdi)
	movq	%rdi, -56(%rbp)
	movq	_vidtex_video_frame_cb@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -60(%rbp)
	movq	_vidtex_stop_cb@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -64(%rbp)
	movl	8(%rsi), %ecx
	movl	%ecx, -48(%rbp)
	leaq	-64(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rax, %rdi
	callq	_svp_create
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	$0, (%rbx)
	movq	%rax, %rdi
	callq	_svp_start
	movl	$-1, %r15d
	testq	%rax, %rax
	jne	LBB0_16
## %bb.3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_vidtex_set_quit
	testl	%eax, %eax
	je	LBB0_4
LBB0_8:
	leaq	12(%rbx), %rdi
	callq	_vcos_semaphore_post
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_svp_get_stats
	movq	-40(%rbp), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_vcos_log_info
	movq	(%rbx), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_vcos_log_info
	movq	_SVP_STOP_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_11
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
LBB0_10:
	xorl	%eax, %eax
	callq	_vcos_log_error
LBB0_15:
	movl	$-1, %r15d
LBB0_16:
	movq	%r14, %rdi
	callq	_svp_destroy
	jmp	LBB0_17
LBB0_1:
	movl	$-1, %r15d
LBB0_17:
	movq	%rbx, %rdi
	callq	_vidtex_flush_gl
	movl	%r15d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	24(%rbx), %r15
	leaq	12(%rbx), %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_vidtex_set_quit
	testl	%eax, %eax
	jne	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_vcos_semaphore_wait
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_vidtex_draw
	movq	%r12, %rdi
	callq	_vcos_semaphore_post
	jmp	LBB0_7
LBB0_11:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.13:
	subl	-40(%rbp), %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_abs
	movq	_VT_MAX_FRAME_DISPARITY@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	jle	LBB0_16
## %bb.14:
	movq	(%rbx), %rsi
	movl	-40(%rbp), %edx
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_vcos_log_error
	jmp	LBB0_15
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_vidtex_video_frame_cb,4,2      ## @vidtex_video_frame_cb
	.comm	_vidtex_stop_cb,4,2             ## @vidtex_stop_cb
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"video frames decoded: %6u"

L_.str.1:                               ## @.str.1
	.asciz	"EGL buffer swaps:     %6u"

	.comm	_SVP_STOP_ERROR,4,2             ## @SVP_STOP_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"vidtex exiting on error"

L_.str.3:                               ## @.str.3
	.asciz	"vidtex completed with no EGL buffer swaps"

	.comm	_VT_MAX_FRAME_DISPARITY,8,3     ## @VT_MAX_FRAME_DISPARITY
L_.str.4:                               ## @.str.4
	.asciz	"vidtex completed with %u EGL buffer swaps, but %u video frames"

	.no_dead_strip	_vidtex_play
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidtex_play
_vidtex_play:                           ; @vidtex_play
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
	ldr	x8, [x1]
	ldrb	w9, [x8]
	cmp	w9, #0
	csel	x0, xzr, x8, eq
	ldr	w8, [x1, #12]
	str	w8, [x19, #28]
	str	x19, [sp, #40]
Lloh0:
	adrp	x8, _vidtex_video_frame_cb@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vidtex_video_frame_cb@GOTPAGEOFF]
Lloh2:
	adrp	x9, _vidtex_stop_cb@GOTPAGE
Lloh3:
	ldr	x9, [x9, _vidtex_stop_cb@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #32]
	ldr	w8, [x1, #8]
	str	w8, [sp, #24]
	add	x1, sp, #32
	add	x2, sp, #24
	bl	_svp_create
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	str	xzr, [x19]
	bl	_svp_start
	cbnz	x0, LBB0_6
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	bl	_vidtex_set_quit
	cbz	w0, LBB0_10
LBB0_3:
	add	x0, x19, #12
	bl	_vcos_semaphore_post
	add	x1, sp, #16
	mov	x0, x20
	bl	_svp_get_stats
	ldr	x1, [sp, #16]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vcos_log_info
	ldr	x1, [x19]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_vcos_log_info
	ldr	w8, [x19, #8]
Lloh10:
	adrp	x9, _SVP_STOP_ERROR@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SVP_STOP_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.4:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_5:
	bl	_vcos_log_error
LBB0_6:
	mov	w21, #-1
LBB0_7:
	mov	x0, x20
	bl	_svp_destroy
	b	LBB0_9
LBB0_8:
	mov	w21, #-1
LBB0_9:
	mov	x0, x19
	bl	_vidtex_flush_gl
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_10:
	add	x21, x19, #24
	add	x22, x19, #12
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	mov	w1, #0
	bl	_vidtex_set_quit
	cbnz	w0, LBB0_3
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_vcos_semaphore_wait
	ldr	x1, [x19, #16]
	cbz	x1, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	bl	_vidtex_draw
	mov	x0, x22
	bl	_vcos_semaphore_post
	b	LBB0_11
LBB0_14:
	ldr	x8, [x19]
	cbz	x8, LBB0_17
; %bb.15:
	ldr	w9, [sp, #16]
	sub	w0, w8, w9
	bl	_abs
Lloh15:
	adrp	x8, _VT_MAX_FRAME_DISPARITY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VT_MAX_FRAME_DISPARITY@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_18
; %bb.16:
	ldr	x8, [x19]
	ldr	x9, [sp, #16]
	stp	x8, x9, [sp]
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_5
LBB0_17:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_18:
	mov	w21, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_vidtex_video_frame_cb,4,2      ; @vidtex_video_frame_cb
	.comm	_vidtex_stop_cb,4,2             ; @vidtex_stop_cb
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"video frames decoded: %6u"

l_.str.1:                               ; @.str.1
	.asciz	"EGL buffer swaps:     %6u"

	.comm	_SVP_STOP_ERROR,4,2             ; @SVP_STOP_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"vidtex exiting on error"

l_.str.3:                               ; @.str.3
	.asciz	"vidtex completed with no EGL buffer swaps"

	.comm	_VT_MAX_FRAME_DISPARITY,8,3     ; @VT_MAX_FRAME_DISPARITY
l_.str.4:                               ; @.str.4
	.asciz	"vidtex completed with %u EGL buffer swaps, but %u video frames"

	.no_dead_strip	_vidtex_play
.subsections_via_symbols
