	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function video_mux_link_setup
_video_mux_link_setup:                  ## @video_mux_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, %r14
	movq	%rsi, %rbx
	callq	_media_entity_to_v4l2_subdev
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_v4l2_subdev_to_video_mux
	movq	_MEDIA_PAD_FL_SOURCE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r13d, %r13d
	testl	%ecx, (%rbx)
	jne	LBB0_7
## %bb.1:
	movl	(%r15), %edi
	movl	%r12d, %esi
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%rax, %r12
	movq	8(%r14), %rcx
	movq	16(%r14), %rax
	movl	(%rax), %edx
	movq	8(%rbx), %r9
	movq	16(%rbx), %rax
	movl	(%rax), %r8d
	movq	_MEDIA_LNK_FL_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%esi, %eax
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r12, %r14
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	(%r14), %rax
	movq	8(%rbx), %rcx
	movq	_MEDIA_LNK_FL_ENABLED@GOTPCREL(%rip), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	testl	%edi, (%rsi)
	je	LBB0_4
## %bb.2:
	cmpq	%rcx, %rax
	je	LBB0_6
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_6
LBB0_4:
	cmpq	%rcx, %rax
	jne	LBB0_6
## %bb.5:
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	12(%r14), %edi
	callq	_mux_control_deselect
	movq	$-1, (%r14)
LBB0_6:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_7:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEDIA_PAD_FL_SOURCE,4,2        ## @MEDIA_PAD_FL_SOURCE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"link setup '%s':%d->'%s':%d[%d]"

	.comm	_MEDIA_LNK_FL_ENABLED,4,2       ## @MEDIA_LNK_FL_ENABLED
	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.2:                               ## @.str.2
	.asciz	"going inactive\n"

	.no_dead_strip	_video_mux_link_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function video_mux_link_setup
_video_mux_link_setup:                  ; @video_mux_link_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x3
	mov	x20, x2
	mov	x23, x1
	bl	_media_entity_to_v4l2_subdev
	mov	x22, x0
	bl	_v4l2_subdev_to_video_mux
	ldr	w8, [x23]
Lloh0:
	adrp	x9, _MEDIA_PAD_FL_SOURCE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MEDIA_PAD_FL_SOURCE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_9
LBB0_2:
	mov	x19, x0
	ldr	w0, [x22]
	ldp	x9, x8, [x20, #8]
	ldp	x11, x10, [x23, #8]
Lloh3:
	adrp	x24, _MEDIA_LNK_FL_ENABLED@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MEDIA_LNK_FL_ENABLED@GOTPAGEOFF]
	ldr	w12, [x24]
	and	w12, w12, w21
	ldr	w8, [x8]
	ldr	w10, [x10]
	stp	x11, x12, [sp, #24]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	w10, [x24]
	ldr	x8, [x19]
	ldr	x9, [x23, #8]
	tst	w10, w21
	b.eq	LBB0_5
; %bb.3:
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.4:
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_5:
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	w0, [x22]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x19, #12]
	bl	_mux_control_deselect
	mov	w21, #0
	mov	x8, #-1
	str	x8, [x19]
	b	LBB0_8
LBB0_7:
	mov	w21, #0
LBB0_8:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MEDIA_PAD_FL_SOURCE,4,2        ; @MEDIA_PAD_FL_SOURCE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"link setup '%s':%d->'%s':%d[%d]"

	.comm	_MEDIA_LNK_FL_ENABLED,4,2       ; @MEDIA_LNK_FL_ENABLED
	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.2:                               ; @.str.2
	.asciz	"going inactive\n"

	.no_dead_strip	_video_mux_link_setup
.subsections_via_symbols
