	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tw5864_enum_input
_tw5864_enum_input:                     ## @tw5864_enum_input
	.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, %r12
	callq	_video_drvdata
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_TW5864_INDIR_VIN_0
	movl	%eax, %edi
	callq	_tw_indir_readb
	movl	%eax, %r14d
	movl	(%rbx), %edi
	callq	_TW5864_INDIR_VIN_D
	movl	%eax, %edi
	callq	_tw_indir_readb
	cmpq	$0, 16(%r12)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_2:
	movl	%eax, %r15d
	movq	_V4L2_INPUT_TYPE_CAMERA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movl	8(%r12), %edi
	movl	(%rbx), %ecx
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	_TW5864_NORMS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	testb	$-128, %r14b
	jne	LBB0_3
## %bb.4:
	testb	$64, %r14b
	je	LBB0_5
LBB0_6:
	testb	$4, %r14b
	jne	LBB0_7
LBB0_8:
	testb	$2, %r14b
	je	LBB0_10
LBB0_9:
	movq	_V4L2_IN_ST_NO_COLOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
LBB0_10:
	xorl	%eax, %eax
	testb	$4, %r15b
	je	LBB0_12
## %bb.11:
	movq	_V4L2_IN_ST_MACROVISION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r12)
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_V4L2_IN_ST_NO_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
	testb	$64, %r14b
	jne	LBB0_6
LBB0_5:
	movq	_V4L2_IN_ST_NO_H_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
	testb	$4, %r14b
	je	LBB0_8
LBB0_7:
	movq	_V4L2_IN_ST_NO_SIGNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
	testb	$2, %r14b
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_INPUT_TYPE_CAMERA,4,2     ## @V4L2_INPUT_TYPE_CAMERA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Encoder %d"

	.comm	_TW5864_NORMS,4,2               ## @TW5864_NORMS
	.comm	_V4L2_IN_ST_NO_SYNC,4,2         ## @V4L2_IN_ST_NO_SYNC
	.comm	_V4L2_IN_ST_NO_H_LOCK,4,2       ## @V4L2_IN_ST_NO_H_LOCK
	.comm	_V4L2_IN_ST_NO_SIGNAL,4,2       ## @V4L2_IN_ST_NO_SIGNAL
	.comm	_V4L2_IN_ST_NO_COLOR,4,2        ## @V4L2_IN_ST_NO_COLOR
	.comm	_V4L2_IN_ST_MACROVISION,4,2     ## @V4L2_IN_ST_MACROVISION
	.no_dead_strip	_tw5864_enum_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tw5864_enum_input
_tw5864_enum_input:                     ; @tw5864_enum_input
	.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
	bl	_video_drvdata
	mov	x22, x0
	ldr	w0, [x0]
	bl	_TW5864_INDIR_VIN_0
	bl	_tw_indir_readb
	mov	x20, x0
	ldr	w0, [x22]
	bl	_TW5864_INDIR_VIN_D
	bl	_tw_indir_readb
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_2:
	mov	x21, x0
Lloh3:
	adrp	x8, _V4L2_INPUT_TYPE_CAMERA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_INPUT_TYPE_CAMERA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	ldr	w0, [x19, #8]
	ldr	w3, [x22]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	bl	_snprintf
Lloh8:
	adrp	x8, _TW5864_NORMS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TW5864_NORMS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	tbnz	w20, #7, LBB0_9
; %bb.3:
	tbz	w20, #6, LBB0_10
LBB0_4:
	tbnz	w20, #2, LBB0_11
LBB0_5:
	tbnz	w20, #1, LBB0_12
LBB0_6:
	mov	w0, #0
	tbz	w21, #2, LBB0_8
LBB0_7:
Lloh11:
	adrp	x8, _V4L2_IN_ST_MACROVISION@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_IN_ST_MACROVISION@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_8:
	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_9:
Lloh14:
	adrp	x8, _V4L2_IN_ST_NO_SYNC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _V4L2_IN_ST_NO_SYNC@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	tbnz	w20, #6, LBB0_4
LBB0_10:
Lloh17:
	adrp	x8, _V4L2_IN_ST_NO_H_LOCK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _V4L2_IN_ST_NO_H_LOCK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	tbz	w20, #2, LBB0_5
LBB0_11:
Lloh20:
	adrp	x8, _V4L2_IN_ST_NO_SIGNAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _V4L2_IN_ST_NO_SIGNAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	tbz	w20, #1, LBB0_6
LBB0_12:
Lloh23:
	adrp	x8, _V4L2_IN_ST_NO_COLOR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _V4L2_IN_ST_NO_COLOR@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	w0, #0
	tbnz	w21, #2, LBB0_7
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_INPUT_TYPE_CAMERA,4,2     ; @V4L2_INPUT_TYPE_CAMERA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Encoder %d"

	.comm	_TW5864_NORMS,4,2               ; @TW5864_NORMS
	.comm	_V4L2_IN_ST_NO_SYNC,4,2         ; @V4L2_IN_ST_NO_SYNC
	.comm	_V4L2_IN_ST_NO_H_LOCK,4,2       ; @V4L2_IN_ST_NO_H_LOCK
	.comm	_V4L2_IN_ST_NO_SIGNAL,4,2       ; @V4L2_IN_ST_NO_SIGNAL
	.comm	_V4L2_IN_ST_NO_COLOR,4,2        ; @V4L2_IN_ST_NO_COLOR
	.comm	_V4L2_IN_ST_MACROVISION,4,2     ; @V4L2_IN_ST_MACROVISION
	.no_dead_strip	_tw5864_enum_input
.subsections_via_symbols
