	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av7110_init_v4l                ## -- Begin function av7110_init_v4l
	.p2align	4, 0x90
_av7110_init_v4l:                       ## @av7110_init_v4l
	.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	%rdi, %r15
	movq	16(%rdi), %r12
	movq	24(%rdi), %r14
	testq	%r12, %r12
	jne	LBB0_1
## %bb.2:
	movq	_av7110_vv_data_st@GOTPCREL(%rip), %rsi
	jmp	LBB0_3
LBB0_1:
	movq	_av7110_vv_data_c@GOTPCREL(%rip), %rsi
LBB0_3:
	movq	%r14, %rdi
	callq	_saa7146_vv_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_ERR
	jmp	LBB0_5
LBB0_6:
	movq	_vidioc_enum_input@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testq	%r12, %r12
	jne	LBB0_7
## %bb.8:
	movq	_av7110_vv_data_st@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_av7110_vv_data_c@GOTPCREL(%rip), %rax
LBB0_9:
	movl	%ecx, 128(%rax)
	movq	_vidioc_g_input@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 124(%rax)
	movq	_vidioc_s_input@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 120(%rax)
	movq	_vidioc_g_tuner@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 112(%rax)
	movq	_vidioc_s_tuner@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 104(%rax)
	movq	_vidioc_g_frequency@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	%rsi, 96(%rax)
	movq	_vidioc_s_frequency@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movq	%rdi, 88(%rax)
	movq	_vidioc_enumaudio@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	movl	%ebx, 80(%rax)
	movq	_vidioc_g_audio@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	movl	%ebx, 76(%rax)
	movq	_vidioc_s_audio@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	movl	%ebx, 72(%rax)
	movq	$0, 64(%rax)
	movq	%rcx, 56(%rax)
	movq	%rdx, 48(%rax)
	movq	%rsi, 40(%rax)
	movq	%rdi, 32(%rax)
	movq	$0, 24(%rax)
	movq	_vidioc_g_sliced_vbi_cap@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
	movq	_vidioc_g_fmt_sliced_vbi_out@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rax)
	movq	_vidioc_s_fmt_sliced_vbi_out@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movl	4(%r15), %edi
	callq	_FW_VERSION
	cmpl	$9762, %eax                     ## imm = 0x2622
	jg	LBB0_14
## %bb.10:
	movq	_V4L2_CAP_SLICED_VBI_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testq	%r12, %r12
	jne	LBB0_11
## %bb.12:
	movq	_av7110_vv_data_st@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_11:
	movq	_av7110_vv_data_c@GOTPCREL(%rip), %rcx
LBB0_13:
	andl	%eax, (%rcx)
LBB0_14:
	leaq	8(%r15), %rdi
	movq	_VFL_TYPE_GRABBER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rsi
	callq	_saa7146_register_device
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	leaq	L_.str.2(%rip), %rdi
	callq	_ERR
	movq	%r14, %rdi
	callq	_saa7146_vv_release
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	4(%r15), %edi
	callq	_FW_VERSION
	xorl	%ebx, %ebx
	cmpl	$9763, %eax                     ## imm = 0x2623
	jl	LBB0_19
## %bb.17:
	movq	_VFL_TYPE_VBI@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_saa7146_register_device
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	leaq	L_.str.3(%rip), %rdi
	callq	_ERR
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_av7110_vv_data_c,136,3         ## @av7110_vv_data_c
	.comm	_av7110_vv_data_st,136,3        ## @av7110_vv_data_st
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot init capture device. skipping\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_vidioc_enum_input,4,2          ## @vidioc_enum_input
	.comm	_vidioc_g_input,4,2             ## @vidioc_g_input
	.comm	_vidioc_s_input,4,2             ## @vidioc_s_input
	.comm	_vidioc_g_tuner,8,3             ## @vidioc_g_tuner
	.comm	_vidioc_s_tuner,8,3             ## @vidioc_s_tuner
	.comm	_vidioc_g_frequency,8,3         ## @vidioc_g_frequency
	.comm	_vidioc_s_frequency,8,3         ## @vidioc_s_frequency
	.comm	_vidioc_enumaudio,4,2           ## @vidioc_enumaudio
	.comm	_vidioc_g_audio,4,2             ## @vidioc_g_audio
	.comm	_vidioc_s_audio,4,2             ## @vidioc_s_audio
	.comm	_vidioc_g_sliced_vbi_cap,4,2    ## @vidioc_g_sliced_vbi_cap
	.comm	_vidioc_g_fmt_sliced_vbi_out,4,2 ## @vidioc_g_fmt_sliced_vbi_out
	.comm	_vidioc_s_fmt_sliced_vbi_out,4,2 ## @vidioc_s_fmt_sliced_vbi_out
	.comm	_V4L2_CAP_SLICED_VBI_OUTPUT,4,2 ## @V4L2_CAP_SLICED_VBI_OUTPUT
