	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7146_register_device        ## -- Begin function saa7146_register_device
	.p2align	4, 0x90
_saa7146_register_device:               ## @saa7146_register_device
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r13
	leaq	L_.str(%rip), %rdi
	callq	_DEB_EE
	movq	_video_fops@GOTPCREL(%rip), %rax
	movq	%rax, 48(%r13)
	movq	_VFL_TYPE_GRABBER@GOTPCREL(%rip), %rbx
	xorl	%eax, %eax
	cmpl	%r15d, (%rbx)
	sete	%al
	movq	8(%r14), %rcx
	leaq	(%rcx,%rax,4), %rax
	addq	$16, %rax
	movq	%rax, 40(%r13)
	movq	_video_device_release_empty@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r13)
	leaq	20(%r14), %rax
	movq	%rax, 24(%r13)
	leaq	16(%r14), %rax
	movq	%rax, 16(%r13)
	movl	$0, 8(%r13)
	movq	8(%r14), %rcx
	movl	(%rcx), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.1:
	movq	8(%rcx), %rcx
	cmpl	$8, %eax
	jae	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_11
LBB0_3:
	movq	%rbx, %r8
	movl	%eax, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rdi
	movq	%rdi, %rsi
	shrq	$3, %rsi
	incq	%rsi
	movl	%esi, %ebx
	andl	$3, %ebx
	cmpq	$24, %rdi
	jae	LBB0_5
## %bb.4:
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	jmp	LBB0_7
LBB0_5:
	andq	$-4, %rsi
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx,%rdi,4), %xmm2
	por	%xmm0, %xmm2
	movdqu	16(%rcx,%rdi,4), %xmm0
	por	%xmm1, %xmm0
	movdqu	32(%rcx,%rdi,4), %xmm1
	movdqu	48(%rcx,%rdi,4), %xmm3
	movdqu	64(%rcx,%rdi,4), %xmm4
	por	%xmm1, %xmm4
	por	%xmm2, %xmm4
	movdqu	80(%rcx,%rdi,4), %xmm2
	por	%xmm3, %xmm2
	por	%xmm0, %xmm2
	movdqu	96(%rcx,%rdi,4), %xmm0
	por	%xmm4, %xmm0
	movdqu	112(%rcx,%rdi,4), %xmm1
	por	%xmm2, %xmm1
	addq	$32, %rdi
	addq	$-4, %rsi
	jne	LBB0_6
LBB0_7:
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.8:
	leaq	(%rcx,%rdi,4), %rsi
	addq	$16, %rsi
	shlq	$5, %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rsi,%rdi), %xmm2
	por	%xmm2, %xmm0
	movdqu	(%rsi,%rdi), %xmm2
	por	%xmm2, %xmm1
	addq	$32, %rdi
	cmpq	%rdi, %rbx
	jne	LBB0_9
LBB0_10:
	por	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	por	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	por	%xmm1, %xmm0
	movd	%xmm0, %esi
	cmpq	%rax, %rdx
	movq	%r8, %rbx
	je	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	orl	(%rcx,%rdx,4), %esi
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_11
LBB0_12:
	movl	%esi, 8(%r13)
LBB0_13:
	movl	4(%r13), %edi
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_strscpy
	movq	_V4L2_CAP_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	movq	_V4L2_CAP_VIDEO_OVERLAY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %eax
	orl	(%rcx), %eax
	movq	_V4L2_CAP_READWRITE@GOTPCREL(%rip), %rsi
	orl	(%rsi), %eax
	movq	_V4L2_CAP_STREAMING@GOTPCREL(%rip), %rsi
	orl	(%rsi), %eax
	movq	8(%r14), %rsi
	orl	4(%rsi), %eax
	movl	%eax, (%r13)
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_V4L2_CAP_SLICED_VBI_OUTPUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_V4L2_CAP_VBI_CAPTURE@GOTPCREL(%rip), %rsi
	movq	_V4L2_CAP_AUDIO@GOTPCREL(%rip), %rdi
	orl	(%rsi), %ecx
	orl	(%rdi), %edx
	cmpl	%r15d, (%rbx)
	cmovel	%ecx, %edx
	notl	%edx
	andl	%eax, %edx
	movl	%edx, (%r13)
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_video_set_drvdata
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	$-1, %edx
	callq	_video_register_device
	testl	%eax, %eax
	js	LBB0_14
