	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vidioc_s_input                 ## -- Begin function vidioc_s_input
	.p2align	4, 0x90
_vidioc_s_input:                        ## @vidioc_s_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	%edx, %r12d
	callq	_video_drvdata
	cmpl	%r12d, 8(%rax)
	jbe	LBB0_5
## %bb.1:
	movq	%rax, %r14
	movq	(%rax), %r15
	movl	%r12d, %r13d
	xorl	%ebx, %ebx
	cmpq	%r13, %r15
	je	LBB0_7
## %bb.2:
	movq	144(%r14), %rbx
	leaq	140(%r14), %rdi
	callq	_vb2_is_busy
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	136(%r14), %rdi
	callq	_vb2_is_busy
	testq	%rax, %rax
	je	LBB0_8
LBB0_4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r13, (%r14)
	movq	$0, 120(%r14)
	movq	16(%r14), %rax
	movl	(%rax,%r13,4), %eax
	leal	-129(%rax), %ecx
	cmpl	$1, %ecx
	ja	LBB0_10
## %bb.9:
	xorl	%ecx, %ecx
	cmpl	$129, %eax
	setne	%cl
	movl	%ecx, 24(%r14)
	movq	_V4L2_STD_ALL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 120(%r14)
	jmp	LBB0_11
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	movq	%rax, 128(%r14)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_vivid_update_format_cap
	movq	104(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.12:
	movq	16(%r14), %rax
	movl	(%rax,%r13,4), %ecx
	leal	-129(%rcx), %eax
	cmpl	$2, %eax
	jb	LBB0_19
## %bb.13:
	movq	_VIVID_CS_SRGB@GOTPCREL(%rip), %rax
	cmpl	$128, %ecx
	je	LBB0_20
## %bb.14:
	cmpl	$131, %ecx
	jne	LBB0_21
## %bb.15:
	movq	_V4L2_DV_FL_IS_CE_VIDEO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx,%r15,4)
	je	LBB0_20
## %bb.16:
	cmpl	$720, 112(%r14)                 ## imm = 0x2D0
	jne	LBB0_30
## %bb.17:
	cmpl	$577, 116(%r14)                 ## imm = 0x241
	jge	LBB0_30
LBB0_19:
	movq	_VIVID_CS_170M@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %esi
	callq	_v4l2_ctrl_s_ctrl
LBB0_21:
	shll	$7, %r12d
	movq	32(%r14), %rax
	movq	96(%r14), %rdi
	movl	(%rax,%r13,4), %ebx
	addl	%r12d, %ebx
	leal	255(%r12), %edx
	leal	128(%r12), %r8d
	movl	%r12d, %esi
	movl	$1, %ecx
	callq	_v4l2_ctrl_modify_range
	movq	96(%r14), %rdi
	movl	%ebx, %esi
	callq	_v4l2_ctrl_s_ctrl
	movq	88(%r14), %rbx
	movq	%r14, %rdi
	callq	_vivid_is_hdmi_cap
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_v4l2_ctrl_activate
	movq	80(%r14), %rbx
	movq	%r14, %rdi
	callq	_vivid_is_hdmi_cap
	testl	%eax, %eax
	movl	$0, %esi
	je	LBB0_23
## %bb.22:
	movq	(%r14), %rax
	movq	40(%r14), %rcx
	movl	(%rcx,%rax,4), %eax
	movq	_SELECTED_DV_TIMINGS@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpl	(%rcx), %eax
	sete	%sil
LBB0_23:
	movq	%rbx, %rdi
	callq	_v4l2_ctrl_activate
	movq	72(%r14), %rbx
	movq	%r14, %rdi
	callq	_vivid_is_sdtv_cap
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_v4l2_ctrl_activate
	movq	64(%r14), %rbx
	movq	%r14, %rdi
	callq	_vivid_is_sdtv_cap
	testl	%eax, %eax
	je	LBB0_25
## %bb.24:
	movq	(%r14), %rax
	movq	48(%r14), %rcx
	xorl	%esi, %esi
	cmpl	$0, (%rcx,%rax,4)
	setne	%sil
	jmp	LBB0_26
LBB0_25:
	xorl	%esi, %esi
