	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tm6000_set_audio_bitrate       ## -- Begin function tm6000_set_audio_bitrate
	.p2align	4, 0x90
_tm6000_set_audio_bitrate:              ## @tm6000_set_audio_bitrate
	.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
	movq	%rdi, %rbx
	cmpl	$48000, %esi                    ## imm = 0xBB80
	je	LBB0_1
## %bb.2:
	cmpl	$32000, %esi                    ## imm = 0x7D00
	jne	LBB0_11
## %bb.3:
	movl	$144, %edx
	xorl	%r14d, %r14d
	jmp	LBB0_4
LBB0_1:
	movl	$145, %edx
	movl	$96, %r14d
LBB0_4:
	movl	%esi, (%rbx)
	movq	8(%rbx), %rax
	movq	_TM6010@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movq	_TM6010_REQ08_R0A_A_I2S_MOD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_tm6000_set_reg
	testl	%eax, %eax
	js	LBB0_10
## %bb.6:
	movq	_TM6010_REQ08_RF0_DAUDIO_INPUT_CONFIG@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_7:
	movq	_TM6000_REQ07_REB_VADC_AADC_MODE@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	$240, %ecx
	callq	_tm6000_set_reg_mask
	testl	%eax, %eax
	js	LBB0_10
## %bb.9:
	xorl	%eax, %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TM6010,8,3                     ## @TM6010
	.comm	_TM6010_REQ08_R0A_A_I2S_MOD,4,2 ## @TM6010_REQ08_R0A_A_I2S_MOD
	.comm	_TM6010_REQ08_RF0_DAUDIO_INPUT_CONFIG,4,2 ## @TM6010_REQ08_RF0_DAUDIO_INPUT_CONFIG
	.comm	_TM6000_REQ07_REB_VADC_AADC_MODE,4,2 ## @TM6000_REQ07_REB_VADC_AADC_MODE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tm6000_set_audio_bitrate       ; -- Begin function tm6000_set_audio_bitrate
	.p2align	2
_tm6000_set_audio_bitrate:              ; @tm6000_set_audio_bitrate
	.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
	mov	w8, #48000
	cmp	w1, w8
	b.eq	LBB0_3
; %bb.1:
	mov	w8, #32000
	cmp	w1, w8
	b.ne	LBB0_7
; %bb.2:
	mov	w20, #0
	mov	w2, #144
	b	LBB0_4
LBB0_3:
	mov	w2, #145
	mov	w20, #96
LBB0_4:
	str	w1, [x19]
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _TM6010@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TM6010@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
Lloh3:
	adrp	x8, _TM6010_REQ08_R0A_A_I2S_MOD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TM6010_REQ08_R0A_A_I2S_MOD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tm6000_set_reg
	tbnz	w0, #31, LBB0_11
; %bb.6:
Lloh6:
	adrp	x8, _TM6010_REQ08_RF0_DAUDIO_INPUT_CONFIG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TM6010_REQ08_RF0_DAUDIO_INPUT_CONFIG@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_8:
Lloh11:
	adrp	x8, _TM6000_REQ07_REB_VADC_AADC_MODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TM6000_REQ07_REB_VADC_AADC_MODE@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #240
	bl	_tm6000_set_reg_mask
	tbnz	w0, #31, LBB0_11
; %bb.10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TM6010,8,3                     ; @TM6010
	.comm	_TM6010_REQ08_R0A_A_I2S_MOD,4,2 ; @TM6010_REQ08_R0A_A_I2S_MOD
	.comm	_TM6010_REQ08_RF0_DAUDIO_INPUT_CONFIG,4,2 ; @TM6010_REQ08_RF0_DAUDIO_INPUT_CONFIG
	.comm	_TM6000_REQ07_REB_VADC_AADC_MODE,4,2 ; @TM6000_REQ07_REB_VADC_AADC_MODE
.subsections_via_symbols
