	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_s_fmt_vid_overlay
_vidioc_s_fmt_vid_overlay:              ## @vidioc_s_fmt_vid_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rsi), %rsi
	movq	(%rsi), %r12
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rdx
	callq	_DEB_EE
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_vidioc_try_fmt_vid_overlay
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	(%r15), %rax
	movq	%rax, 20(%r12)
	movl	(%r15), %eax
	cmpl	$16, %eax
	movl	$16, %edx
	cmovll	%eax, %edx
	movl	%edx, (%r12)
	movl	16(%r12), %edi
	movl	4(%r15), %esi
	shll	$2, %edx
	callq	_copy_from_user
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_3:
	movq	%r14, 8(%r12)
	movq	%r14, %rdi
	callq	_IS_OVERLAY_ACTIVE
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_saa7146_stop_preview
	movq	%r14, %rdi
	callq	_saa7146_start_preview
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"V4L2_BUF_TYPE_VIDEO_OVERLAY: dev:%p, fh:%p\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_vidioc_s_fmt_vid_overlay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_s_fmt_vid_overlay
_vidioc_s_fmt_vid_overlay:              ; @vidioc_s_fmt_vid_overlay
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x1, [x1]
	ldr	x22, [x1]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_DEB_EE
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_vidioc_try_fmt_vid_overlay
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	x8, [x20]
	stur	x8, [x22, #20]
	mov	w8, #16
	ldp	w9, w1, [x20]
	cmp	w9, #16
	csel	w8, w9, w8, lt
	str	w8, [x22]
	ldr	w0, [x22, #16]
	lsl	w2, w8, #2
	bl	_copy_from_user
	cbz	x0, LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _EFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
	str	x19, [x22, #8]
	mov	x0, x19
	bl	_IS_OVERLAY_ACTIVE
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_saa7146_stop_preview
	mov	x0, x19
	bl	_saa7146_start_preview
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"V4L2_BUF_TYPE_VIDEO_OVERLAY: dev:%p, fh:%p\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_vidioc_s_fmt_vid_overlay
.subsections_via_symbols
