	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_enum_input             ## -- Begin function cx231xx_enum_input
	.p2align	4, 0x90
_cx231xx_enum_input:                    ## @cx231xx_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
	movl	(%rdx), %ebx
	movq	_MAX_CX231XX_INPUT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jae	LBB0_1
## %bb.2:
	movq	%rdx, %r15
	movq	(%rsi), %r14
	movl	%ebx, %edi
	callq	_INPUT
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.3:
	movl	%ebx, (%r15)
	movq	_V4L2_INPUT_TYPE_CAMERA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movl	16(%r15), %r12d
	movq	_iname@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	%ebx, %edi
	callq	_INPUT
	movq	(%rax), %rax
	movl	(%r13,%rax,4), %esi
	movl	%r12d, %edi
	movl	$4, %edx
	callq	_strscpy
	movq	_CX231XX_VMUX_TELEVISION@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movl	%ebx, %edi
	callq	_INPUT
	cmpq	(%rax), %r12
	je	LBB0_5
## %bb.4:
	movq	_CX231XX_VMUX_CABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movl	%ebx, %edi
	callq	_INPUT
	cmpq	(%rax), %r12
	jne	LBB0_6
LBB0_5:
	movq	_V4L2_INPUT_TYPE_TUNER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
LBB0_6:
	movl	4(%r14), %eax
	movl	%eax, 8(%r15)
	xorl	%r12d, %r12d
	cmpl	(%r14), %ebx
	jne	LBB0_12
## %bb.7:
	movq	_VID_BLK_I2C_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GEN_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %r8
	movq	%r14, %rdi
	movl	$2, %ecx
	movl	$4, %r9d
	callq	_cx231xx_read_i2c_data
	testl	%eax, %eax
	jle	LBB0_12
## %bb.8:
	movl	-44(%rbp), %eax
	movq	_FLD_VPRES@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_10
## %bb.9:
	movq	_V4L2_IN_ST_NO_SIGNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 4(%r15)
LBB0_10:
	movq	_FLD_HLOCK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_12
## %bb.11:
	movq	_V4L2_IN_ST_NO_H_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r15)
	jmp	LBB0_12
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_12:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CX231XX_INPUT,4,2          ## @MAX_CX231XX_INPUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_INPUT_TYPE_CAMERA,4,2     ## @V4L2_INPUT_TYPE_CAMERA
	.comm	_iname,8,3                      ## @iname
	.comm	_CX231XX_VMUX_TELEVISION,8,3    ## @CX231XX_VMUX_TELEVISION
	.comm	_CX231XX_VMUX_CABLE,8,3         ## @CX231XX_VMUX_CABLE
	.comm	_V4L2_INPUT_TYPE_TUNER,4,2      ## @V4L2_INPUT_TYPE_TUNER
	.comm	_VID_BLK_I2C_ADDRESS,4,2        ## @VID_BLK_I2C_ADDRESS
	.comm	_GEN_STAT,4,2                   ## @GEN_STAT
	.comm	_FLD_VPRES,4,2                  ## @FLD_VPRES
	.comm	_V4L2_IN_ST_NO_SIGNAL,4,2       ## @V4L2_IN_ST_NO_SIGNAL
	.comm	_FLD_HLOCK,4,2                  ## @FLD_HLOCK
	.comm	_V4L2_IN_ST_NO_H_LOCK,4,2       ## @V4L2_IN_ST_NO_H_LOCK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_enum_input             ; -- Begin function cx231xx_enum_input
	.p2align	2
_cx231xx_enum_input:                    ; @cx231xx_enum_input
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w21, [x2]
Lloh0:
	adrp	x8, _MAX_CX231XX_INPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_CX231XX_INPUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w21, w8
	b.hs	LBB0_11
; %bb.1:
	mov	x19, x2
	ldr	x20, [x1]
	mov	x0, x21
	bl	_INPUT
	ldr	x8, [x0]
	cbz	x8, LBB0_11
; %bb.2:
	str	w21, [x19]
