	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_input_clock
_set_input_clock:                       ## @set_input_clock
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_DE_ACT
	cmpl	$128, %ebx
	je	LBB0_3
## %bb.1:
	cmpl	$129, %ebx
	jne	LBB0_4
## %bb.2:
	movq	_GD_CLOCK_UNDEF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	movq	_GD_SPDIF_STATUS_UNDEF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r14)
	movl	24(%r14), %esi
	movq	%r14, %rdi
	callq	_set_sample_rate
	movl	$129, (%r14)
	leaq	L_.str.1(%rip), %rdi
	callq	_DE_ACT
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movq	_GD_CLOCK_SPDIFIN@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	16(%r14), %rcx
	movq	%rax, 8(%rcx)
	movq	_GD_SPDIF_STATUS_NOCHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx)
	movq	%r14, %rdi
	callq	_clear_handshake
	movq	_DSP_VC_SET_GD_AUDIO_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_send_vector
	movq	(%rbx), %rax
	movq	%rax, 8(%r14)
	leaq	L_.str.2(%rip), %rdi
	callq	_DE_ACT
	movl	$128, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set_input_clock:\n"

	.comm	_GD_CLOCK_UNDEF,8,3             ## @GD_CLOCK_UNDEF
	.comm	_GD_SPDIF_STATUS_UNDEF,4,2      ## @GD_SPDIF_STATUS_UNDEF
L_.str.1:                               ## @.str.1
	.asciz	"Set Gina clock to INTERNAL\n"

	.comm	_GD_CLOCK_SPDIFIN,8,3           ## @GD_CLOCK_SPDIFIN
	.comm	_GD_SPDIF_STATUS_NOCHANGE,4,2   ## @GD_SPDIF_STATUS_NOCHANGE
	.comm	_DSP_VC_SET_GD_AUDIO_STATE,4,2  ## @DSP_VC_SET_GD_AUDIO_STATE
L_.str.2:                               ## @.str.2
	.asciz	"Set Gina20 clock to SPDIF\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_set_input_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_input_clock
_set_input_clock:                       ; @set_input_clock
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DE_ACT
	cmp	w20, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w20, #129
	b.ne	LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, _GD_CLOCK_UNDEF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GD_CLOCK_UNDEF@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	x8, [x19, #8]
Lloh5:
	adrp	x8, _GD_SPDIF_STATUS_UNDEF@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GD_SPDIF_STATUS_UNDEF@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #28]
	ldr	w1, [x19, #24]
	mov	x0, x19
	bl	_set_sample_rate
	mov	w8, #129
	str	w8, [x19]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DE_ACT
	mov	w0, #0
	b	LBB0_5
LBB0_3:
Lloh10:
	adrp	x20, _GD_CLOCK_SPDIFIN@GOTPAGE
Lloh11:
	ldr	x20, [x20, _GD_CLOCK_SPDIFIN@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [x19, #16]
	str	x8, [x9, #8]
Lloh12:
	adrp	x8, _GD_SPDIF_STATUS_NOCHANGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GD_SPDIF_STATUS_NOCHANGE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x9]
	mov	x0, x19
	bl	_clear_handshake
Lloh15:
	adrp	x8, _DSP_VC_SET_GD_AUDIO_STATE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DSP_VC_SET_GD_AUDIO_STATE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_send_vector
	ldr	x8, [x20]
	str	x8, [x19, #8]
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DE_ACT
	mov	w0, #0
	mov	w8, #128
	str	w8, [x19]
	b	LBB0_5
LBB0_4:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set_input_clock:\n"

	.comm	_GD_CLOCK_UNDEF,8,3             ; @GD_CLOCK_UNDEF
	.comm	_GD_SPDIF_STATUS_UNDEF,4,2      ; @GD_SPDIF_STATUS_UNDEF
l_.str.1:                               ; @.str.1
	.asciz	"Set Gina clock to INTERNAL\n"

	.comm	_GD_CLOCK_SPDIFIN,8,3           ; @GD_CLOCK_SPDIFIN
	.comm	_GD_SPDIF_STATUS_NOCHANGE,4,2   ; @GD_SPDIF_STATUS_NOCHANGE
	.comm	_DSP_VC_SET_GD_AUDIO_STATE,4,2  ; @DSP_VC_SET_GD_AUDIO_STATE
l_.str.2:                               ; @.str.2
	.asciz	"Set Gina20 clock to SPDIF\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_set_input_clock
.subsections_via_symbols
