	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_sample_rate
_set_sample_rate:                       ## @set_sample_rate
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_wait_handshake
	testq	%rax, %rax
	je	LBB0_1
## %bb.15:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpl	$44100, %r14d                   ## imm = 0xAC44
	je	LBB0_2
## %bb.3:
	cmpl	$48000, %r14d                   ## imm = 0xBB80
	jne	LBB0_5
## %bb.4:
	movq	_GD_SPDIF_STATUS_48@GOTPCREL(%rip), %rax
	movq	_GD_CLOCK_48@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_2:
	movq	_GD_SPDIF_STATUS_44@GOTPCREL(%rip), %rax
	movq	_GD_CLOCK_44@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_5:
	movq	_GD_SPDIF_STATUS_NOCHANGE@GOTPCREL(%rip), %rax
	movq	_GD_CLOCK_NOCHANGE@GOTPCREL(%rip), %rcx
LBB0_6:
	movq	(%rax), %r15
	movq	(%rcx), %r12
	movq	_GD_CLOCK_NOCHANGE@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rbx)
	jne	LBB0_8
## %bb.7:
	movq	(%rax), %r12
LBB0_8:
	movq	_GD_SPDIF_STATUS_NOCHANGE@GOTPCREL(%rip), %r13
	cmpq	8(%rbx), %r15
	jne	LBB0_10
## %bb.9:
	movq	(%r13), %r15
LBB0_10:
	movl	%r14d, %edi
	callq	_cpu_to_le32
	movq	24(%rbx), %rcx
	movl	%eax, 24(%rcx)
	movq	%r12, 16(%rcx)
	movq	%r15, 8(%rcx)
	movl	$3, (%rcx)
	movq	_GD_CLOCK_NOCHANGE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	je	LBB0_12
## %bb.11:
	movq	%r12, (%rbx)
LBB0_12:
	cmpq	(%r13), %r15
	je	LBB0_14
## %bb.13:
	movq	%r15, 8(%rbx)
LBB0_14:
	movl	%r14d, 16(%rbx)
	movq	%rbx, %rdi
	callq	_clear_handshake
	movq	_DSP_VC_SET_GD_AUDIO_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_send_vector                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_GD_CLOCK_44,8,3                ## @GD_CLOCK_44
	.comm	_GD_SPDIF_STATUS_44,8,3         ## @GD_SPDIF_STATUS_44
	.comm	_GD_CLOCK_48,8,3                ## @GD_CLOCK_48
	.comm	_GD_SPDIF_STATUS_48,8,3         ## @GD_SPDIF_STATUS_48
	.comm	_GD_CLOCK_NOCHANGE,8,3          ## @GD_CLOCK_NOCHANGE
	.comm	_GD_SPDIF_STATUS_NOCHANGE,8,3   ## @GD_SPDIF_STATUS_NOCHANGE
	.comm	_DSP_VC_SET_GD_AUDIO_STATE,4,2  ## @DSP_VC_SET_GD_AUDIO_STATE
	.no_dead_strip	_set_sample_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_sample_rate
_set_sample_rate:                       ; @set_sample_rate
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	bl	_wait_handshake
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh3:
	adrp	x8, _GD_SPDIF_STATUS_44@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GD_SPDIF_STATUS_44@GOTPAGEOFF]
Lloh5:
	adrp	x9, _GD_CLOCK_44@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GD_CLOCK_44@GOTPAGEOFF]
	mov	w10, #44100
	mov	w11, #48000
Lloh7:
	adrp	x21, _GD_SPDIF_STATUS_NOCHANGE@GOTPAGE
Lloh8:
	ldr	x21, [x21, _GD_SPDIF_STATUS_NOCHANGE@GOTPAGEOFF]
Lloh9:
	adrp	x24, _GD_CLOCK_NOCHANGE@GOTPAGE
Lloh10:
	ldr	x24, [x24, _GD_CLOCK_NOCHANGE@GOTPAGEOFF]
Lloh11:
	adrp	x12, _GD_SPDIF_STATUS_48@GOTPAGE
Lloh12:
	ldr	x12, [x12, _GD_SPDIF_STATUS_48@GOTPAGEOFF]
	cmp	w20, w11
Lloh13:
	adrp	x11, _GD_CLOCK_48@GOTPAGE
Lloh14:
	ldr	x11, [x11, _GD_CLOCK_48@GOTPAGEOFF]
	csel	x11, x24, x11, ne
	csel	x12, x21, x12, ne
	cmp	w20, w10
	csel	x9, x9, x11, eq
	csel	x8, x8, x12, eq
	ldr	x8, [x8]
	ldr	x9, [x9]
	ldr	x10, [x24]
	ldp	x11, x12, [x19]
	cmp	x11, x9
	csel	x23, x10, x9, eq
	ldr	x9, [x21]
	cmp	x8, x12
	csel	x22, x9, x8, eq
	mov	x0, x20
	bl	_cpu_to_le32
	ldr	x8, [x19, #24]
	str	w0, [x8, #24]
	stp	x22, x23, [x8, #8]
	mov	w9, #3
	str	w9, [x8]
	ldr	x8, [x24]
	cmp	x23, x8
	b.eq	LBB0_4
; %bb.3:
	str	x23, [x19]
LBB0_4:
	ldr	x8, [x21]
	cmp	x22, x8
	b.eq	LBB0_6
; %bb.5:
	str	x22, [x19, #8]
LBB0_6:
	str	w20, [x19, #16]
	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
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_send_vector
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_GD_CLOCK_44,8,3                ; @GD_CLOCK_44
	.comm	_GD_SPDIF_STATUS_44,8,3         ; @GD_SPDIF_STATUS_44
	.comm	_GD_CLOCK_48,8,3                ; @GD_CLOCK_48
	.comm	_GD_SPDIF_STATUS_48,8,3         ; @GD_SPDIF_STATUS_48
	.comm	_GD_CLOCK_NOCHANGE,8,3          ; @GD_CLOCK_NOCHANGE
	.comm	_GD_SPDIF_STATUS_NOCHANGE,8,3   ; @GD_SPDIF_STATUS_NOCHANGE
	.comm	_DSP_VC_SET_GD_AUDIO_STATE,4,2  ; @DSP_VC_SET_GD_AUDIO_STATE
	.no_dead_strip	_set_sample_rate
.subsections_via_symbols
