	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alcor_set_clock
_alcor_set_clock:                       ## @alcor_set_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rax
	movq	8(%rdi), %rdi
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	testl	%esi, %esi
	je	LBB0_11
## %bb.1:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	_alcor_pll_cfg@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_12
## %bb.2:
	xorl	%r15d, %r15d
	movl	$2147483647, %r14d              ## imm = 0x7FFFFFFF
	movl	$12, %r12d
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_6 Depth=1
                                        ## kill: def $r13d killed $r13d def $r13
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_alcor_pll_cfg@GOTPCREL(%rip), %rbx
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r15
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$16, %r12
	movq	%r13, %r8
	cmpq	%rax, %r15
	jge	LBB0_13
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rbx
	movl	(%rbx,%r12), %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_DIV_ROUND_UP
	cmpl	%eax, -12(%rbx,%r12)
	ja	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	%eax, -8(%rbx,%r12)
	jb	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rbx,%r12), %edi
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	%eax, %esi
	callq	_DIV_ROUND_UP
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	subl	%eax, %ecx
	movl	%r14d, %eax
	movl	%ecx, %r14d
	negl	%r14d
	cmovsl	%ecx, %r14d
	cmpl	%eax, %r14d
	jae	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	-4(%rbx,%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_alcor_pll_cfg@GOTPCREL(%rip), %rbx
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
                                        ## kill: def $r13d killed $r13d def $r13
	movl	%eax, %r14d
	jmp	LBB0_4
LBB0_11:
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_12:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_13:
	movl	%r8d, %r14d
	shll	$8, %r14d
	addl	$-256, %r14d
	orl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	movq	_AU6601_CLK_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r8d killed $r8d killed $r8
	movl	%r14d, %r9d
	callq	_dev_dbg
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
LBB0_14:
	movq	_AU6601_CLK_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %esi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_alcor_write16                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AU6601_CLK_SELECT,4,2          ## @AU6601_CLK_SELECT
	.comm	_alcor_pll_cfg,8,3              ## @alcor_pll_cfg
	.comm	_AU6601_CLK_ENABLE,4,2          ## @AU6601_CLK_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set freq %d cal freq %d, use div %d, mod %x\n"

	.no_dead_strip	_alcor_set_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alcor_set_clock
_alcor_set_clock:                       ; @alcor_set_clock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x8, x0
	ldr	x0, [x0, #8]
	cbz	w1, LBB0_9
; %bb.1:
	mov	x20, x1
	stp	x8, x0, [sp, #8]                ; 16-byte Folded Spill
Lloh0:
	adrp	x24, _alcor_pll_cfg@GOTPAGE
Lloh1:
	ldr	x24, [x24, _alcor_pll_cfg@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.2:
	mov	x26, #0
	mov	x27, #0
	mov	w22, #0
	mov	w19, #0
	str	wzr, [sp, #28]                  ; 4-byte Folded Spill
	mov	w28, #2147483647
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x19
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x27, x27, #1
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	add	x26, x26, #16
	cmp	x27, w0, sxtw
	mov	x19, x23
	b.ge	LBB0_11
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x21, [x24]
	add	x25, x21, x26
	ldr	w0, [x25, #12]
	mov	x1, x20
	bl	_DIV_ROUND_UP
	mov	x23, x0
	ldr	w8, [x25]
	cmp	w8, w23
	b.hi	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x25, #4]
	cmp	w8, w23
	b.lo	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x25, #12]
	mov	x1, x23
	bl	_DIV_ROUND_UP
	mov	x22, x0
	subs	w8, w20, w22
	cneg	w8, w8, mi
	cmp	w8, w28
	b.hs	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x21, x26
	ldr	w9, [x9, #8]
	str	w9, [sp, #28]                   ; 4-byte Folded Spill
	mov	x28, x8
	b	LBB0_4
LBB0_9:
	mov	w24, #0
	b	LBB0_12
LBB0_10:
	str	wzr, [sp, #28]                  ; 4-byte Folded Spill
	mov	w23, #0
	mov	w22, #0
LBB0_11:
	lsl	w8, w23, #8
	sub	w8, w8, #256
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	orr	w8, w8, w9
Lloh2:
	adrp	x9, _AU6601_CLK_ENABLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AU6601_CLK_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w24, w8, w9
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	bl	_dev_dbg
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
LBB0_12:
Lloh7:
	adrp	x8, _AU6601_CLK_SELECT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AU6601_CLK_SELECT@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x1, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_alcor_write16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AU6601_CLK_SELECT,4,2          ; @AU6601_CLK_SELECT
	.comm	_alcor_pll_cfg,8,3              ; @alcor_pll_cfg
	.comm	_AU6601_CLK_ENABLE,4,2          ; @AU6601_CLK_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set freq %d cal freq %d, use div %d, mod %x\n"

	.no_dead_strip	_alcor_set_clock
.subsections_via_symbols
