	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_video_set_io              ## -- Begin function ivtv_video_set_io
	.p2align	4, 0x90
_ivtv_video_set_io:                     ## @ivtv_video_set_io
	.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	%rdi, %r14
	movslq	(%rdi), %rbx
	movl	16(%rdi), %edi
	movq	_video@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_s_routing@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	8(%r14), %rax
	movq	24(%rax), %rax
	shlq	$4, %rbx
	movl	8(%rax,%rbx), %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_v4l2_subdev_call
	movq	8(%r14), %rax
	movq	24(%rax), %rcx
	movq	(%rcx,%rbx), %r12
	movl	(%rax), %ecx
	movq	_IVTV_HW_GPIO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	testl	%ecx, %esi
	je	LBB0_2
## %bb.1:
	movq	_IVTV_CARD_INPUT_VID_TUNER@GOTPCREL(%rip), %rax
	movq	_IVTV_CARD_INPUT_COMPOSITE1@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %r12
	setl	%dl
	incq	%rdx
	xorl	%r8d, %r8d
	cmpq	(%rax), %r12
	cmovneq	%rdx, %r8
	movl	(%r13), %edx
	movl	(%r15), %ecx
	movl	$0, (%rsp)
	movq	%r14, %rdi
	xorl	%r9d, %r9d
	callq	_ivtv_call_hw
	movq	8(%r14), %rax
	movl	(%rax), %ecx
LBB0_2:
	movq	_IVTV_HW_UPD64031A@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	testl	%ecx, %esi
	je	LBB0_4
## %bb.3:
	movq	_IVTV_CARD_INPUT_VID_TUNER@GOTPCREL(%rip), %r9
	movq	_IVTV_CARD_INPUT_COMPOSITE1@GOTPCREL(%rip), %rdx
	movq	_UPD64031A_GR_OFF@GOTPCREL(%rip), %rdi
	movq	_UPD64031A_GR_ON@GOTPCREL(%rip), %rbx
	movq	_UPD64031A_3DYCS_DISABLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	orq	(%rdi), %r8
	movq	_UPD64031A_3DYCS_COMPOSITE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orq	(%rbx), %rcx
	cmpq	(%rdx), %r12
	cmovgeq	%rcx, %r8
	cmpq	(%r9), %r12
	cmoveq	%rcx, %r8
	orq	8(%rax), %r8
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %ecx
	movl	$0, (%rsp)
	movq	%r14, %rdi
	xorl	%r9d, %r9d
	callq	_ivtv_call_hw
	movq	8(%r14), %rax
	movl	(%rax), %ecx
LBB0_4:
	movq	_IVTV_HW_UPD6408X@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	testl	%ecx, %esi
	je	LBB0_14
## %bb.5:
	movq	_UPD64083_YCS_MODE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r8
	movq	_IVTV_CARD_INPUT_VID_TUNER@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, %r12
	jle	LBB0_8
## %bb.6:
	movq	_IVTV_CARD_INPUT_COMPOSITE1@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %r12
	jge	LBB0_8
## %bb.7:
	movq	_UPD64083_YCNR_MODE@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_8:
	testl	%ecx, (%r13)
	je	LBB0_13
## %bb.9:
	cmpq	%rdx, %r12
	je	LBB0_11
## %bb.10:
	movq	16(%rax), %rax
	movq	_IVTV_CARD_CX23416GYC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
LBB0_11:
	movq	_UPD64083_EXT_Y_ADC@GOTPCREL(%rip), %rax
LBB0_12:
	orq	(%rax), %r8