## %bb.15:
	movl	(%r14), %ebx
	movq	%r13, %rdi
	callq	_video_device_node_name
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pr_info
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_14:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dev:%p, name:'%s', type:%d\n"

	.comm	_video_fops,4,2                 ## @video_fops
	.comm	_VFL_TYPE_GRABBER,4,2           ## @VFL_TYPE_GRABBER
	.comm	_video_device_release_empty,4,2 ## @video_device_release_empty
	.comm	_V4L2_CAP_VIDEO_CAPTURE,4,2     ## @V4L2_CAP_VIDEO_CAPTURE
	.comm	_V4L2_CAP_VIDEO_OVERLAY,4,2     ## @V4L2_CAP_VIDEO_OVERLAY
	.comm	_V4L2_CAP_READWRITE,4,2         ## @V4L2_CAP_READWRITE
	.comm	_V4L2_CAP_STREAMING,4,2         ## @V4L2_CAP_STREAMING
	.comm	_V4L2_CAP_VBI_CAPTURE,4,2       ## @V4L2_CAP_VBI_CAPTURE
	.comm	_V4L2_CAP_SLICED_VBI_OUTPUT,4,2 ## @V4L2_CAP_SLICED_VBI_OUTPUT
	.comm	_V4L2_CAP_AUDIO,4,2             ## @V4L2_CAP_AUDIO
L_.str.1:                               ## @.str.1
	.asciz	"cannot register v4l2 device. skipping.\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: registered device %s [v4l2]\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7146_register_device        ; -- Begin function saa7146_register_device
	.p2align	2
_saa7146_register_device:               ; @saa7146_register_device
	.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	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DEB_EE
Lloh2:
	adrp	x8, _video_fops@GOTPAGE
Lloh3:
	ldr	x8, [x8, _video_fops@GOTPAGEOFF]
Lloh4:
	adrp	x23, _VFL_TYPE_GRABBER@GOTPAGE
