	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_s_fbuf
_ivtv_s_fbuf:                           ## @ivtv_s_fbuf
	.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, %r14
	movq	%rsi, %rbx
	movq	%rsi, %rdi
	callq	_fh2id
	movq	8(%rax), %r15
	movq	24(%r15), %r12
	movq	%rbx, %rdi
	callq	_fh2id
	movq	(%rax), %rax
	movq	_V4L2_CAP_VIDEO_OUTPUT_OVERLAY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r12,%rax,4)
	je	LBB0_1
## %bb.2:
	cmpl	$0, 12(%r15)
	je	LBB0_1
## %bb.3:
	movl	(%r14), %eax
	movq	_V4L2_FBUF_FLAG_GLOBAL_ALPHA@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%dl
	movl	%edx, (%r15)
	movq	_V4L2_FBUF_FLAG_LOCAL_ALPHA@GOTPCREL(%rip), %rcx
	movq	_V4L2_FBUF_FLAG_LOCAL_INV_ALPHA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	xorl	%ecx, %ecx
	testl	%eax, %edx
	setne	%cl
	movl	%ecx, 4(%r15)
	movq	_V4L2_FBUF_FLAG_CHROMAKEY@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	movl	%edx, 8(%r15)
	movq	%r15, %rdi
	callq	_ivtv_set_osd_alpha
	movq	_V4L2_FBUF_FLAG_OVERLAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	(%r14), %eax
	setne	%cl
	movl	%ecx, 16(%r15)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_1:
	movq	_ENOTTY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_CAP_VIDEO_OUTPUT_OVERLAY,4,2 ## @V4L2_CAP_VIDEO_OUTPUT_OVERLAY
	.comm	_ENOTTY,4,2                     ## @ENOTTY
	.comm	_V4L2_FBUF_FLAG_GLOBAL_ALPHA,4,2 ## @V4L2_FBUF_FLAG_GLOBAL_ALPHA
	.comm	_V4L2_FBUF_FLAG_LOCAL_ALPHA,4,2 ## @V4L2_FBUF_FLAG_LOCAL_ALPHA
	.comm	_V4L2_FBUF_FLAG_LOCAL_INV_ALPHA,4,2 ## @V4L2_FBUF_FLAG_LOCAL_INV_ALPHA
	.comm	_V4L2_FBUF_FLAG_CHROMAKEY,4,2   ## @V4L2_FBUF_FLAG_CHROMAKEY
	.comm	_V4L2_FBUF_FLAG_OVERLAY,4,2     ## @V4L2_FBUF_FLAG_OVERLAY
	.no_dead_strip	_ivtv_s_fbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_s_fbuf
_ivtv_s_fbuf:                           ; @ivtv_s_fbuf
	.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	x19, x2
	mov	x21, x1
	mov	x0, x1
	bl	_fh2id
	ldr	x20, [x0, #8]
	ldr	x22, [x20, #24]
	mov	x0, x21
	bl	_fh2id
	ldr	x8, [x0]
	ldr	w8, [x22, x8, lsl #2]
Lloh0:
	adrp	x9, _V4L2_CAP_VIDEO_OUTPUT_OVERLAY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_CAP_VIDEO_OUTPUT_OVERLAY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	w8, [x20, #12]
	cbz	w8, LBB0_3
; %bb.2:
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _V4L2_FBUF_FLAG_GLOBAL_ALPHA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_FBUF_FLAG_GLOBAL_ALPHA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w9, ne
	str	w9, [x20]
Lloh6:
	adrp	x9, _V4L2_FBUF_FLAG_LOCAL_ALPHA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_FBUF_FLAG_LOCAL_ALPHA@GOTPAGEOFF]
Lloh8:
	adrp	x10, _V4L2_FBUF_FLAG_LOCAL_INV_ALPHA@GOTPAGE
Lloh9:
	ldr	x10, [x10, _V4L2_FBUF_FLAG_LOCAL_INV_ALPHA@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
Lloh12:
	adrp	x9, _V4L2_FBUF_FLAG_CHROMAKEY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_FBUF_FLAG_CHROMAKEY@GOTPAGEOFF]
	cset	w10, ne
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	stp	w10, w8, [x20, #4]
	mov	x0, x20
	bl	_ivtv_set_osd_alpha
	mov	w0, #0
	ldr	w8, [x19]
Lloh15:
	adrp	x9, _V4L2_FBUF_FLAG_OVERLAY@GOTPAGE
Lloh16:
	ldr	x9, [x9, _V4L2_FBUF_FLAG_OVERLAY@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	str	w8, [x20, #16]
	b	LBB0_4
LBB0_3:
Lloh18:
	adrp	x8, _ENOTTY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOTTY@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_CAP_VIDEO_OUTPUT_OVERLAY,4,2 ; @V4L2_CAP_VIDEO_OUTPUT_OVERLAY
	.comm	_ENOTTY,4,2                     ; @ENOTTY
	.comm	_V4L2_FBUF_FLAG_GLOBAL_ALPHA,4,2 ; @V4L2_FBUF_FLAG_GLOBAL_ALPHA
	.comm	_V4L2_FBUF_FLAG_LOCAL_ALPHA,4,2 ; @V4L2_FBUF_FLAG_LOCAL_ALPHA
	.comm	_V4L2_FBUF_FLAG_LOCAL_INV_ALPHA,4,2 ; @V4L2_FBUF_FLAG_LOCAL_INV_ALPHA
	.comm	_V4L2_FBUF_FLAG_CHROMAKEY,4,2   ; @V4L2_FBUF_FLAG_CHROMAKEY
	.comm	_V4L2_FBUF_FLAG_OVERLAY,4,2     ; @V4L2_FBUF_FLAG_OVERLAY
	.no_dead_strip	_ivtv_s_fbuf
.subsections_via_symbols
