	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_input
_set_input:                             ## @set_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	%esi, (%rdi)
	movq	_irq_iswitch@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.1:
	leaq	20(%rbx), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 24(%rbx)
	je	LBB0_3
## %bb.2:
	movl	%r15d, 4(%rbx)
	jmp	LBB0_4
LBB0_5:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_video_mux
	jmp	LBB0_6
LBB0_3:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_video_mux
LBB0_4:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
LBB0_6:
	movq	8(%rbx), %rdx
	movq	_TUNER_ABSENT@GOTPCREL(%rip), %rsi
	movq	_TVAUDIO_INPUT_EXTERN@GOTPCREL(%rip), %rax
	movq	%rax, %rcx
	cmpq	(%rsi), %rdx
	je	LBB0_8
## %bb.7:
	movq	_TVAUDIO_INPUT_TUNER@GOTPCREL(%rip), %rcx
LBB0_8:
	testl	%r15d, %r15d
	cmoveq	%rcx, %rax
	movl	(%rax), %esi
	movl	%esi, 16(%rbx)
	movq	%rbx, %rdi
	callq	_audio_input
	movq	%rbx, %rdi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_tvnorm                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_irq_iswitch,8,3                ## @irq_iswitch
	.comm	_TUNER_ABSENT,8,3               ## @TUNER_ABSENT
	.comm	_TVAUDIO_INPUT_TUNER,4,2        ## @TVAUDIO_INPUT_TUNER
	.comm	_TVAUDIO_INPUT_EXTERN,4,2       ## @TVAUDIO_INPUT_EXTERN
	.no_dead_strip	_set_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_input
_set_input:                             ; @set_input
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	str	w1, [x0]
Lloh0:
	adrp	x8, _irq_iswitch@GOTPAGE
Lloh1:
	ldr	x8, [x8, _irq_iswitch@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	add	x22, x20, #20
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_4
; %bb.2:
	str	w21, [x20, #4]
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	mov	x1, x21
	bl	_video_mux
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	mov	x1, x21
	bl	_video_mux
LBB0_5:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
LBB0_6:
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x9, _TUNER_ABSENT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TUNER_ABSENT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh6:
	adrp	x8, _TVAUDIO_INPUT_TUNER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TVAUDIO_INPUT_TUNER@GOTPAGEOFF]
	ccmp	w21, #0, #0, ne
Lloh8:
	adrp	x9, _TVAUDIO_INPUT_EXTERN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TVAUDIO_INPUT_EXTERN@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w1, [x8]
	str	w1, [x20, #16]
	mov	x0, x20
	bl	_audio_input
	mov	x0, x20
	mov	x1, x19
	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
	b	_set_tvnorm
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_irq_iswitch,8,3                ; @irq_iswitch
	.comm	_TUNER_ABSENT,8,3               ; @TUNER_ABSENT
	.comm	_TVAUDIO_INPUT_TUNER,4,2        ; @TVAUDIO_INPUT_TUNER
	.comm	_TVAUDIO_INPUT_EXTERN,4,2       ; @TVAUDIO_INPUT_EXTERN
	.no_dead_strip	_set_input
.subsections_via_symbols
