	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7134_enum_input             ## -- Begin function saa7134_enum_input
	.p2align	4, 0x90
_saa7134_enum_input:                    ## @saa7134_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	callq	_video_drvdata
	movq	%rax, %r15
	movl	(%r14), %ebx
	movq	_SAA7134_INPUT_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jae	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_card_in
	movq	_SAA7134_NO_INPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_3:
	movl	%ebx, (%r14)
	movl	16(%r14), %r12d
	movq	_saa7134_input_name@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_card_in
	movl	(%r13,%rax,4), %esi
	movl	%r12d, %edi
	movl	$4, %edx
	callq	_strscpy
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_card_in
	andq	$-2, %rax
	cmpq	$128, %rax
	jne	LBB0_4
## %bb.5:
	movq	_V4L2_INPUT_TYPE_TUNER@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_V4L2_INPUT_TYPE_CAMERA@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	cmpl	(%r15), %ebx
	jne	LBB0_13
## %bb.7:
	movq	_SAA7134_STATUS_VIDEO1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_saa_readb
	movl	%eax, %ebx
	movq	_SAA7134_STATUS_VIDEO2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_saa_readb
	testb	$64, %bl
	jne	LBB0_8
## %bb.9:
	testb	$64, %al
	jne	LBB0_10
LBB0_11:
	testb	$14, %al
	je	LBB0_13
LBB0_12:
	movq	_V4L2_IN_ST_MACROVISION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r14)
LBB0_13:
	movq	_SAA7134_NORMS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_V4L2_IN_ST_NO_H_LOCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%r14)
	testb	$64, %al
	je	LBB0_11
LBB0_10:
	movq	_V4L2_IN_ST_NO_SIGNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%r14)
	testb	$14, %al
	jne	LBB0_12
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_SAA7134_INPUT_MAX,4,2          ## @SAA7134_INPUT_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SAA7134_NO_INPUT,8,3           ## @SAA7134_NO_INPUT
	.comm	_saa7134_input_name,8,3         ## @saa7134_input_name
	.comm	_V4L2_INPUT_TYPE_TUNER,4,2      ## @V4L2_INPUT_TYPE_TUNER
	.comm	_V4L2_INPUT_TYPE_CAMERA,4,2     ## @V4L2_INPUT_TYPE_CAMERA
	.comm	_SAA7134_STATUS_VIDEO1,4,2      ## @SAA7134_STATUS_VIDEO1
	.comm	_SAA7134_STATUS_VIDEO2,4,2      ## @SAA7134_STATUS_VIDEO2
	.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_MACROVISION,4,2     ## @V4L2_IN_ST_MACROVISION
	.comm	_SAA7134_NORMS,4,2              ## @SAA7134_NORMS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7134_enum_input             ; -- Begin function saa7134_enum_input
	.p2align	2
_saa7134_enum_input:                    ; @saa7134_enum_input
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	bl	_video_drvdata
	ldr	w21, [x19]
Lloh0:
	adrp	x8, _SAA7134_INPUT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SAA7134_INPUT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w21, w8
	b.hs	LBB0_2
; %bb.1:
	mov	x20, x0
	mov	x1, x21
	bl	_card_in
Lloh3:
	adrp	x8, _SAA7134_NO_INPUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SAA7134_NO_INPUT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_3:
	str	w21, [x19]
	ldr	w22, [x19, #16]
Lloh9:
	adrp	x8, _saa7134_input_name@GOTPAGE
Lloh10:
	ldr	x8, [x8, _saa7134_input_name@GOTPAGEOFF]
Lloh11:
	ldr	x23, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_card_in
	ldr	w1, [x23, x0, lsl #2]
	mov	x0, x22
	mov	w2, #4
	bl	_strscpy
	mov	x0, x20
	mov	x1, x21
	bl	_card_in
	and	x8, x0, #0xfffffffffffffffe
Lloh12:
	adrp	x9, _V4L2_INPUT_TYPE_TUNER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_INPUT_TYPE_TUNER@GOTPAGEOFF]
Lloh14:
	adrp	x10, _V4L2_INPUT_TYPE_CAMERA@GOTPAGE
Lloh15:
	ldr	x10, [x10, _V4L2_INPUT_TYPE_CAMERA@GOTPAGEOFF]
	cmp	x8, #128
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	str	w8, [x19, #12]
	ldr	w8, [x20]
	cmp	w21, w8
	b.ne	LBB0_8
; %bb.4:
Lloh16:
	adrp	x8, _SAA7134_STATUS_VIDEO1@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SAA7134_STATUS_VIDEO1@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_saa_readb
	mov	x20, x0
Lloh19:
	adrp	x8, _SAA7134_STATUS_VIDEO2@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SAA7134_STATUS_VIDEO2@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_saa_readb
	tbnz	w20, #6, LBB0_10
; %bb.5:
	tbnz	w0, #6, LBB0_11
LBB0_6:
	tst	w0, #0xe
	b.eq	LBB0_8
LBB0_7:
Lloh22:
	adrp	x8, _V4L2_IN_ST_MACROVISION@GOTPAGE
Lloh23:
	ldr	x8, [x8, _V4L2_IN_ST_MACROVISION@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_8:
	mov	w0, #0
Lloh25:
	adrp	x8, _SAA7134_NORMS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SAA7134_NORMS@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x19, #4]
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh28:
	adrp	x8, _V4L2_IN_ST_NO_H_LOCK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _V4L2_IN_ST_NO_H_LOCK@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	tbz	w0, #6, LBB0_6
LBB0_11:
Lloh31:
	adrp	x8, _V4L2_IN_ST_NO_SIGNAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _V4L2_IN_ST_NO_SIGNAL@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	tst	w0, #0xe
	b.ne	LBB0_7
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_SAA7134_INPUT_MAX,4,2          ; @SAA7134_INPUT_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SAA7134_NO_INPUT,8,3           ; @SAA7134_NO_INPUT
	.comm	_saa7134_input_name,8,3         ; @saa7134_input_name
	.comm	_V4L2_INPUT_TYPE_TUNER,4,2      ; @V4L2_INPUT_TYPE_TUNER
	.comm	_V4L2_INPUT_TYPE_CAMERA,4,2     ; @V4L2_INPUT_TYPE_CAMERA
	.comm	_SAA7134_STATUS_VIDEO1,4,2      ; @SAA7134_STATUS_VIDEO1
	.comm	_SAA7134_STATUS_VIDEO2,4,2      ; @SAA7134_STATUS_VIDEO2
	.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_MACROVISION,4,2     ; @V4L2_IN_ST_MACROVISION
	.comm	_SAA7134_NORMS,4,2              ; @SAA7134_NORMS
.subsections_via_symbols
