	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function input_change
_input_change:                          ## @input_change
	.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	%rdi, %r14
	callq	_i2c_get_clientdata
	movl	%eax, %edi
	callq	_to_state
	movq	%rax, %rbx
	movl	(%rax), %r15d
	movq	_V4L2_STD_SECAM@GOTPCREL(%rip), %r12
	testl	%r15d, (%r12)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	$1026, %esi                     ## imm = 0x402
	xorl	%edx, %edx
	jmp	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	movl	$1026, %esi                     ## imm = 0x402
	movl	$4, %edx
	callq	_cx25840_write
	movq	_V4L2_STD_NTSC@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	(%rax), %eax
	andl	%r15d, %eax
	setne	%cl
	leal	(%rcx,%rcx,2), %edx
	addl	$17, %edx
	movq	%r14, %rdi
	movl	$1183, %esi                     ## imm = 0x49F
LBB0_3:
	callq	_cx25840_write
	movq	%r14, %rdi
	movl	$1025, %esi                     ## imm = 0x401
	movl	$-97, %edx
	xorl	%ecx, %ecx
	callq	_cx25840_and_or
	movq	%r14, %rdi
	movl	$1025, %esi                     ## imm = 0x401
	movl	$-97, %edx
	movl	$96, %ecx
	callq	_cx25840_and_or
	movq	%rbx, %rdi
	callq	_is_cx2583x
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	movl	$2064, %esi                     ## imm = 0x810
	movl	$-2, %edx
	movl	$1, %ecx
	callq	_cx25840_and_or
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movl	$2056, %esi                     ## imm = 0x808
	movl	$249, %edx
	jmp	LBB0_16
LBB0_7:
	movq	_V4L2_STD_525_60@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_10
## %bb.8:
	movl	4(%rbx), %eax
	movq	_V4L2_STD_NTSC_M_JP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r15d
	jne	LBB0_12
## %bb.9:
	testl	%eax, %eax
	movl	$247, %eax
	movl	$47, %edx
	jmp	LBB0_15
LBB0_10:
	movq	_V4L2_STD_PAL@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_20
## %bb.11:
	movq	%r14, %rdi
	movl	$2056, %esi                     ## imm = 0x808
	movl	$255, %edx
	jmp	LBB0_16
LBB0_12:
	movq	_V4L2_STD_NTSC_M_KR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r15d
	jne	LBB0_14
## %bb.13:
	testl	%eax, %eax
	movl	$248, %eax
	movl	$63, %edx
	jmp	LBB0_15
LBB0_14:
	testl	%eax, %eax
	movl	$246, %eax
	movl	$31, %edx
LBB0_15:
	cmovel	%eax, %edx
	movq	%r14, %rdi
	movl	$2056, %esi                     ## imm = 0x808
LBB0_16:
	callq	_cx25840_write
LBB0_17:
	xorl	%edx, %edx
LBB0_18:
	movq	%r14, %rdi
	movl	$2059, %esi                     ## imm = 0x80B
	callq	_cx25840_write
LBB0_19:
	movq	%r14, %rdi
	movl	$2064, %esi                     ## imm = 0x810
	movl	$-2, %edx
	xorl	%ecx, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cx25840_and_or                 ## TAILCALL
LBB0_20:
	testl	%r15d, (%r12)
	je	LBB0_19
## %bb.21:
	movq	%r14, %rdi
	movl	$2056, %esi                     ## imm = 0x808
	movl	$255, %edx
	callq	_cx25840_write
	movq	_V4L2_STD_SECAM_DK@GOTPCREL(%rip), %rcx
	movq	_V4L2_STD_SECAM_L@GOTPCREL(%rip), %rdx
	movq	_V4L2_STD_SECAM_LC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rdx), %eax
	testl	%r15d, (%rcx)
	je	LBB0_24
## %bb.22:
	testl	%r15d, %eax
	jne	LBB0_25
	jmp	LBB0_17
LBB0_24:
	movl	$8, %edx
	testl	%r15d, %eax
	jne	LBB0_18
LBB0_25:
	movl	$16, %edx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_STD_SECAM,4,2             ## @V4L2_STD_SECAM
	.comm	_V4L2_STD_NTSC,4,2              ## @V4L2_STD_NTSC
	.comm	_V4L2_STD_525_60,4,2            ## @V4L2_STD_525_60
	.comm	_V4L2_STD_NTSC_M_JP,4,2         ## @V4L2_STD_NTSC_M_JP
	.comm	_V4L2_STD_NTSC_M_KR,4,2         ## @V4L2_STD_NTSC_M_KR
	.comm	_V4L2_STD_PAL,4,2               ## @V4L2_STD_PAL
	.comm	_V4L2_STD_SECAM_DK,4,2          ## @V4L2_STD_SECAM_DK
	.comm	_V4L2_STD_SECAM_L,4,2           ## @V4L2_STD_SECAM_L
	.comm	_V4L2_STD_SECAM_LC,4,2          ## @V4L2_STD_SECAM_LC
	.no_dead_strip	_input_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function input_change
_input_change:                          ; @input_change
	.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, x0
	bl	_i2c_get_clientdata
	bl	_to_state
	mov	x20, x0
	ldr	w21, [x0]
