	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_cs2000_rate
_update_cs2000_rate:                    ## @update_cs2000_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
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_OXYGEN_RATE_44100@GOTPCREL(%rip), %rcx
	cmpl	$63999, %esi                    ## imm = 0xF9FF
	jle	LBB0_1
## %bb.3:
	cmpl	$64000, %esi                    ## imm = 0xFA00
	je	LBB0_12
## %bb.4:
	cmpl	$88200, %esi                    ## imm = 0x15888
	je	LBB0_7
## %bb.5:
	cmpl	$176400, %esi                   ## imm = 0x2B110
	jne	LBB0_6
LBB0_7:
	movl	(%rcx), %ebx
	cmpl	$96000, %esi                    ## imm = 0x17700
	jbe	LBB0_8
	jmp	LBB0_10
LBB0_1:
	cmpl	$32000, %esi                    ## imm = 0x7D00
	je	LBB0_12
## %bb.2:
	cmpl	$44100, %esi                    ## imm = 0xAC44
	je	LBB0_7
LBB0_6:
	movq	_OXYGEN_RATE_48000@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_12:
	movq	_OXYGEN_RATE_32000@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_8:
	movq	_CS2000_REF_CLK_DIV_1@GOTPCREL(%rip), %r15
	movq	_MCLK_256@GOTPCREL(%rip), %rcx
	cmpl	$48000, %esi                    ## imm = 0xBB80
	ja	LBB0_11
## %bb.9:
	cmpq	$0, (%rax)
	jne	LBB0_11
LBB0_10:
	movq	_CS2000_REF_CLK_DIV_2@GOTPCREL(%rip), %r15
	movq	_MCLK_512@GOTPCREL(%rip), %rcx
LBB0_11:
	movl	(%rcx), %edi
	callq	_OXYGEN_I2S_MCLK
	movl	(%r15), %r15d
	orl	%eax, %ebx
	movq	_OXYGEN_I2S_A_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OXYGEN_I2S_RATE_MASK@GOTPCREL(%rip), %rax
	movq	_OXYGEN_I2S_MCLK_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_oxygen_write16_masked
	movq	_CS2000_FUN_CFG_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_cs2000_write_cached
	movl	$3, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msleep                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_OXYGEN_RATE_32000,4,2          ## @OXYGEN_RATE_32000
	.comm	_OXYGEN_RATE_44100,4,2          ## @OXYGEN_RATE_44100
	.comm	_OXYGEN_RATE_48000,4,2          ## @OXYGEN_RATE_48000
	.comm	_MCLK_256,4,2                   ## @MCLK_256
	.comm	_CS2000_REF_CLK_DIV_1,4,2       ## @CS2000_REF_CLK_DIV_1
	.comm	_MCLK_512,4,2                   ## @MCLK_512
	.comm	_CS2000_REF_CLK_DIV_2,4,2       ## @CS2000_REF_CLK_DIV_2
	.comm	_OXYGEN_I2S_A_FORMAT,4,2        ## @OXYGEN_I2S_A_FORMAT
	.comm	_OXYGEN_I2S_RATE_MASK,4,2       ## @OXYGEN_I2S_RATE_MASK
	.comm	_OXYGEN_I2S_MCLK_MASK,4,2       ## @OXYGEN_I2S_MCLK_MASK
	.comm	_CS2000_FUN_CFG_1,4,2           ## @CS2000_FUN_CFG_1
	.no_dead_strip	_update_cs2000_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_cs2000_rate
_update_cs2000_rate:                    ; @update_cs2000_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	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _OXYGEN_RATE_44100@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OXYGEN_RATE_44100@GOTPAGEOFF]
	mov	w10, #63999
	cmp	w1, w10
	b.le	LBB0_5
; %bb.1:
	mov	w10, #64000
	cmp	w1, w10
	b.eq	LBB0_8
; %bb.2:
	mov	w10, #22664
	movk	w10, #1, lsl #16
	cmp	w1, w10
	b.eq	LBB0_7
