	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_get_input                 ## -- Begin function ivtv_get_input
	.p2align	4, 0x90
_ivtv_get_input:                        ## @ivtv_get_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
	cmpl	%esi, (%rdi)
	jle	LBB0_1
## %bb.2:
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %r15
	movslq	%esi, %r12
	movl	%r12d, (%rdx)
	movl	24(%rdx), %edi
	movslq	(%r15,%r12,4), %rax
	leaq	_reltable.ivtv_get_input(%rip), %rcx
	movslq	-4(%rcx,%rax,4), %rsi
	addq	%rcx, %rsi
	movl	$4, %edx
	callq	_strscpy
	movl	(%r15,%r12,4), %ecx
	movq	_IVTV_CARD_INPUT_VID_TUNER@GOTPCREL(%rip), %rsi
	movq	_V4L2_INPUT_TYPE_TUNER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %rdx
	cmpl	(%rsi), %ecx
	je	LBB0_4
## %bb.3:
	movq	_V4L2_INPUT_TYPE_CAMERA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
LBB0_4:
	movq	%rdx, 8(%r14)
	movb	4(%rbx), %cl
	movl	$-1, %esi
	shll	%cl, %esi
	notl	%esi
	movl	%esi, 16(%r14)
	cmpq	%rax, %rdx
	je	LBB0_5
## %bb.6:
	movq	_V4L2_STD_ALL@GOTPCREL(%rip), %rbx
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_5:
	addq	$8, %rbx
LBB0_7:
	movl	(%rbx), %eax
	movl	%eax, 20(%r14)
	xorl	%eax, %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @reltable.ivtv_get_input
_reltable.ivtv_get_input:
	.long	L_.str-_reltable.ivtv_get_input
	.long	L_.str.1-_reltable.ivtv_get_input
	.long	L_.str.2-_reltable.ivtv_get_input
	.long	L_.str.3-_reltable.ivtv_get_input
	.long	L_.str.4-_reltable.ivtv_get_input
	.long	L_.str.5-_reltable.ivtv_get_input

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Tuner 1"

L_.str.1:                               ## @.str.1
	.asciz	"S-Video 1"

L_.str.2:                               ## @.str.2
	.asciz	"S-Video 2"

L_.str.3:                               ## @.str.3
	.asciz	"Composite 1"

L_.str.4:                               ## @.str.4
	.asciz	"Composite 2"

L_.str.5:                               ## @.str.5
	.asciz	"Composite 3"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IVTV_CARD_INPUT_VID_TUNER,4,2  ## @IVTV_CARD_INPUT_VID_TUNER
	.comm	_V4L2_INPUT_TYPE_TUNER,8,3      ## @V4L2_INPUT_TYPE_TUNER
	.comm	_V4L2_INPUT_TYPE_CAMERA,8,3     ## @V4L2_INPUT_TYPE_CAMERA
	.comm	_V4L2_STD_ALL,4,2               ## @V4L2_STD_ALL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_get_input                 ; -- Begin function ivtv_get_input
	.p2align	2
_ivtv_get_input:                        ; @ivtv_get_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
                                        ; kill: def $w1 killed $w1 def $x1
	ldr	w8, [x0]
	cmp	w8, w1
	b.le	LBB0_2
; %bb.1:
	mov	x19, x2
	mov	x20, x0
	ldr	x8, [x0, #16]
	ldr	x21, [x8]
	str	w1, [x2]
	ldr	w0, [x2, #24]
	sbfiz	x22, x1, #2, #32
	ldrsw	x8, [x21, x22]
Lloh0:
	adrp	x9, _ivtv_get_input.input_strs@PAGE
Lloh1:
	add	x9, x9, _ivtv_get_input.input_strs@PAGEOFF
	add	x8, x9, x8, lsl #3
	ldur	x1, [x8, #-8]
	mov	w2, #4
	bl	_strscpy
	mov	w0, #0
	ldr	w8, [x21, x22]
Lloh2:
	adrp	x9, _IVTV_CARD_INPUT_VID_TUNER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IVTV_CARD_INPUT_VID_TUNER@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _V4L2_INPUT_TYPE_TUNER@GOTPAGE
Lloh6:
	ldr	x10, [x10, _V4L2_INPUT_TYPE_TUNER@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	w8, w9
	ldr	w8, [x20, #4]
	mov	w9, #-1
	lsl	w8, w9, w8
Lloh8:
	adrp	x9, _V4L2_INPUT_TYPE_CAMERA@GOTPAGE
Lloh9:
	ldr	x9, [x9, _V4L2_INPUT_TYPE_CAMERA@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	csel	x9, x10, x9, eq
	str	x9, [x19, #8]
	mvn	w8, w8
	str	w8, [x19, #16]
	add	x8, x20, #8
Lloh11:
	adrp	x11, _V4L2_STD_ALL@GOTPAGE
Lloh12:
	ldr	x11, [x11, _V4L2_STD_ALL@GOTPAGEOFF]
	cmp	x9, x10
	csel	x8, x8, x11, eq
	ldr	w8, [x8]
	str	w8, [x19, #20]
	b	LBB0_3
LBB0_2:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__const
	.p2align	3                               ; @ivtv_get_input.input_strs
_ivtv_get_input.input_strs:
	.quad	l_.str
	.quad	l_.str.1
	.quad	l_.str.2
	.quad	l_.str.3
	.quad	l_.str.4
	.quad	l_.str.5

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Tuner 1"

l_.str.1:                               ; @.str.1
	.asciz	"S-Video 1"

l_.str.2:                               ; @.str.2
	.asciz	"S-Video 2"

l_.str.3:                               ; @.str.3
	.asciz	"Composite 1"

l_.str.4:                               ; @.str.4
	.asciz	"Composite 2"

l_.str.5:                               ; @.str.5
	.asciz	"Composite 3"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IVTV_CARD_INPUT_VID_TUNER,4,2  ; @IVTV_CARD_INPUT_VID_TUNER
	.comm	_V4L2_INPUT_TYPE_TUNER,8,3      ; @V4L2_INPUT_TYPE_TUNER
	.comm	_V4L2_INPUT_TYPE_CAMERA,8,3     ; @V4L2_INPUT_TYPE_CAMERA
	.comm	_V4L2_STD_ALL,4,2               ; @V4L2_STD_ALL
.subsections_via_symbols
