	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function configure_clock
_configure_clock:                       ## @configure_clock
	.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
	movq	8(%rdi), %r14
	movl	(%r14), %eax
	cmpl	$129, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_3
## %bb.2:
	movl	(%rbx), %edi
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_WM8993_CLOCKING_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wm8993_read
	movq	_WM8993_MCLK_DIV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_WM8993_SYSCLK_SRC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	%r8d, %edi
	notl	%edi
	andl	%eax, %edi
	movl	4(%r14), %esi
	xorl	%edx, %edx
	cmpl	$13500001, %esi                 ## imm = 0xCDFE61
	setge	%cl
	cmovgel	%r8d, %edx
	shrl	%cl, %esi
	orl	%edi, %edx
	jmp	LBB0_5
LBB0_4:
	movl	(%rbx), %edi
	movl	12(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	movq	_WM8993_CLOCKING_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wm8993_read
	movq	_WM8993_SYSCLK_SRC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	12(%r14), %esi
	movq	_WM8993_MCLK_DIV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %ecx
	orl	%eax, %ecx
	notl	%edx
	andl	%eax, %edx
	cmpl	$13500001, %esi                 ## imm = 0xCDFE61
	cmovgel	%ecx, %edx
	setge	%cl
	shrl	%cl, %esi
LBB0_5:
	movl	%esi, 8(%r14)
	movq	_WM8993_CLOCKING_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wm8993_write
	movl	(%rbx), %edi
	movl	8(%r14), %edx
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_dbg
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Using %dHz MCLK\n"

	.comm	_WM8993_CLOCKING_2,4,2          ## @WM8993_CLOCKING_2
	.comm	_WM8993_MCLK_DIV,4,2            ## @WM8993_MCLK_DIV
	.comm	_WM8993_SYSCLK_SRC,4,2          ## @WM8993_SYSCLK_SRC
L_.str.1:                               ## @.str.1
	.asciz	"Using %dHz FLL clock\n"

L_.str.2:                               ## @.str.2
	.asciz	"System clock not configured\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"CLK_SYS is %dHz\n"

	.no_dead_strip	_configure_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function configure_clock
_configure_clock:                       ; @configure_clock
	.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	x20, [x0, #8]
	ldr	w8, [x20]
Lloh0:
	adrp	x21, _WM8993_CLOCKING_2@GOTPAGE
Lloh1:
	ldr	x21, [x21, _WM8993_CLOCKING_2@GOTPAGEOFF]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.2:
	ldr	w0, [x19]
	ldr	w2, [x20, #4]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w1, [x21]
	mov	x0, x19
	bl	_wm8993_read
Lloh4:
	adrp	x8, _WM8993_MCLK_DIV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _WM8993_MCLK_DIV@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _WM8993_SYSCLK_SRC@GOTPAGE
Lloh8:
	ldr	x9, [x9, _WM8993_SYSCLK_SRC@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w9, w9, w8
	bic	w9, w0, w9
	ldr	w10, [x20, #4]
	mov	w11, #65120
	movk	w11, #205, lsl #16
	cmp	w10, w11
	csel	w11, w8, wzr, gt
	cset	w8, gt
	lsr	w8, w10, w8
	orr	w2, w9, w11
	b	LBB0_4
LBB0_3:
	ldr	w0, [x19]
	ldr	w2, [x20, #12]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	w1, [x21]
	mov	x0, x19
	bl	_wm8993_read
Lloh12:
	adrp	x8, _WM8993_SYSCLK_SRC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WM8993_SYSCLK_SRC@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w8, w8, w0
	ldr	w9, [x20, #12]
	mov	w10, #65120
	movk	w10, #205, lsl #16
Lloh15:
	adrp	x11, _WM8993_MCLK_DIV@GOTPAGE
Lloh16:
	ldr	x11, [x11, _WM8993_MCLK_DIV@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	orr	w12, w11, w8
	bic	w8, w8, w11
	cmp	w9, w10
	csel	w2, w12, w8, gt
	cset	w8, gt
	lsr	w8, w9, w8
LBB0_4:
	str	w8, [x20, #8]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_wm8993_write
	ldr	w0, [x19]
	ldr	w2, [x20, #8]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	w0, [x19]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Using %dHz MCLK\n"

	.comm	_WM8993_CLOCKING_2,4,2          ; @WM8993_CLOCKING_2
	.comm	_WM8993_MCLK_DIV,4,2            ; @WM8993_MCLK_DIV
	.comm	_WM8993_SYSCLK_SRC,4,2          ; @WM8993_SYSCLK_SRC
l_.str.1:                               ; @.str.1
	.asciz	"Using %dHz FLL clock\n"

l_.str.2:                               ; @.str.2
	.asciz	"System clock not configured\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"CLK_SYS is %dHz\n"

	.no_dead_strip	_configure_clock
.subsections_via_symbols