Lloh5:
	ldr	x23, [x23, _VFL_TYPE_GRABBER@GOTPAGEOFF]
	ldr	w9, [x23]
	ldr	x10, [x20, #8]
	cmp	w9, w21
	add	x9, x10, #20
	add	x10, x10, #16
	csel	x9, x9, x10, eq
	stp	x9, x8, [x19, #40]
Lloh6:
	adrp	x8, _video_device_release_empty@GOTPAGE
Lloh7:
	ldr	x8, [x8, _video_device_release_empty@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	add	x8, x20, #20
	add	x9, x20, #16
	stp	x9, x8, [x19, #16]
	str	wzr, [x19, #8]
	ldr	x9, [x20, #8]
	ldr	w8, [x9]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	ldr	x9, [x9, #8]
	cmp	w8, #16
	b.hs	LBB0_3
; %bb.2:
	mov	x10, #0
	mov	w11, #0
	b	LBB0_6
LBB0_3:
	and	x10, x8, #0xfffffff0
	add	x11, x9, #32
	movi.2d	v0, #0000000000000000
	mov	x12, x10
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11], #64
	orr.16b	v0, v0, v4
	orr.16b	v1, v1, v5
	orr.16b	v2, v2, v6
	orr.16b	v3, v3, v7
	subs	x12, x12, #16
	b.ne	LBB0_4
; %bb.5:
	orr.16b	v0, v1, v0
	orr.16b	v0, v2, v0
	orr.16b	v0, v3, v0
	ext.16b	v1, v0, v0, #8
	orr.8b	v0, v0, v1
	fmov	w11, s0
	mov.s	w12, v0[1]
	orr	w11, w11, w12
	cmp	x10, x8
	b.eq	LBB0_8
LBB0_6:
	add	x9, x9, x10, lsl #2
	sub	x8, x8, x10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9], #4
	orr	w11, w11, w10
	subs	x8, x8, #1
	b.ne	LBB0_7
LBB0_8:
	str	w11, [x19, #8]
LBB0_9:
	ldr	w0, [x19, #4]
	mov	x1, x22
	mov	w2, #4
	bl	_strscpy
Lloh9:
	adrp	x8, _V4L2_CAP_VIDEO_CAPTURE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_CAP_VIDEO_CAPTURE@GOTPAGEOFF]
	ldr	w9, [x8]
Lloh11:
	adrp	x10, _V4L2_CAP_VIDEO_OVERLAY@GOTPAGE
Lloh12:
	ldr	x10, [x10, _V4L2_CAP_VIDEO_OVERLAY@GOTPAGEOFF]
	ldr	w11, [x10]
Lloh13:
	adrp	x12, _V4L2_CAP_READWRITE@GOTPAGE
Lloh14:
	ldr	x12, [x12, _V4L2_CAP_READWRITE@GOTPAGEOFF]
	orr	w9, w11, w9
Lloh15:
	ldr	w11, [x12]
	orr	w9, w9, w11
Lloh16:
	adrp	x11, _V4L2_CAP_STREAMING@GOTPAGE
Lloh17:
	ldr	x11, [x11, _V4L2_CAP_STREAMING@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	orr	w9, w9, w11
	ldr	x11, [x20, #8]
	ldr	w11, [x11, #4]
	orr	w9, w11, w9
	str	w9, [x19]
	ldr	w11, [x23]
	ldr	w8, [x8]
	ldr	w10, [x10]
	orr	w8, w10, w8
Lloh19:
	adrp	x10, _V4L2_CAP_SLICED_VBI_OUTPUT@GOTPAGE
Lloh20:
	ldr	x10, [x10, _V4L2_CAP_SLICED_VBI_OUTPUT@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
Lloh22:
	adrp	x12, _V4L2_CAP_VBI_CAPTURE@GOTPAGE
Lloh23:
	ldr	x12, [x12, _V4L2_CAP_VBI_CAPTURE@GOTPAGEOFF]
Lloh24:
	ldr	w12, [x12]
Lloh25:
	adrp	x13, _V4L2_CAP_AUDIO@GOTPAGE
Lloh26:
	ldr	x13, [x13, _V4L2_CAP_AUDIO@GOTPAGEOFF]
Lloh27:
	ldr	w13, [x13]
	orr	w10, w10, w12
	orr	w8, w8, w13
	cmp	w11, w21
	csel	w8, w10, w8, eq
	bic	w8, w9, w8
	str	w8, [x19]
	mov	x0, x19
	mov	x1, x20
	bl	_video_set_drvdata
	mov	x0, x19
	mov	x1, x21
	mov	w2, #-1
	bl	_video_register_device
	tbnz	w0, #31, LBB0_11
; %bb.10:
	ldr	w20, [x20]
	mov	x0, x19
	bl	_video_device_node_name
	mov	x2, x0
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_pr_info
	mov	w21, #0
	b	LBB0_12
LBB0_11:
	mov	x21, x0
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
LBB0_12:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dev:%p, name:'%s', type:%d\n"

	.comm	_video_fops,4,2                 ; @video_fops
	.comm	_VFL_TYPE_GRABBER,4,2           ; @VFL_TYPE_GRABBER
	.comm	_video_device_release_empty,4,2 ; @video_device_release_empty
	.comm	_V4L2_CAP_VIDEO_CAPTURE,4,2     ; @V4L2_CAP_VIDEO_CAPTURE
	.comm	_V4L2_CAP_VIDEO_OVERLAY,4,2     ; @V4L2_CAP_VIDEO_OVERLAY
	.comm	_V4L2_CAP_READWRITE,4,2         ; @V4L2_CAP_READWRITE
	.comm	_V4L2_CAP_STREAMING,4,2         ; @V4L2_CAP_STREAMING
	.comm	_V4L2_CAP_VBI_CAPTURE,4,2       ; @V4L2_CAP_VBI_CAPTURE
	.comm	_V4L2_CAP_SLICED_VBI_OUTPUT,4,2 ; @V4L2_CAP_SLICED_VBI_OUTPUT
	.comm	_V4L2_CAP_AUDIO,4,2             ; @V4L2_CAP_AUDIO
l_.str.1:                               ; @.str.1
	.asciz	"cannot register v4l2 device. skipping.\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: registered device %s [v4l2]\n"

.subsections_via_symbols
