	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function preview_link_setup
_preview_link_setup:                    ## @preview_link_setup
	.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
	movl	%ecx, %r15d
	movq	%rdx, %r12
	movq	%rsi, %rbx
	callq	_media_entity_to_v4l2_subdev
	movq	%rax, %rdi
	callq	_v4l2_get_subdevdata
	movq	%rax, %r14
	movl	(%rbx), %ebx
	movl	4(%r12), %edi
	callq	_is_media_entity_v4l2_subdev
	movl	%ebx, %ecx
	orl	$131072, %ecx                   ## imm = 0x20000
	testq	%rax, %rax
	cmovel	%ebx, %ecx
	cmpl	$131199, %ecx                   ## imm = 0x2007F
	jg	LBB0_6
## %bb.1:
	cmpl	$128, %ecx
	je	LBB0_12
## %bb.2:
	cmpl	$129, %ecx
	jne	LBB0_18
## %bb.3:
	movq	_MEDIA_LNK_FL_ENABLED@GOTPCREL(%rip), %rax
	movq	8(%r14), %rcx
	testl	%r15d, (%rax)
	je	LBB0_21
## %bb.4:
	movq	_PREVIEW_INPUT_CCDC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_17
## %bb.5:
	movq	_PREVIEW_INPUT_MEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_6:
	cmpl	$131200, %ecx                   ## imm = 0x20080
	je	LBB0_14
## %bb.7:
	cmpl	$131201, %ecx                   ## imm = 0x20081
	jne	LBB0_18
## %bb.8:
	movq	_MEDIA_LNK_FL_ENABLED@GOTPCREL(%rip), %rax
	movq	8(%r14), %rcx
	testl	%r15d, (%rax)
	je	LBB0_22
## %bb.9:
	movq	_PREVIEW_INPUT_MEMORY@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_17
## %bb.10:
	movq	_PREVIEW_INPUT_CCDC@GOTPCREL(%rip), %rax
LBB0_11:
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	jmp	LBB0_28
LBB0_12:
	movq	_MEDIA_LNK_FL_ENABLED@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_25
## %bb.13:
	movl	(%r14), %eax
	movq	_PREVIEW_OUTPUT_MEMORY@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
LBB0_14:
	movq	_MEDIA_LNK_FL_ENABLED@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_26
## %bb.15:
	movl	(%r14), %eax
	movq	_PREVIEW_OUTPUT_RESIZER@GOTPCREL(%rip), %rcx
LBB0_16:
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	notl	%edx
	testl	%edx, %eax
	je	LBB0_20
LBB0_17:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_19
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_19:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_29
LBB0_20:
	orl	%eax, %ecx
	movl	%ecx, (%r14)
	jmp	LBB0_28
LBB0_21:
	movq	_PREVIEW_INPUT_MEMORY@GOTPCREL(%rip), %rdx
	jmp	LBB0_23
LBB0_22:
	movq	_PREVIEW_INPUT_CCDC@GOTPCREL(%rip), %rdx
LBB0_23:
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_29
## %bb.24:
	movq	_PREVIEW_INPUT_NONE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%r14)
	jmp	LBB0_29
LBB0_25:
	movq	_PREVIEW_OUTPUT_MEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_26:
	movq	_PREVIEW_OUTPUT_RESIZER@GOTPCREL(%rip), %rax
LBB0_27:
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r14)
LBB0_28:
	xorl	%eax, %eax
LBB0_29:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEDIA_LNK_FL_ENABLED,4,2       ## @MEDIA_LNK_FL_ENABLED
	.comm	_PREVIEW_INPUT_CCDC,8,3         ## @PREVIEW_INPUT_CCDC
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_PREVIEW_INPUT_MEMORY,8,3       ## @PREVIEW_INPUT_MEMORY
	.comm	_PREVIEW_INPUT_NONE,8,3         ## @PREVIEW_INPUT_NONE
	.comm	_PREVIEW_OUTPUT_MEMORY,4,2      ## @PREVIEW_OUTPUT_MEMORY
	.comm	_PREVIEW_OUTPUT_RESIZER,4,2     ## @PREVIEW_OUTPUT_RESIZER
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_preview_link_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function preview_link_setup
_preview_link_setup:                    ; @preview_link_setup
	.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	x20, x3
	mov	x21, x2
	mov	x22, x1
	bl	_media_entity_to_v4l2_subdev
	bl	_v4l2_get_subdevdata
	mov	x19, x0
	ldr	w22, [x22]
	ldr	w0, [x21, #4]
	bl	_is_media_entity_v4l2_subdev
	orr	w8, w22, #0x20000
	cmp	x0, #0
	csel	w8, w22, w8, eq
	mov	w9, #127
	movk	w9, #2, lsl #16
	cmp	w8, w9
	b.gt	LBB0_6
; %bb.1:
	cmp	w8, #128
	b.eq	LBB0_11
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_17
; %bb.3:
Lloh0:
	adrp	x8, _MEDIA_LNK_FL_ENABLED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEDIA_LNK_FL_ENABLED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	ldr	x8, [x19, #8]
	tst	w9, w20
	b.eq	LBB0_20
; %bb.4:
Lloh3:
	adrp	x9, _PREVIEW_INPUT_CCDC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PREVIEW_INPUT_CCDC@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_16
; %bb.5:
	mov	w0, #0
Lloh6:
	adrp	x8, _PREVIEW_INPUT_MEMORY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PREVIEW_INPUT_MEMORY@GOTPAGEOFF]
	b	LBB0_29
LBB0_6:
	mov	w9, #128
	movk	w9, #2, lsl #16
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.7:
	mov	w9, #129
	movk	w9, #2, lsl #16
	cmp	w8, w9
	b.ne	LBB0_17
; %bb.8:
Lloh8:
	adrp	x8, _MEDIA_LNK_FL_ENABLED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MEDIA_LNK_FL_ENABLED@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x8]
	ldr	x8, [x19, #8]
	tst	w9, w20
	b.eq	LBB0_21
; %bb.9:
Lloh11:
	adrp	x9, _PREVIEW_INPUT_MEMORY@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PREVIEW_INPUT_MEMORY@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_16
; %bb.10:
	mov	w0, #0
Lloh14:
	adrp	x8, _PREVIEW_INPUT_CCDC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PREVIEW_INPUT_CCDC@GOTPAGEOFF]
	b	LBB0_29
