	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ai_clkctl_setdelay
_ai_clkctl_setdelay:                    ## @ai_clkctl_setdelay
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	_PLL_DELAY@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	callq	_ai_slowclk_src
	movq	_SCC_SS_XTAL@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_XTAL_ON_DELAY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_2:
	addq	%r12, %rbx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_ai_slowclk_freq
	movq	%rax, %rcx
	imulq	%rax, %rbx
	addq	$999999, %rbx                   ## imm = 0xF423F
	movabsq	$4835703278458516699, %rsi      ## imm = 0x431BDE82D7B634DB
	movq	%rbx, %rax
	imulq	%rsi
	movq	%rdx, %r15
	movq	_FREF_DELAY@GOTPCREL(%rip), %rax
	imulq	(%rax), %rcx
	movq	%rdx, %rdi
	shrq	$63, %rdi
	sarq	$18, %r15
	addq	$999999, %rcx                   ## imm = 0xF423F
	movq	%rcx, %rax
	imulq	%rsi
	movq	%rdx, %rbx
	addq	%rdi, %r15
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$18, %rbx
	addq	%rax, %rbx
	movq	%r15, %rdi
	callq	_CHIPCREGOFFS
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	callq	_bcma_write32
	movq	%rbx, %rdi
	callq	_CHIPCREGOFFS
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bcma_write32                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PLL_DELAY,8,3                  ## @PLL_DELAY
	.comm	_SCC_SS_XTAL,8,3                ## @SCC_SS_XTAL
	.comm	_XTAL_ON_DELAY,8,3              ## @XTAL_ON_DELAY
	.comm	_FREF_DELAY,8,3                 ## @FREF_DELAY
	.no_dead_strip	_ai_clkctl_setdelay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ai_clkctl_setdelay
_ai_clkctl_setdelay:                    ; @ai_clkctl_setdelay
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PLL_DELAY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PLL_DELAY@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	bl	_ai_slowclk_src
Lloh3:
	adrp	x8, _SCC_SS_XTAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCC_SS_XTAL@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _XTAL_ON_DELAY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _XTAL_ON_DELAY@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x0, x8
	csel	x8, xzr, x9, eq
	add	x21, x8, x21
	mov	x0, x20
	mov	w1, #0
	mov	x2, x19
	bl	_ai_slowclk_freq
	mov	w8, #16959
	movk	w8, #15, lsl #16
	madd	x9, x21, x0, x8
	add	x10, x8, #1
	sdiv	x20, x9, x10
Lloh9:
	adrp	x9, _FREF_DELAY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _FREF_DELAY@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	madd	x8, x9, x0, x8
	sdiv	x21, x8, x10
	mov	x0, x20
	bl	_CHIPCREGOFFS
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_bcma_write32
	mov	x0, x21
	bl	_CHIPCREGOFFS
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	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
	b	_bcma_write32
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PLL_DELAY,8,3                  ; @PLL_DELAY
	.comm	_SCC_SS_XTAL,8,3                ; @SCC_SS_XTAL
	.comm	_XTAL_ON_DELAY,8,3              ; @XTAL_ON_DELAY
	.comm	_FREF_DELAY,8,3                 ; @FREF_DELAY
	.no_dead_strip	_ai_clkctl_setdelay
.subsections_via_symbols
