	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tw68_enum_input
_tw68_enum_input:                       ## @tw68_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
	movq	%rdi, %r14
	callq	_video_drvdata
	movq	%rax, %r15
	movl	(%r12), %ebx
	movq	_TW68_INPUT_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jae	LBB0_1
## %bb.2:
	movq	_V4L2_INPUT_TYPE_CAMERA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	movl	12(%r12), %edi
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	movl	%ebx, %ecx
	callq	_snprintf
	cmpl	(%r15), %ebx
	jne	LBB0_13
## %bb.3:
	movq	_TW68_STATUS1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_tw_readb
	movl	%eax, %r15d
	movq	_TW68_MVSN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_tw_readb
	testb	$-128, %r15b
	jne	LBB0_4
## %bb.5:
	testb	$64, %r15b
	jne	LBB0_6
LBB0_7:
	testb	$4, %r15b
	jne	LBB0_8
LBB0_9:
	testb	$2, %r15b
	jne	LBB0_10
LBB0_11:
	testb	$4, %al
	je	LBB0_13
LBB0_12:
	movq	_V4L2_IN_ST_MACROVISION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r12)
LBB0_13:
	movq	%r14, %rdi
	callq	_video_devdata
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_V4L2_IN_ST_NO_SYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%r12)
	testb	$64, %r15b
	je	LBB0_7
LBB0_6:
	movq	_V4L2_IN_ST_NO_H_LOCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%r12)
	testb	$4, %r15b
	je	LBB0_9
LBB0_8:
	movq	_V4L2_IN_ST_NO_SIGNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%r12)
	testb	$2, %r15b
	je	LBB0_11
LBB0_10:
	movq	_V4L2_IN_ST_NO_COLOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%r12)
	testb	$4, %al
	jne	LBB0_12
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_TW68_INPUT_MAX,4,2             ## @TW68_INPUT_MAX
	.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	"Composite %d"

	.comm	_TW68_STATUS1,4,2               ## @TW68_STATUS1
	.comm	_TW68_MVSN,4,2                  ## @TW68_MVSN
	.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	_tw68_enum_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tw68_enum_input
_tw68_enum_input:                       ; @tw68_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
	mov	x20, x0
	bl	_video_drvdata
	ldr	w22, [x19]
Lloh0:
	adrp	x8, _TW68_INPUT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TW68_INPUT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w22, w8
	b.hs	LBB0_9
; %bb.1:
	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, #16]
	ldr	w0, [x19, #12]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	mov	x3, x22
	bl	_snprintf
	ldr	w8, [x21]
	cmp	w22, w8
	b.ne	LBB0_8
; %bb.2:
Lloh8:
	adrp	x8, _TW68_STATUS1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TW68_STATUS1@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_tw_readb
	mov	x21, x0
Lloh11:
	adrp	x8, _TW68_MVSN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TW68_MVSN@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_tw_readb
	tbnz	w21, #7, LBB0_11
; %bb.3:
	tbnz	w21, #6, LBB0_12
LBB0_4:
	tbnz	w21, #2, LBB0_13
LBB0_5:
	tbnz	w21, #1, LBB0_14
LBB0_6:
	tbz	w0, #2, LBB0_8
LBB0_7:
Lloh14:
	adrp	x8, _V4L2_IN_ST_MACROVISION@GOTPAGE
Lloh15:
	ldr	x8, [x8, _V4L2_IN_ST_MACROVISION@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_8:
	mov	x0, x20
	bl	_video_devdata
	mov	x8, x0
	mov	w0, #0
	ldr	w8, [x8]
	str	w8, [x19, #4]
	b	LBB0_10
LBB0_9:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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_11:
Lloh20:
	adrp	x8, _V4L2_IN_ST_NO_SYNC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _V4L2_IN_ST_NO_SYNC@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	tbz	w21, #6, LBB0_4
LBB0_12:
Lloh23:
	adrp	x8, _V4L2_IN_ST_NO_H_LOCK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _V4L2_IN_ST_NO_H_LOCK@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	tbz	w21, #2, LBB0_5
LBB0_13:
Lloh26:
	adrp	x8, _V4L2_IN_ST_NO_SIGNAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _V4L2_IN_ST_NO_SIGNAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	tbz	w21, #1, LBB0_6
LBB0_14:
Lloh29:
	adrp	x8, _V4L2_IN_ST_NO_COLOR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _V4L2_IN_ST_NO_COLOR@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	tbnz	w0, #2, LBB0_7
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_TW68_INPUT_MAX,4,2             ; @TW68_INPUT_MAX
	.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	"Composite %d"

	.comm	_TW68_STATUS1,4,2               ; @TW68_STATUS1
	.comm	_TW68_MVSN,4,2                  ; @TW68_MVSN
	.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	_tw68_enum_input
.subsections_via_symbols
