	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7134_overlay
_saa7134_overlay:                       ## @saa7134_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	callq	_video_drvdata
	movq	%rax, %r15
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.1:
	movq	_saa7134_no_overlay@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_video_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_8:
	cmpq	%r14, (%r15)
	je	LBB0_10
## %bb.9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_3:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	cmpq	%r14, %rax
	je	LBB0_7
## %bb.5:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_10:
	movq	%r15, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_stop_preview
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	$0, (%r15)
	jmp	LBB0_11
LBB0_7:
	movq	%r14, (%r15)
	movq	%r15, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_start_preview
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_saa7134_no_overlay,8,3         ## @saa7134_no_overlay
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no_overlay\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_saa7134_overlay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa7134_overlay
_saa7134_overlay:                       ; @saa7134_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	x21, x2
	mov	x20, x1
	bl	_video_drvdata
	mov	x19, x0
	cbz	w21, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _saa7134_no_overlay@GOTPAGE
Lloh1:
	ldr	x8, [x8, _saa7134_no_overlay@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_video_dbg
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19]
	cmp	x8, x20
	b.eq	LBB0_9
LBB0_4:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
LBB0_7:
	ldr	x8, [x19]
	cmp	x8, #0
	ccmp	x8, x20, #4, ne
	b.ne	LBB0_10
; %bb.8:
	mov	x21, x19
	str	x20, [x21], #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_start_preview
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_6
LBB0_9:
	add	x20, x19, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_stop_preview
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	str	xzr, [x19]
	b	LBB0_6
LBB0_10:
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_saa7134_no_overlay,8,3         ; @saa7134_no_overlay
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no_overlay\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_saa7134_overlay
.subsections_via_symbols
