	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa711x_s_crystal_freq
_saa711x_s_crystal_freq:                ## @saa711x_s_crystal_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_to_state
	movq	_SAA7115_FREQ_32_11_MHZ@GOTPCREL(%rip), %rcx
	cmpq	%rbx, (%rcx)
	je	LBB0_3
## %bb.1:
	movq	_SAA7115_FREQ_24_576_MHZ@GOTPCREL(%rip), %rcx
	cmpq	%rbx, (%rcx)
	je	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_4
LBB0_3:
	movq	%rbx, 32(%rax)
	movq	_SAA7115_FREQ_FL_DOUBLE_ASCLK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andq	%r12, %rcx
	movq	%rcx, 24(%rax)
	movq	_SAA7115_FREQ_FL_CGCDIV@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andq	%r12, %rcx
	xorl	%r15d, %r15d
	cmpq	$1, %rcx
	movl	$0, %ecx
	adcl	$3, %ecx
	movl	%ecx, (%rax)
	movq	_SAA7115_FREQ_FL_UCGC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andq	%r12, %rcx
	movq	%rcx, 16(%rax)
	movq	_SAA7115_FREQ_FL_APLL@GOTPCREL(%rip), %rcx
	andq	(%rcx), %r12
	movq	%r12, 8(%rax)
	movl	4(%rax), %esi
	movq	%r14, %rdi
	callq	_saa711x_s_clock_freq
LBB0_4:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SAA7115_FREQ_32_11_MHZ,8,3     ## @SAA7115_FREQ_32_11_MHZ
	.comm	_SAA7115_FREQ_24_576_MHZ,8,3    ## @SAA7115_FREQ_24_576_MHZ
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SAA7115_FREQ_FL_DOUBLE_ASCLK,8,3 ## @SAA7115_FREQ_FL_DOUBLE_ASCLK
	.comm	_SAA7115_FREQ_FL_CGCDIV,8,3     ## @SAA7115_FREQ_FL_CGCDIV
	.comm	_SAA7115_FREQ_FL_UCGC,8,3       ## @SAA7115_FREQ_FL_UCGC
	.comm	_SAA7115_FREQ_FL_APLL,8,3       ## @SAA7115_FREQ_FL_APLL
	.no_dead_strip	_saa711x_s_crystal_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa711x_s_crystal_freq
_saa711x_s_crystal_freq:                ; @saa711x_s_crystal_freq
	.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, x2
	mov	x21, x1
	mov	x19, x0
	bl	_to_state
Lloh0:
	adrp	x8, _SAA7115_FREQ_32_11_MHZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SAA7115_FREQ_32_11_MHZ@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _SAA7115_FREQ_24_576_MHZ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SAA7115_FREQ_24_576_MHZ@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x21
	ccmp	x9, x21, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _SAA7115_FREQ_FL_DOUBLE_ASCLK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SAA7115_FREQ_FL_DOUBLE_ASCLK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	and	x8, x8, x20
	stp	x8, x21, [x0, #24]
Lloh9:
	adrp	x8, _SAA7115_FREQ_FL_CGCDIV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SAA7115_FREQ_FL_CGCDIV@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	tst	x8, x20
	mov	w8, #3
	cinc	w8, w8, eq
	str	w8, [x0]
Lloh12:
	adrp	x8, _SAA7115_FREQ_FL_UCGC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SAA7115_FREQ_FL_UCGC@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _SAA7115_FREQ_FL_APLL@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SAA7115_FREQ_FL_APLL@GOTPAGEOFF]
	and	x8, x8, x20
Lloh17:
	ldr	x9, [x9]
	and	x9, x9, x20
	stp	x9, x8, [x0, #8]
	ldr	w1, [x0, #4]
	mov	x0, x19
	bl	_saa711x_s_clock_freq
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SAA7115_FREQ_32_11_MHZ,8,3     ; @SAA7115_FREQ_32_11_MHZ
	.comm	_SAA7115_FREQ_24_576_MHZ,8,3    ; @SAA7115_FREQ_24_576_MHZ
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SAA7115_FREQ_FL_DOUBLE_ASCLK,8,3 ; @SAA7115_FREQ_FL_DOUBLE_ASCLK
	.comm	_SAA7115_FREQ_FL_CGCDIV,8,3     ; @SAA7115_FREQ_FL_CGCDIV
	.comm	_SAA7115_FREQ_FL_UCGC,8,3       ; @SAA7115_FREQ_FL_UCGC
	.comm	_SAA7115_FREQ_FL_APLL,8,3       ; @SAA7115_FREQ_FL_APLL
	.no_dead_strip	_saa711x_s_crystal_freq
.subsections_via_symbols
