	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tw686x_enum_input
_tw686x_enum_input:                     ## @tw686x_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	callq	_video_drvdata
	movq	%rax, %r14
	movq	(%rbx), %rcx
	movq	_TW686X_INPUTS_PER_CH@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jge	LBB0_1
## %bb.2:
	movl	24(%rbx), %edi
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	_V4L2_INPUT_TYPE_CAMERA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	16(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_V4L2_IN_CAP_STD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movl	8(%r14), %edi
	movq	_VIDSTAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movl	(%rax,%rcx,4), %esi
	callq	_reg_read
	movl	%eax, %ecx
	movl	$0, 8(%rbx)
	movq	_TW686X_VIDSTAT_VDLOSS@GOTPCREL(%rip), %rsi
	xorl	%eax, %eax
	movl	$0, %edx
	testl	%ecx, (%rsi)
	je	LBB0_4
## %bb.3:
	movq	_V4L2_IN_ST_NO_SIGNAL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 8(%rbx)
LBB0_4:
	movq	_TW686X_VIDSTAT_HLOCK@GOTPCREL(%rip), %rsi
	testl	%ecx, (%rsi)
	jne	LBB0_6
## %bb.5:
	movq	_V4L2_IN_ST_NO_H_LOCK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	%edx, 8(%rbx)
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TW686X_INPUTS_PER_CH,8,3       ## @TW686X_INPUTS_PER_CH
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Composite%d"

	.comm	_V4L2_INPUT_TYPE_CAMERA,4,2     ## @V4L2_INPUT_TYPE_CAMERA
	.comm	_V4L2_IN_CAP_STD,4,2            ## @V4L2_IN_CAP_STD
	.comm	_VIDSTAT,8,3                    ## @VIDSTAT
	.comm	_TW686X_VIDSTAT_VDLOSS,4,2      ## @TW686X_VIDSTAT_VDLOSS
	.comm	_V4L2_IN_ST_NO_SIGNAL,4,2       ## @V4L2_IN_ST_NO_SIGNAL
	.comm	_TW686X_VIDSTAT_HLOCK,4,2       ## @TW686X_VIDSTAT_HLOCK
	.comm	_V4L2_IN_ST_NO_H_LOCK,4,2       ## @V4L2_IN_ST_NO_H_LOCK
	.no_dead_strip	_tw686x_enum_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tw686x_enum_input
_tw686x_enum_input:                     ; @tw686x_enum_input
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	bl	_video_drvdata
	ldr	x3, [x19]
Lloh0:
	adrp	x8, _TW686X_INPUTS_PER_CH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TW686X_INPUTS_PER_CH@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x3, x8
	b.ge	LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19, #24]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	bl	_snprintf
Lloh5:
	adrp	x8, _V4L2_INPUT_TYPE_CAMERA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V4L2_INPUT_TYPE_CAMERA@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _V4L2_IN_CAP_STD@GOTPAGE
Lloh9:
	ldr	x9, [x9, _V4L2_IN_CAP_STD@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #12]
	ldr	w0, [x20, #8]
Lloh11:
	adrp	x8, _VIDSTAT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VIDSTAT@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x9, [x20]
	ldr	w1, [x8, x9, lsl #2]
	bl	_reg_read
	str	wzr, [x19, #8]
Lloh14:
	adrp	x8, _TW686X_VIDSTAT_VDLOSS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TW686X_VIDSTAT_VDLOSS@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:
Lloh17:
	adrp	x8, _V4L2_IN_ST_NO_SIGNAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _V4L2_IN_ST_NO_SIGNAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	b	LBB0_5
LBB0_3:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_4:
	mov	w8, #0
LBB0_5:
Lloh23:
	adrp	x9, _TW686X_VIDSTAT_HLOCK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _TW686X_VIDSTAT_HLOCK@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_7
; %bb.6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	mov	w0, #0
Lloh26:
	adrp	x9, _V4L2_IN_ST_NO_H_LOCK@GOTPAGE
Lloh27:
	ldr	x9, [x9, _V4L2_IN_ST_NO_H_LOCK@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #8]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_TW686X_INPUTS_PER_CH,8,3       ; @TW686X_INPUTS_PER_CH
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Composite%d"

	.comm	_V4L2_INPUT_TYPE_CAMERA,4,2     ; @V4L2_INPUT_TYPE_CAMERA
	.comm	_V4L2_IN_CAP_STD,4,2            ; @V4L2_IN_CAP_STD
	.comm	_VIDSTAT,8,3                    ; @VIDSTAT
	.comm	_TW686X_VIDSTAT_VDLOSS,4,2      ; @TW686X_VIDSTAT_VDLOSS
	.comm	_V4L2_IN_ST_NO_SIGNAL,4,2       ; @V4L2_IN_ST_NO_SIGNAL
	.comm	_TW686X_VIDSTAT_HLOCK,4,2       ; @TW686X_VIDSTAT_HLOCK
	.comm	_V4L2_IN_ST_NO_H_LOCK,4,2       ; @V4L2_IN_ST_NO_H_LOCK
	.no_dead_strip	_tw686x_enum_input
.subsections_via_symbols