LBB0_13:
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %ecx
	movl	$0, (%rsp)
	movq	%r14, %rdi
	xorl	%r9d, %r9d
	callq	_ivtv_call_hw
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_video,4,2                      ## @video
	.comm	_s_routing,4,2                  ## @s_routing
	.comm	_IVTV_CARD_INPUT_VID_TUNER,8,3  ## @IVTV_CARD_INPUT_VID_TUNER
	.comm	_IVTV_CARD_INPUT_COMPOSITE1,8,3 ## @IVTV_CARD_INPUT_COMPOSITE1
	.comm	_IVTV_HW_GPIO,4,2               ## @IVTV_HW_GPIO
	.comm	_IVTV_HW_UPD64031A,4,2          ## @IVTV_HW_UPD64031A
	.comm	_UPD64031A_GR_ON,8,3            ## @UPD64031A_GR_ON
	.comm	_UPD64031A_3DYCS_COMPOSITE,8,3  ## @UPD64031A_3DYCS_COMPOSITE
	.comm	_UPD64031A_GR_OFF,8,3           ## @UPD64031A_GR_OFF
	.comm	_UPD64031A_3DYCS_DISABLE,8,3    ## @UPD64031A_3DYCS_DISABLE
	.comm	_IVTV_HW_UPD6408X,4,2           ## @IVTV_HW_UPD6408X
	.comm	_UPD64083_YCS_MODE,8,3          ## @UPD64083_YCS_MODE
	.comm	_UPD64083_YCNR_MODE,8,3         ## @UPD64083_YCNR_MODE
	.comm	_IVTV_CARD_CX23416GYC,8,3       ## @IVTV_CARD_CX23416GYC
	.comm	_UPD64083_EXT_Y_ADC,8,3         ## @UPD64083_EXT_Y_ADC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_video_set_io              ; -- Begin function ivtv_video_set_io
	.p2align	2