LBB0_26:
	movq	%rbx, %rdi
	callq	_v4l2_ctrl_activate
	movq	%r14, %rdi
	callq	_vivid_is_hdmi_cap
	testl	%eax, %eax
	je	LBB0_28
## %bb.27:
	movq	88(%r14), %rdi
	movq	(%r14), %rax
	movq	40(%r14), %rcx
	movl	(%rcx,%rax,4), %esi
	callq	_v4l2_ctrl_s_ctrl
	movq	80(%r14), %rdi
	movq	(%r14), %rax
	movq	56(%r14), %rcx
	movl	(%rcx,%rax,4), %esi
	callq	_v4l2_ctrl_s_ctrl
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_28:
	movq	%r14, %rdi
	callq	_vivid_is_sdtv_cap
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_7
## %bb.29:
	movq	72(%r14), %rdi
	movq	(%r14), %rax
	movq	48(%r14), %rcx
	movl	(%rcx,%rax,4), %esi
	callq	_v4l2_ctrl_s_ctrl
	movq	64(%r14), %rdi
	movq	(%r14), %rax
	movq	48(%r14), %rcx
	movl	(%rcx,%rax,4), %esi
	callq	_v4l2_ctrl_s_ctrl
	jmp	LBB0_7
LBB0_30:
	movq	_VIVID_CS_709@GOTPCREL(%rip), %rax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_V4L2_STD_ALL,8,3               ## @V4L2_STD_ALL
	.comm	_VIVID_CS_SRGB,4,2              ## @VIVID_CS_SRGB
	.comm	_VIVID_CS_170M,4,2              ## @VIVID_CS_170M
	.comm	_V4L2_DV_FL_IS_CE_VIDEO,4,2     ## @V4L2_DV_FL_IS_CE_VIDEO
	.comm	_VIVID_CS_709,4,2               ## @VIVID_CS_709
	.comm	_SELECTED_DV_TIMINGS,4,2        ## @SELECTED_DV_TIMINGS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vidioc_s_input                 ; -- Begin function vidioc_s_input
	.p2align	2
