	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	cmpl	$31999, %esi                    ## imm = 0x7CFF
	jle	LBB0_1
## %bb.8:
	cmpl	$47999, %ebx                    ## imm = 0xBB7F
	jle	LBB0_9
## %bb.12:
	cmpl	$48000, %ebx                    ## imm = 0xBB80
	je	LBB0_21
## %bb.13:
	cmpl	$96000, %ebx                    ## imm = 0x17700
	je	LBB0_14
## %bb.15:
	cmpl	$88200, %ebx                    ## imm = 0x15888
	jne	LBB0_20
## %bb.16:
	movq	_GD24_88200@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_1:
	cmpl	$15999, %ebx                    ## imm = 0x3E7F
	jg	LBB0_5
## %bb.2:
	cmpl	$8000, %ebx                     ## imm = 0x1F40
	je	LBB0_19
## %bb.3:
	cmpl	$11025, %ebx                    ## imm = 0x2B11
	jne	LBB0_20
## %bb.4:
	movq	_GD24_11025@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_9:
	cmpl	$32000, %ebx                    ## imm = 0x7D00
	je	LBB0_17
## %bb.10:
	cmpl	$44100, %ebx                    ## imm = 0xAC44
	jne	LBB0_20
## %bb.11:
	movq	_GD24_44100@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_5:
	cmpl	$16000, %ebx                    ## imm = 0x3E80
	je	LBB0_18
## %bb.6:
	cmpl	$22050, %ebx                    ## imm = 0x5622
	jne	LBB0_20
## %bb.7:
	movq	_GD24_22050@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_21:
	movq	_GD24_48000@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_14:
	movq	_GD24_96000@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_19:
	movq	_GD24_8000@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_17:
	movq	_GD24_32000@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_18:
	movq	_GD24_16000@GOTPCREL(%rip), %rax
LBB0_22:
	movslq	(%rax), %r15
	movq	%r14, %rdi
	callq	_wait_handshake
	testq	%rax, %rax
	je	LBB0_25
## %bb.23:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_24:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movq	%r15, %rdi
	callq	_DE_ACT
	movl	%ebx, (%r14)
	movq	8(%r14), %rax
	movq	_ECHO_CLOCK_ESYNC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_27
## %bb.26:
	movq	_GD24_EXT_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_27:
	movl	%ebx, %edi
	callq	_cpu_to_le32
	movq	16(%r14), %rcx
	movl	%eax, 4(%rcx)
	movl	%r15d, (%rcx)
	movq	%r14, %rdi
	callq	_clear_handshake
	movq	_DSP_VC_SET_GD_AUDIO_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_send_vector                    ## TAILCALL
LBB0_20:
	movslq	%ebx, %rdi
	callq	_DE_ACT
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_GD24_96000,4,2                 ## @GD24_96000
	.comm	_GD24_88200,4,2                 ## @GD24_88200
	.comm	_GD24_48000,4,2                 ## @GD24_48000
	.comm	_GD24_44100,4,2                 ## @GD24_44100
	.comm	_GD24_32000,4,2                 ## @GD24_32000
	.comm	_GD24_22050,4,2                 ## @GD24_22050
	.comm	_GD24_16000,4,2                 ## @GD24_16000
	.comm	_GD24_11025,4,2                 ## @GD24_11025
	.comm	_GD24_8000,4,2                  ## @GD24_8000
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ECHO_CLOCK_ESYNC,8,3           ## @ECHO_CLOCK_ESYNC
	.comm	_GD24_EXT_SYNC,4,2              ## @GD24_EXT_SYNC
	.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	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	x20, x1
	mov	x19, x0
	mov	w8, #31999
	cmp	w1, w8
	b.le	LBB0_6
; %bb.1:
	mov	w8, #47999
	cmp	w20, w8
	b.le	LBB0_10
; %bb.2:
	mov	w8, #48000
	cmp	w20, w8
	b.eq	LBB0_16
; %bb.3:
	mov	w8, #30464
	movk	w8, #1, lsl #16
	cmp	w20, w8
	b.eq	LBB0_17
; %bb.4:
	mov	w8, #22664
	movk	w8, #1, lsl #16
	cmp	w20, w8
	b.ne	LBB0_25
; %bb.5:
Lloh0:
	adrp	x8, _GD24_88200@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GD24_88200@GOTPAGEOFF]
	b	LBB0_21
