	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_s_input                   ## -- Begin function ivtv_s_input
	.p2align	4, 0x90
_ivtv_s_input:                          ## @ivtv_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rbx
	cmpl	%edx, (%rbx)
	jbe	LBB0_1
## %bb.3:
	movl	%edx, %r15d
	cmpl	%edx, 4(%rbx)
	jne	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_IVTV_DEBUG_INFO
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	leaq	20(%rbx), %rdi
	callq	_atomic_read
	testq	%rax, %rax
	jle	LBB0_7
## %bb.6:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	4(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_IVTV_DEBUG_INFO
	movl	%r15d, 4(%rbx)
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movl	%r15d, %ecx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 16(%rbx)
	movq	%rbx, %rdi
	callq	_ivtv_mute
	movq	%rbx, %rdi
	callq	_ivtv_video_set_io
	movq	%rbx, %rdi
	callq	_ivtv_audio_set_io
	movq	%rbx, %rdi
	callq	_ivtv_unmute
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Input unchanged\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"Changing input from %d to %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_s_input                   ; -- Begin function ivtv_s_input
	.p2align	2
_ivtv_s_input:                          ; @ivtv_s_input
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x19, [x1]
	ldr	w8, [x19]
	cmp	w8, w2
	b.ls	LBB0_3
; %bb.1:
	mov	x20, x2
	ldr	w8, [x19, #4]
	cmp	w8, w2
	b.ne	LBB0_4
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IVTV_DEBUG_INFO
	b	LBB0_8
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	add	x0, x19, #20
	bl	_atomic_read
	cmp	x0, #1
	b.lt	LBB0_7
; %bb.5:
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
	ldr	w8, [x19, #4]
	stp	x8, x20, [sp]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IVTV_DEBUG_INFO
	str	w20, [x19, #4]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w8, [x8, w20, uxtw #2]
	str	w8, [x19, #16]
	mov	x0, x19
	bl	_ivtv_mute
	mov	x0, x19
	bl	_ivtv_video_set_io
	mov	x0, x19
	bl	_ivtv_audio_set_io
	mov	x0, x19
	bl	_ivtv_unmute
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Input unchanged\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"Changing input from %d to %d\n"

.subsections_via_symbols