LBB0_11:
Lloh16:
	adrp	x8, _MEDIA_LNK_FL_ENABLED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MEDIA_LNK_FL_ENABLED@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_24
; %bb.12:
	ldr	w8, [x19]
Lloh19:
	adrp	x9, _PREVIEW_OUTPUT_MEMORY@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PREVIEW_OUTPUT_MEMORY@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
Lloh21:
	adrp	x8, _MEDIA_LNK_FL_ENABLED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MEDIA_LNK_FL_ENABLED@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_25
; %bb.14:
	ldr	w8, [x19]
Lloh24:
	adrp	x9, _PREVIEW_OUTPUT_RESIZER@GOTPAGE
Lloh25:
	ldr	x9, [x9, _PREVIEW_OUTPUT_RESIZER@GOTPAGEOFF]
LBB0_15:
	ldr	w9, [x9]
	bics	wzr, w8, w9
	b.eq	LBB0_19
LBB0_16:
Lloh26:
	adrp	x8, _EBUSY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh28:
	adrp	x8, _EINVAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_30
LBB0_19:
	mov	w0, #0
	orr	w8, w9, w8
	b	LBB0_27
LBB0_20:
Lloh30:
	adrp	x9, _PREVIEW_INPUT_MEMORY@GOTPAGE
Lloh31:
	ldr	x9, [x9, _PREVIEW_INPUT_MEMORY@GOTPAGEOFF]
	b	LBB0_22
LBB0_21:
Lloh32:
	adrp	x9, _PREVIEW_INPUT_CCDC@GOTPAGE
Lloh33:
	ldr	x9, [x9, _PREVIEW_INPUT_CCDC@GOTPAGEOFF]
LBB0_22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_28
; %bb.23:
	mov	w0, #0
	b	LBB0_30
LBB0_24:
	mov	w0, #0
Lloh34:
	adrp	x8, _PREVIEW_OUTPUT_MEMORY@GOTPAGE
Lloh35:
	ldr	x8, [x8, _PREVIEW_OUTPUT_MEMORY@GOTPAGEOFF]
	b	LBB0_26
LBB0_25:
	mov	w0, #0
Lloh36:
	adrp	x8, _PREVIEW_OUTPUT_RESIZER@GOTPAGE
Lloh37:
	ldr	x8, [x8, _PREVIEW_OUTPUT_RESIZER@GOTPAGEOFF]
LBB0_26:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
LBB0_27:
	str	w8, [x19]
	b	LBB0_30
LBB0_28:
	mov	w0, #0
Lloh38:
	adrp	x8, _PREVIEW_INPUT_NONE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _PREVIEW_INPUT_NONE@GOTPAGEOFF]
LBB0_29:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_30:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_MEDIA_LNK_FL_ENABLED,4,2       ; @MEDIA_LNK_FL_ENABLED
	.comm	_PREVIEW_INPUT_CCDC,8,3         ; @PREVIEW_INPUT_CCDC
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_PREVIEW_INPUT_MEMORY,8,3       ; @PREVIEW_INPUT_MEMORY
	.comm	_PREVIEW_INPUT_NONE,8,3         ; @PREVIEW_INPUT_NONE
	.comm	_PREVIEW_OUTPUT_MEMORY,4,2      ; @PREVIEW_OUTPUT_MEMORY
	.comm	_PREVIEW_OUTPUT_RESIZER,4,2     ; @PREVIEW_OUTPUT_RESIZER
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_preview_link_setup
.subsections_via_symbols
