	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_yuv_work_handler          ## -- Begin function ivtv_yuv_work_handler
	.p2align	4, 0x90
_ivtv_yuv_work_handler:                 ## @ivtv_yuv_work_handler
	.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	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_IVTV_DEBUG_YUV
	cmpq	$0, 56(%rbx)
	je	LBB0_2
## %bb.1:
	movups	40(%rbx), %xmm0
	movl	4(%rbx), %eax
	leaq	36(%rbx), %rcx
	jmp	LBB0_3
LBB0_2:
	leaq	32(%rbx), %rcx
	xorps	%xmm0, %xmm0
	movl	$720, %eax                      ## imm = 0x2D0
LBB0_3:
	movl	(%rcx), %ecx
	movups	%xmm0, -32(%rbp)
	movl	%eax, -40(%rbp)
	movl	%ecx, -36(%rbp)
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ivtv_yuv_window_setup
	testl	%eax, %eax
	je	LBB0_11
## %bb.4:
	movl	%eax, %r14d
	movq	_IVTV_YUV_UPDATE_INVALID@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_6
## %bb.5:
	movl	$16810112, %edi                 ## imm = 0x1008080
	movl	$10392, %esi                    ## imm = 0x2898
	callq	_write_reg
	jmp	LBB0_10
LBB0_6:
	movl	$1081472, %edi                  ## imm = 0x108080
	movl	$10392, %esi                    ## imm = 0x2898
	callq	_write_reg
	movq	_IVTV_YUV_UPDATE_HORIZONTAL@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_8
## %bb.7:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ivtv_yuv_handle_horizontal
LBB0_8:
	movq	_IVTV_YUV_UPDATE_VERTICAL@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_10
## %bb.9:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ivtv_yuv_handle_vertical
LBB0_10:
	movq	-24(%rbp), %rax
	movq	%rax, 24(%rbx)
	movups	-40(%rbp), %xmm0
	movups	%xmm0, 8(%rbx)
LBB0_11:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Update yuv registers for frame %d\n"

	.comm	_IVTV_YUV_UPDATE_INVALID,4,2    ## @IVTV_YUV_UPDATE_INVALID
	.comm	_IVTV_YUV_UPDATE_HORIZONTAL,4,2 ## @IVTV_YUV_UPDATE_HORIZONTAL
	.comm	_IVTV_YUV_UPDATE_VERTICAL,4,2   ## @IVTV_YUV_UPDATE_VERTICAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_yuv_work_handler          ; -- Begin function ivtv_yuv_work_handler
	.p2align	2
_ivtv_yuv_work_handler:                 ; @ivtv_yuv_work_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w1, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IVTV_DEBUG_YUV
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_2
; %bb.1:
	ldur	q0, [x19, #40]
	ldr	w8, [x19, #4]
	add	x9, x19, #36
	b	LBB0_3
LBB0_2:
	add	x9, x19, #32
	movi.2d	v0, #0000000000000000
	mov	w8, #720
LBB0_3:
	ldr	w9, [x9]
	stur	q0, [sp, #16]
	stp	w8, w9, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_ivtv_yuv_window_setup
	cbz	w0, LBB0_11
; %bb.4:
	mov	x20, x0
Lloh2:
	adrp	x8, _IVTV_YUV_UPDATE_INVALID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IVTV_YUV_UPDATE_INVALID@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.5:
	mov	w8, #32896
	movk	w8, #16, lsl #16
	add	w0, w8, #3840, lsl #12          ; =15728640
	mov	w1, #10392
	bl	_write_reg
	b	LBB0_10
LBB0_6:
	mov	w0, #32896
	movk	w0, #16, lsl #16
	mov	w1, #10392
	bl	_write_reg
Lloh5:
	adrp	x8, _IVTV_YUV_UPDATE_HORIZONTAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IVTV_YUV_UPDATE_HORIZONTAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.7:
	add	x1, sp, #8
	mov	x0, x19
	bl	_ivtv_yuv_handle_horizontal
LBB0_8:
Lloh8:
	adrp	x8, _IVTV_YUV_UPDATE_VERTICAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IVTV_YUV_UPDATE_VERTICAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_10
; %bb.9:
	add	x1, sp, #8
	mov	x0, x19
	bl	_ivtv_yuv_handle_vertical
LBB0_10:
	ldur	q0, [sp, #8]
	stur	q0, [x19, #8]
	ldr	x8, [sp, #24]
	str	x8, [x19, #24]
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Update yuv registers for frame %d\n"

	.comm	_IVTV_YUV_UPDATE_INVALID,4,2    ; @IVTV_YUV_UPDATE_INVALID
	.comm	_IVTV_YUV_UPDATE_HORIZONTAL,4,2 ; @IVTV_YUV_UPDATE_HORIZONTAL
	.comm	_IVTV_YUV_UPDATE_VERTICAL,4,2   ; @IVTV_YUV_UPDATE_VERTICAL
.subsections_via_symbols