; %bb.3:
	mov	w10, #45328
	movk	w10, #2, lsl #16
	cmp	w1, w10
	b.eq	LBB0_7
LBB0_4:
Lloh2:
	adrp	x9, _OXYGEN_RATE_48000@GOTPAGE
Lloh3:
	ldr	x9, [x9, _OXYGEN_RATE_48000@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	mov	w10, #32000
	cmp	w1, w10
	b.eq	LBB0_8
; %bb.6:
	mov	w10, #44100
	cmp	w1, w10
	b.ne	LBB0_4
LBB0_7:
	ldr	w21, [x9]
	mov	w9, #30464
	movk	w9, #1, lsl #16
	cmp	w1, w9
	b.ls	LBB0_9
	b	LBB0_12
LBB0_8:
Lloh4:
	adrp	x9, _OXYGEN_RATE_32000@GOTPAGE
Lloh5:
	ldr	x9, [x9, _OXYGEN_RATE_32000@GOTPAGEOFF]
Lloh6:
	ldr	w21, [x9]
LBB0_9:
	mov	w9, #48000
	cmp	w1, w9
	b.hi	LBB0_11
; %bb.10:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
LBB0_11:
Lloh7:
	adrp	x20, _CS2000_REF_CLK_DIV_1@GOTPAGE
Lloh8:
	ldr	x20, [x20, _CS2000_REF_CLK_DIV_1@GOTPAGEOFF]
Lloh9:
	adrp	x8, _MCLK_256@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MCLK_256@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh11:
	adrp	x20, _CS2000_REF_CLK_DIV_2@GOTPAGE
Lloh12:
	ldr	x20, [x20, _CS2000_REF_CLK_DIV_2@GOTPAGEOFF]
Lloh13:
	adrp	x8, _MCLK_512@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MCLK_512@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	bl	_OXYGEN_I2S_MCLK
	ldr	w20, [x20]
	orr	w2, w0, w21
Lloh15:
	adrp	x8, _OXYGEN_I2S_A_FORMAT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _OXYGEN_I2S_A_FORMAT@GOTPAGEOFF]
Lloh17:
	adrp	x9, _OXYGEN_I2S_RATE_MASK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _OXYGEN_I2S_RATE_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	ldr	w8, [x9]
Lloh21:
	adrp	x9, _OXYGEN_I2S_MCLK_MASK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _OXYGEN_I2S_MCLK_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x19
	bl	_oxygen_write16_masked
Lloh24:
	adrp	x8, _CS2000_FUN_CFG_1@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CS2000_FUN_CFG_1@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_cs2000_write_cached
	mov	w0, #3
	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	_msleep
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_OXYGEN_RATE_32000,4,2          ; @OXYGEN_RATE_32000
	.comm	_OXYGEN_RATE_44100,4,2          ; @OXYGEN_RATE_44100
	.comm	_OXYGEN_RATE_48000,4,2          ; @OXYGEN_RATE_48000
	.comm	_MCLK_256,4,2                   ; @MCLK_256
	.comm	_CS2000_REF_CLK_DIV_1,4,2       ; @CS2000_REF_CLK_DIV_1
	.comm	_MCLK_512,4,2                   ; @MCLK_512
	.comm	_CS2000_REF_CLK_DIV_2,4,2       ; @CS2000_REF_CLK_DIV_2
	.comm	_OXYGEN_I2S_A_FORMAT,4,2        ; @OXYGEN_I2S_A_FORMAT
	.comm	_OXYGEN_I2S_RATE_MASK,4,2       ; @OXYGEN_I2S_RATE_MASK
	.comm	_OXYGEN_I2S_MCLK_MASK,4,2       ; @OXYGEN_I2S_MCLK_MASK
	.comm	_CS2000_FUN_CFG_1,4,2           ; @CS2000_FUN_CFG_1
	.no_dead_strip	_update_cs2000_rate
.subsections_via_symbols
