	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usbvision_muxsel               ## -- Begin function usbvision_muxsel
	.p2align	4, 0x90
_usbvision_muxsel:                      ## @usbvision_muxsel
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_SAA7115_COMPOSITE0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_SAA7115_COMPOSITE3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movl	16(%rdi), %edx
	movl	%esi, %edi
	xorl	%esi, %esi
	callq	_RESTRICT_TO_RANGE
	movl	%r14d, (%r15)
	movq	_usbvision_device_data@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r15), %rcx
	cmpl	$128, (%rax,%rcx,4)
	jne	LBB0_3
## %bb.1:
	movq	_SAA7115_COMPOSITE2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_switch_svideo_input@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.2:
	movq	_SAA7115_COMPOSITE1@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_SAA7115_COMPOSITE1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
LBB0_4:
	movq	_SAA7115_SVIDEO1@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_routing@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movslq	%r14d, %rbx
	movl	-48(%rbp,%rbx,4), %ecx
	movq	%r15, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_call_all
	leaq	L___const.usbvision_muxsel.audio(%rip), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r15, %rdi
	callq	_usbvision_set_audio
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SAA7115_COMPOSITE0,4,2         ## @SAA7115_COMPOSITE0
	.comm	_SAA7115_COMPOSITE3,4,2         ## @SAA7115_COMPOSITE3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @__const.usbvision_muxsel.audio
L___const.usbvision_muxsel.audio:
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.comm	_usbvision_device_data,8,3      ## @usbvision_device_data
	.comm	_SAA7115_COMPOSITE2,4,2         ## @SAA7115_COMPOSITE2
	.comm	_switch_svideo_input,4,2        ## @switch_svideo_input
	.comm	_SAA7115_COMPOSITE1,4,2         ## @SAA7115_COMPOSITE1
	.comm	_SAA7115_SVIDEO1,4,2            ## @SAA7115_SVIDEO1
	.comm	_video,4,2                      ## @video
	.comm	_s_routing,4,2                  ## @s_routing
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usbvision_muxsel               ; -- Begin function usbvision_muxsel
	.p2align	2
_usbvision_muxsel:                      ; @usbvision_muxsel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _SAA7115_COMPOSITE0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SAA7115_COMPOSITE0@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _SAA7115_COMPOSITE3@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SAA7115_COMPOSITE3@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	str	w8, [sp, #8]
	str	w9, [sp, #20]
	ldr	w2, [x0, #16]
	mov	x0, x1
	mov	w1, #0
	bl	_RESTRICT_TO_RANGE
Lloh9:
	adrp	x8, _usbvision_device_data@GOTPAGE
Lloh10:
	ldr	x8, [x8, _usbvision_device_data@GOTPAGEOFF]
	str	w20, [x19]
Lloh11:
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #128
	b.ne	LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _SAA7115_COMPOSITE2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SAA7115_COMPOSITE2@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [sp, #12]
Lloh15:
	adrp	x8, _switch_svideo_input@GOTPAGE
Lloh16:
	ldr	x8, [x8, _switch_svideo_input@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _SAA7115_COMPOSITE1@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SAA7115_COMPOSITE1@GOTPAGEOFF]
Lloh20:
	adrp	x10, _SAA7115_SVIDEO1@GOTPAGE
Lloh21:
	ldr	x10, [x10, _SAA7115_SVIDEO1@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x10, x9, eq
	b	LBB0_3
LBB0_2:
Lloh22:
	adrp	x8, _SAA7115_COMPOSITE1@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SAA7115_COMPOSITE1@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [sp, #12]
Lloh25:
	adrp	x8, _SAA7115_SVIDEO1@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SAA7115_SVIDEO1@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	str	w8, [sp, #16]
Lloh27:
	adrp	x8, _video@GOTPAGE
Lloh28:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh29:
	adrp	x9, _s_routing@GOTPAGE
Lloh30:
	ldr	x9, [x9, _s_routing@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	ldr	w2, [x9]
	sbfiz	x20, x20, #2, #32
	add	x8, sp, #8
	ldr	w3, [x8, x20]
	mov	x0, x19
	mov	w4, #0
	mov	w5, #0
	bl	_call_all
Lloh33:
	adrp	x8, l___const.usbvision_muxsel.audio@PAGE
Lloh34:
	add	x8, x8, l___const.usbvision_muxsel.audio@PAGEOFF
	ldr	w1, [x8, x20]
	mov	x0, x19
	bl	_usbvision_set_audio
	ldr	x8, [sp, #24]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_SAA7115_COMPOSITE0,4,2         ; @SAA7115_COMPOSITE0
	.comm	_SAA7115_COMPOSITE3,4,2         ; @SAA7115_COMPOSITE3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @__const.usbvision_muxsel.audio
l___const.usbvision_muxsel.audio:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.comm	_usbvision_device_data,8,3      ; @usbvision_device_data
	.comm	_SAA7115_COMPOSITE2,4,2         ; @SAA7115_COMPOSITE2
	.comm	_switch_svideo_input,4,2        ; @switch_svideo_input
	.comm	_SAA7115_COMPOSITE1,4,2         ; @SAA7115_COMPOSITE1
	.comm	_SAA7115_SVIDEO1,4,2            ; @SAA7115_SVIDEO1
	.comm	_video,4,2                      ; @video
	.comm	_s_routing,4,2                  ; @s_routing
.subsections_via_symbols