Lloh0:
	adrp	x22, _V4L2_STD_SECAM@GOTPAGE
Lloh1:
	ldr	x22, [x22, _V4L2_STD_SECAM@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	x0, x19
	mov	w1, #1026
	tst	w8, w21
	b.eq	LBB0_2
; %bb.1:
	mov	w2, #0
	b	LBB0_3
LBB0_2:
	mov	w2, #4
	bl	_cx25840_write
Lloh2:
	adrp	x8, _V4L2_STD_NTSC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_STD_NTSC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w21
	mov	w8, #20
	mov	w9, #17
	csel	w2, w9, w8, eq
	mov	x0, x19
	mov	w1, #1183
LBB0_3:
	bl	_cx25840_write
	mov	x0, x19
	mov	w1, #1025
	mov	w2, #-97
	mov	w3, #0
	bl	_cx25840_and_or
	mov	x0, x19
	mov	w1, #1025
	mov	w2, #-97
	mov	w3, #96
	bl	_cx25840_and_or
	mov	x0, x20
	bl	_is_cx2583x
	cbz	x0, LBB0_5
; %bb.4:
	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_5:
	mov	x0, x19
	mov	w1, #2064
	mov	w2, #-2
	mov	w3, #1
	bl	_cx25840_and_or
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	w1, #2056
	mov	w2, #249
	b	LBB0_14
LBB0_7:
Lloh5:
	adrp	x8, _V4L2_STD_525_60@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V4L2_STD_525_60@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_10
; %bb.8:
	ldr	w8, [x20, #4]
Lloh8:
	adrp	x9, _V4L2_STD_NTSC_M_JP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _V4L2_STD_NTSC_M_JP@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w21, w9
	b.ne	LBB0_12
; %bb.9:
	mov	w9, #47
	mov	w10, #247
	cmp	w8, #0
	csel	w2, w10, w9, eq
	b	LBB0_13
LBB0_10:
Lloh11:
	adrp	x8, _V4L2_STD_PAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_STD_PAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_18
; %bb.11:
	mov	x0, x19
	mov	w1, #2056
	mov	w2, #255
	b	LBB0_14
LBB0_12:
Lloh14:
	adrp	x9, _V4L2_STD_NTSC_M_KR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _V4L2_STD_NTSC_M_KR@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	mov	w10, #31
	mov	w11, #246
	cmp	w8, #0
	csel	w8, w11, w10, eq
	mov	w10, #63
	mov	w11, #248
	csel	w10, w11, w10, eq
	cmp	w21, w9
	csel	w2, w8, w10, ne
LBB0_13:
	mov	x0, x19
	mov	w1, #2056
LBB0_14:
	bl	_cx25840_write
LBB0_15:
	mov	w2, #0
LBB0_16:
	mov	x0, x19
	mov	w1, #2059
	bl	_cx25840_write
LBB0_17:
	mov	x0, x19
	mov	w1, #2064
	mov	w2, #-2
	mov	w3, #0
	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
	b	_cx25840_and_or
LBB0_18:
	ldr	w8, [x22]
	tst	w8, w21
	b.eq	LBB0_17
; %bb.19:
	mov	x0, x19
	mov	w1, #2056
	mov	w2, #255
	bl	_cx25840_write
Lloh17:
	adrp	x8, _V4L2_STD_SECAM_DK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _V4L2_STD_SECAM_DK@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x8]
Lloh20:
	adrp	x8, _V4L2_STD_SECAM_L@GOTPAGE
Lloh21:
	ldr	x8, [x8, _V4L2_STD_SECAM_L@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x10, _V4L2_STD_SECAM_LC@GOTPAGE
Lloh24:
	ldr	x10, [x10, _V4L2_STD_SECAM_LC@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	orr	w8, w10, w8
	and	w8, w8, w21
	tst	w9, w21
	b.eq	LBB0_21
; %bb.20:
	cbnz	w8, LBB0_23
	b	LBB0_15
LBB0_21:
	cbz	w8, LBB0_23
; %bb.22:
	mov	w2, #8
	b	LBB0_16
LBB0_23:
	mov	w2, #16
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_STD_SECAM,4,2             ; @V4L2_STD_SECAM
	.comm	_V4L2_STD_NTSC,4,2              ; @V4L2_STD_NTSC
	.comm	_V4L2_STD_525_60,4,2            ; @V4L2_STD_525_60
	.comm	_V4L2_STD_NTSC_M_JP,4,2         ; @V4L2_STD_NTSC_M_JP
	.comm	_V4L2_STD_NTSC_M_KR,4,2         ; @V4L2_STD_NTSC_M_KR
	.comm	_V4L2_STD_PAL,4,2               ; @V4L2_STD_PAL
	.comm	_V4L2_STD_SECAM_DK,4,2          ; @V4L2_STD_SECAM_DK
	.comm	_V4L2_STD_SECAM_L,4,2           ; @V4L2_STD_SECAM_L
	.comm	_V4L2_STD_SECAM_LC,4,2          ; @V4L2_STD_SECAM_LC
	.no_dead_strip	_input_change
.subsections_via_symbols