Lloh3:
	adrp	x8, _V4L2_INPUT_TYPE_CAMERA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_INPUT_TYPE_CAMERA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	ldr	w22, [x19, #16]
Lloh6:
	adrp	x8, _iname@GOTPAGE
Lloh7:
	ldr	x8, [x8, _iname@GOTPAGEOFF]
Lloh8:
	ldr	x23, [x8]
	mov	x0, x21
	bl	_INPUT
	ldr	x8, [x0]
	ldr	w1, [x23, x8, lsl #2]
	mov	x0, x22
	mov	w2, #4
	bl	_strscpy
Lloh9:
	adrp	x8, _CX231XX_VMUX_TELEVISION@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CX231XX_VMUX_TELEVISION@GOTPAGEOFF]
Lloh11:
	ldr	x22, [x8]
	mov	x0, x21
	bl	_INPUT
	ldr	x8, [x0]
	cmp	x22, x8
	b.eq	LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _CX231XX_VMUX_CABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CX231XX_VMUX_CABLE@GOTPAGEOFF]
Lloh14:
	ldr	x22, [x8]
	mov	x0, x21
	bl	_INPUT
	ldr	x8, [x0]
	cmp	x22, x8
	b.ne	LBB0_5
LBB0_4:
Lloh15:
	adrp	x8, _V4L2_INPUT_TYPE_TUNER@GOTPAGE
Lloh16:
	ldr	x8, [x8, _V4L2_INPUT_TYPE_TUNER@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19, #12]
LBB0_5:
	ldp	w9, w8, [x20]
	str	w8, [x19, #8]
	cmp	w21, w9
	b.ne	LBB0_10
; %bb.6:
Lloh18:
	adrp	x8, _VID_BLK_I2C_ADDRESS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VID_BLK_I2C_ADDRESS@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _GEN_STAT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GEN_STAT@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	add	x4, sp, #12
	mov	x0, x20
	mov	w3, #2
	mov	w5, #4
	bl	_cx231xx_read_i2c_data
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.7:
	ldr	w8, [sp, #12]
Lloh24:
	adrp	x9, _FLD_VPRES@GOTPAGE
Lloh25:
	ldr	x9, [x9, _FLD_VPRES@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_9
; %bb.8:
Lloh27:
	adrp	x9, _V4L2_IN_ST_NO_SIGNAL@GOTPAGE
Lloh28:
	ldr	x9, [x9, _V4L2_IN_ST_NO_SIGNAL@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	ldr	w10, [x19, #4]
	orr	w9, w10, w9
	str	w9, [x19, #4]
LBB0_9:
Lloh30:
	adrp	x9, _FLD_HLOCK@GOTPAGE
Lloh31:
	ldr	x9, [x9, _FLD_HLOCK@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
LBB0_10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
Lloh33:
	adrp	x8, _EINVAL@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_13:
	mov	w0, #0
Lloh36:
	adrp	x8, _V4L2_IN_ST_NO_H_LOCK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _V4L2_IN_ST_NO_H_LOCK@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.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	_MAX_CX231XX_INPUT,4,2          ; @MAX_CX231XX_INPUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_INPUT_TYPE_CAMERA,4,2     ; @V4L2_INPUT_TYPE_CAMERA
	.comm	_iname,8,3                      ; @iname
	.comm	_CX231XX_VMUX_TELEVISION,8,3    ; @CX231XX_VMUX_TELEVISION
	.comm	_CX231XX_VMUX_CABLE,8,3         ; @CX231XX_VMUX_CABLE
	.comm	_V4L2_INPUT_TYPE_TUNER,4,2      ; @V4L2_INPUT_TYPE_TUNER
	.comm	_VID_BLK_I2C_ADDRESS,4,2        ; @VID_BLK_I2C_ADDRESS
	.comm	_GEN_STAT,4,2                   ; @GEN_STAT
	.comm	_FLD_VPRES,4,2                  ; @FLD_VPRES
	.comm	_V4L2_IN_ST_NO_SIGNAL,4,2       ; @V4L2_IN_ST_NO_SIGNAL
	.comm	_FLD_HLOCK,4,2                  ; @FLD_HLOCK
	.comm	_V4L2_IN_ST_NO_H_LOCK,4,2       ; @V4L2_IN_ST_NO_H_LOCK
.subsections_via_symbols