LBB0_6:
	mov	w8, #15999
	cmp	w20, w8
	b.gt	LBB0_13
; %bb.7:
	mov	w8, #8000
	cmp	w20, w8
	b.eq	LBB0_18
; %bb.8:
	mov	w8, #11025
	cmp	w20, w8
	b.ne	LBB0_25
; %bb.9:
Lloh2:
	adrp	x8, _GD24_11025@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GD24_11025@GOTPAGEOFF]
	b	LBB0_21
LBB0_10:
	mov	w8, #32000
	cmp	w20, w8
	b.eq	LBB0_19
; %bb.11:
	mov	w8, #44100
	cmp	w20, w8
	b.ne	LBB0_25
; %bb.12:
Lloh4:
	adrp	x8, _GD24_44100@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GD24_44100@GOTPAGEOFF]
	b	LBB0_21
LBB0_13:
	mov	w8, #16000
	cmp	w20, w8
	b.eq	LBB0_20
; %bb.14:
	mov	w8, #22050
	cmp	w20, w8
	b.ne	LBB0_25
; %bb.15:
Lloh6:
	adrp	x8, _GD24_22050@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GD24_22050@GOTPAGEOFF]
	b	LBB0_21
LBB0_16:
Lloh8:
	adrp	x8, _GD24_48000@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GD24_48000@GOTPAGEOFF]
	b	LBB0_21
LBB0_17:
Lloh10:
	adrp	x8, _GD24_96000@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GD24_96000@GOTPAGEOFF]
	b	LBB0_21
LBB0_18:
Lloh12:
	adrp	x8, _GD24_8000@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GD24_8000@GOTPAGEOFF]
	b	LBB0_21
LBB0_19:
Lloh14:
	adrp	x8, _GD24_32000@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GD24_32000@GOTPAGEOFF]
	b	LBB0_21
LBB0_20:
Lloh16:
	adrp	x8, _GD24_16000@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GD24_16000@GOTPAGEOFF]
LBB0_21:
	ldrsw	x21, [x8]
	mov	x0, x19
	bl	_wait_handshake
	cbz	x0, LBB0_24
; %bb.22:
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_23:
	ldr	w8, [x8]
	neg	w0, w8
	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
	ret
LBB0_24:
	mov	x0, x21
	bl	_DE_ACT
	str	w20, [x19]
	ldr	x8, [x19, #8]
Lloh20:
	adrp	x9, _ECHO_CLOCK_ESYNC@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ECHO_CLOCK_ESYNC@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
Lloh23:
	adrp	x10, _GD24_EXT_SYNC@GOTPAGE
Lloh24:
	ldr	x10, [x10, _GD24_EXT_SYNC@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	cmp	x8, x9
	csel	w21, w10, w21, eq
	mov	x0, x20
	bl	_cpu_to_le32
	ldr	x8, [x19, #16]
	stp	w21, w0, [x8]
	mov	x0, x19
	bl	_clear_handshake
Lloh26:
	adrp	x8, _DSP_VC_SET_GD_AUDIO_STATE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DSP_VC_SET_GD_AUDIO_STATE@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, 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	_send_vector
LBB0_25:
	sxtw	x0, w20
	bl	_DE_ACT
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_23
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_GD24_96000,4,2                 ; @GD24_96000
	.comm	_GD24_88200,4,2                 ; @GD24_88200
	.comm	_GD24_48000,4,2                 ; @GD24_48000
	.comm	_GD24_44100,4,2                 ; @GD24_44100
	.comm	_GD24_32000,4,2                 ; @GD24_32000
	.comm	_GD24_22050,4,2                 ; @GD24_22050
	.comm	_GD24_16000,4,2                 ; @GD24_16000
	.comm	_GD24_11025,4,2                 ; @GD24_11025
	.comm	_GD24_8000,4,2                  ; @GD24_8000
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ECHO_CLOCK_ESYNC,8,3           ; @ECHO_CLOCK_ESYNC
	.comm	_GD24_EXT_SYNC,4,2              ; @GD24_EXT_SYNC
	.comm	_DSP_VC_SET_GD_AUDIO_STATE,4,2  ; @DSP_VC_SET_GD_AUDIO_STATE
	.no_dead_strip	_set_sample_rate
.subsections_via_symbols
