	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdsp_set_clock_source
_hdsp_set_clock_source:                 ## @hdsp_set_clock_source
	.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
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %rbx
	addl	$-128, %esi
	cmpl	$9, %esi
	ja	LBB0_12
## %bb.1:
	movl	$32000, %r14d                   ## imm = 0x7D00
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rsi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_8:
	movl	$96000, %r14d                   ## imm = 0x17700
	jmp	LBB0_13
LBB0_12:
	movl	$48000, %r14d                   ## imm = 0xBB80
	jmp	LBB0_13
LBB0_7:
	movl	$88200, %r14d                   ## imm = 0x15888
	jmp	LBB0_13
LBB0_6:
	movl	$64000, %r14d                   ## imm = 0xFA00
	jmp	LBB0_13
LBB0_5:
	movl	$44100, %r14d                   ## imm = 0xAC44
	jmp	LBB0_13
LBB0_11:
	movl	$192000, %r14d                  ## imm = 0x2EE00
	jmp	LBB0_13
LBB0_10:
	movl	$176400, %r14d                  ## imm = 0x2B110
	jmp	LBB0_13
LBB0_9:
	movl	$128000, %r14d                  ## imm = 0x1F400
LBB0_13:
	movq	_HDSP_ClockModeMaster@GOTPCREL(%rip), %rax
	movl	(%rbx), %edx
	orl	(%rax), %edx
	movl	%edx, (%rbx)
	movq	_HDSP_controlRegister@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hdsp_write
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	$1, %edx
	callq	_hdsp_set_rate
LBB0_14:
	xorl	%r14d, %r14d
LBB0_15:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	callq	_hdsp_external_sample_rate
	movl	$-1, %r14d
	testl	%eax, %eax
	je	LBB0_15
## %bb.3:
	movq	%rbx, %rdi
	callq	_hdsp_external_sample_rate
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_hdsp_set_rate
	testl	%eax, %eax
	jne	LBB0_15
## %bb.4:
	movq	_HDSP_ClockModeMaster@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	(%rbx), %edx
	movl	%edx, (%rbx)
	movq	_HDSP_controlRegister@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hdsp_write
	jmp	LBB0_14
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_7
	.long	L0_0_set_6
	.long	L0_0_set_12
	.long	L0_0_set_5
	.long	L0_0_set_13
	.long	L0_0_set_11
	.long	L0_0_set_10
	.long	L0_0_set_9
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_HDSP_ClockModeMaster,4,2       ## @HDSP_ClockModeMaster
	.comm	_HDSP_controlRegister,4,2       ## @HDSP_controlRegister
	.no_dead_strip	_hdsp_set_clock_source
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdsp_set_clock_source
_hdsp_set_clock_source:                 ; @hdsp_set_clock_source
	.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	x19, x0
	sub	w8, w1, #128
	cmp	w8, #9
	b.hi	LBB0_3
; %bb.1:
	mov	w20, #32000
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	w20, #30464
	b	LBB0_10
LBB0_3:
	mov	w20, #48000
	b	LBB0_11
LBB0_4:
	mov	w20, #22664
	b	LBB0_10
LBB0_5:
	mov	w20, #64000
	b	LBB0_11
LBB0_6:
	mov	w20, #44100
	b	LBB0_11
LBB0_7:
	mov	w20, #60928
	movk	w20, #2, lsl #16
	b	LBB0_11
LBB0_8:
	mov	w20, #45328
	movk	w20, #2, lsl #16
	b	LBB0_11
LBB0_9:
	mov	w20, #62464
LBB0_10:
	movk	w20, #1, lsl #16
LBB0_11:
Lloh2:
	adrp	x8, _HDSP_ClockModeMaster@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HDSP_ClockModeMaster@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w2, w9, w8
	str	w2, [x19]
Lloh5:
	adrp	x8, _HDSP_controlRegister@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HDSP_controlRegister@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hdsp_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_hdsp_set_rate
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	x0, x19
	bl	_hdsp_external_sample_rate
	cbz	w0, LBB0_16
; %bb.15:
	mov	x0, x19
	bl	_hdsp_external_sample_rate
	mov	x1, x0
	mov	x0, x19
	mov	w2, #1
	bl	_hdsp_set_rate
	cbz	w0, LBB0_17
LBB0_16:
	mov	w0, #-1
	b	LBB0_13
LBB0_17:
Lloh8:
	adrp	x8, _HDSP_ClockModeMaster@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HDSP_ClockModeMaster@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w2, w9, w8
	str	w2, [x19]
Lloh11:
	adrp	x8, _HDSP_controlRegister@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HDSP_controlRegister@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hdsp_write
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
                                        ; -- End function
	.comm	_HDSP_ClockModeMaster,4,2       ; @HDSP_ClockModeMaster
	.comm	_HDSP_controlRegister,4,2       ; @HDSP_controlRegister
	.no_dead_strip	_hdsp_set_clock_source
.subsections_via_symbols
