	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sca3000_read_raw_samp_freq
_sca3000_read_raw_samp_freq:            ## @sca3000_read_raw_samp_freq
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %esi
	movq	%r14, %rdx
	callq	___sca3000_get_base_freq
	testl	%eax, %eax
	je	LBB0_1
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	_SCA3000_REG_CTRL_SEL_OUT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sca3000_read_ctrl_reg
	movl	%eax, %ecx
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movl	(%r14), %edx
	xorl	%eax, %eax
	testl	%edx, %edx
	jle	LBB0_9
## %bb.4:
	movq	_SCA3000_REG_OUT_CTRL_BUF_DIV_MASK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%ecx, %esi
	cmpl	$129, %esi
	je	LBB0_5
## %bb.6:
	cmpl	$128, %esi
	jne	LBB0_9
## %bb.7:
	movl	$2, %ecx
	jmp	LBB0_8
LBB0_2:
	movl	%ecx, %eax
	jmp	LBB0_9
LBB0_5:
	movl	$1, %ecx
LBB0_8:
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %edx
	movl	%edx, (%r14)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_SCA3000_REG_CTRL_SEL_OUT_CTRL,4,2 ## @SCA3000_REG_CTRL_SEL_OUT_CTRL
	.comm	_SCA3000_REG_OUT_CTRL_BUF_DIV_MASK,4,2 ## @SCA3000_REG_OUT_CTRL_BUF_DIV_MASK
	.no_dead_strip	_sca3000_read_raw_samp_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sca3000_read_raw_samp_freq
_sca3000_read_raw_samp_freq:            ; @sca3000_read_raw_samp_freq
	.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, x1
	mov	x20, x0
	ldr	w1, [x0]
	mov	x2, x19
	bl	___sca3000_get_base_freq
	cbz	w0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh0:
	adrp	x8, _SCA3000_REG_CTRL_SEL_OUT_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCA3000_REG_CTRL_SEL_OUT_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_sca3000_read_ctrl_reg
	tbnz	w0, #31, LBB0_1
; %bb.3:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.4:
Lloh3:
	adrp	x9, _SCA3000_REG_OUT_CTRL_BUF_DIV_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SCA3000_REG_OUT_CTRL_BUF_DIV_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w9, w9, w0
	cmp	w9, #129
	b.eq	LBB0_8
; %bb.5:
	cmp	w9, #128
	b.ne	LBB0_7
; %bb.6:
	mov	w9, #2
	b	LBB0_9
LBB0_7:
	mov	w0, #0
	b	LBB0_1
LBB0_8:
	mov	w9, #1
LBB0_9:
	mov	w0, #0
	lsr	w8, w8, w9
	str	w8, [x19]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SCA3000_REG_CTRL_SEL_OUT_CTRL,4,2 ; @SCA3000_REG_CTRL_SEL_OUT_CTRL
	.comm	_SCA3000_REG_OUT_CTRL_BUF_DIV_MASK,4,2 ; @SCA3000_REG_OUT_CTRL_BUF_DIV_MASK
	.no_dead_strip	_sca3000_read_raw_samp_freq
.subsections_via_symbols
