	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bttv_enum_input
_bttv_enum_input:                       ## @bttv_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
	movq	(%rsi), %r14
	movq	(%rdx), %rdx
	movq	_bttv_tvcards@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%r14), %rcx
	cmpq	(%rax,%rcx,8), %rdx
	jge	LBB0_1
## %bb.2:
	movq	_V4L2_INPUT_TYPE_CAMERA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	$0, 40(%rbx)
	movq	(%r14), %rax
	movq	_TUNER_ABSENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	testq	%rdx, %rdx
	jne	LBB0_5
## %bb.4:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_sprintf
	movq	_V4L2_INPUT_TYPE_TUNER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	$0, 24(%rbx)
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_5:
	movl	16(%rbx), %edi
	cmpq	8(%r14), %rdx
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_sprintf
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_sprintf
LBB0_8:
	movq	(%rbx), %rax
	cmpq	16(%r14), %rax
	jne	LBB0_13
## %bb.9:
	movq	_BT848_DSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_btread
	movq	_BT848_DSTATUS_PRES@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_11
## %bb.10:
	movq	_V4L2_IN_ST_NO_SIGNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 12(%rbx)
LBB0_11:
	movq	_BT848_DSTATUS_HLOC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_13
## %bb.12:
	movq	_V4L2_IN_ST_NO_H_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%rbx)
LBB0_13:
	movq	_BTTV_NORMS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
LBB0_14:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bttv_tvcards,8,3               ## @bttv_tvcards
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_INPUT_TYPE_CAMERA,4,2     ## @V4L2_INPUT_TYPE_CAMERA
	.comm	_TUNER_ABSENT,8,3               ## @TUNER_ABSENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Television"

	.comm	_V4L2_INPUT_TYPE_TUNER,4,2      ## @V4L2_INPUT_TYPE_TUNER
L_.str.1:                               ## @.str.1
	.asciz	"S-Video"

L_.str.2:                               ## @.str.2
	.asciz	"Composite%d"

	.comm	_BT848_DSTATUS,4,2              ## @BT848_DSTATUS
	.comm	_BT848_DSTATUS_PRES,4,2         ## @BT848_DSTATUS_PRES
	.comm	_V4L2_IN_ST_NO_SIGNAL,4,2       ## @V4L2_IN_ST_NO_SIGNAL
	.comm	_BT848_DSTATUS_HLOC,4,2         ## @BT848_DSTATUS_HLOC
	.comm	_V4L2_IN_ST_NO_H_LOCK,4,2       ## @V4L2_IN_ST_NO_H_LOCK
	.comm	_BTTV_NORMS,4,2                 ## @BTTV_NORMS
	.no_dead_strip	_bttv_enum_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bttv_enum_input
_bttv_enum_input:                       ; @bttv_enum_input
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x20, [x1]
Lloh0:
	adrp	x9, _bttv_tvcards@GOTPAGE
Lloh1:
	ldr	x9, [x9, _bttv_tvcards@GOTPAGEOFF]
	ldr	x8, [x2]
Lloh2:
	ldr	x9, [x9]
	ldr	x10, [x20, #24]
	ldr	x9, [x9, x10, lsl #3]
	cmp	x8, x9
	b.ge	LBB0_4
; %bb.1:
	mov	x19, x2
Lloh3:
	adrp	x9, _V4L2_INPUT_TYPE_CAMERA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_INPUT_TYPE_CAMERA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	str	w9, [x2, #32]
	str	xzr, [x2, #40]
	ldr	x9, [x20]
Lloh6:
	adrp	x10, _TUNER_ABSENT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _TUNER_ABSENT@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	ccmp	x8, #0, #0, ne
	b.eq	LBB0_5
; %bb.2:
	ldr	x9, [x20, #8]
	ldr	w0, [x19, #16]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_4:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_5:
	ldr	w0, [x19, #16]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sprintf
Lloh16:
	adrp	x8, _V4L2_INPUT_TYPE_TUNER@GOTPAGE
Lloh17:
	ldr	x8, [x8, _V4L2_INPUT_TYPE_TUNER@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	str	xzr, [x19, #24]
	b	LBB0_8
LBB0_6:
	str	x8, [sp]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	bl	_sprintf
LBB0_8:
	ldr	x8, [x19]
	ldr	x9, [x20, #16]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.9:
Lloh21:
	adrp	x8, _BT848_DSTATUS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BT848_DSTATUS@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_btread
Lloh24:
	adrp	x8, _BT848_DSTATUS_PRES@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BT848_DSTATUS_PRES@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_11
; %bb.10:
Lloh27:
	adrp	x8, _V4L2_IN_ST_NO_SIGNAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _V4L2_IN_ST_NO_SIGNAL@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	orr	w8, w9, w8
	str	w8, [x19, #12]
LBB0_11:
Lloh30:
	adrp	x8, _BT848_DSTATUS_HLOC@GOTPAGE
Lloh31:
	ldr	x8, [x8, _BT848_DSTATUS_HLOC@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_13
; %bb.12:
Lloh33:
	adrp	x8, _V4L2_IN_ST_NO_H_LOCK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _V4L2_IN_ST_NO_H_LOCK@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	orr	w8, w9, w8
	str	w8, [x19, #12]
LBB0_13:
	mov	w0, #0
Lloh36:
	adrp	x8, _BTTV_NORMS@GOTPAGE
Lloh37:
	ldr	x8, [x8, _BTTV_NORMS@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	str	w8, [x19, #8]
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_bttv_tvcards,8,3               ; @bttv_tvcards
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_INPUT_TYPE_CAMERA,4,2     ; @V4L2_INPUT_TYPE_CAMERA
	.comm	_TUNER_ABSENT,8,3               ; @TUNER_ABSENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Television"

	.comm	_V4L2_INPUT_TYPE_TUNER,4,2      ; @V4L2_INPUT_TYPE_TUNER
l_.str.1:                               ; @.str.1
	.asciz	"S-Video"

l_.str.2:                               ; @.str.2
	.asciz	"Composite%d"

	.comm	_BT848_DSTATUS,4,2              ; @BT848_DSTATUS
	.comm	_BT848_DSTATUS_PRES,4,2         ; @BT848_DSTATUS_PRES
	.comm	_V4L2_IN_ST_NO_SIGNAL,4,2       ; @V4L2_IN_ST_NO_SIGNAL
	.comm	_BT848_DSTATUS_HLOC,4,2         ; @BT848_DSTATUS_HLOC
	.comm	_V4L2_IN_ST_NO_H_LOCK,4,2       ; @V4L2_IN_ST_NO_H_LOCK
	.comm	_BTTV_NORMS,4,2                 ; @BTTV_NORMS
	.no_dead_strip	_bttv_enum_input
.subsections_via_symbols