_vidioc_s_input:                        ; @vidioc_s_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	x20, x2
	bl	_video_drvdata
	ldr	w8, [x0, #8]
	cmp	w8, w20
	b.ls	LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x22, [x0]
	mov	w21, w20
	cmp	x22, x21
	b.ne	LBB0_4
LBB0_2:
	mov	w0, #0
	b	LBB0_8
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	ldr	x23, [x19, #144]
	add	x0, x19, #140
	bl	_vb2_is_busy
	cbnz	x0, LBB0_6
; %bb.5:
	add	x0, x19, #136
	bl	_vb2_is_busy
	cbz	x0, LBB0_9
LBB0_6:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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_9:
	mov	x8, #0
	str	x21, [x19]
	str	xzr, [x19, #120]
	ldr	x9, [x19, #16]
	ldr	w9, [x9, x21, lsl #2]
	sub	w10, w9, #129
	cmp	w10, #1
	b.hi	LBB0_11
; %bb.10:
	cmp	w9, #129
	cset	w8, ne
	str	w8, [x19, #24]
Lloh4:
	adrp	x8, _V4L2_STD_ALL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _V4L2_STD_ALL@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	str	x8, [x19, #120]
LBB0_11:
	str	x8, [x19, #128]
	mov	x0, x19
	mov	w1, #0
	bl	_vivid_update_format_cap
	ldr	x0, [x19, #104]
	cbz	x0, LBB0_22
; %bb.12:
	ldr	x8, [x19, #16]
	ldr	w8, [x8, x21, lsl #2]
	sub	w9, w8, #129
	cmp	w9, #2
	b.lo	LBB0_18
; %bb.13:
	cmp	w8, #128
	b.eq	LBB0_19
; %bb.14:
	cmp	w8, #131
	b.ne	LBB0_22
; %bb.15:
	ldr	w8, [x23, x22, lsl #2]
Lloh7:
	adrp	x9, _V4L2_DV_FL_IS_CE_VIDEO@GOTPAGE
Lloh8:
	ldr	x9, [x9, _V4L2_DV_FL_IS_CE_VIDEO@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.16:
	ldr	w8, [x19, #112]
	cmp	w8, #720
	b.ne	LBB0_20
; %bb.17:
	ldr	w8, [x19, #116]
	cmp	w8, #577
	b.ge	LBB0_20
LBB0_18:
Lloh10:
	adrp	x8, _VIVID_CS_170M@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VIVID_CS_170M@GOTPAGEOFF]
	b	LBB0_21
LBB0_19:
Lloh12:
	adrp	x8, _VIVID_CS_SRGB@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VIVID_CS_SRGB@GOTPAGEOFF]
	b	LBB0_21
LBB0_20:
Lloh14:
	adrp	x8, _VIVID_CS_709@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VIVID_CS_709@GOTPAGEOFF]
LBB0_21:
	ldr	w1, [x8]
	bl	_v4l2_ctrl_s_ctrl
LBB0_22:
	lsl	w1, w20, #7
	ldr	x8, [x19, #32]
	ldr	w8, [x8, x21, lsl #2]
	add	w20, w8, w1
	ldr	x0, [x19, #96]
	add	w2, w1, #255
	add	w4, w1, #128
	mov	w3, #1
	bl	_v4l2_ctrl_modify_range
	ldr	x0, [x19, #96]
	mov	x1, x20
	bl	_v4l2_ctrl_s_ctrl
	ldr	x20, [x19, #88]
	mov	x0, x19
	bl	_vivid_is_hdmi_cap
	mov	x1, x0
	mov	x0, x20
	bl	_v4l2_ctrl_activate
	ldr	x20, [x19, #80]
	mov	x0, x19
	bl	_vivid_is_hdmi_cap
	cbz	w0, LBB0_24
; %bb.23:
	ldr	x8, [x19, #40]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
Lloh16:
	adrp	x9, _SELECTED_DV_TIMINGS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SELECTED_DV_TIMINGS@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w1, eq
	b	LBB0_25
LBB0_24:
	mov	w1, #0
LBB0_25:
	mov	x0, x20
	bl	_v4l2_ctrl_activate
	ldr	x20, [x19, #72]
	mov	x0, x19
	bl	_vivid_is_sdtv_cap
	mov	x1, x0
	mov	x0, x20
	bl	_v4l2_ctrl_activate
	ldr	x20, [x19, #64]
	mov	x0, x19
	bl	_vivid_is_sdtv_cap
	cbz	w0, LBB0_27
; %bb.26:
	ldr	x8, [x19, #48]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #0
	cset	w1, ne
	b	LBB0_28
LBB0_27:
	mov	w1, #0
LBB0_28:
	mov	x0, x20
	bl	_v4l2_ctrl_activate
	mov	x0, x19
	bl	_vivid_is_hdmi_cap
	cbz	w0, LBB0_30
; %bb.29:
	ldr	x0, [x19, #88]
	ldr	x8, [x19, #40]
	ldr	x9, [x19]
	ldr	w1, [x8, x9, lsl #2]
	bl	_v4l2_ctrl_s_ctrl
	ldr	x0, [x19, #80]
	ldr	x8, [x19, #56]
	b	LBB0_32
LBB0_30:
	mov	x0, x19
	bl	_vivid_is_sdtv_cap
	cbz	w0, LBB0_8
; %bb.31:
	ldr	x0, [x19, #72]
	ldr	x8, [x19, #48]
	ldr	x9, [x19]
	ldr	w1, [x8, x9, lsl #2]
	bl	_v4l2_ctrl_s_ctrl
	ldr	x0, [x19, #64]
	ldr	x8, [x19, #48]
LBB0_32:
	ldr	x9, [x19]
	ldr	w1, [x8, x9, lsl #2]
	bl	_v4l2_ctrl_s_ctrl
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_V4L2_STD_ALL,8,3               ; @V4L2_STD_ALL
	.comm	_VIVID_CS_SRGB,4,2              ; @VIVID_CS_SRGB
	.comm	_VIVID_CS_170M,4,2              ; @VIVID_CS_170M
	.comm	_V4L2_DV_FL_IS_CE_VIDEO,4,2     ; @V4L2_DV_FL_IS_CE_VIDEO
	.comm	_VIVID_CS_709,4,2               ; @VIVID_CS_709
	.comm	_SELECTED_DV_TIMINGS,4,2        ; @SELECTED_DV_TIMINGS
.subsections_via_symbols
