	.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
	movq	%rsi, %rbx
	movq	(%rsi), %r14
	testl	%edx, %edx
	je	LBB0_7
## %bb.1:
	movq	_saa7134_no_overlay@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_7:
	movq	_RESOURCE_OVERLAY@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_res_check
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_stop_preview
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%r15), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_res_free
	jmp	LBB0_10
LBB0_3:
	movq	_RESOURCE_OVERLAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_res_get
	testl	%eax, %eax
	je	LBB0_4
## %bb.6:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_start_preview
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_4:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	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	_RESOURCE_OVERLAY,4,2           ## @RESOURCE_OVERLAY
	.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	x20, x1
	ldr	x19, [x1]
	cbz	w2, 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	_dprintk
	b	LBB0_5
LBB0_3:
Lloh5:
	adrp	x21, _RESOURCE_OVERLAY@GOTPAGE
Lloh6:
	ldr	x21, [x21, _RESOURCE_OVERLAY@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_res_check
	cbz	w0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	x1, x20
	bl	_stop_preview
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_res_free
	b	LBB0_9
LBB0_5:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_7:
Lloh9:
	adrp	x8, _RESOURCE_OVERLAY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RESOURCE_OVERLAY@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_res_get
	cbz	w0, LBB0_11
; %bb.8:
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	x1, x20
	bl	_start_preview
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_9:
	mov	w0, #0
LBB0_10:
	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_11:
Lloh12:
	adrp	x8, _EBUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.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	_RESOURCE_OVERLAY,4,2           ; @RESOURCE_OVERLAY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_saa7134_overlay
.subsections_via_symbols