_ivtv_video_set_io:                     ; @ivtv_video_set_io
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldrsw	x8, [x0]
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x20, _video@GOTPAGE
Lloh1:
	ldr	x20, [x20, _video@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x21, _s_routing@GOTPAGE
Lloh3:
	ldr	x21, [x21, _s_routing@GOTPAGEOFF]
	ldr	w2, [x21]
	ldr	x9, [x19, #8]
	ldr	x9, [x9, #24]
	lsl	x22, x8, #4
	add	x8, x9, x22
	ldr	w3, [x8, #8]
	mov	w4, #0
	mov	w5, #0
	bl	_v4l2_subdev_call
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #24]
	ldr	x22, [x9, x22]
	ldr	w9, [x8]
Lloh4:
	adrp	x10, _IVTV_HW_GPIO@GOTPAGE
Lloh5:
	ldr	x10, [x10, _IVTV_HW_GPIO@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x10]
Lloh7:
	adrp	x23, _IVTV_CARD_INPUT_VID_TUNER@GOTPAGE
Lloh8:
	ldr	x23, [x23, _IVTV_CARD_INPUT_VID_TUNER@GOTPAGEOFF]
Lloh9:
	adrp	x24, _IVTV_CARD_INPUT_COMPOSITE1@GOTPAGE
Lloh10:
	ldr	x24, [x24, _IVTV_CARD_INPUT_COMPOSITE1@GOTPAGEOFF]
	tst	w1, w9
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x23]
	ldr	x9, [x24]
	cmp	x22, x9
	mov	w9, #1
	cinc	x9, x9, lt
	cmp	x22, x8
	csel	x4, xzr, x9, eq
	ldr	w2, [x20]
	ldr	w3, [x21]
	mov	x0, x19
	mov	w5, #0
	mov	w6, #0
	bl	_ivtv_call_hw
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
LBB0_2:
Lloh11:
	adrp	x25, _IVTV_HW_UPD64031A@GOTPAGE
Lloh12:
	ldr	x25, [x25, _IVTV_HW_UPD64031A@GOTPAGEOFF]
	ldr	w1, [x25]
	tst	w1, w9
	b.eq	LBB0_4
; %bb.3:
	ldr	x9, [x23]
	ldr	x10, [x24]
	cmp	x22, x10
Lloh13:
	adrp	x10, _UPD64031A_GR_OFF@GOTPAGE
Lloh14:
	ldr	x10, [x10, _UPD64031A_GR_OFF@GOTPAGEOFF]
	ccmp	x22, x9, #4, lt
Lloh15:
	ldr	x9, [x10]
Lloh16:
	adrp	x10, _UPD64031A_GR_ON@GOTPAGE
Lloh17:
	ldr	x10, [x10, _UPD64031A_GR_ON@GOTPAGEOFF]
Lloh18:
	adrp	x11, _UPD64031A_3DYCS_DISABLE@GOTPAGE
Lloh19:
	ldr	x11, [x11, _UPD64031A_3DYCS_DISABLE@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
Lloh21:
	ldr	x11, [x11]
Lloh22:
	adrp	x12, _UPD64031A_3DYCS_COMPOSITE@GOTPAGE
Lloh23:
	ldr	x12, [x12, _UPD64031A_3DYCS_COMPOSITE@GOTPAGEOFF]
Lloh24:
	ldr	x12, [x12]
	orr	x9, x11, x9
	orr	x10, x12, x10
	csel	x9, x9, x10, ne
	ldr	x8, [x8, #8]
	orr	x4, x8, x9
	ldr	w2, [x20]
	ldr	w3, [x21]
	mov	x0, x19
	mov	w5, #0
	mov	w6, #0
	bl	_ivtv_call_hw
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
LBB0_4:
Lloh25:
	adrp	x10, _IVTV_HW_UPD6408X@GOTPAGE
Lloh26:
	ldr	x10, [x10, _IVTV_HW_UPD6408X@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x10]
	tst	w1, w9
	b.eq	LBB0_10
; %bb.5:
Lloh28:
	adrp	x10, _UPD64083_YCS_MODE@GOTPAGE
Lloh29:
	ldr	x10, [x10, _UPD64083_YCS_MODE@GOTPAGEOFF]
Lloh30:
	ldr	x4, [x10]
	ldr	x10, [x23]
	ldr	x11, [x24]
	cmp	x22, x10
	ccmp	x22, x11, #0, gt
	b.lt	LBB0_11
; %bb.6:
	ldr	w11, [x25]
	tst	w11, w9
	b.eq	LBB0_13
; %bb.7:
	cmp	x22, x10
	b.eq	LBB0_9
; %bb.8:
	ldr	x8, [x8, #16]
Lloh31:
	adrp	x9, _IVTV_CARD_CX23416GYC@GOTPAGE
Lloh32:
	ldr	x9, [x9, _IVTV_CARD_CX23416GYC@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
LBB0_9:
Lloh34:
	adrp	x8, _UPD64083_EXT_Y_ADC@GOTPAGE
Lloh35:
	ldr	x8, [x8, _UPD64083_EXT_Y_ADC@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh36:
	adrp	x8, _UPD64083_YCNR_MODE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _UPD64083_YCNR_MODE@GOTPAGEOFF]
LBB0_12:
	ldr	x8, [x8]
	orr	x4, x8, x4
LBB0_13:
	ldr	w2, [x20]
	ldr	w3, [x21]
	mov	x0, x19
	mov	w5, #0
	mov	w6, #0
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ivtv_call_hw
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_video,4,2                      ; @video
	.comm	_s_routing,4,2                  ; @s_routing
	.comm	_IVTV_CARD_INPUT_VID_TUNER,8,3  ; @IVTV_CARD_INPUT_VID_TUNER
	.comm	_IVTV_CARD_INPUT_COMPOSITE1,8,3 ; @IVTV_CARD_INPUT_COMPOSITE1
	.comm	_IVTV_HW_GPIO,4,2               ; @IVTV_HW_GPIO
	.comm	_IVTV_HW_UPD64031A,4,2          ; @IVTV_HW_UPD64031A
	.comm	_UPD64031A_GR_ON,8,3            ; @UPD64031A_GR_ON
	.comm	_UPD64031A_3DYCS_COMPOSITE,8,3  ; @UPD64031A_3DYCS_COMPOSITE
	.comm	_UPD64031A_GR_OFF,8,3           ; @UPD64031A_GR_OFF
	.comm	_UPD64031A_3DYCS_DISABLE,8,3    ; @UPD64031A_3DYCS_DISABLE
	.comm	_IVTV_HW_UPD6408X,4,2           ; @IVTV_HW_UPD6408X
	.comm	_UPD64083_YCS_MODE,8,3          ; @UPD64083_YCS_MODE
	.comm	_UPD64083_YCNR_MODE,8,3         ; @UPD64083_YCNR_MODE
	.comm	_IVTV_CARD_CX23416GYC,8,3       ; @IVTV_CARD_CX23416GYC
	.comm	_UPD64083_EXT_Y_ADC,8,3         ; @UPD64083_EXT_Y_ADC
.subsections_via_symbols
