	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vivid_vid_cap_overlay          ## -- Begin function vivid_vid_cap_overlay
	.p2align	4, 0x90
_vivid_vid_cap_overlay:                 ## @vivid_vid_cap_overlay
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	callq	_video_drvdata
	cmpq	$0, 32(%rax)
	je	LBB0_3
## %bb.1:
	movq	_ENOTTY@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
LBB0_12:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.4:
	cmpq	$0, 24(%rax)
	je	LBB0_5
## %bb.6:
	movq	8(%rax), %rcx
	movq	16(%rax), %rdx
	cmpq	(%rcx), %rdx
	jne	LBB0_7
LBB0_8:
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.9:
	cmpq	%r14, %rcx
	je	LBB0_11
## %bb.10:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_11:
	xorl	%ecx, %ecx
	testl	%ebx, %ebx
	cmoveq	%rcx, %r14
	movq	%r14, (%rax)
	jmp	LBB0_12
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	leaq	L_.str(%rip), %rdx
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTTY,4,2                     ## @ENOTTY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mismatch between overlay and video capture pixelformats\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vivid_vid_cap_overlay          ; -- Begin function vivid_vid_cap_overlay
	.p2align	2
_vivid_vid_cap_overlay:                 ; @vivid_vid_cap_overlay
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	mov	x19, x1
	bl	_video_drvdata
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENOTTY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOTTY@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
	cbz	w20, LBB0_5
; %bb.3:
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_9
; %bb.4:
	ldp	x9, x8, [x0, #8]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
LBB0_5:
	ldr	x8, [x0]
	cmp	x8, #0
	ccmp	x8, x19, #4, ne
	b.ne	LBB0_7
; %bb.6:
	mov	w8, #0
	cmp	w20, #0
	csel	x9, xzr, x19, eq
	str	x9, [x0]
	b	LBB0_11
LBB0_7:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
Lloh4:
	adrp	x2, l_.str@PAGE
Lloh5:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
LBB0_9:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_11:
	mov	x0, x8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTTY,4,2                     ; @ENOTTY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mismatch between overlay and video capture pixelformats\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