L_.str.1:                               ## @.str.1
	.asciz	"av7110"

	.comm	_VFL_TYPE_GRABBER,4,2           ## @VFL_TYPE_GRABBER
L_.str.2:                               ## @.str.2
	.asciz	"cannot register capture device. skipping\n"

	.comm	_VFL_TYPE_VBI,4,2               ## @VFL_TYPE_VBI
L_.str.3:                               ## @.str.3
	.asciz	"cannot register vbi v4l2 device. skipping\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av7110_init_v4l                ; -- Begin function av7110_init_v4l
	.p2align	2
_av7110_init_v4l:                       ; @av7110_init_v4l
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldp	x21, x19, [x0, #16]
Lloh0:
	adrp	x22, _av7110_vv_data_c@GOTPAGE
Lloh1:
	ldr	x22, [x22, _av7110_vv_data_c@GOTPAGEOFF]
Lloh2:
	adrp	x23, _av7110_vv_data_st@GOTPAGE
Lloh3:
	ldr	x23, [x23, _av7110_vv_data_st@GOTPAGEOFF]
	cmp	x21, #0
	csel	x1, x23, x22, eq
	mov	x0, x19
	bl	_saa7146_vv_init
	cbz	w0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
	b	LBB0_6
LBB0_2:
Lloh6:
	adrp	x8, _vidioc_enum_input@GOTPAGE
Lloh7:
	ldr	x8, [x8, _vidioc_enum_input@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	x21, #0
	csel	x9, x23, x22, eq
Lloh9:
	adrp	x10, _vidioc_g_input@GOTPAGE
Lloh10:
	ldr	x10, [x10, _vidioc_g_input@GOTPAGEOFF]
	str	w8, [x9, #128]
Lloh11:
	ldr	w8, [x10]
Lloh12:
	adrp	x10, _vidioc_s_input@GOTPAGE
Lloh13:
	ldr	x10, [x10, _vidioc_s_input@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #120]
Lloh15:
	adrp	x8, _vidioc_g_tuner@GOTPAGE
Lloh16:
	ldr	x8, [x8, _vidioc_g_tuner@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
Lloh18:
	adrp	x10, _vidioc_s_tuner@GOTPAGE
Lloh19:
	ldr	x10, [x10, _vidioc_s_tuner@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	stp	x10, x8, [x9, #104]
Lloh21:
	adrp	x11, _vidioc_g_frequency@GOTPAGE
Lloh22:
	ldr	x11, [x11, _vidioc_g_frequency@GOTPAGEOFF]
Lloh23:
	ldr	x11, [x11]
Lloh24:
	adrp	x12, _vidioc_s_frequency@GOTPAGE
Lloh25:
	ldr	x12, [x12, _vidioc_s_frequency@GOTPAGEOFF]
Lloh26:
	ldr	x12, [x12]
Lloh27:
	adrp	x13, _vidioc_enumaudio@GOTPAGE
Lloh28:
	ldr	x13, [x13, _vidioc_enumaudio@GOTPAGEOFF]
	stp	x12, x11, [x9, #88]
Lloh29:
	ldr	w13, [x13]
	str	w13, [x9, #80]
Lloh30:
	adrp	x13, _vidioc_g_audio@GOTPAGE
Lloh31:
	ldr	x13, [x13, _vidioc_g_audio@GOTPAGEOFF]
Lloh32:
	ldr	w13, [x13]
Lloh33:
	adrp	x14, _vidioc_s_audio@GOTPAGE
Lloh34:
	ldr	x14, [x14, _vidioc_s_audio@GOTPAGEOFF]
Lloh35:
	ldr	w14, [x14]
	stp	w14, w13, [x9, #72]
	stp	x8, xzr, [x9, #56]
	stp	x11, x10, [x9, #40]
Lloh36:
	adrp	x8, _vidioc_g_sliced_vbi_cap@GOTPAGE
Lloh37:
	ldr	x8, [x8, _vidioc_g_sliced_vbi_cap@GOTPAGEOFF]
	stp	xzr, x12, [x9, #24]
Lloh38:
	ldr	w8, [x8]
	str	w8, [x9, #16]
Lloh39:
	adrp	x8, _vidioc_g_fmt_sliced_vbi_out@GOTPAGE
Lloh40:
	ldr	x8, [x8, _vidioc_g_fmt_sliced_vbi_out@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
Lloh42:
	adrp	x10, _vidioc_s_fmt_sliced_vbi_out@GOTPAGE
Lloh43:
	ldr	x10, [x10, _vidioc_s_fmt_sliced_vbi_out@GOTPAGEOFF]
Lloh44:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #8]
	ldr	w0, [x20, #4]
	bl	_FW_VERSION
	mov	w8, #9762
	cmp	w0, w8
	b.gt	LBB0_4
; %bb.3:
Lloh45:
	adrp	x8, _V4L2_CAP_SLICED_VBI_OUTPUT@GOTPAGE
Lloh46:
	ldr	x8, [x8, _V4L2_CAP_SLICED_VBI_OUTPUT@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	cmp	x21, #0
	csel	x9, x23, x22, eq
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
LBB0_4:
	add	x0, x20, #8
Lloh48:
	adrp	x8, _VFL_TYPE_GRABBER@GOTPAGE
Lloh49:
	ldr	x8, [x8, _VFL_TYPE_GRABBER@GOTPAGEOFF]
Lloh50:
	ldr	w3, [x8]
Lloh51:
	adrp	x2, l_.str.1@PAGE
Lloh52:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_saa7146_register_device
	cbz	x0, LBB0_8
; %bb.5:
Lloh53:
	adrp	x0, l_.str.2@PAGE
Lloh54:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ERR
	mov	x0, x19
	bl	_saa7146_vv_release
LBB0_6:
Lloh55:
	adrp	x8, _ENODEV@GOTPAGE
Lloh56:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh57:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	w0, [x20, #4]
	bl	_FW_VERSION
	mov	w8, #9763
	cmp	w0, w8
	b.lt	LBB0_11
; %bb.9:
Lloh58:
	adrp	x8, _VFL_TYPE_VBI@GOTPAGE
Lloh59:
	ldr	x8, [x8, _VFL_TYPE_VBI@GOTPAGEOFF]
Lloh60:
	ldr	w3, [x8]
Lloh61:
	adrp	x2, l_.str.1@PAGE
Lloh62:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	bl	_saa7146_register_device
	cbz	x0, LBB0_7
; %bb.10:
Lloh63:
	adrp	x0, l_.str.3@PAGE
Lloh64:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ERR
LBB0_11:
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpAdd	Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpAdd	Lloh63, Lloh64
	.cfi_endproc
                                        ; -- End function
	.comm	_av7110_vv_data_c,136,3         ; @av7110_vv_data_c
	.comm	_av7110_vv_data_st,136,3        ; @av7110_vv_data_st
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot init capture device. skipping\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_vidioc_enum_input,4,2          ; @vidioc_enum_input
	.comm	_vidioc_g_input,4,2             ; @vidioc_g_input
	.comm	_vidioc_s_input,4,2             ; @vidioc_s_input
	.comm	_vidioc_g_tuner,8,3             ; @vidioc_g_tuner
	.comm	_vidioc_s_tuner,8,3             ; @vidioc_s_tuner
	.comm	_vidioc_g_frequency,8,3         ; @vidioc_g_frequency
	.comm	_vidioc_s_frequency,8,3         ; @vidioc_s_frequency
	.comm	_vidioc_enumaudio,4,2           ; @vidioc_enumaudio
	.comm	_vidioc_g_audio,4,2             ; @vidioc_g_audio
	.comm	_vidioc_s_audio,4,2             ; @vidioc_s_audio
	.comm	_vidioc_g_sliced_vbi_cap,4,2    ; @vidioc_g_sliced_vbi_cap
	.comm	_vidioc_g_fmt_sliced_vbi_out,4,2 ; @vidioc_g_fmt_sliced_vbi_out
	.comm	_vidioc_s_fmt_sliced_vbi_out,4,2 ; @vidioc_s_fmt_sliced_vbi_out
	.comm	_V4L2_CAP_SLICED_VBI_OUTPUT,4,2 ; @V4L2_CAP_SLICED_VBI_OUTPUT
l_.str.1:                               ; @.str.1
	.asciz	"av7110"

	.comm	_VFL_TYPE_GRABBER,4,2           ; @VFL_TYPE_GRABBER
l_.str.2:                               ; @.str.2
	.asciz	"cannot register capture device. skipping\n"

	.comm	_VFL_TYPE_VBI,4,2               ; @VFL_TYPE_VBI
l_.str.3:                               ; @.str.3
	.asciz	"cannot register vbi v4l2 device. skipping\n"

.subsections_via_symbols
